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

	public PathwaysDetail()
	{
		super();
	}
	public PathwaysDetail(int id)
	{
		super(id, "", true);
	}
	public PathwaysDetail(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public PathwaysDetail(int id, String text, boolean active, PathwaysDetail parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public PathwaysDetail(int id, String text, boolean active, PathwaysDetail parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public PathwaysDetail(int id, String text, boolean active, PathwaysDetail parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static PathwaysDetail buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new PathwaysDetail(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (PathwaysDetail)super.getParentInstance();
	}
	public PathwaysDetail getParent()
	{
		return (PathwaysDetail)super.getParentInstance();
	}
	public void setParent(PathwaysDetail parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		PathwaysDetail[] typedChildren = new PathwaysDetail[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (PathwaysDetail)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof PathwaysDetail)
		{
			super.addChild((PathwaysDetail)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof PathwaysDetail)
		{
			super.removeChild((PathwaysDetail)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		PathwaysDetailCollection result = new PathwaysDetailCollection();
		result.add(AD);
		result.add(DD);
		result.add(AM);
		result.add(MG);
		result.add(OWN);
		result.add(DAN);
		result.add(DHN);
		result.add(HCN);
		result.add(HDN);
		result.add(IAN);
		result.add(LCN);
		result.add(LHN);
		result.add(NHN);
		result.add(NSN);
		result.add(PCN);
		result.add(PDN);
		result.add(PRN);
		result.add(RAN);
		result.add(WL);
		result.add(RM);
		result.add(SU);
		result.add(UN);
		result.add(TC);
		result.add(TR);
		result.add(DS);
		result.add(ST);
		result.add(EN);
		result.add(US);
		result.add(OWF);
		result.add(ADN);
		result.add(ADF);
		result.add(DAF);
		result.add(DDN);
		result.add(DDF);
		result.add(DHF);
		result.add(HCF);
		result.add(HDF);
		result.add(IAF);
		result.add(LCF);
		result.add(LHF);
		result.add(NHF);
		result.add(NSF);
		result.add(PCF);
		result.add(PDF);
		result.add(PRF);
		result.add(RAF);
		result.add(WLN);
		result.add(WLF);
		result.add(ND);
		result.add(DE);
		result.add(DP);
		result.add(SP);
		result.add(UD);
		result.add(WHN);
		result.add(WHF);
		result.add(ATN);
		result.add(ATF);
		result.add(CHN);
		result.add(CHF);
		result.add(HRN);
		result.add(HRF);
		result.add(WTN);
		result.add(WTF);
		result.add(APN);
		result.add(APF);
		result.add(UR);
		result.add(CS);
		result.add(RS);
		result.add(RU);
		result.add(UU);
		result.add(CO);
		result.add(RDA);
		return result;
	}
	public static PathwaysDetail[] getNegativeInstances()
	{
		PathwaysDetail[] instances = new PathwaysDetail[72];
		instances[0] = AD;
		instances[1] = DD;
		instances[2] = AM;
		instances[3] = MG;
		instances[4] = OWN;
		instances[5] = DAN;
		instances[6] = DHN;
		instances[7] = HCN;
		instances[8] = HDN;
		instances[9] = IAN;
		instances[10] = LCN;
		instances[11] = LHN;
		instances[12] = NHN;
		instances[13] = NSN;
		instances[14] = PCN;
		instances[15] = PDN;
		instances[16] = PRN;
		instances[17] = RAN;
		instances[18] = WL;
		instances[19] = RM;
		instances[20] = SU;
		instances[21] = UN;
		instances[22] = TC;
		instances[23] = TR;
		instances[24] = DS;
		instances[25] = ST;
		instances[26] = EN;
		instances[27] = US;
		instances[28] = OWF;
		instances[29] = ADN;
		instances[30] = ADF;
		instances[31] = DAF;
		instances[32] = DDN;
		instances[33] = DDF;
		instances[34] = DHF;
		instances[35] = HCF;
		instances[36] = HDF;
		instances[37] = IAF;
		instances[38] = LCF;
		instances[39] = LHF;
		instances[40] = NHF;
		instances[41] = NSF;
		instances[42] = PCF;
		instances[43] = PDF;
		instances[44] = PRF;
		instances[45] = RAF;
		instances[46] = WLN;
		instances[47] = WLF;
		instances[48] = ND;
		instances[49] = DE;
		instances[50] = DP;
		instances[51] = SP;
		instances[52] = UD;
		instances[53] = WHN;
		instances[54] = WHF;
		instances[55] = ATN;
		instances[56] = ATF;
		instances[57] = CHN;
		instances[58] = CHF;
		instances[59] = HRN;
		instances[60] = HRF;
		instances[61] = WTN;
		instances[62] = WTF;
		instances[63] = APN;
		instances[64] = APF;
		instances[65] = UR;
		instances[66] = CS;
		instances[67] = RS;
		instances[68] = RU;
		instances[69] = UU;
		instances[70] = CO;
		instances[71] = RDA;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[72];
		negativeInstances[0] = "AD";
		negativeInstances[1] = "DD";
		negativeInstances[2] = "AM";
		negativeInstances[3] = "MG";
		negativeInstances[4] = "OWN";
		negativeInstances[5] = "DAN";
		negativeInstances[6] = "DHN";
		negativeInstances[7] = "HCN";
		negativeInstances[8] = "HDN";
		negativeInstances[9] = "IAN";
		negativeInstances[10] = "LCN";
		negativeInstances[11] = "LHN";
		negativeInstances[12] = "NHN";
		negativeInstances[13] = "NSN";
		negativeInstances[14] = "PCN";
		negativeInstances[15] = "PDN";
		negativeInstances[16] = "PRN";
		negativeInstances[17] = "RAN";
		negativeInstances[18] = "WL";
		negativeInstances[19] = "RM";
		negativeInstances[20] = "SU";
		negativeInstances[21] = "UN";
		negativeInstances[22] = "TC";
		negativeInstances[23] = "TR";
		negativeInstances[24] = "DS";
		negativeInstances[25] = "ST";
		negativeInstances[26] = "EN";
		negativeInstances[27] = "US";
		negativeInstances[28] = "OWF";
		negativeInstances[29] = "ADN";
		negativeInstances[30] = "ADF";
		negativeInstances[31] = "DAF";
		negativeInstances[32] = "DDN";
		negativeInstances[33] = "DDF";
		negativeInstances[34] = "DHF";
		negativeInstances[35] = "HCF";
		negativeInstances[36] = "HDF";
		negativeInstances[37] = "IAF";
		negativeInstances[38] = "LCF";
		negativeInstances[39] = "LHF";
		negativeInstances[40] = "NHF";
		negativeInstances[41] = "NSF";
		negativeInstances[42] = "PCF";
		negativeInstances[43] = "PDF";
		negativeInstances[44] = "PRF";
		negativeInstances[45] = "RAF";
		negativeInstances[46] = "WLN";
		negativeInstances[47] = "WLF";
		negativeInstances[48] = "ND";
		negativeInstances[49] = "DE";
		negativeInstances[50] = "DP";
		negativeInstances[51] = "SP";
		negativeInstances[52] = "UD";
		negativeInstances[53] = "WHN";
		negativeInstances[54] = "WHF";
		negativeInstances[55] = "ATN";
		negativeInstances[56] = "ATF";
		negativeInstances[57] = "CHN";
		negativeInstances[58] = "CHF";
		negativeInstances[59] = "HRN";
		negativeInstances[60] = "HRF";
		negativeInstances[61] = "WTN";
		negativeInstances[62] = "WTF";
		negativeInstances[63] = "APN";
		negativeInstances[64] = "APF";
		negativeInstances[65] = "UR";
		negativeInstances[66] = "CS";
		negativeInstances[67] = "RS";
		negativeInstances[68] = "RU";
		negativeInstances[69] = "UU";
		negativeInstances[70] = "CO";
		negativeInstances[71] = "RDA";
		return negativeInstances;
	}
	public static PathwaysDetail 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 PathwaysDetail getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		PathwaysDetail[] 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 = 1321001;
	public static final PathwaysDetail AD = new PathwaysDetail(-1270, "Add Details", true, null, null, Color.Default);
	public static final PathwaysDetail DD = new PathwaysDetail(-1271, "Date of Death", true, null, null, Color.Default);
	public static final PathwaysDetail AM = new PathwaysDetail(-1276, "Amend Details", true, null, null, Color.Default);
	public static final PathwaysDetail MG = new PathwaysDetail(-1277, "Merge Patient", true, null, null, Color.Default);
	public static final PathwaysDetail OWN = new PathwaysDetail(-1278, "Outpatient Waiting List First", true, null, null, Color.Default);
	public static final PathwaysDetail DAN = new PathwaysDetail(-1279, "Did Not Attend First", true, null, null, Color.Default);
	public static final PathwaysDetail DHN = new PathwaysDetail(-1280, "Discharge from Hold First", true, null, null, Color.Default);
	public static final PathwaysDetail HCN = new PathwaysDetail(-1281, "Hospital Cancel First", true, null, null, Color.Default);
	public static final PathwaysDetail HDN = new PathwaysDetail(-1282, "Patient on Hold First", true, null, null, Color.Default);
	public static final PathwaysDetail IAN = new PathwaysDetail(-1283, "Immediate Admission First", true, null, null, Color.Default);
	public static final PathwaysDetail LCN = new PathwaysDetail(-1284, "Left Clinic First", true, null, null, Color.Default);
	public static final PathwaysDetail LHN = new PathwaysDetail(-1285, "Left Hospital First", true, null, null, Color.Default);
	public static final PathwaysDetail NHN = new PathwaysDetail(-1286, "Not seen place on hold first", true, null, null, Color.Default);
	public static final PathwaysDetail NSN = new PathwaysDetail(-1287, "Not Seen First", true, null, null, Color.Default);
	public static final PathwaysDetail PCN = new PathwaysDetail(-1288, "Patient Cancel First", true, null, null, Color.Default);
	public static final PathwaysDetail PDN = new PathwaysDetail(-1289, "Patient Discharged First", true, null, null, Color.Default);
	public static final PathwaysDetail PRN = new PathwaysDetail(-1290, "Patient Rearrange First", true, null, null, Color.Default);
	public static final PathwaysDetail RAN = new PathwaysDetail(-1291, "Repeat Appointment First", true, null, null, Color.Default);
	public static final PathwaysDetail WL = new PathwaysDetail(-1292, "WaitingList", true, null, null, Color.Default);
	public static final PathwaysDetail RM = new PathwaysDetail(-1293, "Remove WaitingList Entry", true, null, null, Color.Default);
	public static final PathwaysDetail SU = new PathwaysDetail(-1294, "Suspend Patient", true, null, null, Color.Default);
	public static final PathwaysDetail UN = new PathwaysDetail(-1295, "Unsuspend Patient", true, null, null, Color.Default);
	public static final PathwaysDetail TC = new PathwaysDetail(-1296, "Give TCI Date", true, null, null, Color.Default);
	public static final PathwaysDetail TR = new PathwaysDetail(-1297, "Transfer", true, null, null, Color.Default);
	public static final PathwaysDetail DS = new PathwaysDetail(-1299, "Inpatient Discharge", true, null, null, Color.Default);
	public static final PathwaysDetail ST = new PathwaysDetail(-1300, "Start Clock", true, null, null, Color.Default);
	public static final PathwaysDetail EN = new PathwaysDetail(-1302, "Stop Clock", true, null, null, Color.Default);
	public static final PathwaysDetail US = new PathwaysDetail(-1303, "Undo Stop Clock", true, null, null, Color.Default);
	public static final PathwaysDetail OWF = new PathwaysDetail(-1344, "Outpatient Waiting List Followup", true, null, null, Color.Default);
	public static final PathwaysDetail ADN = new PathwaysDetail(-1345, "Ordinary Booking First", true, null, null, Color.Default);
	public static final PathwaysDetail ADF = new PathwaysDetail(-1346, "Ordinary Booking Followup", true, null, null, Color.Default);
	public static final PathwaysDetail DAF = new PathwaysDetail(-1347, "Did Not Attend Followup", true, null, null, Color.Default);
	public static final PathwaysDetail DDN = new PathwaysDetail(-1348, "Date of Death First", true, null, null, Color.Default);
	public static final PathwaysDetail DDF = new PathwaysDetail(-1349, "Date of Death Followup", true, null, null, Color.Default);
	public static final PathwaysDetail DHF = new PathwaysDetail(-1350, "Discharge from Hold Followup", true, null, null, Color.Default);
	public static final PathwaysDetail HCF = new PathwaysDetail(-1351, "Hospital Cancel Followup", true, null, null, Color.Default);
	public static final PathwaysDetail HDF = new PathwaysDetail(-1352, "Patient on Hold Followup", true, null, null, Color.Default);
	public static final PathwaysDetail IAF = new PathwaysDetail(-1353, "Immediate Admission Followup", true, null, null, Color.Default);
	public static final PathwaysDetail LCF = new PathwaysDetail(-1354, "Left Clinic Followup", true, null, null, Color.Default);
	public static final PathwaysDetail LHF = new PathwaysDetail(-1355, "Left Hospital Followup", true, null, null, Color.Default);
	public static final PathwaysDetail NHF = new PathwaysDetail(-1356, "Not seen place on hold Followup", true, null, null, Color.Default);
	public static final PathwaysDetail NSF = new PathwaysDetail(-1357, "Not Seen Followup", true, null, null, Color.Default);
	public static final PathwaysDetail PCF = new PathwaysDetail(-1358, "Patient Cancel Followup", true, null, null, Color.Default);
	public static final PathwaysDetail PDF = new PathwaysDetail(-1359, "Patient Discharged Followup", true, null, null, Color.Default);
	public static final PathwaysDetail PRF = new PathwaysDetail(-1360, "Patient Rearrange Followup", true, null, null, Color.Default);
	public static final PathwaysDetail RAF = new PathwaysDetail(-1361, "Repeat Appointment Followup", true, null, null, Color.Default);
	public static final PathwaysDetail WLN = new PathwaysDetail(-1362, "WaitingList First", true, null, null, Color.Default);
	public static final PathwaysDetail WLF = new PathwaysDetail(-1363, "WaitingList Followup", true, null, null, Color.Default);
	public static final PathwaysDetail ND = new PathwaysDetail(-1371, "New TCI Date", true, null, null, Color.Default);
	public static final PathwaysDetail DE = new PathwaysDetail(-1373, "DELETE STATUS", true, null, null, Color.Default);
	public static final PathwaysDetail DP = new PathwaysDetail(-1374, "DELETE PATHWAY", true, null, null, Color.Default);
	public static final PathwaysDetail SP = new PathwaysDetail(-1375, "RTT SP", true, null, null, Color.Default);
	public static final PathwaysDetail UD = new PathwaysDetail(-1376, "UNDO RTT STOP CLOCK", true, null, null, Color.Default);
	public static final PathwaysDetail WHN = new PathwaysDetail(-1378, "Outpatient Disposal First", true, null, null, Color.Default);
	public static final PathwaysDetail WHF = new PathwaysDetail(-1379, "Outpatient Disposal Followup", true, null, null, Color.Default);
	public static final PathwaysDetail ATN = new PathwaysDetail(-1381, "Attended First", true, null, null, Color.Default);
	public static final PathwaysDetail ATF = new PathwaysDetail(-1382, "Attended Followup", true, null, null, Color.Default);
	public static final PathwaysDetail CHN = new PathwaysDetail(-1383, "Cancel On Hold First", true, null, null, Color.Default);
	public static final PathwaysDetail CHF = new PathwaysDetail(-1384, "Cancel On Hold Followup", true, null, null, Color.Default);
	public static final PathwaysDetail HRN = new PathwaysDetail(-1385, "Hospital Rearrange First", true, null, null, Color.Default);
	public static final PathwaysDetail HRF = new PathwaysDetail(-1386, "Hospital Rearrange Followup", true, null, null, Color.Default);
	public static final PathwaysDetail WTN = new PathwaysDetail(-1387, "Outpatient Hold Transfer First", true, null, null, Color.Default);
	public static final PathwaysDetail WTF = new PathwaysDetail(-1388, "Outpatient Hold Transfer Followup", true, null, null, Color.Default);
	public static final PathwaysDetail APN = new PathwaysDetail(-1389, "Outpatient Attached Pathway First", true, null, null, Color.Default);
	public static final PathwaysDetail APF = new PathwaysDetail(-1390, "Outpatient Attach Pathway Followup", true, null, null, Color.Default);
	public static final PathwaysDetail UR = new PathwaysDetail(-1677, "Urgent GP 62 Day", true, null, null, Color.Default);
	public static final PathwaysDetail CS = new PathwaysDetail(-1695, "Chemotherapy 31 Day Target", true, null, null, Color.Default);
	public static final PathwaysDetail RS = new PathwaysDetail(-1696, "Radiotherapy 31 Day Target", true, null, null, Color.Default);
	public static final PathwaysDetail RU = new PathwaysDetail(-1697, "Radiotherapy Undo 31Day Target", true, null, null, Color.Default);
	public static final PathwaysDetail UU = new PathwaysDetail(-1701, "Undo Urgent GP Referral", true, null, null, Color.Default);
	public static final PathwaysDetail CO = new PathwaysDetail(-1840, "Change Original Referral Date", true, null, null, Color.Default);
	public static final PathwaysDetail RDA = new PathwaysDetail(-1841, "Referral Date Altered", true, null, null, Color.Default);
}
