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 ID - Internal (CX) repeating
  • MRG-2: Prior Alternate Patient ID (CX) optional repeating
  • MRG-3: Prior Patient Account Number (CX) optional
  • MRG-4: Prior Patient ID - External (CX) optional
  • MRG-5: Prior Visit Number (CX) optional
  • MRG-6: Prior Alternate Visit ID (CX) optional
  • MRG-7: Prior Patient Name (XPN) optional
See Also:
  • Constructor Details

  • Method Details

    • getPriorPatientIDInternal

      Returns all repetitions of Prior Patient ID - Internal (MRG-1).
    • getMrg1_PriorPatientIDInternal

      Returns all repetitions of Prior Patient ID - Internal (MRG-1).
    • getPriorPatientIDInternalReps

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

      public CX getPriorPatientIDInternal(int rep)
      Returns a specific repetition of MRG-1: "Prior Patient ID - Internal" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getMrg1_PriorPatientIDInternal

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

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

      public CX insertPriorPatientIDInternal(int rep) throws HL7Exception
      Inserts a repetition of MRG-1: "Prior Patient ID - Internal" 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_PriorPatientIDInternal

      Inserts a repetition of MRG-1: "Prior Patient ID - Internal" 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)
    • removePriorPatientIDInternal

      public CX removePriorPatientIDInternal(int rep) throws HL7Exception
      Removes a repetition of MRG-1: "Prior Patient ID - Internal" 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_PriorPatientIDInternal

      Removes a repetition of MRG-1: "Prior Patient ID - Internal" 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
    • getPriorPatientIDExternal

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

      Returns MRG-4: "Prior Patient ID - External" - 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 MRG-7: "Prior Patient Name" - creates it if necessary
    • getMrg7_PriorPatientName

      Returns MRG-7: "Prior Patient Name" - creates it if necessary
    • createNewTypeWithoutReflection

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