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 (PL)
  • LOC-2: Location Description (ST) optional
  • LOC-3: Location Type (IS) repeating
  • LOC-4: Organization Name (XON) optional
  • LOC-5: Location Address (XAD) optional
  • LOC-6: Location Phone (XTN) optional repeating
  • LOC-7: License Number (CE) optional repeating
  • LOC-8: Location Equipment (ID) optional repeating
See Also:
  • Constructor Details

  • Method Details

    • getPrimaryKeyValue

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

      Returns LOC-1: "Primary Key Value" - 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
    • getLocationType

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

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

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

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

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

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

      public IS insertLocationType(int rep) throws HL7Exception
      Inserts a repetition of LOC-3: "Location Type" 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_LocationType

      public IS insertLoc3_LocationType(int rep) throws HL7Exception
      Inserts a repetition of LOC-3: "Location Type" 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)
    • removeLocationType

      public IS removeLocationType(int rep) throws HL7Exception
      Removes a repetition of LOC-3: "Location Type" 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_LocationType

      public IS removeLoc3_LocationType(int rep) throws HL7Exception
      Removes a repetition of LOC-3: "Location Type" 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)
    • getOrganizationName

      Returns LOC-4: "Organization Name" - creates it if necessary
    • getLoc4_OrganizationName

      Returns LOC-4: "Organization Name" - creates it if necessary
    • getLocationAddress

      Returns LOC-5: "Location Address" - creates it if necessary
    • getLoc5_LocationAddress

      Returns LOC-5: "Location Address" - creates it if necessary
    • 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 ID 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 ID 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 ID 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 ID 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 ID 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 ID 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)
    • createNewTypeWithoutReflection

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