/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/lookups/HcpDisType.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.core.vo.lookups;

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

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

	public HcpDisType()
	{
		super();
	}
	public HcpDisType(int id)
	{
		super(id, "", true);
	}
	public HcpDisType(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public HcpDisType(int id, String text, boolean active, HcpDisType parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public HcpDisType(int id, String text, boolean active, HcpDisType parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public HcpDisType(int id, String text, boolean active, HcpDisType parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static HcpDisType buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new HcpDisType(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (HcpDisType)super.getParentInstance();
	}
	public HcpDisType getParent()
	{
		return (HcpDisType)super.getParentInstance();
	}
	public void setParent(HcpDisType parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		HcpDisType[] typedChildren = new HcpDisType[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (HcpDisType)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof HcpDisType)
		{
			super.addChild((HcpDisType)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof HcpDisType)
		{
			super.removeChild((HcpDisType)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		HcpDisTypeCollection result = new HcpDisTypeCollection();
		result.add(NURSING);
		result.add(PUBLICHEALTHNURSE);
		result.add(STUDENTNURSE);
		result.add(SCRUBNURSE);
		result.add(ANAESTHETICNURSE);
		result.add(CIRCULATINGNURSE);
		result.add(MEDICAL);
		result.add(AMO);
		result.add(ANAESTHETIST);
		result.add(OTHER);
		result.add(DENTAL);
		result.add(OPTHAMOLOGIST);
		result.add(ORDERLY);
		result.add(RADIOGRAPHER);
		result.add(THERAPY);
		result.add(WELLBEING_COORDINATOR);
		result.add(OT_THERAPY);
		return result;
	}
	public static HcpDisType[] getNegativeInstances()
	{
		HcpDisType[] instances = new HcpDisType[17];
		instances[0] = NURSING;
		instances[1] = PUBLICHEALTHNURSE;
		instances[2] = STUDENTNURSE;
		instances[3] = SCRUBNURSE;
		instances[4] = ANAESTHETICNURSE;
		instances[5] = CIRCULATINGNURSE;
		instances[6] = MEDICAL;
		instances[7] = AMO;
		instances[8] = ANAESTHETIST;
		instances[9] = OTHER;
		instances[10] = DENTAL;
		instances[11] = OPTHAMOLOGIST;
		instances[12] = ORDERLY;
		instances[13] = RADIOGRAPHER;
		instances[14] = THERAPY;
		instances[15] = WELLBEING_COORDINATOR;
		instances[16] = OT_THERAPY;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[17];
		negativeInstances[0] = "NURSING";
		negativeInstances[1] = "PUBLICHEALTHNURSE";
		negativeInstances[2] = "STUDENTNURSE";
		negativeInstances[3] = "SCRUBNURSE";
		negativeInstances[4] = "ANAESTHETICNURSE";
		negativeInstances[5] = "CIRCULATINGNURSE";
		negativeInstances[6] = "MEDICAL";
		negativeInstances[7] = "AMO";
		negativeInstances[8] = "ANAESTHETIST";
		negativeInstances[9] = "OTHER";
		negativeInstances[10] = "DENTAL";
		negativeInstances[11] = "OPTHAMOLOGIST";
		negativeInstances[12] = "ORDERLY";
		negativeInstances[13] = "RADIOGRAPHER";
		negativeInstances[14] = "THERAPY";
		negativeInstances[15] = "WELLBEING_COORDINATOR";
		negativeInstances[16] = "OT_THERAPY";
		return negativeInstances;
	}
	public static HcpDisType 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 HcpDisType getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		HcpDisType[] 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 = 1021048;
	public static final HcpDisType NURSING = new HcpDisType(-27, "Nursing", true, null, new ims.framework.utils.ImagePath(103123, "Images/Admin/user_green.png"), Color.Black);
	public static final HcpDisType PUBLICHEALTHNURSE = new HcpDisType(-165, "Public Health Nurse", true, HcpDisType.NURSING, new ims.framework.utils.ImagePath(103123, "Images/Admin/user_green.png"), Color.Default);
	public static final HcpDisType STUDENTNURSE = new HcpDisType(-270, "Student Nurse", true, HcpDisType.NURSING, new ims.framework.utils.ImagePath(103123, "Images/Admin/user_green.png"), Color.Default);
	public static final HcpDisType SCRUBNURSE = new HcpDisType(-2395, "Scrub Nurse", true, HcpDisType.NURSING, null, Color.Default);
	public static final HcpDisType ANAESTHETICNURSE = new HcpDisType(-2396, "Anaesthetic Nurse", true, HcpDisType.NURSING, null, Color.Default);
	public static final HcpDisType CIRCULATINGNURSE = new HcpDisType(-2397, "Circulating Nurse", true, HcpDisType.NURSING, null, Color.Default);
	public static final HcpDisType MEDICAL = new HcpDisType(-59, "Medical", true, null, new ims.framework.utils.ImagePath(103125, "Images/Admin/user_red.png"), Color.Black);
	public static final HcpDisType AMO = new HcpDisType(-1441, "AMO", true, HcpDisType.MEDICAL, null, Color.Default);
	public static final HcpDisType ANAESTHETIST = new HcpDisType(-1778, "Anaesthetist", true, HcpDisType.MEDICAL, null, Color.Default);
	public static final HcpDisType OTHER = new HcpDisType(-62, "Other Discipline", true, null, new ims.framework.utils.ImagePath(103122, "Images/Admin/user_blue.png"), Color.Black);
	public static final HcpDisType DENTAL = new HcpDisType(-290, "Dental", true, HcpDisType.OTHER, new ims.framework.utils.ImagePath(102194, "Images/Core/dental-icon16.GIF"), Color.Default);
	public static final HcpDisType OPTHAMOLOGIST = new HcpDisType(-298, "Opthamologist", true, HcpDisType.OTHER, new ims.framework.utils.ImagePath(102202, "Images/Core/Glasses.gif"), Color.Default);
	public static final HcpDisType ORDERLY = new HcpDisType(-314, "Medical Orderly", true, HcpDisType.OTHER, null, Color.Default);
	public static final HcpDisType RADIOGRAPHER = new HcpDisType(-2379, "Radiographer", true, HcpDisType.OTHER, null, Color.Default);
	public static final HcpDisType THERAPY = new HcpDisType(-61, "Therapy", true, null, new ims.framework.utils.ImagePath(103126, "Images/Admin/user_gray.png"), Color.Black);
	public static final HcpDisType WELLBEING_COORDINATOR = new HcpDisType(-1512, "Well being Co-Ordinator", true, HcpDisType.THERAPY, null, Color.Default);
	public static final HcpDisType OT_THERAPY = new HcpDisType(-2110, "Occupational Therapist", true, HcpDisType.THERAPY, new ims.framework.utils.ImagePath(103126, "Images/Admin/user_gray.png"), Color.Default);
}
