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

import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.EI;
import cdac.medinfo.sdk.hl7282.baselibs.ID;
import cdac.medinfo.sdk.hl7282.baselibs.NM;
import cdac.medinfo.sdk.hl7282.baselibs.ST;
import cdac.medinfo.sdk.hl7282.commoninterface.IDataType;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;
import cdac.medinfo.sdk.hl7282.utils.EnumSegments;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;


/**
 * OCM - Additional Basic Attributes .<p>
 * The OCM segment contains additional basic attributes that apply to the definition of most observations/services.  
 * <p>Represents an HL7 OCM message segment. 
 * This segment has the following fields:</p><p>
 * OCM-1: Sequence Number - Test/Observation Master File (NM)<b>Optional</b><br> 
 * OCM-2: Segment Action Code (ID)<b>C(R/O)</b><br> 
 * OCM-3: Segment Unique Key (EI)<b>C(R/O)</b><br> 
 * OCM-4: Clinical Information Request (CWE)<b>Required</b><br> 
 * OCM-5: Collection Event/Process Step (CWE)<b>Required</b><br> 
 * OCM-6: Communication Location (CWE)<b>Required</b><br> 
 * OCM-7: Answer Required (ID)<b>Optional</b><br> 
 * OCM-8: Hint/Help Text (ST)<b>Optional</b><br> 
 * OCM-9: Type of Answer (Varies)<b>Optional</b><br> 
 * OCM-10: Multiple Answers Allowed (ID)<b>Optional</b><br> 
 * OCM-11: Answer Choices (CWE)<b>Optional</b><br> 
 * OCM-12: Character Limit (NM)<b>Optional</b><br> 
 * OCM-13: Number of Decimals (NM)<b>Optional</b><br> 
 * This class provides mechanism to validate message against HL7 v 2.8.2 standard.
 * The class provides accessors & mutators for the elements mentioned above.
 * The class has validate method which validates Message against HL7 v 2.8.2 standard.
 *
 * <p>User can also create Segment through {@link SegmentFactory}
 */
public class OMC extends Segment   
{
	

	/**
	 * Constructs the OMC segment.
	 */
	public OMC()
	{super(EnumSegments.HL7_SEG_OMC);}
	
	
	/**
	 * Retrieves the Sequence Number - Test/Observation Master File.
	 * This field contains the same value as the sequence number of the associated OM1 segment.
	 * @return NM - SequenceNumberTestObservationMasterFile
	 */
	public NM getSequenceNumberTestObservationMasterFile() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(586);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Sequence Number - Test/Observation Master File.
	 * This field contains the same value as the sequence number of the associated OM1 segment.
	 * @param strSequenceNumberTestObservationMasterFile This field contains the String value of Sequence Number - Test/Observation Master File. 
	 */ 
	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 same value as the sequence number of the associated OM1 segment.
	 * @param objSequenceNumberTestObservationMasterFile Object of Sequence Number - Test/Observation Master File.
	 */ 
	public void setSequenceNumberTestObservationMasterFile(NM objSequenceNumberTestObservationMasterFile)
	{
		setDataType(586,objSequenceNumberTestObservationMasterFile);
	}
	
	/**
	 * Retrieves the Segment Action Code.
	 * This field indicates whether this repetition of the segment is being added, changed or deleted.
	 * @return ID - SegmentActionCode
	 */
	public ID getSegmentActionCode() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(763);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Segment Action Code.
	 * This field indicates whether this repetition of the segment is being added, changed or deleted.
	 * @param strSegmentActionCode This field indicates whether this repetition of the segment is being added, changed or deleted.
	 */ 
	public void setSegmentActionCode (String strSegmentActionCode) 
	{
		ID SegmentActionCode  = (ID)getDataElement(763);
		SegmentActionCode.setValue(strSegmentActionCode); 
		setSegmentActionCode(SegmentActionCode);

	} 

	/** 
	 * Set the Segment Action Code.
	 * This field indicates whether this repetition of the segment is being added, changed or deleted.
	 * @param objSegmentActionCode Object of Segment Action Code.
	 */ 
	public void setSegmentActionCode(ID objSegmentActionCode)
	{
		setDataType(763,objSegmentActionCode);
	}
	
	/**
	 * Retrieves the Segment Unique Key.
	 * This field contains a unique identifier for one of the multiple repetitions of this segment, to be used in conjunction with the preceding field.  
	 * @return EI - SegmentUniqueKey
	 */
	public EI getSegmentUniqueKey() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(764);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EI)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Segment Unique Key.
	 * This field contains a unique identifier for one of the multiple repetitions of this segment, to be used in conjunction with the preceding field.  
	 * @param strEntityIdentifier Specifies defined by a hierarchic designator, represented by components 2 through 4.
	 * 								[Reference Section 2.A.33, "HD - hierarchic designator".] 
	 * @param strNamespaceId Specifies  the HL7 identifier for the user-defined table of values for this component.
	 * 						   [Refer to User-defined Table 0363 - Assigning authority] 	 
	 * @param strUniversalId Specifies string formatted according to the scheme defined by the component, 
	 * 							<universal ID type> (UID type). 
	 * @param strUniversalIdType Specifies  the interpretation of the second component of the HD. 
	 */ 
	public void setSegmentUniqueKey (String strEntityIdentifier,String strNamespaceId,String strUniversalId,String strUniversalIdType) 
	{
		EI SegmentUniqueKey  = (EI)getDataElement(764);
		SegmentUniqueKey.setEntityIdentifier(strEntityIdentifier);
		SegmentUniqueKey.setNamespaceId(strNamespaceId);
		SegmentUniqueKey.setUniversalId(strUniversalId);
		SegmentUniqueKey.setUniversalIdType(strUniversalIdType); 
		setSegmentUniqueKey(SegmentUniqueKey);

	} 

	/** 
	 * Set the Segment Unique Key.
	 * This field contains a unique identifier for one of the multiple repetitions of this segment, to be used in conjunction with the preceding field.  
	 * @param objSegmentUniqueKey Object of Segment Unique Key. 
	 */ 
	public void setSegmentUniqueKey(EI objSegmentUniqueKey)
	{
		setDataType(764,objSegmentUniqueKey);
	}
	
	/**
	 * Retrieves the Clinical Information Request.
	 * This field contains a variable that the diagnostic service needs to interpret the results of an ordered study.  
	 * @return CWE - ClinicalInformationRequest
	 */
	public CWE getClinicalInformationRequest() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3444);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Clinical Information Request.
	 * This field contains a variable that the diagnostic service needs to interpret the results of an ordered study.  
	 * @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 setClinicalInformationRequest(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(3444);
		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);
		setClinicalInformationRequest(cwe);

	} 

	/** 
	 * Set the Clinical Information Request.
	 * This field contains a variable that the diagnostic service needs to interpret the results of an ordered study.  
	 * @param objClinicalInformationRequest Object of Clinical Information Request.
	 */ 
	public void setClinicalInformationRequest(CWE objClinicalInformationRequest)
	{
		setDataType(3444,objClinicalInformationRequest);

	}
	
	/**
	 * Retrieves the Collection Event/Process Step Limit.
	 * This field indicates by when in the ordering process or workflow this information must be collected.  
	 * @return ISingleCollection<CWE> - CollectionEventProcessStepLimit
	 */
	public ISingleCollection<CWE> getCollectionEventProcessStepLimit() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3445);
		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;
	}
	
	/**
	 * Add the Collection Event/Process Step Limit.
	 * This field indicates by when in the ordering process or workflow this information must be collected.  
	 * @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 addCollectionEventProcessStepLimit (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(3445);
		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);
		addCollectionEventProcessStepLimit(cwe);

	} 

	/** 
	 * Add the Collection Event/Process Step Limit.
	 * This field indicates by when in the ordering process or workflow this information must be collected.  
	 * @param objCollectionEventProcessStepLimit Object of Collection Event/Process Step Limit.
	 */ 
	public void addCollectionEventProcessStepLimit(CWE objCollectionEventProcessStepLimit)
	{
		addDataType(3445,objCollectionEventProcessStepLimit);

	} 

	/** 
	 * Set the Collection Event/Process Step Limit.
	 * This field indicates by when in the ordering process or workflow this information must be collected.  
	 * @param objCollectionEventProcessStepLimitList List of Collection Event/Process Step Limit.
	 */ 
	@SuppressWarnings("unchecked")
	public void setCollectionEventProcessStepLimit(ISingleCollection<CWE> objCollectionEventProcessStepLimitList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objCollectionEventProcessStepLimitList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(3445,objCollection);
	}
	
	/**
	 * Retrieves the Communication Location.
	 * This field indicates where in the message this information is expected to be communicated, e.g. PID, OBR, and SPM).  
	 * @return CWE - CommunicationLocation
	 */
	public CWE getCommunicationLocation() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3446);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Communication Location.
	 * This field indicates where in the message this information is expected to be communicated, e.g. PID, OBR, and SPM).  
	 * @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 setCommunicationLocation(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(3446);
		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);
		setCommunicationLocation(cwe);

	} 

	/** 
	 * Set the Communication Location.
	 * This field indicates where in the message this information is expected to be communicated, e.g. PID, OBR, and SPM).  
	 * @param objCommunicationLocation Object of Communication Location.
	 */ 
	public void setCommunicationLocation(CWE objCommunicationLocation)
	{
		setDataType(3446,objCommunicationLocation);

	}
	
	/**
	 * Retrieves the Answer Required.
	 * Must the question be answered, or just displayed and can be blank.    
	 * @return ID - AnswerRequired
	 */
	public ID getAnswerRequired() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3447);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Answer Required.
	 * Must the question be answered, or just displayed and can be blank.    
	 * @param strAnswerRequired String which to set as Answer Required 
	 */ 
	public void setAnswerRequired (String strAnswerRequired)  
	{
		ID AnswerRequired  = (ID)getDataElement(3447);
		AnswerRequired.setValue(strAnswerRequired); 
		setAnswerRequired(AnswerRequired);

	} 

	/** 
	 * Set the Answer Required.
	 * Must the question be answered, or just displayed and can be blank.    
	 * @param objAnswerRequired Object of Answer Required.
	 */ 
	public void setAnswerRequired(ID objAnswerRequired)
	{
		setDataType(3447,objAnswerRequired);
	}
	
	/**
	 * Retrieves the Hint/Help Text.
	 * This field gives guidance to the provider on how to answer the question. 
	 * @return ISingleCollection<ST> - HintHelpText
	 */
	public ST getHintHelpText() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3448);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Hint/Help Text.
	 * This field gives guidance to the provider on how to answer the question.
	 * @param strHintHelpText Use as HintHelpText.
	 */
	public void setHintHelpText(String strHintHelpText) 
	{
		ST HintHelpText  = (ST)getDataElement(3448);
		HintHelpText.setValue(strHintHelpText);
		setHintHelpText(HintHelpText);
	}

	/**
	 * Set the Hint/Help Text.
	 * This field gives guidance to the provider on how to answer the question.
	 * @param HintHelpText Object of Hint/Help Text.
	 */
	public void setHintHelpText(ST HintHelpText)
	{
		setDataType(3448,HintHelpText);
	}

	/**
	 * Retrieves the Type of Answer.
	 * This field contains the allowed datatype for answers, and is drawn from HL7 Table 0125 – Value Type for valid values. 
	 * @return DataType - TypeOfAnswer
	 */
	public ISingleCollection<IDataType> getTypeOfAnswer() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3449);
		ISingleCollection<IDataType> objDataList = new SingleCollection<IDataType>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				objDataList.add(objDataType);
			}
		}
		return objDataList;
	}
	

	/**
	 * Set the Type of Answer.This field contains the allowed datatype for answers, and is drawn from HL7 Table 0125 – Value Type for valid values. 
	 * @param TypeOfAnswer Use as TypeOfAnswer.
	 */
	public void setTypeOfAnswer(ISingleCollection<IDataType> TypeOfAnswer)
	{
		setDataType(3449,TypeOfAnswer);
	}
	
	/**
	 * Retrieves the Multiple Answers Allowed.
	 * This field indicates if multiple answers are allowed, which may impact EHR system display and selection functionality. 
	 * @return ID - MultipleAnswersAllowed
	 */
	public ID getMultipleAnswersAllowed() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3450);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Multiple Answers Allowed.
	 * This field indicates if multiple answers are allowed, which may impact EHR system display and selection functionality. 
	 * @param strMultipleAnswersAllowed This field specifies the status of an order. Refer to HL7 Table 0038 - Order status for valid entries.
	 */ 
	public void setMultipleAnswersAllowed (String strMultipleAnswersAllowed) 
	{
		ID MultipleAnswersAllowed  = (ID)getDataElement(3450);
		MultipleAnswersAllowed.setValue(strMultipleAnswersAllowed); 
		setMultipleAnswersAllowed(MultipleAnswersAllowed);

	} 

	/** 
	 * Set the Multiple Answers Allowed.
	 * This field indicates if multiple answers are allowed, which may impact EHR system display and selection functionality. 
	 * @param objMultipleAnswersAllowed Object of Multiple Answers Allowed.
	 */ 
	public void setMultipleAnswersAllowed(ID objMultipleAnswersAllowed)
	{
		setDataType(3450,objMultipleAnswersAllowed);

	}
	
	/**
	 * Retrieves the Answer Choices.
	 * Allowed coded answers to be sent in HL7 file (CWE.1) and/or display Text for Ordering system to present to provider (CWE.2).   
	 * @return ISingleCollection<CWE> - AnswerChoices
	 */
	public ISingleCollection<CWE> getAnswerChoices() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3451);
		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;
	}
	
	/**
	 * Add the Answer Choices.
	 * Allowed coded answers to be sent in HL7 file (CWE.1) and/or display Text for Ordering system to present to provider (CWE.2).   
	 * @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 addAnswerChoices (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(3451);
		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);
		addAnswerChoices(cwe);

	} 

	/** 
	 * Add the Answer Choices.
	 * Allowed coded answers to be sent in HL7 file (CWE.1) and/or display Text for Ordering system to present to provider (CWE.2).   
	 * @param objAnswerChoices Object of Answer Choices.
	 */ 
	public void addAnswerChoices(CWE objAnswerChoices)
	{
		addDataType(3451,objAnswerChoices);

	}                    

	/** 
	 * Set the Answer Choices.
	 * Allowed coded answers to be sent in HL7 file (CWE.1) and/or display Text for Ordering system to present to provider (CWE.2).   
	 * @param objAnswerChoicesList List of Answer Choices.
	 */ 
	@SuppressWarnings("unchecked")
	public void setAnswerChoices(ISingleCollection<CWE> objAnswerChoicesList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objAnswerChoicesList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(3451,objCollection);
	}
	
	/**
	 * Retrieves the Character Limit.
	 * Total number of characters allowed.  Required for numeric and (long) text answers.
	 * The field  is valued only if OMC-9 is valued 'NM', 'SN', 'ST", 'TX', or 'FT'.
	 * @return NM - CharacterLimit
	 */
	public NM getCharacterLimit() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3452);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Character Limit.
	 * Total number of characters allowed.  Required for numeric and (long) text answers.
	 * The field  is valued only if OMC-9 is valued 'NM', 'SN', 'ST", 'TX', or 'FT'.
	 * @param strAmount This field contains the String Value of Amount.
	 */ 
	public void setCharacterLimit (String strAmount) 
	{
		NM CharacterLimit  = (NM)getDataElement(3452);
		CharacterLimit.setValue(strAmount); 
		setCharacterLimit(CharacterLimit);

	} 

	/** 
	 * Set the Character Limit.
	 * Total number of characters allowed.  Required for numeric and (long) text answers.
	 * The field  is valued only if OMC-9 is valued 'NM', 'SN', 'ST", 'TX', or 'FT'.
	 * @param objCharacterLimit Object of Character Limit.
	 */ 
	public void setCharacterLimit(NM objCharacterLimit)
	{
		setDataType(3452,objCharacterLimit);

	}
	
	/**
	 * Retrieves the Number of Decimals.
	 * For numeric answers the number of digits after the decimal.
	 * @return NM - NumberOfDecimals
	 */
	public NM getNumberOfDecimals() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3453);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Number of Decimals.
	 * For numeric answers the number of digits after the decimal.
	 * @param strAmount This field contains the String Value of Amount.
	 */ 
	public void setNumberOfDecimals (String strAmount) 
	{
		NM NumberOfDecimals  = (NM)getDataElement(3453);
		NumberOfDecimals.setValue(strAmount); 
		setNumberOfDecimals(NumberOfDecimals);
	} 

	/** 
	 * Set the Number of Decimals.
	 * For numeric answers the number of digits after the decimal.
	 * @param objNumberOfDecimals Object of Number of Decimals.
	 */ 
	public void setNumberOfDecimals(NM objNumberOfDecimals)
	{
		setDataType(3453,objNumberOfDecimals);
	}
}
