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

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

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

	public RTTClockImpactSource()
	{
		super();
	}
	public RTTClockImpactSource(int id)
	{
		super(id, "", true);
	}
	public RTTClockImpactSource(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public RTTClockImpactSource(int id, String text, boolean active, RTTClockImpactSource parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public RTTClockImpactSource(int id, String text, boolean active, RTTClockImpactSource parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public RTTClockImpactSource(int id, String text, boolean active, RTTClockImpactSource parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static RTTClockImpactSource buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new RTTClockImpactSource(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (RTTClockImpactSource)super.getParentInstance();
	}
	public RTTClockImpactSource getParent()
	{
		return (RTTClockImpactSource)super.getParentInstance();
	}
	public void setParent(RTTClockImpactSource parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		RTTClockImpactSource[] typedChildren = new RTTClockImpactSource[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (RTTClockImpactSource)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof RTTClockImpactSource)
		{
			super.addChild((RTTClockImpactSource)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof RTTClockImpactSource)
		{
			super.removeChild((RTTClockImpactSource)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		RTTClockImpactSourceCollection result = new RTTClockImpactSourceCollection();
		result.add(APPOINTMENT_BOOKED);
		result.add(ADMIN_EVENT);
		result.add(APPOINTMENT_OUTCOME);
		result.add(REFERRAL_OUTCOME);
		result.add(REFERRAL_PROVIDER_CANCELLATION);
		result.add(ADMISSION);
		result.add(DIAGNOSTIC_DISCHARGE);
		result.add(ADD_WAITING_LIST_TREATMENT);
		result.add(ADD_WAITING_LIST_DIAGNOSTIC);
		result.add(ADD_PLANNED_SURVEILLANCE_LIST_TREATMENT);
		result.add(ADD_PLANNED_SURVEILLANCE_LIST_DIAGNOSTIC);
		result.add(REFERRAL_CREATED);
		result.add(PATIENT_TREATED_AS_EMERGENCY);
		result.add(REFERRAL_TRANSFER_OF_CARE);
		return result;
	}
	public static RTTClockImpactSource[] getNegativeInstances()
	{
		RTTClockImpactSource[] instances = new RTTClockImpactSource[14];
		instances[0] = APPOINTMENT_BOOKED;
		instances[1] = ADMIN_EVENT;
		instances[2] = APPOINTMENT_OUTCOME;
		instances[3] = REFERRAL_OUTCOME;
		instances[4] = REFERRAL_PROVIDER_CANCELLATION;
		instances[5] = ADMISSION;
		instances[6] = DIAGNOSTIC_DISCHARGE;
		instances[7] = ADD_WAITING_LIST_TREATMENT;
		instances[8] = ADD_WAITING_LIST_DIAGNOSTIC;
		instances[9] = ADD_PLANNED_SURVEILLANCE_LIST_TREATMENT;
		instances[10] = ADD_PLANNED_SURVEILLANCE_LIST_DIAGNOSTIC;
		instances[11] = REFERRAL_CREATED;
		instances[12] = PATIENT_TREATED_AS_EMERGENCY;
		instances[13] = REFERRAL_TRANSFER_OF_CARE;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[14];
		negativeInstances[0] = "APPOINTMENT_BOOKED";
		negativeInstances[1] = "ADMIN_EVENT";
		negativeInstances[2] = "APPOINTMENT_OUTCOME";
		negativeInstances[3] = "REFERRAL_OUTCOME";
		negativeInstances[4] = "REFERRAL_PROVIDER_CANCELLATION";
		negativeInstances[5] = "ADMISSION";
		negativeInstances[6] = "DIAGNOSTIC_DISCHARGE";
		negativeInstances[7] = "ADD_WAITING_LIST_TREATMENT";
		negativeInstances[8] = "ADD_WAITING_LIST_DIAGNOSTIC";
		negativeInstances[9] = "ADD_PLANNED_SURVEILLANCE_LIST_TREATMENT";
		negativeInstances[10] = "ADD_PLANNED_SURVEILLANCE_LIST_DIAGNOSTIC";
		negativeInstances[11] = "REFERRAL_CREATED";
		negativeInstances[12] = "PATIENT_TREATED_AS_EMERGENCY";
		negativeInstances[13] = "REFERRAL_TRANSFER_OF_CARE";
		return negativeInstances;
	}
	public static RTTClockImpactSource 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 RTTClockImpactSource getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		RTTClockImpactSource[] 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 = 1321017;
	public static final RTTClockImpactSource APPOINTMENT_BOOKED = new RTTClockImpactSource(-3024, "Appointment Booked", true, null, null, Color.Default);
	public static final RTTClockImpactSource ADMIN_EVENT = new RTTClockImpactSource(-2998, "Admin Event", true, null, null, Color.Default);
	public static final RTTClockImpactSource APPOINTMENT_OUTCOME = new RTTClockImpactSource(-2997, "Appointment Outcome", true, null, null, Color.Default);
	public static final RTTClockImpactSource REFERRAL_OUTCOME = new RTTClockImpactSource(-2999, "Referral Outcome", true, null, null, Color.Default);
	public static final RTTClockImpactSource REFERRAL_PROVIDER_CANCELLATION = new RTTClockImpactSource(-3020, "Provider Cancellation", true, null, null, Color.Default);
	public static final RTTClockImpactSource ADMISSION = new RTTClockImpactSource(-3021, "Admission", true, null, null, Color.Default);
	public static final RTTClockImpactSource DIAGNOSTIC_DISCHARGE = new RTTClockImpactSource(-3022, "Diagnostic Discharge - Treated during diagnostic admission", true, null, null, Color.Default);
	public static final RTTClockImpactSource ADD_WAITING_LIST_TREATMENT = new RTTClockImpactSource(-3432, "Add to Waiting List - Treatment", true, null, null, Color.Default);
	public static final RTTClockImpactSource ADD_WAITING_LIST_DIAGNOSTIC = new RTTClockImpactSource(-3433, "Add to Waiting List - Diagnostic", true, null, null, Color.Default);
	public static final RTTClockImpactSource ADD_PLANNED_SURVEILLANCE_LIST_TREATMENT = new RTTClockImpactSource(-3434, "Add to Planned Surveillance List - Treatment", true, null, null, Color.Default);
	public static final RTTClockImpactSource ADD_PLANNED_SURVEILLANCE_LIST_DIAGNOSTIC = new RTTClockImpactSource(-3435, "Add Planned Surveillance List - Diagnostic", true, null, null, Color.Default);
	public static final RTTClockImpactSource REFERRAL_CREATED = new RTTClockImpactSource(-3439, "Referral Created", true, null, null, Color.Default);
	public static final RTTClockImpactSource PATIENT_TREATED_AS_EMERGENCY = new RTTClockImpactSource(-3440, "Patient was Treated as an Emergency", true, null, null, Color.Default);
	public static final RTTClockImpactSource REFERRAL_TRANSFER_OF_CARE = new RTTClockImpactSource(-3457, "Referral Transfer of Care", true, null, null, Color.Black);
}
