Class MRG

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class MRG extends AbstractSegment

Represents an HL7 MRG message segment (Merge patient information). This segment has the following fields:

  • MRG-1: Prior Patient Identifier List (CX) repeating
  • MRG-2: Prior Alternate Patient ID (CX) optional repeating
  • MRG-3: Prior Patient Account Number (CX) optional
  • MRG-4: Prior Patient ID (CX) optional
  • MRG-5: Prior Visit Number (CX) optional
  • MRG-6: Prior Alternate Visit ID (CX) optional
  • MRG-7: Prior Patient Name (XPN) optional repeating
See Also:
  • Constructor Details

  • Method Details

    • getPriorPatientIdentifierList

      Returns all repetitions of Prior Patient Identifier List (MRG-1).
    • getMrg1_PriorPatientIdentifierList

      Returns all repetitions of Prior Patient Identifier List (MRG-1).
    • getPriorPatientIdentifierListReps

      Returns a count of the current number of repetitions of Prior Patient Identifier List (MRG-1). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getPriorPatientIdentifierList

      Returns a specific repetition of MRG-1: "Prior Patient Identifier List" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getMrg1_PriorPatientIdentifierList

      Returns a specific repetition of MRG-1: "Prior Patient Identifier List" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getMrg1_PriorPatientIdentifierListReps

      Returns a count of the current number of repetitions of Prior Patient Identifier List (MRG-1). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertPriorPatientIdentifierList

      Inserts a repetition of MRG-1: "Prior Patient Identifier List" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertMrg1_PriorPatientIdentifierList

      Inserts a repetition of MRG-1: "Prior Patient Identifier List" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removePriorPatientIdentifierList

      Removes a repetition of MRG-1: "Prior Patient Identifier List" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeMrg1_PriorPatientIdentifierList

      Removes a repetition of MRG-1: "Prior Patient Identifier List" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getPriorAlternatePatientID

      Returns all repetitions of Prior Alternate Patient ID (MRG-2).
    • getMrg2_PriorAlternatePatientID

      Returns all repetitions of Prior Alternate Patient ID (MRG-2).
    • getPriorAlternatePatientIDReps

      Returns a count of the current number of repetitions of Prior Alternate Patient ID (MRG-2). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getPriorAlternatePatientID

      public CX getPriorAlternatePatientID(int rep)
      Returns a specific repetition of MRG-2: "Prior Alternate Patient ID" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getMrg2_PriorAlternatePatientID

      Returns a specific repetition of MRG-2: "Prior Alternate Patient ID" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getMrg2_PriorAlternatePatientIDReps

      Returns a count of the current number of repetitions of Prior Alternate Patient ID (MRG-2). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertPriorAlternatePatientID

      Inserts a repetition of MRG-2: "Prior Alternate Patient ID" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertMrg2_PriorAlternatePatientID

      Inserts a repetition of MRG-2: "Prior Alternate Patient ID" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removePriorAlternatePatientID

      Removes a repetition of MRG-2: "Prior Alternate Patient ID" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeMrg2_PriorAlternatePatientID

      Removes a repetition of MRG-2: "Prior Alternate Patient ID" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • getPriorPatientAccountNumber

      Returns MRG-3: "Prior Patient Account Number" - creates it if necessary
    • getMrg3_PriorPatientAccountNumber

      Returns MRG-3: "Prior Patient Account Number" - creates it if necessary
    • getPriorPatientID

      Returns MRG-4: "Prior Patient ID" - creates it if necessary
    • getMrg4_PriorPatientID

      Returns MRG-4: "Prior Patient ID" - creates it if necessary
    • getPriorVisitNumber

      Returns MRG-5: "Prior Visit Number" - creates it if necessary
    • getMrg5_PriorVisitNumber

      Returns MRG-5: "Prior Visit Number" - creates it if necessary
    • getPriorAlternateVisitID

      Returns MRG-6: "Prior Alternate Visit ID" - creates it if necessary
    • getMrg6_PriorAlternateVisitID

      Returns MRG-6: "Prior Alternate Visit ID" - creates it if necessary
    • getPriorPatientName

      Returns all repetitions of Prior Patient Name (MRG-7).
    • getMrg7_PriorPatientName

      Returns all repetitions of Prior Patient Name (MRG-7).
    • getPriorPatientNameReps

      Returns a count of the current number of repetitions of Prior Patient Name (MRG-7). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getPriorPatientName

      public XPN getPriorPatientName(int rep)
      Returns a specific repetition of MRG-7: "Prior Patient Name" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getMrg7_PriorPatientName

      public XPN getMrg7_PriorPatientName(int rep)
      Returns a specific repetition of MRG-7: "Prior Patient Name" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getMrg7_PriorPatientNameReps

      Returns a count of the current number of repetitions of Prior Patient Name (MRG-7). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertPriorPatientName

      public XPN insertPriorPatientName(int rep) throws HL7Exception
      Inserts a repetition of MRG-7: "Prior Patient Name" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • insertMrg7_PriorPatientName

      public XPN insertMrg7_PriorPatientName(int rep) throws HL7Exception
      Inserts a repetition of MRG-7: "Prior Patient Name" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removePriorPatientName

      public XPN removePriorPatientName(int rep) throws HL7Exception
      Removes a repetition of MRG-7: "Prior Patient Name" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • removeMrg7_PriorPatientName

      public XPN removeMrg7_PriorPatientName(int rep) throws HL7Exception
      Removes a repetition of MRG-7: "Prior Patient Name" at a specific index
      Parameters:
      rep - The repetition index (0-indexed)
      Throws:
      HL7Exception - If the rep is invalid (below 0, or too high for the allowable repetitions)
    • createNewTypeWithoutReflection

      protected Type createNewTypeWithoutReflection(int field)
      Overrides:
      createNewTypeWithoutReflection in class AbstractSegment