/*******************************************************************************
 *  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.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.EI;
import cdac.medinfo.sdk.hl7282.baselibs.NA;
import cdac.medinfo.sdk.hl7282.baselibs.NM;
import cdac.medinfo.sdk.hl7282.baselibs.SI;
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;

/**
 * PAC - Shipment Package Segment .<p>
 * The intent of this segment is to describe the information associated with the shipping package specimens are sent in. 
 * <p>Represents an HL7 PAC message segment. 
 * This segment has the following fields:</p><p>
 * PAC-1: Set ID - PAC (SI)<b>Required</b><br> 
 * PAC-2: Package ID (EI)<b>Conditional</b><br> 
 * PAC-3: Parent Package ID (EI)<b>Optional</b><br> 
 * PAC-4: Position In Parent Package (NA)<b>Optional</b><br> 
 * PAC-5: Package Type  (CWE)<b>Required</b><br> 
 * PAC-6: Package Condition (CWE)<b>Optional</b><br> 
 * PAC-7: Package Handling Code (CWE)<b>Optional</b><br> 
 * PAC-8: Package Risk Code (CWE)<b>Optional</b><br> 
 * 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 PAC extends Segment {
	
	

	/**
	 *	Constructs the PAC segment.
	 */
	public PAC() {
		
		super(EnumSegments.HL7_SEG_PAC);
	}
	

		/**
		 * Retrieves the Set ID - PAC.
		 * This field is used to identify PAC segment instances in message structures where the PAC segment repeats.
		 * @return SI - SetID_PAC
		 */
		public SI getSetID_PAC() 
		{
			ISingleCollection<IDataType> objDataCollection =getDataType(2350);
			if(objDataCollection != null && objDataCollection.size() != 0) 
				return (SI)objDataCollection.elementAt(0);
			else
				return null;
		}
		
		/**
		 * Retrieves the Package ID.
		 * This is the identifier to identify this package from all other packages within its shipment. 
		 * @return EI - PackageID
		 */
		public EI getPackageID() 
		{
			ISingleCollection<IDataType> objDataCollection =getDataType(2351);
			if(objDataCollection != null && objDataCollection.size() != 0) 
				return (EI)objDataCollection.elementAt(0);
			else
				return null;
		}
		
		/**
		 * Retrieves the Parent Package ID.
		 * This is the identifier which identifies the package which contains this package.
		 * @return EI - ParentPackageID
		 */
		public EI getParentPackageID() 
		{
			ISingleCollection<IDataType> objDataCollection =getDataType(2352);
			if(objDataCollection != null && objDataCollection.size() != 0) 
				return (EI)objDataCollection.elementAt(0);
			else
				return null;
		}
		
		/**
		 * Retrieves the Position in Parent Package.
		 * This is the identifier assigned by the shipment transportation provider that uniquely identifies this shipment from all other shipments by the same provider.
		 * @return NA - PositionInParentPackage
		 */
		public NA getPositionInParentPackage() 
		{
			ISingleCollection<IDataType> objDataCollection =getDataType(2353);
			if(objDataCollection != null && objDataCollection.size() != 0) 
				return (NA)objDataCollection.elementAt(0);
			else
				return null;
		}
		
		/**
		 * Retrieves the Package Type.
		 * This is the shipment status which specifies where in the shipment process the package is at the time of messaging.
		 * @return CWE - PackageType
		 */
		public CWE getPackageType() 
		{
			ISingleCollection<IDataType> objDataCollection =getDataType(2354);
			if(objDataCollection != null && objDataCollection.size() != 0) 
				return (CWE)objDataCollection.elementAt(0);
			else
				return null;
		}
		
		/**
		 * Retrieves the Package Condition.
		 * This field describes the condition of the package at the time of the message.
		 * @return ISingleCollection<CWE> - PackageCondition
		 */
		public ISingleCollection<CWE> getPackageCondition() 
		{
			ISingleCollection<IDataType> objDataCollection =getDataType(2355);
			ISingleCollection<CWE> objDataList = new SingleCollection<CWE>(); 
			if(objDataCollection != null && objDataCollection.size() != 0)
			{
				for(IDataType objDataType : objDataCollection)
				{
					CWE objCWE = (CWE)objDataType;
					objDataList.add(objCWE);
				}
			}
			return objDataList;
		}
		
		/**
		 * Retrieves the Package Handling Code.
		 * This field describes how this package needs to be handled during transport.
		 * @return ISingleCollection<CWE> - PackageHandlingCode
		 */
		public ISingleCollection<CWE> getPackageHandlingCode() 
		{
			ISingleCollection<IDataType> objDataCollection =getDataType(2356);
			ISingleCollection<CWE> objDataList = new SingleCollection<CWE>(); 
			if(objDataCollection != null && objDataCollection.size() != 0)
			{
				for(IDataType objDataType : objDataCollection)
				{
					CWE objCWE = (CWE)objDataType;
					objDataList.add(objCWE);
				}
			}
			return objDataList;
		}
		
		/**
		 * Retrieves the Package Risk Code.
		 * This field contains any known or suspected hazards associated with this package.
		 * @return ISingleCollection<CWE> - PackageRiskCode
		 */
		public ISingleCollection<CWE> getPackageRiskCode() 
		{
			ISingleCollection<IDataType> objDataCollection =getDataType(2357);
			ISingleCollection<CWE> objDataList = new SingleCollection<CWE>(); 
			if(objDataCollection != null && objDataCollection.size() != 0)
			{
				for(IDataType objDataType : objDataCollection)
				{
					CWE objCWE = (CWE)objDataType;
					objDataList.add(objCWE);
				}
			}
			return objDataList;
		}
		
		/**
		 * Set the Set ID PAC.
		 * @param strSetID_PAC Specifies setID_PAC.
		 */
		public void setSetID_PAC(String strSetID_PAC) 
		{
			SI setID_PAC  = (SI)getDataElement(2350);
			setID_PAC.setValue(strSetID_PAC);
			setSetID_PAC(setID_PAC);
		}

		/**
		 * Set the Set ID PAC.
		 * @param objsetID_PAC Object of Set ID PAC.
		 */
		public void setSetID_PAC(SI objsetID_PAC)
		{
			setDataType(2350,objsetID_PAC);
		}
		
		/**
		 * Set the Package ID.
		 * This is the identifier to identify this package from all other packages within its shipment. 
		 * @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 setPackageID(String strEntityIdentifier,String strNamespaceId,String strUniversalId,
				String strUniversalIdType)
		{
			EI ei  = (EI)getDataElement(2351);
			ei.setEntityIdentifier(strEntityIdentifier);
			ei.setNamespaceId(strNamespaceId);
			ei.setUniversalId(strUniversalId);
			ei.setUniversalIdType(strUniversalIdType);
			setPackageID(ei);
		}

		/** 
		 * Set the Package ID.
		 * This is the identifier to identify this package from all other packages within its shipment. 
		 * @param objPackageID Object of Package instance ID.
		 */ 
		public void setPackageID(EI objPackageID)
		{
			setDataType(2351,objPackageID);

		}
		
		/**
		 * Set the Parent Package ID.
		 * This is the identifier which identifies the package which contains this package.
		 * @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 setParentPackageID(String strEntityIdentifier,String strNamespaceId,String strUniversalId,
				String strUniversalIdType)
		{
			EI ei  = (EI)getDataElement(2352);
			ei.setEntityIdentifier(strEntityIdentifier);
			ei.setNamespaceId(strNamespaceId);
			ei.setUniversalId(strUniversalId);
			ei.setUniversalIdType(strUniversalIdType);
			setParentPackageID(ei);
		}

		/** 
		 * Set the Parent Package ID.
		 *This is the identifier which identifies the package which contains this package.
		 * @param objParentPackageID Object of Parent Package instance ID.
		 */ 
		public void setParentPackageID(EI objParentPackageID)
		{
			setDataType(2352,objParentPackageID);

		}
		
		/**
		 * Set the Parent Package ID.
		 * This is the identifier assigned by the shipment transportation provider that uniquely identifies this shipment from all other shipments by the same provider.
		 * @param objValue1 Specifies a numeric value
		 * @param objValue2 Specifies a numeric value
		 * @param objValue3 Specifies a numeric value
		 * @param objValue4 Specifies a numeric value 
		 */
		public void setPositionInParentPackage(NM objValue1,NM objValue2,NM objValue3,NM objValue4)
		{
			NA na = (NA)getDataElement(2353);
			na.setValue1(objValue1);
			na.setValue2(objValue2);
			na.setValue3(objValue3);
			na.setValue4(objValue4);			
			setPositionInParentPackage(na);
		}
		
		/** 
		 * Set the Position in Parent Package.
		 * This is the identifier assigned by the shipment transportation provider that uniquely identifies this shipment from all other shipments by the same provider.
		 * @param objPositionInParentPackage Object of Position in Parent Package.
		 */ 
		public void setPositionInParentPackage(NA objPositionInParentPackage)
		{
			setDataType(2353, objPositionInParentPackage);
		}
		
		/**
		 * Set the Package Type.
		 * This is the shipment status which specifies where in the shipment process the package is at the time of messaging.
		 * @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 setPackageType  (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(2354);
			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);
			setPackageType(cwe);
		} 

		/**
		 * Set the Package Type.
		 * This is the shipment status which specifies where in the shipment process the package is at the time of messaging.
		 * @param objPackageType Object of Package Type.
		 */ 
		public void setPackageType (CWE objPackageType)
		{
			setDataType(2354,objPackageType);
		}
		
		
		/**
		 * Set the Package Condition.
		 * This field describes the condition of the package at the time of the message.
		 * @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 addPackageCondition (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(2355);
			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);		 
			addPackageCondition(cwe);

		} 

		/** 
		 * Set the Package Condition.
		 * This field describes the condition of the package at the time of the message.
		 * @param objPackageCondition Specifies the Package Condition
		 */ 
		public void addPackageCondition(CWE objPackageCondition)
		{
			addDataType(2355,objPackageCondition);

		}

		/**
		 * Set the Package Condition.
		 * This field describes the condition of the package at the time of the message.
		 * @param objPackageConditionList List of Package Condition
		 */	
		@SuppressWarnings("unchecked")
		public void setPackageCondition(ISingleCollection<CWE> objPackageConditionList)
		{
			ISingleCollection<IDataType> objCollection = null;
			ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objPackageConditionList;
			objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
			setDataType(2355,objCollection);
		}
		
		
		/**
		 * Set the Package Handling Code.
		 * This field describes how this package needs to be handled during transport.
		 * @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 addPackageHandlingCode (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(2356);
			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);		 
			addPackageHandlingCode(cwe);

		} 

		/** 
		 * Set the Package Handling Code.
		 * This field describes how this package needs to be handled during transport.
		 * @param objPackageHandlingCode Specifies the Package Handling Code
		 */ 
		public void addPackageHandlingCode(CWE objPackageHandlingCode)
		{
			addDataType(2356,objPackageHandlingCode);

		}

		/**
		 * Set the Package Handling Code.
		 * This field describes how this package needs to be handled during transport.
		 * @param objPackageHandlingCodeList List of Package Handling Codes
		 */	
		@SuppressWarnings("unchecked")
		public void setPackageHandlingCode(ISingleCollection<CWE> objPackageHandlingCodeList)
		{
			ISingleCollection<IDataType> objCollection = null;
			ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objPackageHandlingCodeList;
			objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
			setDataType(2356,objCollection);
		}
		
		/**
		 * Set the Package Risk Code.
		 * This field describes how this package needs to be handled during transport.
		 * @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 addPackageRiskCode (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(2357);
			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);		 
			addPackageRiskCode(cwe);

		} 

		/** 
		 * Set the Package Risk Code.
		 * This field describes how this package needs to be handled during transport.
		 * @param objPackageRiskCode Specifies the Package Risk Code
		 */ 
		public void addPackageRiskCode(CWE objPackageRiskCode)
		{
			addDataType(2357,objPackageRiskCode);

		}

		/**
		 * Set the Package Risk Code.
		 * This field describes how this package needs to be handled during transport.
		 * @param objPackageRiskCodeList List of Package Risk Codes
		 */	
		@SuppressWarnings("unchecked")
		public void setPackageRiskCode(ISingleCollection<CWE> objPackageRiskCodeList)
		{
			ISingleCollection<IDataType> objCollection = null;
			ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objPackageRiskCodeList;
			objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
			setDataType(2357,objCollection);
		}
		
}
