Class DOC_T12

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

public class DOC_T12 extends AbstractMessage

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

  • 1: MSH (Message header segment)
  • 2: MSA (Message acknowledgement segment)
  • 3: ERR (Error segment) optional
  • 4: QRD (Query definition segment)
  • 5: DOC_T12_RESULT (a Group object) repeating
  • 6: DSC (Continuation pointer segment) optional
See Also:
  • Constructor Details

    • DOC_T12

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

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

    • getVersion

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

      public MSH getMSH()

      Returns MSH (Message header segment) - creates it if necessary

    • getMSA

      public MSA getMSA()

      Returns MSA (Message acknowledgement segment) - creates it if necessary

    • getERR

      public ERR getERR()

      Returns ERR (Error segment) - creates it if necessary

    • getQRD

      public QRD getQRD()

      Returns QRD (Query definition segment) - creates it if necessary

    • getRESULT

      Returns the first repetition of RESULT (a Group object) - creates it if necessary

    • getRESULT

      public DOC_T12_RESULT getRESULT(int rep)

      Returns a specific repetition of RESULT (a Group object) - 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.
    • getRESULTReps

      public int getRESULTReps()

      Returns the number of existing repetitions of RESULT

    • getRESULTAll

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

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

      Throws:
      HL7Exception
    • insertRESULT

      public void insertRESULT(DOC_T12_RESULT structure, int rep) throws HL7Exception

      Inserts a specific repetition of RESULT (a Group object)

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

      public DOC_T12_RESULT insertRESULT(int rep) throws HL7Exception

      Inserts a specific repetition of RESULT (a Group object)

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

      public DOC_T12_RESULT removeRESULT(int rep) throws HL7Exception

      Removes a specific repetition of RESULT (a Group object)

      Throws:
      HL7Exception
      See Also:
    • getDSC

      public DSC getDSC()

      Returns DSC (Continuation pointer segment) - creates it if necessary