Class RXG

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class RXG extends AbstractSegment

Represents an HL7 RXG message segment (PHARMACY GIVE). This segment has the following fields:

  • RXG-1: Give Sub-ID Counter (NM)
  • RXG-2: Dispense Sub-ID Counter (NM) optional
  • RXG-3: Quantity / timing (TQ) optional repeating
  • RXG-4: Give Code (CE)
  • RXG-5: Give Amount - Minimum (NM)
  • RXG-6: Give Amount - Maximum (NM) optional
  • RXG-7: Give Units (CE)
  • RXG-8: Give Dosage Form (CE) optional
  • RXG-9: Administration Notes (ST) optional
  • RXG-10: Substitution Status (ID) optional
  • RXG-11: Deliver-to location (CM_LA1) optional
  • RXG-12: Needs Human Review (ID) optional
  • RXG-13: Pharmacy Special Administration Instructions (CE) optional repeating
  • RXG-14: Give Per (Time Unit) (ST) optional
  • RXG-15: Give Rate Amount (CE) optional
  • RXG-16: Give Rate Units (CE) optional
See Also:
  • Constructor Details

  • Method Details

    • getGiveSubIDCounter

      Returns RXG-1: "Give Sub-ID Counter" - creates it if necessary
    • getRxg1_GiveSubIDCounter

      Returns RXG-1: "Give Sub-ID Counter" - creates it if necessary
    • getDispenseSubIDCounter

      Returns RXG-2: "Dispense Sub-ID Counter" - creates it if necessary
    • getRxg2_DispenseSubIDCounter

      Returns RXG-2: "Dispense Sub-ID Counter" - creates it if necessary
    • getQuantityTiming

      public TQ[] getQuantityTiming()
      Returns all repetitions of Quantity / timing (RXG-3).
    • getRxg3_QuantityTiming

      Returns all repetitions of Quantity / timing (RXG-3).
    • getQuantityTimingReps

      public int getQuantityTimingReps()
      Returns a count of the current number of repetitions of Quantity / timing (RXG-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getQuantityTiming

      public TQ getQuantityTiming(int rep)
      Returns a specific repetition of RXG-3: "Quantity / timing" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg3_QuantityTiming

      public TQ getRxg3_QuantityTiming(int rep)
      Returns a specific repetition of RXG-3: "Quantity / timing" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg3_QuantityTimingReps

      Returns a count of the current number of repetitions of Quantity / timing (RXG-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertQuantityTiming

      public TQ insertQuantityTiming(int rep) throws HL7Exception
      Inserts a repetition of RXG-3: "Quantity / timing" 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)
    • insertRxg3_QuantityTiming

      public TQ insertRxg3_QuantityTiming(int rep) throws HL7Exception
      Inserts a repetition of RXG-3: "Quantity / timing" 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)
    • removeQuantityTiming

      public TQ removeQuantityTiming(int rep) throws HL7Exception
      Removes a repetition of RXG-3: "Quantity / timing" 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)
    • removeRxg3_QuantityTiming

      public TQ removeRxg3_QuantityTiming(int rep) throws HL7Exception
      Removes a repetition of RXG-3: "Quantity / timing" 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)
    • getGiveCode

      public CE getGiveCode()
      Returns RXG-4: "Give Code" - creates it if necessary
    • getRxg4_GiveCode

      public CE getRxg4_GiveCode()
      Returns RXG-4: "Give Code" - creates it if necessary
    • getGiveAmountMinimum

      Returns RXG-5: "Give Amount - Minimum" - creates it if necessary
    • getRxg5_GiveAmountMinimum

      Returns RXG-5: "Give Amount - Minimum" - creates it if necessary
    • getGiveAmountMaximum

      Returns RXG-6: "Give Amount - Maximum" - creates it if necessary
    • getRxg6_GiveAmountMaximum

      Returns RXG-6: "Give Amount - Maximum" - creates it if necessary
    • getGiveUnits

      public CE getGiveUnits()
      Returns RXG-7: "Give Units" - creates it if necessary
    • getRxg7_GiveUnits

      Returns RXG-7: "Give Units" - creates it if necessary
    • getGiveDosageForm

      Returns RXG-8: "Give Dosage Form" - creates it if necessary
    • getRxg8_GiveDosageForm

      Returns RXG-8: "Give Dosage Form" - creates it if necessary
    • getAdministrationNotes

      Returns RXG-9: "Administration Notes" - creates it if necessary
    • getRxg9_AdministrationNotes

      Returns RXG-9: "Administration Notes" - creates it if necessary
    • getSubstitutionStatus

      Returns RXG-10: "Substitution Status" - creates it if necessary
    • getRxg10_SubstitutionStatus

      Returns RXG-10: "Substitution Status" - creates it if necessary
    • getDeliverToLocation

      Returns RXG-11: "Deliver-to location" - creates it if necessary
    • getRxg11_DeliverToLocation

      Returns RXG-11: "Deliver-to location" - creates it if necessary
    • getNeedsHumanReview

      Returns RXG-12: "Needs Human Review" - creates it if necessary
    • getRxg12_NeedsHumanReview

      Returns RXG-12: "Needs Human Review" - creates it if necessary
    • getPharmacySpecialAdministrationInstructions

      Returns all repetitions of Pharmacy Special Administration Instructions (RXG-13).
    • getRxg13_PharmacySpecialAdministrationInstructions

      Returns all repetitions of Pharmacy Special Administration Instructions (RXG-13).
    • getPharmacySpecialAdministrationInstructionsReps

      Returns a count of the current number of repetitions of Pharmacy Special Administration Instructions (RXG-13). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getPharmacySpecialAdministrationInstructions

      Returns a specific repetition of RXG-13: "Pharmacy Special Administration Instructions" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg13_PharmacySpecialAdministrationInstructions

      Returns a specific repetition of RXG-13: "Pharmacy Special Administration Instructions" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg13_PharmacySpecialAdministrationInstructionsReps

      Returns a count of the current number of repetitions of Pharmacy Special Administration Instructions (RXG-13). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertPharmacySpecialAdministrationInstructions

      Inserts a repetition of RXG-13: "Pharmacy Special Administration Instructions" 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)
    • insertRxg13_PharmacySpecialAdministrationInstructions

      Inserts a repetition of RXG-13: "Pharmacy Special Administration Instructions" 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)
    • removePharmacySpecialAdministrationInstructions

      Removes a repetition of RXG-13: "Pharmacy Special Administration Instructions" 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)
    • removeRxg13_PharmacySpecialAdministrationInstructions

      Removes a repetition of RXG-13: "Pharmacy Special Administration Instructions" 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)
    • getGivePerTimeUnit

      Returns RXG-14: "Give Per (Time Unit)" - creates it if necessary
    • getRxg14_GivePerTimeUnit

      Returns RXG-14: "Give Per (Time Unit)" - creates it if necessary
    • getGiveRateAmount

      Returns RXG-15: "Give Rate Amount" - creates it if necessary
    • getRxg15_GiveRateAmount

      Returns RXG-15: "Give Rate Amount" - creates it if necessary
    • getGiveRateUnits

      public CE getGiveRateUnits()
      Returns RXG-16: "Give Rate Units" - creates it if necessary
    • getRxg16_GiveRateUnits

      Returns RXG-16: "Give Rate Units" - creates it if necessary
    • createNewTypeWithoutReflection

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