/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/clinical/vo/lookups/InternalReferralsGridColumn.java
//#############################################################################
//#                                                                           #
//#  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.clinical.vo.lookups;

import ims.framework.cn.data.TreeNode;
import java.util.ArrayList;
import ims.framework.utils.Image;
import ims.framework.utils.Color;

public class InternalReferralsGridColumn extends ims.vo.LookupInstVo implements TreeNode
{
	private static final long serialVersionUID = 1L;

	public InternalReferralsGridColumn()
	{
		super();
	}
	public InternalReferralsGridColumn(int id)
	{
		super(id, "", true);
	}
	public InternalReferralsGridColumn(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public InternalReferralsGridColumn(int id, String text, boolean active, InternalReferralsGridColumn parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public InternalReferralsGridColumn(int id, String text, boolean active, InternalReferralsGridColumn parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public InternalReferralsGridColumn(int id, String text, boolean active, InternalReferralsGridColumn parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static InternalReferralsGridColumn buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new InternalReferralsGridColumn(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (InternalReferralsGridColumn)super.getParentInstance();
	}
	public InternalReferralsGridColumn getParent()
	{
		return (InternalReferralsGridColumn)super.getParentInstance();
	}
	public void setParent(InternalReferralsGridColumn parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		InternalReferralsGridColumn[] typedChildren = new InternalReferralsGridColumn[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (InternalReferralsGridColumn)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof InternalReferralsGridColumn)
		{
			super.addChild((InternalReferralsGridColumn)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof InternalReferralsGridColumn)
		{
			super.removeChild((InternalReferralsGridColumn)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		InternalReferralsGridColumnCollection result = new InternalReferralsGridColumnCollection();
		result.add(URGENT);
		result.add(REFERRAL_DATE);
		result.add(REFERRIING_HCP);
		result.add(IP_OR_OP);
		result.add(PATIENT_ID);
		result.add(PATIENT_NAME);
		result.add(DOB);
		result.add(SERVICE);
		result.add(REFERRAL_TO);
		result.add(APPOINTMENT_STATUS);
		result.add(STATUS);
		return result;
	}
	public static InternalReferralsGridColumn[] getNegativeInstances()
	{
		InternalReferralsGridColumn[] instances = new InternalReferralsGridColumn[11];
		instances[0] = URGENT;
		instances[1] = REFERRAL_DATE;
		instances[2] = REFERRIING_HCP;
		instances[3] = IP_OR_OP;
		instances[4] = PATIENT_ID;
		instances[5] = PATIENT_NAME;
		instances[6] = DOB;
		instances[7] = SERVICE;
		instances[8] = REFERRAL_TO;
		instances[9] = APPOINTMENT_STATUS;
		instances[10] = STATUS;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[11];
		negativeInstances[0] = "URGENT";
		negativeInstances[1] = "REFERRAL_DATE";
		negativeInstances[2] = "REFERRIING_HCP";
		negativeInstances[3] = "IP_OR_OP";
		negativeInstances[4] = "PATIENT_ID";
		negativeInstances[5] = "PATIENT_NAME";
		negativeInstances[6] = "DOB";
		negativeInstances[7] = "SERVICE";
		negativeInstances[8] = "REFERRAL_TO";
		negativeInstances[9] = "APPOINTMENT_STATUS";
		negativeInstances[10] = "STATUS";
		return negativeInstances;
	}
	public static InternalReferralsGridColumn getNegativeInstance(String name)
	{
		if(name == null)
			return null;
		String[] negativeInstances = getNegativeInstanceNames();
		for (int i = 0; i < negativeInstances.length; i++)
		{
			if(negativeInstances[i].equals(name))
				return getNegativeInstances()[i];
		}
		return null;
	}
	public static InternalReferralsGridColumn getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		InternalReferralsGridColumn[] negativeInstances = getNegativeInstances();
		for (int i = 0; i < negativeInstances.length; i++)
		{
			if(negativeInstances[i].getID() == id)
				return negativeInstances[i];
		}
		return null;
	}
	public int getTypeId()
	{
		return TYPE_ID;
	}
	public static final int TYPE_ID = 1231141;
	public static final InternalReferralsGridColumn URGENT = new InternalReferralsGridColumn(-2727, "Urg", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn REFERRAL_DATE = new InternalReferralsGridColumn(-2728, "Ref Date", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn REFERRIING_HCP = new InternalReferralsGridColumn(-2735, "Referred By", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn IP_OR_OP = new InternalReferralsGridColumn(-2729, "Type", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn PATIENT_ID = new InternalReferralsGridColumn(-2731, "Patient ID", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn PATIENT_NAME = new InternalReferralsGridColumn(-2732, "Name", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn DOB = new InternalReferralsGridColumn(-2734, "DOB", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn SERVICE = new InternalReferralsGridColumn(-2736, "Ref to Service", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn REFERRAL_TO = new InternalReferralsGridColumn(-2737, "Ref To", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn APPOINTMENT_STATUS = new InternalReferralsGridColumn(-2757, "Appointment Status", true, null, null, Color.Default);
	public static final InternalReferralsGridColumn STATUS = new InternalReferralsGridColumn(-2738, "Status", true, null, null, Color.Default);
}
