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

import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.CX;
import cdac.medinfo.sdk.hl7282.baselibs.DT;
import cdac.medinfo.sdk.hl7282.baselibs.HD;
import cdac.medinfo.sdk.hl7282.baselibs.ID;
import cdac.medinfo.sdk.hl7282.baselibs.XON;
import cdac.medinfo.sdk.hl7282.commoninterface.IDataType;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;
import cdac.medinfo.sdk.hl7282.exceptions.InvalidSegmentException;
import cdac.medinfo.sdk.hl7282.utils.EnumSegments;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;

/**
 * PD1 - Patient Additional Demographic Segment<p>
 * This class represents patient additional demographic segment.
 * The patient additional demographic segment contains demographic information 
 * that is likely to change about the patient
 * <p>Represents an HL7 PD1 message segment. 
 * This segment has the following fields:</p><p>
 * PD1-1: Living Dependency (CWE)<b>Optional</b><br> 
 * PD1-2: Living Arrangement (CWE)<b>Optional</b><br> 
 * PD1-3: Patient Primary Facility (XON)<b>Optional</b><br> 
 * PD1-4: Patient Primary Care Provider Name & ID No. (XCN)<b>Withdrawn</b><br> 
 * PD1-5: Student Indicator (CWE)<b>Optional</b><br> 
 * PD1-6: Handicap (CWE)<b>Optional</b><br> 
 * PD1-7: Living Will Code (CWE)<b>Optional</b><br> 
 * PD1-8: Organ Donor Code (CWE)<b>Optional</b><br> 
 * PD1-9: Separate Bill (ID)<b>Optional</b><br> 
 * PD1-10: Duplicate Patient (CX)<b>Optional</b><br> 
 * PD1-11: Publicity Code (CWE)<b>Optional</b><br> 
 * PD1-12: Protection Indicator (ID)<b>Optional</b><br> 
 * PD1-13: Protection Indicator Effective Date (DT)<b>Optional</b><br> 
 * PD1-14: Place of Worship (XON)<b>Optional</b><br> 
 * PD1-15: Advance Directive Code (CWE)<b>Optional</b><br> 
 * PD1-16: Immunization Registry Status (CWE)<b>Optional</b><br> 
 * PD1-17: Immunization Registry Status Effective Date (DT)<b>Optional</b><br> 
 * PD1-18: Publicity Code Effective Date (DT)<b>Optional</b><br> 
 * PD1-19: Military Branch (CWE)<b>Optional</b><br> 
 * PD1-20: Military Rank/Grade (CWE)<b>Optional</b><br> 
 * PD1-21: Military Status (CWE)<b>Optional</b><br><p>
 * PD1-22: Advance Directive Last Verified Date (DT)<b>Optional</b><br><p>
 * This class provides mechanism to validate message against HL7 v 2.8.2 standard.
 * The class provides accessors & mutators for the elements mentioned above.
 * The class has validate method which validates Message against HL7 v 2.8.2 standard.
 *
 * <p>User can also create Segment through {@link SegmentFactory}
 */
 public class PD1 extends Segment   
{
	

	/**
	 * Constucts the PD1 segment.
	 */
	public PD1()
	{super(EnumSegments.HL7_SEG_PD1);
	}
	//Integer values used in getter/setter is unique item id defined 
	//for each attribute.

	/**
	 * Retrieves the Advance Directive Code.
	 * This field indicates the patient's instructions to the healthcare facility. 
	 * @return ISingleCollection<CE> - advanceDirectiveCode
	 */
	public ISingleCollection<CWE> getAdvanceDirectiveCode() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1568);
		ISingleCollection<CWE> objDataList = new SingleCollection<CWE>();
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				CWE objCWE = (CWE)objDataType;
				objDataList.add(objCWE);
			}
		}

		return objDataList;
	}

	/**
	 * Retrieves the Duplicate Patient.
	 * This field indicates that a patient is the same as, or a duplicate of, another patient found on the sending system.
	 * @return ISingleCollection<CX> - duplicatePatient
	 */
	public ISingleCollection<CX> getDuplicatePatient() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(762);
		ISingleCollection<CX> objDataList = new SingleCollection<CX>();
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				CX objCX = (CX)objDataType;
				objDataList.add(objCX);
			}
		}

		return objDataList;
	}

	/**
	 * Retrieves the Handicap.
	 * This field indicates the nature of the patient's permanent handicapped condition.
	 * @return String - handicap
	 */
	public CWE getHandicap() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(753);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Immunization Registry Status.
	 * This field identify the registry status of the patient.  
	 * @return String - immunizationRegistryStatus
	 */
	public CWE getImmunizationRegistryStatus()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1569);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Immunization RS Effective Date.
	 * This field indicates the effective date for the registry status reported in PD1-16 - Immunization Registry Status.
	 * @return String - immunizationRSEffectiveDate
	 */
	public DT getImmunizationRSEffectiveDate()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1570);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DT)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Living Arrangement.
	 * This field identify the situation in which the patient lives at his residential address.  
	 * @return String - livingArrangement
	 */
	public CWE getLivingArrangement()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(742);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Living Dependency.
	 * This field identify specific living conditions.
	 * @return ISingleCollection<CWE> - livingDependency
	 */
	public ISingleCollection<CWE> getLivingDependency()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(755);
		ISingleCollection<CWE> objDataList = new SingleCollection<CWE>();
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				CWE objCWE = (CWE)objDataType;
				objDataList.add(objCWE);
			}
		}

		return objDataList;
	}

	/**
	 * Retrieves the Living Will Code.
	 * This field indicates whether the patient has a living will or not and, if so, whether a copy of the living will is on file at the healthcare facility or not.  
	 * @return String - livingWillCode
	 */
	public CWE getLivingWillCode()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(759);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Military Branch.
	 * This field is defined by CMS or other regulatory agencies. 
	 * @return String - militaryBranch
	 */
	public CWE getMilitaryBranch() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1572);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Military Rank Grade.
	 * this field identify the military rank/grade of the patient.  
	 * @return String - militaryRank_Grade
	 */
	public CWE getMilitaryRank_Grade() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(486);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Military Status.
	 * This field is defined by CMS or other regulatory agencies.  
	 * @return String - militaryStatus
	 */
	public CWE getMilitaryStatus() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1573);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Organ Donor Code.
	 * This field indicates whether the patient wants to donate his/her organs and whether an organ donor card or similar documentation is on file with the healthcare organization.  
	 * @return String - organDonorCode
	 */
	public CWE getOrganDonorCode()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(760);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Patient Primary Facility.
	 * This field contains the name and identifier that specifies the "primary care" healthcare facility selected by the patient at the time of enrolment in an HMO Insurance Plan. 
	 * @return ISingleCollection<XON> - patientPrimaryFacility
	 */
	public ISingleCollection<XON> getPatientPrimaryFacility()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(756);
		ISingleCollection<XON> objDataList = new SingleCollection<XON>();
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XON objXON = (XON)objDataType;
				objDataList.add(objXON);
			}
		}

		return objDataList;
	}

	/**
	 * Retrieves the Place Of Worship.
	 * @return ISingleCollection<XON> - placeOfWorship
	 */
	public ISingleCollection<XON> getPlaceOfWorship()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1567);
		ISingleCollection<XON> objDataList = new SingleCollection<XON>();
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XON objXON = (XON)objDataType;
				objDataList.add(objXON);
			}
		}

		return objDataList;
	}

	/**
	 * Retrieves the Protection IE Date.
	 * This field indicates the effective date for PD1-12 - Protection Indicator.
	 * @return String - protectionIEDate
	 */
	public DT getProtectionIEDate()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1566);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DT)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Advance Directive Last Verified Date.
	 * This field indicates the date that all the advance directive held in Advance directive code was last verified.
	 * @return String - AdvanceDirectiveLastVerifiedCode
	 */
	public DT getAdvanceDirectiveLastVerifiedDate()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(2141);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DT)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Protection Indicator.
	 * This field identify the patient's protection that determines, in turn, whether access to information about this person should be kept from users who do not have adequate authority for the patient. 
	 * @return String - protectionIndicator
	 */
	public ID getProtectionIndicator()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(744);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Publicity Code.
	 * This field contains a user-defined code indicating what level of publicity is allowed (e.g., No Publicity, Family Only) for the patient. 
	 * @return CE - publicityCode
	 */
	public CWE getPublicityCode() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(743);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Publicity Code Effective Date.   
	 * @return String - publicityCodeEffectiveDate
	 */
	public DT getPublicityCodeEffectiveDate()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1571);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DT)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Separate Bill.
	 * This field specify the charges for this patient are to be billed separately from other patient bills with the same guarantor.  
	 * @return String - separateBill
	 */
	public ID getSeparateBill() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(761);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Student Indicator.
	 * This field indicates if the patient is currently a student or not, and whether the patient is a full-time or a part-time student. 
	 * @return String - studentIndicator
	 */
	public CWE getStudentIndicator()
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(745);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Set the Advance Directive Code.
	 * This field indicates the patient's instructions to the healthcare facility. 
	 * @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 addAdvanceDirectiveCode (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 tempAdvanceDirectiveCode  = (CWE)getDataElement(1568);
		tempAdvanceDirectiveCode.setIdentifier(strIdentifier);
		tempAdvanceDirectiveCode.setText(strText);
		tempAdvanceDirectiveCode.setNameOfCodingSystem(strNameOfCodingSystem);
		tempAdvanceDirectiveCode.setAlternateIdentifier(strAlternateIdentifier);
		tempAdvanceDirectiveCode.setAlternateText(strAlternateText);
		tempAdvanceDirectiveCode.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		tempAdvanceDirectiveCode.setCodingSystemVersionID(strCodingSystemVersionID);
		tempAdvanceDirectiveCode.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		tempAdvanceDirectiveCode.setOriginalText(strOriginalText);
		tempAdvanceDirectiveCode.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		tempAdvanceDirectiveCode.setSecondAlternateText(strSecondAlternateText);
		tempAdvanceDirectiveCode.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		tempAdvanceDirectiveCode.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		tempAdvanceDirectiveCode.setCodingSystemOID(strCodingSystemOID);
		tempAdvanceDirectiveCode.setValueSetOID(strValueSetOID);
		tempAdvanceDirectiveCode.setValueSetVersionID(strValueSetVersionID);
		tempAdvanceDirectiveCode.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		tempAdvanceDirectiveCode.setAlternateValueSetOID(strAlternateValueSetOID);
		tempAdvanceDirectiveCode.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		tempAdvanceDirectiveCode.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		tempAdvanceDirectiveCode.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		tempAdvanceDirectiveCode.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID); 
		addAdvanceDirectiveCode(tempAdvanceDirectiveCode);

	} 

	/** Set the Advance Directive Code.
	 * This field indicates the patient's instructions to the healthcare facility. 
	 * @param objtempAdvanceDirectiveCode object of Advance Directive Code.
	 */ 
	public void addAdvanceDirectiveCode(CWE objtempAdvanceDirectiveCode)
	{
		addDataType(1568,objtempAdvanceDirectiveCode);
	}	
	/**
	 * Set the Advance Directive Code List.
	 * @param objAdvanceDirectiveCodeList List of Advance Directive Code List.
	 */	
	@SuppressWarnings("unchecked")
	public void setAdvanceDirectiveCode(ISingleCollection<CWE> objAdvanceDirectiveCodeList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objAdvanceDirectiveCodeList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(1568,objCollection);
	}

	/**
	 * Set the Duplicate Patient.
	 * This field indicates that a patient is the same as, or a duplicate of, another patient found on the sending system.
	* facility to uniquely identify a patient.
	 * @param strIDNumber Specifies the value of the identifier itself.
	 * @param strCheckDigit It is part of the identifying number used in the sending application. 
	 * @param strCheckDigitScheme Contains the code identifying the check digit scheme employed.
	 * 								Suggested Values NP,ISO,M10,M11.[Refer table No.0061].
	 * @param objAssigningAuthority The assigning authority is a unique name of the system (or organization or agency 
	 * 									or department) that creates the data. . 
	 * @param strIdentifierTypeCode Specifies a code corresponding to the type of identifier.In some cases, this code may be
	 * 								 used as a qualifier to the "Assigning authority" component.[Refer table No 0203]
	 * @param objAssigningFacility Specifies the place or location identifier where the identifier was first assigned 
	 * 									to the patient. 
	 * @param strEffectiveDate Specifies the first date, if known, on which the address is valid and active.
	 * @param strExpirationDate Specifies the last date, if known, on which the address is valid and active.
	 * @param objAssigningJurisdiction Specifies the geo-political body that assigned the identifier. 
	 * @param objAssigningAgencyOrDepartment Specifies agency or department that assigned the identifier. 
	 * @param strSecurityCheck is used to communicate the version code. 
	 * @param objSecurityCheckSCheme is used to transmit information intended to validate veracity of the supplied identifier
	 */ 
	public void addDuplicatePatient (String strIDNumber,String strCheckDigit, String strCheckDigitScheme, HD objAssigningAuthority,
			String strIdentifierTypeCode,HD objAssigningFacility,String strEffectiveDate,String strExpirationDate, 
			CWE objAssigningJurisdiction, CWE objAssigningAgencyOrDepartment, String strSecurityCheck, String strSecurityCheckScheme)
	{
		CX tempDuplicatePatient  = (CX)getDataElement(762);
		tempDuplicatePatient.setIdNumber(strIDNumber);
		tempDuplicatePatient.setCheckDigit(strCheckDigit);
		tempDuplicatePatient.setCheckDigitScheme(strCheckDigitScheme);
		tempDuplicatePatient.setAssigningAuthority(objAssigningAuthority);
		tempDuplicatePatient.setIdentifierTypeCode(strIdentifierTypeCode);
		tempDuplicatePatient.setAssigningFacility(objAssigningFacility);
		tempDuplicatePatient.setEffectiveDate(strEffectiveDate);
		tempDuplicatePatient.setExpirationDate(strExpirationDate);
		tempDuplicatePatient.setAssigningJurisdiction(objAssigningJurisdiction);
		tempDuplicatePatient.setAssigningAgencyOrDepartment(objAssigningAgencyOrDepartment); 
		tempDuplicatePatient.setSecurityCheck(strCheckDigit);
		tempDuplicatePatient.setSecurityCheckScheme(strSecurityCheckScheme);
		addDuplicatePatient(tempDuplicatePatient);

	} 

	/** Set the Duplicate Patient.
	 * This field indicates that a patient is the same as, or a duplicate of, another patient found on the sending system.
	 * @param objtempDuplicatePatient object of Duplicate Patient. 
	 */ 
	public void addDuplicatePatient(CX objtempDuplicatePatient)
	{
		addDataType(762,objtempDuplicatePatient);
	}	
	/**
	 * Set the Duplicate Patient List.
	 * @param objDuplicatePatientList List of Duplicate Patient List.
	 */	
	@SuppressWarnings("unchecked")
	public void setDuplicatePatient(ISingleCollection<CX> objDuplicatePatientList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objDuplicatePatientList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(762,objCollection);
	}

	/**
	 * Set the Handicap.
	* @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 setHandicap (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 handicap  = (CWE)getDataElement(753);
		handicap.setIdentifier(strIdentifier);
		handicap.setText(strText);
		handicap.setNameOfCodingSystem(strNameOfCodingSystem);
		handicap.setAlternateIdentifier(strAlternateIdentifier);
		handicap.setAlternateText(strAlternateText);
		handicap.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		handicap.setCodingSystemVersionID(strCodingSystemVersionID);
		handicap.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		handicap.setOriginalText(strOriginalText);
		handicap.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		handicap.setSecondAlternateText(strSecondAlternateText);
		handicap.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		handicap.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		handicap.setCodingSystemOID(strCodingSystemOID);
		handicap.setValueSetOID(strValueSetOID);
		handicap.setValueSetVersionID(strValueSetVersionID);
		handicap.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		handicap.setAlternateValueSetOID(strAlternateValueSetOID);
		handicap.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		handicap.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		handicap.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		handicap.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setHandicap(handicap);
	} 

	/** Set the Handicap.
	 * This field indicates the nature of the patient's permanent handicapped condition.
	 * @param objhandicap object of Handicap.
	 */ 
	public void setHandicap(CWE objhandicap)
	{
		setDataType(753,objhandicap);
	}
	/**
	 * Set the Immunization Registry Status.
	 * This field identify the registry status of the patient.  
	 * @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 setImmunizationRegistryStatus (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 immunizationRegistryStatus  = (CWE)getDataElement(1569);
		immunizationRegistryStatus.setIdentifier(strIdentifier);
		immunizationRegistryStatus.setText(strText);
		immunizationRegistryStatus.setNameOfCodingSystem(strNameOfCodingSystem);
		immunizationRegistryStatus.setAlternateIdentifier(strAlternateIdentifier);
		immunizationRegistryStatus.setAlternateText(strAlternateText);
		immunizationRegistryStatus.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		immunizationRegistryStatus.setCodingSystemVersionID(strCodingSystemVersionID);
		immunizationRegistryStatus.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		immunizationRegistryStatus.setOriginalText(strOriginalText);
		immunizationRegistryStatus.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		immunizationRegistryStatus.setSecondAlternateText(strSecondAlternateText);
		immunizationRegistryStatus.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		immunizationRegistryStatus.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		immunizationRegistryStatus.setCodingSystemOID(strCodingSystemOID);
		immunizationRegistryStatus.setValueSetOID(strValueSetOID);
		immunizationRegistryStatus.setValueSetVersionID(strValueSetVersionID);
		immunizationRegistryStatus.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		immunizationRegistryStatus.setAlternateValueSetOID(strAlternateValueSetOID);
		immunizationRegistryStatus.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		immunizationRegistryStatus.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		immunizationRegistryStatus.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		immunizationRegistryStatus.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setImmunizationRegistryStatus(immunizationRegistryStatus);
	} 

	/** Set the Immunization Registry Status.
	 * This field identify the registry status of the patient.  
	 * @param objimmunizationRegistryStatus object of Immunization Registry Status.
	 */ 
	public void setImmunizationRegistryStatus(CWE objimmunizationRegistryStatus)
	{
		setDataType(1569,objimmunizationRegistryStatus);
	}
	/**
	 * Set the Immunization RS Effective Date.
	 * This field indicates the effective date for the registry status reported in PD1-16 - Immunization Registry Status. 
	 * @param strImmunizationRSEffectiveDate Use as ImmunizationRSEffectiveDate.
	 */ 
	public void setImmunizationRSEffectiveDate (String strImmunizationRSEffectiveDate) 
	{
		DT immunizationRSEffectiveDate  = (DT)getDataElement(1570);
		immunizationRSEffectiveDate.setValue(strImmunizationRSEffectiveDate); 
		setImmunizationRSEffectiveDate(immunizationRSEffectiveDate);
	} 

	/** Set the Immunization RS Effective Date.
	 * This field indicates the effective date for the registry status reported in PD1-16 - Immunization Registry Status. 
	 * @param objimmunizationRSEffectiveDate object of Immunization RSEffectiveDate.
	 */ 
	public void setImmunizationRSEffectiveDate(DT objimmunizationRSEffectiveDate)
	{
		setDataType(1570,objimmunizationRSEffectiveDate);
	}
	/**
	 * Set the Living Arrangement.
	 * This field identify the situation in which the patient lives at his residential address.  
	 * @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 setLivingArrangement (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 livingArrangement = (CWE)getDataElement(742);
		livingArrangement.setIdentifier(strIdentifier);
		livingArrangement.setText(strText);
		livingArrangement.setNameOfCodingSystem(strNameOfCodingSystem);
		livingArrangement.setAlternateIdentifier(strAlternateIdentifier);
		livingArrangement.setAlternateText(strAlternateText);
		livingArrangement.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		livingArrangement.setCodingSystemVersionID(strCodingSystemVersionID);
		livingArrangement.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		livingArrangement.setOriginalText(strOriginalText);
		livingArrangement.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		livingArrangement.setSecondAlternateText(strSecondAlternateText);
		livingArrangement.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		livingArrangement.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		livingArrangement.setCodingSystemOID(strCodingSystemOID);
		livingArrangement.setValueSetOID(strValueSetOID);
		livingArrangement.setValueSetVersionID(strValueSetVersionID);
		livingArrangement.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		livingArrangement.setAlternateValueSetOID(strAlternateValueSetOID);
		livingArrangement.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		livingArrangement.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		livingArrangement.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		livingArrangement.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setLivingArrangement(livingArrangement);
	} 

	/** Set the Living Arrangement.
	 * This field identify the situation in which the patient lives at his residential address.  
	 * @param objlivingArrangement object of LivingArrangement.
	 */ 
	public void setLivingArrangement(CWE objlivingArrangement)
	{
		setDataType(742,objlivingArrangement);
	}
	/**
	 * Set the Living Dependency.
	 * This field identify specific living conditions.
	* This field contains the reason for this event.  
	 * @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 addLivingDependency (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 tempLivingDependency  = (CWE)getDataElement(755);
		tempLivingDependency.setIdentifier(strIdentifier);
		tempLivingDependency.setText(strText);
		tempLivingDependency.setNameOfCodingSystem(strNameOfCodingSystem);
		tempLivingDependency.setAlternateIdentifier(strAlternateIdentifier);
		tempLivingDependency.setAlternateText(strAlternateText);
		tempLivingDependency.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		tempLivingDependency.setCodingSystemVersionID(strCodingSystemVersionID);
		tempLivingDependency.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		tempLivingDependency.setOriginalText(strOriginalText);
		tempLivingDependency.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		tempLivingDependency.setSecondAlternateText(strSecondAlternateText);
		tempLivingDependency.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		tempLivingDependency.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		tempLivingDependency.setCodingSystemOID(strCodingSystemOID);
		tempLivingDependency.setValueSetOID(strValueSetOID);
		tempLivingDependency.setValueSetVersionID(strValueSetVersionID);
		tempLivingDependency.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		tempLivingDependency.setAlternateValueSetOID(strAlternateValueSetOID);
		tempLivingDependency.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		tempLivingDependency.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		tempLivingDependency.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		tempLivingDependency.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID); 
		addLivingDependency(tempLivingDependency);
	} 

	/** Set the Living Dependency.
	 * This field identify specific living conditions.
	 * @param objtempLivingDependency object of livingDependency.
	 */ 
	public void addLivingDependency(CWE objtempLivingDependency)
	{
		addDataType(755,objtempLivingDependency);
	}
	/**
	 * Set the Living Dependency List.
	 * @param objLivingDependencyList List of Living Dependency
	 */	
	@SuppressWarnings("unchecked")
	public void setLivingDependency(ISingleCollection<CWE> objLivingDependencyList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objLivingDependencyList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(755,objCollection);
	}
	/**
	 * Set the Living Will Code.
	 * This field indicates whether the patient has a living will or not and, if so, whether a copy of the living will is on file at the healthcare facility or not.
	 * whether a copy of the living will is on file at the healthcare facility  or not.  
	 * @param strIdentifier Specifies of characters (the code) that uniquely identifies the item being referenced. 
	 * @param strText Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction. 
	 * @param strNameOfCodingSystem Identifies the coding scheme being used in the identifier component.
	 * @param strAlternateIdentifier Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
	 * @param strAlternateText Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
	 * @param strNameOfAlternateCodingSystem Identifies the coding scheme being used in the alternate identifier component. 
	 * @param strCodingSystemVersionID A sequence of characters that uniquely identifies a second alternate code.
	 * @param strAlternateCodingSystemVersionId This component carries the version for the coding system identified by components 4-6.
	 * @param strOriginalText The text as seen and/or selected by the user who entered the data.
	 * @param strSecondAlternateIdentifier A sequence of characters that uniquely identifies a second alternate code.
	 * @param strSecondAlternateText The descriptive or textual name of the alternate identifier.
	 * @param strNameofSecondAlternateCodingSystem Identifies the coding scheme being used in the alternate identifier component.
	 * @param strSecondAlternateCodingSystemVersionID This component carries the version for the coding system identified by components 10-12.
	 * @param strCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
	 * @param strValueSetOID This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.1 is obtained.
	 * @param strValueSetVersionID This component carries the version for the value set identified by CWE.15. The version is a date. The date is the date/time that the value set being used was published.
	 * @param strAlternateCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
	 * @param strAlternateValueSetOID This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.4 is obtained.
	 * @param strAlternateValueSetVersionID This component carries the version for the value set identified by CWE.18. The version is a date.
	 * @param strSecondAlternateCodingSystemOID This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
	 * @param strSecondAlternateValueSetOID This component contains the ISO Object Identifier (OID) to allow identification of the value set from which the value in CWE.10 is obtained.
	 * @param strSecondAlternateValueSetVersionID This component carries the version for the value set identified by CWE.21. The version is a date.
	 */	 
	public void setLivingWillCode (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 livingWillCode  = (CWE)getDataElement(759);
		livingWillCode .setIdentifier(strIdentifier);
		livingWillCode .setText(strText);
		livingWillCode .setNameOfCodingSystem(strNameOfCodingSystem);
		livingWillCode .setAlternateIdentifier(strAlternateIdentifier);
		livingWillCode .setAlternateText(strAlternateText);
		livingWillCode .setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		livingWillCode .setCodingSystemVersionID(strCodingSystemVersionID);
		livingWillCode .setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		livingWillCode .setOriginalText(strOriginalText);
		livingWillCode .setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		livingWillCode .setSecondAlternateText(strSecondAlternateText);
		livingWillCode .setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		livingWillCode .setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		livingWillCode .setCodingSystemOID(strCodingSystemOID);
		livingWillCode .setValueSetOID(strValueSetOID);
		livingWillCode .setValueSetVersionID(strValueSetVersionID);
		livingWillCode .setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		livingWillCode .setAlternateValueSetOID(strAlternateValueSetOID);
		livingWillCode .setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		livingWillCode .setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		livingWillCode .setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		livingWillCode .setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setLivingWillCode(livingWillCode);
	} 

	/** Set the Living Will Code.
	 * This field indicates whether the patient has a living will or not and, if so, whether a copy of the living will is on file at the healthcare facility or not.
	 * whether a copy of the living will is on file at the healthcare facility  or not.  
	 * @param objlivingWillCode object of LivingWillCode.
	 */ 
	public void setLivingWillCode(CWE objlivingWillCode)
	{
		setDataType(759,objlivingWillCode);
	}
	/**
	 * Set the Military Branch.
	 * This field is defined by CMS or other regulatory agencies. 
	  * @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 setMilitaryBranch (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 militaryBranch  = (CWE)getDataElement(1572);
		militaryBranch.setIdentifier(strIdentifier);
		militaryBranch.setText(strText);
		militaryBranch.setNameOfCodingSystem(strNameOfCodingSystem);
		militaryBranch.setAlternateIdentifier(strAlternateIdentifier);
		militaryBranch.setAlternateText(strAlternateText);
		militaryBranch.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		militaryBranch.setCodingSystemVersionID(strCodingSystemVersionID);
		militaryBranch.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		militaryBranch.setOriginalText(strOriginalText);
		militaryBranch.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		militaryBranch.setSecondAlternateText(strSecondAlternateText);
		militaryBranch.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		militaryBranch.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		militaryBranch.setCodingSystemOID(strCodingSystemOID);
		militaryBranch.setValueSetOID(strValueSetOID);
		militaryBranch.setValueSetVersionID(strValueSetVersionID);
		militaryBranch.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		militaryBranch.setAlternateValueSetOID(strAlternateValueSetOID);
		militaryBranch.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		militaryBranch.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		militaryBranch.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		militaryBranch.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setMilitaryBranch(militaryBranch);
	} 

	/** Set the Military Branch.
	 * This field is defined by CMS or other regulatory agencies. 
	 * @param objmilitaryBranch object of MilitaryBranch.
	 */ 
	public void setMilitaryBranch(CWE objmilitaryBranch)
	{
		setDataType(1572,objmilitaryBranch);
	}
	/**
	 * Set the Military Rank Grade.
	 * this field identify the military rank/grade of the patient.  
	 * @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 setMilitaryRank_Grade (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 militaryRank_Grade  = (CWE)getDataElement(486);
		militaryRank_Grade.setIdentifier(strIdentifier);
		militaryRank_Grade.setText(strText);
		militaryRank_Grade.setNameOfCodingSystem(strNameOfCodingSystem);
		militaryRank_Grade.setAlternateIdentifier(strAlternateIdentifier);
		militaryRank_Grade.setAlternateText(strAlternateText);
		militaryRank_Grade.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		militaryRank_Grade.setCodingSystemVersionID(strCodingSystemVersionID);
		militaryRank_Grade.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		militaryRank_Grade.setOriginalText(strOriginalText);
		militaryRank_Grade.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		militaryRank_Grade.setSecondAlternateText(strSecondAlternateText);
		militaryRank_Grade.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		militaryRank_Grade.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		militaryRank_Grade.setCodingSystemOID(strCodingSystemOID);
		militaryRank_Grade.setValueSetOID(strValueSetOID);
		militaryRank_Grade.setValueSetVersionID(strValueSetVersionID);
		militaryRank_Grade.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		militaryRank_Grade.setAlternateValueSetOID(strAlternateValueSetOID);
		militaryRank_Grade.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		militaryRank_Grade.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		militaryRank_Grade.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		militaryRank_Grade.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setMilitaryRank_Grade(militaryRank_Grade);
	} 

	/**
	 * Sets the Military Rank_Grade 
	 * @param objmilitaryRank_Grade Military Rank_Grade
	 */ 
	public void setMilitaryRank_Grade(CWE objmilitaryRank_Grade)
	{
		setDataType(486,objmilitaryRank_Grade);
	}
	/**
	 * Set the Military Status.
	 * This field is defined by CMS or other regulatory agencies.
	 * @param strMilitaryStatus Use as MilitaryStatus.
	 */ 
	public void setMilitaryStatus (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 militaryStatus  = (CWE)getDataElement(1573);
		militaryStatus.setIdentifier(strIdentifier);
		militaryStatus.setText(strText);
		militaryStatus.setNameOfCodingSystem(strNameOfCodingSystem);
		militaryStatus.setAlternateIdentifier(strAlternateIdentifier);
		militaryStatus.setAlternateText(strAlternateText);
		militaryStatus.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		militaryStatus.setCodingSystemVersionID(strCodingSystemVersionID);
		militaryStatus.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		militaryStatus.setOriginalText(strOriginalText);
		militaryStatus.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		militaryStatus.setSecondAlternateText(strSecondAlternateText);
		militaryStatus.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		militaryStatus.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		militaryStatus.setCodingSystemOID(strCodingSystemOID);
		militaryStatus.setValueSetOID(strValueSetOID);
		militaryStatus.setValueSetVersionID(strValueSetVersionID);
		militaryStatus.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		militaryStatus.setAlternateValueSetOID(strAlternateValueSetOID);
		militaryStatus.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		militaryStatus.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		militaryStatus.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		militaryStatus.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setMilitaryStatus(militaryStatus);
	} 

	/** Set the Military Status.
	 * This field is defined by CMS or other regulatory agencies.
	 * @param objmilitaryStatus object of MilitaryStatus.
	 */ 
	public void setMilitaryStatus(CWE objmilitaryStatus)
	{
		setDataType(1573,objmilitaryStatus);
	}
	/**
	 * Set the Organ Donor Code.
	 * This field indicates whether the patient wants to donate his/her organs and whether an organ donor card or similar documentation is on file with the healthcare organization.  
	 * @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 setOrganDonorCode (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 organDonorCode  = (CWE)getDataElement(760);
		organDonorCode.setIdentifier(strIdentifier);
		organDonorCode.setText(strText);
		organDonorCode.setNameOfCodingSystem(strNameOfCodingSystem);
		organDonorCode.setAlternateIdentifier(strAlternateIdentifier);
		organDonorCode.setAlternateText(strAlternateText);
		organDonorCode.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		organDonorCode.setCodingSystemVersionID(strCodingSystemVersionID);
		organDonorCode.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		organDonorCode.setOriginalText(strOriginalText);
		organDonorCode.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		organDonorCode.setSecondAlternateText(strSecondAlternateText);
		organDonorCode.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		organDonorCode.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		organDonorCode.setCodingSystemOID(strCodingSystemOID);
		organDonorCode.setValueSetOID(strValueSetOID);
		organDonorCode.setValueSetVersionID(strValueSetVersionID);
		organDonorCode.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		organDonorCode.setAlternateValueSetOID(strAlternateValueSetOID);
		organDonorCode.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		organDonorCode.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		organDonorCode.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		organDonorCode.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setOrganDonorCode(organDonorCode);
	} 

	/**Sets the Organ Donor Code. 
	 * @param objorganDonorCode object of OrganDonorCode.
	 */ 
	public void setOrganDonorCode(CWE objorganDonorCode)
	{
		setDataType(760,objorganDonorCode);
	}

	/**
	 * Set the Patient Primary Facility.
	 * This field contains the name and identifier that specifies the "primary care" healthcare facility selected by the patient at the time of enrolment in an HMO Insurance Plan.
	 * @param strOrganizationName Specifies name of the specified organization.
	 * @param strOrganizationNameTypeCode Specifies a code that represents the type of name i.e., legal name, display name.
	 * 										Suggested Values A,L,D,SL.[Refer to table No.0204]  
	 * @param objAssigningAuthority Specifies The assigning authority is a unique identifier of the system 
	 * 									(or organization or agency or department) that creates the data. 
	 * @param strIdentifierTypeCode Specifies a code corresponding to the type of identifier. 
	 * @param objAssigningFacility Specifies The place or location identifier where the identifier was first assigned to the person. 
	 * @param strNameRepresentationCode Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465] 
	 * @param strOrganizationIdentifier This component contains the sequence of characters (the code) that uniquely 
	 * 									  identifies the item being referenced by XON.1 Organization Name. 
	 * 									  This component replaces XON.3 ID Number as of v 2.5.
	 */ 
	public void addPatientPrimaryFacility (String strOrganizationName, String strOrganizationNameTypeCode,
			 HD objAssigningAuthority,
			String strIdentifierTypeCode, HD objAssigningFacility, String strNameRepresentationCode,
			String strOrganizationIdentifier)
	{
		XON tempPatientPrimaryFacility  = (XON)getDataElement(756);
		tempPatientPrimaryFacility.setOrganizationName(strOrganizationName);
		tempPatientPrimaryFacility.setOrganizationNameTypeCode(strOrganizationNameTypeCode);
//		tempPatientPrimaryFacility.setIdNumber(strIdNumber);
//		tempPatientPrimaryFacility.setCheckDigit(strCheckDigit);
//		tempPatientPrimaryFacility.setCheckDigitScheme(strCheckDigitScheme);
		tempPatientPrimaryFacility.setAssigningAuthority(objAssigningAuthority);
		tempPatientPrimaryFacility.setIdentifierTypeCode(strIdentifierTypeCode);
		tempPatientPrimaryFacility.setAssigningFacility(objAssigningFacility);
		tempPatientPrimaryFacility.setNameRepresentationCode(strNameRepresentationCode);
		tempPatientPrimaryFacility.setOrganizationIdentifier(strOrganizationIdentifier); 
		addPatientPrimaryFacility(tempPatientPrimaryFacility);

	} 

	/**
	 * Sets the Patient Primary Facility. 
	 * @param objtempPatientPrimaryFacility object of Patient Primary Facility. 
	 */ 
	public void addPatientPrimaryFacility(XON objtempPatientPrimaryFacility)
	{
		addDataType(756,objtempPatientPrimaryFacility);
	}	
	/**
	 * Set the Patient Primary Facility.
	 * @param objPatientPrimaryFacilityList List of Patient Primary Facility List.
	 */	
	@SuppressWarnings("unchecked")
	public void setPatientPrimaryFacility(ISingleCollection<XON> objPatientPrimaryFacilityList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objPatientPrimaryFacilityList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(756,objCollection);
	}

	/**
	 * Set the Place Of Worship.
	 * @param strOrganizationName Specifies name of the specified organization.
	 * @param strOrganizationNameTypeCode Specifies a code that represents the type of name i.e., legal name, display name.
	 * 										Suggested Values A,L,D,SL.[Refer to table No.0204]  
	 * @param objAssigningAuthority Specifies The assigning authority is a unique identifier of the system 
	 * 									(or organization or agency or department) that creates the data. 
	 * @param strIdentifierTypeCode Specifies a code corresponding to the type of identifier. 
	 * @param objAssigningFacility Specifies The place or location identifier where the identifier was first assigned to the person. 
	 * @param strNameRepresentationCode Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465] 
	 * @param strOrganizationIdentifier This component contains the sequence of characters (the code) that uniquely 
	 * 									  identifies the item being referenced by XON.1 Organization Name. 
	 * 									  This component replaces XON.3 ID Number as of v 2.5.
	 */ 
	public void addPlaceOfWorship (String strOrganizationName, CWE objOrganizationNameTypeCode,
			 HD objAssigningAuthority,
			String strIdentifierTypeCode, HD objAssigningFacility, String strNameRepresentationCode,
			String strOrganizationIdentifier)
	{
		XON tempPlaceOfWorship  = (XON)getDataElement(1567);
		tempPlaceOfWorship.setOrganizationName(strOrganizationName);
		tempPlaceOfWorship.setOrganizationNameTypeCode(objOrganizationNameTypeCode);
		//tempPlaceOfWorship.setOrganizationNameTypeCode(strOrganizationNameTypeCode);
//		tempPlaceOfWorship.setIdNumber(strIdNumber);
//		tempPlaceOfWorship.setCheckDigit(strCheckDigit);
//		tempPlaceOfWorship.setCheckDigitScheme(strCheckDigitScheme);
		tempPlaceOfWorship.setAssigningAuthority(objAssigningAuthority);
		tempPlaceOfWorship.setIdentifierTypeCode(strIdentifierTypeCode);
		tempPlaceOfWorship.setAssigningFacility(objAssigningFacility);
		tempPlaceOfWorship.setNameRepresentationCode(strNameRepresentationCode);
		tempPlaceOfWorship.setOrganizationIdentifier(strOrganizationIdentifier); 
		addPlaceOfWorship(tempPlaceOfWorship);

	} 

	/**
	 * Sets the PlaceOfWorship.
	 * @param objtempPlaceOfWorship object of PlaceOfWorship.
	 */ 
	public void addPlaceOfWorship(XON objtempPlaceOfWorship)
	{
		addDataType(1567,objtempPlaceOfWorship);
	}	
	/**
	 * Set the Place Of Worship.
	 * @param objPlaceOfWorshipList List of Place Of Worship.
	 */	
	@SuppressWarnings("unchecked")
	public void setPlaceOfWorship(ISingleCollection<XON> objPlaceOfWorshipList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objPlaceOfWorshipList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(1567,objCollection);
	}


	/**
	 * Set the Protection IE Date.
	 * This field indicates the effective date for PD1-12 - Protection Indicator.
	 * @param strProtectionIEDate Use as ProtectionIEDate.
	 */ 
	public void setProtectionIEDate (String strProtectionIEDate) 
	{
		DT protectionIEDate = (DT)getDataElement(1566);
		protectionIEDate.setValue(strProtectionIEDate); 
		setProtectionIEDate(protectionIEDate);
	} 

	/** Set the Protection IE Date.
	 * This field indicates the effective date for PD1-12 - Protection Indicator.
	 * @param objprotectionIEDate object of ProtectionIEDate.
	 */ 
	public void setProtectionIEDate(DT objprotectionIEDate)
	{
		setDataType(1566,objprotectionIEDate);
	}
	
	/**
	 * Set the Advance Directive Last Verified Date.
	 * This field indicates the date that all the advance directive held in Advance directive code was last verified.
	 * @param strAdvanceDirectiveLastVerifiedDate Use as Advance directive code was last verified.
	 */ 
	public void setAdvanceDirectiveLastVerifiedDate (String strAdvanceDirectiveLastVerifiedDate) 
	{
		DT advanceDirectiveLastVerifiedDate = (DT)getDataElement(2141);
		advanceDirectiveLastVerifiedDate.setValue(strAdvanceDirectiveLastVerifiedDate); 
		setAdvanceDirectiveLastVerifiedDate(advanceDirectiveLastVerifiedDate);
	} 

	/** Set the Advance Directive last verified Date.
	 * This field indicates the date that all the advance directive held in Advance directive code was last verified.
	 * @param objAdvanceDirectiveLastVerified object of ProtectionIEDate.
	 */ 
	public void setAdvanceDirectiveLastVerifiedDate(DT objAdvanceDirectiveLastVerified)
	{
		setDataType(2141,objAdvanceDirectiveLastVerified);
	}

	/**
	 * Set the Protection Indicator.
	 * This field identify the patient's protection that determines, in turn, whether access to information about this person should be kept from users who do not have adequate authority for the patient. 
	 * @param strProtectionIndicator Use as ProtectionIndicator.
	 */ 
	public void setProtectionIndicator (String  strProtectionIndicator) 
	{
		ID protectionIndicator = (ID)getDataElement(744);
		protectionIndicator.setValue(strProtectionIndicator); 
		setProtectionIndicator(protectionIndicator);
	} 

	/** Set the Protection Indicator.
	 * This field identify the patient's protection that determines, in turn, whether access to information about this person should be kept from users who do not have adequate authority for the patient. 
	 * @param objprotectionIndicator object of ProtectionIndicator.
	 */ 
	public void setProtectionIndicator(ID objprotectionIndicator)
	{
		setDataType(744,objprotectionIndicator);
	}
	/**
	 * Set the Publicity Code.
	 * This field contains a user-defined code indicating what level of publicity is allowed (e.g., No Publicity, Family Only) for the patient.
	  * @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 setPublicityCode (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 publicityCode  = (CWE)getDataElement(743);
		publicityCode.setIdentifier(strIdentifier);
		publicityCode.setText(strText);
		publicityCode.setNameOfCodingSystem(strNameOfCodingSystem);
		publicityCode.setAlternateIdentifier(strAlternateIdentifier);
		publicityCode.setAlternateText(strAlternateText);
		publicityCode.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		publicityCode.setCodingSystemVersionID(strCodingSystemVersionID);
		publicityCode.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		publicityCode.setOriginalText(strOriginalText);
		publicityCode.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		publicityCode.setSecondAlternateText(strSecondAlternateText);
		publicityCode.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		publicityCode.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		publicityCode.setCodingSystemOID(strCodingSystemOID);
		publicityCode.setValueSetOID(strValueSetOID);
		publicityCode.setValueSetVersionID(strValueSetVersionID);
		publicityCode.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		publicityCode.setAlternateValueSetOID(strAlternateValueSetOID);
		publicityCode.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		publicityCode.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		publicityCode.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		publicityCode.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID); 
		setPublicityCode(publicityCode);
	} 

	/** Set the Publicity Code.
	 * This field contains a user-defined code indicating what level of publicity is allowed (e.g., No Publicity, Family Only) for the patient.
	 * @param objpublicityCode object of Publicity Code.
	 */ 
	public void setPublicityCode(CWE objpublicityCode)
	{
		setDataType(743,objpublicityCode);
	}
	/**
	 * Set the Publicity Code Effective Date.
	 * @param strPublicityCodeEffectiveDate Use as PublicityCodeEffectiveDate.
	 */ 
	public void setPublicityCodeEffectiveDate (String strPublicityCodeEffectiveDate) 
	{
		DT publicityCodeEffectiveDate = (DT)getDataElement(1571);
		publicityCodeEffectiveDate.setValue(strPublicityCodeEffectiveDate); 
		setPublicityCodeEffectiveDate(publicityCodeEffectiveDate);
	} 

	/** Set the Publicity Code Effective Date.
	 * @param objpublicityCodeEffectiveDate object of PublicityCodeEffectiveDate.
	 */ 
	public void setPublicityCodeEffectiveDate(DT objpublicityCodeEffectiveDate)
	{
		setDataType(1571,objpublicityCodeEffectiveDate);
	}
	/**
	 * Set the Separate Bill.
	 * This field specify the charges for this patient are to be billed separately from other patient bills with the same guarantor.  
	 * @param strSeparateBill Use as SeparateBill.
	 */
	public void setSeparateBill(String strSeparateBill) 
	{
		ID separateBill = (ID)getDataElement(761);
		separateBill.setValue(strSeparateBill);
		setSeparateBill(separateBill);
	}
	/**
	 * Set the Separate Bill.
	 * This field specify the charges for this patient are to be billed separately from other patient bills with the same guarantor.  
	 * @param objseparateBill object of SeparateBill.
	 */
	public void setSeparateBill(ID objseparateBill)
	{
		setDataType(761,objseparateBill);
	}
	/**
	 * Set the Student Indicator.
	 * @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 setStudentIndicator(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 studentIndicator = (CWE)getDataElement(745);
		studentIndicator.setIdentifier(strIdentifier);
		studentIndicator.setText(strText);
		studentIndicator.setNameOfCodingSystem(strNameOfCodingSystem);
		studentIndicator.setAlternateIdentifier(strAlternateIdentifier);
		studentIndicator.setAlternateText(strAlternateText);
		studentIndicator.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		studentIndicator.setCodingSystemVersionID(strCodingSystemVersionID);
		studentIndicator.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		studentIndicator.setOriginalText(strOriginalText);
		studentIndicator.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		studentIndicator.setSecondAlternateText(strSecondAlternateText);
		studentIndicator.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		studentIndicator.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		studentIndicator.setCodingSystemOID(strCodingSystemOID);
		studentIndicator.setValueSetOID(strValueSetOID);
		studentIndicator.setValueSetVersionID(strValueSetVersionID);
		studentIndicator.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		studentIndicator.setAlternateValueSetOID(strAlternateValueSetOID);
		studentIndicator.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		studentIndicator.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		studentIndicator.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		studentIndicator.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setStudentIndicator(studentIndicator);
	}
	/**
	 * Set the Student Indicator.
	 * This field specify the charges for this patient are to be billed separately from other patient bills with the same guarantor.  
	 * @param objstudentIndicator object of StudentIndicator.
	 */
	public void setStudentIndicator(CWE objstudentIndicator)
	{
		setDataType(745,objstudentIndicator);
	}
	/**
	 * Validates HL7 Message objects .
	 * Validate method checks for validation each and every segments in side the Message object against specified message Structure. 
	 * Validation chcecks include optionality of segment or group.
	 * It also verifies the number of times segment or group is repeated in message.
	 * e.g 
	 * {PSH} while parsing PSH segment validate method will check for its mandatory presence.
	 * [PSH] in this case validate will throw exception if one tries to enter more than one PSH segment.
	 * @return boolean - true or false.
	 * @throws InvalidSegmentException Throws when Segment Validation fails.
	 */
	public boolean validate()throws InvalidSegmentException
	{
		//All fields are optional.
		//		This Segment Supports Feature Modes For Updating via Repeating Segment.
		//		Validation Mode for this segments validation doesn't affect.
		super.validate();
		return true;
	}
}