/FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/clinical/vo/lookups/SurgicalAuditOperationDetailStatus.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 SurgicalAuditOperationDetailStatus extends ims.vo.LookupInstVo implements TreeNode
{
	private static final long serialVersionUID = 1L;

	public SurgicalAuditOperationDetailStatus()
	{
		super();
	}
	public SurgicalAuditOperationDetailStatus(int id)
	{
		super(id, "", true);
	}
	public SurgicalAuditOperationDetailStatus(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public SurgicalAuditOperationDetailStatus(int id, String text, boolean active, SurgicalAuditOperationDetailStatus parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public SurgicalAuditOperationDetailStatus(int id, String text, boolean active, SurgicalAuditOperationDetailStatus parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public SurgicalAuditOperationDetailStatus(int id, String text, boolean active, SurgicalAuditOperationDetailStatus parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static SurgicalAuditOperationDetailStatus buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new SurgicalAuditOperationDetailStatus(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (SurgicalAuditOperationDetailStatus)super.getParentInstance();
	}
	public SurgicalAuditOperationDetailStatus getParent()
	{
		return (SurgicalAuditOperationDetailStatus)super.getParentInstance();
	}
	public void setParent(SurgicalAuditOperationDetailStatus parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		SurgicalAuditOperationDetailStatus[] typedChildren = new SurgicalAuditOperationDetailStatus[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (SurgicalAuditOperationDetailStatus)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof SurgicalAuditOperationDetailStatus)
		{
			super.addChild((SurgicalAuditOperationDetailStatus)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof SurgicalAuditOperationDetailStatus)
		{
			super.removeChild((SurgicalAuditOperationDetailStatus)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		SurgicalAuditOperationDetailStatusCollection result = new SurgicalAuditOperationDetailStatusCollection();
		result.add(IN_HOLDING_BAY);
		result.add(LEFT_HOLDING_BAY);
		result.add(ENTERED_OPERATING_THEATRE);
		result.add(ANAESTHETIC_STARTED);
		result.add(SURGERY_STARTED);
		result.add(SURGERY_FINISHED);
		result.add(ANAESTHETIC_FINISHED);
		result.add(LEFT_OPERATING_THEATRE);
		result.add(PATIENT_ARRIVED_IN_RECOVERY);
		result.add(TIME_WARD_OR_UNIT_NOTIFIED);
		result.add(PATIENT_LEFT_RECOVERY);
		result.add(HAND_OVER_FROM_RECOVERY_NURSE);
		result.add(CANCELLED_OPERATIONS);
		return result;
	}
	public static SurgicalAuditOperationDetailStatus[] getNegativeInstances()
	{
		SurgicalAuditOperationDetailStatus[] instances = new SurgicalAuditOperationDetailStatus[13];
		instances[0] = IN_HOLDING_BAY;
		instances[1] = LEFT_HOLDING_BAY;
		instances[2] = ENTERED_OPERATING_THEATRE;
		instances[3] = ANAESTHETIC_STARTED;
		instances[4] = SURGERY_STARTED;
		instances[5] = SURGERY_FINISHED;
		instances[6] = ANAESTHETIC_FINISHED;
		instances[7] = LEFT_OPERATING_THEATRE;
		instances[8] = PATIENT_ARRIVED_IN_RECOVERY;
		instances[9] = TIME_WARD_OR_UNIT_NOTIFIED;
		instances[10] = PATIENT_LEFT_RECOVERY;
		instances[11] = HAND_OVER_FROM_RECOVERY_NURSE;
		instances[12] = CANCELLED_OPERATIONS;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[13];
		negativeInstances[0] = "IN_HOLDING_BAY";
		negativeInstances[1] = "LEFT_HOLDING_BAY";
		negativeInstances[2] = "ENTERED_OPERATING_THEATRE";
		negativeInstances[3] = "ANAESTHETIC_STARTED";
		negativeInstances[4] = "SURGERY_STARTED";
		negativeInstances[5] = "SURGERY_FINISHED";
		negativeInstances[6] = "ANAESTHETIC_FINISHED";
		negativeInstances[7] = "LEFT_OPERATING_THEATRE";
		negativeInstances[8] = "PATIENT_ARRIVED_IN_RECOVERY";
		negativeInstances[9] = "TIME_WARD_OR_UNIT_NOTIFIED";
		negativeInstances[10] = "PATIENT_LEFT_RECOVERY";
		negativeInstances[11] = "HAND_OVER_FROM_RECOVERY_NURSE";
		negativeInstances[12] = "CANCELLED_OPERATIONS";
		return negativeInstances;
	}
	public static SurgicalAuditOperationDetailStatus 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 SurgicalAuditOperationDetailStatus getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		SurgicalAuditOperationDetailStatus[] 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 = 1231131;
	public static final SurgicalAuditOperationDetailStatus IN_HOLDING_BAY = new SurgicalAuditOperationDetailStatus(-2382, "In Holding Bay", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus LEFT_HOLDING_BAY = new SurgicalAuditOperationDetailStatus(-2383, "Left Holding Bay", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus ENTERED_OPERATING_THEATRE = new SurgicalAuditOperationDetailStatus(-2384, "Entered Operating Theatre ", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus ANAESTHETIC_STARTED = new SurgicalAuditOperationDetailStatus(-2385, "Anaesthetic Started", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus SURGERY_STARTED = new SurgicalAuditOperationDetailStatus(-2386, "Surgery Started", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus SURGERY_FINISHED = new SurgicalAuditOperationDetailStatus(-2387, "Surgery Finished", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus ANAESTHETIC_FINISHED = new SurgicalAuditOperationDetailStatus(-2388, "Anaesthetic Finished", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus LEFT_OPERATING_THEATRE = new SurgicalAuditOperationDetailStatus(-2389, "Left Operating Theatre", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus PATIENT_ARRIVED_IN_RECOVERY = new SurgicalAuditOperationDetailStatus(-2390, "Patient Arrived in Recovery", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus TIME_WARD_OR_UNIT_NOTIFIED = new SurgicalAuditOperationDetailStatus(-2391, "Time Ward or Unit Notified", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus PATIENT_LEFT_RECOVERY = new SurgicalAuditOperationDetailStatus(-2392, "Patient Left Recovery", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus HAND_OVER_FROM_RECOVERY_NURSE = new SurgicalAuditOperationDetailStatus(-2393, "Hand Over from Recovery Nurse", true, null, null, Color.Default);
	public static final SurgicalAuditOperationDetailStatus CANCELLED_OPERATIONS = new SurgicalAuditOperationDetailStatus(-2394, "Cancelled Operations", true, null, null, Color.Default);
}
