Class RXG

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class RXG extends AbstractSegment

Represents an HL7 RXG message segment (Pharmacy/Treatment 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)
  • 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 (CE) optional repeating
  • RXG-10: Substitution Status (ID) optional
  • RXG-11: Dispense-To Location (LA2) optional
  • RXG-12: Needs Human Review (ID) optional
  • RXG-13: Pharmacy/Treatment Supplier's Special Administration Instructions (CE) optional repeating
  • RXG-14: Give Per (Time Unit) (ST) optional
  • RXG-15: Give Rate Amount (ST) optional
  • RXG-16: Give Rate Units (CE) optional
  • RXG-17: Give Strength (NM) optional
  • RXG-18: Give Strength Units (CE) optional
  • RXG-19: Substance Lot Number (ST) optional repeating
  • RXG-20: Substance Expiration Date (TS) optional repeating
  • RXG-21: Substance Manufacturer Name (CE) optional repeating
  • RXG-22: Indication (CE) optional repeating
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

      Returns RXG-3: "Quantity/Timing" - creates it if necessary
    • getRxg3_QuantityTiming

      Returns RXG-3: "Quantity/Timing" - creates it if necessary
    • 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 all repetitions of Administration Notes (RXG-9).
    • getRxg9_AdministrationNotes

      Returns all repetitions of Administration Notes (RXG-9).
    • getAdministrationNotesReps

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

      public CE getAdministrationNotes(int rep)
      Returns a specific repetition of RXG-9: "Administration Notes" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg9_AdministrationNotes

      public CE getRxg9_AdministrationNotes(int rep)
      Returns a specific repetition of RXG-9: "Administration Notes" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg9_AdministrationNotesReps

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

      public CE insertAdministrationNotes(int rep) throws HL7Exception
      Inserts a repetition of RXG-9: "Administration Notes" 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)
    • insertRxg9_AdministrationNotes

      Inserts a repetition of RXG-9: "Administration Notes" 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)
    • removeAdministrationNotes

      public CE removeAdministrationNotes(int rep) throws HL7Exception
      Removes a repetition of RXG-9: "Administration Notes" 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)
    • removeRxg9_AdministrationNotes

      Removes a repetition of RXG-9: "Administration Notes" 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)
    • getSubstitutionStatus

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

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

      Returns RXG-11: "Dispense-To Location" - creates it if necessary
    • getRxg11_DispenseToLocation

      Returns RXG-11: "Dispense-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
    • getPharmacyTreatmentSupplierSSpecialAdministrationInstructions

      Returns all repetitions of Pharmacy/Treatment Supplier's Special Administration Instructions (RXG-13).
    • getRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructions

      Returns all repetitions of Pharmacy/Treatment Supplier's Special Administration Instructions (RXG-13).
    • getPharmacyTreatmentSupplierSSpecialAdministrationInstructionsReps

      Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's 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.
    • getPharmacyTreatmentSupplierSSpecialAdministrationInstructions

      Returns a specific repetition of RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructions

      Returns a specific repetition of RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructionsReps

      Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's 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.
    • insertPharmacyTreatmentSupplierSSpecialAdministrationInstructions

      Inserts a repetition of RXG-13: "Pharmacy/Treatment Supplier's 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_PharmacyTreatmentSupplierSSpecialAdministrationInstructions

      Inserts a repetition of RXG-13: "Pharmacy/Treatment Supplier's 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)
    • removePharmacyTreatmentSupplierSSpecialAdministrationInstructions

      Removes a repetition of RXG-13: "Pharmacy/Treatment Supplier's 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_PharmacyTreatmentSupplierSSpecialAdministrationInstructions

      Removes a repetition of RXG-13: "Pharmacy/Treatment Supplier's 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
    • getGiveStrength

      public NM getGiveStrength()
      Returns RXG-17: "Give Strength" - creates it if necessary
    • getRxg17_GiveStrength

      Returns RXG-17: "Give Strength" - creates it if necessary
    • getGiveStrengthUnits

      Returns RXG-18: "Give Strength Units" - creates it if necessary
    • getRxg18_GiveStrengthUnits

      Returns RXG-18: "Give Strength Units" - creates it if necessary
    • getSubstanceLotNumber

      Returns all repetitions of Substance Lot Number (RXG-19).
    • getRxg19_SubstanceLotNumber

      Returns all repetitions of Substance Lot Number (RXG-19).
    • getSubstanceLotNumberReps

      Returns a count of the current number of repetitions of Substance Lot Number (RXG-19). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getSubstanceLotNumber

      public ST getSubstanceLotNumber(int rep)
      Returns a specific repetition of RXG-19: "Substance Lot Number" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg19_SubstanceLotNumber

      public ST getRxg19_SubstanceLotNumber(int rep)
      Returns a specific repetition of RXG-19: "Substance Lot Number" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg19_SubstanceLotNumberReps

      Returns a count of the current number of repetitions of Substance Lot Number (RXG-19). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertSubstanceLotNumber

      public ST insertSubstanceLotNumber(int rep) throws HL7Exception
      Inserts a repetition of RXG-19: "Substance Lot Number" 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)
    • insertRxg19_SubstanceLotNumber

      Inserts a repetition of RXG-19: "Substance Lot Number" 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)
    • removeSubstanceLotNumber

      public ST removeSubstanceLotNumber(int rep) throws HL7Exception
      Removes a repetition of RXG-19: "Substance Lot Number" 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)
    • removeRxg19_SubstanceLotNumber

      Removes a repetition of RXG-19: "Substance Lot Number" 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)
    • getSubstanceExpirationDate

      Returns all repetitions of Substance Expiration Date (RXG-20).
    • getRxg20_SubstanceExpirationDate

      Returns all repetitions of Substance Expiration Date (RXG-20).
    • getSubstanceExpirationDateReps

      Returns a count of the current number of repetitions of Substance Expiration Date (RXG-20). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getSubstanceExpirationDate

      public TS getSubstanceExpirationDate(int rep)
      Returns a specific repetition of RXG-20: "Substance Expiration Date" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg20_SubstanceExpirationDate

      Returns a specific repetition of RXG-20: "Substance Expiration Date" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg20_SubstanceExpirationDateReps

      Returns a count of the current number of repetitions of Substance Expiration Date (RXG-20). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertSubstanceExpirationDate

      Inserts a repetition of RXG-20: "Substance Expiration Date" 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)
    • insertRxg20_SubstanceExpirationDate

      Inserts a repetition of RXG-20: "Substance Expiration Date" 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)
    • removeSubstanceExpirationDate

      Removes a repetition of RXG-20: "Substance Expiration Date" 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)
    • removeRxg20_SubstanceExpirationDate

      Removes a repetition of RXG-20: "Substance Expiration Date" 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)
    • getSubstanceManufacturerName

      Returns all repetitions of Substance Manufacturer Name (RXG-21).
    • getRxg21_SubstanceManufacturerName

      Returns all repetitions of Substance Manufacturer Name (RXG-21).
    • getSubstanceManufacturerNameReps

      Returns a count of the current number of repetitions of Substance Manufacturer Name (RXG-21). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getSubstanceManufacturerName

      public CE getSubstanceManufacturerName(int rep)
      Returns a specific repetition of RXG-21: "Substance Manufacturer Name" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg21_SubstanceManufacturerName

      Returns a specific repetition of RXG-21: "Substance Manufacturer Name" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg21_SubstanceManufacturerNameReps

      Returns a count of the current number of repetitions of Substance Manufacturer Name (RXG-21). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertSubstanceManufacturerName

      Inserts a repetition of RXG-21: "Substance Manufacturer 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)
    • insertRxg21_SubstanceManufacturerName

      Inserts a repetition of RXG-21: "Substance Manufacturer 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)
    • removeSubstanceManufacturerName

      Removes a repetition of RXG-21: "Substance Manufacturer 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)
    • removeRxg21_SubstanceManufacturerName

      Removes a repetition of RXG-21: "Substance Manufacturer 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)
    • getIndication

      public CE[] getIndication()
      Returns all repetitions of Indication (RXG-22).
    • getRxg22_Indication

      public CE[] getRxg22_Indication()
      Returns all repetitions of Indication (RXG-22).
    • getIndicationReps

      public int getIndicationReps()
      Returns a count of the current number of repetitions of Indication (RXG-22). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getIndication

      public CE getIndication(int rep)
      Returns a specific repetition of RXG-22: "Indication" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg22_Indication

      public CE getRxg22_Indication(int rep)
      Returns a specific repetition of RXG-22: "Indication" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getRxg22_IndicationReps

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

      public CE insertIndication(int rep) throws HL7Exception
      Inserts a repetition of RXG-22: "Indication" 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)
    • insertRxg22_Indication

      public CE insertRxg22_Indication(int rep) throws HL7Exception
      Inserts a repetition of RXG-22: "Indication" 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)
    • removeIndication

      public CE removeIndication(int rep) throws HL7Exception
      Removes a repetition of RXG-22: "Indication" 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)
    • removeRxg22_Indication

      public CE removeRxg22_Indication(int rep) throws HL7Exception
      Removes a repetition of RXG-22: "Indication" 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