All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.hl7v2.model.v22.segment.UB1 Maven / Gradle / Ivy

There is a newer version: 2.3
Show newest version
/*
 * This class is an auto-generated source file for a HAPI
 * HL7 v2.x standard structure class.
 *
 * For more information, visit: http://hl7api.sourceforge.net/
 */

package ca.uhn.hl7v2.model.v22.segment;

// import ca.uhn.hl7v2.model.v22.group.*;
import ca.uhn.hl7v2.model.v22.datatype.*;
import ca.uhn.log.HapiLogFactory;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
import ca.uhn.hl7v2.model.AbstractMessage;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Varies;

/**
 *

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 *
*/ public class UB1 extends AbstractSegment { /** * Creates a new UB1 segment */ public UB1(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(SI.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID - UB82"); this.add(NM.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Blood deductible (43)"); this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Blood furnished pints of (40)"); this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Blood replaced pints (41)"); this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Blood not replaced pints (42)"); this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Co-insurance days (25)"); this.add(ID.class, false, 5, 2, new Object[]{ getMessage() }, "Condition code (35-39)"); this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Covered days (23)"); this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Non-covered days (24)"); this.add(CM_UVC.class, false, 8, 12, new Object[]{ getMessage(), new Integer(153) }, "Value amount and code (46-49)"); this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Number of grace days (90)"); this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Special program indicator (44)"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "PSRO / UR approval indicator (87)"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "PSRO / UR approved stay - from (88)"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "PSRO / UR approved stay - to (89)"); this.add(CM_OCD.class, false, 5, 20, new Object[]{ getMessage(), new Integer(0) }, "Occurrence (28-32)"); this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Occurrence span (33)"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Occurrence span start date (33)"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Occurrence span end date (33)"); this.add(ST.class, false, 1, 30, new Object[]{ getMessage(), new Integer(0) }, "UB-82 locator 2"); this.add(ST.class, false, 1, 7, new Object[]{ getMessage(), new Integer(0) }, "UB-82 locator 9"); this.add(ST.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "UB-82 locator 27"); this.add(ST.class, false, 1, 17, new Object[]{ getMessage(), new Integer(0) }, "UB-82 locator 45"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating UB1 - this is probably a bug in the source code generator.", e); } } /** * Returns * UB1-1: "Set ID - UB82" - creates it if necessary */ public SI getSetIDUB82() { SI ret = null; try { Type t = this.getField(1, 0); ret = (SI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-1: "Set ID - UB82" - creates it if necessary */ public SI getUb11_SetIDUB82() { SI ret = null; try { Type t = this.getField(1, 0); ret = (SI)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-2: "Blood deductible (43)" - creates it if necessary */ public NM getBloodDeductible() { NM ret = null; try { Type t = this.getField(2, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-2: "Blood deductible (43)" - creates it if necessary */ public NM getUb12_BloodDeductible() { NM ret = null; try { Type t = this.getField(2, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-3: "Blood furnished pints of (40)" - creates it if necessary */ public NM getBloodFurnishedPintsOf() { NM ret = null; try { Type t = this.getField(3, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-3: "Blood furnished pints of (40)" - creates it if necessary */ public NM getUb13_BloodFurnishedPintsOf() { NM ret = null; try { Type t = this.getField(3, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-4: "Blood replaced pints (41)" - creates it if necessary */ public NM getBloodReplacedPints() { NM ret = null; try { Type t = this.getField(4, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-4: "Blood replaced pints (41)" - creates it if necessary */ public NM getUb14_BloodReplacedPints() { NM ret = null; try { Type t = this.getField(4, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-5: "Blood not replaced pints (42)" - creates it if necessary */ public NM getBloodNotReplacedPints() { NM ret = null; try { Type t = this.getField(5, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-5: "Blood not replaced pints (42)" - creates it if necessary */ public NM getUb15_BloodNotReplacedPints() { NM ret = null; try { Type t = this.getField(5, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-6: "Co-insurance days (25)" - creates it if necessary */ public NM getCoInsuranceDays() { NM ret = null; try { Type t = this.getField(6, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-6: "Co-insurance days (25)" - creates it if necessary */ public NM getUb16_CoInsuranceDays() { NM ret = null; try { Type t = this.getField(6, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Condition code (35-39) (UB1-7). */ public ID[] getConditionCode3539() { ID[] ret = null; try { Type[] t = this.getField(7); ret = new ID[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (ID)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * 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. */ public int getConditionCode3539Reps() { ID[] ret = null; try { Type[] t = this.getField(7); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * UB1-7: "Condition code (35-39)" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getConditionCode3539(int rep) { ID ret = null; try { Type t = this.getField(7, rep); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * UB1-7: "Condition code (35-39)" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getUb17_ConditionCode3539(int rep) { ID ret = null; try { Type t = this.getField(7, rep); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * 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. */ public int getUb17_ConditionCode3539Reps() { ID[] ret = null; try { Type[] t = this.getField(7); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * UB1-7: "Condition code (35-39)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ID insertConditionCode3539(int rep) throws HL7Exception { return (ID) super.insertRepetition(7, rep); } /** * Inserts a repetition of * UB1-7: "Condition code (35-39)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ID insertUb17_ConditionCode3539(int rep) throws HL7Exception { return (ID) super.insertRepetition(7, rep); } /** * Removes a repetition of * UB1-7: "Condition code (35-39)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ID removeConditionCode3539(int rep) throws HL7Exception { return (ID) super.removeRepetition(7, rep); } /** * Removes a repetition of * UB1-7: "Condition code (35-39)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ID removeUb17_ConditionCode3539(int rep) throws HL7Exception { return (ID) super.removeRepetition(7, rep); } /** * Returns * UB1-8: "Covered days (23)" - creates it if necessary */ public NM getCoveredDays() { NM ret = null; try { Type t = this.getField(8, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-8: "Covered days (23)" - creates it if necessary */ public NM getUb18_CoveredDays() { NM ret = null; try { Type t = this.getField(8, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-9: "Non-covered days (24)" - creates it if necessary */ public NM getNonCoveredDays() { NM ret = null; try { Type t = this.getField(9, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-9: "Non-covered days (24)" - creates it if necessary */ public NM getUb19_NonCoveredDays() { NM ret = null; try { Type t = this.getField(9, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Value amount and code (46-49) (UB1-10). */ public CM_UVC[] getValueAmountAndCode4649() { CM_UVC[] ret = null; try { Type[] t = this.getField(10); ret = new CM_UVC[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CM_UVC)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * 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. */ public int getValueAmountAndCode4649Reps() { CM_UVC[] ret = null; try { Type[] t = this.getField(10); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * UB1-10: "Value amount and code (46-49)" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CM_UVC getValueAmountAndCode4649(int rep) { CM_UVC ret = null; try { Type t = this.getField(10, rep); ret = (CM_UVC)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * UB1-10: "Value amount and code (46-49)" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CM_UVC getUb110_ValueAmountAndCode4649(int rep) { CM_UVC ret = null; try { Type t = this.getField(10, rep); ret = (CM_UVC)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * 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. */ public int getUb110_ValueAmountAndCode4649Reps() { CM_UVC[] ret = null; try { Type[] t = this.getField(10); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * UB1-10: "Value amount and code (46-49)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CM_UVC insertValueAmountAndCode4649(int rep) throws HL7Exception { return (CM_UVC) super.insertRepetition(10, rep); } /** * Inserts a repetition of * UB1-10: "Value amount and code (46-49)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CM_UVC insertUb110_ValueAmountAndCode4649(int rep) throws HL7Exception { return (CM_UVC) super.insertRepetition(10, rep); } /** * Removes a repetition of * UB1-10: "Value amount and code (46-49)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CM_UVC removeValueAmountAndCode4649(int rep) throws HL7Exception { return (CM_UVC) super.removeRepetition(10, rep); } /** * Removes a repetition of * UB1-10: "Value amount and code (46-49)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CM_UVC removeUb110_ValueAmountAndCode4649(int rep) throws HL7Exception { return (CM_UVC) super.removeRepetition(10, rep); } /** * Returns * UB1-11: "Number of grace days (90)" - creates it if necessary */ public NM getNumberOfGraceDays() { NM ret = null; try { Type t = this.getField(11, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-11: "Number of grace days (90)" - creates it if necessary */ public NM getUb111_NumberOfGraceDays() { NM ret = null; try { Type t = this.getField(11, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-12: "Special program indicator (44)" - creates it if necessary */ public ID getSpecialProgramIndicator() { ID ret = null; try { Type t = this.getField(12, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-12: "Special program indicator (44)" - creates it if necessary */ public ID getUb112_SpecialProgramIndicator() { ID ret = null; try { Type t = this.getField(12, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-13: "PSRO / UR approval indicator (87)" - creates it if necessary */ public ID getPSROURApprovalIndicator() { ID ret = null; try { Type t = this.getField(13, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-13: "PSRO / UR approval indicator (87)" - creates it if necessary */ public ID getUb113_PSROURApprovalIndicator() { ID ret = null; try { Type t = this.getField(13, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-14: "PSRO / UR approved stay - from (88)" - creates it if necessary */ public DT getPSROURApprovedStayFrom() { DT ret = null; try { Type t = this.getField(14, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-14: "PSRO / UR approved stay - from (88)" - creates it if necessary */ public DT getUb114_PSROURApprovedStayFrom() { DT ret = null; try { Type t = this.getField(14, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-15: "PSRO / UR approved stay - to (89)" - creates it if necessary */ public DT getPSROURApprovedStayTo() { DT ret = null; try { Type t = this.getField(15, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-15: "PSRO / UR approved stay - to (89)" - creates it if necessary */ public DT getUb115_PSROURApprovedStayTo() { DT ret = null; try { Type t = this.getField(15, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns all repetitions of Occurrence (28-32) (UB1-16). */ public CM_OCD[] getOccurrence2832() { CM_OCD[] ret = null; try { Type[] t = this.getField(16); ret = new CM_OCD[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CM_OCD)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * 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. */ public int getOccurrence2832Reps() { CM_OCD[] ret = null; try { Type[] t = this.getField(16); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * UB1-16: "Occurrence (28-32)" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CM_OCD getOccurrence2832(int rep) { CM_OCD ret = null; try { Type t = this.getField(16, rep); ret = (CM_OCD)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * UB1-16: "Occurrence (28-32)" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CM_OCD getUb116_Occurrence2832(int rep) { CM_OCD ret = null; try { Type t = this.getField(16, rep); ret = (CM_OCD)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * 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. */ public int getUb116_Occurrence2832Reps() { CM_OCD[] ret = null; try { Type[] t = this.getField(16); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * UB1-16: "Occurrence (28-32)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CM_OCD insertOccurrence2832(int rep) throws HL7Exception { return (CM_OCD) super.insertRepetition(16, rep); } /** * Inserts a repetition of * UB1-16: "Occurrence (28-32)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CM_OCD insertUb116_Occurrence2832(int rep) throws HL7Exception { return (CM_OCD) super.insertRepetition(16, rep); } /** * Removes a repetition of * UB1-16: "Occurrence (28-32)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CM_OCD removeOccurrence2832(int rep) throws HL7Exception { return (CM_OCD) super.removeRepetition(16, rep); } /** * Removes a repetition of * UB1-16: "Occurrence (28-32)" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CM_OCD removeUb116_Occurrence2832(int rep) throws HL7Exception { return (CM_OCD) super.removeRepetition(16, rep); } /** * Returns * UB1-17: "Occurrence span (33)" - creates it if necessary */ public ID getOccurrenceSpan() { ID ret = null; try { Type t = this.getField(17, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-17: "Occurrence span (33)" - creates it if necessary */ public ID getUb117_OccurrenceSpan() { ID ret = null; try { Type t = this.getField(17, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-18: "Occurrence span start date (33)" - creates it if necessary */ public DT getOccurrenceSpanStartDate() { DT ret = null; try { Type t = this.getField(18, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-18: "Occurrence span start date (33)" - creates it if necessary */ public DT getUb118_OccurrenceSpanStartDate() { DT ret = null; try { Type t = this.getField(18, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-19: "Occurrence span end date (33)" - creates it if necessary */ public DT getOccurrenceSpanEndDate() { DT ret = null; try { Type t = this.getField(19, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-19: "Occurrence span end date (33)" - creates it if necessary */ public DT getUb119_OccurrenceSpanEndDate() { DT ret = null; try { Type t = this.getField(19, 0); ret = (DT)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-20: "UB-82 locator 2" - creates it if necessary */ public ST getUB82Locator2() { ST ret = null; try { Type t = this.getField(20, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-20: "UB-82 locator 2" - creates it if necessary */ public ST getUb120_UB82Locator2() { ST ret = null; try { Type t = this.getField(20, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-21: "UB-82 locator 9" - creates it if necessary */ public ST getUB82Locator9() { ST ret = null; try { Type t = this.getField(21, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-21: "UB-82 locator 9" - creates it if necessary */ public ST getUb121_UB82Locator9() { ST ret = null; try { Type t = this.getField(21, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-22: "UB-82 locator 27" - creates it if necessary */ public ST getUB82Locator27() { ST ret = null; try { Type t = this.getField(22, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-22: "UB-82 locator 27" - creates it if necessary */ public ST getUb122_UB82Locator27() { ST ret = null; try { Type t = this.getField(22, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-23: "UB-82 locator 45" - creates it if necessary */ public ST getUB82Locator45() { ST ret = null; try { Type t = this.getField(23, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * UB1-23: "UB-82 locator 45" - creates it if necessary */ public ST getUb123_UB82Locator45() { ST ret = null; try { Type t = this.getField(23, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new SI(getMessage()); case 1: return new NM(getMessage()); case 2: return new NM(getMessage()); case 3: return new NM(getMessage()); case 4: return new NM(getMessage()); case 5: return new NM(getMessage()); case 6: return new ID(getMessage(), new Integer( 43 )); case 7: return new NM(getMessage()); case 8: return new NM(getMessage()); case 9: return new CM_UVC(getMessage()); case 10: return new NM(getMessage()); case 11: return new ID(getMessage(), new Integer( 0 )); case 12: return new ID(getMessage(), new Integer( 0 )); case 13: return new DT(getMessage()); case 14: return new DT(getMessage()); case 15: return new CM_OCD(getMessage()); case 16: return new ID(getMessage(), new Integer( 0 )); case 17: return new DT(getMessage()); case 18: return new DT(getMessage()); case 19: return new ST(getMessage()); case 20: return new ST(getMessage()); case 21: return new ST(getMessage()); case 22: return new ST(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy