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

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

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

	public FluidBalanceType()
	{
		super();
	}
	public FluidBalanceType(int id)
	{
		super(id, "", true);
	}
	public FluidBalanceType(int id, String text, boolean active)
	{
		super(id, text, active, null, null, null);
	}
	public FluidBalanceType(int id, String text, boolean active, FluidBalanceType parent, Image image)
	{
		super(id, text, active, parent, image);
	}
	public FluidBalanceType(int id, String text, boolean active, FluidBalanceType parent, Image image, Color color)
	{
		super(id, text, active, parent, image, color);
	}
	public FluidBalanceType(int id, String text, boolean active, FluidBalanceType parent, Image image, Color color, int order)
	{
		super(id, text, active, parent, image, color, order);
	}
	public static FluidBalanceType buildLookup(ims.vo.LookupInstanceBean bean)
	{
		return new FluidBalanceType(bean.getId(), bean.getText(), bean.isActive());
	}
	public String toString()
	{
		if(getText() != null)
			return getText();
		return "";
	}
	public TreeNode getParentNode()
	{
		return (FluidBalanceType)super.getParentInstance();
	}
	public FluidBalanceType getParent()
	{
		return (FluidBalanceType)super.getParentInstance();
	}
	public void setParent(FluidBalanceType parent)
	{
		super.setParentInstance(parent);
	}
	public TreeNode[] getChildren()
	{
		ArrayList children = super.getChildInstances();
		FluidBalanceType[] typedChildren = new FluidBalanceType[children.size()];
		for (int i = 0; i < children.size(); i++)
		{
			typedChildren[i] = (FluidBalanceType)children.get(i);
		}
		return typedChildren;
	}
	public int addChild(TreeNode child)
	{
		if (child instanceof FluidBalanceType)
		{
			super.addChild((FluidBalanceType)child);
		}
		return super.getChildInstances().size();
	}
	public int removeChild(TreeNode child)
	{
		if (child instanceof FluidBalanceType)
		{
			super.removeChild((FluidBalanceType)child);
		}
		return super.getChildInstances().size();
	}
	public Image getExpandedImage()
	{
		return super.getImage();
	}
	public Image getCollapsedImage()
	{
		return super.getImage();
	}
	public static ims.framework.IItemCollection getNegativeInstancesAsIItemCollection()
	{
		FluidBalanceTypeCollection result = new FluidBalanceTypeCollection();
		result.add(INTAKE);
		result.add(ORAL);
		result.add(IVINTAKE);
		result.add(CVP);
		result.add(FLUSHDRUGS);
		result.add(NGFEED);
		result.add(IVFLUIDANDBLOOD);
		result.add(IVDRUGS);
		result.add(EXTERNALFEED);
		result.add(OUTPUT);
		result.add(URINE);
		result.add(GASTRIC);
		result.add(DRAINS);
		result.add(GASTRICNG);
		result.add(BOWELSSTOMA);
		result.add(DRAIN1);
		result.add(DRAIN2);
		return result;
	}
	public static FluidBalanceType[] getNegativeInstances()
	{
		FluidBalanceType[] instances = new FluidBalanceType[17];
		instances[0] = INTAKE;
		instances[1] = ORAL;
		instances[2] = IVINTAKE;
		instances[3] = CVP;
		instances[4] = FLUSHDRUGS;
		instances[5] = NGFEED;
		instances[6] = IVFLUIDANDBLOOD;
		instances[7] = IVDRUGS;
		instances[8] = EXTERNALFEED;
		instances[9] = OUTPUT;
		instances[10] = URINE;
		instances[11] = GASTRIC;
		instances[12] = DRAINS;
		instances[13] = GASTRICNG;
		instances[14] = BOWELSSTOMA;
		instances[15] = DRAIN1;
		instances[16] = DRAIN2;
		return instances;
	}
	public static String[] getNegativeInstanceNames()
	{
		String[] negativeInstances = new String[17];
		negativeInstances[0] = "INTAKE";
		negativeInstances[1] = "ORAL";
		negativeInstances[2] = "IVINTAKE";
		negativeInstances[3] = "CVP";
		negativeInstances[4] = "FLUSHDRUGS";
		negativeInstances[5] = "NGFEED";
		negativeInstances[6] = "IVFLUIDANDBLOOD";
		negativeInstances[7] = "IVDRUGS";
		negativeInstances[8] = "EXTERNALFEED";
		negativeInstances[9] = "OUTPUT";
		negativeInstances[10] = "URINE";
		negativeInstances[11] = "GASTRIC";
		negativeInstances[12] = "DRAINS";
		negativeInstances[13] = "GASTRICNG";
		negativeInstances[14] = "BOWELSSTOMA";
		negativeInstances[15] = "DRAIN1";
		negativeInstances[16] = "DRAIN2";
		return negativeInstances;
	}
	public static FluidBalanceType 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 FluidBalanceType getNegativeInstance(Integer id)
	{
		if(id == null)
			return null;
		FluidBalanceType[] 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 = 1021077;
	public static final FluidBalanceType INTAKE = new FluidBalanceType(-178, "Intake", true, null, null, Color.Default);
	public static final FluidBalanceType ORAL = new FluidBalanceType(-212, "Oral", true, FluidBalanceType.INTAKE, null, Color.Default);
	public static final FluidBalanceType IVINTAKE = new FluidBalanceType(-213, "IV Intake", true, FluidBalanceType.INTAKE, null, Color.Default);
	public static final FluidBalanceType CVP = new FluidBalanceType(-214, "CVP", true, FluidBalanceType.INTAKE, null, Color.Default);
	public static final FluidBalanceType FLUSHDRUGS = new FluidBalanceType(-215, "Flush/Drugs", true, FluidBalanceType.INTAKE, null, Color.Default);
	public static final FluidBalanceType NGFEED = new FluidBalanceType(-1100, "NG Feed", true, FluidBalanceType.INTAKE, null, Color.Default);
	public static final FluidBalanceType IVFLUIDANDBLOOD = new FluidBalanceType(-1137, "IV Fluid/Bloods", true, FluidBalanceType.INTAKE, null, Color.Default);
	public static final FluidBalanceType IVDRUGS = new FluidBalanceType(-1138, "IV Drugs", true, FluidBalanceType.INTAKE, null, Color.Default);
	public static final FluidBalanceType EXTERNALFEED = new FluidBalanceType(-1139, "External Feed", true, FluidBalanceType.INTAKE, null, Color.Default);
	public static final FluidBalanceType OUTPUT = new FluidBalanceType(-179, "Output", true, null, null, Color.Default);
	public static final FluidBalanceType URINE = new FluidBalanceType(-216, "Urine", true, FluidBalanceType.OUTPUT, null, Color.Default);
	public static final FluidBalanceType GASTRIC = new FluidBalanceType(-217, "Gastric", true, FluidBalanceType.OUTPUT, null, Color.Default);
	public static final FluidBalanceType DRAINS = new FluidBalanceType(-218, "Drains", true, FluidBalanceType.OUTPUT, null, Color.Default);
	public static final FluidBalanceType GASTRICNG = new FluidBalanceType(-1140, "Gastric/NG asp", true, FluidBalanceType.OUTPUT, null, Color.Default);
	public static final FluidBalanceType BOWELSSTOMA = new FluidBalanceType(-1141, "Bowels/Stoma", true, FluidBalanceType.OUTPUT, null, Color.Default);
	public static final FluidBalanceType DRAIN1 = new FluidBalanceType(-1142, "Drain 1", true, FluidBalanceType.OUTPUT, null, Color.Default);
	public static final FluidBalanceType DRAIN2 = new FluidBalanceType(-1143, "Drain 2", true, FluidBalanceType.OUTPUT, null, Color.Default);
}
