Class ADT_A02

All Implemented Interfaces:
Group, Message, Structure, Visitable, Serializable

public class ADT_A02 extends AbstractMessage

Represents a ADT_A02 message structure (see chapter ?). This structure contains the following elements:

  • 1: MSH (MESSAGE HEADER)
  • 2: EVN (EVENT TYPE)
  • 3: PID (PATIENT IDENTIFICATION)
  • 4: PV1 (PATIENT VISIT)
  • 5: PV2 (PATIENT VISIT - additional information) optional
  • 6: OBX (OBSERVATION RESULT) optional repeating
See Also:
  • Constructor Details

    • ADT_A02

      public ADT_A02()
      Creates a new ADT_A02 message with DefaultModelClassFactory.
    • ADT_A02

      public ADT_A02(ModelClassFactory factory)
      Creates a new ADT_A02 message with custom ModelClassFactory.
  • Method Details

    • getVersion

      public String getVersion()
      Returns "2.2"
      Specified by:
      getVersion in interface Message
      Overrides:
      getVersion in class AbstractMessage
    • getMSH

      public MSH getMSH()

      Returns MSH (MESSAGE HEADER) - creates it if necessary

    • getEVN

      public EVN getEVN()

      Returns EVN (EVENT TYPE) - creates it if necessary

    • getPID

      public PID getPID()

      Returns PID (PATIENT IDENTIFICATION) - creates it if necessary

    • getPV1

      public PV1 getPV1()

      Returns PV1 (PATIENT VISIT) - creates it if necessary

    • getPV2

      public PV2 getPV2()

      Returns PV2 (PATIENT VISIT - additional information) - creates it if necessary

    • getOBX

      public OBX getOBX()

      Returns the first repetition of OBX (OBSERVATION RESULT) - creates it if necessary

    • getOBX

      public OBX getOBX(int rep)

      Returns a specific repetition of OBX (OBSERVATION RESULT) - creates it if necessary

      Parameters:
      rep - The repetition index (0-indexed, i.e. the first repetition is at index 0)
      Throws:
      HL7Exception - if the repetition requested is more than one greater than the number of existing repetitions.
    • getOBXReps

      public int getOBXReps()

      Returns the number of existing repetitions of OBX

    • getOBXAll

      public List<OBX> getOBXAll() throws HL7Exception

      Returns a non-modifiable List containing all current existing repetitions of OBX.

      Note that unlike getOBX(), this method will not create any reps if none are already present, so an empty list may be returned.

      Throws:
      HL7Exception
    • insertOBX

      public void insertOBX(OBX structure, int rep) throws HL7Exception

      Inserts a specific repetition of OBX (OBSERVATION RESULT)

      Throws:
      HL7Exception
      See Also:
      • AbstractGroup#insertRepetition(Structure, int)
    • insertOBX

      public OBX insertOBX(int rep) throws HL7Exception

      Inserts a specific repetition of OBX (OBSERVATION RESULT)

      Throws:
      HL7Exception
      See Also:
      • AbstractGroup#insertRepetition(Structure, int)
    • removeOBX

      public OBX removeOBX(int rep) throws HL7Exception

      Removes a specific repetition of OBX (OBSERVATION RESULT)

      Throws:
      HL7Exception
      See Also: