Class LOC

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class LOC extends AbstractSegment

Represents an HL7 LOC message segment (Location Identification). This segment has the following fields:

  • LOC-1: Primary Key Value - LOC (PL)
  • LOC-2: Location Description (ST) optional
  • LOC-3: Location Type - LOC (IS) repeating
  • LOC-4: Organization Name - LOC (XON) optional repeating
  • LOC-5: Location Address (XAD) optional repeating
  • LOC-6: Location Phone (XTN) optional repeating
  • LOC-7: License Number (CE) optional repeating
  • LOC-8: Location Equipment (IS) optional repeating
  • LOC-9: Location Service Code (IS) optional
See Also:
  • Constructor Details

  • Method Details

    • getPrimaryKeyValueLOC

      Returns LOC-1: "Primary Key Value - LOC" - creates it if necessary
    • getLoc1_PrimaryKeyValueLOC

      Returns LOC-1: "Primary Key Value - LOC" - creates it if necessary
    • getLocationDescription

      Returns LOC-2: "Location Description" - creates it if necessary
    • getLoc2_LocationDescription

      Returns LOC-2: "Location Description" - creates it if necessary
    • getLocationTypeLOC

      public IS[] getLocationTypeLOC()
      Returns all repetitions of Location Type - LOC (LOC-3).
    • getLoc3_LocationTypeLOC

      Returns all repetitions of Location Type - LOC (LOC-3).
    • getLocationTypeLOCReps

      public int getLocationTypeLOCReps()
      Returns a count of the current number of repetitions of Location Type - LOC (LOC-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getLocationTypeLOC

      public IS getLocationTypeLOC(int rep)
      Returns a specific repetition of LOC-3: "Location Type - LOC" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc3_LocationTypeLOC

      public IS getLoc3_LocationTypeLOC(int rep)
      Returns a specific repetition of LOC-3: "Location Type - LOC" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc3_LocationTypeLOCReps

      Returns a count of the current number of repetitions of Location Type - LOC (LOC-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertLocationTypeLOC

      public IS insertLocationTypeLOC(int rep) throws HL7Exception
      Inserts a repetition of LOC-3: "Location Type - LOC" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertLoc3_LocationTypeLOC

      public IS insertLoc3_LocationTypeLOC(int rep) throws HL7Exception
      Inserts a repetition of LOC-3: "Location Type - LOC" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLocationTypeLOC

      public IS removeLocationTypeLOC(int rep) throws HL7Exception
      Removes a repetition of LOC-3: "Location Type - LOC" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLoc3_LocationTypeLOC

      public IS removeLoc3_LocationTypeLOC(int rep) throws HL7Exception
      Removes a repetition of LOC-3: "Location Type - LOC" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getOrganizationNameLOC

      Returns all repetitions of Organization Name - LOC (LOC-4).
    • getLoc4_OrganizationNameLOC

      Returns all repetitions of Organization Name - LOC (LOC-4).
    • getOrganizationNameLOCReps

      Returns a count of the current number of repetitions of Organization Name - LOC (LOC-4). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getOrganizationNameLOC

      public XON getOrganizationNameLOC(int rep)
      Returns a specific repetition of LOC-4: "Organization Name - LOC" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc4_OrganizationNameLOC

      public XON getLoc4_OrganizationNameLOC(int rep)
      Returns a specific repetition of LOC-4: "Organization Name - LOC" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc4_OrganizationNameLOCReps

      Returns a count of the current number of repetitions of Organization Name - LOC (LOC-4). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertOrganizationNameLOC

      public XON insertOrganizationNameLOC(int rep) throws HL7Exception
      Inserts a repetition of LOC-4: "Organization Name - LOC" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertLoc4_OrganizationNameLOC

      Inserts a repetition of LOC-4: "Organization Name - LOC" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeOrganizationNameLOC

      public XON removeOrganizationNameLOC(int rep) throws HL7Exception
      Removes a repetition of LOC-4: "Organization Name - LOC" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLoc4_OrganizationNameLOC

      Removes a repetition of LOC-4: "Organization Name - LOC" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getLocationAddress

      public XAD[] getLocationAddress()
      Returns all repetitions of Location Address (LOC-5).
    • getLoc5_LocationAddress

      Returns all repetitions of Location Address (LOC-5).
    • getLocationAddressReps

      public int getLocationAddressReps()
      Returns a count of the current number of repetitions of Location Address (LOC-5). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getLocationAddress

      public XAD getLocationAddress(int rep)
      Returns a specific repetition of LOC-5: "Location Address" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc5_LocationAddress

      public XAD getLoc5_LocationAddress(int rep)
      Returns a specific repetition of LOC-5: "Location Address" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc5_LocationAddressReps

      Returns a count of the current number of repetitions of Location Address (LOC-5). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertLocationAddress

      public XAD insertLocationAddress(int rep) throws HL7Exception
      Inserts a repetition of LOC-5: "Location Address" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertLoc5_LocationAddress

      public XAD insertLoc5_LocationAddress(int rep) throws HL7Exception
      Inserts a repetition of LOC-5: "Location Address" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLocationAddress

      public XAD removeLocationAddress(int rep) throws HL7Exception
      Removes a repetition of LOC-5: "Location Address" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLoc5_LocationAddress

      public XAD removeLoc5_LocationAddress(int rep) throws HL7Exception
      Removes a repetition of LOC-5: "Location Address" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getLocationPhone

      public XTN[] getLocationPhone()
      Returns all repetitions of Location Phone (LOC-6).
    • getLoc6_LocationPhone

      Returns all repetitions of Location Phone (LOC-6).
    • getLocationPhoneReps

      public int getLocationPhoneReps()
      Returns a count of the current number of repetitions of Location Phone (LOC-6). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getLocationPhone

      public XTN getLocationPhone(int rep)
      Returns a specific repetition of LOC-6: "Location Phone" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc6_LocationPhone

      public XTN getLoc6_LocationPhone(int rep)
      Returns a specific repetition of LOC-6: "Location Phone" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc6_LocationPhoneReps

      Returns a count of the current number of repetitions of Location Phone (LOC-6). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertLocationPhone

      public XTN insertLocationPhone(int rep) throws HL7Exception
      Inserts a repetition of LOC-6: "Location Phone" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertLoc6_LocationPhone

      public XTN insertLoc6_LocationPhone(int rep) throws HL7Exception
      Inserts a repetition of LOC-6: "Location Phone" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLocationPhone

      public XTN removeLocationPhone(int rep) throws HL7Exception
      Removes a repetition of LOC-6: "Location Phone" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLoc6_LocationPhone

      public XTN removeLoc6_LocationPhone(int rep) throws HL7Exception
      Removes a repetition of LOC-6: "Location Phone" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getLicenseNumber

      public CE[] getLicenseNumber()
      Returns all repetitions of License Number (LOC-7).
    • getLoc7_LicenseNumber

      Returns all repetitions of License Number (LOC-7).
    • getLicenseNumberReps

      public int getLicenseNumberReps()
      Returns a count of the current number of repetitions of License Number (LOC-7). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getLicenseNumber

      public CE getLicenseNumber(int rep)
      Returns a specific repetition of LOC-7: "License Number" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc7_LicenseNumber

      public CE getLoc7_LicenseNumber(int rep)
      Returns a specific repetition of LOC-7: "License Number" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc7_LicenseNumberReps

      Returns a count of the current number of repetitions of License Number (LOC-7). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertLicenseNumber

      public CE insertLicenseNumber(int rep) throws HL7Exception
      Inserts a repetition of LOC-7: "License Number" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertLoc7_LicenseNumber

      public CE insertLoc7_LicenseNumber(int rep) throws HL7Exception
      Inserts a repetition of LOC-7: "License Number" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLicenseNumber

      public CE removeLicenseNumber(int rep) throws HL7Exception
      Removes a repetition of LOC-7: "License Number" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLoc7_LicenseNumber

      public CE removeLoc7_LicenseNumber(int rep) throws HL7Exception
      Removes a repetition of LOC-7: "License Number" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getLocationEquipment

      Returns all repetitions of Location Equipment (LOC-8).
    • getLoc8_LocationEquipment

      Returns all repetitions of Location Equipment (LOC-8).
    • getLocationEquipmentReps

      Returns a count of the current number of repetitions of Location Equipment (LOC-8). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getLocationEquipment

      public IS getLocationEquipment(int rep)
      Returns a specific repetition of LOC-8: "Location Equipment" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc8_LocationEquipment

      public IS getLoc8_LocationEquipment(int rep)
      Returns a specific repetition of LOC-8: "Location Equipment" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getLoc8_LocationEquipmentReps

      Returns a count of the current number of repetitions of Location Equipment (LOC-8). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertLocationEquipment

      public IS insertLocationEquipment(int rep) throws HL7Exception
      Inserts a repetition of LOC-8: "Location Equipment" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertLoc8_LocationEquipment

      public IS insertLoc8_LocationEquipment(int rep) throws HL7Exception
      Inserts a repetition of LOC-8: "Location Equipment" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLocationEquipment

      public IS removeLocationEquipment(int rep) throws HL7Exception
      Removes a repetition of LOC-8: "Location Equipment" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeLoc8_LocationEquipment

      public IS removeLoc8_LocationEquipment(int rep) throws HL7Exception
      Removes a repetition of LOC-8: "Location Equipment" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getLocationServiceCode

      Returns LOC-9: "Location Service Code" - creates it if necessary
    • getLoc9_LocationServiceCode

      Returns LOC-9: "Location Service Code" - creates it if necessary
    • createNewTypeWithoutReflection

      protected Type createNewTypeWithoutReflection(int field)
      Overrides:
      createNewTypeWithoutReflection in class AbstractSegment