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

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

There is a newer version: 2.5.1
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.v21.segment;

// import ca.uhn.hl7v2.model.v21.group.*;
import ca.uhn.hl7v2.model.v21.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 (ST) optional *
  • UB1-3: BLOOD FURN.-PINTS OF (40) (ST) optional *
  • UB1-4: BLOOD REPLACED-PINTS (41) (ST) optional *
  • UB1-5: BLOOD NOT RPLCD-PINTS(42) (ST) optional *
  • UB1-6: CO-INSURANCE DAYS (25) (ST) optional *
  • UB1-7: CONDITION CODE (ID) optional repeating *
  • UB1-8: COVERED DAYS - (23) (ST) optional *
  • UB1-9: NON COVERED DAYS - (24) (ST) optional *
  • UB1-10: VALUE AMOUNT & CODE (CM) optional repeating *
  • UB1-11: NUMBER OF GRACE DAYS (90) (ST) optional *
  • UB1-12: SPEC. PROG. INDICATOR(44) (ID) optional *
  • UB1-13: PSRO/UR APPROVAL IND. (87) (ID) optional *
  • UB1-14: PSRO/UR APRVD STAY-FM(88) (DT) optional *
  • UB1-15: PSRO/UR APRVD STAY-TO(89) (DT) optional *
  • UB1-16: OCCURRENCE (28-32) (ID) optional repeating *
  • UB1-17: OCCURRENCE SPAN (33) (ID) optional *
  • UB1-18: OCCURRENCE SPAN START DATE(33) (DT) optional *
  • UB1-19: OCCUR. 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(ST.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "BLOOD DEDUCTIBLE"); this.add(ST.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "BLOOD FURN.-PINTS OF (40)"); this.add(ST.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "BLOOD REPLACED-PINTS (41)"); this.add(ST.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "BLOOD NOT RPLCD-PINTS(42)"); this.add(ST.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"); this.add(ST.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "COVERED DAYS - (23)"); this.add(ST.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "NON COVERED DAYS - (24)"); this.add(CM.class, false, 8, 12, new Object[]{ getMessage(), new Integer(0) }, "VALUE AMOUNT & CODE"); this.add(ST.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() }, "SPEC. PROG. INDICATOR(44)"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "PSRO/UR APPROVAL IND. (87)"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "PSRO/UR APRVD STAY-FM(88)"); this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "PSRO/UR APRVD STAY-TO(89)"); this.add(ID.class, false, 5, 20, new Object[]{ getMessage() }, "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) }, "OCCUR. 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" - creates it if necessary */ public ST getBLOODDEDUCTIBLE() { ST ret = null; try { Type t = this.getField(2, 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-2: "BLOOD DEDUCTIBLE" - creates it if necessary */ public ST getUb12_BLOODDEDUCTIBLE() { ST ret = null; try { Type t = this.getField(2, 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-3: "BLOOD FURN.-PINTS OF (40)" - creates it if necessary */ public ST getBLOODFURNPINTSOF() { ST ret = null; try { Type t = this.getField(3, 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-3: "BLOOD FURN.-PINTS OF (40)" - creates it if necessary */ public ST getUb13_BLOODFURNPINTSOF() { ST ret = null; try { Type t = this.getField(3, 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-4: "BLOOD REPLACED-PINTS (41)" - creates it if necessary */ public ST getBLOODREPLACEDPINTS() { ST ret = null; try { Type t = this.getField(4, 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-4: "BLOOD REPLACED-PINTS (41)" - creates it if necessary */ public ST getUb14_BLOODREPLACEDPINTS() { ST ret = null; try { Type t = this.getField(4, 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-5: "BLOOD NOT RPLCD-PINTS(42)" - creates it if necessary */ public ST getBLOODNOTRPLCDPINTS() { ST ret = null; try { Type t = this.getField(5, 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-5: "BLOOD NOT RPLCD-PINTS(42)" - creates it if necessary */ public ST getUb15_BLOODNOTRPLCDPINTS() { ST ret = null; try { Type t = this.getField(5, 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-6: "CO-INSURANCE DAYS (25)" - creates it if necessary */ public ST getCOINSURANCEDAYS() { ST ret = null; try { Type t = this.getField(6, 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-6: "CO-INSURANCE DAYS (25)" - creates it if necessary */ public ST getUb16_COINSURANCEDAYS() { ST ret = null; try { Type t = this.getField(6, 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 all repetitions of CONDITION CODE (UB1-7). */ public ID[] getCONDITIONCODE() { 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 specific repetition of * UB1-7: "CONDITION CODE" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getCONDITIONCODE(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" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getUb17_CONDITIONCODE(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; } /** * Inserts a repetition of * UB1-7: "CONDITION CODE" 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 insertCONDITIONCODE(int rep) throws HL7Exception { return (ID) super.insertRepetition(7, rep); } /** * Inserts a repetition of * UB1-7: "CONDITION CODE" 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_CONDITIONCODE(int rep) throws HL7Exception { return (ID) super.insertRepetition(7, rep); } /** * Removes a repetition of * UB1-7: "CONDITION CODE" 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 removeCONDITIONCODE(int rep) throws HL7Exception { return (ID) super.removeRepetition(7, rep); } /** * Removes a repetition of * UB1-7: "CONDITION CODE" 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_CONDITIONCODE(int rep) throws HL7Exception { return (ID) super.removeRepetition(7, rep); } /** * Returns * UB1-8: "COVERED DAYS - (23)" - creates it if necessary */ public ST getCOVEREDDAYS() { ST ret = null; try { Type t = this.getField(8, 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-8: "COVERED DAYS - (23)" - creates it if necessary */ public ST getUb18_COVEREDDAYS() { ST ret = null; try { Type t = this.getField(8, 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-9: "NON COVERED DAYS - (24)" - creates it if necessary */ public ST getNONCOVEREDDAYS() { ST ret = null; try { Type t = this.getField(9, 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-9: "NON COVERED DAYS - (24)" - creates it if necessary */ public ST getUb19_NONCOVEREDDAYS() { ST ret = null; try { Type t = this.getField(9, 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 all repetitions of VALUE AMOUNT & CODE (UB1-10). */ public CM[] getVALUEAMOUNTCODE() { CM[] ret = null; try { Type[] t = this.getField(10); ret = new CM[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (CM)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 specific repetition of * UB1-10: "VALUE AMOUNT & CODE" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CM getVALUEAMOUNTCODE(int rep) { CM ret = null; try { Type t = this.getField(10, rep); ret = (CM)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 & CODE" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CM getUb110_VALUEAMOUNTCODE(int rep) { CM ret = null; try { Type t = this.getField(10, rep); ret = (CM)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; } /** * Inserts a repetition of * UB1-10: "VALUE AMOUNT & CODE" 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 insertVALUEAMOUNTCODE(int rep) throws HL7Exception { return (CM) super.insertRepetition(10, rep); } /** * Inserts a repetition of * UB1-10: "VALUE AMOUNT & CODE" 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 insertUb110_VALUEAMOUNTCODE(int rep) throws HL7Exception { return (CM) super.insertRepetition(10, rep); } /** * Removes a repetition of * UB1-10: "VALUE AMOUNT & CODE" 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 removeVALUEAMOUNTCODE(int rep) throws HL7Exception { return (CM) super.removeRepetition(10, rep); } /** * Removes a repetition of * UB1-10: "VALUE AMOUNT & CODE" 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 removeUb110_VALUEAMOUNTCODE(int rep) throws HL7Exception { return (CM) super.removeRepetition(10, rep); } /** * Returns * UB1-11: "NUMBER OF GRACE DAYS (90)" - creates it if necessary */ public ST getNUMBEROFGRACEDAYS() { ST ret = null; try { Type t = this.getField(11, 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-11: "NUMBER OF GRACE DAYS (90)" - creates it if necessary */ public ST getUb111_NUMBEROFGRACEDAYS() { ST ret = null; try { Type t = this.getField(11, 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-12: "SPEC. PROG. INDICATOR(44)" - creates it if necessary */ public ID getSPECPROGINDICATOR() { 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: "SPEC. PROG. INDICATOR(44)" - creates it if necessary */ public ID getUb112_SPECPROGINDICATOR() { 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 IND. (87)" - creates it if necessary */ public ID getPSROURAPPROVALIND() { 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 IND. (87)" - creates it if necessary */ public ID getUb113_PSROURAPPROVALIND() { 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 APRVD STAY-FM(88)" - creates it if necessary */ public DT getPSROURAPRVDSTAYFM() { 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 APRVD STAY-FM(88)" - creates it if necessary */ public DT getUb114_PSROURAPRVDSTAYFM() { 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 APRVD STAY-TO(89)" - creates it if necessary */ public DT getPSROURAPRVDSTAYTO() { 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 APRVD STAY-TO(89)" - creates it if necessary */ public DT getUb115_PSROURAPRVDSTAYTO() { 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 ID[] getOCCURRENCE2832() { ID[] ret = null; try { Type[] t = this.getField(16); 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 specific repetition of * UB1-16: "OCCURRENCE (28-32)" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getOCCURRENCE2832(int rep) { ID ret = null; try { Type t = this.getField(16, 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-16: "OCCURRENCE (28-32)" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ID getUb116_OCCURRENCE2832(int rep) { ID ret = null; try { Type t = this.getField(16, 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; } /** * 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 ID insertOCCURRENCE2832(int rep) throws HL7Exception { return (ID) 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 ID insertUb116_OCCURRENCE2832(int rep) throws HL7Exception { return (ID) 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 ID removeOCCURRENCE2832(int rep) throws HL7Exception { return (ID) 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 ID removeUb116_OCCURRENCE2832(int rep) throws HL7Exception { return (ID) 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: "OCCUR. SPAN END DATE (33)" - creates it if necessary */ public DT getOCCURSPANENDDATE() { 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: "OCCUR. SPAN END DATE (33)" - creates it if necessary */ public DT getUb119_OCCURSPANENDDATE() { 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 ST(getMessage()); case 2: return new ST(getMessage()); case 3: return new ST(getMessage()); case 4: return new ST(getMessage()); case 5: return new ST(getMessage()); case 6: return new ID(getMessage(), new Integer( 43 )); case 7: return new ST(getMessage()); case 8: return new ST(getMessage()); case 9: return new CM(getMessage()); case 10: return new ST(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 ID(getMessage(), new Integer( 0 )); 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