Class UB1

All Implemented Interfaces:
Segment, Structure, Visitable, Serializable

public class UB1 extends AbstractSegment

Represents an HL7 UB1 message segment (UB82 DATA). This segment has the following fields:

  • UB1-1: Set ID - UB82 (SI) optional
  • UB1-2: Blood deductible (43) (NM) optional
  • UB1-3: Blood furnished pints of (40) (NM) optional
  • UB1-4: Blood replaced pints (41) (NM) optional
  • UB1-5: Blood not replaced pints (42) (NM) optional
  • UB1-6: Co-insurance days (25) (NM) optional
  • UB1-7: Condition code (35-39) (ID) optional repeating
  • UB1-8: Covered days (23) (NM) optional
  • UB1-9: Non-covered days (24) (NM) optional
  • UB1-10: Value amount and code (46-49) (CM_UVC) optional repeating
  • UB1-11: Number of grace days (90) (NM) optional
  • UB1-12: Special program indicator (44) (ID) optional
  • UB1-13: PSRO / UR approval indicator (87) (ID) optional
  • UB1-14: PSRO / UR approved stay - from (88) (DT) optional
  • UB1-15: PSRO / UR approved stay - to (89) (DT) optional
  • UB1-16: Occurrence (28-32) (CM_OCD) optional repeating
  • UB1-17: Occurrence span (33) (ID) optional
  • UB1-18: Occurrence span start date (33) (DT) optional
  • UB1-19: Occurrence span end date (33) (DT) optional
  • UB1-20: UB-82 locator 2 (ST) optional
  • UB1-21: UB-82 locator 9 (ST) optional
  • UB1-22: UB-82 locator 27 (ST) optional
  • UB1-23: UB-82 locator 45 (ST) optional
See Also:
  • Constructor Details

  • Method Details

    • getSetIDUB82

      public SI getSetIDUB82()
      Returns UB1-1: "Set ID - UB82" - creates it if necessary
    • getUb11_SetIDUB82

      Returns UB1-1: "Set ID - UB82" - creates it if necessary
    • getBloodDeductible

      Returns UB1-2: "Blood deductible (43)" - creates it if necessary
    • getUb12_BloodDeductible

      Returns UB1-2: "Blood deductible (43)" - creates it if necessary
    • getBloodFurnishedPintsOf

      Returns UB1-3: "Blood furnished pints of (40)" - creates it if necessary
    • getUb13_BloodFurnishedPintsOf

      Returns UB1-3: "Blood furnished pints of (40)" - creates it if necessary
    • getBloodReplacedPints

      Returns UB1-4: "Blood replaced pints (41)" - creates it if necessary
    • getUb14_BloodReplacedPints

      Returns UB1-4: "Blood replaced pints (41)" - creates it if necessary
    • getBloodNotReplacedPints

      Returns UB1-5: "Blood not replaced pints (42)" - creates it if necessary
    • getUb15_BloodNotReplacedPints

      Returns UB1-5: "Blood not replaced pints (42)" - creates it if necessary
    • getCoInsuranceDays

      Returns UB1-6: "Co-insurance days (25)" - creates it if necessary
    • getUb16_CoInsuranceDays

      Returns UB1-6: "Co-insurance days (25)" - creates it if necessary
    • getConditionCode3539

      Returns all repetitions of Condition code (35-39) (UB1-7).
    • getUb17_ConditionCode3539

      Returns all repetitions of Condition code (35-39) (UB1-7).
    • getConditionCode3539Reps

      Returns a count of the current number of repetitions of Condition code (35-39) (UB1-7). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getConditionCode3539

      public ID getConditionCode3539(int rep)
      Returns a specific repetition of UB1-7: "Condition code (35-39)" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getUb17_ConditionCode3539

      public ID getUb17_ConditionCode3539(int rep)
      Returns a specific repetition of UB1-7: "Condition code (35-39)" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getUb17_ConditionCode3539Reps

      Returns a count of the current number of repetitions of Condition code (35-39) (UB1-7). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertConditionCode3539

      public ID insertConditionCode3539(int rep) throws HL7Exception
      Inserts a repetition of UB1-7: "Condition code (35-39)" 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)
    • insertUb17_ConditionCode3539

      public ID insertUb17_ConditionCode3539(int rep) throws HL7Exception
      Inserts a repetition of UB1-7: "Condition code (35-39)" 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)
    • removeConditionCode3539

      public ID removeConditionCode3539(int rep) throws HL7Exception
      Removes a repetition of UB1-7: "Condition code (35-39)" 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)
    • removeUb17_ConditionCode3539

      public ID removeUb17_ConditionCode3539(int rep) throws HL7Exception
      Removes a repetition of UB1-7: "Condition code (35-39)" 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)
    • getCoveredDays

      public NM getCoveredDays()
      Returns UB1-8: "Covered days (23)" - creates it if necessary
    • getUb18_CoveredDays

      Returns UB1-8: "Covered days (23)" - creates it if necessary
    • getNonCoveredDays

      Returns UB1-9: "Non-covered days (24)" - creates it if necessary
    • getUb19_NonCoveredDays

      Returns UB1-9: "Non-covered days (24)" - creates it if necessary
    • getValueAmountAndCode4649

      Returns all repetitions of Value amount and code (46-49) (UB1-10).
    • getUb110_ValueAmountAndCode4649

      Returns all repetitions of Value amount and code (46-49) (UB1-10).
    • getValueAmountAndCode4649Reps

      Returns a count of the current number of repetitions of Value amount and code (46-49) (UB1-10). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getValueAmountAndCode4649

      Returns a specific repetition of UB1-10: "Value amount and code (46-49)" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getUb110_ValueAmountAndCode4649

      Returns a specific repetition of UB1-10: "Value amount and code (46-49)" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getUb110_ValueAmountAndCode4649Reps

      Returns a count of the current number of repetitions of Value amount and code (46-49) (UB1-10). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertValueAmountAndCode4649

      Inserts a repetition of UB1-10: "Value amount and code (46-49)" 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)
    • insertUb110_ValueAmountAndCode4649

      Inserts a repetition of UB1-10: "Value amount and code (46-49)" 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)
    • removeValueAmountAndCode4649

      Removes a repetition of UB1-10: "Value amount and code (46-49)" 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)
    • removeUb110_ValueAmountAndCode4649

      Removes a repetition of UB1-10: "Value amount and code (46-49)" 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)
    • getNumberOfGraceDays

      Returns UB1-11: "Number of grace days (90)" - creates it if necessary
    • getUb111_NumberOfGraceDays

      Returns UB1-11: "Number of grace days (90)" - creates it if necessary
    • getSpecialProgramIndicator

      Returns UB1-12: "Special program indicator (44)" - creates it if necessary
    • getUb112_SpecialProgramIndicator

      Returns UB1-12: "Special program indicator (44)" - creates it if necessary
    • getPSROURApprovalIndicator

      Returns UB1-13: "PSRO / UR approval indicator (87)" - creates it if necessary
    • getUb113_PSROURApprovalIndicator

      Returns UB1-13: "PSRO / UR approval indicator (87)" - creates it if necessary
    • getPSROURApprovedStayFrom

      Returns UB1-14: "PSRO / UR approved stay - from (88)" - creates it if necessary
    • getUb114_PSROURApprovedStayFrom

      Returns UB1-14: "PSRO / UR approved stay - from (88)" - creates it if necessary
    • getPSROURApprovedStayTo

      Returns UB1-15: "PSRO / UR approved stay - to (89)" - creates it if necessary
    • getUb115_PSROURApprovedStayTo

      Returns UB1-15: "PSRO / UR approved stay - to (89)" - creates it if necessary
    • getOccurrence2832

      Returns all repetitions of Occurrence (28-32) (UB1-16).
    • getUb116_Occurrence2832

      Returns all repetitions of Occurrence (28-32) (UB1-16).
    • getOccurrence2832Reps

      public int getOccurrence2832Reps()
      Returns a count of the current number of repetitions of Occurrence (28-32) (UB1-16). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • getOccurrence2832

      public CM_OCD getOccurrence2832(int rep)
      Returns a specific repetition of UB1-16: "Occurrence (28-32)" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getUb116_Occurrence2832

      public CM_OCD getUb116_Occurrence2832(int rep)
      Returns a specific repetition of UB1-16: "Occurrence (28-32)" - creates it if necessary
      Parameters:
      rep - The repetition index (0-indexed)
    • getUb116_Occurrence2832Reps

      Returns a count of the current number of repetitions of Occurrence (28-32) (UB1-16). This method does not create a repetition, so if no repetitions have currently been defined or accessed, it will return zero.
    • insertOccurrence2832

      public CM_OCD insertOccurrence2832(int rep) throws HL7Exception
      Inserts a repetition of UB1-16: "Occurrence (28-32)" 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)
    • insertUb116_Occurrence2832

      Inserts a repetition of UB1-16: "Occurrence (28-32)" 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)
    • removeOccurrence2832

      public CM_OCD removeOccurrence2832(int rep) throws HL7Exception
      Removes a repetition of UB1-16: "Occurrence (28-32)" 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)
    • removeUb116_Occurrence2832

      Removes a repetition of UB1-16: "Occurrence (28-32)" 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)
    • getOccurrenceSpan

      Returns UB1-17: "Occurrence span (33)" - creates it if necessary
    • getUb117_OccurrenceSpan

      Returns UB1-17: "Occurrence span (33)" - creates it if necessary
    • getOccurrenceSpanStartDate

      Returns UB1-18: "Occurrence span start date (33)" - creates it if necessary
    • getUb118_OccurrenceSpanStartDate

      Returns UB1-18: "Occurrence span start date (33)" - creates it if necessary
    • getOccurrenceSpanEndDate

      Returns UB1-19: "Occurrence span end date (33)" - creates it if necessary
    • getUb119_OccurrenceSpanEndDate

      Returns UB1-19: "Occurrence span end date (33)" - creates it if necessary
    • getUB82Locator2

      public ST getUB82Locator2()
      Returns UB1-20: "UB-82 locator 2" - creates it if necessary
    • getUb120_UB82Locator2

      Returns UB1-20: "UB-82 locator 2" - creates it if necessary
    • getUB82Locator9

      public ST getUB82Locator9()
      Returns UB1-21: "UB-82 locator 9" - creates it if necessary
    • getUb121_UB82Locator9

      Returns UB1-21: "UB-82 locator 9" - creates it if necessary
    • getUB82Locator27

      public ST getUB82Locator27()
      Returns UB1-22: "UB-82 locator 27" - creates it if necessary
    • getUb122_UB82Locator27

      Returns UB1-22: "UB-82 locator 27" - creates it if necessary
    • getUB82Locator45

      public ST getUB82Locator45()
      Returns UB1-23: "UB-82 locator 45" - creates it if necessary
    • getUb123_UB82Locator45

      Returns UB1-23: "UB-82 locator 45" - creates it if necessary
    • createNewTypeWithoutReflection

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