Class BAR_P10

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

public class BAR_P10 extends AbstractMessage

Represents a BAR_P10 message structure (see chapter 6). This structure contains the following elements:

  • 1: MSH (Message Header)
  • 2: EVN (Event Type)
  • 3: PID (Patient identification)
  • 4: PV1 (Patient visit)
  • 5: DG1 (Diagnosis) optional repeating
  • 6: GP1 (Grouping/Reimbursement - Visit)
  • 7: BAR_P10_PROCEDURE (a Group object) optional repeating
See Also:
  • Constructor Details

    • BAR_P10

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

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

    • getVersion

      public String getVersion()
      Returns "2.4"
      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

    • 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:
    • getGP1

      public GP1 getGP1()

      Returns GP1 (Grouping/Reimbursement - Visit) - creates it if necessary

    • getPROCEDURE

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

    • getPROCEDURE

      public BAR_P10_PROCEDURE getPROCEDURE(int rep)

      Returns a specific repetition of PROCEDURE (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.
    • getPROCEDUREReps

      public int getPROCEDUREReps()

      Returns the number of existing repetitions of PROCEDURE

    • getPROCEDUREAll

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

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

      Throws:
      HL7Exception
    • insertPROCEDURE

      public void insertPROCEDURE(BAR_P10_PROCEDURE structure, int rep) throws HL7Exception

      Inserts a specific repetition of PROCEDURE (a Group object)

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

      Inserts a specific repetition of PROCEDURE (a Group object)

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

      Removes a specific repetition of PROCEDURE (a Group object)

      Throws:
      HL7Exception
      See Also: