Class ADT_A05

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

public class ADT_A05 extends AbstractMessage

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

  • 1: MSH (MESSAGE HEADER)
  • 2: EVN (EVENT TYPE)
  • 3: PID (PATIENT IDENTIFICATION)
  • 4: NK1 (NEXT OF KIN) optional repeating
  • 5: PV1 (PATIENT VISIT)
  • 6: PV2 (PATIENT VISIT - additional information) optional
  • 7: OBX (OBSERVATION RESULT) optional repeating
  • 8: AL1 (PATIENT ALLERGY INFORMATION) optional repeating
  • 9: DG1 (DIAGNOSIS) optional repeating
  • 10: PR1 (PROCEDURES) optional repeating
  • 11: GT1 (GUARANTOR) optional repeating
  • 12: ADT_A05_INSURANCE (a Group object) optional repeating
  • 13: ACC (ACCIDENT) optional
  • 14: UB1 (UB82 DATA) optional
  • 15: UB2 (UB92 DATA) optional
See Also:
  • Constructor Details

    • ADT_A05

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

      public ADT_A05(ModelClassFactory factory)
      Creates a new ADT_A05 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

    • getNK1

      public NK1 getNK1()

      Returns the first repetition of NK1 (NEXT OF KIN) - creates it if necessary

    • getNK1

      public NK1 getNK1(int rep)

      Returns a specific repetition of NK1 (NEXT OF KIN) - 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.
    • getNK1Reps

      public int getNK1Reps()

      Returns the number of existing repetitions of NK1

    • getNK1All

      public List<NK1> getNK1All() throws HL7Exception

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

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

      Throws:
      HL7Exception
    • insertNK1

      public void insertNK1(NK1 structure, int rep) throws HL7Exception

      Inserts a specific repetition of NK1 (NEXT OF KIN)

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

      public NK1 insertNK1(int rep) throws HL7Exception

      Inserts a specific repetition of NK1 (NEXT OF KIN)

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

      public NK1 removeNK1(int rep) throws HL7Exception

      Removes a specific repetition of NK1 (NEXT OF KIN)

      Throws:
      HL7Exception
      See Also:
    • 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:
    • getAL1

      public AL1 getAL1()

      Returns the first repetition of AL1 (PATIENT ALLERGY INFORMATION) - creates it if necessary

    • getAL1

      public AL1 getAL1(int rep)

      Returns a specific repetition of AL1 (PATIENT ALLERGY INFORMATION) - 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.
    • getAL1Reps

      public int getAL1Reps()

      Returns the number of existing repetitions of AL1

    • getAL1All

      public List<AL1> getAL1All() throws HL7Exception

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

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

      Throws:
      HL7Exception
    • insertAL1

      public void insertAL1(AL1 structure, int rep) throws HL7Exception

      Inserts a specific repetition of AL1 (PATIENT ALLERGY INFORMATION)

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

      public AL1 insertAL1(int rep) throws HL7Exception

      Inserts a specific repetition of AL1 (PATIENT ALLERGY INFORMATION)

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

      public AL1 removeAL1(int rep) throws HL7Exception

      Removes a specific repetition of AL1 (PATIENT ALLERGY INFORMATION)

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

      public PR1 getPR1()

      Returns the first repetition of PR1 (PROCEDURES) - creates it if necessary

    • getPR1

      public PR1 getPR1(int rep)

      Returns a specific repetition of PR1 (PROCEDURES) - 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.
    • getPR1Reps

      public int getPR1Reps()

      Returns the number of existing repetitions of PR1

    • getPR1All

      public List<PR1> getPR1All() throws HL7Exception

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

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

      Throws:
      HL7Exception
    • insertPR1

      public void insertPR1(PR1 structure, int rep) throws HL7Exception

      Inserts a specific repetition of PR1 (PROCEDURES)

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

      public PR1 insertPR1(int rep) throws HL7Exception

      Inserts a specific repetition of PR1 (PROCEDURES)

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

      public PR1 removePR1(int rep) throws HL7Exception

      Removes a specific repetition of PR1 (PROCEDURES)

      Throws:
      HL7Exception
      See Also:
    • getGT1

      public GT1 getGT1()

      Returns the first repetition of GT1 (GUARANTOR) - creates it if necessary

    • getGT1

      public GT1 getGT1(int rep)

      Returns a specific repetition of GT1 (GUARANTOR) - 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.
    • getGT1Reps

      public int getGT1Reps()

      Returns the number of existing repetitions of GT1

    • getGT1All

      public List<GT1> getGT1All() throws HL7Exception

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

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

      Throws:
      HL7Exception
    • insertGT1

      public void insertGT1(GT1 structure, int rep) throws HL7Exception

      Inserts a specific repetition of GT1 (GUARANTOR)

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

      public GT1 insertGT1(int rep) throws HL7Exception

      Inserts a specific repetition of GT1 (GUARANTOR)

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

      public GT1 removeGT1(int rep) throws HL7Exception

      Removes a specific repetition of GT1 (GUARANTOR)

      Throws:
      HL7Exception
      See Also:
    • getINSURANCE

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

    • getINSURANCE

      public ADT_A05_INSURANCE getINSURANCE(int rep)

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

      public int getINSURANCEReps()

      Returns the number of existing repetitions of INSURANCE

    • getINSURANCEAll

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

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

      Throws:
      HL7Exception
    • insertINSURANCE

      public void insertINSURANCE(ADT_A05_INSURANCE structure, int rep) throws HL7Exception

      Inserts a specific repetition of INSURANCE (a Group object)

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

      Inserts a specific repetition of INSURANCE (a Group object)

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

      Removes a specific repetition of INSURANCE (a Group object)

      Throws:
      HL7Exception
      See Also:
    • getACC

      public ACC getACC()

      Returns ACC (ACCIDENT) - creates it if necessary

    • getUB1

      public UB1 getUB1()

      Returns UB1 (UB82 DATA) - creates it if necessary

    • getUB2

      public UB2 getUB2()

      Returns UB2 (UB92 DATA) - creates it if necessary