Class ADT_A11

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

public class ADT_A11 extends AbstractMessage

Represents a ADT_A11 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
  • 7: DG1 (DIAGNOSIS) optional repeating
See Also:
  • Constructor Details

    • ADT_A11

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

      public ADT_A11(ModelClassFactory factory)
      Creates a new ADT_A11 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:
    • getDG1

      public DG1 getDG1()

      Returns the first repetition of DG1 (DIAGNOSIS) - creates it if necessary

    • getDG1

      public DG1 getDG1(int rep)

      Returns a specific repetition of DG1 (DIAGNOSIS) - 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.
    • getDG1Reps

      public int getDG1Reps()

      Returns the number of existing repetitions of DG1

    • getDG1All

      public List<DG1> getDG1All() throws HL7Exception

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

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

      Throws:
      HL7Exception
    • insertDG1

      public void insertDG1(DG1 structure, int rep) throws HL7Exception

      Inserts a specific repetition of DG1 (DIAGNOSIS)

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

      public DG1 insertDG1(int rep) throws HL7Exception

      Inserts a specific repetition of DG1 (DIAGNOSIS)

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

      public DG1 removeDG1(int rep) throws HL7Exception

      Removes a specific repetition of DG1 (DIAGNOSIS)

      Throws:
      HL7Exception
      See Also: