/*******************************************************************************
 *  Copyright 2017 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *    http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *******************************************************************************/
package cdac.medinfo.sdk.hl7282.baselibs.segments;

import cdac.medinfo.sdk.hl7282.baselibs.CNE;
import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.EI;
import cdac.medinfo.sdk.hl7282.baselibs.HD;
import cdac.medinfo.sdk.hl7282.baselibs.NM;
import cdac.medinfo.sdk.hl7282.baselibs.NR;
import cdac.medinfo.sdk.hl7282.baselibs.SI;
import cdac.medinfo.sdk.hl7282.baselibs.ST;
import cdac.medinfo.sdk.hl7282.baselibs.XON;
import cdac.medinfo.sdk.hl7282.commoninterface.IDataType;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;
import cdac.medinfo.sdk.hl7282.utils.EnumSegments;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;

/**
 * BUI - Blood Unit information Segment <p>
 * This segment is to describe the information associated with a blood unit, one example of which is one or more blood unit(s) resulting from a BUIation.
 * <p>Represents an HL7 Blood Unit information Segment. 
 * This segment has the following fields:</p><p>
 * BUI-1: Set ID BUI (SI)<b>Optional</b><br> 
 * BUI-2: Blood Unit Identifier (EI)<b>Required</b><br> 
 * BUI-3: Blood Unit Type (CWE)<b>Required</b><br> 
 * BUI-4: Blood Unit Weight (NM)<b>Required</b><br> 
 * BUI-5: Weight Units (CNE)<b>Required</b><br> 
 * BUI-6: Blood Unit Volume (NM)<b>Required</b><br> 
 * BUI-7: Volume Units (CNE)<b>Required</b><br> 
 * BUI-8: Container Catalog Number (ST)<b>Required</b><br> 
 * BUI-9: Container Lot Number (ST)<b>Required</b><br> 
 * BUI-10: Container Manufacturer (XON)<b>Required</b><br> 
 * BUI-11: Transport Temperature (NR)<b>Required</b><br> 
 * BUI-12: Transport Temperature Units (CNE)<b>Required</b><br>   
 * </p>
 * This class provides mechanism to validate message against HL7 v 2.8.2 standard.
 * The class provides accessors & mutators for the elements mentioned above.
 * The class has validate method which validates Message against HL7 v 2.8.2 standard.
 *
 * <p>User can also create Segment through {@link SegmentFactory}
 */
 public class BUI extends Segment   
{
	


	protected Delimiter objDelimiter;

	/**
	 * Constructs the BUI segment.
	 */
	public BUI()
	{
		super(EnumSegments.HL7_SEG_BUI);
		objDelimiter = new Delimiter();
	}
	
	/**
	 * Retrieves the Set ID BUI. 
	 * This field contains a sequence number.  When multiple BUI segments are included in the same segment group, this number differentiates between them.
	 * @return SI - setID_BUI
	 */
	public SI getSetID_BUI() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3373);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (SI)objDataCollection.elementAt(0);
		else
			return null;
	}
	/**
	 * Set the Set ID BUI.
	 * This field contains a sequence number.  When multiple BUI segments are included in the same segment group, this number differentiates between them.
	 * @param strSetID_BUI Specifies setID_BUI.
	 */
	public void setSetID_BUI(String strSetID_BUI) 
	{
		SI setID_BUI  = (SI)getDataElement(3373);
		setID_BUI.setValue(strSetID_BUI);
		setSetID_BUI(setID_BUI);
	}

	/**
	 * Set the Set ID BUI.
	 * This field contains a sequence number.  When multiple BUI segments are included in the same segment group, this number differentiates between them.
	 * @param objsetID_BUI Object of Set ID BUI.
	 */
	public void setSetID_BUI(SI objsetID_BUI)
	{
		setDataType(3373,objsetID_BUI);
	}
	
	/**
	 * Retrieves the Blood Unit Identifier.
	 * The blood unit identifier is a unique identifier assigned to the particular blood unit in a container.
	 * @return EI - BloodUnitIdentifier in object form.
	 */
	public EI getBloodUnitIdentifier() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3374);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EI)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Blood Unit Identifier.
	 * The blood unit identifier is a unique identifier assigned to the particular blood unit in a container.
	 * @param strEntityIdentifier Specifies to be unique within the series of identifiers created by the 
	 * 								assigning authority, defined by a hierarchic designator
	 * @param strNamespaceId Specifies the assigning authority is a unique identifier of the system 
	 * 							(or organization or agency or department) that creates the data. 
	 * @param strUniversalId Specifies a string formatted according to the scheme defined by the third component universal ID type.
	 * 							It is intended to be unique over time within the UID type.
	 * @param strUniversalIdType Governs the interpretation of the Universal ID.  
	 */
	public void setBloodUnitIdentifier(String strEntityIdentifier,String strNamespaceId,String strUniversalId,
			String strUniversalIdType)
	{
		EI ei  = (EI)getDataElement(3374);
		ei.setEntityIdentifier(strEntityIdentifier);
		ei.setNamespaceId(strNamespaceId);
		ei.setUniversalId(strUniversalId);
		ei.setUniversalIdType(strUniversalIdType);
		setBloodUnitIdentifier(ei);
	}

	/**
	 * Set the Blood Unit Identifier.
	 * The blood unit identifier is a unique identifier assigned to the particular blood unit in a container.
	 * @param objBloodUnitIdentifier Object of Blood Unit Identifier.
	 */
	public void setBloodUnitIdentifier(EI objBloodUnitIdentifier)
	{
		setDataType(3374,objBloodUnitIdentifier);
	}
	
	/**
	 * Retrieves the Blood Unit Type.
	 * The type of blood unit.  For donations, this is the type blood unit being described.  This element defines which of the types from the referenced table are being described.
	 * @return CWE - BloodUnitType
	 */
	public CWE getBloodUnitType() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3375);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Blood Unit Type.
	 * The type of blood unit.  For donations, this is the type blood unit being described.  This element defines which of the types from the referenced table are being described.
	 * @param strIdentifier Specifies of characters (the code) that uniquely identifies the item being referenced. 
	 * @param strText Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction. 
	 * @param strNameOfCodingSystem Identifies the coding scheme being used in the identifier component.
	 * @param strAlternateIdentifier Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
	 * @param strAlternateText Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
	 * @param strNameOfAlternateCodingSystem Identifies the coding scheme being used in the alternate identifier component. 
	 * @param strCodingSystemVersionID A sequence of characters that uniquely identifies a second alternate code.
	 * @param strAlternateCodingSystemVersionId This component carries the version for the coding system identified by components 4-6.
	 * @param strOriginalText The text as seen and/or selected by the user who entered the data.
	 * @param strSecondAlternateIdentifier A sequence of characters that uniquely identifies a second alternate code.
	 * @param strSecondAlternateText The descriptive or textual name of the alternate identifier.
	 * @param strNameofSecondAlternateCodingSystem Identifies the coding scheme being used in the alternate identifier component.
	 * @param strSecondAlternateCodingSystemVersionID This component carries the version for the coding system identified by components 10-12.
	 * @param strCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
	 * @param strValueSetOID This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
	 * @param strValueSetVersionID This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
	 * @param strAlternateCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
	 * @param strAlternateValueSetOID This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
	 * @param strAlternateValueSetVersionID This component carries the version for the value set identified by CWE.18. The version is a date.
	 * @param strSecondAlternateCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
	 * @param strSecondAlternateValueSetOID This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
	 * @param strSecondAlternateValueSetVersionID This component carries the version for the value set identified by CWE.21. The version is a date.
	 */
	public void setBloodUnitType(String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String 				strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		CWE cwe  = (CWE)getDataElement(3375);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setBloodUnitType(cwe);
	}
	/**
	 * Set the Blood Unit Type.
	 * The type of blood unit.  For donations, this is the type blood unit being described.  This element defines which of the types from the referenced table are being described.
	 * @param objBloodUnitType Object of Blood Unit Type.
	 */
	public void setBloodUnitType(CWE objBloodUnitType)
	{
		setDataType(3375,objBloodUnitType);
	}
	
	/**
	 * Retrieves the Blood Unit Weight.
	 * The weight of the blood unit collected, not including the weight of the container.  
	 * @return NM - BloodUnitWeight
	 */
	public NM getBloodUnitWeight() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3376);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Blood Unit Weight.
	 * The weight of the blood unit collected, not including the weight of the container.   
	 * @param strBloodUnitWeight Specifies Blood Unit Weight.
	 */
	public void setBloodUnitWeight(String strBloodUnitWeight) 
	{
		NM nm  = (NM)getDataElement(3376);
		nm.setValue(strBloodUnitWeight);
		setBloodUnitWeight(nm);
	}

	/**
	 * Set the Blood Unit Weight.
	 * The weight of the blood unit collected, not including the weight of the container.
	 * @param objBloodUnitWeight Object of Blood Unit Weight.
	 */
	public void setBloodUnitWeight(NM objBloodUnitWeight)
	{
		setDataType(3376,objBloodUnitWeight);
	}
	
	/**
	 * Retrieves the Weight Units.
	 * The unit of measure for the weight of the blood unit.
	 * @return CNE - WeightUnits
	 */
	public CNE getWeightUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3377);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CNE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Weight Units.
	 * The unit of measure for the weight of the blood unit.    
	 * @param strIdentifier Specifies sequence of characters (the code) that uniquely identifies
	 * 						 the item being referenced by the CNE.
	 * @param strText Specifies descriptive or textual name of the identifier, e.g., myocardial infarction 
	 * @param strNameOfCodingSystem Specifies the coding scheme being used in the identifier component. 
	 * @param strAlternateIdentifier Specifies the local or user seen code as described. 
	 * @param strAlternateText Specifies descriptive or textual name of the alternate identifier.  
	 * @param strNameOfAlternateCodingSystem Specifies the coding scheme being used in the alternate identifier 
	 * 											component.  
	 * @param strCodingSystemVersionID Specifies the version ID for the coding system. 
	 * @param strAlternateCodingSystemVersionID Specifies the version ID for the coding system .
	 * @param strOriginalText Specifies the original text that was available to an automated process or a human 
	 * 							before a specific code was assigned.
	 * @param strSecondAlternateIdentifier Specifies a sequence of characters that uniquely identifies the second alternate code
	 * @param strSecondAlternateText Specifies a the textual information of the second alternate code
	 * @param strNameOfSecondAltenateCodingSystem Specifies the second coding scheme being used in the identifier component.
	 * @param strSecondAlternateCodingSystemVersionID Specifies version ID of Second alternative coding system.
	 * @param strCodingSystemOID contains the ISO Object identifier for the coding system.
	 * @param strValueSetOID contains the value set from which CNE-1 is obtained 
	 * @param strValueSetVersionID contains the version of the value set identified by CNE-15. 
	 * @param strAlternateCodingSystemOID contains the ISO Object identifier for the alternate coding system
	 * @param strAlternateValueSetOID contains the value set from which CNE-4 is obtained
	 * @param strAlternateValueSetVersionID contains the version of the value set identified by CNE-18. 
	 * @param strSecondAlternateCodingSystemOID contains the value set from which CNE-12 is obtained
	 * @param strSecondAlternateValueSetOID contains the value set from which CNE-10 is obtained
	 * @param strSecondAlternateValueSetVersionID contains the version of the value set identified by CNE-21. 
	 */
	public void setWeightUnits(String strIdentifier,String strText,String strNameOfCodingSystem,String strAlternateIdentifier,
			String strAlternateText,String strNameOfAlternateCodingSystem,String strCodingSystemVersionID,
			String strAlternateCodingSystemVersionID,String strOriginalText, String strSecondAlternateIdentifier, String strSecondAlternateText,
			String strNameOfSecondAltenateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, 
			String strValueSetOID, String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID,
			String strAlternateValueSetVersionID, String strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID,
			String strSecondAlternateValueSetVersionID)
	{
		CNE cne  = (CNE)getDataElement(3377);
		cne.setIdentifier(strIdentifier);
		cne.setText(strText);
		cne.setNameOfCodingSystem(strNameOfCodingSystem);
		cne.setAlternateIdentifier(strAlternateIdentifier);
		cne.setAlternateText(strAlternateText);
		cne.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem);
		cne.setCodingSystemVersionID(strCodingSystemVersionID);
		cne.setAlternateCodingSystemVersionID(strAlternateCodingSystemVersionID);
		cne.setOriginalText(strOriginalText); 
		cne.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cne.setSecondAlternateText(strSecondAlternateText);
		cne.setNameofSecondAlternateCodingSystem(strNameOfSecondAltenateCodingSystem);
		cne.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cne.setCodingSystemOID(strCodingSystemOID);
		cne.setValueSetOID(strValueSetOID);
		cne.setValueSetVersionID(strValueSetVersionID);
		cne.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cne.setAlternateValueSetOID(strAlternateValueSetOID);
		cne.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cne.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cne.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cne.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setWeightUnits(cne);
	}

	/**
	 * Set the Weight Units.
	 * The unit of measure for the weight of the blood unit. 
	 * @param objWeightUnits Object of Weight Units.
	 */
	public void setWeightUnits(CNE objWeightUnits)
	{
		setDataType(3377,objWeightUnits);
	}
	
	/**
	 * Retrieves the Blood Unit Volume.
	 * The volume of the blood unit collected.
	 * @return NM - BloodUnitVolume
	 */
	public NM getBloodUnitVolume() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3378);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Blood Unit Volume.
	 * The volume of the blood unit collected.   
	 * @param strBloodUnitVolume Specifies Blood Unit Volume.
	 */
	public void setBloodUnitVolume(String strBloodUnitVolume) 
	{
		NM nm  = (NM)getDataElement(3378);
		nm.setValue(strBloodUnitVolume);
		setBloodUnitVolume(nm);
	}

	/**
	 * Set the Blood Unit Volume.
	 * The volume of the blood unit collected.
	 * @param objBloodUnitVolume Object of Blood Unit Volume.
	 */
	public void setBloodUnitVolume(NM objBloodUnitVolume)
	{
		setDataType(3378,objBloodUnitVolume);
	}
	
	/**
	 * Retrieves the Volume Units.
	 * The unit of measure for the volume of the blood unit. 
	 * @return CNE - VolumeUnits
	 */
	public CNE getVolumeUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3379);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CNE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Volume Units.
	 * The unit of measure for the volume of the blood unit.   
	 * @param strIdentifier Specifies sequence of characters (the code) that uniquely identifies
	 * 						 the item being referenced by the CNE.
	 * @param strText Specifies descriptive or textual name of the identifier, e.g., myocardial infarction 
	 * @param strNameOfCodingSystem Specifies the coding scheme being used in the identifier component. 
	 * @param strAlternateIdentifier Specifies the local or user seen code as described. 
	 * @param strAlternateText Specifies descriptive or textual name of the alternate identifier.  
	 * @param strNameOfAlternateCodingSystem Specifies the coding scheme being used in the alternate identifier 
	 * 											component.  
	 * @param strCodingSystemVersionID Specifies the version ID for the coding system. 
	 * @param strAlternateCodingSystemVersionID Specifies the version ID for the coding system .
	 * @param strOriginalText Specifies the original text that was available to an automated process or a human 
	 * 							before a specific code was assigned.
	 * @param strSecondAlternateIdentifier Specifies a sequence of characters that uniquely identifies the second alternate code
	 * @param strSecondAlternateText Specifies a the textual information of the second alternate code
	 * @param strNameOfSecondAltenateCodingSystem Specifies the second coding scheme being used in the identifier component.
	 * @param strSecondAlternateCodingSystemVersionID Specifies version ID of Second alternative coding system.
	 * @param strCodingSystemOID contains the ISO Object identifier for the coding system.
	 * @param strValueSetOID contains the value set from which CNE-1 is obtained 
	 * @param strValueSetVersionID contains the version of the value set identified by CNE-15. 
	 * @param strAlternateCodingSystemOID contains the ISO Object identifier for the alternate coding system
	 * @param strAlternateValueSetOID contains the value set from which CNE-4 is obtained
	 * @param strAlternateValueSetVersionID contains the version of the value set identified by CNE-18. 
	 * @param strSecondAlternateCodingSystemOID contains the value set from which CNE-12 is obtained
	 * @param strSecondAlternateValueSetOID contains the value set from which CNE-10 is obtained
	 * @param strSecondAlternateValueSetVersionID contains the version of the value set identified by CNE-21. 
	 */
	public void setVolumeUnits(String strIdentifier,String strText,String strNameOfCodingSystem,String strAlternateIdentifier,
			String strAlternateText,String strNameOfAlternateCodingSystem,String strCodingSystemVersionID,
			String strAlternateCodingSystemVersionID,String strOriginalText, String strSecondAlternateIdentifier, String strSecondAlternateText,
			String strNameOfSecondAltenateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, 
			String strValueSetOID, String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID,
			String strAlternateValueSetVersionID, String strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID,
			String strSecondAlternateValueSetVersionID)
	{
		CNE cne  = (CNE)getDataElement(3379);
		cne.setIdentifier(strIdentifier);
		cne.setText(strText);
		cne.setNameOfCodingSystem(strNameOfCodingSystem);
		cne.setAlternateIdentifier(strAlternateIdentifier);
		cne.setAlternateText(strAlternateText);
		cne.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem);
		cne.setCodingSystemVersionID(strCodingSystemVersionID);
		cne.setAlternateCodingSystemVersionID(strAlternateCodingSystemVersionID);
		cne.setOriginalText(strOriginalText); 
		cne.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cne.setSecondAlternateText(strSecondAlternateText);
		cne.setNameofSecondAlternateCodingSystem(strNameOfSecondAltenateCodingSystem);
		cne.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cne.setCodingSystemOID(strCodingSystemOID);
		cne.setValueSetOID(strValueSetOID);
		cne.setValueSetVersionID(strValueSetVersionID);
		cne.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cne.setAlternateValueSetOID(strAlternateValueSetOID);
		cne.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cne.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cne.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cne.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setVolumeUnits(cne);
	}

	/**
	 * Set the Volume Units.
	 * The unit of measure for the volume of the blood unit.
	 * @param objVolumeUnits Object of Volume Units.
	 */
	public void setVolumeUnits(CNE objVolumeUnits)
	{
		setDataType(3379,objVolumeUnits);
	}
	
	/**
	 * Retrieves the Container Catalog Number.
	 * The string catalog number of the blood unit container, which includes a specific container code to identify a collection bag.
	 * @return String - ContainerCatalogNumber
	 */
	public ST getContainerCatalogNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3380);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Container Catalog Number.
	 * The string catalog number of the blood unit container, which includes a specific container code to identify a collection bag.
	 * @param strContainerCatalogNumber Contains the Container Catalog Number. 
	 */ 
	public void setContainerCatalogNumber(String strContainerCatalogNumber)
	{
		ST st  = (ST)getDataElement(3380);
		st.setValue(strContainerCatalogNumber); 
		setContainerCatalogNumber(st);
	} 

	/**
	 * Set the Container Catalog Number.
	 * The string catalog number of the blood unit container, which includes a specific container code to identify a collection bag.
	 * @param objContainerCatalogNumber object of Container Catalog Number. 
	 */ 
	public void setContainerCatalogNumber(ST objContainerCatalogNumber)
	{
		setDataType(3380,objContainerCatalogNumber);
	}
	
	/**
	 * Retrieves the Container Lot Number.
	 * The lot number for the collection bag container as assigned by the container manufacturer.
	 * @return String - ContainerLotNumber
	 */
	public ST getContainerLotNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3381);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Container Lot Number.
	 * The lot number for the collection bag container as assigned by the container manufacturer.
	 * @param strContainerLotNumber Contains the Container Lot Number. 
	 */ 
	public void setContainerLotNumber(String strContainerLotNumber)
	{
		ST st  = (ST)getDataElement(3381);
		st.setValue(strContainerLotNumber); 
		setContainerLotNumber(st);
	} 

	/**
	 * Set the Container Lot Number.
	 * The lot number for the collection bag container as assigned by the container manufacturer.
	 * @param objContainerLotNumber object of Container Lot Number. 
	 */ 
	public void setContainerLotNumber(ST objContainerLotNumber)
	{
		setDataType(3381,objContainerLotNumber);
	}
	
	/** Retrieves the Container Manufacturer.
	 * The organization which manufactured the collection bag container.
	 * @return XON - Container Manufacturer.
	 */ 
	public XON getContainerManufacturer()
	{		
		ISingleCollection<IDataType> objDataCollection =getDataType(3382);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (XON)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/** Set the Container Manufacturer.
	 * The organization which manufactured the collection bag container.    
     * @param strOrganizationName Specifies name of the specified organization.
	 * @param strOrganizationNameTypeCode Specifies a code that represents the type of name i.e., legal name, display name.
	 * 										Suggested Values A,L,D,SL.[Refer to table No.0204]  
	 * @param objAssigningAuthority Specifies The assigning authority is a unique identifier of the system 
	 * 									(or organization or agency or department) that creates the data. 
	 * @param strIdentifierTypeCode Specifies a code corresponding to the type of identifier. 
	 * @param objAssigningFacility Specifies The place or location identifier where the identifier was first assigned to the person. 
	 * @param strNameRepresentationCode Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465] 
	 * @param strOrganizationIdentifier This component contains the sequence of characters (the code) that uniquely 
	 * 									  identifies the item being referenced by XON.1 Organization Name. 
	 * 									  This component replaces XON.3 ID Number as of v 2.5.
	 */ 
	public void setContainerManufacturer(String strOrganizationName, CWE objOrganizationNameTypeCode,
			 HD objAssigningAuthority,
			String strIdentifierTypeCode, HD objAssigningFacility, String strNameRepresentationCode,
			String strOrganizationIdentifier)
	{
		XON xon  = (XON)getDataElement(3382);
		xon.setOrganizationName(strOrganizationName);
		xon.setOrganizationNameTypeCode(objOrganizationNameTypeCode);
		xon.setAssigningAuthority(objAssigningAuthority);
		xon.setIdentifierTypeCode(strIdentifierTypeCode);
		xon.setAssigningFacility(objAssigningFacility);
		xon.setNameRepresentationCode(strNameRepresentationCode);
		xon.setOrganizationIdentifier(strOrganizationIdentifier);
		setContainerManufacturer(xon);

	} 
	/** Set the Container Manufacturer.
	 * The organization which manufactured the collection bag container.
	 * @param objContainerManufacturer Used as Container Manufacturer.
	 */ 
	public void setContainerManufacturer(XON objContainerManufacturer)
	{
		setDataType(3382,objContainerManufacturer);
	}
	
	/**
	 * Retrieves the Transport Temperature.
	 * The temperature range between which the blood unit must be kept during transport.
	 * @return String - TransportTemperature
	 */
	public NR getTransportTemperature() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3383);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NR)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Transport Temperature.
	 * The temperature range between which the blood unit must be kept during transport.
     * @param objLowValue Specifies Low value
	 * @param objHighValue Specifies High Value. 
	 */ 
	public void setTransportTemperature(NM objLowValue,NM objHighValue) 
	{
		NR nr  = (NR)getDataElement(3383);
		nr.setLowValue(objLowValue);
		nr.setHighValue(objHighValue);
		setTransportTemperature(nr);

	}
	
	/**
	 * Set the Transport Temperature.
	 * The temperature range between which the blood unit must be kept during transport.
     * @param objTransportTemperature Used as  Transport Temperature.	 
	 */ 
	public void setTransportTemperature(NR objTransportTemperature) 
	{		
		setDataType(3383,objTransportTemperature);		
	}
	
	/**
	 * Retrieves the Transport Temperature Units.
	 * The unit of measure of the transport temperature range.
	 * @return ISingleCollection<CNE> - TransportTemperatureUnits
	 */
	public ISingleCollection<CNE> getTransportTemperatureUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3384);
		ISingleCollection<CNE> objDataList = new SingleCollection<CNE>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				CNE objCNE = (CNE)objDataType;
				objDataList.add(objCNE);
			}
		}
		return objDataList;
	}
	
	/**
	 * Add the Transport Temperature Units.
	 * The unit of measure of the transport temperature range.
	 * @param strIdentifier Specifies sequence of characters (the code) that uniquely identifies
	 * 						 the item being referenced by the CNE.
	 * @param strText Specifies descriptive or textual name of the identifier, e.g., myocardial infarction 
	 * @param strNameOfCodingSystem Specifies the coding scheme being used in the identifier component. 
	 * @param strAlternateIdentifier Specifies the local or user seen code as described. 
	 * @param strAlternateText Specifies descriptive or textual name of the alternate identifier.  
	 * @param strNameOfAlternateCodingSystem Specifies the coding scheme being used in the alternate identifier 
	 * 											component.  
	 * @param strCodingSystemVersionID Specifies the version ID for the coding system. 
	 * @param strAlternateCodingSystemVersionID Specifies the version ID for the coding system .
	 * @param strOriginalText Specifies the original text that was available to an automated process or a human 
	 * 							before a specific code was assigned.
	 * @param strSecondAlternateIdentifier Specifies a sequence of characters that uniquely identifies the second alternate code
	 * @param strSecondAlternateText Specifies a the textual information of the second alternate code
	 * @param strNameOfSecondAltenateCodingSystem Specifies the second coding scheme being used in the identifier component.
	 * @param strSecondAlternateCodingSystemVersionID Specifies version ID of Second alternative coding system.
	 * @param strCodingSystemOID contains the ISO Object identifier for the coding system.
	 * @param strValueSetOID contains the value set from which CNE-1 is obtained 
	 * @param strValueSetVersionID contains the version of the value set identified by CNE-15. 
	 * @param strAlternateCodingSystemOID contains the ISO Object identifier for the alternate coding system
	 * @param strAlternateValueSetOID contains the value set from which CNE-4 is obtained
	 * @param strAlternateValueSetVersionID contains the version of the value set identified by CNE-18. 
	 * @param strSecondAlternateCodingSystemOID contains the value set from which CNE-12 is obtained
	 * @param strSecondAlternateValueSetOID contains the value set from which CNE-10 is obtained
	 * @param strSecondAlternateValueSetVersionID contains the version of the value set identified by CNE-21. 
	 */ 
	public void addTransportTemperatureUnits(String strIdentifier,String strText,String strNameOfCodingSystem,String strAlternateIdentifier,
			String strAlternateText,String strNameOfAlternateCodingSystem,String strCodingSystemVersionID,
			String strAlternateCodingSystemVersionID,String strOriginalText, String strSecondAlternateIdentifier, String strSecondAlternateText,
			String strNameOfSecondAltenateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, 
			String strValueSetOID, String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID,
			String strAlternateValueSetVersionID, String strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID,
			String strSecondAlternateValueSetVersionID)
	{
		CNE cne  = (CNE)getDataElement(3384);
		cne.setIdentifier(strIdentifier);
		cne.setText(strText);
		cne.setNameOfCodingSystem(strNameOfCodingSystem);
		cne.setAlternateIdentifier(strAlternateIdentifier);
		cne.setAlternateText(strAlternateText);
		cne.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem);
		cne.setCodingSystemVersionID(strCodingSystemVersionID);
		cne.setAlternateCodingSystemVersionID(strAlternateCodingSystemVersionID);
		cne.setOriginalText(strOriginalText); 
		cne.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cne.setSecondAlternateText(strSecondAlternateText);
		cne.setNameofSecondAlternateCodingSystem(strNameOfSecondAltenateCodingSystem);
		cne.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cne.setCodingSystemOID(strCodingSystemOID);
		cne.setValueSetOID(strValueSetOID);
		cne.setValueSetVersionID(strValueSetVersionID);
		cne.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cne.setAlternateValueSetOID(strAlternateValueSetOID);
		cne.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cne.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cne.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cne.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		addTransportTemperatureUnits(cne);
	}

	/**	
	 * Add the Transport Temperature Units.
	 * The unit of measure of the transport temperature range.
	 * @param objTransportTemperatureUnits Object of Transport Temperature Units.
	 */
	public void addTransportTemperatureUnits(CNE objTransportTemperatureUnits)
	{
		addDataType(3384,objTransportTemperatureUnits);
	}

	/**
	 * Set the Transport Temperature Units.
	 * The unit of measure of the transport temperature range.
	 * @param objTransportTemperatureUnitsList List of Transport Temperature Units.
	 */
	@SuppressWarnings("unchecked")
	public void setTransportTemperatureUnits(ISingleCollection<CNE> objTransportTemperatureUnits)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objTransportTemperatureUnits;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(3384,objCollection);
	}
	
}