Class TQ1

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class TQ1 extends AbstractSegment

Represents an HL7 TQ1 message segment (Timing/Quantity). This segment has the following fields:

  • TQ1-1: Set ID - TQ1 (SI) optional
  • TQ1-2: Quantity (CQ) optional
  • TQ1-3: Repeat Pattern (RPT) optional repeating
  • TQ1-4: Explicit Time (TM) optional repeating
  • TQ1-5: Relative Time and Units (CQ) optional repeating
  • TQ1-6: Service Duration (CQ) optional
  • TQ1-7: Start date/time (TS) optional
  • TQ1-8: End date/time (TS) optional
  • TQ1-9: Priority (CWE) optional repeating
  • TQ1-10: Condition text (TX) optional
  • TQ1-11: Text instruction (TX) optional
  • TQ1-12: Conjunction (ID) optional
  • TQ1-13: Occurrence duration (CQ) optional
  • TQ1-14: Total occurrence's (NM) optional
See Also:
  • Constructor Details

  • Method Details

    • getSetIDTQ1

      public SI getSetIDTQ1()
      Returns TQ1-1: "Set ID - TQ1" - creates it if necessary
    • getTq11_SetIDTQ1

      public SI getTq11_SetIDTQ1()
      Returns TQ1-1: "Set ID - TQ1" - creates it if necessary
    • getQuantity

      public CQ getQuantity()
      Returns TQ1-2: "Quantity" - creates it if necessary
    • getTq12_Quantity

      public CQ getTq12_Quantity()
      Returns TQ1-2: "Quantity" - creates it if necessary
    • getRepeatPattern

      public RPT[] getRepeatPattern()
      Returns all repetitions of Repeat Pattern (TQ1-3).
    • getTq13_RepeatPattern

      Returns all repetitions of Repeat Pattern (TQ1-3).
    • getRepeatPatternReps

      public int getRepeatPatternReps()
      Returns a count of the current number of repetitions of Repeat Pattern (TQ1-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getRepeatPattern

      public RPT getRepeatPattern(int rep)
      Returns a specific repetition of TQ1-3: "Repeat Pattern" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getTq13_RepeatPattern

      public RPT getTq13_RepeatPattern(int rep)
      Returns a specific repetition of TQ1-3: "Repeat Pattern" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getTq13_RepeatPatternReps

      Returns a count of the current number of repetitions of Repeat Pattern (TQ1-3). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertRepeatPattern

      public RPT insertRepeatPattern(int rep) throws HL7Exception
      Inserts a repetition of TQ1-3: "Repeat Pattern" 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)
    • insertTq13_RepeatPattern

      public RPT insertTq13_RepeatPattern(int rep) throws HL7Exception
      Inserts a repetition of TQ1-3: "Repeat Pattern" 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)
    • removeRepeatPattern

      public RPT removeRepeatPattern(int rep) throws HL7Exception
      Removes a repetition of TQ1-3: "Repeat Pattern" 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)
    • removeTq13_RepeatPattern

      public RPT removeTq13_RepeatPattern(int rep) throws HL7Exception
      Removes a repetition of TQ1-3: "Repeat Pattern" 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)
    • getExplicitTime

      public TM[] getExplicitTime()
      Returns all repetitions of Explicit Time (TQ1-4).
    • getTq14_ExplicitTime

      Returns all repetitions of Explicit Time (TQ1-4).
    • getExplicitTimeReps

      public int getExplicitTimeReps()
      Returns a count of the current number of repetitions of Explicit Time (TQ1-4). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getExplicitTime

      public TM getExplicitTime(int rep)
      Returns a specific repetition of TQ1-4: "Explicit Time" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getTq14_ExplicitTime

      public TM getTq14_ExplicitTime(int rep)
      Returns a specific repetition of TQ1-4: "Explicit Time" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getTq14_ExplicitTimeReps

      Returns a count of the current number of repetitions of Explicit Time (TQ1-4). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertExplicitTime

      public TM insertExplicitTime(int rep) throws HL7Exception
      Inserts a repetition of TQ1-4: "Explicit Time" 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)
    • insertTq14_ExplicitTime

      public TM insertTq14_ExplicitTime(int rep) throws HL7Exception
      Inserts a repetition of TQ1-4: "Explicit Time" 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)
    • removeExplicitTime

      public TM removeExplicitTime(int rep) throws HL7Exception
      Removes a repetition of TQ1-4: "Explicit Time" 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)
    • removeTq14_ExplicitTime

      public TM removeTq14_ExplicitTime(int rep) throws HL7Exception
      Removes a repetition of TQ1-4: "Explicit Time" 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)
    • getRelativeTimeAndUnits

      Returns all repetitions of Relative Time and Units (TQ1-5).
    • getTq15_RelativeTimeAndUnits

      Returns all repetitions of Relative Time and Units (TQ1-5).
    • getRelativeTimeAndUnitsReps

      Returns a count of the current number of repetitions of Relative Time and Units (TQ1-5). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getRelativeTimeAndUnits

      public CQ getRelativeTimeAndUnits(int rep)
      Returns a specific repetition of TQ1-5: "Relative Time and Units" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getTq15_RelativeTimeAndUnits

      public CQ getTq15_RelativeTimeAndUnits(int rep)
      Returns a specific repetition of TQ1-5: "Relative Time and Units" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getTq15_RelativeTimeAndUnitsReps

      Returns a count of the current number of repetitions of Relative Time and Units (TQ1-5). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertRelativeTimeAndUnits

      public CQ insertRelativeTimeAndUnits(int rep) throws HL7Exception
      Inserts a repetition of TQ1-5: "Relative Time and Units" 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)
    • insertTq15_RelativeTimeAndUnits

      Inserts a repetition of TQ1-5: "Relative Time and Units" 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)
    • removeRelativeTimeAndUnits

      public CQ removeRelativeTimeAndUnits(int rep) throws HL7Exception
      Removes a repetition of TQ1-5: "Relative Time and Units" 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)
    • removeTq15_RelativeTimeAndUnits

      Removes a repetition of TQ1-5: "Relative Time and Units" 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)
    • getServiceDuration

      Returns TQ1-6: "Service Duration" - creates it if necessary
    • getTq16_ServiceDuration

      Returns TQ1-6: "Service Duration" - creates it if necessary
    • getStartDateTime

      public TS getStartDateTime()
      Returns TQ1-7: "Start date/time" - creates it if necessary
    • getTq17_StartDateTime

      Returns TQ1-7: "Start date/time" - creates it if necessary
    • getEndDateTime

      public TS getEndDateTime()
      Returns TQ1-8: "End date/time" - creates it if necessary
    • getTq18_EndDateTime

      Returns TQ1-8: "End date/time" - creates it if necessary
    • getPriority

      public CWE[] getPriority()
      Returns all repetitions of Priority (TQ1-9).
    • getTq19_Priority

      public CWE[] getTq19_Priority()
      Returns all repetitions of Priority (TQ1-9).
    • getPriorityReps

      public int getPriorityReps()
      Returns a count of the current number of repetitions of Priority (TQ1-9). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getPriority

      public CWE getPriority(int rep)
      Returns a specific repetition of TQ1-9: "Priority" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getTq19_Priority

      public CWE getTq19_Priority(int rep)
      Returns a specific repetition of TQ1-9: "Priority" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getTq19_PriorityReps

      public int getTq19_PriorityReps()
      Returns a count of the current number of repetitions of Priority (TQ1-9). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertPriority

      public CWE insertPriority(int rep) throws HL7Exception
      Inserts a repetition of TQ1-9: "Priority" 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)
    • insertTq19_Priority

      public CWE insertTq19_Priority(int rep) throws HL7Exception
      Inserts a repetition of TQ1-9: "Priority" 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)
    • removePriority

      public CWE removePriority(int rep) throws HL7Exception
      Removes a repetition of TQ1-9: "Priority" 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)
    • removeTq19_Priority

      public CWE removeTq19_Priority(int rep) throws HL7Exception
      Removes a repetition of TQ1-9: "Priority" 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)
    • getConditionText

      public TX getConditionText()
      Returns TQ1-10: "Condition text" - creates it if necessary
    • getTq110_ConditionText

      Returns TQ1-10: "Condition text" - creates it if necessary
    • getTextInstruction

      Returns TQ1-11: "Text instruction" - creates it if necessary
    • getTq111_TextInstruction

      Returns TQ1-11: "Text instruction" - creates it if necessary
    • getConjunction

      public ID getConjunction()
      Returns TQ1-12: "Conjunction" - creates it if necessary
    • getTq112_Conjunction

      Returns TQ1-12: "Conjunction" - creates it if necessary
    • getOccurrenceDuration

      Returns TQ1-13: "Occurrence duration" - creates it if necessary
    • getTq113_OccurrenceDuration

      Returns TQ1-13: "Occurrence duration" - creates it if necessary
    • getTotalOccurrenceS

      Returns TQ1-14: "Total occurrence's" - creates it if necessary
    • getTq114_TotalOccurrenceS

      Returns TQ1-14: "Total occurrence's" - creates it if necessary
    • createNewTypeWithoutReflection

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