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

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

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

	public TrackingStatus()
	{
		super();
	}
	public TrackingStatus(int id)
	{
		super(id, "", true);
	}
	public TrackingStatus(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public TrackingStatus(int id, String text, boolean active, TrackingStatus parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public TrackingStatus(int id, String text, boolean active, TrackingStatus parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public TrackingStatus(int id, String text, boolean active, TrackingStatus parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static TrackingStatus buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new TrackingStatus(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (TrackingStatus)super.getParentInstance();
	}
	public TrackingStatus getParent()
	{
		return (TrackingStatus)super.getParentInstance();
	}
	public void setParent(TrackingStatus parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		TrackingStatus[] typedChildren = new TrackingStatus[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (TrackingStatus)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof TrackingStatus)
		{
			super.addChild((TrackingStatus)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof TrackingStatus)
		{
			super.removeChild((TrackingStatus)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		TrackingStatusCollection result = new TrackingStatusCollection();
		result.add(WAITING_TO_BE_TRIAGED);
		result.add(SKIPPED_TRIAGE);
		result.add(WAITING_TO_BE_SEEN_BY_A_MEDIC);
		result.add(BEING_ATTENDED_TO);
		result.add(REFERRED_TO_OTHER_SPECIALITY);
		result.add(SENT_TO_XRAY);
		result.add(LODGED);
		result.add(WAITING_RESULTS_PATHOLOGY);
		result.add(WAITING_RESULTS_CLINICAL_IMAGING);
		result.add(WAITING_FOR_TREATMENT);
		result.add(DECISION_TO_ADMIT);
		result.add(TRANSFERRED);
		result.add(DISCHARGED);
		result.add(TO_BE_DISCHARGED);
		result.add(DECISION_TO_TRANSFER);
		return result;
	}
	public static TrackingStatus[] getNegativeInstances()
	{
		TrackingStatus[] instances = new TrackingStatus[15];
		instances[0] = WAITING_TO_BE_TRIAGED;
		instances[1] = SKIPPED_TRIAGE;
		instances[2] = WAITING_TO_BE_SEEN_BY_A_MEDIC;
		instances[3] = BEING_ATTENDED_TO;
		instances[4] = REFERRED_TO_OTHER_SPECIALITY;
		instances[5] = SENT_TO_XRAY;
		instances[6] = LODGED;
		instances[7] = WAITING_RESULTS_PATHOLOGY;
		instances[8] = WAITING_RESULTS_CLINICAL_IMAGING;
		instances[9] = WAITING_FOR_TREATMENT;
		instances[10] = DECISION_TO_ADMIT;
		instances[11] = TRANSFERRED;
		instances[12] = DISCHARGED;
		instances[13] = TO_BE_DISCHARGED;
		instances[14] = DECISION_TO_TRANSFER;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[15];
		negativeInstances[0] = "WAITING_TO_BE_TRIAGED";
		negativeInstances[1] = "SKIPPED_TRIAGE";
		negativeInstances[2] = "WAITING_TO_BE_SEEN_BY_A_MEDIC";
		negativeInstances[3] = "BEING_ATTENDED_TO";
		negativeInstances[4] = "REFERRED_TO_OTHER_SPECIALITY";
		negativeInstances[5] = "SENT_TO_XRAY";
		negativeInstances[6] = "LODGED";
		negativeInstances[7] = "WAITING_RESULTS_PATHOLOGY";
		negativeInstances[8] = "WAITING_RESULTS_CLINICAL_IMAGING";
		negativeInstances[9] = "WAITING_FOR_TREATMENT";
		negativeInstances[10] = "DECISION_TO_ADMIT";
		negativeInstances[11] = "TRANSFERRED";
		negativeInstances[12] = "DISCHARGED";
		negativeInstances[13] = "TO_BE_DISCHARGED";
		negativeInstances[14] = "DECISION_TO_TRANSFER";
		return negativeInstances;
	}
	public static TrackingStatus 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 TrackingStatus getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		TrackingStatus[] 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 = 1291019;
	public static final TrackingStatus WAITING_TO_BE_TRIAGED = new TrackingStatus(-2320, "Waiting to be Triaged", true, null, null, Color.Default);
	public static final TrackingStatus SKIPPED_TRIAGE = new TrackingStatus(-2321, "Skipped Triage", true, null, null, Color.Default);
	public static final TrackingStatus WAITING_TO_BE_SEEN_BY_A_MEDIC = new TrackingStatus(-2322, "Waiting To be Seen", true, null, null, Color.Default);
	public static final TrackingStatus BEING_ATTENDED_TO = new TrackingStatus(-2323, "Being Attended to", true, null, null, Color.Default);
	public static final TrackingStatus REFERRED_TO_OTHER_SPECIALITY = new TrackingStatus(-2324, "Referred to other Specialty", true, null, null, Color.Default);
	public static final TrackingStatus SENT_TO_XRAY = new TrackingStatus(-2325, "Sent to Xray", true, null, null, Color.Default);
	public static final TrackingStatus LODGED = new TrackingStatus(-2326, "Lodged", true, null, null, Color.Default);
	public static final TrackingStatus WAITING_RESULTS_PATHOLOGY = new TrackingStatus(-2327, "Waiting Results - Pathology", true, null, null, Color.Default);
	public static final TrackingStatus WAITING_RESULTS_CLINICAL_IMAGING = new TrackingStatus(-2328, "Waiting Results - Clinical Imaging", true, null, null, Color.Default);
	public static final TrackingStatus WAITING_FOR_TREATMENT = new TrackingStatus(-2329, "Waiting for Treatment", true, null, null, Color.Default);
	public static final TrackingStatus DECISION_TO_ADMIT = new TrackingStatus(-2330, "Decision to Admit", true, null, null, Color.Default);
	public static final TrackingStatus TRANSFERRED = new TrackingStatus(-2332, "Transferred", true, null, null, Color.Default);
	public static final TrackingStatus DISCHARGED = new TrackingStatus(-2347, "Departed", true, null, null, Color.Default);
	public static final TrackingStatus TO_BE_DISCHARGED = new TrackingStatus(-2523, "Ready for departure", true, null, null, Color.Default);
	public static final TrackingStatus DECISION_TO_TRANSFER = new TrackingStatus(-2786, "Decision to Transfer", true, null, null, Color.Default);
}
