ca.uhn.hl7v2.model.v26.segment.RF1 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.v26.segment;
// import ca.uhn.hl7v2.model.v26.group.*;
import ca.uhn.hl7v2.model.v26.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 RF1 message segment (Referral Information).
* This segment has the following fields:
*
* - RF1-1: Referral Status (CWE) optional
*
- RF1-2: Referral Priority (CWE) optional
*
- RF1-3: Referral Type (CWE) optional
*
- RF1-4: Referral Disposition (CWE) optional repeating
*
- RF1-5: Referral Category (CWE) optional
*
- RF1-6: Originating Referral Identifier (EI)
*
- RF1-7: Effective Date (DTM) optional
*
- RF1-8: Expiration Date (DTM) optional
*
- RF1-9: Process Date (DTM) optional
*
- RF1-10: Referral Reason (CWE) optional repeating
*
- RF1-11: External Referral Identifier (EI) optional repeating
*
- RF1-12: Referral Documentation Completion Status (CWE) optional
*
*/
public class RF1 extends AbstractSegment {
/**
* Creates a new RF1 segment
*/
public RF1(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(283) }, "Referral Status");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(280) }, "Referral Priority");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(281) }, "Referral Type");
this.add(CWE.class, false, 0, 705, new Object[]{ getMessage(), new Integer(282) }, "Referral Disposition");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(284) }, "Referral Category");
this.add(EI.class, true, 1, 30, new Object[]{ getMessage(), new Integer(0) }, "Originating Referral Identifier");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Effective Date");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Expiration Date");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Process Date");
this.add(CWE.class, false, 0, 705, new Object[]{ getMessage(), new Integer(336) }, "Referral Reason");
this.add(EI.class, false, 0, 30, new Object[]{ getMessage(), new Integer(0) }, "External Referral Identifier");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(865) }, "Referral Documentation Completion Status");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RF1 - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* RF1-1: "Referral Status" - creates it if necessary
*/
public CWE getReferralStatus() {
CWE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CWE)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
* RF1-1: "Referral Status" - creates it if necessary
*/
public CWE getRf11_ReferralStatus() {
CWE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CWE)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
* RF1-2: "Referral Priority" - creates it if necessary
*/
public CWE getReferralPriority() {
CWE ret = null;
try {
Type t = this.getField(2, 0);
ret = (CWE)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
* RF1-2: "Referral Priority" - creates it if necessary
*/
public CWE getRf12_ReferralPriority() {
CWE ret = null;
try {
Type t = this.getField(2, 0);
ret = (CWE)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
* RF1-3: "Referral Type" - creates it if necessary
*/
public CWE getReferralType() {
CWE ret = null;
try {
Type t = this.getField(3, 0);
ret = (CWE)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
* RF1-3: "Referral Type" - creates it if necessary
*/
public CWE getRf13_ReferralType() {
CWE ret = null;
try {
Type t = this.getField(3, 0);
ret = (CWE)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 Referral Disposition (RF1-4).
*/
public CWE[] getReferralDisposition() {
CWE[] ret = null;
try {
Type[] t = this.getField(4);
ret = new CWE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CWE)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 Referral Disposition (RF1-4).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getReferralDispositionReps() {
CWE[] 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
* RF1-4: "Referral Disposition" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getReferralDisposition(int rep) {
CWE ret = null;
try {
Type t = this.getField(4, rep);
ret = (CWE)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
* RF1-4: "Referral Disposition" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRf14_ReferralDisposition(int rep) {
CWE ret = null;
try {
Type t = this.getField(4, rep);
ret = (CWE)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 Referral Disposition (RF1-4).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRf14_ReferralDispositionReps() {
CWE[] 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
* RF1-4: "Referral Disposition" 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 CWE insertReferralDisposition(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(4, rep);
}
/**
* Inserts a repetition of
* RF1-4: "Referral Disposition" 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 CWE insertRf14_ReferralDisposition(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(4, rep);
}
/**
* Removes a repetition of
* RF1-4: "Referral Disposition" 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 CWE removeReferralDisposition(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(4, rep);
}
/**
* Removes a repetition of
* RF1-4: "Referral Disposition" 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 CWE removeRf14_ReferralDisposition(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(4, rep);
}
/**
* Returns
* RF1-5: "Referral Category" - creates it if necessary
*/
public CWE getReferralCategory() {
CWE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CWE)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
* RF1-5: "Referral Category" - creates it if necessary
*/
public CWE getRf15_ReferralCategory() {
CWE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CWE)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
* RF1-6: "Originating Referral Identifier" - creates it if necessary
*/
public EI getOriginatingReferralIdentifier() {
EI ret = null;
try {
Type t = this.getField(6, 0);
ret = (EI)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
* RF1-6: "Originating Referral Identifier" - creates it if necessary
*/
public EI getRf16_OriginatingReferralIdentifier() {
EI ret = null;
try {
Type t = this.getField(6, 0);
ret = (EI)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
* RF1-7: "Effective Date" - creates it if necessary
*/
public DTM getEffectiveDate() {
DTM ret = null;
try {
Type t = this.getField(7, 0);
ret = (DTM)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
* RF1-7: "Effective Date" - creates it if necessary
*/
public DTM getRf17_EffectiveDate() {
DTM ret = null;
try {
Type t = this.getField(7, 0);
ret = (DTM)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
* RF1-8: "Expiration Date" - creates it if necessary
*/
public DTM getExpirationDate() {
DTM ret = null;
try {
Type t = this.getField(8, 0);
ret = (DTM)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
* RF1-8: "Expiration Date" - creates it if necessary
*/
public DTM getRf18_ExpirationDate() {
DTM ret = null;
try {
Type t = this.getField(8, 0);
ret = (DTM)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
* RF1-9: "Process Date" - creates it if necessary
*/
public DTM getProcessDate() {
DTM ret = null;
try {
Type t = this.getField(9, 0);
ret = (DTM)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
* RF1-9: "Process Date" - creates it if necessary
*/
public DTM getRf19_ProcessDate() {
DTM ret = null;
try {
Type t = this.getField(9, 0);
ret = (DTM)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 Referral Reason (RF1-10).
*/
public CWE[] getReferralReason() {
CWE[] ret = null;
try {
Type[] t = this.getField(10);
ret = new CWE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CWE)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 Referral Reason (RF1-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getReferralReasonReps() {
CWE[] 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
* RF1-10: "Referral Reason" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getReferralReason(int rep) {
CWE ret = null;
try {
Type t = this.getField(10, rep);
ret = (CWE)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
* RF1-10: "Referral Reason" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRf110_ReferralReason(int rep) {
CWE ret = null;
try {
Type t = this.getField(10, rep);
ret = (CWE)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 Referral Reason (RF1-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRf110_ReferralReasonReps() {
CWE[] 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
* RF1-10: "Referral Reason" 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 CWE insertReferralReason(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(10, rep);
}
/**
* Inserts a repetition of
* RF1-10: "Referral Reason" 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 CWE insertRf110_ReferralReason(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(10, rep);
}
/**
* Removes a repetition of
* RF1-10: "Referral Reason" 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 CWE removeReferralReason(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(10, rep);
}
/**
* Removes a repetition of
* RF1-10: "Referral Reason" 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 CWE removeRf110_ReferralReason(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(10, rep);
}
/**
* Returns all repetitions of External Referral Identifier (RF1-11).
*/
public EI[] getExternalReferralIdentifier() {
EI[] ret = null;
try {
Type[] t = this.getField(11);
ret = new EI[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (EI)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 External Referral Identifier (RF1-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getExternalReferralIdentifierReps() {
EI[] 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
* RF1-11: "External Referral Identifier" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public EI getExternalReferralIdentifier(int rep) {
EI ret = null;
try {
Type t = this.getField(11, rep);
ret = (EI)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
* RF1-11: "External Referral Identifier" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public EI getRf111_ExternalReferralIdentifier(int rep) {
EI ret = null;
try {
Type t = this.getField(11, rep);
ret = (EI)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 External Referral Identifier (RF1-11).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRf111_ExternalReferralIdentifierReps() {
EI[] 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
* RF1-11: "External Referral Identifier" 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 EI insertExternalReferralIdentifier(int rep) throws HL7Exception {
return (EI) super.insertRepetition(11, rep);
}
/**
* Inserts a repetition of
* RF1-11: "External Referral Identifier" 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 EI insertRf111_ExternalReferralIdentifier(int rep) throws HL7Exception {
return (EI) super.insertRepetition(11, rep);
}
/**
* Removes a repetition of
* RF1-11: "External Referral Identifier" 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 EI removeExternalReferralIdentifier(int rep) throws HL7Exception {
return (EI) super.removeRepetition(11, rep);
}
/**
* Removes a repetition of
* RF1-11: "External Referral Identifier" 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 EI removeRf111_ExternalReferralIdentifier(int rep) throws HL7Exception {
return (EI) super.removeRepetition(11, rep);
}
/**
* Returns
* RF1-12: "Referral Documentation Completion Status" - creates it if necessary
*/
public CWE getReferralDocumentationCompletionStatus() {
CWE ret = null;
try {
Type t = this.getField(12, 0);
ret = (CWE)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
* RF1-12: "Referral Documentation Completion Status" - creates it if necessary
*/
public CWE getRf112_ReferralDocumentationCompletionStatus() {
CWE ret = null;
try {
Type t = this.getField(12, 0);
ret = (CWE)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 CWE(getMessage());
case 1: return new CWE(getMessage());
case 2: return new CWE(getMessage());
case 3: return new CWE(getMessage());
case 4: return new CWE(getMessage());
case 5: return new EI(getMessage());
case 6: return new DTM(getMessage());
case 7: return new DTM(getMessage());
case 8: return new DTM(getMessage());
case 9: return new CWE(getMessage());
case 10: return new EI(getMessage());
case 11: return new CWE(getMessage());
default: return null;
}
}
}