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

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

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

	public TumourStatus()
	{
		super();
	}
	public TumourStatus(int id)
	{
		super(id, "", true);
	}
	public TumourStatus(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public TumourStatus(int id, String text, boolean active, TumourStatus parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public TumourStatus(int id, String text, boolean active, TumourStatus parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public TumourStatus(int id, String text, boolean active, TumourStatus parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static TumourStatus buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new TumourStatus(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (TumourStatus)super.getParentInstance();
	}
	public TumourStatus getParent()
	{
		return (TumourStatus)super.getParentInstance();
	}
	public void setParent(TumourStatus parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		TumourStatus[] typedChildren = new TumourStatus[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (TumourStatus)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof TumourStatus)
		{
			super.addChild((TumourStatus)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof TumourStatus)
		{
			super.removeChild((TumourStatus)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		TumourStatusCollection result = new TumourStatusCollection();
		result.add(NEW);
		result.add(RECURRENCE);
		result.add(FOLLOW_UP);
		result.add(PROGRESSIVE);
		result.add(NOT_ASSESSED_FUP);
		result.add(NO_EVIDENCE_OF_REL_PROG);
		result.add(RECURRENCE_BIOCHEMICAL_CONFIRMED);
		result.add(RECURRENCE_CLINICALLY_CONFIRMED);
		result.add(RECURRENCE_RADIOLOGICALLY_CONFIRMED);
		result.add(RECURRENCE_OTHER_METHOD_CONFIRMED);
		result.add(NOT_ASSESSED);
		result.add(UNKNOWN);
		result.add(NO_EVIDENCE_PRIMARY_TUMOUR);
		result.add(RECURRENT_PRIMARY_TUMOUR);
		result.add(RESIDUAL_PRIMARY_TUMOUR);
		result.add(NO_EVIDENCE_OF_PRIMARY_TUMOUR);
		return result;
	}
	public static TumourStatus[] getNegativeInstances()
	{
		TumourStatus[] instances = new TumourStatus[16];
		instances[0] = NEW;
		instances[1] = RECURRENCE;
		instances[2] = FOLLOW_UP;
		instances[3] = PROGRESSIVE;
		instances[4] = NOT_ASSESSED_FUP;
		instances[5] = NO_EVIDENCE_OF_REL_PROG;
		instances[6] = RECURRENCE_BIOCHEMICAL_CONFIRMED;
		instances[7] = RECURRENCE_CLINICALLY_CONFIRMED;
		instances[8] = RECURRENCE_RADIOLOGICALLY_CONFIRMED;
		instances[9] = RECURRENCE_OTHER_METHOD_CONFIRMED;
		instances[10] = NOT_ASSESSED;
		instances[11] = UNKNOWN;
		instances[12] = NO_EVIDENCE_PRIMARY_TUMOUR;
		instances[13] = RECURRENT_PRIMARY_TUMOUR;
		instances[14] = RESIDUAL_PRIMARY_TUMOUR;
		instances[15] = NO_EVIDENCE_OF_PRIMARY_TUMOUR;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[16];
		negativeInstances[0] = "NEW";
		negativeInstances[1] = "RECURRENCE";
		negativeInstances[2] = "FOLLOW_UP";
		negativeInstances[3] = "PROGRESSIVE";
		negativeInstances[4] = "NOT_ASSESSED_FUP";
		negativeInstances[5] = "NO_EVIDENCE_OF_REL_PROG";
		negativeInstances[6] = "RECURRENCE_BIOCHEMICAL_CONFIRMED";
		negativeInstances[7] = "RECURRENCE_CLINICALLY_CONFIRMED";
		negativeInstances[8] = "RECURRENCE_RADIOLOGICALLY_CONFIRMED";
		negativeInstances[9] = "RECURRENCE_OTHER_METHOD_CONFIRMED";
		negativeInstances[10] = "NOT_ASSESSED";
		negativeInstances[11] = "UNKNOWN";
		negativeInstances[12] = "NO_EVIDENCE_PRIMARY_TUMOUR";
		negativeInstances[13] = "RECURRENT_PRIMARY_TUMOUR";
		negativeInstances[14] = "RESIDUAL_PRIMARY_TUMOUR";
		negativeInstances[15] = "NO_EVIDENCE_OF_PRIMARY_TUMOUR";
		return negativeInstances;
	}
	public static TumourStatus 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 TumourStatus getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		TumourStatus[] 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 = 1251085;
	public static final TumourStatus NEW = new TumourStatus(-1961, "New", true, null, null, Color.Default);
	public static final TumourStatus RECURRENCE = new TumourStatus(-1962, "Recurrence", true, null, null, Color.Default);
	public static final TumourStatus FOLLOW_UP = new TumourStatus(-1963, "Follow up", true, null, null, Color.Default);
	public static final TumourStatus PROGRESSIVE = new TumourStatus(-1964, "Progressive", true, null, null, Color.Default);
	public static final TumourStatus NOT_ASSESSED_FUP = new TumourStatus(-1965, "Not Assessed (Fup)", true, null, null, Color.Default);
	public static final TumourStatus NO_EVIDENCE_OF_REL_PROG = new TumourStatus(-1966, "No evidence of relapse/progression(Fup)", true, null, null, Color.Default);
	public static final TumourStatus RECURRENCE_BIOCHEMICAL_CONFIRMED = new TumourStatus(-1985, "Recurrence - Biochemical confirmed(Fup)", true, null, null, Color.Default);
	public static final TumourStatus RECURRENCE_CLINICALLY_CONFIRMED = new TumourStatus(-1986, "Recurrence - Clinically confirmed (Fup)", true, null, null, Color.Default);
	public static final TumourStatus RECURRENCE_RADIOLOGICALLY_CONFIRMED = new TumourStatus(-1987, "Recurrence - Radiologically confirmed (Fup)", true, null, null, Color.Default);
	public static final TumourStatus RECURRENCE_OTHER_METHOD_CONFIRMED = new TumourStatus(-1988, "Recurrence - Other method confirmed (Fup)", true, null, null, Color.Default);
	public static final TumourStatus NOT_ASSESSED = new TumourStatus(-1989, "Not Assessed", true, null, null, Color.Default);
	public static final TumourStatus UNKNOWN = new TumourStatus(-1990, "Unknown", true, null, null, Color.Default);
	public static final TumourStatus NO_EVIDENCE_PRIMARY_TUMOUR = new TumourStatus(-1991, "No evidence Primary Tumour", true, null, null, Color.Default);
	public static final TumourStatus RECURRENT_PRIMARY_TUMOUR = new TumourStatus(-1992, "Recurrent primary Tumour", true, null, null, Color.Default);
	public static final TumourStatus RESIDUAL_PRIMARY_TUMOUR = new TumourStatus(-1993, "Residual Primary Tumour", true, null, null, Color.Default);
	public static final TumourStatus NO_EVIDENCE_OF_PRIMARY_TUMOUR = new TumourStatus(-1994, "No evidence of primary tumour (Fup)", true, null, null, Color.Default);
}
