/*******************************************************************************
 *  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 java.util.Locale;

import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.DTM;
import cdac.medinfo.sdk.hl7282.baselibs.EI;
import cdac.medinfo.sdk.hl7282.baselibs.FN;
import cdac.medinfo.sdk.hl7282.baselibs.HD;
import cdac.medinfo.sdk.hl7282.baselibs.ID;
import cdac.medinfo.sdk.hl7282.baselibs.NM;
import cdac.medinfo.sdk.hl7282.baselibs.PL;
import cdac.medinfo.sdk.hl7282.baselibs.ST;
import cdac.medinfo.sdk.hl7282.baselibs.TX;
import cdac.medinfo.sdk.hl7282.baselibs.XCN;
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.HL7Config;
import cdac.medinfo.sdk.hl7282.utils.ResourceBundleWrapper;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;

/**
 * OM7 - Additional Basic Attributes .<p>
 * The OM7 segment contains additional basic attributes that apply to the definition of most observations/services.  
 * <p>Represents an HL7 OM7 message segment. 
 * This segment has the following fields:</p><p>
 * OM7-1: Sequence Number - Test/Observation Master File (NM)<b>Required</b><br> 
 * OM7-2: Universal Service Identifier (CWE)<b>Required</b><br> 
 * OM7-3: Category Identifier (CWE)<b>Optional</b><br> 
 * OM7-4: Category Description (TX)<b>Optional</b><br> 
 * OM7-5: Category Synonym (ST)<b>Optional</b><br> 
 * OM7-6: Effective Test/Service Start Date/Time (DTM)<b>Optional</b><br> 
 * OM7-7: Effective Test/Service End Date/Time (DTM)<b>Optional</b><br> 
 * OM7-8: Test/Service Default Duration Quantity (NM)<b>Optional</b><br> 
 * OM7-9: Test/Service Default Duration Units (CWE)<b>Optional</b><br> 
 * OM7-10: Test/Service Default Frequency (CWE)<b>Optional</b><br> 
 * OM7-11: Consent Indicator (ID)<b>Optional</b><br> 
 * OM7-12: Consent Identifier (CWE)<b>Optional</b><br> 
 * OM7-13: Consent Effective Start Date/Time (DTM)<b>Optional</b><br> 
 * OM7-14: Consent Effective End Date/Time (DTM)<b>Optional</b><br> 
 * OM7-15: Consent Interval Quantity (NM)<b>Optional</b><br> 
 * OM7-16: Consent Interval Units (CWE)<b>Conditional</b><br> 
 * OM7-17: Consent Waiting Period Quantity (NM)<b>Optional</b><br> 
 * OM7-18: Consent Waiting Period Units (CWE)<b>Conditional</b><br> 
 * OM7-19: Effective Date/Time of Change (DTM)<b>Optional</b><br> 
 * OM7-20: Entered By (XCN)<b>Backward</b><br> 
 * OM7-21: Orderable-at Location (PL)<b>Backward</b><br> 
 * OM7-22: Formulary Status (CWE)<b>Optional</b><br> 
 * OM7-23: Special Order Indicator (ID)<b>Optional</b><br> 
 * OM7-24: Primary Key Value - CDM (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 OM7 extends Segment   
{
	

	/**
	 * Constructs the OM7 segment.
	 */
	public OM7()
	{super(EnumSegments.HL7_SEG_OM7);
	}

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

	/**
	 * Retrieves the Category Description.
	 * This field contains a text description for the category of the test/service item. 
	 * @return TX - categoryDescription
	 */
	public TX getCategoryDescription() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1482);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (TX)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Category Identifier.
	 * @return ISingleCollection<CWE> - categoryIdentifier
	 */
	public ISingleCollection<CWE> getCategoryIdentifier() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1481);
		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 Category Synonym.
	 * This field contains an alternate name(s) for the category of the test/service.  
	 * @return ISingleCollection<ST> - categorySynonym
	 */
	public ISingleCollection<ST> getCategorySynonym() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1483);
		ISingleCollection<ST> objDataList = new SingleCollection<ST>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				ST objST = (ST)objDataType;
				objDataList.add(objST);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Consent Effective End Date Time.
	 * This field contains the date and time the consent is no longer valid for the test/service.   
	 * @return DTM - consentEffectiveEndDateTime
	 */
	public DTM getConsentEffectiveEndDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1492);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Consent Effective Start Date Time.
	 * This field contains the date and time the consent is valid for the service item.
	 * @return DTM - consentEffectiveStartDateTime
	 */
	public DTM getConsentEffectiveStartDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1491);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Consent Identifier.
	 * This field contains the identifier for the consent specified for the service item. 
	 * @return CWE - consentIdentifier
	 */
	public CWE getConsentIdentifier() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1490);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Consent Indicator.
	 * This field indicates if a consent is needed for the service item.
	 * @return ID - consentIndicator
	 */
	public ID getConsentIndicator() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1489);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Consent Interval Quantity.
	 * This field specify the period of time for which a consent is valid for a specific service item.
	 * @return NM - consentIntervalQuantity
	 */
	public NM getConsentIntervalQuantity() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1493);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Consent Interval Units.
	 * This field specify the unit of time for OM7-15 - Consent Interval Quantity.  
	 * @return CWE - consentIntervalUnits
	 */
	public CWE getConsentIntervalUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1494);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Consent Waiting Period Quantity.
	 * This field contains the time period between the time the consent is signed and the procedure can be performed.
	 * @return NM - consentWaitingPeriodQuantity
	 */
	public NM getConsentWaitingPeriodQuantity() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1495);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Consent Waiting Period Units.
	 * This field specify the unit of time for OM7-17 - Consent Waiting Period Quantity. 
	 * @return CWE - consentWaitingPeriodUnits
	 */
	public CWE getConsentWaitingPeriodUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1496);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Effective Date Time Of Change.
	 * This field contains the date and time of the last change in the test procedure that would make previous results incompatible with new results. 
	 * @return DTM - effectiveDateTimeOfChange
	 */
	public DTM getEffectiveDateTimeOfChange() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(607);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Effective Test Service End Date Time.
	 * This field contains the date and time that the service item is no longer authorized to be ordered, performed, etc.
	 * @return DTM - effectiveTestServiceEndDateTime
	 */
	public DTM getEffectiveTestServiceEndDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1485);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Effective Test Service Start Date Time.
	 * This field contains the date and time that the service item is available to be ordered, performed, etc.
	 * @return DTM - effectiveTestServiceStartDateTime
	 */
	public DTM getEffectiveTestServiceStartDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1484);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Entered By.
	 * This field contains the identity of the person who actually keyed the service item into the application.
	 * @return XCN - enteredBy
	 */
	public XCN getEnteredBy() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(224);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (XCN)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Formulary Status.
	 * This field indicates whether the service (pharmaceutical) is in the formulary or not. 
	 * @return CWE - formularyStatus
	 */
	public CWE getFormularyStatus() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1498);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Orderable At Location.
	 * This field contains the location(s) where the test/service can be ordered.
	 * @return ISingleCollection<PL> - orderableAtLocation
	 */
	public ISingleCollection<PL> getOrderableAtLocation() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1497);
		ISingleCollection<PL> objDataList = new SingleCollection<PL>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				PL objPL = (PL)objDataType;
				objDataList.add(objPL);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Primary Key Value CDM.
	 * This field associate a Service/Test/Observation item with a CIM (charge item master).
	 * @return ISingleCollection<CWE> - primaryKeyValueCDM
	 */
	public ISingleCollection<CWE> getPrimaryKeyValueCDM() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1306);
		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 Sequence Number Test Observation Master File.
	 * This field contains the value as the sequence number. 
	 * @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 Order Indicator.
	 * This field indicates whether the service (pharmaceutical) is a special order or not.
	 * @return ID - specialOrderIndicator
	 */
	public ID getSpecialOrderIndicator() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1499);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Test Service Default Duration Quantity.
	 * This field indicates the default duration quantity for the service.
	 * @return NM - testServiceDefaultDurationQuantity
	 */
	public NM getTestServiceDefaultDurationQuantity() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1486);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Test Service Default Duration Units.
	 * This field indicates the default duration units for the service.
	 * @return CWE - testServiceDefaultDurationUnits
	 */
	public CWE getTestServiceDefaultDurationUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1487);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Test Service Default Frequency.
	 * This field indicates the default frequency (how often) the service would be ordered for or performed on.
	 * @return CWE - testServiceDefaultFrequency
	 */
	public CWE getTestServiceDefaultFrequency() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1488);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Universal Service Identifier.
	 * This field contains the producer's usual or preferred identification of the test or service.
	 * @return CWE - universalServiceIdentifier
	 */
	public CWE getUniversalServiceIdentifier() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(238);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Set the Sequence Number Test Observation Master File.
	 * This field contains the value as the sequence number. 
	 * @param strSequenceNumberTestObservationMasterFile This field contains the value as the sequence number. 
	 */ 
	public void setSequenceNumberTestObservationMasterFile (String strSequenceNumberTestObservationMasterFile ) 
	{
		NM sequenceNumberTestObservationMasterFile  = (NM)getDataElement(586);
		sequenceNumberTestObservationMasterFile.setValue(strSequenceNumberTestObservationMasterFile); 
		setSequenceNumberTestObservationMasterFile(sequenceNumberTestObservationMasterFile);

	} 

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

	}

	/**
	 * Set the Universal Service Identifier.
	 * This field contains the producer's usual or preferred identification of the test or service.
	 * @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 setUniversalServiceIdentifier  (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(238);
		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); 
		setUniversalServiceIdentifier(cwe);

	} 

	/** 
	 * Set the Universal Service Identifier.
	 * This field contains the producer's usual or preferred identification of the test or service.
	 * @param objuniversalServiceIdentifier Object of Universal Service Identifier.
	 */ 
	public void setUniversalServiceIdentifier(CWE objuniversalServiceIdentifier)
	{
		setDataType(238,objuniversalServiceIdentifier);

	}

	/**
	 * Add the Category Identifier.
	 * @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 addCategoryIdentifier (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(1481);
		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);
		addCategoryIdentifier(cwe);
	}

	/**
	 * Add the Category Identifier.
	 * @param objcategoryIdentifier Object of Category Identifier.
	 */
	public void addCategoryIdentifier(CWE objcategoryIdentifier)
	{
		addDataType(1481,objcategoryIdentifier);
	}

	/**
	 * Set the Category Identifier.
	 * @param objcategoryIdentifierList List of Category Identifier.
	 */
	@SuppressWarnings("unchecked")
	public void setCategoryIdentifier(ISingleCollection<CWE> objcategoryIdentifierList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objcategoryIdentifierList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(1481,objCollection);
	}

	/**
	 * Set the Category Description.
	 * This field contains a text description for the category of the test/service item. 
	 * @param strCategoryDescription Use as CategoryDescription.
	 */ 
	public void setCategoryDescription (String strCategoryDescription) 
	{
		TX categoryDescription  = (TX)getDataElement(1482); 
		categoryDescription.setValue(strCategoryDescription); 
		setCategoryDescription(categoryDescription);

	} 

	/** 
	 * Set the Category Description.
	 * This field contains a text description for the category of the test/service item. 
	 * @param objcategoryDescription Object of Category Description.
	 */ 
	public void setCategoryDescription(TX objcategoryDescription)
	{
		setDataType(1482,objcategoryDescription);

	}

	/**
	 * Add the Category Synonym.
	 * This field contains an alternate name(s) for the category of the test/service.  
	 * @param strCategorySynonym The string value of Category Synonym
	 */	
	public void addCategorySynonym(String strCategorySynonym) 
	{
		ST categorySynonym  = (ST)getDataElement(1483);
		categorySynonym.setValue(strCategorySynonym);
		addCategorySynonym(categorySynonym);
	}

	/**
	 * Add the Category Synonym.
	 * This field contains an alternate name(s) for the category of the test/service.
	 * @param objcategorySynonym OBject of Category Synonym.
	 */
	public void addCategorySynonym(ST objcategorySynonym)
	{
		addDataType(1483,objcategorySynonym);
	}

	/**
	 * Set the Category Synonym.
	 * This field contains an alternate name(s) for the category of the test/service.
	 * @param objcategorySynonymList List of Category Synonym.
	 */
	@SuppressWarnings("unchecked")
	public void setCategorySynonym(ISingleCollection<ST> objcategorySynonymList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objcategorySynonymList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(1483,objCollection);
	}

	/**
	 * Set the Effective Test Service Start Date Time.
	 * This field contains the date and time that the service item is available to be ordered, performed, etc.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setEffectiveTestServiceStartDateTime (String strTime) 
	{
		DTM effectiveTestServiceStartDateTime  = (DTM)getDataElement(1484);
		effectiveTestServiceStartDateTime.setValue(strTime);
		setEffectiveTestServiceStartDateTime(effectiveTestServiceStartDateTime);

	} 

	/** 
	 * Set the Effective Test Service Start Date Time.
	 * This field contains the date and time that the service item is available to be ordered, performed, etc.
	 * @param objeffectiveTestServiceStartDateTime Object of Effective Test Service Start Date Time.
	 */ 
	public void setEffectiveTestServiceStartDateTime(DTM objeffectiveTestServiceStartDateTime)
	{
		setDataType(1484,objeffectiveTestServiceStartDateTime);

	}

	/**
	 * Set the Effective Test Service End Date Time.
	 * This field contains the date and time that the service item is no longer authorized to be ordered, performed, etc.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setEffectiveTestServiceEndDateTime (String strTime) 
	{
		DTM effectiveTestServiceEndDateTime  = (DTM)getDataElement(1485);
		effectiveTestServiceEndDateTime.setValue(strTime);
		setEffectiveTestServiceEndDateTime(effectiveTestServiceEndDateTime);

	} 

	/** 
	 * Set the Effective Test Service End Date Time.
	 * This field contains the date and time that the service item is no longer authorized to be ordered, performed, etc.
	 * @param objeffectiveTestServiceEndDateTime Object of Effective Test Service End Date Time.
	 */ 
	public void setEffectiveTestServiceEndDateTime(DTM objeffectiveTestServiceEndDateTime)
	{
		setDataType(1485,objeffectiveTestServiceEndDateTime);

	}

	/**
	 * Set the Test Service Default Duration Quantity.
	 * This field indicates the default duration quantity for the service.
	 * @param strTestServiceDefaultDurationQuantity This field contains the string value of Test Service Default Duration Quantity . 
	 */
	public void setTestServiceDefaultDurationQuantity (String strTestServiceDefaultDurationQuantity ) 
	{
		NM testServiceDefaultDurationQuantity  = (NM)getDataElement(1486);
		testServiceDefaultDurationQuantity .setValue(strTestServiceDefaultDurationQuantity);
		setTestServiceDefaultDurationQuantity(testServiceDefaultDurationQuantity);
	}

	/**
	 * Set the Test Service Default Duration Quantity.
	 * This field indicates the default duration quantity for the service.
	 * @param objtestServiceDefaultDurationQuantity OBject of Test Service Default Duration Quantity.
	 */
	public void setTestServiceDefaultDurationQuantity(NM objtestServiceDefaultDurationQuantity)
	{
		setDataType(1486,objtestServiceDefaultDurationQuantity);

	}

	/**
	 * Set the Test Service Default Duration Units.
	 * This field indicates the default duration units for the service.
	 * @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 setTestServiceDefaultDurationUnits  (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(1487);
		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); 
		setTestServiceDefaultDurationUnits(cwe);

	} 

	/** 
	 * Set the Test Service Default Duration Units.
	 * This field indicates the default duration units for the service.
	 * @param objtestServiceDefaultDurationUnits Object of Test Service Default Duration Units.
	 */ 
	public void setTestServiceDefaultDurationUnits(CWE objtestServiceDefaultDurationUnits)
	{
		setDataType(1487,objtestServiceDefaultDurationUnits);

	}

	/**
	 * Set the Test Service Default Frequency.
	 * This field indicates the default frequency (how often) the service would be ordered for or performed on.
	 * @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 setTestServiceDefaultFrequency (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(1488);
		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);
		setTestServiceDefaultFrequency(cwe);
	}

	/**
	 * Set the Test Service Default Frequency.
	 * This field indicates the default frequency (how often) the service would be ordered for or performed on.
	 * @param objtestServiceDefaultFrequency Object of Test Service Default Frequency.
	 */
	public void setTestServiceDefaultFrequency(CWE objtestServiceDefaultFrequency)
	{
		setDataType(1488,objtestServiceDefaultFrequency);

	}

	/**
	 * Set the Consent Indicator.
	 * This field indicates if a consent is needed for the service item.
	 * @param strConsentIndicator This field indicates if a consent is needed for the service item.
	 */ 
	public void setConsentIndicator (String strConsentIndicator) 
	{
		ID consentIndicator  = (ID)getDataElement(1489);
		consentIndicator.setValue(strConsentIndicator); 
		setConsentIndicator(consentIndicator);

	} 

	/** 
	 * Set the Consent Indicator.
	 * This field indicates if a consent is needed for the service item.
	 * @param objconsentIndicator Object of Consent Indicator.
	 */ 
	public void setConsentIndicator(ID objconsentIndicator)
	{
		setDataType(1489,objconsentIndicator);

	}

	/**
	 * Set the Consent Identifier.
	 * This field contains the identifier for the consent specified for the service item. 
	 * @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 setConsentIdentifier  (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(1490);
		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);
		setConsentIdentifier(cwe);

	} 

	/** 
	 * Set the Consent Identifier.
	 * This field contains the identifier for the consent specified for the service item. 
	 * @param objconsentIdentifier Object of Consent Identifier.
	 */ 
	public void setConsentIdentifier(CWE objconsentIdentifier)
	{
		setDataType(1490,objconsentIdentifier);

	}

	/**
	 * Set the Consent Effective Start Date Time.
	 * This field contains the date and time the consent is valid for the service item.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setConsentEffectiveStartDateTime (String strTime) 
	{
		DTM consentEffectiveStartDateTime  = (DTM)getDataElement(1491);
		consentEffectiveStartDateTime.setValue(strTime);
		setConsentEffectiveStartDateTime(consentEffectiveStartDateTime);

	} 

	/** 
	 * Set the Consent Effective Start Date Time.
	 * This field contains the date and time the consent is valid for the service item.
	 * @param objconsentEffectiveStartDateTime OBject of Consent Effective Start Date Time.
	 */ 
	public void setConsentEffectiveStartDateTime(DTM objconsentEffectiveStartDateTime)
	{
		setDataType(1491,objconsentEffectiveStartDateTime);

	}

	/**
	 * Set the Consent Effective End Date Time.
	 * This field contains the date and time the consent is no longer valid for the test/service.   
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setConsentEffectiveEndDateTime (String strTime) 
	{
		DTM consentEffectiveEndDateTime  = (DTM)getDataElement(1492);
		consentEffectiveEndDateTime.setValue(strTime);
		setConsentEffectiveEndDateTime(consentEffectiveEndDateTime);

	} 

	/** 
	 * Set the Consent Effective End Date Time.
	 * This field contains the date and time the consent is no longer valid for the test/service.
	 * @param objconsentEffectiveEndDateTime Object of Consent Effective End Date Time.
	 */ 
	public void setConsentEffectiveEndDateTime(DTM objconsentEffectiveEndDateTime)
	{
		setDataType(1492,objconsentEffectiveEndDateTime);

	}

	/**
	 * Set the Consent Interval Quantity.
	 * This field specify the period of time for which a consent is valid for a specific service item.
	 * @param strConsentIntervalQuantity This field contains the String value of Consent Interval Quantity. 
	 */ 
	public void setConsentIntervalQuantity (String strConsentIntervalQuantity ) 
	{
		NM consentIntervalQuantity  = (NM)getDataElement(1493);
		consentIntervalQuantity.setValue(strConsentIntervalQuantity);
		setConsentIntervalQuantity(consentIntervalQuantity);

	} 

	/** 
	 * Set the Consent Interval Quantity.
	 * This field specify the period of time for which a consent is valid for a specific service item.
	 * @param objconsentIntervalQuantity Object of Consent Interval Quantity.
	 */ 
	public void setConsentIntervalQuantity(NM objconsentIntervalQuantity)
	{
		setDataType(1493,objconsentIntervalQuantity);

	}

	/**
	 * Set the Consent Interval Units.
	 * This field specify the unit of time for OM7-15 - Consent Interval Quantity.  
	 * @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 setConsentIntervalUnits  (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(1494);
		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);
		setConsentIntervalUnits(cwe);

	} 

	/** 
	 * Set the Consent Interval Units.
	 * This field specify the unit of time for OM7-15 - Consent Interval Quantity.  
	 * @param objconsentIntervalUnits Object of Consent Interval Units.
	 */ 
	public void setConsentIntervalUnits(CWE objconsentIntervalUnits)
	{
		setDataType(1494,objconsentIntervalUnits);

	}

	/**
	 * Set the Consent Waiting Period Quantity.
	 * This field contains the time period between the time the consent is signed and the procedure can be performed.
	 * @param strConsentWaitingPeriodQuantity This field contains the String value of Consent Waiting Period Quantity. 
	 */ 
	public void setConsentWaitingPeriodQuantity (String strConsentWaitingPeriodQuantity) 
	{
		NM consentWaitingPeriodQuantity  = (NM)getDataElement(1495);
		consentWaitingPeriodQuantity.setValue(strConsentWaitingPeriodQuantity); 
		setConsentWaitingPeriodQuantity(consentWaitingPeriodQuantity);

	} 

	/** 
	 * Set the Consent Waiting Period Quantity.
	 * This field contains the time period between the time the consent is signed and the procedure can be performed.
	 * @param objconsentWaitingPeriodQuantity Object of Consent Waiting Period Quantity.
	 */ 
	public void setConsentWaitingPeriodQuantity(NM objconsentWaitingPeriodQuantity)
	{
		setDataType(1495,objconsentWaitingPeriodQuantity);

	}

	/**
	 * Set the Consent Waiting Period Units.
	 * This field specify the unit of time for OM7-17 - Consent Waiting Period Quantity. 
	 * @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 setConsentWaitingPeriodUnits  (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(1496);
		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);
		setConsentWaitingPeriodUnits(cwe);

	} 

	/** 
	 * Set the Consent Waiting Period Units.
	 * This field specify the unit of time for OM7-17 - Consent Waiting Period Quantity. 
	 * @param objconsentWaitingPeriodUnits Object of Consent Waiting Period Units.
	 */ 
	public void setConsentWaitingPeriodUnits(CWE objconsentWaitingPeriodUnits)
	{
		setDataType(1496,objconsentWaitingPeriodUnits);

	}

	/**
	 * Set the Effective Date Time Of Change.
	 * This field contains the date and time of the last change in the test procedure that would make previous results incompatible with new results.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setEffectiveDateTimeOfChange (String strTime) 
	{
		DTM effectiveDateTimeOfChange  = (DTM)getDataElement(607);
		effectiveDateTimeOfChange.setValue(strTime);
		setEffectiveDateTimeOfChange(effectiveDateTimeOfChange);

	} 

	/** 
	 * Set the Effective Date Time Of Change.
	 * This field contains the date and time of the last change in the test procedure that would make previous results incompatible with new results.
	 * @param objeffectiveDateTimeOfChange Object of Effective Date Time Of Change.
	 */ 
	public void setEffectiveDateTimeOfChange(DTM objeffectiveDateTimeOfChange)
	{
		setDataType(607,objeffectiveDateTimeOfChange);

	}

	/**
	 * Set the Entered By.
	 * This field contains the identity of the person who actually keyed the service item into the application. 
	 * @param strIDNumber Refers to the coded ID according to a user-defined table
	 * @param objFamilyName Specifies the surname of a person.
	 * @param strGivenName Specifies First name.
	 * @param strSecondAndFurtherGivenNamesOrInitialsThereof Specifies multiple middle names that may be included by 
	 * 														   separating them with spaces.
	 * @param strSuffix Used to specify a name suffix (e.g., Jr. or III).
	 * @param strPrefix Used to specify a name prefix (e.g., Dr.).
	 * @param strSourceTable Used as the HL7 identifier for the user-defined table of values for this component. [Refer User-defined Table 0297 - CN ID.]
	 * @param objAssigningAuthority Specifies a unique identifier of the system (or organization or agency of department)
	 * 								  that creates the data. [Refer User-defined Table 0363 - Assigning authority]
	 * @param strNameTypeCode Specifies a code that represents the type of name. 
	 * @param strIdentifierCheckDigit Specifies part of the identifying number used in the sending application. 
	 * @param strCheckDigitScheme Specifies the code identifying the check digit scheme employed.[Refer HL7 Table 0061 - Check digit scheme].
	 * @param strIdentifierTypeCode Specifies A code corresponding to the type of identifier.[Refer HL7 Table 0203 - Identifier type].
	 * @param objAssigningFacility Specifies the place or location identifier where the identifier was first assigned to the person
	 * @param strNameRepresentationCode Provides an indication of the representation provided by the data item.  
	 * @param objNameContext Designates the context in which a name is used. [Refer User-defined Table 0448 ]
	 * @param strNameAssemblyOrder Specifies a code that represents the preferred display order of the components of this person name. Suggested values are G,F[Refer table 0444.]
	 * @param strEffectiveDate Specifies the first date, if known, on which the address is valid and active.
	 * @param strExpirationDate Specifies the last date, if known, on which the address is valid and active.
	 * @param strProfessionalSuffix Used to specify an abbreviation, or a string of abbreviations, denoting qualifications that support the person's profession, (e.g., licenses).
	 * @param objAssigningJurisdiction Specifies the geo-political body that assigned the identifier.
	 * @param objAssigningAgencyOrDepratment Specifies the agency or department that assigned the identifier
	 * @param strSecurityCheck Specifies the version code that may be assigned to the person identifier
	 * @param strSecurityCheckScheme Specifies the check digit scheme.
	 */ 
	public void setEnteredBy (String strIDNumber,FN objFamilyName,String strGivenName,String strSecondAndFurtherGivenNamesOrInitialsThereof,
			String 	strSuffix,String strPrefix,CWE objSourceTable,HD objAssigningAuthority,
			String strNameTypeCode,String strIdentifierCheckDigit,String strCheckDigitScheme,String strIdentifierTypeCode,
			HD objAssigningFacility,String strNameRepresentationCode,CWE objNameContext,
			String strNameAssemblyOrder, String strEffectiveDate,String strExpirationDate,String strProfessionalSuffix,
			CWE objAssigningJurisdiction,CWE objAssigningAgencyOrDepratment, String strSecurityCheck, String strSecurityCheckScheme)
	{
		XCN xcn  = (XCN)getDataElement(224);
		xcn.setIdNumber(strIDNumber);
		xcn.setFamilyName(objFamilyName);
		xcn.setGivenName(strGivenName);
		xcn.setSecondNameOrInitials(strSecondAndFurtherGivenNamesOrInitialsThereof);
		xcn.setSuffix(strSuffix);
		xcn.setPrefix(strPrefix);
 
		xcn.setSourceTable(objSourceTable);
		xcn.setAssigningAuthority(objAssigningAuthority);
		xcn.setNameTypeCode(strNameTypeCode);
		xcn.setIdentifierCheckDigit(strIdentifierCheckDigit);
		xcn.setCheckDigitScheme(strCheckDigitScheme);
		xcn.setIdentifierTypeCode(strIdentifierTypeCode);
		xcn.setAssigningFacility(objAssigningFacility);
		xcn.setNameRepresentationCode(strNameRepresentationCode);
		xcn.setNameContext(objNameContext);
 
		xcn.setNameAssemblyOrder(strNameAssemblyOrder);
		xcn.setEffectiveDate(strEffectiveDate);
		xcn.setExpirationDate(strExpirationDate);
		xcn.setProfessionalSuffix(strProfessionalSuffix);
		xcn.setAssigningJurisdiction(objAssigningJurisdiction);
		xcn.setAssigningAgencyOrDepartment(objAssigningAgencyOrDepratment); 
		xcn.setSecurityCheck(strSecurityCheck);
		xcn.setSecurityCheckScheme(strSecurityCheckScheme);
		setEnteredBy(xcn);

	} 

	/** 
	 * Set the Entered By.
	 * This field contains the identity of the person who actually keyed the service item into the application.
	 * @param objenteredBy Object of Entered By.
	 */ 
	public void setEnteredBy(XCN objenteredBy)
	{
		setDataType(224,objenteredBy);

	}

	/**
	 * Add the Orderable At Location.
	 * This field contains the location(s) where the test/service can be ordered.
	 * @param strPointOfCare Use as PointOfCare.
	 * @param strRoom Use as Room.
	 * @param strBed Use as Bed.
	 * @param objFacility Use as Facility.
	 * @param strLocationStatus Use as LocationStatus.
	 * @param strPersonLocationType Use as PersonLocationType.
	 * @param strBuilding Use as Building.
	 * @param strFloor Use as Floor.
	 * @param strLocationDescription Use as LocationDescription.
	 * @param objComprehensiveLocationIdentifier Use as ComprehensiveLocationIdentifier.
	 * @param objAssigningAuthorityForLocation Use as AssigningAuthorityForLocation.
	 */ 	
	public void addOrderableAtLocation(HD objPointOfCare, HD objRoom, HD objBed, HD objFacility,
			String strLocationStatus, String strPersonLocationType, HD objBuilding, HD objFloor, 
			String strLocationDescription, EI objComprehensiveLocationIdentifier, HD objAssigningAuthorityForLocation)
	{
		PL pl  = (PL)getDataElement(1497);
		pl.setPointOfCare(objPointOfCare);
		pl.setRoom(objRoom);
		pl.setBed(objBed);
		pl.setFacility(objFacility);
		pl.setLocationStatus(strLocationStatus);
		pl.setPersonLocationType(strPersonLocationType);
		pl.setBuilding(objBuilding);
		pl.setFloor(objFloor);
		pl.setLocationDescription(strLocationDescription);
		pl.setComprehensiveLocationIdentifier(objComprehensiveLocationIdentifier);
		pl.setAssigningAuthorityForLocation(objAssigningAuthorityForLocation); 
		addOrderableAtLocation(pl);
	}

	/**
	 * Add the Orderable At Location.
	 * This field contains the location(s) where the test/service can be ordered.
	 * @param objorderableAtLocation Object of Orderable At Location.
	 */
	public void addOrderableAtLocation(PL objorderableAtLocation)
	{
		addDataType(1497,objorderableAtLocation);
	}

	/**
	 * Set the Orderable At Location.
	 * This field contains the location(s) where the test/service can be ordered.
	 * @param objorderableAtLocationList List of Orderable At Location.
	 */
	@SuppressWarnings("unchecked")
	public void setOrderableAtLocation(ISingleCollection<PL> objorderableAtLocationList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objorderableAtLocationList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(1497,objCollection);
	}

	/**
	 * Set the Formulary Status.
	 * This field indicates whether the service (pharmaceutical) is in the formulary or not. 
	 * @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 setFormularyStatus  (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(1498);
		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); 
		setFormularyStatus(cwe);

	} 

	/** 
	 * Set the Formulary Status.
	 * This field indicates whether the service (pharmaceutical) is in the formulary or not. 
	 * @param objformularyStatus Object of Formulary Status.
	 */ 
	public void setFormularyStatus(CWE objformularyStatus)
	{
		setDataType(1498,objformularyStatus);

	}

	/**
	 * Set the Special Order Indicator.
	 * This field indicates whether the service (pharmaceutical) is a special order or not.
	 * @param strSpecialOrderIndicator This field contains the String value of Special Order Indicator.
	 */ 
	public void setSpecialOrderIndicator (String strSpecialOrderIndicator) 
	{
		ID specialOrderIndicator  = (ID)getDataElement(1499);
		specialOrderIndicator.setValue(strSpecialOrderIndicator); 
		setSpecialOrderIndicator(specialOrderIndicator);

	} 

	/** 
	 * Set the Special Order Indicator.
	 * This field indicates whether the service (pharmaceutical) is a special order or not.
	 * @param objspecialOrderIndicator Object of Special Order Indicator.
	 */ 
	public void setSpecialOrderIndicator(ID objspecialOrderIndicator)
	{
		setDataType(1499,objspecialOrderIndicator);

	}

	/**
	 * Add the Primary Key Value CDM.
	 * This field associate a Service/Test/Observation item with a CIM (charge item master).
	 * @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 addPrimaryKeyValueCDM (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(1306);
		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);
		addPrimaryKeyValueCDM(cwe);
	}

	/**
	 * Add the Primary Key Value CDM.
	 * This field associate a Service/Test/Observation item with a CIM (charge item master).
	 * @param objprimaryKeyValueCDM Object of Primary Key Value CDM.
	 */
	public void addPrimaryKeyValueCDM(CWE objprimaryKeyValueCDM)
	{
		addDataType(1306,objprimaryKeyValueCDM);
	}

	/**
	 * Set the Primary Key Value CDM.
	 * This field associate a Service/Test/Observation item with a CIM (charge item master).
	 * @param objprimaryKeyValueCDMList List of Primary Key Value CDM.
	 */
	@SuppressWarnings("unchecked")
	public void setPrimaryKeyValueCDM(ISingleCollection<CWE> objprimaryKeyValueCDMList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objprimaryKeyValueCDMList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(1306,objCollection);
	}

	/**
	 * Validates HL7 Message objects .
	 * Validate method checks for validation each and every segments in side the Message object against specified message Structure. 
	 * Validation checks 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
		{

			super.validate();
			/*
			 * Consent Interval Units   
			 * If Consent Interval Quantity is specified, then Consent Interval Unit is required
			 */
			NM consentIntervalQuantity = getConsentIntervalQuantity();
			CWE consentIntervalUnits = getConsentIntervalUnits();
			NM consentWaitingPeriodQuantity = getConsentWaitingPeriodQuantity();
			CWE consentWaitingPeriodUnits = getConsentWaitingPeriodUnits();

			if((consentIntervalQuantity != null)&&(consentIntervalUnits == null))
			{
				String strMessage = objSegmentMap.getFieldName(1494) + ":" + objSegmentMap.getFieldName(1493) + ResourceBundleWrapper.getValue("exceptions", "SegmentCondition", new Locale(HL7Config.createInstance().getLocale()));
				
					throw new FieldMissingException(strMessage);
			}

			/*
			 * Consent Waiting Period Unit      
			 * If Consent Waiting Period Quantity is specified, then Consent Waiting Period Unit is required.
			 */
			if((consentWaitingPeriodQuantity != null)&&(consentWaitingPeriodUnits == null))
			{
				String strMessage = objSegmentMap.getFieldName(1496) + ":" + objSegmentMap.getFieldName(1495) + ResourceBundleWrapper.getValue("exceptions", "SegmentCondition", new Locale(HL7Config.createInstance().getLocale()));
				
					throw new FieldMissingException(strMessage);
			}

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