/*******************************************************************************
 *  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.CP;
import cdac.medinfo.sdk.hl7282.baselibs.CQ;
import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.DTM;
import cdac.medinfo.sdk.hl7282.baselibs.EI;
import cdac.medinfo.sdk.hl7282.baselibs.FN;
import cdac.medinfo.sdk.hl7282.baselibs.HD;
import cdac.medinfo.sdk.hl7282.baselibs.ID;
import cdac.medinfo.sdk.hl7282.baselibs.MO;
import cdac.medinfo.sdk.hl7282.baselibs.ST;
import cdac.medinfo.sdk.hl7282.baselibs.XCN;
import cdac.medinfo.sdk.hl7282.baselibs.XON;
import cdac.medinfo.sdk.hl7282.baselibs.XTN;
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;

/***
 * AUT - Authorization Information Segment<p>
 * This segment represents an authorization or a pre-authorization for a referred
 * procedure or requested service by the payor covering the patient's health care.
 * <p>Represents an HL7 AUT message segment. 
 * This segment has the following fields:</p><p>
 * AUT-1: Authorizing Payor, Plan ID (CWE)<b>Required</b><br> 
 * AUT-2: Authorizing Payor, Company ID (CWE)<b>Optional</b><br> 
 * AUT-3: Authorizing Payor, Company Name (ST)<b>Optional</b><br> 
 * AUT-4: Authorization Effective Date (DTM)<b>Optional</b><br> 
 * AUT-5: Authorization Expiration Date (DTM)<b>Optional</b><br> 
 * AUT-6: Authorization Identifier (EI)<b>Conditional</b><br> 
 * AUT-7: Reimbursement Limit (CP)<b>Optional</b><br> 
 * AUT-8: Requested Number of Treatments (CQ)<b>Optional</b><br> 
 * AUT-9: Authorized Number of Treatments (CQ)<b>Optional</b><br> 
 * AUT-10: Process Date (DTM)<b>Optional</b><br>
 * AUT-11: Authorizing Payor, Plan ID (CWE)<b>Optional</b><br> 
 * AUT-12: Authorizing Payor, Company ID (CWE)<b>Optional</b><br> 
 * AUT-13: Authorizing Payor, Company Name (CWE)<b>Required</b><br> 
 * AUT-14: Authorization Effective Date (CWE)<b>Optional</b><br> 
 * AUT-15: Authorization Expiration Date (DTM)<b>Optional</b><br> 
 * AUT-16: Authorization Identifier (CWE)<b>Optional</b><br> 
 * AUT-17: Reimbursement Limit (ST)<b>Optional</b><br> 
 * AUT-18: Requested Number of Treatments (CQ)<b>Optional</b><br> 
 * AUT-19: Authorized Number of Treatments (CQ)<b>Optional</b><br> 
 * AUT-20: Process Date (CQ)<b>Optional</b><br>
 * AUT-21: Authorizing Payor, Plan ID (CWE)<b>Optional</b><br> 
 * AUT-22: Authorizing Payor, Company ID (MO)<b>Optional</b><br> 
 * AUT-23: Authorizing Payor, Company Name (XON)<b>Optional</b><br> 
 * AUT-24: Authorization Effective Date (XCN)<b>Optional</b><br> 
 * AUT-25: Authorization Expiration Date (ST)<b>Optional</b><br> 
 * AUT-26: Authorization Identifier (DTM)<b>Optional</b><br> 
 * AUT-27: Reimbursement Limit (XTN)<b>Optional</b><br> 
 * AUT-28: Requested Number of Treatments (ST)<b>Optional</b><br> 
 * AUT-29: Authorized Number of Treatments (ID)<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 AUT extends Segment   
{
	


	/**
	 * Constructs the AUT segment.
	 */
	public AUT()
	{super(EnumSegments.HL7_SEG_AUT);
	}

	/**
	 * Retrieves the Authorization Effective Date.
	 * @return DTM - authorizationEffectiveDate
	 */
	public DTM getAuthorizationEffectiveDate() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1149);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Authorization Expiration Date.
	 * This field specify the expiration date after which the authorization to treat will no longer be in effect from the perspective of the coverage plan.
	 * @return DTM - authorizationExpirationDate
	 */
	public DTM getAuthorizationExpirationDate() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1150);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Authorization Identifier.
	 * This field specify the field contains the coverage application's permanent identifier assigned to track the authorization and all related billing documents. 
	 * @return EI - authorizationIdentifier
	 */
	public EI getAuthorizationIdentifier() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1151);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EI)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Authorized Number of Treatments.
	 * This field specify the contains the number of times that the authorized treatment may be administered to the patient without obtaining additional authorization.
	 * @return CQ - authorizedNumberofTreatments
	 */
	public CQ getAuthorizedNumberofTreatments() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1154);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CQ)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Authorizing Pay or Company ID.
	 * This field specify the ID of the insurance company or other entity that administers the authorizing coverage plan.
	 * @return CWE - authorizingPayorCompanyID
	 */
	public CWE getAuthorizingPayorCompanyID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1147);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Authorizing Pay or Company Name.
	 * This field specify the name of the insurance company or other entity that administers the authorizing coverage plan.
	 * @return ST - authorizingPayorCompanyName
	 */
	public ST getAuthorizingPayorCompanyName() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1148);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Authorizing Pay or Plan ID.
	 * This field specify the ID of the coverage plan authorizing treatment.  
	 * @return CWE - authorizingPayorPlanID
	 */
	public CWE getAuthorizingPayorPlanID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1146);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Process Date.
	 * This field specify the date that the authorization originated with the authorizing party.
	 * @return DTM - processDate
	 */
	public DTM getProcessDate() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1145);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Reimbursement Limit.
	 * This field contains the dollar limit for reimbursement specified by the coverage plan for the authorized treatment.
	 * @return CP - reimbursementLimit
	 */
	public CP getReimbursementLimit() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1152);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CP)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Requested Number of Treatments.
	 * This field specify the requested number of times that the treatment may be administered to the patient without obtaining additional authorization.
	 * @return CQ - requestedNumberofTreatments
	 */
	public CQ getRequestedNumberofTreatments() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1153);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CQ)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Set the Authorization Effective Date.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setAuthorizationEffectiveDate (String strTime) 
	{
		DTM authorizationEffectiveDate  = (DTM)getDataElement(1149);
		authorizationEffectiveDate.setValue(strTime);
		setAuthorizationEffectiveDate(authorizationEffectiveDate);

	} 

	/** Set the Authorization Effective Date.
	 * @param objauthorizationEffectiveDate object of Authorization Effective Date.
	 */ 
	public void setAuthorizationEffectiveDate(DTM objauthorizationEffectiveDate)
	{
		setDataType(1149,objauthorizationEffectiveDate);

	}	/**
	 * Set the Authorization Expiration Date.
	 * This field specify the expiration date after which the authorization to treat will no longer be in effect from the perspective of the coverage plan.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setAuthorizationExpirationDate (String strTime) 
	{
		DTM authorizationExpirationDate  = (DTM)getDataElement(1150);
		authorizationExpirationDate.setValue(strTime);
		setAuthorizationExpirationDate(authorizationExpirationDate);

	} 

	/** Set the Authorization Expiration Date.
	 * This field specify the expiration date after which the authorization to treat will no longer be in effect from the perspective of the coverage plan.
	 * @param objauthorizationExpirationDate object of Authorization Expiration Date.
	 */ 
	public void setAuthorizationExpirationDate(DTM objauthorizationExpirationDate)
	{
		setDataType(1150,objauthorizationExpirationDate);

	}
	/**
	 * Set the Authorization Identifier.
	 * This field specify the field contains the coverage application's permanent identifier assigned to track the authorization and all related billing documents.
	 * @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 setAuthorizationIdentifier (String strEntityIdentifier,String strNamespaceId,
			String strUniversalId,String strUniversalIdType)
	{
		EI authorizationIdentifier  = (EI)getDataElement(1151);
		authorizationIdentifier.setEntityIdentifier(strEntityIdentifier);
		authorizationIdentifier.setNamespaceId(strNamespaceId);
		authorizationIdentifier.setUniversalId(strUniversalId);
		authorizationIdentifier.setUniversalIdType(strUniversalIdType); 
		setAuthorizationIdentifier(authorizationIdentifier);

	} 

	/** Set the Authorization Identifier.
	 * This field specify the field contains the coverage application's permanent identifier assigned to track the authorization and all related billing documents.
	 * @param objauthorizationIdentifier object of Authorization Identifier. 
	 */ 
	public void setAuthorizationIdentifier(EI objauthorizationIdentifier)
	{
		setDataType(1151,objauthorizationIdentifier);
	}
	/** 
	 * Set the Authorized Number of Treatments.
	 * This field specify the contains the number of times that the authorized treatment may be administered to the patient without obtaining additional authorization.
	 * @param strPolicyLimitDays Specifies the maximum number of days that the insurance policy will cover.
	 */ 
	public void setAuthorizedNumberofTreatments (String strPolicyLimitDays) 
	{
		CQ authorizedNumberofTreatments  = (CQ)getDataElement(1154);
		authorizedNumberofTreatments.setValue(strPolicyLimitDays); 
		setAuthorizedNumberofTreatments(authorizedNumberofTreatments);
	} 

	/** Set the Authorized Number of Treatments.
	 * This field specify the contains the number of times that the authorized treatment may be administered to the patient without obtaining additional authorization.
	 * @param objauthorizedNumberofTreatments object of Authorized Number of Treatments.
	 */ 
	public void setAuthorizedNumberofTreatments(CQ objauthorizedNumberofTreatments)
	{
		setDataType(1154,objauthorizedNumberofTreatments);
	}
	/** 
	 * Set the Requested Number of Treatments.
	 * This field specify the requested number of times that the treatment may be administered to the patient without obtaining additional authorization.
	 * @return String RequestedNumberofTreatments
	 * @param strPolicyLimitDays Specifies the maximum number of days that the insurance policy will cover.
	 */ 
	public void setRequestedNumberofTreatments (String strPolicyLimitDays) 
	{
		CQ requestedNumberofTreatments  = (CQ)getDataElement(1153);
		requestedNumberofTreatments.setValue(strPolicyLimitDays); 
		setRequestedNumberofTreatments(requestedNumberofTreatments);

	} 

	/** Set the Requested Number of Treatments.
	 * This field specify the requested number of times that the treatment may be administered to the patient without obtaining additional authorization.
	 * @param objrequestedNumberofTreatments object of Requested Number of Treatments.
	 */ 
	public void setRequestedNumberofTreatments(CQ objrequestedNumberofTreatments)
	{
		setDataType(1153,objrequestedNumberofTreatments);

	}
	/**
	 * Set the Authorizing Pay or Company ID.
	 * This field specify the ID of the insurance company or other entity that administers the authorizing coverage plan.
	 * @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 setAuthorizingPayorCompanyID (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(1147);
		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); 
		setAuthorizingPayorCompanyID(cwe);

	} 

	/** Set the Authorizing Pay or Company ID.
	 * This field specify the ID of the insurance company or other entity that administers the authorizing coverage plan.
	 * @param objauthorizingPayorCompanyID object of Authorizing Pay or Company ID.
	 */ 
	public void setAuthorizingPayorCompanyID(CWE objauthorizingPayorCompanyID)
	{
		setDataType(1147,objauthorizingPayorCompanyID);
	}	/**
	 * Set the Authorizing Pay or Plan ID.
	 * This field specify the ID of the coverage plan authorizing treatment.
	 * @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 setAuthorizingPayorPlanID (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(1146);
		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);
		setAuthorizingPayorPlanID(cwe);

	} 

	/** Set the Authorizing Pay or Plan ID.
	 * This field specify the ID of the coverage plan authorizing treatment.
	 * @param objauthorizingPayorPlanID object of Authorizing Pay or Plan ID.
	 */ 
	public void setAuthorizingPayorPlanID(CWE objauthorizingPayorPlanID)
	{
		setDataType(1146,objauthorizingPayorPlanID);

	}
	/**
	 * Set the Authorizing Pay or Company Name.
	 * This field specify the name of the insurance company or other entity that administers the authorizing coverage plan.
	 * @param strAccidentDecription Delimiter used as AccidentDecription.
	 */ 
	public void setAuthorizingPayorCompanyName (String strAccidentDecription) 
	{
		ST authorizingPayorCompanyName  = (ST)getDataElement(1148);
		authorizingPayorCompanyName.setValue(strAccidentDecription); 
		setAuthorizingPayorCompanyName(authorizingPayorCompanyName);

	} 

	/** Set the Authorizing Pay or Company Name.
	 * This field specify the name of the insurance company or other entity that administers the authorizing coverage plan.
	 * @param objauthorizingPayorCompanyName object of Authorizing Pay or Company Name.
	 */ 
	public void setAuthorizingPayorCompanyName(ST objauthorizingPayorCompanyName)
	{
		setDataType(1148,objauthorizingPayorCompanyName);

	}
	/**
	 * Set the Process Date.
	 * This field specify the date that the authorization originated with the authorizing party.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setProcessDate (String strTime) 
	{
		DTM processDate  = (DTM)getDataElement(1145);
		processDate.setValue(strTime);
		setProcessDate(processDate);

	} 

	/** Set the Process Date.
	 * This field specify the date that the authorization originated with the authorizing party.
	 * @param objprocessDate object of Process Date.
	 */ 
	public void setProcessDate(DTM objprocessDate)
	{
		setDataType(1145,objprocessDate);
	}
	/**
	 * Set the Reimbursement Limit.
	 * This field contains the dollar limit for reimbursement specified by the coverage plan for the authorized treatment.
	 * @param objPrice Specifies an amount of money and the denomination in which it is expressed.
	 * @param strPriceType Specifies a coded value, data type ID.[Refer to HL7 Table 0205]
	 * 						  Suggested Values AP,DC,IC,PF,TF,TP,UP. 
	 * @param strFromValue Spefies the "range" alongwith strToValue.  
	 * @param strToValue Spefies the "range" alongwith strFromValue.
	 * @param objRangeUnits Specifies This describes the units associated with the range, e.g., seconds, minutes
	 * @param strRangeType Refer to HL7 Table 0298 - CP range type for valid values.(P,F)
	 */ 
	public void setReimbursementLimit (MO objPrice,String strPriceType,String strFromValue,String strToValue,
			CWE objRangeUnits,String strRangeType)
	{
		CP reimbursementLimit = (CP)getDataElement(1152);
		reimbursementLimit.setPrice(objPrice);
		reimbursementLimit.setPriceType(strPriceType);
		reimbursementLimit.setFromValue(strFromValue);
		reimbursementLimit.setToValue(strToValue);
		reimbursementLimit.setRangeUnits(objRangeUnits);
		reimbursementLimit.setRangeType(strRangeType); 
		setReimbursementLimit(reimbursementLimit);

	} 

	/** Set the Reimbursement Limit.
	 * This field contains the dollar limit for reimbursement specified by the coverage plan for the authorized treatment.
	 * @param objreimbursementLimit object of Reimbursement Limit.
	 */ 
	public void setReimbursementLimit(CP objreimbursementLimit)
	{
		setDataType(1152,objreimbursementLimit);
	}
	
	/**
	 * Retrieves the Requested Discipline(s).
	 * Discipline – The scope of medical service(s) for which reimbursement for services rendered is requested. 
	 * @return ISingleCollection<CWE> - AuthorizedDisciplines
	 */
	public ISingleCollection<CWE> getRequestedDisciplines() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(2375);
		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 Requested Discipline(s).
	 * Discipline – The scope of medical service(s) for which reimbursement for services rendered is requested. 
	 * @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 addRequestedDisciplines (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(2375);
		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);
		addRequestedDisciplines(cwe);

	} 

	/** 
	 * Add the Requested Discipline(s).
	 * Discipline – The scope of medical service(s) for which reimbursement for services rendered is requested. 
	 * @param objAuthorizedDisciplines Object of Requested Discipline(s).
	 */ 
	public void addRequestedDisciplines(CWE objAuthorizedDisciplines)
	{
		addDataType(2375,objAuthorizedDisciplines);

	} 

	/** 
	 * Set the Requested Discipline(s).
	 * Discipline – The scope of medical service(s) for which reimbursement for services rendered is requested. 
	 * @param objAuthorizedDisciplinesList List of Requested Discipline(s).
	 */ 
	@SuppressWarnings("unchecked")
	public void setRequestedDisciplines(ISingleCollection<CWE> objAuthorizedDisciplinesList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objAuthorizedDisciplinesList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(2375,objCollection);
	}
	
	/**
	 * Retrieves the Authorized Discipline(s).
	 * Discipline – The scope of medical service(s) for which reimbursement for services rendered is authorized.
	 * @return ISingleCollection<CWE> - AuthorizedDisciplines
	 */
	public ISingleCollection<CWE> getAuthorizedDisciplines() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(2376);
		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 Authorized Discipline(s).
	 * Discipline – The scope of medical service(s) for which reimbursement for services rendered is authorized.
	 * @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 addAuthorizedDisciplines (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(2376);
		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);
		addAuthorizedDisciplines(cwe);

	} 

	/** 
	 * Add the Authorized Discipline(s).
	 * Discipline – The scope of medical service(s) for which reimbursement for services rendered is authorized.
	 * @param objAuthorizedDisciplines Object of Authorized Discipline(s).
	 */ 
	public void addAuthorizedDisciplines(CWE objAuthorizedDisciplines)
	{
		addDataType(2376,objAuthorizedDisciplines);

	} 

	/** 
	 * Set the Authorized Discipline(s).
	 * Discipline – The scope of medical service(s) for which reimbursement for services rendered is authorized.
	 * @param objAuthorizedDisciplinesList List of Authorized Discipline(s).
	 */ 
	@SuppressWarnings("unchecked")
	public void setAuthorizedDisciplines(ISingleCollection<CWE> objAuthorizedDisciplinesList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objAuthorizedDisciplinesList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(2376,objCollection);
	}
	
	/**
	 * Retrieves the Authorization Referral Typeentifier.
	 * The authorization/referral type distinguishes the content of the segment as pertaining to an authorization vs a referral vs other types. 
	 * @return CWE - AuthorizationReferralType
	 */
	public CWE getAuthorizationReferralType() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3413);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Authorization Referral Typeentifier.
	 * The authorization/referral type distinguishes the content of the segment as pertaining to an authorization vs a referral vs other types. 
	 * @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 setAuthorizationReferralType(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(3413);
		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);
		setAuthorizationReferralType(cwe);

	} 

	/** 
	 * Set the Authorization Referral Type.
	 * The authorization/referral type distinguishes the content of the segment as pertaining to an authorization vs a referral vs other types. 
	 * @param objbPUniversalServiceID Object of Authorization Referral Typeentifier.
	 */ 
	public void setAuthorizationReferralType(CWE objbPUniversalServiceID)
	{
		setDataType(3413,objbPUniversalServiceID);

	}
	
	/**
	 * Retrieves the Approval Status.
	 * The authorization/referral approval status indicates that status of an authorization
	 * @return CWE - ApprovalStatus
	 */
	public CWE getApprovalStatus() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3414);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Approval Status.
	 * The authorization/referral approval status indicates that status of an authorization
	 * @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 setApprovalStatus(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(3414);
		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);
		setApprovalStatus(cwe);

	} 

	/** 
	 * Set the Approval Status.
	 * The authorization/referral approval status indicates that status of an authorization
	 * @param objbPUniversalServiceID Object of Approval Status.
	 */ 
	public void setApprovalStatus(CWE objbPUniversalServiceID)
	{
		setDataType(3414,objbPUniversalServiceID);

	}
	
	/**
	 * Retrieves the Planned Treatment Stop Date.
	 * The authorization planned treatment stop date is the date that the patient's treatment from this authorization is expected to complete, based on procedural protocols.  
	 * @return DTM - PlannedTreatmentStopDate
	 */
	public DTM getPlannedTreatmentStopDate() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3415);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Planned Treatment Stop Date.
	 * The authorization planned treatment stop date is the date that the patient's treatment from this authorization is expected to complete, based on procedural protocols.  
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setPlannedTreatmentStopDate (String strTime) 
	{
		DTM PlannedTreatmentStopDate  = (DTM)getDataElement(3415);
		PlannedTreatmentStopDate.setValue(strTime);
		setPlannedTreatmentStopDate(PlannedTreatmentStopDate);

	} 

	/** 
	 * Set the Planned Treatment Stop Date.
	 * The authorization planned treatment stop date is the date that the patient's treatment from this authorization is expected to complete, based on procedural protocols.
	 * @param objPlannedTreatmentStopDate Object of Planned Treatment Stop Date.
	 */ 
	public void setPlannedTreatmentStopDate(DTM objPlannedTreatmentStopDate)
	{
		setDataType(3415,objPlannedTreatmentStopDate);

	}
	
	/**
	 * Retrieves the Clinical Service.
	 * The authorization clinical service provides a means of categorizing the authorization.    
	 * @return CWE - ClinicalService
	 */
	public CWE getClinicalService() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3416);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Clinical Service.
	 * The authorization clinical service provides a means of categorizing the authorization.    
	 * @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 setClinicalService (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(3416);
		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);
		setClinicalService(cwe);

	} 

	/** 
	 * Set the Clinical Service.
	 * The authorization clinical service provides a means of categorizing the authorization.    
	 * @param objClinicalService Object of Clinical Service.
	 */ 
	public void setClinicalService(CWE objClinicalService)
	{
		setDataType(3416,objClinicalService);

	}
	
	/**
	 * Retrieves the Reason Text.
	 * The authorization reason is a free text field allowing a user to capture, in a non-coded format, the reason for the authorization.  
	 * @return String - ReasonText
	 */
	public ST getReasonText() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3417);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Reason Text.
	 * The authorization reason is a free text field allowing a user to capture, in a non-coded format, the reason for the authorization.  
	 * @param strReasonText Used as ReasonText.
	 */
	public void setReasonText (String strReasonText) 
	{
		ST ReasonText  = (ST)getDataElement(3417);
		ReasonText.setValue(strReasonText);
		setReasonText (ReasonText);
	}

	/**
	 * Set the Reason Text.
	 * The authorization reason is a free text field allowing a user to capture, in a non-coded format, the reason for the authorization.  
	 * @param ReasonText Used as ReasonText.
	 */
	public void setReasonText(ST ReasonText)
	{
		setDataType(3417,ReasonText);
	}
	
	/**
	 * Retrieves the Number of Authorized Treatments/Units.
	 * The authorized duration is the amount of time, in days or visits, that the patient has been authorized for treatment by this authorization.    
	 * @return CQ - NumberOfAuthorizedTreatmentsUnits
	 */
	public CQ getNumberOfAuthorizedTreatmentsUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3418);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CQ)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Number of Authorized Treatments/Units.
	 * The authorized duration is the amount of time, in days or visits, that the patient has been authorized for treatment by this authorization.    
	 * @param strQuantity Use as Quantity
	 * @param objUnits Use as Units
	 */ 
	public void setNumberOfAuthorizedTreatmentsUnits (String strQuantity,CWE objUnits) 
	{
		CQ NumberOfAuthorizedTreatmentsUnits  = (CQ)getDataElement(3418);
		NumberOfAuthorizedTreatmentsUnits.setQuantity(strQuantity);
		NumberOfAuthorizedTreatmentsUnits.setUnits(objUnits); 
		setNumberOfAuthorizedTreatmentsUnits(NumberOfAuthorizedTreatmentsUnits);

	} 

	/** 
	 * Set the Number of Authorized Treatments/Units.
	 * The authorized duration is the amount of time, in days or visits, that the patient has been authorized for treatment by this authorization.    
	 * @param objNumberOfAuthorizedTreatmentsUnits Object of Number of Authorized Treatments/Units.
	 */ 
	public void setNumberOfAuthorizedTreatmentsUnits(CQ objNumberOfAuthorizedTreatmentsUnits)
	{
		setDataType(3418,objNumberOfAuthorizedTreatmentsUnits);
	}
	
	/**
	 * Retrieves the Number of Used Treatments/Units.
	 * The scheduled treatments is the amount of time, in days or visits that the patient has planned treatments scheduled The duration of "days" is reserved for inpatient authorizations. The duration of "days" is reserved for inpatient authorizations.
	 * @return CQ - NumberOfUsedTreatmentsUnits
	 */
	public CQ getNumberOfUsedTreatmentsUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3419);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CQ)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Number of Used Treatments/Units.
	 * The scheduled treatments is the amount of time, in days or visits that the patient has planned treatments scheduled The duration of "days" is reserved for inpatient authorizations. The duration of "days" is reserved for inpatient authorizations.
	 * @param strQuantity Use as Quantity
	 * @param objUnits Use as Units
	 */ 
	public void setNumberOfUsedTreatmentsUnits (String strQuantity,CWE objUnits) 
	{
		CQ NumberOfUsedTreatmentsUnits  = (CQ)getDataElement(3419);
		NumberOfUsedTreatmentsUnits.setQuantity(strQuantity);
		NumberOfUsedTreatmentsUnits.setUnits(objUnits); 
		setNumberOfUsedTreatmentsUnits(NumberOfUsedTreatmentsUnits);

	} 

	/** 
	 * Set the Number of Used Treatments/Units.
	 * The scheduled treatments is the amount of time, in days or visits that the patient has planned treatments scheduled The duration of "days" is reserved for inpatient authorizations. The duration of "days" is reserved for inpatient authorizations.
	 * @param objNumberOfUsedTreatmentsUnits Object of Number of Used Treatments/Units.
	 */ 
	public void setNumberOfUsedTreatmentsUnits(CQ objNumberOfUsedTreatmentsUnits)
	{
		setDataType(3419,objNumberOfUsedTreatmentsUnits);
	}
	
	/**
	 * Retrieves the Number of Schedule Treatments/Units.
	 * The scheduled treatments is the amount of time, in days or visits that the patient has planned treatments scheduled The duration of "days" is reserved for inpatient authorizations.
	 * @return CQ - NumberOfScheduleTreatmentsUnits
	 */
	public CQ getNumberOfScheduleTreatmentsUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3420);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CQ)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Number of Schedule Treatments/Units.
	 * The scheduled treatments is the amount of time, in days or visits that the patient has planned treatments scheduled The duration of "days" is reserved for inpatient authorizations.
	 * @param strQuantity Use as Quantity
	 * @param objUnits Use as Units
	 */ 
	public void setNumberOfScheduleTreatmentsUnits (String strQuantity,CWE objUnits) 
	{
		CQ NumberOfScheduleTreatmentsUnits  = (CQ)getDataElement(3420);
		NumberOfScheduleTreatmentsUnits.setQuantity(strQuantity);
		NumberOfScheduleTreatmentsUnits.setUnits(objUnits); 
		setNumberOfScheduleTreatmentsUnits(NumberOfScheduleTreatmentsUnits);

	} 

	/** 
	 * Set the Number of Schedule Treatments/Units.
	 * The scheduled treatments is the amount of time, in days or visits that the patient has planned treatments scheduled The duration of "days" is reserved for inpatient authorizations.
	 * @param objNumberOfScheduleTreatmentsUnits Object of Number of Schedule Treatments/Units.
	 */ 
	public void setNumberOfScheduleTreatmentsUnits(CQ objNumberOfScheduleTreatmentsUnits)
	{
		setDataType(3420,objNumberOfScheduleTreatmentsUnits);
	}
	
	/**
	 * Retrieves the Encounter Type.
	 * The authorization encounter type provides a means of specifying the environment for the performance of the authorized services.  
	 * @return CWE - EncounterType
	 */
	public CWE getEncounterType() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3421);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Encounter Type.
	 * The authorization encounter type provides a means of specifying the environment for the performance of the authorized services.  
	 * @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 setEncounterType (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(3421);
		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); 
		setEncounterType(cwe);
	} 

	/** Set the Encounter Type.
	 * The authorization encounter type provides a means of specifying the environment for the performance of the authorized services.  
	 * @param objEncounterType object of EncounterType
	 */ 
	public void setEncounterType(CWE objEncounterType)
	{
		setDataType(3421,objEncounterType);
	}
	
	/**
	 * Retrieves the Remaining Benefit Amount.
	 * The authorization benefit amount is the amount remaining from the insurance company related to this authorization.  
	 * @return MO - RemainingBenefitAmount
	 */
	public MO getRemainingBenefitAmount() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3422);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (MO)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Remaining Benefit Amount.
	 * The authorization benefit amount is the amount remaining from the insurance company related to this authorization.  
	 * @param strQuantity Specifies the Quantity.
	 * @param strDenomination Specifies the denomination in which the quantity is expressed. 
	 */ 
	public void setRemainingBenefitAmount (String strQuantity,String strDenomination)
	{
		MO RemainingBenefitAmount  = (MO)getDataElement(3422);
		RemainingBenefitAmount.setQuantity(strQuantity);
		RemainingBenefitAmount.setDenomination(strDenomination); 
		setRemainingBenefitAmount(RemainingBenefitAmount);
	} 

	/** 
	 * Set the Remaining Benefit Amount.
	 * The authorization benefit amount is the amount remaining from the insurance company related to this authorization.  
	 * @param objRemainingBenefitAmount Object of  Remaining Benefit Amount.
	 */ 
	public void setRemainingBenefitAmount(MO objRemainingBenefitAmount)
	{
		setDataType(3422,objRemainingBenefitAmount);
	}
	
	/**
	 * Retrieves the Authorized Provider.
	 * This represents the organization to which the patient was referred to perform the procedure(s).  
	 * @return XON - AuthorizedProvider
	 */
	public XON getAuthorizedProvider() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3423);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (XON)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Authorized Provider.
	 * This represents the organization to which the patient was referred to perform the procedure(s).  
	 * @param strOrganizationName Specifies name of the specified organization.
	 * @param strOrganizationNameTypeCode 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 setAuthorizedProvider (String strOrganizationName, CWE objOrganizationNameTypeCode,
			 HD objAssigningAuthority,
			String strIdentifierTypeCode, HD objAssigningFacility, String strNameRepresentationCode,
			String strOrganizationIdentifier)
	{
		XON AuthorizedProvider  = (XON)getDataElement(3423);
		AuthorizedProvider.setOrganizationName(strOrganizationName);
		AuthorizedProvider.setOrganizationNameTypeCode(objOrganizationNameTypeCode);
		AuthorizedProvider.setAssigningAuthority(objAssigningAuthority);
		AuthorizedProvider.setIdentifierTypeCode(strIdentifierTypeCode);
		AuthorizedProvider.setAssigningFacility(objAssigningFacility);
		AuthorizedProvider.setNameRepresentationCode(strNameRepresentationCode);
		AuthorizedProvider.setOrganizationIdentifier(strOrganizationIdentifier); 
		setAuthorizedProvider(AuthorizedProvider);
	} 

	/**
	 * Ses the Authorized Provider.
	 * This represents the organization to which the patient was referred to perform the procedure(s).  
	 * @param objAuthorizedProvider object of Authorized Provider. 
	 */ 
	public void setAuthorizedProvider(XON objAuthorizedProvider)
	{
		setDataType(3423,objAuthorizedProvider);
	}
	
	/**
	 * Retrieves the Authorized Health Professional.
	 * The authorized HP represents the specific health professional authorized to perform the services for the patient.  
	 * @return XCN - AuthorizedHealthProfessional
	 */
	public XCN getAuthorizedHealthProfessional()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3424);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (XCN)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Authorized Health Professional.
	 * The authorized HP represents the specific health professional authorized to perform the services for the patient.  
	 * @param strIDNumber Refers to the coded ID according to a user-defined table
	 * @param objFamilyName Specifies the surname of a person.
	 * @param strGivenName Specifies First name.
	 * @param strSecondAndFurtherGivenNamesOrInitialsThereof Specifies multiple middle names that may be included by 
	 * 														   separating them with spaces.
	 * @param strSuffix Used to specify a name suffix (e.g., Jr. or III).
	 * @param strPrefix Used to specify a name prefix (e.g., Dr.).
	 * @param strSourceTable Used as the HL7 identifier for the user-defined table of values for this component. [Refer User-defined Table 0297 - CN ID.]
	 * @param objAssigningAuthority Specifies a unique identifier of the system (or organization or agency of department)
	 * 								  that creates the data. [Refer User-defined Table 0363 - Assigning authority]
	 * @param strNameTypeCode Specifies a code that represents the type of name. 
	 * @param strIdentifierCheckDigit Specifies part of the identifying number used in the sending application. 
	 * @param strCheckDigitScheme Specifies the code identifying the check digit scheme employed.[Refer HL7 Table 0061 - Check digit scheme].
	 * @param strIdentifierTypeCode Specifies A code corresponding to the type of identifier.[Refer HL7 Table 0203 - Identifier type].
	 * @param objAssigningFacility Specifies the place or location identifier where the identifier was first assigned to the person
	 * @param strNameRepresentationCode Provides an indication of the representation provided by the data item.  
	 * @param objNameContext Designates the context in which a name is used. [Refer User-defined Table 03429 ]
	 * @param strNameAssemblyOrder Specifies a code that represents the preferred display order of the components of this person name. Suggested values are G,F[Refer table 0444.]
	 * @param strEffectiveDate Specifies the first date, if known, on which the address is valid and active.
	 * @param strExpirationDate Specifies the last date, if known, on which the address is valid and active.
	 * @param strProfessionalSuffix Used to specify an abbreviation, or a string of abbreviations, denoting qualifications that support the person's profession, (e.g., licenses).
	 * @param objAssigningJurisdiction Specifies the geo-political body that assigned the identifier.
	 * @param objAssigningAgencyOrDepratment Specifies the agency or department that assigned the identifier
	 * @param strSecurityCheck Specifies the version code that may be assigned to the person identifier
	 * @param strSecurityCheckScheme Specifies the check digit scheme.
	 */ 
	public void setAuthorizedHealthProfessional (String strIDNumber,FN objFamilyName,String strGivenName,String strSecondAndFurtherGivenNamesOrInitialsThereof,
			String 	strSuffix,String strPrefix,CWE objSourceTable,HD objAssigningAuthority,
			String strNameTypeCode,String strIdentifierCheckDigit,String strCheckDigitScheme,String strIdentifierTypeCode,
			HD objAssigningFacility,String strNameRepresentationCode,CWE objNameContext,
			String strNameAssemblyOrder, String strEffectiveDate,String strExpirationDate,String strProfessionalSuffix,
			CWE objAssigningJurisdiction,CWE objAssigningAgencyOrDepratment, String strSecurityCheck, String strSecurityCheckScheme)
	{
		XCN AuthorizedHealthProfessional  = (XCN)getDataElement(3424);
		AuthorizedHealthProfessional.setIdNumber(strIDNumber);
		AuthorizedHealthProfessional.setFamilyName(objFamilyName);
		AuthorizedHealthProfessional.setGivenName(strGivenName);
		AuthorizedHealthProfessional.setSecondNameOrInitials(strSecondAndFurtherGivenNamesOrInitialsThereof);
		AuthorizedHealthProfessional.setSuffix(strSuffix);
		AuthorizedHealthProfessional.setPrefix(strPrefix);
//		AuthorizedHealthProfessional.setDegree(strDegree);
		AuthorizedHealthProfessional.setSourceTable(objSourceTable);
		AuthorizedHealthProfessional.setAssigningAuthority(objAssigningAuthority);
		AuthorizedHealthProfessional.setNameTypeCode(strNameTypeCode);
		AuthorizedHealthProfessional.setIdentifierCheckDigit(strIdentifierCheckDigit);
		AuthorizedHealthProfessional.setCheckDigitScheme(strCheckDigitScheme);
		AuthorizedHealthProfessional.setIdentifierTypeCode(strIdentifierTypeCode);
		AuthorizedHealthProfessional.setAssigningFacility(objAssigningFacility);
		AuthorizedHealthProfessional.setNameRepresentationCode(strNameRepresentationCode);
		AuthorizedHealthProfessional.setNameContext(objNameContext);
//		AuthorizedHealthProfessional.setNameValidityRange(objNameValidityRange);
		AuthorizedHealthProfessional.setNameAssemblyOrder(strNameAssemblyOrder);
		AuthorizedHealthProfessional.setEffectiveDate(strEffectiveDate);
		AuthorizedHealthProfessional.setExpirationDate(strExpirationDate);
		AuthorizedHealthProfessional.setProfessionalSuffix(strProfessionalSuffix);
		AuthorizedHealthProfessional.setAssigningJurisdiction(objAssigningJurisdiction);
		AuthorizedHealthProfessional.setAssigningAgencyOrDepartment(objAssigningAgencyOrDepratment); 
		AuthorizedHealthProfessional.setSecurityCheck(strSecurityCheck);
		AuthorizedHealthProfessional.setSecurityCheckScheme(strSecurityCheckScheme);
		setAuthorizedHealthProfessional(AuthorizedHealthProfessional);


	} 

	/**
	 * Sets the Authorized Health Professional.
	 * The authorized HP represents the specific health professional authorized to perform the services for the patient.  
	 * @param objAuthorizedHealthProfessional object of Authorized Health Professional.
	 */ 
	public void setAuthorizedHealthProfessional(XCN objAuthorizedHealthProfessional)
	{
		setDataType(3424,objAuthorizedHealthProfessional);
	}
	
	/**
	 * Retrieves the Source Text.
	 * The source text allows a user to capture information (such as the name) of the person contacted regarding the specific referral.
	 * @return String - SourceText
	 */
	public ST getSourceText() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3425);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Source Text.
	 * The source text allows a user to capture information (such as the name) of the person contacted regarding the specific referral.
	 * @param strSourceText String value of the reason for the action indicated in the
	 * IAM-7 - Allergy Action Code field. 
	 */ 
	public void setSourceText (String strSourceText) 
	{
		ST SourceText  = (ST)getDataElement(3425);
		SourceText.setValue(strSourceText); 
		setSourceText(SourceText);

	} 

	/** Set the Source Text.
	 * The source text allows a user to capture information (such as the name) of the person contacted regarding the specific referral.
	 * @param objSourceText object of Source Text. 
	 */ 
	public void setSourceText(ST objSourceText)
	{
		setDataType(3425,objSourceText);
	}
	
	/**
	 * Retrieves the Source Date.
	 * The source date allows a user to capture the date the person was contacted regarding the specific referral.
	 * @return DTM - SourceDate
	 */
	public DTM getSourceDate() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3426);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Source Date.
	 * The source date allows a user to capture the date the person was contacted regarding the specific referral.
	 * @param strDateTimePlannedEvent This field contains the date/time that the event is planned. 
	 */ 
	public void setSourceDate (String strDateTimePlannedEvent)  
	{
		DTM SourceDate  = (DTM)getDataElement(3426);
		SourceDate.setValue(strDateTimePlannedEvent);
		setSourceDate(SourceDate);

	} 

	/** 
	 * Sets the Source Date.
	 * The source date allows a user to capture the date the person was contacted regarding the specific referral.
	 * @param objSourceDate object of Source Date.
	 */ 
	public void setSourceDate(DTM objSourceDate)
	{
		setDataType(3426,objSourceDate);
	}
	
	/**
	 * Retrieves the Source Phone.
	 * The source phone number allows a user to capture the phone number of the person contacted regarding the specific referral.
	 * @return XTN - Source Phone
	 */
	public XTN getSourcePhone() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3427);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (XTN)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/** 
	 * Set the Source Phone.
	 * The source phone number allows a user to capture the phone number of the person contacted regarding the specific referral.
	 * @param strTeleCommunicationUseCode Specifies a code that represents a specific use of a telecommunication number.
	 										Suggested values are PRN,ORN,WPN,VHN,ASN,EMR,NET,BPN  [Refer table 0201.]
	 * @param strTeleCommunicationEquipmentType Specifies a code that represents the type of telecommunication equipment.
	 * 											  Suggested values are PH,FX,MD,CP,BP,Internet,X.400,TDD,TTY  [Refer table 0202.]
	 * @param strCommuinicationAddress Specifies Email address.
	 * @param strCountryCode Specifies the Country code.
	 * @param strAreaCityCode Specifies the area /City Code.
	 * @param strLocalNumber Specifies an Local Number.
	 * @param strExtension Specifies an Extension.
	 * @param strAnyText Contains comments with respect to the telephone number.
	 * @param strExtensionPrefix Specifies the characters established within a company's 
	 * 							   internal telephone system network used as a prefix to the Extension component for internal dialing. 
	 * @param strSpeedDialCode Specifies The characters established within a 
	 * 							 company's internal telephone system used in place of the (external) telephone number.
	 * @param strUnformattedTelephoneNumber Specifies an expression of the telephone number as an unparsible string.
	 * @param strEffectiveStartDate Specifies start date.
	 * @param strExpirationDate Specifies expiration date.
	 * @param objExpirationReason Specifies reason why this contact is marked as ended.
	 * @param objProtectionCode Specifies reason why this information is sensitive or protected.
	 * @param objSharedTelecommunicationIdentifier Specifies a unique phone number phone telephone number or email-id.
	 * @param strPreferenceOrder Specifies the preference order for an entity..
	 */  
	public void setSourcePhone  (String strTeleCommunicationUseCode,String strTeleCommunicationEquipmentType
			,String strCommuinicationAddress,String strCountryCode,String strAreaCityCode,String strLocalNumber,String strExtension,String strAnyText,
			String strExtensionPrefix,String strSpeedDialCode,String strUnformattedTelephoneNumber, String strEffectiveStartDate, String strExpirationDate,
			CWE objExpirationReason, CWE objProtectionCode, EI objSharedTelecommunicationIdentifier, String strPreferenceOrder)
	{
		XTN xtn  = (XTN)getDataElement(3427);
//		xtn.setTelephoneNumber(strTelephoneNumber);
		xtn.setTelecommunicationUseCode(strTeleCommunicationUseCode);
		xtn.setTelecommunicationEquipmentType(strTeleCommunicationEquipmentType);
		xtn.setCommuinicationAddress(strCommuinicationAddress);
		xtn.setCountryCode(strCountryCode);
		xtn.setAreaCityCode(strAreaCityCode);
		xtn.setLocalNumber(strLocalNumber);
		xtn.setExtension(strExtension);
		xtn.setAnyText(strAnyText);
		xtn.setExtensionPrefix(strExtensionPrefix);
		xtn.setSpeedDialCode(strSpeedDialCode);
		xtn.setUnformattedTelephonenumber(strUnformattedTelephoneNumber); 
		xtn.setEffectiveStartDate(strEffectiveStartDate);
		xtn.setExpirationDate(strExpirationDate);
		xtn.setExpirationReason(objExpirationReason);
		xtn.setProtectionCode(objProtectionCode);
		xtn.setSharedTelecommunicationIdentifier(objSharedTelecommunicationIdentifier);
		xtn.setPreferenceOrder(strPreferenceOrder); 
		setSourcePhone (xtn);
	}
	
	/**Sets the Source Phone. 
	 * The source phone number allows a user to capture the phone number of the person contacted regarding the specific referral.
	 * @param objXtn object of Source Phone.
	 */ 
	public void setSourcePhone(XTN objXtn)
	{
		setDataType(3427,objXtn);
	}
	
	/**
	 * Retrieves the Comment.
	 * The comment allows for a free text capture of any notes the user wishes to capture related to the referral.
	 * @return String - Comment
	 */
	public ST getComment() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3428);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Set the Comment.
	 * The comment allows for a free text capture of any notes the user wishes to capture related to the referral.
	 * @param strComment String value of the reason for the action indicated in the
	 * IAM-7 - Allergy Action Code field. 
	 */ 
	public void setComment (String strComment) 
	{
		ST Comment  = (ST)getDataElement(3428);
		Comment.setValue(strComment); 
		setComment(Comment);

	} 

	/** Set the Comment.
	 * The comment allows for a free text capture of any notes the user wishes to capture related to the referral.
	 * @param objComment object of Comment. 
	 */ 
	public void setComment(ST objComment)
	{
		setDataType(3428,objComment);
	}
	
	/**
	 * Retrieves the Action Code.
	 * This field defines the action to be taken for this referral. 
	 * @return ID - ActionCode
	 */
	public ID getActionCode() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(3429);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/** 
	 * Set the Action Code.
	 * This field defines the action to be taken for this referral. 
	 * @param strActionCode Specifies indicates whether the insurance company requires a written notice of
	 * 									 admission from the healthcare provider.[Refer to HL7 table 0136].Suggested 
	 * 									Values Y,N. 
	 */ 
	public void setActionCode (String strActionCode)  
	{
		ID ActionCode  = (ID)getDataElement(3429);
		ActionCode.setValue(strActionCode); 
		setActionCode(ActionCode);

	} 

	/** Set the Action Code.
	 * This field defines the action to be taken for this referral. 
	 * @param objActionCode Specifies indicates whether the insurance company requires a written notice of
	 * 									 admission from the healthcare provider.[Refer to HL7 table 0136].Suggested 
	 * 									Values Y,N. 
	 */ 
	public void setActionCode(ID objActionCode)
	{
		setDataType(3429,objActionCode);

	}
	
	/**
	 * Validates HL7 Message objects .
	 * Validate method checks for validation each and every segments in side the Message object against specified message Structure. 
	 * Validation chcecks include optionality of segment or group.
	 * It also verifies the number of times segment or group is repeated in message.
	 * e.g 
	 * {PSH} while parsing PSH segment validate method will check for its mandatory presence.
	 * [PSH] in this case validate will throw exception if one tries to enter more than one PSH segment.
	 * @return boolean - true or false.
	 * @throws InvalidSegmentException Thrown when Segment Validation Fails. 
	 */	
	@Override
	public boolean validate() throws InvalidSegmentException
	{
		/*
		 * Authorizing Payor, Company ID is required fields.
		 * Authorization Identifier  is conditionally required.  It is not required when authorization 
		 * information is being requested.  However, it is required when this segment is 
		 * contained in a message which is responding to a request and contains the 
		 * authorization information
		 */

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