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

import java.util.Locale;

import cdac.medinfo.sdk.hl7282.baselibs.CNE;
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.EIP;
import cdac.medinfo.sdk.hl7282.baselibs.FN;
import cdac.medinfo.sdk.hl7282.baselibs.HD;
import cdac.medinfo.sdk.hl7282.baselibs.NM;
import cdac.medinfo.sdk.hl7282.baselibs.PL;
import cdac.medinfo.sdk.hl7282.baselibs.SAD;
import cdac.medinfo.sdk.hl7282.baselibs.XAD;
import cdac.medinfo.sdk.hl7282.baselibs.XCN;
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.HL7Config;
import cdac.medinfo.sdk.hl7282.utils.ResourceBundleWrapper;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;

/**
 * SCH - Schedule Activity Information Segment.<p>
 * The SCH segment contains general information about the scheduled appointment.
 * <p>Represents an HL7 SCH message segment. 
 * This segment has the following fields:</p><p>
 * SCH-1: Placer Appointment ID (EI)<b>Conditional</b><br> 
 * SCH-2: Filler Appointment ID (EI)<b>Conditional</b><br> 
 * SCH-3: Occurrence Number (NM)<b>Conditional</b><br> 
 * SCH-4: Placer Group Number (EIP)<b>Optional</b><br> 
 * SCH-5: Schedule ID (CWE)<b>Optional</b><br> 
 * SCH-6: Event Reason (CWE)<b>Required</b><br> 
 * SCH-7: Appointment Reason (CWE)<b>Optional</b><br> 
 * SCH-8: Appointment Type (CWE)<b>Optional</b><br> 
 * SCH-9: Appointment Duration (NM)<b>Withdrawn</b><br> 
 * SCH-10: Appointment Duration Units (CNE)<b>Backward</b><br> 
 * SCH-11: Appointment Timing Quantity (TQ)<b>Withdrawn</b><br> 
 * SCH-12: Placer Contact Person (XCN)<b>Optional</b><br> 
 * SCH-13: Placer Contact Phone Number (XTN)<b>Optional</b><br> 
 * SCH-14: Placer Contact Address (XAD)<b>Optional</b><br> 
 * SCH-15: Placer Contact Location (PL)<b>Optional</b><br> 
 * SCH-16: Filler Contact Person (XCN)<b>Required</b><br> 
 * SCH-17: Filler Contact Phone Number (XTN)<b>Optional</b><br> 
 * SCH-18: Filler Contact Address (XAD)<b>Optional</b><br> 
 * SCH-19: Filler Contact Location (PL)<b>Optional</b><br> 
 * SCH-20: Entered By Person (XCN)<b>Required</b><br> 
 * SCH-21: Entered By Phone Number (XTN)<b>Optional</b><br> 
 * SCH-22: Entered By Location (PL)<b>Optional</b><br> 
 * SCH-23: Parent Placer Appointment ID (EI)<b>Optional</b><br> 
 * SCH-24: Parent Filler Appointment ID (EI)<b>Conditional</b><br> 
 * SCH-25: Filler Status Code (CWE)<b>Optional</b><br> 
 * SCH-26: Placer Order Number (EI)<b>Conditional</b><br> 
 * SCH-27: Filler Order Number (EI)<b>Conditional</b><br></p>
 * This class provides mechanism to validate message against HL7 v 2.8.2 standard.
 * The class provides accessors & mutators for the elements mentioned above.
 * The class has validate method which validates Message against HL7 v 2.8.2 standard.
 *
 * <p>User can also create Segment through {@link SegmentFactory}
 */
 public class SCH extends Segment   
{
	

	/**
	 * Constructs the SCH segment.
	 */
	public SCH()
	{super(EnumSegments.HL7_SEG_SCH);
	}

	/**
	 * Retrieves the Appointment Duration Units. 
	 * @return CNE - appointmentDurationUnits
	 */
	public CNE getAppointmentDurationUnits() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(869);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CNE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Appointment Reason.
	 * This field specify the identifier code for the reason that the appointment is to take place.
	 * @return CWE - appointmentReason
	 */
	public CWE getAppointmentReason() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(866);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Appointment Type.
	 * @return CWE - appointmentType
	 */
	public CWE getAppointmentType() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(867);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Entered By Location. 
	 * @return PL - enteredByLocation
	 */
	public PL getEnteredByLocation() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(880);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (PL)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Entered By Person.
	 * This field specify the person responsible for entering the request for the scheduling of an appointment. 
	 * @return ISingleCollection<XCN> - enteredByPerson
	 */
	public ISingleCollection<XCN> getEnteredByPerson() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(878);
		ISingleCollection<XCN> objDataList = new SingleCollection<XCN>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XCN objXCN = (XCN)objDataType;
				objDataList.add(objXCN);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Entered By Phone Number. 
	 * @return ISingleCollection<XTN> - enteredByPhoneNumber
	 */
	public ISingleCollection<XTN> getEnteredByPhoneNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(879);
		ISingleCollection<XTN> objDataList = new SingleCollection<XTN>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XTN objXTN = (XTN)objDataType;
				objDataList.add(objXTN);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Event Reason. 
	 * @return CWE - eventReason
	 */
	public CWE getEventReason() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(883);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Filler Appointment ID.  
	 * @return EI - fillerAppointmentID
	 */
	public EI getFillerAppointmentID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(861);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EI)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Filler Contact Address.
	 * @return ISingleCollection<XAD> - fillerContactAddress
	 */
	public ISingleCollection<XAD> getFillerContactAddress() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(887);
		ISingleCollection<XAD> objDataList = new SingleCollection<XAD>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XAD objXAD = (XAD)objDataType;
				objDataList.add(objXAD);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Filler Contact Location.
	 * @return PL - fillerContactLocation
	 */
	public PL getFillerContactLocation() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(888);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (PL)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Filler Contact Person.
	 * @return ISingleCollection<XCN> - fillerContactPerson
	 */
	public ISingleCollection<XCN> getFillerContactPerson() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(885);
		ISingleCollection<XCN> objDataList = new SingleCollection<XCN>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XCN objXCN = (XCN)objDataType;
				objDataList.add(objXCN);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Filler Contact Phone Number. 
	 * @return XTN - fillerContactPhoneNumber
	 */
	public XTN getFillerContactPhoneNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(886);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (XTN)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Filler Order Number.
	 * This field specify the order number assigned by the filler application for the order associated with this scheduling filler response.   
	 * @return ISingleCollection<EI> - fillerOrderNumber
	 */
	public ISingleCollection<EI> getFillerOrderNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(217);
		ISingleCollection<EI> objDataList = new SingleCollection<EI>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				EI objEI = (EI)objDataType;
				objDataList.add(objEI);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Filler Status Code. 
	 * @return CWE - fillerStatusCode
	 */
	public CWE getFillerStatusCode() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(889);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Occurrence Number. 
	 * @return NM - occurrenceNumber
	 */
	public NM getOccurrenceNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(862);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Parent Filler Appointment ID. 
	 * @return EI - parentFillerAppointmentID
	 */
	public EI getParentFillerAppointmentID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(882);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EI)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Parent Placer Appointment ID. 
	 * @return EI - parentPlacerAppointmentID
	 */
	public EI getParentPlacerAppointmentID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(881);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EI)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Placer Appointment ID.  
	 * @return EI - placerAppointmentID
	 */
	public EI getPlacerAppointmentID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(860);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EI)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Placer Contact Address. 
	 * @return ISingleCollection<XAD> - placerContactAddress
	 */
	public ISingleCollection<XAD> getPlacerContactAddress() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(876);
		ISingleCollection<XAD> objDataList = new SingleCollection<XAD>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XAD objXAD = (XAD)objDataType;
				objDataList.add(objXAD);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Placer Contact Location. 
	 * @return PL - placerContactLocation
	 */
	public PL getPlacerContactLocation() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(877);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (PL)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Placer Contact Person.  
	 * @return ISingleCollection<XCN> - placerContactPerson
	 */
	public ISingleCollection<XCN> getPlacerContactPerson() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(874);
		ISingleCollection<XCN> objDataList = new SingleCollection<XCN>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XCN objXCN = (XCN)objDataType;
				objDataList.add(objXCN);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Placer Contact Phone Number. 
	 * @return XTN - placerContactPhoneNumber
	 */
	public XTN getPlacerContactPhoneNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(875);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (XTN)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Placer Group Number. 
	 * @return EIP - placerGroupNumber
	 */
	public EIP getPlacerGroupNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(218);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EIP)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Placer Order Number. 
	 * @return ISingleCollection<EI> - placerOrderNumber
	 */
	public ISingleCollection<EI> getPlacerOrderNumber() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(216);
		ISingleCollection<EI> objDataList = new SingleCollection<EI>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				EI objEI = (EI)objDataType;
				objDataList.add(objEI);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Schedule ID.
	 * This field specify the identifier code for the schedule in which this appointment is (or will be) booked.  
	 * @return CWE - scheduleID
	 */
	public CWE getScheduleID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(864);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Set the Placer Appointment ID.
	 * @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 setPlacerAppointmentID (String strEntityIdentifier,String strNamespaceId,
			String strUniversalId,String strUniversalIdType)
	{
		EI placerAppointmentID  = (EI)getDataElement(860);
		placerAppointmentID.setEntityIdentifier(strEntityIdentifier);
		placerAppointmentID.setNamespaceId(strNamespaceId);
		placerAppointmentID.setUniversalId(strUniversalId);
		placerAppointmentID.setUniversalIdType(strUniversalIdType); 
		setPlacerAppointmentID(placerAppointmentID);

	} 

	/** 
	 * Set the Placer Appointment ID.
	 * @param objplacerAppointmentID Object of Placer Appointment ID. 
	 */ 
	public void setPlacerAppointmentID(EI objplacerAppointmentID)
	{
		setDataType(860,objplacerAppointmentID);

	}

	/**
	 * Set the Filler Appointment ID. 
	 * @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 setFillerAppointmentID (String strEntityIdentifier,String strNamespaceId,
			String strUniversalId,String strUniversalIdType)
	{
		EI fillerAppointmentID  = (EI)getDataElement(861);
		fillerAppointmentID.setEntityIdentifier(strEntityIdentifier);
		fillerAppointmentID.setNamespaceId(strNamespaceId);
		fillerAppointmentID.setUniversalId(strUniversalId);
		fillerAppointmentID.setUniversalIdType(strUniversalIdType); 
		setFillerAppointmentID(fillerAppointmentID);

	} 

	/** 
	 * Set the Filler Appointment ID. 
	 * @param objfillerAppointmentID Object of Filler Appointment ID.
	 */ 
	public void setFillerAppointmentID(EI objfillerAppointmentID)
	{
		setDataType(861,objfillerAppointmentID);

	}

	/**
	 * Set the Occurrence Number.
	 * @param strOccurrenceNumber Uniquely identify an individual occurrence (a child) of a parent repeating schedule appointment.
	 */ 
	public void setOccurrenceNumber (String strOccurrenceNumber) 
	{
		NM occurrenceNumber  = (NM)getDataElement(862);
		occurrenceNumber.setValue(strOccurrenceNumber); 
		setOccurrenceNumber(occurrenceNumber);

	} 

	/** 
	 * Set the Occurrence Number.
	 * @param objoccurrenceNumber object of Occurrence Number.
	 */ 
	public void setOccurrenceNumber(NM objoccurrenceNumber)
	{
		setDataType(862,objoccurrenceNumber);

	}

	/**
	 * Set the Placer Group Number.
	 * This field contains a unique identifier for the Placer Group as referenced by the Placer application, the Filler application, or both.
	 * @param objPlacerAssignedIdentifier Specifies an identifier assigned to an entity by the placer system.  
	 * @param objFillerAssignedIdentifier Specifies an identifier assigned to an entity by the filler system. 
	 */
	public void setPlacerGroupNumber (EI objPlacerAssignedIdentifier,EI objFillerAssignedIdentifier) 
	{
		EIP eip  = (EIP)getDataElement(218);
		eip.setPlacerAssignedIdentifier(objPlacerAssignedIdentifier);
		eip.setFillerAssignedIdentifier(objFillerAssignedIdentifier);
		setPlacerGroupNumber(eip);

	} 

	/** 
	 * Set the Placer Group Number.
	 * This field contains a unique identifier for the Placer Group as referenced by the Placer application, the Filler application, or both.
	 * @param objplacerGroupNumber Object of Placer Group Number. 
	 */ 
	public void setPlacerGroupNumber(EIP objplacerGroupNumber)
	{
		setDataType(218,objplacerGroupNumber);

	}

	/**
	 * Set the Schedule ID.
	 * This field specify the identifier code for the schedule in which this appointment is (or will be) booked.
	 * @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 setScheduleID (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(864);
		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); 
		setScheduleID(cwe);

	} 

	/** 
	 * Set the Schedule ID.
	 * This field specify the identifier code for the schedule in which this appointment is (or will be) booked.
	 * @param objscheduleID Object of Schedule ID.
	 */ 
	public void setScheduleID(CWE objscheduleID)
	{
		setDataType(864,objscheduleID);

	}

	/**
	 * Set the Event Reason.
	 * @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 setEventReason (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(883);
		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); 
		setEventReason(cwe);

	} 

	/** 
	 * Set the Event Reason.
	 * @param objeventReason Object of Event Reason.
	 */ 
	public void setEventReason(CWE objeventReason)
	{
		setDataType(883,objeventReason);

	}

	/**
	 * Set the Appointment Reason.
	 * This field specify the identifier code for the reason that the appointment is to take place.
	 * @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 setAppointmentReason (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(866);
		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);
		setAppointmentReason(cwe);

	} 

	/** 
	 * Set the Appointment Reason.
	 * This field specify the identifier code for the reason that the appointment is to take place.
	 * @param objappointmentReason Object of Appointment Reason.
	 */ 
	public void setAppointmentReason(CWE objappointmentReason)
	{
		setDataType(866,objappointmentReason);

	}

	/**
	 * Set the Appointment Type.
	 * This field contains the identifier code for the type of appointment.
	 * @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 setAppointmentType (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(867);
		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);
		setAppointmentType(cwe);

	} 

	/** 
	 * Set the Appointment Type.
	 * This field contains the identifier code for the type of appointment.
	 * @param objappointmentType Object of Appointment Type.
	 */ 
	public void setAppointmentType(CWE objappointmentType)
	{
		setDataType(867,objappointmentType);

	}

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

	} 

	/** 
	 * Set the Appointment Duration Units.  
	 * @param objappointmentDurationUnits Object of Appointment Duration Units.
	 */ 
	public void setAppointmentDurationUnits(CNE objappointmentDurationUnits)
	{
		setDataType(869,objappointmentDurationUnits);

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

	} 

	/** 
	 * Add the Placer Contact Person.
	 * @param objplacerContactPerson Object of Placer Contact Person.
	 */ 
	public void addPlacerContactPerson(XCN objplacerContactPerson)
	{
		addDataType(874,objplacerContactPerson);

	} 

	/** 
	 * Set the Placer Contact Person.
	 * @param objplacerContactPersonList List of Placer Contact Person.
	 */ 
	@SuppressWarnings("unchecked")
	public void setPlacerContactPerson(ISingleCollection<XCN> objplacerContactPersonList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objplacerContactPersonList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(874,objCollection);
	}

	/**
	 * Set the Placer Contact Phone Number.
	 * This field contains the phone number used to contact the SCH-12-Placer Contact Person.
	 * @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 setPlacerContactPhoneNumber (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(875);
//		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); 
		setPlacerContactPhoneNumber(xtn);
	} 

	/** 
	 * Set the Placer Contact Phone Number.
	 * @param objplacerContactPhoneNumber Object of Placer Contact Phone Number.
	 */ 
	public void setPlacerContactPhoneNumber(XTN objplacerContactPhoneNumber)
	{
		setDataType(875,objplacerContactPhoneNumber);

	}

	/**
	 * Add the Placer Contact Address.
	 * This field contains the address used to contact the SCH-12-Placer Contact Person.
	 * @param objStreetAddress Specifies the street address.
	 * @param strOtherDesignation Specifies the Second line of address. 
	 * @param strCity The city, or district or place where the addressee is located. 
	 * @param strStateOrProvince Specifies the state or province where the addressee is located.
	 * @param strZipOrPostalCode Specifies the zip or postal code where the addressee is located. 
	 * @param strCountry Specifies the country where the addressee is located.
	 * @param strAddressType Specifies the kind or type of address.
	 * @param strOtherGeographicDesignation Specifies any other geographic designation. 
	 * @param objCountyParishCode Specifies a code that represents the county in which the specified address resides. 
	 * @param objCensusTract Specifies a code that represents the census tract in which the specified address resides. 
	 * @param strAddressRepresentationCode Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]
	 * @param objEffectiveDate It is The first date, if known, on which the address is valid and active.
	 * @param objExpirationDate It is The last date, if known, on which the address is valid and active.
	 * @param objExpirationReason indicates why this address was marked as ended.
	 * @param strTemporaryIndicator indicates whether address is considered temporary .
	 * @param strBadAddressIndicator indicates whether it is possible to contact the owning entity.
	 * @param strAddressUsage indicates how the address is intended to be used.
	 * @param strAddressee indicates the name of the person whose address is intended to be used.
	 * @param strComment indicated descriptive information
	 * @param strPreferenceOrder preference order
	 * @param objProtectionCode indicates that an address need to be protected
	 * @param objAdressIdentifier indicates a unique identifier for address
	 */  
	public void addPlacerContactAddress (SAD objStreetAddress,String strOtherDesignation,String strCity,
			String strStateOrProvince,String strZipOrPostalCode,String strCountry,String strAddressType,
			String strOtherGeographicDesignation,CWE objCountyParishCode,CWE objCensusTract,
			String strAddressRepresentationCode,DTM objEffectiveDate,
			DTM objExpirationDate, CWE objEXpirationReason, String strTemporaryIndicator,
			String strBadAddressIndicator, String strAddressUsage, String strAddressee, String strComment,
			String strPreferenceOrder, CWE objProtectionCode, EI objAddressIdentifier)
	{

		XAD xad = (XAD)getDataElement(876);
		xad.setStreetAddress(objStreetAddress);
		xad.setOtherDesignation(strOtherDesignation);
		xad.setCity(strCity);
		xad.setStateOrProvince(strStateOrProvince);
		xad.setZipOrPostalCode(strZipOrPostalCode);
		xad.setCountry(strCountry);
		xad.setAddressType(strAddressType);
		xad.setOtherGeographicDesignation(strOtherGeographicDesignation);
		xad.setCountyParishCode(objCountyParishCode);
		xad.setCensusTract(objCensusTract);
		xad.setAddressRepresentationCode(strAddressRepresentationCode);
 
		xad.setEffectiveDate(objEffectiveDate);
		xad.setExpirationDate(objExpirationDate); 
		xad.setExpirationReason(objEXpirationReason);
		xad.setTemporaryIndicator(strTemporaryIndicator);
		xad.setBadAddressIndicator(strBadAddressIndicator);
		xad.setAddressUsage(strAddressUsage);
		xad.setAddressee(strAddressee);
		xad.setComment(strComment);
		xad.setPreferenceOrder(strPreferenceOrder);
		xad.setProtectionCode(objProtectionCode);
		xad.setAddressIdentifier(objAddressIdentifier);
		addPlacerContactAddress(xad);
	} 

	/** 
	 * Add the Placer Contact Address.
	 * @param objplacerContactAddress Object of Placer Contact Address.
	 */ 
	public void addPlacerContactAddress(XAD objplacerContactAddress)
	{
		addDataType(876,objplacerContactAddress);

	} 

	/** 
	 * Set the Placer Contact Address.
	 * @param objplacerContactAddressList List of Placer Contact Address.
	 */ 
	@SuppressWarnings("unchecked")
	public void setPlacerContactAddress(ISingleCollection<XAD> objplacerContactAddressList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objplacerContactAddressList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(876,objCollection);
	}

	/**
	 * Set the Placer Contact Location. 
	 * This field contains a code that identifies the location of the SCH-12-Placer Contact Person. 
	 * @param strPointOfCare Use as PointOfCare.
	 * @param strRoom Use as Room.
	 * @param strBed Use as Bed.
	 * @param objFacility Use as Facility.
	 * @param strLocationStatus Use as LocationStatus.
	 * @param strPersonLocationType Use as PersonLocationType.
	 * @param strBuilding Use as Building.
	 * @param strFloor Use as Floor.
	 * @param strLocationDescription Use as LocationDescription.
	 * @param objComprehensiveLocationIdentifier Use as ComprehensiveLocationIdentifier.
	 * @param objAssigningAuthorityForLocation Use as AssigningAuthorityForLocation.
	 */ 
	public void setPlacerContactLocation (HD objPointOfCare, HD objRoom, HD objBed, HD objFacility,
			String strLocationStatus, String strPersonLocationType, HD objBuilding, HD objFloor, 
			String strLocationDescription, EI objComprehensiveLocationIdentifier, HD objAssigningAuthorityForLocation)
	{
		PL pl = (PL)getDataElement(877);
		pl.setPointOfCare(objPointOfCare);
		pl.setRoom(objRoom);
		pl.setBed(objBed);
		pl.setFacility(objFacility);
		pl.setLocationStatus(strLocationStatus);
		pl.setPersonLocationType(strPersonLocationType);
		pl.setBuilding(objBuilding);
		pl.setFloor(objFloor);
		pl.setLocationDescription(strLocationDescription);
		pl.setComprehensiveLocationIdentifier(objComprehensiveLocationIdentifier);
		pl.setAssigningAuthorityForLocation(objAssigningAuthorityForLocation); 
		setPlacerContactLocation(pl);

	} 

	/** 
	 * Set the Placer Contact Location. 
	 * This field contains a code that identifies the location of the SCH-12-Placer Contact Person. 
	 * @param objplacerContactLocation Object of Placer Contact Location. 
	 */ 
	public void setPlacerContactLocation(PL objplacerContactLocation)
	{
		setDataType(877,objplacerContactLocation);

	}

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

	/**
	 * Add the Filler Contact Person.
	 * @param objfillerContactPerson Object of Filler Contact Person.
	 */
	public void addFillerContactPerson(XCN objfillerContactPerson)
	{
		addDataType(885,objfillerContactPerson);
	}

	/**
	 * Set the Filler Contact Person.
	 * @param objfillerContactPersonList List of Filler Contact Person.
	 */
	@SuppressWarnings("unchecked")
	public void setFillerContactPerson(ISingleCollection<XCN> objfillerContactPersonList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objfillerContactPersonList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(885,objCollection);
	}

	/**
	 * Set the Filler Contact Phone Number.
	 * This field contains the phone number used to contact the SCH-16-Filler Contact Person.
	 * @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 setFillerContactPhoneNumber (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(886);
//		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); 
		setFillerContactPhoneNumber(xtn);

	} 

	/** 
	 * Set the Filler Contact Phone Number.
	 * @param objfillerContactPhoneNumber Object of Filler Contact Phone Number.
	 */ 
	public void setFillerContactPhoneNumber(XTN objfillerContactPhoneNumber)
	{
		setDataType(886,objfillerContactPhoneNumber);

	}

	/**
	 * Add the Filler Contact Address.
	 * This field contains the address used to contact the SCH-16-Filler Contact Person.
	 * @param objStreetAddress Specifies the street address.
	 * @param strOtherDesignation Specifies the Second line of address. 
	 * @param strCity The city, or district or place where the addressee is located. 
	 * @param strStateOrProvince Specifies the state or province where the addressee is located.
	 * @param strZipOrPostalCode Specifies the zip or postal code where the addressee is located. 
	 * @param strCountry Specifies the country where the addressee is located.
	 * @param strAddressType Specifies the kind or type of address.
	 * @param strOtherGeographicDesignation Specifies any other geographic designation. 
	 * @param objCountyParishCode Specifies a code that represents the county in which the specified address resides. 
	 * @param objCensusTract Specifies a code that represents the census tract in which the specified address resides. 
	 * @param strAddressRepresentationCode Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]
	 * @param objEffectiveDate It is The first date, if known, on which the address is valid and active.
	 * @param objExpirationDate It is The last date, if known, on which the address is valid and active.
	 * @param objExpirationReason indicates why this address was marked as ended.
	 * @param strTemporaryIndicator indicates whether address is considered temporary .
	 * @param strBadAddressIndicator indicates whether it is possible to contact the owning entity.
	 * @param strAddressUsage indicates how the address is intended to be used.
	 * @param strAddressee indicates the name of the person whose address is intended to be used.
	 * @param strComment indicated descriptive information
	 * @param strPreferenceOrder preference order
	 * @param objProtectionCode indicates that an address need to be protected
	 * @param objAdressIdentifier indicates a unique identifier for address
	 */ 
	public void addFillerContactAddress (SAD objStreetAddress,String strOtherDesignation,String strCity,
			String strStateOrProvince,String strZipOrPostalCode,String strCountry,String strAddressType,
			String strOtherGeographicDesignation,CWE objCountyParishCode,CWE objCensusTract,
			String strAddressRepresentationCode,DTM objEffectiveDate,
			DTM objExpirationDate, CWE objEXpirationReason, String strTemporaryIndicator,
			String strBadAddressIndicator, String strAddressUsage, String strAddressee, String strComment,
			String strPreferenceOrder, CWE objProtectionCode, EI objAddressIdentifier)
	{
		XAD xad = (XAD)getDataElement(887);
		xad.setStreetAddress(objStreetAddress);
		xad.setOtherDesignation(strOtherDesignation);
		xad.setCity(strCity);
		xad.setStateOrProvince(strStateOrProvince);
		xad.setZipOrPostalCode(strZipOrPostalCode);
		xad.setCountry(strCountry);
		xad.setAddressType(strAddressType);
		xad.setOtherGeographicDesignation(strOtherGeographicDesignation);
		xad.setCountyParishCode(objCountyParishCode);
		xad.setCensusTract(objCensusTract);
		xad.setAddressRepresentationCode(strAddressRepresentationCode);
 
		xad.setEffectiveDate(objEffectiveDate);
		xad.setExpirationDate(objExpirationDate); 
		xad.setExpirationReason(objEXpirationReason);
		xad.setTemporaryIndicator(strTemporaryIndicator);
		xad.setBadAddressIndicator(strBadAddressIndicator);
		xad.setAddressUsage(strAddressUsage);
		xad.setAddressee(strAddressee);
		xad.setComment(strComment);
		xad.setPreferenceOrder(strPreferenceOrder);
		xad.setProtectionCode(objProtectionCode);
		xad.setAddressIdentifier(objAddressIdentifier);
		addFillerContactAddress(xad);

	} 

	/** 
	 * Add the Filler Contact Address.
	 * @param objfillerContactAddress Object of Filler Contact Address.
	 */ 
	public void addFillerContactAddress(XAD objfillerContactAddress)
	{
		addDataType(887,objfillerContactAddress);

	} 

	/** 
	 * Set the Filler Contact Address.
	 * @param objfillerContactAddressList List of Filler Contact Address.
	 */ 
	@SuppressWarnings("unchecked")
	public void setFillerContactAddress(ISingleCollection<XAD> objfillerContactAddressList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objfillerContactAddressList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(887,objCollection);
	}

	/**
	 * Set the Filler Contact Location.
	 * This field contains a code that identifies the location of the SCH-16-Filler Contact Person.
	 * @param strPointOfCare Use as PointOfCare.
	 * @param strRoom Use as Room.
	 * @param strBed Use as Bed.
	 * @param objFacility Use as Facility.
	 * @param strLocationStatus Use as LocationStatus.
	 * @param strPersonLocationType Use as PersonLocationType.
	 * @param strBuilding Use as Building.
	 * @param strFloor Use as Floor.
	 * @param strLocationDescription Use as LocationDescription.
	 * @param objComprehensiveLocationIdentifier Use as ComprehensiveLocationIdentifier.
	 * @param objAssigningAuthorityForLocation Use as AssigningAuthorityForLocation.
	 */
	public void setFillerContactLocation (HD objPointOfCare, HD objRoom, HD objBed, HD objFacility,
			String strLocationStatus, String strPersonLocationType, HD objBuilding, HD objFloor, 
			String strLocationDescription, EI objComprehensiveLocationIdentifier, HD objAssigningAuthorityForLocation)
	{
		PL pl  = (PL)getDataElement(888);
		pl.setPointOfCare(objPointOfCare);
		pl.setRoom(objRoom);
		pl.setBed(objBed);
		pl.setFacility(objFacility);
		pl.setLocationStatus(strLocationStatus);
		pl.setPersonLocationType(strPersonLocationType);
		pl.setBuilding(objBuilding);
		pl.setFloor(objFloor);
		pl.setLocationDescription(strLocationDescription);
		pl.setComprehensiveLocationIdentifier(objComprehensiveLocationIdentifier);
		pl.setAssigningAuthorityForLocation(objAssigningAuthorityForLocation);  
		setFillerContactLocation(pl);

	} 

	/** 
	 * Set the Filler Contact Location.
	 * @param objfillerContactLocation Object of Filler Contact Location.
	 */ 
	public void setFillerContactLocation(PL objfillerContactLocation)
	{
		setDataType(888,objfillerContactLocation);

	}

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

	} 

	/** 
	 * Add the Entered By Person.
	 * This field specify the person responsible for entering the request for the scheduling of an appointment.
	 * @param objenteredByPerson Object of Entered By Person.
	 */ 
	public void addEnteredByPerson(XCN objenteredByPerson)
	{
		addDataType(878,objenteredByPerson);

	} 

	/** 
	 * Set the Entered By Person.
	 * This field specify the person responsible for entering the request for the scheduling of an appointment.
	 * @param objenteredByPersonList List of Entered By Person.
	 */ 
	@SuppressWarnings("unchecked")
	public void setEnteredByPerson(ISingleCollection<XCN> objenteredByPersonList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objenteredByPersonList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(878,objCollection);
	}

	/**
	 * Add the Entered By Phone Number.
	 * This field contains the phone number used to contact the ARQ-19-Entered by Person.
	 * @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 addEnteredByPhoneNumber (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(879);
//		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);
		addEnteredByPhoneNumber(xtn);

	} 

	/** 
	 * Add the Entered By Phone Number.
	 * @param objenteredByPhoneNumber Object of Entered By Phone Number.
	 */ 
	public void addEnteredByPhoneNumber(XTN objenteredByPhoneNumber)
	{
		addDataType(879,objenteredByPhoneNumber);

	} 

	/** 
	 * Set the Entered By Phone Number.
	 * @param objenteredByPhoneNumberList List of Entered By Phone Number.
	 */ 
	@SuppressWarnings("unchecked")
	public void setEnteredByPhoneNumber(ISingleCollection<XTN> objenteredByPhoneNumberList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objenteredByPhoneNumberList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(879,objCollection);
	}

	/**
	 * Set the Entered By Location.
	 * This field contains a code that identifies the location of the entered by person.  
	 * @param strPointOfCare Use as PointOfCare.
	 * @param strRoom Use as Room.
	 * @param strBed Use as Bed.
	 * @param objFacility Use as Facility.
	 * @param strLocationStatus Use as LocationStatus.
	 * @param strPersonLocationType Use as PersonLocationType.
	 * @param strBuilding Use as Building.
	 * @param strFloor Use as Floor.
	 * @param strLocationDescription Use as LocationDescription.
	 * @param objComprehensiveLocationIdentifier Use as ComprehensiveLocationIdentifier.
	 * @param objAssigningAuthorityForLocation Use as AssigningAuthorityForLocation.
	 */ 
	public void setEnteredByLocation (HD objPointOfCare, HD objRoom, HD objBed, HD objFacility,
			String strLocationStatus, String strPersonLocationType, HD objBuilding, HD objFloor, 
			String strLocationDescription, EI objComprehensiveLocationIdentifier, HD objAssigningAuthorityForLocation)
	{
		PL pl  = (PL)getDataElement(880);
		pl.setPointOfCare(objPointOfCare);
		pl.setRoom(objRoom);
		pl.setBed(objBed);
		pl.setFacility(objFacility);
		pl.setLocationStatus(strLocationStatus);
		pl.setPersonLocationType(strPersonLocationType);
		pl.setBuilding(objBuilding);
		pl.setFloor(objFloor);
		pl.setLocationDescription(strLocationDescription);
		pl.setComprehensiveLocationIdentifier(objComprehensiveLocationIdentifier);
		pl.setAssigningAuthorityForLocation(objAssigningAuthorityForLocation); 
		setEnteredByLocation(pl);

	} 

	/** 
	 * Set the Entered By Location.
	 * @param objenteredByLocation Object of Entered By Location.
	 */ 
	public void setEnteredByLocation(PL objenteredByLocation)
	{
		setDataType(880,objenteredByLocation);

	}

	/**
	 * Set the Parent Filler Appointment ID.
	 * @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 setParentFillerAppointmentID (String strEntityIdentifier,String strNamespaceId,
			String strUniversalId,String strUniversalIdType)
	{
		EI parentFillerAppointmentID  = (EI)getDataElement(882);
		parentFillerAppointmentID.setEntityIdentifier(strEntityIdentifier);
		parentFillerAppointmentID.setNamespaceId(strNamespaceId);
		parentFillerAppointmentID.setUniversalId(strUniversalId);
		parentFillerAppointmentID.setUniversalIdType(strUniversalIdType); 
		setParentFillerAppointmentID(parentFillerAppointmentID);

	} 

	/** 
	 * Set the Parent Filler Appointment ID.
	 * @param objparentFillerAppointmentID Object of Parent Filler Appointment ID.
	 */ 
	public void setParentFillerAppointmentID(EI objparentFillerAppointmentID)
	{
		setDataType(882,objparentFillerAppointmentID);

	}

	/**
	 * Set the Parent Placer Appointment ID.
	 * @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 setParentPlacerAppointmentID (String strEntityIdentifier,String strNamespaceId,
			String strUniversalId,String strUniversalIdType)
	{
		EI parentPlacerAppointmentID  = (EI)getDataElement(881);
		parentPlacerAppointmentID.setEntityIdentifier(strEntityIdentifier);
		parentPlacerAppointmentID.setNamespaceId(strNamespaceId);
		parentPlacerAppointmentID.setUniversalId(strUniversalId);
		parentPlacerAppointmentID.setUniversalIdType(strUniversalIdType); 
		setParentPlacerAppointmentID(parentPlacerAppointmentID);

	} 

	/** 
	 * Set the Parent Placer Appointment ID.
	 * @param objparentPlacerAppointmentID Object of Parent Placer Appointment ID. 
	 */ 
	public void setParentPlacerAppointmentID(EI objparentPlacerAppointmentID)
	{
		setDataType(881,objparentPlacerAppointmentID);

	}

	/**
	 * Set the Filler Status Code.
	 * This field contains a code describing the status of the appointment with respect to the filler application.
	 * @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 setFillerStatusCode(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(889);
		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);
		setFillerStatusCode(cwe);
	}

	/**
	 * Set the Filler Status Code.
	 * @param objfillerStatusCode Object of Filler Status Code.
	 */
	public void setFillerStatusCode(CWE objfillerStatusCode)
	{
		setDataType(889,objfillerStatusCode);
	}

	/**
	 * Add the Placer Order Number.
	 * @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 addPlacerOrderNumber (String strEntityIdentifier,String strNamespaceId,
			String strUniversalId,String strUniversalIdType)
	{
		EI placerOrderNumber  = (EI)getDataElement(216);
		placerOrderNumber.setEntityIdentifier(strEntityIdentifier);
		placerOrderNumber.setNamespaceId(strNamespaceId);
		placerOrderNumber.setUniversalId(strUniversalId);
		placerOrderNumber.setUniversalIdType(strUniversalIdType); 
		addPlacerOrderNumber(placerOrderNumber);

	} 

	/** 
	 * Add the Placer Order Number.
	 * @param objplacerOrderNumber Object of Placer Order Number. 
	 */ 
	public void addPlacerOrderNumber(EI objplacerOrderNumber)
	{
		addDataType(216,objplacerOrderNumber);

	} 

	/** 
	 * Set the Placer Order Number.
	 * @param objplacerOrderNumberList List of Placer Order Number. 
	 */ 
	@SuppressWarnings("unchecked")
	public void setPlacerOrderNumber(ISingleCollection<EI> objplacerOrderNumberList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objplacerOrderNumberList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(216,objCollection);
	}

	/**
	 * Add the Filler Order Number.
	 * This field specify the order number assigned by the filler application for the order associated with this scheduling filler response.
	 * @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 addFillerOrderNumber (String strEntityIdentifier,String strNamespaceId,
			String strUniversalId,String strUniversalIdType)
	{
		EI fillerOrderNumber  = (EI)getDataElement(217);
		fillerOrderNumber.setEntityIdentifier(strEntityIdentifier);
		fillerOrderNumber.setNamespaceId(strNamespaceId);
		fillerOrderNumber.setUniversalId(strUniversalId);
		fillerOrderNumber.setUniversalIdType(strUniversalIdType); 
		addFillerOrderNumber(fillerOrderNumber);

	} 

	/** 
	 * Add the Filler Order Number.
	 * This field specify the order number assigned by the filler application for the order associated with this scheduling filler response.
	 * @param objfillerOrderNumber Object of Filler Order Number.
	 */ 
	public void addFillerOrderNumber(EI objfillerOrderNumber)
	{
		addDataType(217,objfillerOrderNumber);

	} 

	/** 
	 * Set the Filler Order Number.
	 * This field specify the order number assigned by the filler application for the order associated with this scheduling filler response.
	 * @param objfillerOrderNumberList List of Filler Order Number.
	 */ 
	@SuppressWarnings("unchecked")
	public void setFillerOrderNumber(ISingleCollection<EI> objfillerOrderNumberList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objfillerOrderNumberList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(217,objCollection);
	}

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

			/*
			 * Placer order number is present, then a Filler order number (Section 10.6.1.25) must also be present. 
			 * Filler Order Number  is conditionally mandatory depending on the presence of the Placer order number;
			 */
			ISingleCollection<EI> placerOrderNumber = getPlacerOrderNumber(); 
			ISingleCollection<EI> fillerOrderNumber = getFillerOrderNumber();

			if((placerOrderNumber == null ^ fillerOrderNumber == null))
			{
				String str = objSegmentMap.getFieldName(216) + ":" + objSegmentMap.getFieldName(217) + ResourceBundleWrapper.getValue("exceptions", "SegmentCondition", new Locale(HL7Config.createInstance().getLocale()));
				
					throw new FieldMissingException(str);
			}
			if(placerOrderNumber != null && fillerOrderNumber != null)
			{
				if(placerOrderNumber.size() != fillerOrderNumber.size())
				{
					String str = objSegmentMap.getFieldName(216) + ":" + objSegmentMap.getFieldName(217) + ResourceBundleWrapper.getValue("exceptions", "SegmentCondition", new Locale(HL7Config.createInstance().getLocale()));
					
						throw new FieldMissingException(str);
				}

				for (int i = 0; i <= placerOrderNumber.size(); i++) 
				{
					if(placerOrderNumber.iterator().next() == null ^ fillerOrderNumber.iterator().next() == null)
					{
						String str = objSegmentMap.getFieldName(216) + ":" + objSegmentMap.getFieldName(217) + ResourceBundleWrapper.getValue("exceptions", "SegmentCondition", new Locale(HL7Config.createInstance().getLocale()));
						
							throw new FieldMissingException(str);
					}
				}
			}

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