/*******************************************************************************
 *  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.DTM;
import cdac.medinfo.sdk.hl7282.baselibs.EI;
import cdac.medinfo.sdk.hl7282.baselibs.HD;
import cdac.medinfo.sdk.hl7282.baselibs.ID;
import cdac.medinfo.sdk.hl7282.baselibs.PL;
import cdac.medinfo.sdk.hl7282.baselibs.ST;
import cdac.medinfo.sdk.hl7282.baselibs.VH;
import cdac.medinfo.sdk.hl7282.baselibs.XTN;
import cdac.medinfo.sdk.hl7282.commoninterface.IDataType;
import cdac.medinfo.sdk.hl7282.commoninterface.ISingleCollection;
import cdac.medinfo.sdk.hl7282.exceptions.FieldMissingException;
import cdac.medinfo.sdk.hl7282.exceptions.InvalidSegmentException;
import cdac.medinfo.sdk.hl7282.utils.EnumSegments;
import cdac.medinfo.sdk.hl7282.utils.SingleCollection;

/**
 * LDP - Location Department Segment.<p>
 * LDP segment identifies how a patient location room is being used by a certain 
 * department.  Multiple departments can use the same patient location, so there 
 * can be multiple LDP segments following an LOC segment.
 * <p>Represents an HL7 LDP message segment. 
 * This segment has the following fields:</p><p>
 * LDP-1: Primary Key Value - LDP (PL)<b>Required</b><br> 
 * LDP-2: Location Department (CWE)<b>Required</b><br> 
 * LDP-3: Location Service (CWE)<b>Optional</b><br> 
 * LDP-4: Specialty Type (CWE)<b>Optional</b><br> 
 * LDP-5: Valid Patient Classes (CWE)<b>Optional</b><br> 
 * LDP-6: Active/Inactive Flag (ID)<b>Optional</b><br> 
 * LDP-7: Activation Date  LDP (DTM)<b>Optional</b><br> 
 * LDP-8: Inactivation Date - LDP (DTM)<b>Optional</b><br> 
 * LDP-9: Inactivated Reason (ST)<b>Optional</b><br> 
 * LDP-10: Visiting Hours (VH)<b>Optional</b><br> 
 * LDP-11: Contact Phone (XTN)<b>Optional</b><br> 
 * LDP-12: Location Cost Center (CWE)<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 LDP extends Segment   
{
	

	/**
	 * Constructs the LDP segment.
	 */
	public LDP()
	{super(EnumSegments.HL7_SEG_LDP);
	}

	//Integer values used in getter/setter is unique item id defined 
	//for each attribute.

	/**
	 * Retrieves the Activation Date LDP.
	 * This field contains the date and time when the location became active or "in service" for a department.
	 * @return DTM - activationDateLDP
	 */
	public DTM getActivationDateLDP() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(969);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Active Inactive Flag.
	 * This indicates whether the entry for this location is currently an active, that is, valid, usable entry or not.
	 * @return ID - activeInactiveFlag
	 */
	public ID getActiveInactiveFlag() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(675);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ID)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Contact Phone.
	 * This field contains the phone number to use to contact facility personnel
	 *  about the patient location, in case of inquiries about the location.
	 * @return XTN - contactPhone
	 */
	public XTN getContactPhone() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(978);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (XTN)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Inactivated Reason.
	 * This field contains the reason the location is put out of service.  
	 * @return ST - inactivatedReason
	 */
	public ST getInactivatedReason() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(971);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (ST)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Inactivation Date LDP.
	 * This field contains the date when the location became inactive or "out of service" for this department.
	 * @return DTM - inactivationDateLDP
	 */
	public DTM getInactivationDateLDP() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(970);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (DTM)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Location Cost Center.
	 * This field contains the cost center to which this location belongs. 
	 * @return CWE - locationCostCenter
	 */
	public CWE getLocationCostCenter() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(1584);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Location Department.
	 * This field contains the institution's department to which this location belongs, or its cost center. 
	 * @return CWE - locationDepartment
	 */
	public CWE getLocationDepartment() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(964);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (CWE)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Location Service.
	 * This field contains the hospital or ancillary service with which this location is associated.  
	 * @return ISingleCollection<CWE> - locationService
	 */
	public ISingleCollection<CWE> getLocationService() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(965);
		ISingleCollection<CWE> objDataList = new SingleCollection<CWE>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				CWE objIS = (CWE)objDataType;
				objDataList.add(objIS);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Primary Key Value LDP.
	 * This field contains the institution's identification code for the location.  
	 * @return PL - primaryKeyValueLDP
	 */
	public PL getPrimaryKeyValueLDP() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(963);
		if(objDataCollection != null && objDataCollection.size() != 0) 
			return (PL)objDataCollection.elementAt(0);
		else
			return null;
	}

	/**
	 * Retrieves the Specialty Type. 
	 * @return ISingleCollection<CWE> - specialtyType
	 */
	public ISingleCollection<CWE> getSpecialtyType() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(966);
		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 Valid Patient Classes.
	 * This field contains the patient types that are allowed to be assigned to this bed.
	 * @return ISingleCollection<CWE> - validPatientClasses
	 */
	public ISingleCollection<CWE> getValidPatientClasses() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(967);
		ISingleCollection<CWE> objDataList = new SingleCollection<CWE>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				CWE objIS = (CWE)objDataType;
				objDataList.add(objIS);
			}
		}
		return objDataList;
	}

	/**
	 * Retrieves the Visiting Hours.
	 * This field contains the hours when this location is open for visiting.  
	 * @return ISingleCollection<VH> - visitingHours
	 */
	public ISingleCollection<VH> getVisitingHours() 
	{
		ISingleCollection<IDataType> objDataCollection =getDataType(976);
		ISingleCollection<VH> objDataList = new SingleCollection<VH>(); 
		if(objDataCollection != null && objDataCollection.size() != 0)
		{
			for(IDataType objDataType : objDataCollection)
			{
				VH objVH = (VH)objDataType;
				objDataList.add(objVH);
			}
		}
		return objDataList;
	}

	/**
	 * Set the Primary Key Value LDP.
	 * This field contains the institution's identification code for the location.  
	 * @param objPointOfCare Specifies the code for the point where patient care is administered.
	 * @param objRoom Specifies the code for the patient's room. 
	 * @param objBed Specifies the code for the patient's bed. 
	 * @param objFacility Specifies to site interpretation but generally describes 
	 * 							the highest level physical designation of an institution, 
	 * 							medical center or enterprise. 
	 * @param strLocationStatus Specifies the code for the status or availability of the location. 
	 * @param strPersonLocationType Specifies the categorization of the person's location defined by 
	 * 									facility, building, floor, point of care, room or bed. 
	 * @param objBuilding Specifies code for the building where the person is located. 
	 * @param objFloor Specifies the code for the floor where the person is located.
	 * @param strLocationDescription Specifies describes the location in free text.
	 * @param objComprehensiveLocationIdentifier Specifies represents the physical location as 
	 *													a whole without regard for the individual components. 
	 * @param objAssigningAuthorityForLocation Specifies the entity that creates the data for the individual physical location components. 
	 */  
	public void setPrimaryKeyValueLDP (HD objPointOfCare, HD objRoom, HD objBed, HD objFacility,
			String strLocationStatus, String strPersonLocationType, HD objBuilding, HD objFloor, 
			String strLocationDescription, EI objComprehensiveLocationIdentifier, HD objAssigningAuthorityForLocation)
	{
		PL pl  = (PL)getDataElement(963);
		pl.setPointOfCare(objPointOfCare);
		pl.setRoom(objRoom);
		pl.setBed(objBed);
		pl.setFacility(objFacility);
		pl.setLocationStatus(strLocationStatus);
		pl.setPersonLocationType(strPersonLocationType);
		pl.setBuilding(objBuilding);
		pl.setFloor(objFloor);
		pl.setLocationDescription(strLocationDescription);
		pl.setComprehensiveLocationIdentifier(objComprehensiveLocationIdentifier);
		pl.setAssigningAuthorityForLocation(objAssigningAuthorityForLocation); 
		setPrimaryKeyValueLDP(pl);

	} 

	/** 
	 * Set the Primary Key Value LDP.
	 * This field contains the institution's identification code for the location.  
	 * @param objprimaryKeyValueLDP Object of Primary Key Value LDP.
	 */ 
	public void setPrimaryKeyValueLDP(PL objprimaryKeyValueLDP)
	{
		setDataType(963,objprimaryKeyValueLDP);

	}

	/**
	 * Set the Location Department.
	 * This field contains the institution's department to which this location belongs, or its cost center. 
	 * @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 setLocationDepartment (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(964);
		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); 
		setLocationDepartment(cwe);

	} 

	/** 
	 * Set the Location Department.
	 * This field contains the institution's department to which this location belongs, or its cost center. 
	 * @param objlocationDepartment Object of Location Department.
	 */ 
	public void setLocationDepartment(CWE objlocationDepartment)
	{
		setDataType(964,objlocationDepartment);

	}

	/**
	 * Add the Location Service.
	 * This field contains the hospital or ancillary service with which this location is associated.  
	 * @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 addLocationService(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(965);
		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);
		addLocationService(cwe);
	}

	/**
	 * Add the Location Service.
	 * This field contains the hospital or ancillary service with which this location is associated.
	 * @param objlocationService Object of Location Service.
	 */
	public void addLocationService(CWE objlocationService)
	{
		addDataType(965,objlocationService);
	}

	/**
	 * Set the Location Service.
	 * This field contains the hospital or ancillary service with which this location is associated.
	 * @param objlocationServiceList List of Location Service.
	 */
	@SuppressWarnings("unchecked")
	public void setLocationService(ISingleCollection<CWE> objlocationServiceList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objlocationServiceList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(965,objCollection);
	}

	/**
	 * Add the Specialty Type.
	 * @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 addSpecialtyType(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(966);
		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);
		addSpecialtyType(cwe);
	}

	/**
	 * Add the Specialty Type.
	 * @param objspecialtyType Object of Specialty Type.
	 */
	public void addSpecialtyType(CWE objspecialtyType)
	{
		addDataType(966,objspecialtyType);
	}

	/**
	 * Set the Specialty Type.
	 * @param objspecialtyTypeList List of Specialty Type.
	 */
	@SuppressWarnings("unchecked")
	public void setSpecialtyType(ISingleCollection<CWE> objspecialtyTypeList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objspecialtyTypeList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(966,objCollection);
	}

	/**
	 * Add the Valid Patient Classes.
	 * This field contains the patient types that are allowed to be assigned to this bed.
	 * @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 addValidPatientClasses(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(967);
		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);
		addValidPatientClasses(cwe);
	}

	/**
	 * Add the Valid Patient Classes.
	 * This field contains the patient types that are allowed to be assigned to this bed.
	 * @param objvalidPatientClasses Object of Valid Patient Classes.
	 */
	public void addValidPatientClasses(CWE objvalidPatientClasses)
	{
		addDataType(967,objvalidPatientClasses);
	}

	/**
	 * Set the Valid Patient Classes.
	 * This field contains the patient types that are allowed to be assigned to this bed.
	 * @param objvalidPatientClassesList List of Valid Patient Classes.
	 */
	@SuppressWarnings("unchecked")
	public void setValidPatientClasses(ISingleCollection<CWE> objvalidPatientClassesList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objvalidPatientClassesList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(967,objCollection);
	}

	/**
	 * Set the Active Inactive Flag.
	 * This indicates whether the entry for this location is currently an active, that is, valid, usable entry or not.
	 * @param strActiveInactiveFlag String to beb passed as Active/Inactive Flag
	 */ 
	public void setActiveInactiveFlag (String strActiveInactiveFlag) 
	{
		ID activeInactiveFlag  = (ID)getDataElement(675);
		activeInactiveFlag.setValue(strActiveInactiveFlag); 
		setActiveInactiveFlag(activeInactiveFlag);

	} 

	/** 
	 * Set the Active Inactive Flag.
	 * This indicates whether the entry for this location is currently an active, that is, valid, usable entry or not.
	 * @param objactiveInactiveFlag Object of Active Inactive Flag.
	 */ 
	public void setActiveInactiveFlag(ID objactiveInactiveFlag)
	{
		setDataType(675,objactiveInactiveFlag);

	}

	/**
	 * Set the Activation Date LDP.
	 * This field contains the date and time when the location became active or "in service" for a department. 
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setActivationDateLDP (String strTime) 
	{
		DTM activationDateLDP  = (DTM)getDataElement(969);
		activationDateLDP.setValue(strTime);
		setActivationDateLDP(activationDateLDP);

	} 

	/** 
	 * Set the Activation Date LDP.
	 * This field contains the date and time when the location became active or "in service" for a department. 
	 * @param objactivationDateLDP Object of Activation Date LDP.
	 */ 
	public void setActivationDateLDP(DTM objactivationDateLDP)
	{
		setDataType(969,objactivationDateLDP);

	}

	/**
	 * Set the Inactivation Date LDP.
	 * This field contains the date when the location became inactive or "out of service" for this department. 
	 * @param strTime Specifies a point in time using a 24-hour clock notation. 
	 */ 
	public void setInactivationDateLDP (String strTime) 
	{
		DTM inactivationDateLDP  = (DTM)getDataElement(970);
		inactivationDateLDP.setValue(strTime);
		setInactivationDateLDP(inactivationDateLDP);

	} 

	/** 
	 * Set the Inactivation Date LDP.
	 * This field contains the date when the location became inactive or "out of service" for this department. 
	 * @param objinactivationDateLDP Object of Inactivation Date LDP.
	 */ 
	public void setInactivationDateLDP(DTM objinactivationDateLDP)
	{
		setDataType(970,objinactivationDateLDP);

	}

	/**
	 * Set the Inactivated Reason.
	 * This field contains the reason the location is put out of service.  
	 * @param strInactivatedReason String to be passed as Inactivated Reason
	 */ 
	public void setInactivatedReason (String strInactivatedReason) 
	{
		ST inactivatedReason  = (ST)getDataElement(971);
		inactivatedReason.setValue(strInactivatedReason); 
		setInactivatedReason(inactivatedReason);

	} 

	/** 
	 * Set the Inactivated Reason.
	 * This field contains the reason the location is put out of service.  
	 * @param objinactivatedReason Object of Inactivated Reason.
	 */ 
	public void setInactivatedReason(ST objinactivatedReason)
	{
		setDataType(971,objinactivatedReason);

	}

	/**
	 * Add the Visiting Hours.
	 * This field contains the hours when this location is open for visiting.  
	 * @param strStartDayRange Starting day of visiting hours range. 
	 * @param strEndDayRange Ending day of visiting hours range. 
	 * @param strStartHourRange Starting hour on starting day of visiting hours range. 
	 * @param strEndHourRange Ending hour on ending day of visiting hours range 
	 */
	public void addVisitingHours(String strStartDayRange,String strEndDayRange,String strStartHourRange,String strEndHourRange) 
	{
		VH visitingHours  = (VH)getDataElement(976);
		visitingHours.setStartDayRange(strStartDayRange);
		visitingHours.setEndDayRange(strEndDayRange);
		visitingHours.setStartHourRange(strStartHourRange);
		visitingHours.setEndHourRange(strEndHourRange);
		addVisitingHours(visitingHours);
	}

	/**
	 * Add the Visiting Hours.
	 * This field contains the hours when this location is open for visiting.
	 * @param objvisitingHours Object of Visiting Hours.
	 */
	public void addVisitingHours(VH objvisitingHours)
	{
		addDataType(976,objvisitingHours);
	}

	/**
	 * Set the Visiting Hours.
	 * This field contains the hours when this location is open for visiting.
	 * @param objvisitingHoursList List of Visiting Hours.
	 */
	@SuppressWarnings("unchecked")
	public void setVisitingHours(ISingleCollection<VH> objvisitingHoursList)
	{
		ISingleCollection<IDataType> objCollection = null;
		ISingleCollection<?> objUnknownCollection = (ISingleCollection<?>)objvisitingHoursList;
		objCollection = (ISingleCollection<IDataType>)objUnknownCollection;
		setDataType(976,objCollection);
	}

	/**
	 * Set the Contact Phone.
	 * This field contains the phone number to use to contact facility personnel
	 *  about the patient location, in case of inquiries about the location.
	 * @param strTeleCommunicationUseCode Specifies a code that represents a specific use of a telecommunication number.
	 										Suggested values are PRN,ORN,WPN,VHN,ASN,EMR,NET,BPN  [Refer table 0201.]
	 * @param strTeleCommunicationEquipmentType Specifies a code that represents the type of telecommunication equipment.
	 * 											  Suggested values are PH,FX,MD,CP,BP,Internet,X.400,TDD,TTY  [Refer table 0202.]
	 * @param strCommuinicationAddress Specifies Email address.
	 * @param strCountryCode Specifies the Country code.
	 * @param strAreaCityCode Specifies the area /City Code.
	 * @param strLocalNumber Specifies an Local Number.
	 * @param strExtension Specifies an Extension.
	 * @param strAnyText Contains comments with respect to the telephone number.
	 * @param strExtensionPrefix Specifies the characters established within a company's 
	 * 							   internal telephone system network used as a prefix to the Extension component for internal dialing. 
	 * @param strSpeedDialCode Specifies The characters established within a 
	 * 							 company's internal telephone system used in place of the (external) telephone number.
	 * @param strUnformattedTelephoneNumber Specifies an expression of the telephone number as an unparsible string.
	 * @param strEffectiveStartDate Specifies start date.
	 * @param strExpirationDate Specifies expiration date.
	 * @param objExpirationReason Specifies reason why this contact is marked as ended.
	 * @param objProtectionCode Specifies reason why this information is sensitive or protected.
	 * @param objSharedTelecommunicationIdentifier Specifies a unique phone number phone telephone number or email-id.
	 * @param strPreferenceOrder Specifies the preference order for an entity..
	 */
	public void setContactPhone (String strTeleCommunicationUseCode,String strTeleCommunicationEquipmentType
			,String strCommuinicationAddress,String strCountryCode,String strAreaCityCode,String strLocalNumber,String strExtension,String strAnyText,
			String strExtensionPrefix,String strSpeedDialCode,String strUnformattedTelephoneNumber, String strEffectiveStartDate, String strExpirationDate,
			CWE objExpirationReason, CWE objProtectionCode, EI objSharedTelecommunicationIdentifier, String strPreferenceOrder)
	{
		XTN xtn  = (XTN)getDataElement(978);
//		xtn.setTelephoneNumber(strTelephoneNumber);
		xtn.setTelecommunicationUseCode(strTeleCommunicationUseCode);
		xtn.setTelecommunicationEquipmentType(strTeleCommunicationEquipmentType);
		xtn.setCommuinicationAddress(strCommuinicationAddress);
		xtn.setCountryCode(strCountryCode);
		xtn.setAreaCityCode(strAreaCityCode);
		xtn.setLocalNumber(strLocalNumber);
		xtn.setExtension(strExtension);
		xtn.setAnyText(strAnyText);
		xtn.setExtensionPrefix(strExtensionPrefix);
		xtn.setSpeedDialCode(strSpeedDialCode);
		xtn.setUnformattedTelephonenumber(strUnformattedTelephoneNumber); 
		xtn.setEffectiveStartDate(strEffectiveStartDate);
		xtn.setExpirationDate(strExpirationDate);
		xtn.setExpirationReason(objExpirationReason);
		xtn.setProtectionCode(objProtectionCode);
		xtn.setSharedTelecommunicationIdentifier(objSharedTelecommunicationIdentifier);
		xtn.setPreferenceOrder(strPreferenceOrder);
		setContactPhone(xtn);

	} 

	/** 
	 * Set the Contact Phone.
	 * This field contains the phone number to use to contact facility personnel
	 *  about the patient location, in case of inquiries about the location.
	 * @param objcontactPhone Object of Contact Phone.
	 */ 
	public void setContactPhone(XTN objcontactPhone)
	{
		setDataType(978,objcontactPhone);

	}

	/**
	 * Set the Location Cost Center.
	 * This field contains the cost center to which this location belongs. 
	 * @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 setLocationCostCenter (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(1584);
		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); 
		setLocationCostCenter(cwe);

	} 

	/** 
	 * Set the Location Cost Center.
	 * This field contains the cost center to which this location belongs. 
	 * @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.
	 */ 
	public void setLocationCostCenter(CWE objlocationCostCenter)
	{
		setDataType(1584,objlocationCostCenter);

	}

	/**
	 * Validates HL7 Message objects .
	 * Validate method checks for validation each and every segments in side the Message object against specified message Structure. 
	 * Validation checks include optionality of segment or group.
	 * It also verifies the number of times segment or group is repeated in message.
	 * e.g 
	 * {PSH} while parsing PSH segment validate method will check for its mandatory presence.
	 * [PSH] in this case validate will throw exception if one tries to enter more than one PSH segment.
	 * @return boolean - true or false.
	 * @throws InvalidSegmentException Throws when Segment Validation fails
	 */
	public boolean validate() throws InvalidSegmentException
	{
		try
		{
			/*
			 * Primary Key Value - LDP,Location Department are required fields.
			 */
			super.validate();

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