Class OBX

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class OBX extends AbstractSegment

Represents an HL7 OBX message segment (Observation/Result). This segment has the following fields:

  • OBX-1: Set ID - OBX (SI) optional
  • OBX-2: Value Type (ID) optional
  • OBX-3: Observation Identifier (CE)
  • OBX-4: Observation Sub-ID (ST) optional
  • OBX-5: Observation Value (Varies) optional repeating
  • OBX-6: Units (CE) optional
  • OBX-7: References Range (ST) optional
  • OBX-8: Abnormal Flags (IS) optional repeating
  • OBX-9: Probability (NM) optional
  • OBX-10: Nature of Abnormal Test (ID) optional repeating
  • OBX-11: Observation Result Status (ID)
  • OBX-12: Effective Date of Reference Range Values (TS) optional
  • OBX-13: User Defined Access Checks (ST) optional
  • OBX-14: Date/Time of the Observation (TS) optional
  • OBX-15: Producer's Reference (CE) optional
  • OBX-16: Responsible Observer (XCN) optional repeating
  • OBX-17: Observation Method (CE) optional repeating
  • OBX-18: Equipment Instance Identifier (EI) optional repeating
  • OBX-19: Date/Time of the Analysis (TS) optional
  • OBX-20: Reserved for harmonization with V2.6 (Varies) optional
  • OBX-21: Reserved for harmonization with V2.6 Number 2 (Varies) optional
  • OBX-22: Reserved for harmonization with V2.6 Number 3 (Varies) optional
  • OBX-23: Performing Organization Name (XON) optional
  • OBX-24: Performing Organization Address (XAD) optional
  • OBX-25: Performing Organization Medical Director (XCN) optional
See Also:
  • Constructor Details

  • Method Details

    • getSetIDOBX

      public SI getSetIDOBX()
      Returns OBX-1: "Set ID - OBX" - creates it if necessary
    • getObx1_SetIDOBX

      public SI getObx1_SetIDOBX()
      Returns OBX-1: "Set ID - OBX" - creates it if necessary
    • getValueType

      public ID getValueType()
      Returns OBX-2: "Value Type" - creates it if necessary
    • getObx2_ValueType

      Returns OBX-2: "Value Type" - creates it if necessary
    • getObservationIdentifier

      Returns OBX-3: "Observation Identifier" - creates it if necessary
    • getObx3_ObservationIdentifier

      Returns OBX-3: "Observation Identifier" - creates it if necessary
    • getObservationSubID

      Returns OBX-4: "Observation Sub-ID" - creates it if necessary
    • getObx4_ObservationSubID

      Returns OBX-4: "Observation Sub-ID" - creates it if necessary
    • getObservationValue

      Returns all repetitions of Observation Value (OBX-5).
    • getObx5_ObservationValue

      Returns all repetitions of Observation Value (OBX-5).
    • getObservationValueReps

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

      public Varies getObservationValue(int rep)
      Returns a specific repetition of OBX-5: "Observation Value" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx5_ObservationValue

      public Varies getObx5_ObservationValue(int rep)
      Returns a specific repetition of OBX-5: "Observation Value" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx5_ObservationValueReps

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

      public Varies insertObservationValue(int rep) throws HL7Exception
      Inserts a repetition of OBX-5: "Observation Value" 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)
    • insertObx5_ObservationValue

      Inserts a repetition of OBX-5: "Observation Value" 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)
    • removeObservationValue

      public Varies removeObservationValue(int rep) throws HL7Exception
      Removes a repetition of OBX-5: "Observation Value" 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)
    • removeObx5_ObservationValue

      Removes a repetition of OBX-5: "Observation Value" 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)
    • getUnits

      public CE getUnits()
      Returns OBX-6: "Units" - creates it if necessary
    • getObx6_Units

      public CE getObx6_Units()
      Returns OBX-6: "Units" - creates it if necessary
    • getReferencesRange

      Returns OBX-7: "References Range" - creates it if necessary
    • getObx7_ReferencesRange

      Returns OBX-7: "References Range" - creates it if necessary
    • getAbnormalFlags

      public IS[] getAbnormalFlags()
      Returns all repetitions of Abnormal Flags (OBX-8).
    • getObx8_AbnormalFlags

      Returns all repetitions of Abnormal Flags (OBX-8).
    • getAbnormalFlagsReps

      public int getAbnormalFlagsReps()
      Returns a count of the current number of repetitions of Abnormal Flags (OBX-8). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getAbnormalFlags

      public IS getAbnormalFlags(int rep)
      Returns a specific repetition of OBX-8: "Abnormal Flags" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx8_AbnormalFlags

      public IS getObx8_AbnormalFlags(int rep)
      Returns a specific repetition of OBX-8: "Abnormal Flags" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx8_AbnormalFlagsReps

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

      public IS insertAbnormalFlags(int rep) throws HL7Exception
      Inserts a repetition of OBX-8: "Abnormal Flags" 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)
    • insertObx8_AbnormalFlags

      public IS insertObx8_AbnormalFlags(int rep) throws HL7Exception
      Inserts a repetition of OBX-8: "Abnormal Flags" 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)
    • removeAbnormalFlags

      public IS removeAbnormalFlags(int rep) throws HL7Exception
      Removes a repetition of OBX-8: "Abnormal Flags" 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)
    • removeObx8_AbnormalFlags

      public IS removeObx8_AbnormalFlags(int rep) throws HL7Exception
      Removes a repetition of OBX-8: "Abnormal Flags" 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)
    • getProbability

      public NM getProbability()
      Returns OBX-9: "Probability" - creates it if necessary
    • getObx9_Probability

      Returns OBX-9: "Probability" - creates it if necessary
    • getNatureOfAbnormalTest

      Returns all repetitions of Nature of Abnormal Test (OBX-10).
    • getObx10_NatureOfAbnormalTest

      Returns all repetitions of Nature of Abnormal Test (OBX-10).
    • getNatureOfAbnormalTestReps

      Returns a count of the current number of repetitions of Nature of Abnormal Test (OBX-10). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getNatureOfAbnormalTest

      public ID getNatureOfAbnormalTest(int rep)
      Returns a specific repetition of OBX-10: "Nature of Abnormal Test" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx10_NatureOfAbnormalTest

      Returns a specific repetition of OBX-10: "Nature of Abnormal Test" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx10_NatureOfAbnormalTestReps

      Returns a count of the current number of repetitions of Nature of Abnormal Test (OBX-10). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertNatureOfAbnormalTest

      public ID insertNatureOfAbnormalTest(int rep) throws HL7Exception
      Inserts a repetition of OBX-10: "Nature of Abnormal Test" 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)
    • insertObx10_NatureOfAbnormalTest

      Inserts a repetition of OBX-10: "Nature of Abnormal Test" 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)
    • removeNatureOfAbnormalTest

      public ID removeNatureOfAbnormalTest(int rep) throws HL7Exception
      Removes a repetition of OBX-10: "Nature of Abnormal Test" 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)
    • removeObx10_NatureOfAbnormalTest

      Removes a repetition of OBX-10: "Nature of Abnormal Test" 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)
    • getObservationResultStatus

      Returns OBX-11: "Observation Result Status" - creates it if necessary
    • getObx11_ObservationResultStatus

      Returns OBX-11: "Observation Result Status" - creates it if necessary
    • getEffectiveDateOfReferenceRangeValues

      Returns OBX-12: "Effective Date of Reference Range Values" - creates it if necessary
    • getObx12_EffectiveDateOfReferenceRangeValues

      Returns OBX-12: "Effective Date of Reference Range Values" - creates it if necessary
    • getUserDefinedAccessChecks

      Returns OBX-13: "User Defined Access Checks" - creates it if necessary
    • getObx13_UserDefinedAccessChecks

      Returns OBX-13: "User Defined Access Checks" - creates it if necessary
    • getDateTimeOfTheObservation

      Returns OBX-14: "Date/Time of the Observation" - creates it if necessary
    • getObx14_DateTimeOfTheObservation

      Returns OBX-14: "Date/Time of the Observation" - creates it if necessary
    • getProducerSReference

      Returns OBX-15: "Producer's Reference" - creates it if necessary
    • getObx15_ProducerSReference

      Returns OBX-15: "Producer's Reference" - creates it if necessary
    • getResponsibleObserver

      Returns all repetitions of Responsible Observer (OBX-16).
    • getObx16_ResponsibleObserver

      Returns all repetitions of Responsible Observer (OBX-16).
    • getResponsibleObserverReps

      Returns a count of the current number of repetitions of Responsible Observer (OBX-16). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getResponsibleObserver

      public XCN getResponsibleObserver(int rep)
      Returns a specific repetition of OBX-16: "Responsible Observer" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx16_ResponsibleObserver

      Returns a specific repetition of OBX-16: "Responsible Observer" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx16_ResponsibleObserverReps

      Returns a count of the current number of repetitions of Responsible Observer (OBX-16). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertResponsibleObserver

      public XCN insertResponsibleObserver(int rep) throws HL7Exception
      Inserts a repetition of OBX-16: "Responsible Observer" 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)
    • insertObx16_ResponsibleObserver

      Inserts a repetition of OBX-16: "Responsible Observer" 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)
    • removeResponsibleObserver

      public XCN removeResponsibleObserver(int rep) throws HL7Exception
      Removes a repetition of OBX-16: "Responsible Observer" 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)
    • removeObx16_ResponsibleObserver

      Removes a repetition of OBX-16: "Responsible Observer" 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)
    • getObservationMethod

      Returns all repetitions of Observation Method (OBX-17).
    • getObx17_ObservationMethod

      Returns all repetitions of Observation Method (OBX-17).
    • getObservationMethodReps

      Returns a count of the current number of repetitions of Observation Method (OBX-17). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getObservationMethod

      public CE getObservationMethod(int rep)
      Returns a specific repetition of OBX-17: "Observation Method" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx17_ObservationMethod

      public CE getObx17_ObservationMethod(int rep)
      Returns a specific repetition of OBX-17: "Observation Method" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx17_ObservationMethodReps

      Returns a count of the current number of repetitions of Observation Method (OBX-17). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertObservationMethod

      public CE insertObservationMethod(int rep) throws HL7Exception
      Inserts a repetition of OBX-17: "Observation Method" 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)
    • insertObx17_ObservationMethod

      Inserts a repetition of OBX-17: "Observation Method" 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)
    • removeObservationMethod

      public CE removeObservationMethod(int rep) throws HL7Exception
      Removes a repetition of OBX-17: "Observation Method" 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)
    • removeObx17_ObservationMethod

      Removes a repetition of OBX-17: "Observation Method" 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)
    • getEquipmentInstanceIdentifier

      Returns all repetitions of Equipment Instance Identifier (OBX-18).
    • getObx18_EquipmentInstanceIdentifier

      Returns all repetitions of Equipment Instance Identifier (OBX-18).
    • getEquipmentInstanceIdentifierReps

      Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getEquipmentInstanceIdentifier

      Returns a specific repetition of OBX-18: "Equipment Instance Identifier" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx18_EquipmentInstanceIdentifier

      Returns a specific repetition of OBX-18: "Equipment Instance Identifier" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getObx18_EquipmentInstanceIdentifierReps

      Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertEquipmentInstanceIdentifier

      Inserts a repetition of OBX-18: "Equipment Instance Identifier" 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)
    • insertObx18_EquipmentInstanceIdentifier

      Inserts a repetition of OBX-18: "Equipment Instance Identifier" 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)
    • removeEquipmentInstanceIdentifier

      Removes a repetition of OBX-18: "Equipment Instance Identifier" 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)
    • removeObx18_EquipmentInstanceIdentifier

      Removes a repetition of OBX-18: "Equipment Instance Identifier" 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)
    • getDateTimeOfTheAnalysis

      Returns OBX-19: "Date/Time of the Analysis" - creates it if necessary
    • getObx19_DateTimeOfTheAnalysis

      Returns OBX-19: "Date/Time of the Analysis" - creates it if necessary
    • getReservedForHarmonizationWithV26

      Returns OBX-20: "Reserved for harmonization with V2.6" - creates it if necessary
    • getObx20_ReservedForHarmonizationWithV26

      Returns OBX-20: "Reserved for harmonization with V2.6" - creates it if necessary
    • getReservedForHarmonizationWithV26Number2

      Returns OBX-21: "Reserved for harmonization with V2.6 Number 2" - creates it if necessary
    • getObx21_ReservedForHarmonizationWithV26Number2

      Returns OBX-21: "Reserved for harmonization with V2.6 Number 2" - creates it if necessary
    • getReservedForHarmonizationWithV26Number3

      Returns OBX-22: "Reserved for harmonization with V2.6 Number 3" - creates it if necessary
    • getObx22_ReservedForHarmonizationWithV26Number3

      Returns OBX-22: "Reserved for harmonization with V2.6 Number 3" - creates it if necessary
    • getPerformingOrganizationName

      Returns OBX-23: "Performing Organization Name" - creates it if necessary
    • getObx23_PerformingOrganizationName

      Returns OBX-23: "Performing Organization Name" - creates it if necessary
    • getPerformingOrganizationAddress

      Returns OBX-24: "Performing Organization Address" - creates it if necessary
    • getObx24_PerformingOrganizationAddress

      Returns OBX-24: "Performing Organization Address" - creates it if necessary
    • getPerformingOrganizationMedicalDirector

      Returns OBX-25: "Performing Organization Medical Director" - creates it if necessary
    • getObx25_PerformingOrganizationMedicalDirector

      Returns OBX-25: "Performing Organization Medical Director" - creates it if necessary
    • createNewTypeWithoutReflection

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