cdac.medinfo.sdk.hl7282.baselibs.segments

## Class LOC

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.segments.Segment
  - - cdac.medinfo.sdk.hl7282.baselibs.segments.LOC

- All Implemented Interfaces:
    ISegment

      public class LOC
      extends Segment

  LOC - Location Identification Segment.

  The LOC segment can identify any patient location referenced by information systems. This segment gives physical set up information about the location.

  Represents an HL7 LOC message segment. This segment has the following fields:

  LOC-1: Primary Key Value - LOC (PL)Required
  LOC-2: Location Description (ST)Optional
  LOC-3: Location Type - LOC (CWE)Required
  LOC-4: Organization Name - LOC (XON)Optional
  LOC-5: Location Address (XAD)Optional
  LOC-6: Location Phone (XTN)Optional
  LOC-7: License Number (CWE)Optional
  LOC-8: Location Equipment (CWE)Optional
  LOC-9: Location Service Code (CWE)Optional

  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.

  User can also create Segment through `SegmentFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LOC()` Constructs the LOC segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addLicenseNumber(CWE objlicenseNumber)` Add the License Number.
    `void` | `addLicenseNumber(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Add the License Number.
    `void` | `addLocationAddress(SAD objStreetAddress, java.lang.String strOtherDesignation, java.lang.String strCity, java.lang.String strStateOrProvince, java.lang.String strZipOrPostalCode, java.lang.String strCountry, java.lang.String strAddressType, java.lang.String strOtherGeographicDesignation, CWE objCountyParishCode, CWE objCensusTract, java.lang.String strAddressRepresentationCode, DTM objEffectiveDate, DTM objExpirationDate, CWE objEXpirationReason, java.lang.String strTemporaryIndicator, java.lang.String strBadAddressIndicator, java.lang.String strAddressUsage, java.lang.String strAddressee, java.lang.String strComment, java.lang.String strPreferenceOrder, CWE objProtectionCode, EI objAddressIdentifier)` Add the Location Address.
    `void` | `addLocationAddress(XAD objlocationAddress)` Add the Location Address.
    `void` | `addLocationEquipment(CWE objlocationEquipment)` Add the Location Equipment.
    `void` | `addLocationEquipment(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Add the Location Equipment.
    `void` | `addLocationPhone(java.lang.String strTeleCommunicationUseCode, java.lang.String strTeleCommunicationEquipmentType, java.lang.String strCommuinicationAddress, java.lang.String strCountryCode, java.lang.String strAreaCityCode, java.lang.String strLocalNumber, java.lang.String strExtension, java.lang.String strAnyText, java.lang.String strExtensionPrefix, java.lang.String strSpeedDialCode, java.lang.String strUnformattedTelephoneNumber, java.lang.String strEffectiveStartDate, java.lang.String strExpirationDate, CWE objExpirationReason, CWE objProtectionCode, EI objSharedTelecommunicationIdentifier, java.lang.String strPreferenceOrder)` Add the Location Phone.
    `void` | `addLocationPhone(XTN objlocationPhone)` Add the Location Phone.
    `void` | `addLocationTypeLOC(CWE objlocationTypeLOC)` Add the Location Type LOC.
    `void` | `addLocationTypeLOC(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Add the Location Type LOC.
    `void` | `addOrganizationNameLOC(java.lang.String strOrganizationName, CWE objOrganizationNameTypeCode, HD objAssigningAuthority, java.lang.String strIdentifierTypeCode, HD objAssigningFacility, java.lang.String strNameRepresentationCode, java.lang.String strOrganizationIdentifier)` Add the field which contains the organization(s) of which this location is a part.
    `void` | `addOrganizationNameLOC(XON objorganizationNameLOC)` Add the field which contains the organization(s) of which this location is a part.
    `ISingleCollection<CWE>` | `getLicenseNumber()` Retrieves the License Number.
    `ISingleCollection<XAD>` | `getLocationAddress()` Retrieves the Location Address.
    `ST` | `getLocationDescription()` Retrieves the Location Description.
    `ISingleCollection<CWE>` | `getLocationEquipment()` Retrieves the Location Equipment.
    `ISingleCollection<XTN>` | `getLocationPhone()` Retrieves the Location Phone.
    `CWE` | `getLocationServiceCode()` Retrieves the Location Service Code.
    `ISingleCollection<CWE>` | `getLocationTypeLOC()` Retrieves the Location Type LOC.
    `ISingleCollection<XON>` | `getOrganizationNameLOC()` Retrieves the field contains the organization(s) of which this location is a part.
    `PL` | `getPrimaryKeyValueLoc()` Retrieves the field contains the institution's identification code for the location.
    `void` | `setLicenseNumber(ISingleCollection<CWE> objlicenseNumberList)` Set the License Number.
    `void` | `setLocationAddress(ISingleCollection<XAD> objlocationAddressList)` Set the Location Address.
    `void` | `setLocationDescription(ST objlocationDescription)` Set the Location Description.
    `void` | `setLocationDescription(java.lang.String strTitleofStudy)` Set the Location Description.
    `void` | `setLocationEquipment(ISingleCollection<CWE> objlocationEquipmentList)` Set the Location Equipment.
    `void` | `setLocationPhone(ISingleCollection<XTN> objlocationPhoneList)` Set the Location Phone.
    `void` | `setLocationServiceCode(CWE objlocationServiceCode)` Set the Location Service Code.
    `void` | `setLocationServiceCode(java.lang.String strIdentifier, java.lang.String strText, java.lang.String strNameOfCodingSystem, java.lang.String strAlternateIdentifier, java.lang.String strAlternateText, java.lang.String strNameOfAlternateCodingSystem, java.lang.String strCodingSystemVersionID, java.lang.String strAlternateCodingSystemVersionId, java.lang.String strOriginalText, java.lang.String strSecondAlternateIdentifier, java.lang.String strSecondAlternateText, java.lang.String strNameofSecondAlternateCodingSystem, java.lang.String strSecondAlternateCodingSystemVersionID, java.lang.String strCodingSystemOID, java.lang.String strValueSetOID, java.lang.String strValueSetVersionID, java.lang.String strAlternateCodingSystemOID, java.lang.String strAlternateValueSetOID, java.lang.String strAlternateValueSetVersionID, java.lang.String strSecondAlternateCodingSystemOID, java.lang.String strSecondAlternateValueSetOID, java.lang.String strSecondAlternateValueSetVersionID)` Set the Location Service Code.
    `void` | `setLocationTypeLOC(ISingleCollection<CWE> objlocationTypeLOCList)` Set the Location Type LOC.
    `void` | `setOrganizationNameLOC(ISingleCollection<XON> objorganizationNameLOCList)` Set the field which contains the organization(s) of which this location is a part.
    `void` | `setPrimaryKeyValueLoc(HD objPointOfCare, HD objRoom, HD objBed, HD objFacility, java.lang.String strLocationStatus, java.lang.String strPersonLocationType, java.lang.String strBuilding, java.lang.String strFloor, java.lang.String strLocationDescription, EI objComprehensiveLocationIdentifier, HD objAssigningAuthorityForLocation)` Set the field which contains the institution's identification code for the location.
    `void` | `setPrimaryKeyValueLoc(PL objprimaryKeyValueLoc)` Set the field which contains the institution's identification code for the location.
    `boolean` | `validate()` Validates HL7 Message objects .

    - ### Methods inherited from class cdac.medinfo.sdk.hl7282.baselibs.segments.Segment

      `addUnRecognizedField, dumpSegment, getFields, getName, getUnrecognizedFields, moveToNextSegment, parse, removeDataElement, removeDataElement, serialize, setName, setUnRecognizedField, updateDataElement, updateDataElement, writeToXML`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LOC

          public LOC()

      Constructs the LOC segment.

  - ### Method Detail

    - #### getLicenseNumber

          public ISingleCollection<CWE> getLicenseNumber()

      Retrieves the License Number. This field contains the multiple license numbers for the facility.
      Returns:
        ISingleCollection - licenseNumber

    - #### getLocationAddress

          public ISingleCollection<XAD> getLocationAddress()

      Retrieves the Location Address. This field contains the address of the patient location, especially for use for outpatient clinic or office locations.
      Returns:
        ISingleCollection - locationAddress

    - #### getLocationDescription

          public ST getLocationDescription()

      Retrieves the Location Description. This field contains the optional free text description of the location, to elaborate upon LOC primary key value.
      Returns:
        ST - locationDescription

    - #### getLocationEquipment

          public ISingleCollection<CWE> getLocationEquipment()

      Retrieves the Location Equipment. This field indicates what types of equipment are built in.
      Returns:
        ISingleCollection - locationEquipment

    - #### getLocationPhone

          public ISingleCollection<XTN> getLocationPhone()

      Retrieves the Location Phone. This field contains the phone number within the patient location, if any. For example, the room or bed phone for use by the patient.
      Returns:
        ISingleCollection - locationPhone

    - #### getLocationServiceCode

          public CWE getLocationServiceCode()

      Retrieves the Location Service Code. This field categorizes the types of services provided by the location.
      Returns:
        CWE - locationServiceCode

    - #### getLocationTypeLOC

          public ISingleCollection<CWE> getLocationTypeLOC()

      Retrieves the Location Type LOC. This field contains the code identifying what type of location this is.
      Returns:
        ISingleCollection - locationTypeLOC

    - #### getOrganizationNameLOC

          public ISingleCollection<XON> getOrganizationNameLOC()

      Retrieves the field contains the organization(s) of which this location is a part.
      Returns:
        ISingleCollection - organizationNameLOC

    - #### getPrimaryKeyValueLoc

          public PL getPrimaryKeyValueLoc()

      Retrieves the field contains the institution's identification code for the location.
      Returns:
        PL - primaryKeyValueLoc

    - #### addLicenseNumber

          public void addLicenseNumber(java.lang.String strIdentifier,
                              java.lang.String strText,
                              java.lang.String strNameOfCodingSystem,
                              java.lang.String strAlternateIdentifier,
                              java.lang.String strAlternateText,
                              java.lang.String strNameOfAlternateCodingSystem,
                              java.lang.String strCodingSystemVersionID,
                              java.lang.String strAlternateCodingSystemVersionId,
                              java.lang.String strOriginalText,
                              java.lang.String strSecondAlternateIdentifier,
                              java.lang.String strSecondAlternateText,
                              java.lang.String strNameofSecondAlternateCodingSystem,
                              java.lang.String strSecondAlternateCodingSystemVersionID,
                              java.lang.String strCodingSystemOID,
                              java.lang.String strValueSetOID,
                              java.lang.String strValueSetVersionID,
                              java.lang.String strAlternateCodingSystemOID,
                              java.lang.String strAlternateValueSetOID,
                              java.lang.String strAlternateValueSetVersionID,
                              java.lang.String strSecondAlternateCodingSystemOID,
                              java.lang.String strSecondAlternateValueSetOID,
                              java.lang.String strSecondAlternateValueSetVersionID)

      Add the License Number. This field contains the multiple license numbers for the facility.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `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.
        `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.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `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.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `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.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### addLicenseNumber

          public void addLicenseNumber(CWE objlicenseNumber)

      Add the License Number. This field contains the multiple license numbers for the facility.
      Parameters:
        `objlicenseNumber` - Object of License Number.

    - #### setLicenseNumber

          public void setLicenseNumber(ISingleCollection<CWE> objlicenseNumberList)

      Set the License Number. This field contains the multiple license numbers for the facility.
      Parameters:
        `objlicenseNumberList` - List of License Number.

    - #### addLocationAddress

          public void addLocationAddress(SAD objStreetAddress,
                                java.lang.String strOtherDesignation,
                                java.lang.String strCity,
                                java.lang.String strStateOrProvince,
                                java.lang.String strZipOrPostalCode,
                                java.lang.String strCountry,
                                java.lang.String strAddressType,
                                java.lang.String strOtherGeographicDesignation,
                                CWE objCountyParishCode,
                                CWE objCensusTract,
                                java.lang.String strAddressRepresentationCode,
                                DTM objEffectiveDate,
                                DTM objExpirationDate,
                                CWE objEXpirationReason,
                                java.lang.String strTemporaryIndicator,
                                java.lang.String strBadAddressIndicator,
                                java.lang.String strAddressUsage,
                                java.lang.String strAddressee,
                                java.lang.String strComment,
                                java.lang.String strPreferenceOrder,
                                CWE objProtectionCode,
                                EI objAddressIdentifier)

      Add the Location Address. This field contains the address of the patient location, especially for use for outpatient clinic or office locations.
      Parameters:
        `objStreetAddress` - Specifies the street address.
        `strOtherDesignation` - Specifies the Second line of address.
        `strCity` - The city, or district or place where the addressee is located.
        `strStateOrProvince` - Specifies the state or province where the addressee is located.
        `strZipOrPostalCode` - Specifies the zip or postal code where the addressee is located.
        `strCountry` - Specifies the country where the addressee is located.
        `strAddressType` - Specifies the kind or type of address.
        `strOtherGeographicDesignation` - Specifies any other geographic designation.
        `objCountyParishCode` - Specifies a code that represents the county in which the specified address resides.
        `objCensusTract` - Specifies a code that represents the census tract in which the specified address resides.
        `strAddressRepresentationCode` - Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]
        `objEffectiveDate` - It is The first date, if known, on which the address is valid and active.
        `objExpirationDate` - It is The last date, if known, on which the address is valid and active.
        `objExpirationReason` - indicates why this address was marked as ended.
        `strTemporaryIndicator` - indicates whether address is considered temporary .
        `strBadAddressIndicator` - indicates whether it is possible to contact the owning entity.
        `strAddressUsage` - indicates how the address is intended to be used.
        `strAddressee` - indicates the name of the person whose address is intended to be used.
        `strComment` - indicated descriptive information
        `strPreferenceOrder` - preference order
        `objProtectionCode` - indicates that an address need to be protected
        `objAdressIdentifier` - indicates a unique identifier for address

    - #### addLocationAddress

          public void addLocationAddress(XAD objlocationAddress)

      Add the Location Address. This field contains the address of the patient location, especially for use for outpatient clinic or office locations.
      Parameters:
        `objlocationAddress` - Object of Location Address.

    - #### setLocationAddress

          public void setLocationAddress(ISingleCollection<XAD> objlocationAddressList)

      Set the Location Address. This field contains the address of the patient location, especially for use for outpatient clinic or office locations.
      Parameters:
        `objlocationAddressList` - List of Location Address.

    - #### setLocationDescription

          public void setLocationDescription(java.lang.String strTitleofStudy)

      Set the Location Description. This field contains the optional free text description of the location, to elaborate upon LOC primary key value.
      Parameters:
        `strTitleofStudy` - String which to set as Title of Study

    - #### setLocationDescription

          public void setLocationDescription(ST objlocationDescription)

      Set the Location Description. This field contains the optional free text description of the location, to elaborate upon LOC primary key value.
      Parameters:
        `objlocationDescription` - Object of Location Description.

    - #### addLocationEquipment

          public void addLocationEquipment(java.lang.String strIdentifier,
                                  java.lang.String strText,
                                  java.lang.String strNameOfCodingSystem,
                                  java.lang.String strAlternateIdentifier,
                                  java.lang.String strAlternateText,
                                  java.lang.String strNameOfAlternateCodingSystem,
                                  java.lang.String strCodingSystemVersionID,
                                  java.lang.String strAlternateCodingSystemVersionId,
                                  java.lang.String strOriginalText,
                                  java.lang.String strSecondAlternateIdentifier,
                                  java.lang.String strSecondAlternateText,
                                  java.lang.String strNameofSecondAlternateCodingSystem,
                                  java.lang.String strSecondAlternateCodingSystemVersionID,
                                  java.lang.String strCodingSystemOID,
                                  java.lang.String strValueSetOID,
                                  java.lang.String strValueSetVersionID,
                                  java.lang.String strAlternateCodingSystemOID,
                                  java.lang.String strAlternateValueSetOID,
                                  java.lang.String strAlternateValueSetVersionID,
                                  java.lang.String strSecondAlternateCodingSystemOID,
                                  java.lang.String strSecondAlternateValueSetOID,
                                  java.lang.String strSecondAlternateValueSetVersionID)

      Add the Location Equipment. This field indicates what types of equipment are built in.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `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.
        `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.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `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.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `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.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### addLocationEquipment

          public void addLocationEquipment(CWE objlocationEquipment)

      Add the Location Equipment. This field indicates what types of equipment are built in.
      Parameters:
        `objlocationEquipment` - Object of Location Equipment.

    - #### setLocationEquipment

          public void setLocationEquipment(ISingleCollection<CWE> objlocationEquipmentList)

      Set the Location Equipment. This field indicates what types of equipment are built in.
      Parameters:
        `objlocationEquipmentList` - List of Location Equipment.

    - #### addLocationPhone

          public void addLocationPhone(java.lang.String strTeleCommunicationUseCode,
                              java.lang.String strTeleCommunicationEquipmentType,
                              java.lang.String strCommuinicationAddress,
                              java.lang.String strCountryCode,
                              java.lang.String strAreaCityCode,
                              java.lang.String strLocalNumber,
                              java.lang.String strExtension,
                              java.lang.String strAnyText,
                              java.lang.String strExtensionPrefix,
                              java.lang.String strSpeedDialCode,
                              java.lang.String strUnformattedTelephoneNumber,
                              java.lang.String strEffectiveStartDate,
                              java.lang.String strExpirationDate,
                              CWE objExpirationReason,
                              CWE objProtectionCode,
                              EI objSharedTelecommunicationIdentifier,
                              java.lang.String strPreferenceOrder)

      Add the Location Phone. This field contains the phone number within the patient location, if any. For example, the room or bed phone for use by the patient.
      Parameters:
        `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.]
        `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.]
        `strCommuinicationAddress` - Specifies Email address.
        `strCountryCode` - Specifies the Country code.
        `strAreaCityCode` - Specifies the area /City Code.
        `strLocalNumber` - Specifies an Local Number.
        `strExtension` - Specifies an Extension.
        `strAnyText` - Contains comments with respect to the telephone number.
        `strExtensionPrefix` - Specifies the characters established within a company's internal telephone system network used as a prefix to the Extension component for internal dialing.
        `strSpeedDialCode` - Specifies The characters established within a company's internal telephone system used in place of the (external) telephone number.
        `strUnformattedTelephoneNumber` - Specifies an expression of the telephone number as an unparsible string.
        `strEffectiveStartDate` - Specifies start date.
        `strExpirationDate` - Specifies expiration date.
        `objExpirationReason` - Specifies reason why this contact is marked as ended.
        `objProtectionCode` - Specifies reason why this information is sensitive or protected.
        `objSharedTelecommunicationIdentifier` - Specifies a unique phone number phone telephone number or email-id.
        `strPreferenceOrder` - Specifies the preference order for an entity..

    - #### addLocationPhone

          public void addLocationPhone(XTN objlocationPhone)

      Add the Location Phone. This field contains the phone number within the patient location, if any. For example, the room or bed phone for use by the patient.
      Parameters:
        `objlocationPhone` - Object of Location Phone.

    - #### setLocationPhone

          public void setLocationPhone(ISingleCollection<XTN> objlocationPhoneList)

      Set the Location Phone. This field contains the phone number within the patient location, if any. For example, the room or bed phone for use by the patient.
      Parameters:
        `objlocationPhoneList` - List of Location Phone.

    - #### setLocationServiceCode

          public void setLocationServiceCode(java.lang.String strIdentifier,
                                    java.lang.String strText,
                                    java.lang.String strNameOfCodingSystem,
                                    java.lang.String strAlternateIdentifier,
                                    java.lang.String strAlternateText,
                                    java.lang.String strNameOfAlternateCodingSystem,
                                    java.lang.String strCodingSystemVersionID,
                                    java.lang.String strAlternateCodingSystemVersionId,
                                    java.lang.String strOriginalText,
                                    java.lang.String strSecondAlternateIdentifier,
                                    java.lang.String strSecondAlternateText,
                                    java.lang.String strNameofSecondAlternateCodingSystem,
                                    java.lang.String strSecondAlternateCodingSystemVersionID,
                                    java.lang.String strCodingSystemOID,
                                    java.lang.String strValueSetOID,
                                    java.lang.String strValueSetVersionID,
                                    java.lang.String strAlternateCodingSystemOID,
                                    java.lang.String strAlternateValueSetOID,
                                    java.lang.String strAlternateValueSetVersionID,
                                    java.lang.String strSecondAlternateCodingSystemOID,
                                    java.lang.String strSecondAlternateValueSetOID,
                                    java.lang.String strSecondAlternateValueSetVersionID)

      Set the Location Service Code. This field categorizes the types of services provided by the location.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `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.
        `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.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `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.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `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.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### setLocationServiceCode

          public void setLocationServiceCode(CWE objlocationServiceCode)

      Set the Location Service Code. This field categorizes the types of services provided by the location.
      Parameters:
        `objlocationServiceCode` - Object of Location Service Code.

    - #### addLocationTypeLOC

          public void addLocationTypeLOC(java.lang.String strIdentifier,
                                java.lang.String strText,
                                java.lang.String strNameOfCodingSystem,
                                java.lang.String strAlternateIdentifier,
                                java.lang.String strAlternateText,
                                java.lang.String strNameOfAlternateCodingSystem,
                                java.lang.String strCodingSystemVersionID,
                                java.lang.String strAlternateCodingSystemVersionId,
                                java.lang.String strOriginalText,
                                java.lang.String strSecondAlternateIdentifier,
                                java.lang.String strSecondAlternateText,
                                java.lang.String strNameofSecondAlternateCodingSystem,
                                java.lang.String strSecondAlternateCodingSystemVersionID,
                                java.lang.String strCodingSystemOID,
                                java.lang.String strValueSetOID,
                                java.lang.String strValueSetVersionID,
                                java.lang.String strAlternateCodingSystemOID,
                                java.lang.String strAlternateValueSetOID,
                                java.lang.String strAlternateValueSetVersionID,
                                java.lang.String strSecondAlternateCodingSystemOID,
                                java.lang.String strSecondAlternateValueSetOID,
                                java.lang.String strSecondAlternateValueSetVersionID)

      Add the Location Type LOC. This field contains the code identifying what type of location this is.
      Parameters:
        `strIdentifier` - Specifies of characters (the code) that uniquely identifies the item being referenced.
        `strText` - Specifies The descriptive or textual name of the identifier, e.g., myocardial infarction.
        `strNameOfCodingSystem` - Identifies the coding scheme being used in the identifier component.
        `strAlternateIdentifier` - Specifies an alternate sequence of characters (the code) that uniquely identifies the item being referenced.
        `strAlternateText` - Specifies the descriptive or textual name of the alternate identifier. See usage note in section introduction.
        `strNameOfAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strCodingSystemVersionID` - A sequence of characters that uniquely identifies a second alternate code.
        `strAlternateCodingSystemVersionId` - This component carries the version for the coding system identified by components 4-6.
        `strOriginalText` - The text as seen and/or selected by the user who entered the data.
        `strSecondAlternateIdentifier` - A sequence of characters that uniquely identifies a second alternate code.
        `strSecondAlternateText` - The descriptive or textual name of the alternate identifier.
        `strNameofSecondAlternateCodingSystem` - Identifies the coding scheme being used in the alternate identifier component.
        `strSecondAlternateCodingSystemVersionID` - This component carries the version for the coding system identified by components 10-12.
        `strCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.3.
        `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.
        `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.
        `strAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.6.
        `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.
        `strAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.18. The version is a date.
        `strSecondAlternateCodingSystemOID` - This component contains the ISO Object Identifier (OID) for the coding system or value set named in CWE.12.
        `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.
        `strSecondAlternateValueSetVersionID` - This component carries the version for the value set identified by CWE.21. The version is a date.

    - #### addLocationTypeLOC

          public void addLocationTypeLOC(CWE objlocationTypeLOC)

      Add the Location Type LOC. This field contains the code identifying what type of location this is.
      Parameters:
        `objlocationTypeLOC` - Object of Location Type LOC.

    - #### setLocationTypeLOC

          public void setLocationTypeLOC(ISingleCollection<CWE> objlocationTypeLOCList)

      Set the Location Type LOC. This field contains the code identifying what type of location this is.
      Parameters:
        `objlocationTypeLOCList` - List of Location Type LOC.

    - #### addOrganizationNameLOC

          public void addOrganizationNameLOC(java.lang.String strOrganizationName,
                                    CWE objOrganizationNameTypeCode,
                                    HD objAssigningAuthority,
                                    java.lang.String strIdentifierTypeCode,
                                    HD objAssigningFacility,
                                    java.lang.String strNameRepresentationCode,
                                    java.lang.String strOrganizationIdentifier)

      Add the field which contains the organization(s) of which this location is a part.
      Parameters:
        `strOrganizationName` - Specifies name of the specified organization.
        `strOrganizationNameTypeCode` - Specifies a code that represents the type of name i.e., legal name, display name. Suggested Values A,L,D,SL.[Refer to table No.0204]
        `objAssigningAuthority` - Specifies The assigning authority is a unique identifier of the system (or organization or agency or department) that creates the data.
        `strIdentifierTypeCode` - Specifies a code corresponding to the type of identifier.
        `objAssigningFacility` - Specifies The place or location identifier where the identifier was first assigned to the person.
        `strNameRepresentationCode` - Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]
        `strOrganizationIdentifier` - This component contains the sequence of characters (the code) that uniquely identifies the item being referenced by XON.1 Organization Name. This component replaces XON.3 ID Number as of v 2.5.

    - #### addOrganizationNameLOC

          public void addOrganizationNameLOC(XON objorganizationNameLOC)

      Add the field which contains the organization(s) of which this location is a part.
      Parameters:
        `objorganizationNameLOC` - Object of Organization Name LOC.

    - #### setOrganizationNameLOC

          public void setOrganizationNameLOC(ISingleCollection<XON> objorganizationNameLOCList)

      Set the field which contains the organization(s) of which this location is a part.
      Parameters:
        `objorganizationNameLOCList` - List of Organization Name LOC.

    - #### setPrimaryKeyValueLoc

          public void setPrimaryKeyValueLoc(HD objPointOfCare,
                                   HD objRoom,
                                   HD objBed,
                                   HD objFacility,
                                   java.lang.String strLocationStatus,
                                   java.lang.String strPersonLocationType,
                                   java.lang.String strBuilding,
                                   java.lang.String strFloor,
                                   java.lang.String strLocationDescription,
                                   EI objComprehensiveLocationIdentifier,
                                   HD objAssigningAuthorityForLocation)

      Set the field which contains the institution's identification code for the location.
      Parameters:
        `strPointOfCare` - Specifies the code for the point where patient care is administered.
        `strRoom` - Specifies the code for the patient's room.
        `strBed` - Specifies the code for the patient's bed.
        `objFacility` - Specifies to site interpretation but generally describes the highest level physical designation of an institution, medical center or enterprise.
        `strLocationStatus` - Specifies the code for the status or availability of the location.
        `strPersonLocationType` - Specifies the categorization of the person's location defined by facility, building, floor, point of care, room or bed.
        `strBuilding` - Specifies code for the building where the person is located.
        `strFloor` - Specifies the code for the floor where the person is located.
        `strLocationDescription` - Specifies describes the location in free text.
        `objComprehensiveLocationIdentifier` - Specifies represents the physical location as a whole without regard for the individual components.
        `objAssigningAuthorityForLocation` - Specifies the entity that creates the data for the individual physical location components.

    - #### setPrimaryKeyValueLoc

          public void setPrimaryKeyValueLoc(PL objprimaryKeyValueLoc)

      Set the field which contains the institution's identification code for the location.
      Parameters:
        `objprimaryKeyValueLoc` - Object of Primary Key Value Loc.

    - #### validate

          public boolean validate()
                           throws InvalidSegmentException

      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.
      Specified by:
        `validate` in interface `ISegment`
      Overrides:
        `validate` in class `Segment`
      Returns:
        boolean - true or false.
      Throws:
        `InvalidSegmentException` - Throws when Segment Validation fails