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


import cdac.medinfo.sdk.hl7282.baselibs.CNE;
import cdac.medinfo.sdk.hl7282.baselibs.CWE;
import cdac.medinfo.sdk.hl7282.baselibs.DTM;
import cdac.medinfo.sdk.hl7282.baselibs.EI;
import cdac.medinfo.sdk.hl7282.baselibs.FN;
import cdac.medinfo.sdk.hl7282.baselibs.ID;
import cdac.medinfo.sdk.hl7282.baselibs.NM;
import cdac.medinfo.sdk.hl7282.baselibs.ST;
import cdac.medinfo.sdk.hl7282.baselibs.XPN;
import cdac.medinfo.sdk.hl7282.commoninterface.IDataType;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;
import cdac.medinfo.sdk.hl7282.exceptions.FieldMissingException;
import cdac.medinfo.sdk.hl7282.exceptions.InvalidSegmentException;
import cdac.medinfo.sdk.hl7282.utils.EnumSegments;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;

/**
 * GOL - Goal Detail Segment:<p>
 * The goal detail segment contains the data necessary to add, update, correct, and delete
 * the goals for an individual.
 * <p>Represents an HL7 GOL message segment. 
 * This segment has the following fields:</p><p>
 * GOL-1: Action Code (ID)<b>Required</b><br> 
 * GOL-2: Action Date/Time (DTM)<b>Required</b><br> 
 * GOL-3: Goal ID (CWE)<b>Required</b><br> 
 * GOL-4: Goal Instance ID (EI)<b>Required</b><br> 
 * GOL-5: Episode of Care ID (EI)<b>Optional</b><br> 
 * GOL-6: Goal List Priority (NM)<b>Optional</b><br> 
 * GOL-7: Goal Established Date/Time (DTM)<b>Optional</b><br> 
 * GOL-8: Expected Goal Achieve Date/Time (DTM)<b>Optional</b><br> 
 * GOL-9: Goal Classification (CWE)<b>Optional</b><br> 
 * GOL-10: Goal Management Discipline (CWE)<b>Optional</b><br> 
 * GOL-11: Current Goal Review Status (CWE)<b>Optional</b><br> 
 * GOL-12: Current Goal Review Date/Time (DTM)<b>Optional</b><br> 
 * GOL-13: Next Goal Review Date/Time (DTM)<b>Optional</b><br> 
 * GOL-14: Previous Goal Review Date/Time (DTM)<b>Optional</b><br> 
 * GOL-15: Goal Review Interval (TQ)<b>Withdrawn</b><br> 
 * GOL-16: Goal Evaluation (CWE)<b>Optional</b><br> 
 * GOL-17: Goal Evaluation Comment (ST)<b>Optional</b><br> 
 * GOL-18: Goal Life Cycle Status (CWE)<b>Optional</b><br> 
 * GOL-19: Goal Life Cycle Status Date/Time (DTM)<b>Optional</b><br> 
 * GOL-20: Goal Target Type (CWE)<b>Optional</b><br> 
 * GOL-21: Goal Target Name (XPN)<b>Optional</b><br>
 * GOL-22: Mood Code (CNE)<b>Conditional</b><br><p>
 * This class provides mechanism to validate message against HL7 v 2.8.2 standard.
 * The class provides accessors & mutators for the elements mentioned above.
 * The class has validate method which validates Message against HL7 v 2.8.2 standard.
 *
 * <p>User can also create Segment through {@link SegmentFactory}
 */
 public class GOL extends Segment    
{
	

	/**
	 * Constructs the GOL segment.
	 */
	public GOL()
	{super(EnumSegments.HL7_SEG_GOL);
	}

	/**
	 * Retrieves the action code.
	 * This field gives the intent of the problem or goal.  
	 * @return ID - actionCode
	 */
	public ID getActionCode() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(816);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Action Date Time.
	 * This field contains the date/time that the operation represented by the action code is performed.
	 * @return DTM - actionDateTime
	 */
	public DTM getActionDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(817);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Current Goal Review Date Time.
	 * This field contains the date/time of the current review of the goal.
	 * @return DTM - currentGoalReviewDateTime
	 */
	public DTM getCurrentGoalReviewDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(828);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Current Goal Review Status.
	 * This field contains the current point in the continuum of 
	 * a goal review cycle (e.g., due, initiated, reviewed, overdue, verified, etc.). 
	 * @return CWE - currentGoalReviewStatus
	 */
	public CWE getCurrentGoalReviewStatus() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(827);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Episode of Care ID.
	 * This field uniquely identifies the episode of care to which this goal applies.
	 * @return EI - episodeofCareID
	 */
	public EI getEpisodeofCareID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(820);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EI)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Expected Goal Achieve Date Time.
	 * This field contains the projected date/time for achieving the stated goal.
	 * @return DTM - expectedGoalAchieveDateTime
	 */
	public DTM getExpectedGoalAchieveDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(824);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Goal Classification.
	 * This field indicates the kind of goal. This field can be used to
	 *  categorize goals so that they may be managed and viewed independently within different applications. 
	 * @return CWE - goalClassification
	 */
	public CWE getGoalClassification() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(825);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Goal Established Date Time.
	 * This field identifies the date/time when the stated goal was initially created.
	 * @return DTM - goalEstablishedDateTime
	 */
	public DTM getGoalEstablishedDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(822);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Goal Evaluation.
	 * This field provides an indicator of progress towards achievement of the goal.
	 * @return CWE - goalEvaluation
	 */
	public CWE getGoalEvaluation() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(832);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Goal Evaluation Comment.
	 * This field contains the comments associated with the goal evaluation.  
	 * @return ISingleCollection<ST> - goalEvaluationComment
	 */
	public ISingleCollection<ST> getGoalEvaluationComment() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(833);
		ISingleCollection<ST> objDataList = new SingleCollection<ST>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				ST objST = (ST)objDataType;
				objDataList.add(objST);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Goal ID.
	 * This field identifies the goal. This is the identifier from an institution's master list of goals.
	 * @return CWE - goalID
	 */
	public CWE getGoalID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(818);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Goal Instance ID.
	 * This field contains the unique identifier assigned by an initiating system to this instance of the goal.
	 * @return EI - goalInstanceID
	 */
	public EI getGoalInstanceID() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(819);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (EI)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Goal Life Cycle Status.
	 * This field contains an indication of the state of the goal.
	 * @return CWE - goalLifeCycleStatus
	 */
	public CWE getGoalLifeCycleStatus() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(834);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Goal Life Cycle Status Date Time.
	 * This field contains the effective date/time of the current goal life cycle status.
	 * @return DTM - goalLifeCycleStatusDateTime
	 */
	public DTM getGoalLifeCycleStatusDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(835);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Goal List Priority.
	 * This field prioritizes this goal on a list that is maintained for an individual.
	 * @return NM - goalListPriority
	 */
	public NM getGoalListPriority() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(821);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (NM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Goal Management Discipline.
	 * This field indicates the category of caregiver with responsibility for managing this specific goal. 
	 * @return CWE - goalManagementDiscipline
	 */
	public CWE getGoalManagementDiscipline() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(826);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}


	/**
	 * Retrieves the Goal Target Name.
	 * This field contains the identification of the person(s) on whom the goal is focused.  
	 * @return ISingleCollection<XPN> - goalTargetName
	 */
	public ISingleCollection<XPN> getGoalTargetName() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(837);
		ISingleCollection<XPN> objDataList = new SingleCollection<XPN>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				XPN objXPN = (XPN)objDataType;
				objDataList.add(objXPN);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Goal Target Type.
	 * This field contains the individual/group for whom the goal has been established.
	 * @return ISingleCollection<CWE> - goalTargetType
	 */
	public ISingleCollection<CWE> getGoalTargetType() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(836);
		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 Next Goal Review Date Time.
	 * This field contains the date/time of the next scheduled goal review.
	 * @return DTM - nextGoalReviewDateTime
	 */
	public DTM getNextGoalReviewDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(829);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Previous Goal Review Date Time.
	 * This field contains the date/time that the goal is reviewed prior to the current review.
	 * @return DTM - previousGoalReviewDateTime
	 */
	public DTM getPreviousGoalReviewDateTime() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(830);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}
	
	/**
	 * Retrieves the Mood Code.
	 * This field indicates the Mood of the Goal.  It allows expression of the context of the problem.
	 * @return CNE - moodCode
	 */
	public CNE getMoodCode  () 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(2182);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CNE)objDataCollection.elementAt(0);
		else
			return null;
	}


	/**
	 * Set the action code.
	 * This field gives the intent of the problem or goal.
	 * @param strActionCode Specifies the the intent of the message    
	 */ 
	public void setActionCode (String strActionCode)
	{
		ID actionCode  = (ID)getDataElement(816);

		actionCode.setValue(strActionCode); 
		setActionCode(actionCode);

	} 

	/** Set the action code.
	 * This field gives the intent of the problem or goal.
	 * @param objactionCode Specifies the the intent of the message    
	 */ 
	public void setActionCode(ID objactionCode)
	{
		setDataType(816,objactionCode);

	}

	/**
	 * Set the Action Date Time.
	 * This field contains the date/time that the operation represented by the action code is performed.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setActionDateTime (String strTime) 
	{
		DTM actionDateTime  = (DTM)getDataElement(817);
		actionDateTime.setValue(strTime);		
		setActionDateTime(actionDateTime);

	} 

	/**
	 * Set the Action Date Time.
	 * This field contains the date/time that the operation represented by the action code is performed.
	 * @param objactionDateTime 
	 */ 
	public void setActionDateTime(DTM objactionDateTime)
	{
		setDataType(817,objactionDateTime);

	}

	/**
	 * Set the Current Goal Review Date Time.
	 * This field contains the date/time of the current review of the goal.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setCurrentGoalReviewDateTime (String strTime) 
	{
		DTM currentGoalReviewDateTime  = (DTM)getDataElement(828);
		currentGoalReviewDateTime.setValue(strTime);		
		setCurrentGoalReviewDateTime(currentGoalReviewDateTime);

	} 

	/**
	 * Set the Current Goal Review Date Time.
	 * This field contains the date/time of the current review of the goal.
	 * @param objcurrentGoalReviewDateTime
	 */ 
	public void setCurrentGoalReviewDateTime(DTM objcurrentGoalReviewDateTime)
	{
		setDataType(828,objcurrentGoalReviewDateTime);

	}

	/**
	 * Set the Current Goal Review Status.
	 * This field contains the current point in the continuum of 
	 * a goal review cycle (e.g., due, initiated, reviewed, overdue, verified, etc.).
	 * @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 setCurrentGoalReviewStatus (String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String 				strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		CWE cwe  = (CWE)getDataElement(827);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setCurrentGoalReviewStatus(cwe);

	} 

	/** Set the Current Goal Review Status.
	 * This field contains the current point in the continuum of 
	 * a goal review cycle (e.g., due, initiated, reviewed, overdue, verified, etc.).
	 * @param objcurrentGoalReviewStatus
	 */ 
	public void setCurrentGoalReviewStatus(CWE objcurrentGoalReviewStatus)
	{
		setDataType(827,objcurrentGoalReviewStatus);

	}

	/**
	 * Set the Episode of Care ID.
	 * This field uniquely identifies the episode of care to which this goal applies.
	 * @param strEntityIdentifier Specifies defined by a hierarchic designator, represented by components 2 through 4.
	 * 								[Reference Section 2.A.33, "HD - hierarchic designator".] 
	 * @param strNamespaceId Specifies  the HL7 identifier for the user-defined table of values for this component.
	 * 						   [Refer to User-defined Table 0363 - Assigning authority] 	 
	 * @param strUniversalId Specifies string formatted according to the scheme defined by the component, 
	 * 							<universal ID type> (UID type). 
	 * @param strUniversalIdType Specifies  the interpretation of the second component of the HD. 
	 */ 
	public void setEpisodeofCareID (String strEntityIdentifier,String strNamespaceId,
			String strUniversalId,String strUniversalIdType)
	{
		EI episodeofCareID  = (EI)getDataElement(820);
		episodeofCareID.setEntityIdentifier(strEntityIdentifier);
		episodeofCareID.setNamespaceId(strNamespaceId);
		episodeofCareID.setUniversalId(strUniversalId);
		episodeofCareID.setUniversalIdType(strUniversalIdType); 
		setEpisodeofCareID(episodeofCareID);

	} 

	/** Set the Episode of Care ID.
	 * This field uniquely identifies the episode of care to which this goal applies.
	 * @param objepisodeofCareID
	 */ 
	public void setEpisodeofCareID(EI objepisodeofCareID)
	{
		setDataType(820,objepisodeofCareID);

	}

	/**
	 * Set the Expected Goal Achieve Date Time.
	 * This field contains the projected date/time for achieving the stated goal.
	 * @param strTime Specifies a point in time using a 24-hour clock notation.	 
	 */ 
	public void setExpectedGoalAchieveDateTime (String strTime)
	{
		DTM expectedGoalAchieveDateTime  = (DTM)getDataElement(824);
		expectedGoalAchieveDateTime.setValue(strTime);		
		setExpectedGoalAchieveDateTime(expectedGoalAchieveDateTime);

	} 

	/**
	 * Set the Expected Goal Achieve Date Time.
	 * This field contains the projected date/time for achieving the stated goal.
	 * @param objexpectedGoalAchieveDateTime
	 */ 
	public void setExpectedGoalAchieveDateTime(DTM objexpectedGoalAchieveDateTime)
	{
		setDataType(824,objexpectedGoalAchieveDateTime);

	}

	/**
	 * Set the Goal Classification.
	 * This field indicates the kind of goal. This field can be used to
	 *  categorize goals so that they may be managed and viewed independently within different applications.
	 * @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 setGoalClassification  (String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String 				strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		CWE cwe  = (CWE)getDataElement(825);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setGoalClassification (cwe);

	} 

	/** Set the Goal Classification.
	 * This field indicates the kind of goal. This field can be used to
	 *  categorize goals so that they may be managed and viewed independently within different applications.
	 * @param objgoalClassification
	 */ 
	public void setGoalClassification(CWE objgoalClassification)
	{
		setDataType(825,objgoalClassification);

	}

	/**
	 * Set the Goal Established Date Time.
	 * This field identifies the date/time when the stated goal was initially created.
	 * @param strTime Specifies a point in time using a 24-hour clock notation.	 
	 */ 
	public void setGoalEstablishedDateTime (String strTime) 
	{
		DTM goalEstablishedDateTime  = (DTM)getDataElement(822);
		goalEstablishedDateTime.setValue(strTime);		 
		setGoalEstablishedDateTime(goalEstablishedDateTime);

	} 

	/**
	 * Set the Goal Established Date Time.
	 * This field identifies the date/time when the stated goal was initially created.
	 * @param objgoalEstablishedDateTime
	 */ 
	public void setGoalEstablishedDateTime(DTM objgoalEstablishedDateTime)
	{
		setDataType(822,objgoalEstablishedDateTime);

	}

	/**
	 * Set the Goal Evaluation.
	 * This field provides an indicator of progress towards achievement of the goal.
	 * @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 setGoalEvaluation  (String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String 				strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		CWE cwe  = (CWE)getDataElement(832);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setGoalEvaluation (cwe);

	} 

	/** Set the Goal Evaluation.
	 * This field provides an indicator of progress towards achievement of the goal.
	 * @param objgoalEvaluation
	 */ 
	public void setGoalEvaluation(CWE objgoalEvaluation)
	{
		setDataType(832,objgoalEvaluation);

	}

	/**
	 * Set the Goal Evaluation Comment.
	 * This field contains the comments associated with the goal evaluation.  
	 * @param strVarianceDescription String which to set as Application Error Parameter 
	 */ 
	public void addGoalEvaluationComment (String strVarianceDescription) 
	{
		ST tempVarianceDescription  = (ST)getDataElement(833);
		tempVarianceDescription.setValue(strVarianceDescription); 
		addGoalEvaluationComment (tempVarianceDescription);

	} 

	/** Set the Goal Evaluation Comment.
	 * This field contains the comments associated with the goal evaluation.  
	 * @param objtempGoalEvaluationComment GoalEvaluationComment 
	 */ 
	public void addGoalEvaluationComment(ST objtempGoalEvaluationComment)
	{
		addDataType(833,objtempGoalEvaluationComment);

	}

	/**
	 * Set the GoalEvaluationComment
	 * @param objGoalEvaluationCommentList List of GoalEvaluationComment
	 */	
	@SuppressWarnings("unchecked")
	public void setGoalEvaluationComment(ISingleCollection<ST> objGoalEvaluationCommentList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objGoalEvaluationCommentList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(833,objCollection);
	}

	/**
	 * Set the Goal ID.
	 * This field identifies the goal. This is the identifier from an institution's master list of goals.
	 * @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 setGoalID (String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String 				strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		CWE cwe  = (CWE)getDataElement(818);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		setGoalID(cwe);

	} 

	/** Set the Goal ID.
	 * This field identifies the goal. This is the identifier from an institution's master list of goals.
	 * @param objgoalID
	 */ 
	public void setGoalID(CWE objgoalID)
	{
		setDataType(818,objgoalID);

	}

	/**
	 * Set the Goal Instance ID.
	 * This field contains the unique identifier assigned by an initiating system to this instance of the goal.
	 * @param strEntityIdentifier Specifies defined by a hierarchic designator, represented by components 2 through 4.
	 * 								[Reference Section 2.A.33, "HD - hierarchic designator".] 
	 * @param strNamespaceId Specifies  the HL7 identifier for the user-defined table of values for this component.
	 * 						   [Refer to User-defined Table 0363 - Assigning authority] 	 
	 * @param strUniversalId Specifies string formatted according to the scheme defined by the component, 
	 * 							<universal ID type> (UID type). 
	 * @param strUniversalIdType Specifies  the interpretation of the second component of the HD. 
	 */ 
	public void setGoalInstanceID (String strEntityIdentifier,String strNamespaceId,
			String strUniversalId,String strUniversalIdType)
	{
		EI goalInstanceID  = (EI)getDataElement(819);
		goalInstanceID.setEntityIdentifier(strEntityIdentifier);
		goalInstanceID.setNamespaceId(strNamespaceId);
		goalInstanceID.setUniversalId(strUniversalId);
		goalInstanceID.setUniversalIdType(strUniversalIdType); 
		setGoalInstanceID(goalInstanceID);

	} 

	/** Set the Goal Instance ID.
	 * This field contains the unique identifier assigned by an initiating system to this instance of the goal.
	 * @param objgoalInstanceID
	 */ 
	public void setGoalInstanceID(EI objgoalInstanceID)
	{
		setDataType(819,objgoalInstanceID);

	}

	/**
	 * Set the Goal Life Cycle Status.
	 * This field contains an indication of the state of the goal.
	 * @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 setGoalLifeCycleStatus  (String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String 				strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		CWE cwe  = (CWE)getDataElement(834);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID); 
		setGoalLifeCycleStatus (cwe);

	} 

	/** Set the Goal Life Cycle Status.
	 * This field contains an indication of the state of the goal.
	 * @param objgoalLifeCycleStatus
	 */ 
	public void setGoalLifeCycleStatus(CWE objgoalLifeCycleStatus)
	{
		setDataType(834,objgoalLifeCycleStatus);

	}

	/**
	 * Set the Goal Life Cycle Status Date Time.
	 * This field contains the effective date/time of the current goal life cycle status.
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setGoalLifeCycleStatusDateTime (String strTime) 
	{
		DTM goalLifeCycleStatusDateTime  = (DTM)getDataElement(835);
		goalLifeCycleStatusDateTime.setValue(strTime);		 
		setGoalLifeCycleStatusDateTime(goalLifeCycleStatusDateTime);

	} 

	/**
	 * Set the Goal Life Cycle Status Date Time.
	 * This field contains the effective date/time of the current goal life cycle status.
	 * @param objgoalLifeCycleStatusDateTime
	 */
	public void setGoalLifeCycleStatusDateTime(DTM objgoalLifeCycleStatusDateTime)
	{
		setDataType(835,objgoalLifeCycleStatusDateTime);

	}

	/** 
	 * Set the Goal List Priority.
	 * This field prioritizes this goal on a list that is maintained for an individual.
	 * @param strPolicyLimitDays Specifies the maximum number of days that the insurance policy will cover.
	 */ 
	public void setGoalListPriority (String strPolicyLimitDays) 
	{
		NM goalListPriority  = (NM)getDataElement(821);

		goalListPriority.setValue(strPolicyLimitDays); 
		setGoalListPriority(goalListPriority);

	} 

	/** Set the Goal List Priority.
	 * This field prioritizes this goal on a list that is maintained for an individual.
	 * @param objgoalListPriority Specifies the maximum number of days that the insurance policy will cover.
	 */ 
	public void setGoalListPriority(NM objgoalListPriority)
	{
		setDataType(821,objgoalListPriority);

	}

	/**
	 * Set the Goal Management Discipline.
	 * This field indicates the category of caregiver with responsibility for managing this specific goal. 
	 * @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 setGoalManagementDiscipline (String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String 				strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		
		CWE cwe  = (CWE)getDataElement(826);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID); 
		setGoalManagementDiscipline(cwe);

	} 

	/** Set the Goal Management Discipline.
	 * This field indicates the category of caregiver with responsibility for managing this specific goal. 
	 * @param objgoalManagementDiscipline
	 */ 
	public void setGoalManagementDiscipline(CWE objgoalManagementDiscipline)
	{
		setDataType(826,objgoalManagementDiscipline);

	}
	
	
	/**
	 * Set the Goal Target Name.
	 * This field contains the identification of the person(s) on whom the goal is focused.  
	 * @param objFamilyName Specifies the surname of a person. 
	 * @param strGivenName Specifies First name.
	 * @param strSecondAndFurtherGivenNamesOrInitialsThereof Specifies multiple middle names that may be included by separating them with spaces.
	 * @param strSuffix Used to specify a name suffix (e.g., Jr. or III).
	 * @param strPrefix Used to specify a name prefix (e.g., Dr.).
	 * @param strNameTypeCode Specifies a code that represents the type of name. Suggested values are A,B,C,D,I,L,M,N,P,R,S,T,U...[Refer table 0200.]
	 * @param strNameRepresentationCode Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465] 
	 * @param objNameContext Designates the context in which a name is used. [Refer User-defined Table 0448 ]
	 * @param strNameAssemblyOrder Specifies a code that represents the preferred display order of the components of this person name. Suggested values are G,F[Refer table 0444.]
	 * @param objEffectiveDate Specifies the first date, if known, on which the address is valid and active.
	 * @param objExpirationDate Specifies the last date, if known, on which the address is valid and active.
	 * @param strProfessionalSuffix Used to specify an abbreviation, or a string of abbreviations, denoting qualifications that support the person's profession, (e.g., licenses). 
	 * @param strCalledBy Used to specify the called name.
	 */ 
	public void addGoalTargetName (FN objFamilyName, String strGivenName, String strSecondAndFurtherGivenNamesOrInitialsThereof, 
			String strSuffix, String strPrefix, String strNameTypeCode, String strNameRepresentationCode, 
			CWE objNameContext, String strNameAssemblyOrder, DTM objEffectiveDate,
			DTM objExpirationDate, String strProfessionalSuffix, String strCalledBy)
	{
		XPN xpn = (XPN)getDataElement(837);
		xpn.setFamilyName(objFamilyName);
		xpn.setGivenName(strGivenName);
		xpn.setSecondNameOrInitials(strSecondAndFurtherGivenNamesOrInitialsThereof);
		xpn.setSuffix(strSuffix);
		xpn.setPrefix(strPrefix);
//		xpn.setDegree(strDegree);
		xpn.setNameTypeCode(strNameTypeCode);
		xpn.setNameRepresentationCode(strNameRepresentationCode);
		xpn.setNameContext(objNameContext);
//		xpn.setNameValidityRange(objNameValidityRange);
		xpn.setNameAssemblyOrder(strNameAssemblyOrder);
		xpn.setEffectiveDate(objEffectiveDate);
		xpn.setExpirationDate(objExpirationDate);
		xpn.setProfessionalSuffix(strProfessionalSuffix); 
		xpn.setCalledBy(strCalledBy);
		addGoalTargetName(xpn);

	} 

	/**
	 * Set the Goal Target Name.
	 * This field contains the identification of the person(s) on whom the goal is focused.  
	 * @param objtempGoalTargetName 
	 */ 
	public void addGoalTargetName(XPN objtempGoalTargetName)
	{
		addDataType(837,objtempGoalTargetName);

	}

	/**
	 * Set the GoalTargetName
	 * @param objGoalTargetNameList List of GoalTargetName
	 */	
	@SuppressWarnings("unchecked")
	public void setGoalTargetName(ISingleCollection<XPN> objGoalTargetNameList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objGoalTargetNameList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(837,objCollection);
	}

	/**
	 * Set the Goal Target Type.
	 * This field contains the individual/group for whom the goal has been established. 
	 * @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 addGoalTargetType (String strIdentifier,String strText,String strNameOfCodingSystem,
			String strAlternateIdentifier,String strAlternateText,String strNameOfAlternateCodingSystem, String strCodingSystemVersionID, String 				strAlternateCodingSystemVersionId,
			String strOriginalText, String  strSecondAlternateIdentifier, String strSecondAlternateText, 
			String strNameofSecondAlternateCodingSystem, String strSecondAlternateCodingSystemVersionID, String strCodingSystemOID, String strValueSetOID,
			String strValueSetVersionID, String strAlternateCodingSystemOID, String strAlternateValueSetOID, String strAlternateValueSetVersionID,
			String  strSecondAlternateCodingSystemOID, String strSecondAlternateValueSetOID, String strSecondAlternateValueSetVersionID)
	{
		CWE cwe  = (CWE)getDataElement(836);
		cwe.setIdentifier(strIdentifier);
		cwe.setText(strText);
		cwe.setNameOfCodingSystem(strNameOfCodingSystem);
		cwe.setAlternateIdentifier(strAlternateIdentifier);
		cwe.setAlternateText(strAlternateText);
		cwe.setNameOfAlternateCodingSystem(strNameOfAlternateCodingSystem); 
		cwe.setCodingSystemVersionID(strCodingSystemVersionID);
		cwe.setAlternateCodingSystemVersionId(strAlternateCodingSystemVersionId);
		cwe.setOriginalText(strOriginalText);
		cwe.setSecondAlternateIdentifier(strSecondAlternateIdentifier);
		cwe.setSecondAlternateText(strSecondAlternateText);
		cwe.setNameofSecondAlternateCodingSystem(strNameofSecondAlternateCodingSystem);
		cwe.setSecondAlternateCodingSystemVersionID(strSecondAlternateCodingSystemVersionID);
		cwe.setCodingSystemOID(strCodingSystemOID);
		cwe.setValueSetOID(strValueSetOID);
		cwe.setValueSetVersionID(strValueSetVersionID);
		cwe.setAlternateCodingSystemOID(strAlternateCodingSystemOID);
		cwe.setAlternateValueSetOID(strAlternateValueSetOID);
		cwe.setAlternateValueSetVersionID(strAlternateValueSetVersionID);
		cwe.setSecondAlternateCodingSystemOID(strSecondAlternateCodingSystemOID);
		cwe.setSecondAlternateValueSetOID(strSecondAlternateValueSetOID);
		cwe.setSecondAlternateValueSetVersionID(strSecondAlternateValueSetVersionID);
		addGoalTargetType(cwe);

	} 

	/**
	 * Set the Goal Target Type.
	 * This field contains the individual/group for whom the goal has been established. 
	 * @param objtempGoalTargetType
	 */ 
	public void addGoalTargetType(CWE objtempGoalTargetType)
	{
		addDataType(836,objtempGoalTargetType);

	}

	/**
	 * Set the GoalTargetType
	 * @param objGoalTargetTypeList List of GoalTargetType
	 */	
	@SuppressWarnings("unchecked")
	public void setGoalTargetType(ISingleCollection<CWE> objGoalTargetTypeList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objGoalTargetTypeList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(836,objCollection);
	}

	/** 
	 * Set the Next Goal Review Date Time.
	 * This field contains the date/time of the next scheduled goal review.
	 * @param strTime Specifies a point in time using a 24-hour clock notation.	 
	 */ 
	public void setNextGoalReviewDateTime (String strTime)  
	{
		DTM nextGoalReviewDateTime  = (DTM)getDataElement(829);
		nextGoalReviewDateTime.setValue(strTime);		 
		setNextGoalReviewDateTime(nextGoalReviewDateTime);

	} 

	/** 
	 * Set the Next Goal Review Date Time.
	 * This field contains the date/time of the next scheduled goal review.
	 * @param objnextGoalReviewDateTime
	 */ 
	public void setNextGoalReviewDateTime(DTM objnextGoalReviewDateTime)
	{
		setDataType(829,objnextGoalReviewDateTime);

	}
	/** 
	 * Set the Previous Goal Review Date Time.
	 * This field contains the date/time that the goal is reviewed prior to the current review.
	 * @param strTime Specifies a point in time using a 24-hour clock notation.
	 */ 
	public void setPreviousGoalReviewDateTime (String strTime)  
	{
		DTM previousGoalReviewDateTime  = (DTM)getDataElement(830);
		previousGoalReviewDateTime.setValue(strTime);		
		setPreviousGoalReviewDateTime(previousGoalReviewDateTime);

	} 

	/** 
	 * Set the Previous Goal Review Date Time.
	 * This field contains the date/time that the goal is reviewed prior to the current review.
	 * @param objpreviousGoalReviewDateTime
	 */
	public void setPreviousGoalReviewDateTime(DTM objpreviousGoalReviewDateTime)
	{
		setDataType(830,objpreviousGoalReviewDateTime);

	}

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

	} 

	/** 
	 * Set the Mood Code.
	 * This field indicates the Mood of the Goal.  It allows expression of the context of the problem.
	 * @param objMoodCode Object of Mood Code.
	 */ 
	public void setMoodCode(CNE objMoodCode)
	{
		setDataType(2182,objMoodCode);

	}

	/**
	 * 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 If Segment Validation fails 
	 */	
	@Override
	public boolean validate() throws InvalidSegmentException 
	{

		/*
		 * Action Code, Action Date/Time ,Goal ID ,Goal Instance ID  are required fields.
		 */

		try 
		{
			super.validate();

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