/*******************************************************************************
 *  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.CQ;
import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.ID;
import cdac.medinfo.sdk.hl7282.baselibs.NM;
import cdac.medinfo.sdk.hl7282.baselibs.TX;
import cdac.medinfo.sdk.hl7282.commoninterface.IDataType;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;
import cdac.medinfo.sdk.hl7282.exceptions.FieldMissingException;
import cdac.medinfo.sdk.hl7282.exceptions.InvalidSegmentException;
import cdac.medinfo.sdk.hl7282.utils.EnumSegments;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;

/***
 * OM4 - Observations That Require Specimens Segment<p>
 * The Technical Steward for the OM4 segment is ORDERS.
 * This segment applies to observations/batteries that require a specimen for their performances. 
 * <p>Represents an HL7 OM4 message segment. 
 * This segment has the following fields:</p><p>
 * OM4-1: Sequence Number - Test/Observation Master File (NM)<b>Optional</b><br> 
 * OM4-2: Derived Specimen (ID)<b>Optional</b><br> 
 * OM4-3: Container Description (TX)<b>Optional</b><br> 
 * OM4-4: Container Volume (NM)<b>Optional</b><br> 
 * OM4-5: Container Units (CWE)<b>Optional</b><br> 
 * OM4-6: Specimen (CWE)<b>Optional</b><br> 
 * OM4-7: Additive (CWE)<b>Optional</b><br> 
 * OM4-8: Preparation (TX)<b>Optional</b><br> 
 * OM4-9: Special Handling Requirements (TX)<b>Optional</b><br> 
 * OM4-10: Normal Collection Volume (CQ)<b>Optional</b><br> 
 * OM4-11: Minimum Collection Volume (CQ)<b>Optional</b><br> 
 * OM4-12: Specimen Requirements (TX)<b>Optional</b><br> 
 * OM4-13: Specimen Priorities (ID)<b>Optional</b><br> 
 * OM4-14: Specimen Retention Time (CQ)<b>Optional</b><br>
 * OM4-15: Specimen Handling Code (CWE)<b>Optional</b><br> 
 * OM4-16: Specimen Preference (ID)<b>Optional</b><br> 
 * OM4-17: Preferred Specimen/Attribture Sequence ID (NM)<b>Optional</b><br> 
 * OM4-18: Taxonomic Classification Code (CWE)<b>Optional</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 OM4 extends Segment   
{
	

	/**
	 * Constructs the OM4 segment.
	 */
	public OM4()
	{super(EnumSegments.HL7_SEG_OM4);
	}

	//Integer values used in getter/setter is unique item id defined 
	//for each attribute.

	/**
	 * Retrieves the Additive.
	 * This field contains the codes that should be those provided by NCCLS.
	 * @return CWE - additive
	 */
	public CWE getAdditive() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(647);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Container Description.
	 * This field contains the physical appearance, including color of tube tops, shape, and material composition (e.g., red-top glass tube). 
	 * @return TX - containerDescription
	 */
	public TX getContainerDescription() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(643);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (TX)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Container Units.
	 * This field contains the units of measure of the container volume.  
	 * @return CWE - containerUnits
	 */
	public CWE getContainerUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(645);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Container Volume.
	 * This field indicates the capacity of the container.
	 * @return NM - containerVolume
	 */
	public NM getContainerVolume() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(644);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Derived Specimen.
	 * This field contains the codes that identify the parents and children for diagnostic studies.
	 * @return ID - derivedSpecimen
	 */
	public ID getDerivedSpecimen() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(642);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Minimum Collection Volume.
	 * This field contains the amount of specimen needed by the most specimen sparing method.
	 * @return CQ - minimumCollectionVolume
	 */
	public CQ getMinimumCollectionVolume() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(651);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CQ)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Normal Collection Volume.
	 * This field contains the normal specimen volume required by the lab.  
	 * @return CQ - normalCollectionVolume
	 */
	public CQ getNormalCollectionVolume() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(650);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CQ)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Preparation.
	 * This field contains the special processing that should be applied to the container, e.g., add acidifying tablets before sending.
	 * @return TX - preparation
	 */
	public TX getPreparation() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(648);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (TX)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Sequence Number Test Observation Master File.
	 * This field contains the same value as the sequence number of the associated OM1 segment.
	 * @return NM - sequenceNumberTestObservationMasterFile
	 */
	public NM getSequenceNumberTestObservationMasterFile() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(586);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Special Handling Requirements.
	 * This field contains the special handling requirements.
	 * @return TX - specialHandlingRequirements
	 */
	public TX getSpecialHandlingRequirements() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(649);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (TX)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Specimen.
	 * This field reports the specimen as one of the specimen codes described in ASTM Table.
	 * @return CWE - specimen
	 */
	public CWE getSpecimen() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(646);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Specimen Priorities.
	 * This field contains the allowed priorities for obtaining the specimen.  
	 * @return ISingleCollection<ID> - specimenPriorities
	 */
	public ISingleCollection<ID> getSpecimenPriorities() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(653);
		ISingleCollection<ID> objDataList = new SingleCollection<ID>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				ID objID = (ID)objDataType;
				objDataList.add(objID);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Specimen Requirements.
	 * This field contains the other requirements for specimen delivery and special handling.
	 * @return TX - specimenRequirements
	 */
	public TX getSpecimenRequirements() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(652);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (TX)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Specimen Retention Time.
	 * This field contains the usual time that a specimen for this 
	 * observation is retained after the observation is completed, for the purpose of additional testing.  
	 * @return CQ - specimenRetentionTime
	 */
	public CQ getSpecimenRetentionTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(654);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CQ)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Specimen Handling Code.
	 * This describes how the specimen and/or container need to be handled from the time of collection through the initiation of testing.
	 * @return ISingleCollection<CWE> - SpecimenHandlingCode
	 */
	public ISingleCollection<CWE> getSpecimenHandlingCode() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1908);
		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 Specimen Preference.
	 * This field indicates whether the Specimen/Attribute is Preferred or alternate for collection of the specimen.  
	 * @return ID - SpecimenPreference
	 */
	public ID getSpecimenPreference() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3311);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Preferred Specimen/Attribture Sequence ID.
	 * This field contains the value of the sequence number of the Preferred Specimen that these specimens are the alternative for.
	 * @return NM - PreferredSpecimenAttribtureSequenceID
	 */
	public NM getPreferredSpecimenAttribtureSequenceID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3312);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Taxonomic Classification Code.
	 * The species of living organism. This may include the common or scientific name, based on the coding system(s) used.
	 * @return ISingleCollection<CWE> - TaxonomicClassificationCode
	 */
	public ISingleCollection<CWE> getTaxonomicClassificationCode() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1539);
		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 Additive.
	 * This field contains the codes that should be those provided by NCCLS.
	 * @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 setAdditive(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(647);
		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);
		setAdditive(cwe);
	}

	/**
	 * Set the Additive.
	 * This field contains the codes that should be those provided by NCCLS.
	 * @param objadditive  Object of Additive.
	 */
	public void setAdditive(CWE objadditive)
	{ 
		setDataType(647,objadditive);

	}

	/**
	 * Set the Container Description.
	 * This field contains the physical appearance, including color of tube tops, shape, and material composition (e.g., red-top glass tube).
	 * @param strSoftwareProductInformation Use as SoftwareProductInformation.
	 */
	public void setContainerDescription (String strSoftwareProductInformation) 
	{
		TX containerDescription  = (TX)getDataElement(643);
		containerDescription.setValue(strSoftwareProductInformation);
		setContainerDescription(containerDescription);
	}

	/**
	 * Set the Container Description.
	 * This field contains the physical appearance, including color of tube tops, shape, and material composition (e.g., red-top glass tube).
	 * @param objcontainerDescription Object of Container Description.
	 */
	public void setContainerDescription(TX objcontainerDescription)
	{
		setDataType(643,objcontainerDescription);

	}

	/**
	 * Set the Preparation.
	 * This field contains the special processing that should be applied to the container, e.g., add acidifying tablets before sending.
	 * @param strSoftwareProductInformation Use as SoftwareProductInformation.
	 */
	public void setPreparation(String strSoftwareProductInformation) 
	{
		TX preparation  = (TX)getDataElement(648);
		preparation.setValue(strSoftwareProductInformation);
		setPreparation(preparation);
	}

	/**
	 * Set the Preparation.
	 * This field contains the special processing that should be applied to the container, e.g., add acidifying tablets before sending.
	 * @param objpreparation Object of Preparation.
	 */
	public void setPreparation(TX objpreparation)
	{
		setDataType(648,objpreparation);

	}

	/**
	 * Set the Special Handling Requirements.
	 * This field contains the special handling requirements.
	 * @param strSoftwareProductInformation Use as SoftwareProductInformation.
	 */
	public void setSpecialHandlingRequirements (String strSoftwareProductInformation) 
	{
		TX specialHandlingRequirements  = (TX)getDataElement(649);
		specialHandlingRequirements.setValue(strSoftwareProductInformation);
		setSpecialHandlingRequirements(specialHandlingRequirements);
	}

	/**
	 * Set the Special Handling Requirements.
	 * This field contains the special handling requirements.
	 * @param objspecialHandlingRequirements Object of Special Handling Requirements.
	 */
	public void setSpecialHandlingRequirements(TX objspecialHandlingRequirements)
	{
		setDataType(649,objspecialHandlingRequirements);

	}

	/**
	 * Set the Specimen Requirements.
	 * This field contains the other requirements for specimen delivery and special handling
	 * @param strSoftwareProductInformation Use as SoftwareProductInformation.
	 */
	public void setSpecimenRequirements(String strSoftwareProductInformation) 
	{
		TX specimenRequirements  = (TX)getDataElement(652);
		specimenRequirements.setValue(strSoftwareProductInformation);
		setSpecimenRequirements(specimenRequirements);
	}

	/**
	 * Set the Specimen Requirements.
	 * This field contains the other requirements for specimen delivery and special handling
	 * @param objspecimenRequirements Object of Specimen Requirements.
	 */
	public void setSpecimenRequirements(TX objspecimenRequirements)
	{
		setDataType(652,objspecimenRequirements);

	}

	/**
	 * Set the Container Units.
	 * This field contains the units of measure of the container volume.  
	 * @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 setContainerUnits (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(645);
		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);
		setContainerUnits(cwe);
	}

	/**
	 * Set the Container Units.
	 * This field contains the units of measure of the container volume.
	 * @param objcontainerUnits Object of Container Units.
	 */
	public void setContainerUnits(CWE objcontainerUnits)
	{
		setDataType(645,objcontainerUnits);

	}

	/**
	 * Set the Specimen.
	 * This field reports the specimen as one of the specimen codes described in ASTM Table.
	  * @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 setSpecimen(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(646);
		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);
		setSpecimen(cwe);
	}

	/**
	 * Set the Specimen.
	 * This field reports the specimen as one of the specimen codes described in ASTM Table.
	 * @param objspecimen Object of Specimen.
	 */
	public void setSpecimen(CWE objspecimen)
	{
		setDataType(646,objspecimen);

	}

	/** 
	 * Set the Container Volume.
	 * This field indicates the capacity of the container.
	 * @param strPolicyLimitDays Specifies the maximum number of days that the insurance policy will cover.
	 */
	public void setContainerVolume (String strPolicyLimitDays) 
	{
		NM containerVolume  = (NM)getDataElement(644);
		containerVolume.setValue(strPolicyLimitDays);
		setContainerVolume(containerVolume);
	}

	/**
	 * Set the Container Volume.
	 * This field indicates the capacity of the container.
	 * @param objcontainerVolume Object of Container Volume.
	 */
	public void setContainerVolume(NM objcontainerVolume)
	{
		setDataType(644,objcontainerVolume);

	}

	/**
	 * Set the Derived Specimen.
	 * This field contains the codes that identify the parents and children for diagnostic studies.
	 * @param strQueryResponseStatus Use as QueryResponseStatus.
	 */
	public void setDerivedSpecimen(String strQueryResponseStatus) 
	{
		ID derivedSpecimen  = (ID)getDataElement(642);
		derivedSpecimen.setValue(strQueryResponseStatus);
		setDerivedSpecimen(derivedSpecimen);

	}

	/**
	 * Set the Derived Specimen.
	 * This field contains the codes that identify the parents and children for diagnostic studies.
	 * @param objderivedSpecimen Object of Derived Specimen.
	 */
	public void setDerivedSpecimen(ID objderivedSpecimen)
	{
		setDataType(642,objderivedSpecimen);

	}

	/**
	 * Set the Specimen Retention Time.
	 * This field contains the usual time that a specimen for this 
	 * observation is retained after the observation is completed, for the purpose of additional testing.
	 * @param strQuantity Specifies the numeric quantity or amount of an entity.
	 * @param objUnits Specifies the units in which the quantity is expressed. 
	 */
	public void setSpecimenRetentionTime(String strQuantity,CWE objUnits) 
	{
		CQ specimenRetentionTime  = (CQ)getDataElement(654);
		specimenRetentionTime.setQuantity(strQuantity);
		specimenRetentionTime.setUnits(objUnits);
		setSpecimenRetentionTime(specimenRetentionTime);
	}

	/**
	 * Set the Specimen Retention Time.
	 * This field contains the usual time that a specimen for this 
	 * observation is retained after the observation is completed, for the purpose of additional testing.
	 * @param objspecimenRetentionTime Object of Specimen Retention Time.
	 */
	public void setSpecimenRetentionTime(CQ objspecimenRetentionTime)
	{
		setDataType(654,objspecimenRetentionTime);

	}

	/**
	 * Set the Minimum Collection Volume.
	 * This field contains the amount of specimen needed by the most specimen sparing method.
	 * @param strQuantity Specifies the numeric quantity or amount of an entity.
	 * @param objUnits Specifies the units in which the quantity is expressed. 
	 */
	public void setMinimumCollectionVolume(String strQuantity,CWE objUnits) 
	{
		CQ minimumCollectionVolume  = (CQ)getDataElement(651);
		minimumCollectionVolume.setQuantity(strQuantity);
		minimumCollectionVolume.setUnits(objUnits);
		setMinimumCollectionVolume(minimumCollectionVolume);
	}

	/**
	 * Set the Minimum Collection Volume.
	 * This field contains the amount of specimen needed by the most specimen sparing method.
	 * @param objminimumCollectionVolume Object of Minimum Collection Volume.
	 */
	public void setMinimumCollectionVolume(CQ objminimumCollectionVolume)
	{
		setDataType(651,objminimumCollectionVolume);

	}

	/**
	 * Set the Normal Collection Volume.
	 * This field contains the normal specimen volume required by the lab.  
	 * @param strQuantity Specifies the numeric quantity or amount of an entity.
	 * @param objUnits Specifies the units in which the quantity is expressed. 
	 */
	public void setNormalCollectionVolume(String strQuantity,CWE objUnits) 
	{
		CQ normalCollectionVolume  = (CQ)getDataElement(650);
		normalCollectionVolume.setQuantity(strQuantity);
		normalCollectionVolume.setUnits(objUnits);
		setNormalCollectionVolume(normalCollectionVolume);
	}

	/**
	 * Set the Normal Collection Volume.
	 * This field contains the normal specimen volume required by the lab.
	 * @param objnormalCollectionVolume Object of Normal Collection Volume.
	 */
	public void setNormalCollectionVolume(CQ objnormalCollectionVolume)
	{
		setDataType(650,objnormalCollectionVolume);

	}

	/** 
	 * Set the Sequence Number Test Observation Master File.
	 * This field contains the same value as the sequence number of the associated OM1 segment.
	 * @param strPolicyLimitDays Specifies the maximum number of days that the insurance policy will cover.
	 */
	public void setSequenceNumberTestObservationMasterFile (String strPolicyLimitDays) 
	{
		NM sequenceNumberTestObservationMasterFile  = (NM)getDataElement(586);
		sequenceNumberTestObservationMasterFile.setValue(strPolicyLimitDays);
		setSequenceNumberTestObservationMasterFile(sequenceNumberTestObservationMasterFile);
	}

	/**
	 * Set the Sequence Number Test Observation Master File.
	 * This field contains the same value as the sequence number of the associated OM1 segment.
	 * @param objsequenceNumberTestObservationMasterFile Object of Sequence Number Test Observation Master File.
	 */
	public void setSequenceNumberTestObservationMasterFile(NM objsequenceNumberTestObservationMasterFile)
	{
		setDataType(586,objsequenceNumberTestObservationMasterFile);

	}

	/**
	 * Add the Specimen Priorities.
	 * This field contains the allowed priorities for obtaining the specimen.  
	 * @param strCharacterSet Specifies the character set for the entire message.Suggested Values ASCII,8859/1 ...
	 * 							[Refer Table No 0211]. 
	 */
	public void addSpecimenPriorities(String strCharacterSet) 
	{
		ID specimenPriorities  = (ID)getDataElement(653);
		specimenPriorities.setValue(strCharacterSet); 
		addSpecimenPriorities(specimenPriorities);
	}

	/**
	 * Add the Specimen Priorities.
	 * This field contains the allowed priorities for obtaining the specimen.
	 * @param objspecimenPriorities Object of Specimen Priorities.
	 */
	public void addSpecimenPriorities(ID objspecimenPriorities)
	{
		addDataType(653,objspecimenPriorities);
	}

	/**
	 * Set the Specimen Priorities.
	 * This field contains the allowed priorities for obtaining the specimen.
	 * @param objspecimenPrioritiesList List of Specimen Priorities.
	 */
	@SuppressWarnings("unchecked")
	public void setSpecimenPriorities(ISingleCollection<ID> objspecimenPrioritiesList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objspecimenPrioritiesList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(653,objCollection);
	}
	
	/**
	 * Add the Specimen Handling Code.
	 * This describes how the specimen and/or container need to be handled from the time of collection through the initiation of testing.
	 * @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 addSpecimenHandlingCode (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(1908);
		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);
		addSpecimenHandlingCode(cwe);

	} 

	/** 
	 * Add the Specimen Handling Code.
	 * This describes how the specimen and/or container need to be handled from the time of collection through the initiation of testing.
	 * @param objSpecimenHandlingCode Object of Specimen Handling Code.
	 */ 
	public void addSpecimenHandlingCode(CWE objSpecimenHandlingCode)
	{
		addDataType(1908,objSpecimenHandlingCode);

	} 

	/** 
	 * Set the Specimen Handling Code.
	 * This describes how the specimen and/or container need to be handled from the time of collection through the initiation of testing.
	 * @param objSpecimenHandlingCodeList List of Specimen Handling Code.
	 */ 
	@SuppressWarnings("unchecked")
	public void setSpecimenHandlingCode(ISingleCollection<CWE> objSpecimenHandlingCodeList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objSpecimenHandlingCodeList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(1908,objCollection);
	}
	
	/**
	 * Set the Specimen Preference.
	 * This field indicates whether the Specimen/Attribute is Preferred or alternate for collection of the specimen.  
	 * @param strSpecimenPreference String to be passed as  Specimen Preference
	 */ 
	public void setSpecimenPreference (String strSpecimenPreference) 
	{
		ID SpecimenPreference  = (ID)getDataElement(3311);
		SpecimenPreference.setValue(strSpecimenPreference); 
		setSpecimenPreference(SpecimenPreference);

	} 

	/** 
	 * Set the Specimen Preference.
	 * This field indicates whether the Specimen/Attribute is Preferred or alternate for collection of the specimen.  
	 * @param objSpecimenPreference Object of Specimen Preference.
	 */ 
	public void setSpecimenPreference(ID objSpecimenPreference)
	{
		setDataType(3311,objSpecimenPreference);

	}
	
	/**
	 * Set the Preferred Specimen/Attribture Sequence ID.
	 * This field contains the value of the sequence number of the Preferred Specimen that these specimens are the alternative for.
	 * @param strPreferredSpecimenAttribtureSequenceID String to be passed as Preferred Specimen/Attribture Sequence ID
	 */ 
	public void setPreferredSpecimenAttribtureSequenceID (String strPreferredSpecimenAttribtureSequenceID) 
	{
		NM PreferredSpecimenAttribtureSequenceID  = (NM)getDataElement(3312);
		PreferredSpecimenAttribtureSequenceID.setValue(strPreferredSpecimenAttribtureSequenceID); 
		setPreferredSpecimenAttribtureSequenceID(PreferredSpecimenAttribtureSequenceID);

	} 

	/** 
	 * Set the Preferred Specimen/Attribture Sequence ID.
	 * This field contains the value of the sequence number of the Preferred Specimen that these specimens are the alternative for.
	 * @param objPreferredSpecimenAttribtureSequenceID Object of Preferred Specimen/Attribture Sequence ID.
	 */ 
	public void setPreferredSpecimenAttribtureSequenceID(NM objPreferredSpecimenAttribtureSequenceID)
	{
		setDataType(3312,objPreferredSpecimenAttribtureSequenceID);

	}
	
	/**
	 * Add the Taxonomic Classification Code.
	 * The species of living organism. This may include the common or scientific name, based on the coding system(s) used.
	 * @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 addTaxonomicClassificationCode (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(1539);
		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);
		addTaxonomicClassificationCode(cwe);

	} 

	/** 
	 * Add the Taxonomic Classification Code.
	 * The species of living organism. This may include the common or scientific name, based on the coding system(s) used.
	 * @param objTaxonomicClassificationCode Object of Taxonomic Classification Code.
	 */ 
	public void addTaxonomicClassificationCode(CWE objTaxonomicClassificationCode)
	{
		addDataType(1539,objTaxonomicClassificationCode);

	} 

	/** 
	 * Set the Taxonomic Classification Code.
	 * The species of living organism. This may include the common or scientific name, based on the coding system(s) used.
	 * @param objTaxonomicClassificationCodeList List of Taxonomic Classification Code.
	 */ 
	@SuppressWarnings("unchecked")
	public void setTaxonomicClassificationCode(ISingleCollection<CWE> objTaxonomicClassificationCodeList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objTaxonomicClassificationCodeList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(1539,objCollection);
	}

	/**
	 * Validates HL7 Message objects .
	 * Validate method checks for validation each and every segments in side the Message object against specified message Structure. 
	 * Validation chcecks include optionality of segment or group.
	 * It also verifies the number of times segment or group is repeated in message.
	 * e.g 
	 * {PSH} while parsing PSH segment validate method will check for its mandatory presence.
	 * [PSH] in this case validate will throw exception if one tries to enter more than one PSH segment.
	 * @return boolean - true or false.
	 * @throws InvalidSegmentException Throws when Segment Validation fails.
	 */	
	@Override
	public boolean validate() throws InvalidSegmentException 
	{
		try
		{
			/*
			 * All Fields are Optional
			 */
			super.validate();

			return true;
		}
		catch(FieldMissingException ex)
		{
			throw new InvalidSegmentException(enumSegments.getValue(),ex);
		}
	}
}