ca.uhn.hl7v2.model.v22.segment.STF 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.v22.segment;
// import ca.uhn.hl7v2.model.v22.group.*;
import ca.uhn.hl7v2.model.v22.datatype.*;
import ca.uhn.log.HapiLogFactory;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
import ca.uhn.hl7v2.model.AbstractMessage;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Varies;
/**
*Represents an HL7 STF message segment (staff identification segment).
* This segment has the following fields:
*
* - STF-1: STF - primary key value (CE)
*
- STF-2: Staff ID Code (CE) optional repeating
*
- STF-3: Staff Name (PN) optional
*
- STF-4: Staff Type (ID) optional repeating
*
- STF-5: Sex (ID) optional
*
- STF-6: Date of Birth (TS) optional
*
- STF-7: Active / inactive (ID) optional
*
- STF-8: Department (CE) optional repeating
*
- STF-9: Service (CE) optional repeating
*
- STF-10: Phone (TN) optional repeating
*
- STF-11: Office / home address (AD) optional repeating
*
- STF-12: Activation Date (CM_DIN) optional repeating
*
- STF-13: Inactivation Date (CM_DIN) optional repeating
*
- STF-14: Backup Person ID (CE) optional repeating
*
- STF-15: E-mail Address (ST) optional repeating
*
- STF-16: Preferred method of Contact (ID) optional
*
*/
public class STF extends AbstractSegment {
/**
* Creates a new STF segment
*/
public STF(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(CE.class, true, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "STF - primary key value");
this.add(CE.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Staff ID Code");
this.add(PN.class, false, 1, 48, new Object[]{ getMessage(), new Integer(0) }, "Staff Name");
this.add(ID.class, false, 0, 2, new Object[]{ getMessage() }, "Staff Type");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Sex");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date of Birth");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Active / inactive");
this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(184) }, "Department");
this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Service");
this.add(TN.class, false, 0, 40, new Object[]{ getMessage(), new Integer(0) }, "Phone");
this.add(AD.class, false, 2, 106, new Object[]{ getMessage(), new Integer(0) }, "Office / home address");
this.add(CM_DIN.class, false, 0, 19, new Object[]{ getMessage(), new Integer(0) }, "Activation Date");
this.add(CM_DIN.class, false, 0, 19, new Object[]{ getMessage(), new Integer(0) }, "Inactivation Date");
this.add(CE.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Backup Person ID");
this.add(ST.class, false, 0, 40, new Object[]{ getMessage(), new Integer(0) }, "E-mail Address");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Preferred method of Contact");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating STF - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* STF-1: "STF - primary key value" - creates it if necessary
*/
public CE getSTFPrimaryKeyValue() {
CE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CE)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
* STF-1: "STF - primary key value" - creates it if necessary
*/
public CE getStf1_STFPrimaryKeyValue() {
CE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CE)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 Staff ID Code (STF-2).
*/
public CE[] getStaffIDCode() {
CE[] ret = null;
try {
Type[] t = this.getField(2);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)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 Staff ID Code (STF-2).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStaffIDCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(2);
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
* STF-2: "Staff ID Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getStaffIDCode(int rep) {
CE ret = null;
try {
Type t = this.getField(2, rep);
ret = (CE)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
* STF-2: "Staff ID Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getStf2_StaffIDCode(int rep) {
CE ret = null;
try {
Type t = this.getField(2, rep);
ret = (CE)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 Staff ID Code (STF-2).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf2_StaffIDCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(2);
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
* STF-2: "Staff ID 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 CE insertStaffIDCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(2, rep);
}
/**
* Inserts a repetition of
* STF-2: "Staff ID 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 CE insertStf2_StaffIDCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(2, rep);
}
/**
* Removes a repetition of
* STF-2: "Staff ID 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 CE removeStaffIDCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(2, rep);
}
/**
* Removes a repetition of
* STF-2: "Staff ID 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 CE removeStf2_StaffIDCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(2, rep);
}
/**
* Returns
* STF-3: "Staff Name" - creates it if necessary
*/
public PN getStaffName() {
PN ret = null;
try {
Type t = this.getField(3, 0);
ret = (PN)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
* STF-3: "Staff Name" - creates it if necessary
*/
public PN getStf3_StaffName() {
PN ret = null;
try {
Type t = this.getField(3, 0);
ret = (PN)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 Staff Type (STF-4).
*/
public ID[] getStaffType() {
ID[] ret = null;
try {
Type[] t = this.getField(4);
ret = new ID[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ID)t[i];
}
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Staff Type (STF-4).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStaffTypeReps() {
ID[] ret = null;
try {
Type[] t = this.getField(4);
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
* STF-4: "Staff Type" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ID getStaffType(int rep) {
ID ret = null;
try {
Type t = this.getField(4, 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
* STF-4: "Staff Type" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ID getStf4_StaffType(int rep) {
ID ret = null;
try {
Type t = this.getField(4, rep);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Staff Type (STF-4).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf4_StaffTypeReps() {
ID[] ret = null;
try {
Type[] t = this.getField(4);
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
* STF-4: "Staff Type" 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 insertStaffType(int rep) throws HL7Exception {
return (ID) super.insertRepetition(4, rep);
}
/**
* Inserts a repetition of
* STF-4: "Staff Type" 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 insertStf4_StaffType(int rep) throws HL7Exception {
return (ID) super.insertRepetition(4, rep);
}
/**
* Removes a repetition of
* STF-4: "Staff Type" 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 removeStaffType(int rep) throws HL7Exception {
return (ID) super.removeRepetition(4, rep);
}
/**
* Removes a repetition of
* STF-4: "Staff Type" 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 removeStf4_StaffType(int rep) throws HL7Exception {
return (ID) super.removeRepetition(4, rep);
}
/**
* Returns
* STF-5: "Sex" - creates it if necessary
*/
public ID getSex() {
ID ret = null;
try {
Type t = this.getField(5, 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
* STF-5: "Sex" - creates it if necessary
*/
public ID getStf5_Sex() {
ID ret = null;
try {
Type t = this.getField(5, 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
* STF-6: "Date of Birth" - creates it if necessary
*/
public TS getDateOfBirth() {
TS ret = null;
try {
Type t = this.getField(6, 0);
ret = (TS)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
* STF-6: "Date of Birth" - creates it if necessary
*/
public TS getStf6_DateOfBirth() {
TS ret = null;
try {
Type t = this.getField(6, 0);
ret = (TS)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
* STF-7: "Active / inactive" - creates it if necessary
*/
public ID getActiveInactive() {
ID ret = null;
try {
Type t = this.getField(7, 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
* STF-7: "Active / inactive" - creates it if necessary
*/
public ID getStf7_ActiveInactive() {
ID ret = null;
try {
Type t = this.getField(7, 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 all repetitions of Department (STF-8).
*/
public CE[] getDepartment() {
CE[] ret = null;
try {
Type[] t = this.getField(8);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)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 Department (STF-8).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getDepartmentReps() {
CE[] 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
* STF-8: "Department" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getDepartment(int rep) {
CE ret = null;
try {
Type t = this.getField(8, rep);
ret = (CE)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
* STF-8: "Department" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getStf8_Department(int rep) {
CE ret = null;
try {
Type t = this.getField(8, rep);
ret = (CE)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 Department (STF-8).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf8_DepartmentReps() {
CE[] 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
* STF-8: "Department" 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 CE insertDepartment(int rep) throws HL7Exception {
return (CE) super.insertRepetition(8, rep);
}
/**
* Inserts a repetition of
* STF-8: "Department" 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 CE insertStf8_Department(int rep) throws HL7Exception {
return (CE) super.insertRepetition(8, rep);
}
/**
* Removes a repetition of
* STF-8: "Department" 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 CE removeDepartment(int rep) throws HL7Exception {
return (CE) super.removeRepetition(8, rep);
}
/**
* Removes a repetition of
* STF-8: "Department" 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 CE removeStf8_Department(int rep) throws HL7Exception {
return (CE) super.removeRepetition(8, rep);
}
/**
* Returns all repetitions of Service (STF-9).
*/
public CE[] getService() {
CE[] ret = null;
try {
Type[] t = this.getField(9);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)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 Service (STF-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getServiceReps() {
CE[] 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
* STF-9: "Service" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getService(int rep) {
CE ret = null;
try {
Type t = this.getField(9, rep);
ret = (CE)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
* STF-9: "Service" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getStf9_Service(int rep) {
CE ret = null;
try {
Type t = this.getField(9, rep);
ret = (CE)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 Service (STF-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf9_ServiceReps() {
CE[] 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
* STF-9: "Service" 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 CE insertService(int rep) throws HL7Exception {
return (CE) super.insertRepetition(9, rep);
}
/**
* Inserts a repetition of
* STF-9: "Service" 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 CE insertStf9_Service(int rep) throws HL7Exception {
return (CE) super.insertRepetition(9, rep);
}
/**
* Removes a repetition of
* STF-9: "Service" 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 CE removeService(int rep) throws HL7Exception {
return (CE) super.removeRepetition(9, rep);
}
/**
* Removes a repetition of
* STF-9: "Service" 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 CE removeStf9_Service(int rep) throws HL7Exception {
return (CE) super.removeRepetition(9, rep);
}
/**
* Returns all repetitions of Phone (STF-10).
*/
public TN[] getPhone() {
TN[] ret = null;
try {
Type[] t = this.getField(10);
ret = new TN[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (TN)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 Phone (STF-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPhoneReps() {
TN[] 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
* STF-10: "Phone" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public TN getPhone(int rep) {
TN ret = null;
try {
Type t = this.getField(10, rep);
ret = (TN)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
* STF-10: "Phone" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public TN getStf10_Phone(int rep) {
TN ret = null;
try {
Type t = this.getField(10, rep);
ret = (TN)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 Phone (STF-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf10_PhoneReps() {
TN[] 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
* STF-10: "Phone" 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 TN insertPhone(int rep) throws HL7Exception {
return (TN) super.insertRepetition(10, rep);
}
/**
* Inserts a repetition of
* STF-10: "Phone" 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 TN insertStf10_Phone(int rep) throws HL7Exception {
return (TN) super.insertRepetition(10, rep);
}
/**
* Removes a repetition of
* STF-10: "Phone" 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 TN removePhone(int rep) throws HL7Exception {
return (TN) super.removeRepetition(10, rep);
}
/**
* Removes a repetition of
* STF-10: "Phone" 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 TN removeStf10_Phone(int rep) throws HL7Exception {
return (TN) super.removeRepetition(10, rep);
}
/**
* Returns all repetitions of Office / home address (STF-11).
*/
public AD[] getOfficeHomeAddress() {
AD[] ret = null;
try {
Type[] t = this.getField(11);
ret = new AD[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (AD)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 Office / home address (STF-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getOfficeHomeAddressReps() {
AD[] ret = null;
try {
Type[] t = this.getField(11);
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
* STF-11: "Office / home address" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public AD getOfficeHomeAddress(int rep) {
AD ret = null;
try {
Type t = this.getField(11, rep);
ret = (AD)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
* STF-11: "Office / home address" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public AD getStf11_OfficeHomeAddress(int rep) {
AD ret = null;
try {
Type t = this.getField(11, rep);
ret = (AD)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 Office / home address (STF-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf11_OfficeHomeAddressReps() {
AD[] ret = null;
try {
Type[] t = this.getField(11);
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
* STF-11: "Office / home address" 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 AD insertOfficeHomeAddress(int rep) throws HL7Exception {
return (AD) super.insertRepetition(11, rep);
}
/**
* Inserts a repetition of
* STF-11: "Office / home address" 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 AD insertStf11_OfficeHomeAddress(int rep) throws HL7Exception {
return (AD) super.insertRepetition(11, rep);
}
/**
* Removes a repetition of
* STF-11: "Office / home address" 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 AD removeOfficeHomeAddress(int rep) throws HL7Exception {
return (AD) super.removeRepetition(11, rep);
}
/**
* Removes a repetition of
* STF-11: "Office / home address" 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 AD removeStf11_OfficeHomeAddress(int rep) throws HL7Exception {
return (AD) super.removeRepetition(11, rep);
}
/**
* Returns all repetitions of Activation Date (STF-12).
*/
public CM_DIN[] getActivationDate() {
CM_DIN[] ret = null;
try {
Type[] t = this.getField(12);
ret = new CM_DIN[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CM_DIN)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 Activation Date (STF-12).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getActivationDateReps() {
CM_DIN[] 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
* STF-12: "Activation Date" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CM_DIN getActivationDate(int rep) {
CM_DIN ret = null;
try {
Type t = this.getField(12, rep);
ret = (CM_DIN)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
* STF-12: "Activation Date" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CM_DIN getStf12_ActivationDate(int rep) {
CM_DIN ret = null;
try {
Type t = this.getField(12, rep);
ret = (CM_DIN)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 Activation Date (STF-12).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf12_ActivationDateReps() {
CM_DIN[] 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
* STF-12: "Activation Date" 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_DIN insertActivationDate(int rep) throws HL7Exception {
return (CM_DIN) super.insertRepetition(12, rep);
}
/**
* Inserts a repetition of
* STF-12: "Activation Date" 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_DIN insertStf12_ActivationDate(int rep) throws HL7Exception {
return (CM_DIN) super.insertRepetition(12, rep);
}
/**
* Removes a repetition of
* STF-12: "Activation Date" 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_DIN removeActivationDate(int rep) throws HL7Exception {
return (CM_DIN) super.removeRepetition(12, rep);
}
/**
* Removes a repetition of
* STF-12: "Activation Date" 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_DIN removeStf12_ActivationDate(int rep) throws HL7Exception {
return (CM_DIN) super.removeRepetition(12, rep);
}
/**
* Returns all repetitions of Inactivation Date (STF-13).
*/
public CM_DIN[] getInactivationDate() {
CM_DIN[] ret = null;
try {
Type[] t = this.getField(13);
ret = new CM_DIN[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CM_DIN)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 Inactivation Date (STF-13).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getInactivationDateReps() {
CM_DIN[] 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
* STF-13: "Inactivation Date" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CM_DIN getInactivationDate(int rep) {
CM_DIN ret = null;
try {
Type t = this.getField(13, rep);
ret = (CM_DIN)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
* STF-13: "Inactivation Date" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CM_DIN getStf13_InactivationDate(int rep) {
CM_DIN ret = null;
try {
Type t = this.getField(13, rep);
ret = (CM_DIN)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 Inactivation Date (STF-13).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf13_InactivationDateReps() {
CM_DIN[] 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
* STF-13: "Inactivation Date" 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_DIN insertInactivationDate(int rep) throws HL7Exception {
return (CM_DIN) super.insertRepetition(13, rep);
}
/**
* Inserts a repetition of
* STF-13: "Inactivation Date" 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_DIN insertStf13_InactivationDate(int rep) throws HL7Exception {
return (CM_DIN) super.insertRepetition(13, rep);
}
/**
* Removes a repetition of
* STF-13: "Inactivation Date" 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_DIN removeInactivationDate(int rep) throws HL7Exception {
return (CM_DIN) super.removeRepetition(13, rep);
}
/**
* Removes a repetition of
* STF-13: "Inactivation Date" 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_DIN removeStf13_InactivationDate(int rep) throws HL7Exception {
return (CM_DIN) super.removeRepetition(13, rep);
}
/**
* Returns all repetitions of Backup Person ID (STF-14).
*/
public CE[] getBackupPersonID() {
CE[] ret = null;
try {
Type[] t = this.getField(14);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)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 Backup Person ID (STF-14).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getBackupPersonIDReps() {
CE[] 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
* STF-14: "Backup Person ID" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getBackupPersonID(int rep) {
CE ret = null;
try {
Type t = this.getField(14, rep);
ret = (CE)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
* STF-14: "Backup Person ID" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getStf14_BackupPersonID(int rep) {
CE ret = null;
try {
Type t = this.getField(14, rep);
ret = (CE)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 Backup Person ID (STF-14).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf14_BackupPersonIDReps() {
CE[] 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
* STF-14: "Backup Person ID" 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 CE insertBackupPersonID(int rep) throws HL7Exception {
return (CE) super.insertRepetition(14, rep);
}
/**
* Inserts a repetition of
* STF-14: "Backup Person ID" 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 CE insertStf14_BackupPersonID(int rep) throws HL7Exception {
return (CE) super.insertRepetition(14, rep);
}
/**
* Removes a repetition of
* STF-14: "Backup Person ID" 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 CE removeBackupPersonID(int rep) throws HL7Exception {
return (CE) super.removeRepetition(14, rep);
}
/**
* Removes a repetition of
* STF-14: "Backup Person ID" 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 CE removeStf14_BackupPersonID(int rep) throws HL7Exception {
return (CE) super.removeRepetition(14, rep);
}
/**
* Returns all repetitions of E-mail Address (STF-15).
*/
public ST[] getEMailAddress() {
ST[] ret = null;
try {
Type[] t = this.getField(15);
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 E-mail Address (STF-15).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getEMailAddressReps() {
ST[] ret = null;
try {
Type[] t = this.getField(15);
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
* STF-15: "E-mail Address" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getEMailAddress(int rep) {
ST ret = null;
try {
Type t = this.getField(15, 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
* STF-15: "E-mail Address" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getStf15_EMailAddress(int rep) {
ST ret = null;
try {
Type t = this.getField(15, 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 E-mail Address (STF-15).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getStf15_EMailAddressReps() {
ST[] ret = null;
try {
Type[] t = this.getField(15);
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
* STF-15: "E-mail Address" 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 insertEMailAddress(int rep) throws HL7Exception {
return (ST) super.insertRepetition(15, rep);
}
/**
* Inserts a repetition of
* STF-15: "E-mail Address" 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 insertStf15_EMailAddress(int rep) throws HL7Exception {
return (ST) super.insertRepetition(15, rep);
}
/**
* Removes a repetition of
* STF-15: "E-mail Address" 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 removeEMailAddress(int rep) throws HL7Exception {
return (ST) super.removeRepetition(15, rep);
}
/**
* Removes a repetition of
* STF-15: "E-mail Address" 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 removeStf15_EMailAddress(int rep) throws HL7Exception {
return (ST) super.removeRepetition(15, rep);
}
/**
* Returns
* STF-16: "Preferred method of Contact" - creates it if necessary
*/
public ID getPreferredMethodOfContact() {
ID ret = null;
try {
Type t = this.getField(16, 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
* STF-16: "Preferred method of Contact" - creates it if necessary
*/
public ID getStf16_PreferredMethodOfContact() {
ID ret = null;
try {
Type t = this.getField(16, 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;
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new CE(getMessage());
case 1: return new CE(getMessage());
case 2: return new PN(getMessage());
case 3: return new ID(getMessage(), new Integer( 182 ));
case 4: return new ID(getMessage(), new Integer( 1 ));
case 5: return new TS(getMessage());
case 6: return new ID(getMessage(), new Integer( 183 ));
case 7: return new CE(getMessage());
case 8: return new CE(getMessage());
case 9: return new TN(getMessage());
case 10: return new AD(getMessage());
case 11: return new CM_DIN(getMessage());
case 12: return new CM_DIN(getMessage());
case 13: return new CE(getMessage());
case 14: return new ST(getMessage());
case 15: return new ID(getMessage(), new Integer( 185 ));
default: return null;
}
}
}