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

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

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

	public OrderInvStatus()
	{
		super();
	}
	public OrderInvStatus(int id)
	{
		super(id, "", true);
	}
	public OrderInvStatus(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public OrderInvStatus(int id, String text, boolean active, OrderInvStatus parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public OrderInvStatus(int id, String text, boolean active, OrderInvStatus parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public OrderInvStatus(int id, String text, boolean active, OrderInvStatus parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static OrderInvStatus buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new OrderInvStatus(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (OrderInvStatus)super.getParentInstance();
	}
	public OrderInvStatus getParent()
	{
		return (OrderInvStatus)super.getParentInstance();
	}
	public void setParent(OrderInvStatus parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		OrderInvStatus[] typedChildren = new OrderInvStatus[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (OrderInvStatus)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof OrderInvStatus)
		{
			super.addChild((OrderInvStatus)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof OrderInvStatus)
		{
			super.removeChild((OrderInvStatus)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		OrderInvStatusCollection result = new OrderInvStatusCollection();
		result.add(AWAITING_AUTHORISATION);
		result.add(ORDERED);
		result.add(SENT);
		result.add(RECEIVED);
		result.add(REJECTED);
		result.add(ACCEPTED);
		result.add(CANCEL_REQUEST);
		result.add(CANCELLED);
		result.add(NEW_RESULT);
		result.add(UPDATED_RESULT);
		result.add(REVIEW);
		result.add(UNSEEN);
		result.add(CHECKED);
		result.add(SEEN);
		result.add(COMPLETE);
		result.add(INPROGRESS);
		result.add(INPROGRESS_SCH);
		result.add(ORDERED_AWAITING_APPT);
		result.add(HELD);
		result.add(CHANGE_REQUESTED);
		result.add(CHANGED);
		result.add(HOLD_REQUESTED);
		result.add(RESULTED);
		result.add(AUTOREPORT);
		result.add(VIEWED);
		result.add(PROVIDER_CHANGE_REJECTED);
		result.add(AMENDED);
		return result;
	}
	public static OrderInvStatus[] getNegativeInstances()
	{
		OrderInvStatus[] instances = new OrderInvStatus[27];
		instances[0] = AWAITING_AUTHORISATION;
		instances[1] = ORDERED;
		instances[2] = SENT;
		instances[3] = RECEIVED;
		instances[4] = REJECTED;
		instances[5] = ACCEPTED;
		instances[6] = CANCEL_REQUEST;
		instances[7] = CANCELLED;
		instances[8] = NEW_RESULT;
		instances[9] = UPDATED_RESULT;
		instances[10] = REVIEW;
		instances[11] = UNSEEN;
		instances[12] = CHECKED;
		instances[13] = SEEN;
		instances[14] = COMPLETE;
		instances[15] = INPROGRESS;
		instances[16] = INPROGRESS_SCH;
		instances[17] = ORDERED_AWAITING_APPT;
		instances[18] = HELD;
		instances[19] = CHANGE_REQUESTED;
		instances[20] = CHANGED;
		instances[21] = HOLD_REQUESTED;
		instances[22] = RESULTED;
		instances[23] = AUTOREPORT;
		instances[24] = VIEWED;
		instances[25] = PROVIDER_CHANGE_REJECTED;
		instances[26] = AMENDED;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[27];
		negativeInstances[0] = "AWAITING_AUTHORISATION";
		negativeInstances[1] = "ORDERED";
		negativeInstances[2] = "SENT";
		negativeInstances[3] = "RECEIVED";
		negativeInstances[4] = "REJECTED";
		negativeInstances[5] = "ACCEPTED";
		negativeInstances[6] = "CANCEL_REQUEST";
		negativeInstances[7] = "CANCELLED";
		negativeInstances[8] = "NEW_RESULT";
		negativeInstances[9] = "UPDATED_RESULT";
		negativeInstances[10] = "REVIEW";
		negativeInstances[11] = "UNSEEN";
		negativeInstances[12] = "CHECKED";
		negativeInstances[13] = "SEEN";
		negativeInstances[14] = "COMPLETE";
		negativeInstances[15] = "INPROGRESS";
		negativeInstances[16] = "INPROGRESS_SCH";
		negativeInstances[17] = "ORDERED_AWAITING_APPT";
		negativeInstances[18] = "HELD";
		negativeInstances[19] = "CHANGE_REQUESTED";
		negativeInstances[20] = "CHANGED";
		negativeInstances[21] = "HOLD_REQUESTED";
		negativeInstances[22] = "RESULTED";
		negativeInstances[23] = "AUTOREPORT";
		negativeInstances[24] = "VIEWED";
		negativeInstances[25] = "PROVIDER_CHANGE_REJECTED";
		negativeInstances[26] = "AMENDED";
		return negativeInstances;
	}
	public static OrderInvStatus 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 OrderInvStatus getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		OrderInvStatus[] 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 = 1161027;
	public static final OrderInvStatus AWAITING_AUTHORISATION = new OrderInvStatus(-1103, "Awaiting Authorisation", true, null, new ims.framework.utils.ImagePath(116145, "Images/OCRR/Pencil.gif"), Color.Default);
	public static final OrderInvStatus ORDERED = new OrderInvStatus(-792, "Ordered", true, null, new ims.framework.utils.ImagePath(116131, "Images/OCRR/Ordered.gif"), Color.Default);
	public static final OrderInvStatus SENT = new OrderInvStatus(-832, "Sent", true, null, new ims.framework.utils.ImagePath(116136, "Images/OCRR/Sent.gif"), Color.Default);
	public static final OrderInvStatus RECEIVED = new OrderInvStatus(-793, "Received", true, null, new ims.framework.utils.ImagePath(116133, "Images/OCRR/Received.gif"), Color.Default);
	public static final OrderInvStatus REJECTED = new OrderInvStatus(-801, "Rejected", true, null, new ims.framework.utils.ImagePath(116134, "Images/OCRR/Rejected.gif"), Color.Default);
	public static final OrderInvStatus ACCEPTED = new OrderInvStatus(-802, "Accepted", true, null, new ims.framework.utils.ImagePath(116139, "Images/OCRR/Accepted.gif"), Color.Default);
	public static final OrderInvStatus CANCEL_REQUEST = new OrderInvStatus(-808, "Cancel Request", true, null, new ims.framework.utils.ImagePath(116125, "Images/OCRR/Cancel - Request.gif"), Color.Default);
	public static final OrderInvStatus CANCELLED = new OrderInvStatus(-794, "Cancelled", true, null, new ims.framework.utils.ImagePath(116126, "Images/OCRR/Cancelled.gif"), Color.Default);
	public static final OrderInvStatus NEW_RESULT = new OrderInvStatus(-795, "New Result", true, null, new ims.framework.utils.ImagePath(116130, "Images/OCRR/NewResult.gif"), Color.Default);
	public static final OrderInvStatus UPDATED_RESULT = new OrderInvStatus(-796, "Updated Result", true, null, new ims.framework.utils.ImagePath(116138, "Images/OCRR/UpdatedResult.gif"), Color.Default);
	public static final OrderInvStatus REVIEW = new OrderInvStatus(-799, "For Review", true, null, new ims.framework.utils.ImagePath(116132, "Images/OCRR/Query.gif"), Color.Default);
	public static final OrderInvStatus UNSEEN = new OrderInvStatus(-797, "Unseen", true, null, new ims.framework.utils.ImagePath(116137, "Images/OCRR/Unseen.gif"), Color.Default);
	public static final OrderInvStatus CHECKED = new OrderInvStatus(-798, "Checked", true, null, new ims.framework.utils.ImagePath(116127, "Images/OCRR/checked.gif"), Color.Default);
	public static final OrderInvStatus SEEN = new OrderInvStatus(-800, "Seen", true, null, new ims.framework.utils.ImagePath(116119, "Images/OCRR/Red Eye.gif"), Color.Default);
	public static final OrderInvStatus COMPLETE = new OrderInvStatus(-917, "Complete", true, null, new ims.framework.utils.ImagePath(116128, "Images/OCRR/Complete.gif"), Color.Default);
	public static final OrderInvStatus INPROGRESS = new OrderInvStatus(-918, "InProgress", true, null, new ims.framework.utils.ImagePath(103111, "Images/Admin/VSObject_Structure.gif"), Color.Default);
	public static final OrderInvStatus INPROGRESS_SCH = new OrderInvStatus(-919, "Inprogress Scheduled", true, null, new ims.framework.utils.ImagePath(114103, "Images/Scheduling/mm-Play-2.gif"), Color.Default);
	public static final OrderInvStatus ORDERED_AWAITING_APPT = new OrderInvStatus(-1546, "Ordered Awaiting Appointment", true, null, new ims.framework.utils.ImagePath(102236, "Images/Core/Control_MonthCalendar.gif"), Color.Default);
	public static final OrderInvStatus HELD = new OrderInvStatus(-1547, "Held", true, null, new ims.framework.utils.ImagePath(103158, "Images/Admin/Complication.gif"), Color.Default);
	public static final OrderInvStatus CHANGE_REQUESTED = new OrderInvStatus(-1551, "Change Requested", true, null, null, Color.Default);
	public static final OrderInvStatus CHANGED = new OrderInvStatus(-1552, "Changed as Requested", true, null, null, Color.Default);
	public static final OrderInvStatus HOLD_REQUESTED = new OrderInvStatus(-1553, "Hold Requested", true, null, null, Color.Default);
	public static final OrderInvStatus RESULTED = new OrderInvStatus(-1574, "Manually Resulted", true, null, new ims.framework.utils.ImagePath(103157, "Images/Admin/Audit.gif"), Color.Default);
	public static final OrderInvStatus AUTOREPORT = new OrderInvStatus(-1869, "Auto Reported", true, null, null, Color.Default);
	public static final OrderInvStatus VIEWED = new OrderInvStatus(-2063, "Viewed", true, null, null, Color.Default);
	public static final OrderInvStatus PROVIDER_CHANGE_REJECTED = new OrderInvStatus(-2140, "Provider Change Rejected", true, null, null, Color.Default);
	public static final OrderInvStatus AMENDED = new OrderInvStatus(-2243, "Amended", true, null, null, Color.Default);
}
