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

import cdac.medinfo.sdk.hl7282.baselibs.CNE;
import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.CX;
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.ST;
import cdac.medinfo.sdk.hl7282.baselibs.XON;
import cdac.medinfo.sdk.hl7282.commoninterface.IDataType;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;
import cdac.medinfo.sdk.hl7282.exceptions.FieldMissingException;
import cdac.medinfo.sdk.hl7282.exceptions.InvalidSegmentException;
import cdac.medinfo.sdk.hl7282.utils.EnumSegments;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;

/**
 * CDM -  Charge Description Master Segment.<p>
 * The CDM segment contains the fields for identifying anything which is charged to patient
 * accounts, including procedures, services, supplies. 
 * It is intended to be used to maintain a list of valid chargeable utilization items.  
 * Its purpose is to keep billing codes synchronized between HIS, Patient Accounting, and other departmental systems.  
 * <p>Represents an HL7 CDM message segment. 
 * This segment has the following fields:</p><p>
 * CDM-1: Primary Key Value - CDM (CWE)<b>Required</b><br> 
 * CDM-2: Charge Code Alias (CWE)<b>Optional</b><br> 
 * CDM-3: Charge Description Short (ST)<b>Required</b><br> 
 * CDM-4: Charge Description Long (ST)<b>Optional</b><br> 
 * CDM-5: Description Override Indicator (CWE)<b>Optional</b><br> 
 * CDM-6: Exploding Charges (CWE)<b>Optional</b><br> 
 * CDM-7: Procedure Code (CNE)<b>Optional</b><br> 
 * CDM-8: Active/Inactive Flag (ID)<b>Optional</b><br> 
 * CDM-9: Inventory Number (CWE)<b>Optional</b><br> 
 * CDM-10: Resource Load (NM)<b>Optional</b><br> 
 * CDM-11: Contract Number (CX)<b>Optional</b><br> 
 * CDM-12: Contract Organization (XON)<b>Optional</b><br> 
 * CDM-13: Room Fee Indicator (ID)<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 CDM extends Segment   
{
	

	/**
	 * Constructs the CDM segment.
	 */
	public CDM()
	{super(EnumSegments.HL7_SEG_CDM);
	}

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

	/**
	 * Retrieves the Active Inactive Flag.
	 * This field indicates whether this is a usable CDM entry or not. 
	 * @return ID - activeInactiveFlag
	 */
	public ID getActiveInactiveFlag() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(675);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Charge Code Alias.
	 * This field contains an alternative charge code.  
	 * @return ISingleCollection<CWE> - chargeCodeAlias
	 */
	public ISingleCollection<CWE> getChargeCodeAlias() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(983);
		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 Charge Description Long.
	 * This field contains the full text description of this CDM entry.
	 * @return ST - chargeDescriptionLong
	 */
	public ST getChargeDescriptionLong() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(985);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Charge Description Short.
	 * This field contains the text abbreviations or code that is associated with this CDM entry.
	 * @return ST - chargeDescriptionShort
	 */
	public ST getChargeDescriptionShort() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(984);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Contract Number
	 * @return ISingleCollection<CX> - contractNumber
	 */
	public ISingleCollection<CX> getContractNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(992);
		ISingleCollection<CX> objDataList = new SingleCollection<CX>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				CX objCX = (CX)objDataType;
				objDataList.add(objCX);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Contract Organization.
	 * This field contains the organization with which there is a 
	 * contractual arrangement for providing the service or material used for this chargeable item.  
	 * @return ISingleCollection<XON> - contractOrganization
	 */
	public ISingleCollection<XON> getContractOrganization() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(993);
		ISingleCollection<XON> objDataList = new SingleCollection<XON>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XON objXON = (XON)objDataType;
				objDataList.add(objXON);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Description Override Indicator.
	 * This field indicates whether this CDM entry's description can be overridden or not.  
	 * @return CWE - descriptionOverrideIndicator
	 */
	public CWE getDescriptionOverrideIndicator() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(986);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Exploding Charges.
	 * This field contains the repeating occurrences for a list of other CDM entry charge codes
	 * identifying the other charges which should be generated from this CDM entry.  
	 * @return ISingleCollection<CWE> - explodingCharges
	 */
	public ISingleCollection<CWE> getExplodingCharges() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(987);
		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 Inventory Number.
	 * This optional field contains an identifying stock number, 
	 * if any, which might be used, for example, as a cross reference for materials management.
	 * @return ISingleCollection<CWE> - inventoryNumber
	 */
	public ISingleCollection<CWE> getInventoryNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(990);
		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 Primary Key Value CDM.
	 * This field contains the code assigned by the institution for the purpose of uniquely identifying the thing that can be charged.  
	 * @return CWE - primaryKeyValueCDM
	 */
	public CWE getPrimaryKeyValueCDM() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1306);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Procedure Code.
	 * @return ISingleCollection<CNE> - procedureCode
	 */
	public ISingleCollection<CNE> getProcedureCode() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(393);
		ISingleCollection<CNE> objDataList = new SingleCollection<CNE>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				CNE objCNE = (CNE)objDataType;
				objDataList.add(objCNE);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Resource Load.
	 * This field contains the Relative Value Unit (RVU) minutes and ATS,
	 * a factor related to CPT4 coding and to pricing structure for physical billing.
	 * @return NM - resourceLoad
	 */
	public NM getResourceLoad() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(991);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Room Fee Indicator.
	 * @return ID - roomFeeIndicator
	 */
	public ID getRoomFeeIndicator() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(994);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Set the Primary Key Value CDM.
	 * This field contains the code assigned by the institution for the purpose of uniquely identifying the thing that can be charged.
	 * @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 setPrimaryKeyValueCDM (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);
		setPrimaryKeyValueCDM(cwe);

	} 

	/** 
	 * Set the Primary Key Value CDM.
	 * This field contains the code assigned by the institution for the purpose of uniquely identifying the thing that can be charged.
	 * @param objprimaryKeyValueCDM Object of Primary Key Value CDM.
	 */ 
	public void setPrimaryKeyValueCDM(CWE objprimaryKeyValueCDM)
	{
		setDataType(1306,objprimaryKeyValueCDM);

	}

	/**
	 * Add the Charge Code Alias.
	 * This field contains an alternative charge code.
	 * @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 addChargeCodeAlias(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(983);
		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);
		addChargeCodeAlias(cwe);
	}

	/**
	 * Add the Charge Code Alias.
	 * This field contains an alternative charge code.
	 * @param objchargeCodeAlias Object of Charge Code Alias.
	 */
	public void addChargeCodeAlias(CWE objchargeCodeAlias)
	{
		addDataType(983,objchargeCodeAlias);
	}

	/**
	 * Set the Charge Code Alias.
	 * This field contains an alternative charge code.
	 * @param objchargeCodeAliasList List of Charge Code Alias.
	 */
	@SuppressWarnings("unchecked")
	public void setChargeCodeAlias(ISingleCollection<CWE> objchargeCodeAliasList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objchargeCodeAliasList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(983,objCollection);
	}

	/**
	 * Set the Charge Description Short.
	 * This field contains the text abbreviations or code that is associated with this CDM entry.
	 * @param strChargeDescriptionShort This field contains the text abbreviations or code that is associated with this CDM entry.
	 */ 
	public void setChargeDescriptionShort (String strChargeDescriptionShort) 
	{
		ST chargeDescriptionShort  = (ST)getDataElement(984);
		chargeDescriptionShort.setValue(strChargeDescriptionShort); 
		setChargeDescriptionShort(chargeDescriptionShort);

	} 

	/** 
	 * Set the Charge Description Short.
	 * This field contains the text abbreviations or code that is associated with this CDM entry.
	 * @param objchargeDescriptionShort Object of Charge Description Short.
	 */ 
	public void setChargeDescriptionShort(ST objchargeDescriptionShort)
	{
		setDataType(984,objchargeDescriptionShort);

	}

	/**
	 * Set the Charge Description Long.
	 * This field contains the full text description of this CDM entry.
	 * @param strChargeDescriptionLong his field contains the full text description of this CDM entry.
	 */ 
	public void setChargeDescriptionLong (String strChargeDescriptionLong) 
	{
		ST chargeDescriptionLong  = (ST)getDataElement(985);
		chargeDescriptionLong.setValue(strChargeDescriptionLong); 
		setChargeDescriptionLong(chargeDescriptionLong);

	} 

	/** 
	 * Set the Charge Description Long.
	 * This field contains the full text description of this CDM entry.
	 * @param objchargeDescriptionLong Object of Charge Description Long.
	 */ 
	public void setChargeDescriptionLong(ST objchargeDescriptionLong)
	{
		setDataType(985,objchargeDescriptionLong);

	}

	/**
	 * Set the Description Override Indicator.
	 * This field indicates whether this CDM entry's description can be overridden 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 setDescriptionOverrideIndicator (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(986);
		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);
		setDescriptionOverrideIndicator(cwe);

	} 

	/** 
	 * Set the Description Override Indicator.
	 * This field indicates whether this CDM entry's description can be overridden or not.  
	 * @param objdescriptionOverrideIndicator Object of Description Override Indicator.
	 */ 
	public void setDescriptionOverrideIndicator(CWE objdescriptionOverrideIndicator)
	{
		setDataType(986,objdescriptionOverrideIndicator);

	}

	/**
	 * Add the Exploding Charges.
	 * This field contains the repeating occurrences for a list of other CDM entry charge codes
	 * identifying the other charges which should be generated from this CDM entry.  
	* @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 addExplodingCharges(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(987);
		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);
		addExplodingCharges(cwe);
	}

	/**
	 * Add the Exploding Charges.
	 * This field contains the repeating occurrences for a list of other CDM entry charge codes
	 * identifying the other charges which should be generated from this CDM entry.
	 * @param objexplodingCharges Object of Exploding Charges.
	 */
	public void addExplodingCharges(CWE objexplodingCharges)
	{
		addDataType(987,objexplodingCharges);
	}

	/**
	 * Set the Exploding Charges.
	 * This field contains the repeating occurrences for a list of other CDM entry charge codes
	 * identifying the other charges which should be generated from this CDM entry.
	 * @param objexplodingChargesList List of Exploding Charges.
	 */
	@SuppressWarnings("unchecked")
	public void setExplodingCharges(ISingleCollection<CWE> objexplodingChargesList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objexplodingChargesList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(987,objCollection);
	}

	/**
	 * Add the Procedure Code.  
	 * @param strIdentifier Specifies sequence of characters (the code) that uniquely identifies
	 * 						 the item being referenced by the CNE.
	 * @param strText Specifies descriptive or textual name of the identifier, e.g., myocardial infarction 
	 * @param strNameOfCodingSystem Specifies the coding scheme being used in the identifier component. 
	 * @param strAlternateIdentifier Specifies the local or user seen code as described. 
	 * @param strAlternateText Specifies descriptive or textual name of the alternate identifier.  
	 * @param strNameOfAlternateCodingSystem Specifies the coding scheme being used in the alternate identifier 
	 * 											component.  
	 * @param strCodingSystemVersionID Specifies the version ID for the coding system. 
	 * @param strAlternateCodingSystemVersionID Specifies the version ID for the coding system .
	 * @param strOriginalText Specifies the original text that was available to an automated process or a human 
	 * 							before a specific code was assigned.
	 * @param strSecondAlternateIdentifier Specifies a sequence of characters that uniquely identifies the second alternate code
	 * @param strSecondAlternateText Specifies a the textual information of the second alternate code
	 * @param strNameOfSecondAltenateCodingSystem Specifies the second coding scheme being used in the identifier component.
	 * @param strSecondAlternateCodingSystemVersionID Specifies version ID of Second alternative coding system.
	 * @param strCodingSystemOID contains the ISO Object identifier for the coding system.
	 * @param strValueSetOID contains the value set from which CNE-1 is obtained 
	 * @param strValueSetVersionID contains the version of the value set identified by CNE-15. 
	 * @param strAlternateCodingSystemOID contains the ISO Object identifier for the alternate coding system
	 * @param strAlternateValueSetOID contains the value set from which CNE-4 is obtained
	 * @param strAlternateValueSetVersionID contains the version of the value set identified by CNE-18. 
	 * @param strSecondAlternateCodingSystemOID contains the value set from which CNE-12 is obtained
	 * @param strSecondAlternateValueSetOID contains the value set from which CNE-10 is obtained
	 * @param strSecondAlternateValueSetVersionID contains the version of the value set identified by CNE-21. 
	 */
	public void addProcedureCode (String strIdentifier,String strText,String strNameOfCodingSystem,String strAlternateIdentifier,
			String strAlternateText,String strNameOfAlternateCodingSystem,String strCodingSystemVersionID,
			String strAlternateCodingSystemVersionID,String strOriginalText, String strSecondAlternateIdentifier, String strSecondAlternateText,
			String strNameOfSecondAltenateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, 
			String strValueSetOID, String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID,
			String strAlternateValueSetVersionID, String strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID,
			String strSecondAlternateValueSetVersionID)
	{
		CNE cne  = (CNE)getDataElement(393);
		cne.setIdentifier(strIdentifier);
		cne.setText(strText);
		cne.setNameOfCodingSystem(strNameOfCodingSystem);
		cne.setAlternateIdentifier(strAlternateIdentifier);
		cne.setAlternateText(strAlternateText);
		cne.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem);
		cne.setCodingSystemVersionID(strCodingSystemVersionID);
		cne.setAlternateCodingSystemVersionID(strAlternateCodingSystemVersionID);
		cne.setOriginalText(strOriginalText); 
		cne.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cne.setSecondAlternateText(strSecondAlternateText);
		cne.setNameofSecondAlternateCodingSystem(strNameOfSecondAltenateCodingSystem);
		cne.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cne.setCodingSystemOID(strCodingSystemOID);
		cne.setValueSetOID(strValueSetOID);
		cne.setValueSetVersionID(strValueSetVersionID);
		cne.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cne.setAlternateValueSetOID(strAlternateValueSetOID);
		cne.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cne.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cne.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cne.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		addProcedureCode(cne);
	}

	/**
	 * Add the Procedure Code.  
	 * @param objprocedureCode Object of Procedure Code.  
	 */
	public void addProcedureCode(CNE objprocedureCode)
	{
		addDataType(393,objprocedureCode);
	}

	/**
	 * Set the Procedure Code.  
	 * @param objprocedureCodeList List of Procedure Code.  
	 */
	@SuppressWarnings("unchecked")
	public void setProcedureCode(ISingleCollection<CNE> objprocedureCodeList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objprocedureCodeList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(393,objCollection);
	}

	/**
	 * Set the Active Inactive Flag.
	 * This field indicates whether this is a usable CDM entry or not.  
	 * @param strActiveInactiveFlag This field indicates whether this is a usable CDM entry.  
	 */ 
	public void setActiveInactiveFlag (String strActiveInactiveFlag) 
	{
		ID activeInactiveFlag  = (ID)getDataElement(675);
		activeInactiveFlag.setValue(strActiveInactiveFlag); 
		setActiveInactiveFlag(activeInactiveFlag);

	} 

	/** 
	 * Set the Active Inactive Flag.
	 * This field indicates whether this is a usable CDM entry or not.  
	 * @param objactiveInactiveFlag Object of Active Inactive Flag. 
	 */ 
	public void setActiveInactiveFlag(ID objactiveInactiveFlag)
	{
		setDataType(675,objactiveInactiveFlag);

	}

	/**
	 * Add the Inventory Number.
	 * This optional field contains an identifying stock number, 
	 * if any, which might be used, for example, as a cross reference for materials management.
	* @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 addInventoryNumber(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(990);
		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);
		addInventoryNumber(cwe);
	}

	/**
	 * Add the Inventory Number.
	 * This optional field contains an identifying stock number, 
	 * if any, which might be used, for example, as a cross reference for materials management.
	 * @param objinventoryNumber Object of Inventory Number.
	 */
	public void addInventoryNumber(CWE objinventoryNumber)
	{
		addDataType(990,objinventoryNumber);
	}

	/**
	 * Set the Inventory Number.
	 * This optional field contains an identifying stock number, 
	 * if any, which might be used, for example, as a cross reference for materials management.
	 * @param objinventoryNumberList List of Inventory Number.
	 */
	@SuppressWarnings("unchecked")
	public void setInventoryNumber(ISingleCollection<CWE> objinventoryNumberList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objinventoryNumberList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(990,objCollection);
	}

	/**
	 * Set the Resource Load.
	 * This field contains the Relative Value Unit (RVU) minutes and ATS,
	 * a factor related to CPT4 coding and to pricing structure for physical billing.
	 * @param strResourceLoad This field contains the Relative Value Unit (RVU) minutes and ATS, 
	 * a factor related to CPT4 coding and to pricing structure for physical billing.
	 */ 
	public void setResourceLoad (String strResourceLoad) 
	{
		NM resourceLoad  = (NM)getDataElement(991);
		resourceLoad.setValue(strResourceLoad); 
		setResourceLoad(resourceLoad);

	} 

	/** 
	 * Set the Resource Load.
	 * This field contains the Relative Value Unit (RVU) minutes and ATS,
	 * a factor related to CPT4 coding and to pricing structure for physical billing.
	 * @param objresourceLoad Object of Resource Load.
	 */ 
	public void setResourceLoad(NM objresourceLoad)
	{
		setDataType(991,objresourceLoad);

	}

	/**
	 * Add the Contract Number.
	 * @param strIDNumber Specifies the value of the identifier itself.
	 * @param strCheckDigit It is part of the identifying number used in the sending application. 
	 * @param strCheckDigitScheme Contains the code identifying the check digit scheme employed.
	 * 								Suggested Values NP,ISO,M10,M11.[Refer table No.0061].
	 * @param objAssigningAuthority The assigning authority is a unique name of the system (or organization or agency 
	 * 									or department) that creates the data. . 
	 * @param strIdentifierTypeCode Specifies a code corresponding to the type of identifier.In some cases, this code may be
	 * 								 used as a qualifier to the "Assigning authority" component.[Refer table No 0203]
	 * @param objAssigningFacility Specifies the place or location identifier where the identifier was first assigned 
	 * 									to the patient. 
	 * @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 objAssigningJurisdiction Specifies the geo-political body that assigned the identifier. 
	 * @param objAssigningAgencyOrDepartment Specifies agency or department that assigned the identifier. 
	 * @param strSecurityCheck is used to communicate the version code. 
	 * @param strSecurityCheckScheme is used to transmit information intended to validate veracity of the supplied identifier
	 */	
	public void addContractNumber(String strIDNumber,String strCheckDigit, String strCheckDigitScheme, HD objAssigningAuthority,
			String strIdentifierTypeCode,HD objAssigningFacility,String strEffectiveDate,String strExpirationDate, 
			CWE objAssigningJurisdiction, CWE objAssigningAgencyOrDepartment, String strSecurityCheck, String strSecurityCheckScheme)
	{
		CX cx  = (CX)getDataElement(992);
		cx.setIdNumber(strIDNumber);
		cx.setCheckDigit(strCheckDigit);
		cx.setCheckDigitScheme(strCheckDigitScheme);
		cx.setAssigningAuthority(objAssigningAuthority);
		cx.setIdentifierTypeCode(strIdentifierTypeCode);
		cx.setAssigningFacility(objAssigningFacility);
		cx.setEffectiveDate(strEffectiveDate);
		cx.setExpirationDate(strExpirationDate);
		cx.setAssigningJurisdiction(objAssigningJurisdiction);
		cx.setAssigningAgencyOrDepartment(objAssigningAgencyOrDepartment); 
		cx.setSecurityCheck(strSecurityCheck);
		cx.setSecurityCheckScheme(strSecurityCheckScheme); 
		addContractNumber(cx);
	}

	/**
	 * Add the Contract Number.
	 * @param objcontractNumber Object of Contract Number.
	 */
	public void addContractNumber(CX objcontractNumber)
	{
		addDataType(992,objcontractNumber);
	}

	/**
	 * Set the Contract Number.
	 * @param objcontractNumberList List of Contract Number.
	 */
	@SuppressWarnings("unchecked")
	public void setContractNumber(ISingleCollection<CX> objcontractNumberList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objcontractNumberList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(992,objCollection);
	}

	/**
	 * Add the Contract Organization.
	 * This field contains the organization with which there is a 
	 * contractual arrangement for providing the service or material used for this chargeable item.
	 * @param strOrganizationName Specifies name of the specified organization.
	 * @param objOrganizationNameTypeCode Specifies a code that represents the type of name i.e., legal name, display name.
	 * 										Suggested Values A,L,D,SL.[Refer to table No.0204]  
	 * @param objAssigningAuthority Specifies The assigning authority is a unique identifier of the system 
	 * 									(or organization or agency or department) that creates the data. 
	 * @param strIdentifierTypeCode Specifies a code corresponding to the type of identifier. 
	 * @param objAssigningFacility Specifies The place or location identifier where the identifier was first assigned to the person. 
	 * @param strNameRepresentationCode Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465] 
	 * @param strOrganizationIdentifier This component contains the sequence of characters (the code) that uniquely 
	 * 									  identifies the item being referenced by XON.1 Organization Name. 
	 * 									  This component replaces XON.3 ID Number as of v 2.5.
	 */		
	public void addContractOrganization(String strOrganizationName, CWE objOrganizationNameTypeCode,
			 HD objAssigningAuthority,
			String strIdentifierTypeCode, HD objAssigningFacility, String strNameRepresentationCode,
			String strOrganizationIdentifier)
	{
		XON xon  = (XON)getDataElement(993);
		xon.setOrganizationName(strOrganizationName);
		xon.setOrganizationNameTypeCode(objOrganizationNameTypeCode);
		xon.setAssigningAuthority(objAssigningAuthority);
		xon.setIdentifierTypeCode(strIdentifierTypeCode);
		xon.setAssigningFacility(objAssigningFacility);
		xon.setNameRepresentationCode(strNameRepresentationCode);
		xon.setOrganizationIdentifier(strOrganizationIdentifier);
		addContractOrganization(xon);
	}

	/**
	 * Add the Contract Organization.
	 * This field contains the organization with which there is a 
	 * contractual arrangement for providing the service or material used for this chargeable item.
	 * @param objcontractOrganization Object of Contract Organization.
	 */
	public void addContractOrganization(XON objcontractOrganization)
	{
		addDataType(993,objcontractOrganization);
	}

	/**
	 * Set the Contract Organization.
	 * This field contains the organization with which there is a 
	 * contractual arrangement for providing the service or material used for this chargeable item.
	 * @param objcontractOrganizationList List of Contract Organization.
	 */
	@SuppressWarnings("unchecked")
	public void setContractOrganization(ISingleCollection<XON> objcontractOrganizationList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objcontractOrganizationList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(993,objCollection);
	}

	/**
	 * Set the Room Fee Indicator.
	 * @param strRoomFeeIndicator This field contains a room fee indicator.  
	 */ 
	public void setRoomFeeIndicator (String strRoomFeeIndicator) 
	{
		ID roomFeeIndicator  = (ID)getDataElement(994);
		roomFeeIndicator.setValue(strRoomFeeIndicator); 
		setRoomFeeIndicator(roomFeeIndicator);

	} 

	/** 
	 * Set the Room Fee Indicator.
	 * @param objroomFeeIndicator Object of Room Fee Indicator.
	 */ 
	public void setRoomFeeIndicator(ID objroomFeeIndicator)
	{
		setDataType(994,objroomFeeIndicator);

	}

	/**
	 * 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 Thrown when Segment Validation Fails.
	 */
	@Override
	public boolean validate() throws InvalidSegmentException 
	{
		try 
		{
			super.validate();

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