ca.uhn.hl7v2.model.v25.segment.UB2 Maven / Gradle / Ivy
/*
* 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.v25.segment;
// import ca.uhn.hl7v2.model.v25.group.*;
import ca.uhn.hl7v2.model.v25.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 UB2 message segment (UB92 Data).
* This segment has the following fields:
*
* - UB2-1: Set ID - UB2 (SI) optional
*
- UB2-2: Co-Insurance Days (9) (ST) optional
*
- UB2-3: Condition Code (24-30) (IS) optional repeating
*
- UB2-4: Covered Days (7) (ST) optional
*
- UB2-5: Non-Covered Days (8) (ST) optional
*
- UB2-6: Value Amount & Code (UVC) optional repeating
*
- UB2-7: Occurrence Code & Date (32-35) (OCD) optional repeating
*
- UB2-8: Occurrence Span Code/Dates (36) (OSP) optional repeating
*
- UB2-9: UB92 Locator 2 (State) (ST) optional repeating
*
- UB2-10: UB92 Locator 11 (State) (ST) optional repeating
*
- UB2-11: UB92 Locator 31 (National) (ST) optional
*
- UB2-12: Document Control Number (ST) optional repeating
*
- UB2-13: UB92 Locator 49 (National) (ST) optional repeating
*
- UB2-14: UB92 Locator 56 (State) (ST) optional repeating
*
- UB2-15: UB92 Locator 57 (National) (ST) optional
*
- UB2-16: UB92 Locator 78 (State) (ST) optional repeating
*
- UB2-17: Special Visit Count (NM) optional
*
*/
public class UB2 extends AbstractSegment {
/**
* Creates a new UB2 segment
*/
public UB2(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 - UB2");
this.add(ST.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Co-Insurance Days (9)");
this.add(IS.class, false, 0, 2, new Object[]{ getMessage() }, "Condition Code (24-30)");
this.add(ST.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Covered Days (7)");
this.add(ST.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Non-Covered Days (8)");
this.add(UVC.class, false, 0, 41, new Object[]{ getMessage(), new Integer(0) }, "Value Amount & Code");
this.add(OCD.class, false, 0, 259, new Object[]{ getMessage(), new Integer(0) }, "Occurrence Code & Date (32-35)");
this.add(OSP.class, false, 0, 268, new Object[]{ getMessage(), new Integer(0) }, "Occurrence Span Code/Dates (36)");
this.add(ST.class, false, 0, 29, new Object[]{ getMessage(), new Integer(0) }, "UB92 Locator 2 (State)");
this.add(ST.class, false, 0, 12, new Object[]{ getMessage(), new Integer(0) }, "UB92 Locator 11 (State)");
this.add(ST.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "UB92 Locator 31 (National)");
this.add(ST.class, false, 0, 23, new Object[]{ getMessage(), new Integer(0) }, "Document Control Number");
this.add(ST.class, false, 0, 4, new Object[]{ getMessage(), new Integer(0) }, "UB92 Locator 49 (National)");
this.add(ST.class, false, 0, 14, new Object[]{ getMessage(), new Integer(0) }, "UB92 Locator 56 (State)");
this.add(ST.class, false, 1, 27, new Object[]{ getMessage(), new Integer(0) }, "UB92 Locator 57 (National)");
this.add(ST.class, false, 0, 2, new Object[]{ getMessage(), new Integer(0) }, "UB92 Locator 78 (State)");
this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Special Visit Count");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating UB2 - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* UB2-1: "Set ID - UB2" - creates it if necessary
*/
public SI getSetIDUB2() {
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
* UB2-1: "Set ID - UB2" - creates it if necessary
*/
public SI getUb21_SetIDUB2() {
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
* UB2-2: "Co-Insurance Days (9)" - creates it if necessary
*/
public ST getCoInsuranceDays9() {
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
* UB2-2: "Co-Insurance Days (9)" - creates it if necessary
*/
public ST getUb22_CoInsuranceDays9() {
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 all repetitions of Condition Code (24-30) (UB2-3).
*/
public IS[] getConditionCode2430() {
IS[] ret = null;
try {
Type[] t = this.getField(3);
ret = new IS[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (IS)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 (24-30) (UB2-3).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getConditionCode2430Reps() {
IS[] ret = null;
try {
Type[] t = this.getField(3);
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
* UB2-3: "Condition Code (24-30)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public IS getConditionCode2430(int rep) {
IS ret = null;
try {
Type t = this.getField(3, rep);
ret = (IS)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
* UB2-3: "Condition Code (24-30)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public IS getUb23_ConditionCode2430(int rep) {
IS ret = null;
try {
Type t = this.getField(3, rep);
ret = (IS)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 (24-30) (UB2-3).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb23_ConditionCode2430Reps() {
IS[] ret = null;
try {
Type[] t = this.getField(3);
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
* UB2-3: "Condition Code (24-30)" 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 IS insertConditionCode2430(int rep) throws HL7Exception {
return (IS) super.insertRepetition(3, rep);
}
/**
* Inserts a repetition of
* UB2-3: "Condition Code (24-30)" 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 IS insertUb23_ConditionCode2430(int rep) throws HL7Exception {
return (IS) super.insertRepetition(3, rep);
}
/**
* Removes a repetition of
* UB2-3: "Condition Code (24-30)" 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 IS removeConditionCode2430(int rep) throws HL7Exception {
return (IS) super.removeRepetition(3, rep);
}
/**
* Removes a repetition of
* UB2-3: "Condition Code (24-30)" 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 IS removeUb23_ConditionCode2430(int rep) throws HL7Exception {
return (IS) super.removeRepetition(3, rep);
}
/**
* Returns
* UB2-4: "Covered Days (7)" - creates it if necessary
*/
public ST getCoveredDays7() {
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
* UB2-4: "Covered Days (7)" - creates it if necessary
*/
public ST getUb24_CoveredDays7() {
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
* UB2-5: "Non-Covered Days (8)" - creates it if necessary
*/
public ST getNonCoveredDays8() {
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
* UB2-5: "Non-Covered Days (8)" - creates it if necessary
*/
public ST getUb25_NonCoveredDays8() {
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 all repetitions of Value Amount & Code (UB2-6).
*/
public UVC[] getValueAmountCode() {
UVC[] ret = null;
try {
Type[] t = this.getField(6);
ret = new UVC[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (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 & Code (UB2-6).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getValueAmountCodeReps() {
UVC[] ret = null;
try {
Type[] t = this.getField(6);
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
* UB2-6: "Value Amount & Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public UVC getValueAmountCode(int rep) {
UVC ret = null;
try {
Type t = this.getField(6, rep);
ret = (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
* UB2-6: "Value Amount & Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public UVC getUb26_ValueAmountCode(int rep) {
UVC ret = null;
try {
Type t = this.getField(6, rep);
ret = (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 & Code (UB2-6).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb26_ValueAmountCodeReps() {
UVC[] ret = null;
try {
Type[] t = this.getField(6);
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
* UB2-6: "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 UVC insertValueAmountCode(int rep) throws HL7Exception {
return (UVC) super.insertRepetition(6, rep);
}
/**
* Inserts a repetition of
* UB2-6: "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 UVC insertUb26_ValueAmountCode(int rep) throws HL7Exception {
return (UVC) super.insertRepetition(6, rep);
}
/**
* Removes a repetition of
* UB2-6: "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 UVC removeValueAmountCode(int rep) throws HL7Exception {
return (UVC) super.removeRepetition(6, rep);
}
/**
* Removes a repetition of
* UB2-6: "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 UVC removeUb26_ValueAmountCode(int rep) throws HL7Exception {
return (UVC) super.removeRepetition(6, rep);
}
/**
* Returns all repetitions of Occurrence Code & Date (32-35) (UB2-7).
*/
public OCD[] getOccurrenceCodeDate3235() {
OCD[] ret = null;
try {
Type[] t = this.getField(7);
ret = new OCD[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (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 Code & Date (32-35) (UB2-7).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getOccurrenceCodeDate3235Reps() {
OCD[] 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
* UB2-7: "Occurrence Code & Date (32-35)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public OCD getOccurrenceCodeDate3235(int rep) {
OCD ret = null;
try {
Type t = this.getField(7, rep);
ret = (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
* UB2-7: "Occurrence Code & Date (32-35)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public OCD getUb27_OccurrenceCodeDate3235(int rep) {
OCD ret = null;
try {
Type t = this.getField(7, rep);
ret = (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 Code & Date (32-35) (UB2-7).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb27_OccurrenceCodeDate3235Reps() {
OCD[] 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
* UB2-7: "Occurrence Code & Date (32-35)" 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 OCD insertOccurrenceCodeDate3235(int rep) throws HL7Exception {
return (OCD) super.insertRepetition(7, rep);
}
/**
* Inserts a repetition of
* UB2-7: "Occurrence Code & Date (32-35)" 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 OCD insertUb27_OccurrenceCodeDate3235(int rep) throws HL7Exception {
return (OCD) super.insertRepetition(7, rep);
}
/**
* Removes a repetition of
* UB2-7: "Occurrence Code & Date (32-35)" 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 OCD removeOccurrenceCodeDate3235(int rep) throws HL7Exception {
return (OCD) super.removeRepetition(7, rep);
}
/**
* Removes a repetition of
* UB2-7: "Occurrence Code & Date (32-35)" 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 OCD removeUb27_OccurrenceCodeDate3235(int rep) throws HL7Exception {
return (OCD) super.removeRepetition(7, rep);
}
/**
* Returns all repetitions of Occurrence Span Code/Dates (36) (UB2-8).
*/
public OSP[] getOccurrenceSpanCodeDates() {
OSP[] ret = null;
try {
Type[] t = this.getField(8);
ret = new OSP[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (OSP)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 Span Code/Dates (36) (UB2-8).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getOccurrenceSpanCodeDatesReps() {
OSP[] ret = null;
try {
Type[] t = this.getField(8);
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
* UB2-8: "Occurrence Span Code/Dates (36)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public OSP getOccurrenceSpanCodeDates(int rep) {
OSP ret = null;
try {
Type t = this.getField(8, rep);
ret = (OSP)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
* UB2-8: "Occurrence Span Code/Dates (36)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public OSP getUb28_OccurrenceSpanCodeDates(int rep) {
OSP ret = null;
try {
Type t = this.getField(8, rep);
ret = (OSP)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 Span Code/Dates (36) (UB2-8).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb28_OccurrenceSpanCodeDatesReps() {
OSP[] ret = null;
try {
Type[] t = this.getField(8);
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
* UB2-8: "Occurrence Span Code/Dates (36)" 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 OSP insertOccurrenceSpanCodeDates(int rep) throws HL7Exception {
return (OSP) super.insertRepetition(8, rep);
}
/**
* Inserts a repetition of
* UB2-8: "Occurrence Span Code/Dates (36)" 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 OSP insertUb28_OccurrenceSpanCodeDates(int rep) throws HL7Exception {
return (OSP) super.insertRepetition(8, rep);
}
/**
* Removes a repetition of
* UB2-8: "Occurrence Span Code/Dates (36)" 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 OSP removeOccurrenceSpanCodeDates(int rep) throws HL7Exception {
return (OSP) super.removeRepetition(8, rep);
}
/**
* Removes a repetition of
* UB2-8: "Occurrence Span Code/Dates (36)" 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 OSP removeUb28_OccurrenceSpanCodeDates(int rep) throws HL7Exception {
return (OSP) super.removeRepetition(8, rep);
}
/**
* Returns all repetitions of UB92 Locator 2 (State) (UB2-9).
*/
public ST[] getUB92Locator2State() {
ST[] ret = null;
try {
Type[] t = this.getField(9);
ret = new ST[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ST)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 UB92 Locator 2 (State) (UB2-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUB92Locator2StateReps() {
ST[] ret = null;
try {
Type[] t = this.getField(9);
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
* UB2-9: "UB92 Locator 2 (State)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUB92Locator2State(int rep) {
ST ret = null;
try {
Type t = this.getField(9, rep);
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 a specific repetition of
* UB2-9: "UB92 Locator 2 (State)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUb29_UB92Locator2State(int rep) {
ST ret = null;
try {
Type t = this.getField(9, rep);
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 a count of the current number of repetitions of UB92 Locator 2 (State) (UB2-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb29_UB92Locator2StateReps() {
ST[] ret = null;
try {
Type[] t = this.getField(9);
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
* UB2-9: "UB92 Locator 2 (State)" 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 ST insertUB92Locator2State(int rep) throws HL7Exception {
return (ST) super.insertRepetition(9, rep);
}
/**
* Inserts a repetition of
* UB2-9: "UB92 Locator 2 (State)" 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 ST insertUb29_UB92Locator2State(int rep) throws HL7Exception {
return (ST) super.insertRepetition(9, rep);
}
/**
* Removes a repetition of
* UB2-9: "UB92 Locator 2 (State)" 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 ST removeUB92Locator2State(int rep) throws HL7Exception {
return (ST) super.removeRepetition(9, rep);
}
/**
* Removes a repetition of
* UB2-9: "UB92 Locator 2 (State)" 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 ST removeUb29_UB92Locator2State(int rep) throws HL7Exception {
return (ST) super.removeRepetition(9, rep);
}
/**
* Returns all repetitions of UB92 Locator 11 (State) (UB2-10).
*/
public ST[] getUB92Locator11State() {
ST[] ret = null;
try {
Type[] t = this.getField(10);
ret = new ST[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ST)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 UB92 Locator 11 (State) (UB2-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUB92Locator11StateReps() {
ST[] 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
* UB2-10: "UB92 Locator 11 (State)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUB92Locator11State(int rep) {
ST ret = null;
try {
Type t = this.getField(10, rep);
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 a specific repetition of
* UB2-10: "UB92 Locator 11 (State)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUb210_UB92Locator11State(int rep) {
ST ret = null;
try {
Type t = this.getField(10, rep);
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 a count of the current number of repetitions of UB92 Locator 11 (State) (UB2-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb210_UB92Locator11StateReps() {
ST[] 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
* UB2-10: "UB92 Locator 11 (State)" 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 ST insertUB92Locator11State(int rep) throws HL7Exception {
return (ST) super.insertRepetition(10, rep);
}
/**
* Inserts a repetition of
* UB2-10: "UB92 Locator 11 (State)" 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 ST insertUb210_UB92Locator11State(int rep) throws HL7Exception {
return (ST) super.insertRepetition(10, rep);
}
/**
* Removes a repetition of
* UB2-10: "UB92 Locator 11 (State)" 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 ST removeUB92Locator11State(int rep) throws HL7Exception {
return (ST) super.removeRepetition(10, rep);
}
/**
* Removes a repetition of
* UB2-10: "UB92 Locator 11 (State)" 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 ST removeUb210_UB92Locator11State(int rep) throws HL7Exception {
return (ST) super.removeRepetition(10, rep);
}
/**
* Returns
* UB2-11: "UB92 Locator 31 (National)" - creates it if necessary
*/
public ST getUB92Locator31National() {
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
* UB2-11: "UB92 Locator 31 (National)" - creates it if necessary
*/
public ST getUb211_UB92Locator31National() {
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 all repetitions of Document Control Number (UB2-12).
*/
public ST[] getDocumentControlNumber() {
ST[] ret = null;
try {
Type[] t = this.getField(12);
ret = new ST[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ST)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 Document Control Number (UB2-12).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getDocumentControlNumberReps() {
ST[] ret = null;
try {
Type[] t = this.getField(12);
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
* UB2-12: "Document Control Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getDocumentControlNumber(int rep) {
ST ret = null;
try {
Type t = this.getField(12, rep);
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 a specific repetition of
* UB2-12: "Document Control Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUb212_DocumentControlNumber(int rep) {
ST ret = null;
try {
Type t = this.getField(12, rep);
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 a count of the current number of repetitions of Document Control Number (UB2-12).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb212_DocumentControlNumberReps() {
ST[] ret = null;
try {
Type[] t = this.getField(12);
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
* UB2-12: "Document Control Number" 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 ST insertDocumentControlNumber(int rep) throws HL7Exception {
return (ST) super.insertRepetition(12, rep);
}
/**
* Inserts a repetition of
* UB2-12: "Document Control Number" 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 ST insertUb212_DocumentControlNumber(int rep) throws HL7Exception {
return (ST) super.insertRepetition(12, rep);
}
/**
* Removes a repetition of
* UB2-12: "Document Control Number" 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 ST removeDocumentControlNumber(int rep) throws HL7Exception {
return (ST) super.removeRepetition(12, rep);
}
/**
* Removes a repetition of
* UB2-12: "Document Control Number" 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 ST removeUb212_DocumentControlNumber(int rep) throws HL7Exception {
return (ST) super.removeRepetition(12, rep);
}
/**
* Returns all repetitions of UB92 Locator 49 (National) (UB2-13).
*/
public ST[] getUB92Locator49National() {
ST[] ret = null;
try {
Type[] t = this.getField(13);
ret = new ST[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ST)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 UB92 Locator 49 (National) (UB2-13).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUB92Locator49NationalReps() {
ST[] ret = null;
try {
Type[] t = this.getField(13);
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
* UB2-13: "UB92 Locator 49 (National)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUB92Locator49National(int rep) {
ST ret = null;
try {
Type t = this.getField(13, rep);
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 a specific repetition of
* UB2-13: "UB92 Locator 49 (National)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUb213_UB92Locator49National(int rep) {
ST ret = null;
try {
Type t = this.getField(13, rep);
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 a count of the current number of repetitions of UB92 Locator 49 (National) (UB2-13).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb213_UB92Locator49NationalReps() {
ST[] ret = null;
try {
Type[] t = this.getField(13);
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
* UB2-13: "UB92 Locator 49 (National)" 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 ST insertUB92Locator49National(int rep) throws HL7Exception {
return (ST) super.insertRepetition(13, rep);
}
/**
* Inserts a repetition of
* UB2-13: "UB92 Locator 49 (National)" 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 ST insertUb213_UB92Locator49National(int rep) throws HL7Exception {
return (ST) super.insertRepetition(13, rep);
}
/**
* Removes a repetition of
* UB2-13: "UB92 Locator 49 (National)" 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 ST removeUB92Locator49National(int rep) throws HL7Exception {
return (ST) super.removeRepetition(13, rep);
}
/**
* Removes a repetition of
* UB2-13: "UB92 Locator 49 (National)" 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 ST removeUb213_UB92Locator49National(int rep) throws HL7Exception {
return (ST) super.removeRepetition(13, rep);
}
/**
* Returns all repetitions of UB92 Locator 56 (State) (UB2-14).
*/
public ST[] getUB92Locator56State() {
ST[] ret = null;
try {
Type[] t = this.getField(14);
ret = new ST[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ST)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 UB92 Locator 56 (State) (UB2-14).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUB92Locator56StateReps() {
ST[] ret = null;
try {
Type[] t = this.getField(14);
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
* UB2-14: "UB92 Locator 56 (State)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUB92Locator56State(int rep) {
ST ret = null;
try {
Type t = this.getField(14, rep);
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 a specific repetition of
* UB2-14: "UB92 Locator 56 (State)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUb214_UB92Locator56State(int rep) {
ST ret = null;
try {
Type t = this.getField(14, rep);
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 a count of the current number of repetitions of UB92 Locator 56 (State) (UB2-14).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb214_UB92Locator56StateReps() {
ST[] ret = null;
try {
Type[] t = this.getField(14);
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
* UB2-14: "UB92 Locator 56 (State)" 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 ST insertUB92Locator56State(int rep) throws HL7Exception {
return (ST) super.insertRepetition(14, rep);
}
/**
* Inserts a repetition of
* UB2-14: "UB92 Locator 56 (State)" 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 ST insertUb214_UB92Locator56State(int rep) throws HL7Exception {
return (ST) super.insertRepetition(14, rep);
}
/**
* Removes a repetition of
* UB2-14: "UB92 Locator 56 (State)" 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 ST removeUB92Locator56State(int rep) throws HL7Exception {
return (ST) super.removeRepetition(14, rep);
}
/**
* Removes a repetition of
* UB2-14: "UB92 Locator 56 (State)" 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 ST removeUb214_UB92Locator56State(int rep) throws HL7Exception {
return (ST) super.removeRepetition(14, rep);
}
/**
* Returns
* UB2-15: "UB92 Locator 57 (National)" - creates it if necessary
*/
public ST getUB92Locator57National() {
ST ret = null;
try {
Type t = this.getField(15, 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
* UB2-15: "UB92 Locator 57 (National)" - creates it if necessary
*/
public ST getUb215_UB92Locator57National() {
ST ret = null;
try {
Type t = this.getField(15, 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 UB92 Locator 78 (State) (UB2-16).
*/
public ST[] getUB92Locator78State() {
ST[] ret = null;
try {
Type[] t = this.getField(16);
ret = new ST[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ST)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 UB92 Locator 78 (State) (UB2-16).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUB92Locator78StateReps() {
ST[] 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
* UB2-16: "UB92 Locator 78 (State)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUB92Locator78State(int rep) {
ST ret = null;
try {
Type t = this.getField(16, rep);
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 a specific repetition of
* UB2-16: "UB92 Locator 78 (State)" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getUb216_UB92Locator78State(int rep) {
ST ret = null;
try {
Type t = this.getField(16, rep);
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 a count of the current number of repetitions of UB92 Locator 78 (State) (UB2-16).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getUb216_UB92Locator78StateReps() {
ST[] 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
* UB2-16: "UB92 Locator 78 (State)" 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 ST insertUB92Locator78State(int rep) throws HL7Exception {
return (ST) super.insertRepetition(16, rep);
}
/**
* Inserts a repetition of
* UB2-16: "UB92 Locator 78 (State)" 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 ST insertUb216_UB92Locator78State(int rep) throws HL7Exception {
return (ST) super.insertRepetition(16, rep);
}
/**
* Removes a repetition of
* UB2-16: "UB92 Locator 78 (State)" 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 ST removeUB92Locator78State(int rep) throws HL7Exception {
return (ST) super.removeRepetition(16, rep);
}
/**
* Removes a repetition of
* UB2-16: "UB92 Locator 78 (State)" 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 ST removeUb216_UB92Locator78State(int rep) throws HL7Exception {
return (ST) super.removeRepetition(16, rep);
}
/**
* Returns
* UB2-17: "Special Visit Count" - creates it if necessary
*/
public NM getSpecialVisitCount() {
NM ret = null;
try {
Type t = this.getField(17, 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
* UB2-17: "Special Visit Count" - creates it if necessary
*/
public NM getUb217_SpecialVisitCount() {
NM ret = null;
try {
Type t = this.getField(17, 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;
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new SI(getMessage());
case 1: return new ST(getMessage());
case 2: return new IS(getMessage(), new Integer( 43 ));
case 3: return new ST(getMessage());
case 4: return new ST(getMessage());
case 5: return new UVC(getMessage());
case 6: return new OCD(getMessage());
case 7: return new OSP(getMessage());
case 8: return new ST(getMessage());
case 9: return new ST(getMessage());
case 10: return new ST(getMessage());
case 11: return new ST(getMessage());
case 12: return new ST(getMessage());
case 13: return new ST(getMessage());
case 14: return new ST(getMessage());
case 15: return new ST(getMessage());
case 16: return new NM(getMessage());
default: return null;
}
}
}