ca.uhn.hl7v2.model.v26.segment.OBX 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 OBX message segment (Observation/Result).
* This segment has the following fields:
*
* - OBX-1: Set ID - OBX (SI) optional
*
- OBX-2: Value Type (ID) optional
*
- OBX-3: Observation Identifier (CWE)
*
- OBX-4: Observation Sub-ID (ST) optional
*
- OBX-5: Observation Value (Varies) optional repeating
*
- OBX-6: Units (CWE) optional
*
- OBX-7: References Range (ST) optional
*
- OBX-8: Abnormal Flags (IS) optional repeating
*
- OBX-9: Probability (NM) optional
*
- OBX-10: Nature of Abnormal Test (ID) optional repeating
*
- OBX-11: Observation Result Status (ID)
*
- OBX-12: Effective Date of Reference Range (DTM) optional
*
- OBX-13: User Defined Access Checks (ST) optional
*
- OBX-14: Date/Time of the Observation (DTM) optional
*
- OBX-15: Producer's ID (CWE) optional
*
- OBX-16: Responsible Observer (XCN) optional repeating
*
- OBX-17: Observation Method (CWE) optional repeating
*
- OBX-18: Equipment Instance Identifier (EI) optional repeating
*
- OBX-19: Date/Time of the Analysis (DTM) optional
*
- OBX-20: Observation Site (CWE) optional repeating
*
- OBX-21: Observation Instance Identifier (EI) optional
*
- OBX-22: Mood Code (CNE) optional
*
- OBX-23: Performing Organization Name (XON) optional
*
- OBX-24: Performing Organization Address (XAD) optional
*
- OBX-25: Performing Organization Medical Director (XCN) optional
*
*/
public class OBX extends AbstractSegment {
/**
* Creates a new OBX segment
*/
public OBX(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 - OBX");
this.add(ID.class, false, 1, 3, new Object[]{ getMessage() }, "Value Type");
this.add(CWE.class, true, 1, 705, new Object[]{ getMessage(), new Integer(9999) }, "Observation Identifier");
this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Observation Sub-ID");
this.add(Varies.class, false, 0, 65536, new Object[]{ getMessage(), new Integer(0) }, "Observation Value");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(9999) }, "Units");
this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "References Range");
this.add(IS.class, false, 0, 5, new Object[]{ getMessage() }, "Abnormal Flags");
this.add(NM.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Probability");
this.add(ID.class, false, 0, 2, new Object[]{ getMessage() }, "Nature of Abnormal Test");
this.add(ID.class, true, 1, 1, new Object[]{ getMessage() }, "Observation Result Status");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Effective Date of Reference Range");
this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "User Defined Access Checks");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Date/Time of the Observation");
this.add(CWE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(9999) }, "Producer's ID");
this.add(XCN.class, false, 0, 3220, new Object[]{ getMessage(), new Integer(0) }, "Responsible Observer");
this.add(CWE.class, false, 0, 705, new Object[]{ getMessage(), new Integer(9999) }, "Observation Method");
this.add(EI.class, false, 0, 427, new Object[]{ getMessage(), new Integer(0) }, "Equipment Instance Identifier");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Date/Time of the Analysis");
this.add(CWE.class, false, 0, 705, new Object[]{ getMessage(), new Integer(163) }, "Observation Site");
this.add(EI.class, false, 1, 427, new Object[]{ getMessage(), new Integer(0) }, "Observation Instance Identifier");
this.add(CNE.class, false, 1, 705, new Object[]{ getMessage(), new Integer(725) }, "Mood Code");
this.add(XON.class, false, 1, 570, new Object[]{ getMessage(), new Integer(0) }, "Performing Organization Name");
this.add(XAD.class, false, 1, 2915, new Object[]{ getMessage(), new Integer(0) }, "Performing Organization Address");
this.add(XCN.class, false, 1, 3220, new Object[]{ getMessage(), new Integer(0) }, "Performing Organization Medical Director");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating OBX - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* OBX-1: "Set ID - OBX" - creates it if necessary
*/
public SI getSetIDOBX() {
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
* OBX-1: "Set ID - OBX" - creates it if necessary
*/
public SI getObx1_SetIDOBX() {
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
* OBX-2: "Value Type" - creates it if necessary
*/
public ID getValueType() {
ID ret = null;
try {
Type t = this.getField(2, 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
* OBX-2: "Value Type" - creates it if necessary
*/
public ID getObx2_ValueType() {
ID ret = null;
try {
Type t = this.getField(2, 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
* OBX-3: "Observation Identifier" - creates it if necessary
*/
public CWE getObservationIdentifier() {
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
* OBX-3: "Observation Identifier" - creates it if necessary
*/
public CWE getObx3_ObservationIdentifier() {
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
* OBX-4: "Observation Sub-ID" - creates it if necessary
*/
public ST getObservationSubID() {
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
* OBX-4: "Observation Sub-ID" - creates it if necessary
*/
public ST getObx4_ObservationSubID() {
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 all repetitions of Observation Value (OBX-5).
*/
public Varies[] getObservationValue() {
Varies[] ret = null;
try {
Type[] t = this.getField(5);
ret = new Varies[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (Varies)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 Observation Value (OBX-5).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObservationValueReps() {
Varies[] ret = null;
try {
Type[] t = this.getField(5);
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
* OBX-5: "Observation Value" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public Varies getObservationValue(int rep) {
Varies ret = null;
try {
Type t = this.getField(5, rep);
ret = (Varies)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
* OBX-5: "Observation Value" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public Varies getObx5_ObservationValue(int rep) {
Varies ret = null;
try {
Type t = this.getField(5, rep);
ret = (Varies)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 Observation Value (OBX-5).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObx5_ObservationValueReps() {
Varies[] ret = null;
try {
Type[] t = this.getField(5);
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
* OBX-5: "Observation Value" 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 Varies insertObservationValue(int rep) throws HL7Exception {
return (Varies) super.insertRepetition(5, rep);
}
/**
* Inserts a repetition of
* OBX-5: "Observation Value" 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 Varies insertObx5_ObservationValue(int rep) throws HL7Exception {
return (Varies) super.insertRepetition(5, rep);
}
/**
* Removes a repetition of
* OBX-5: "Observation Value" 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 Varies removeObservationValue(int rep) throws HL7Exception {
return (Varies) super.removeRepetition(5, rep);
}
/**
* Removes a repetition of
* OBX-5: "Observation Value" 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 Varies removeObx5_ObservationValue(int rep) throws HL7Exception {
return (Varies) super.removeRepetition(5, rep);
}
/**
* Returns
* OBX-6: "Units" - creates it if necessary
*/
public CWE getUnits() {
CWE ret = null;
try {
Type t = this.getField(6, 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
* OBX-6: "Units" - creates it if necessary
*/
public CWE getObx6_Units() {
CWE ret = null;
try {
Type t = this.getField(6, 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
* OBX-7: "References Range" - creates it if necessary
*/
public ST getReferencesRange() {
ST ret = null;
try {
Type t = this.getField(7, 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
* OBX-7: "References Range" - creates it if necessary
*/
public ST getObx7_ReferencesRange() {
ST ret = null;
try {
Type t = this.getField(7, 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 Abnormal Flags (OBX-8).
*/
public IS[] getAbnormalFlags() {
IS[] ret = null;
try {
Type[] t = this.getField(8);
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 Abnormal Flags (OBX-8).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getAbnormalFlagsReps() {
IS[] 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
* OBX-8: "Abnormal Flags" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public IS getAbnormalFlags(int rep) {
IS ret = null;
try {
Type t = this.getField(8, 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
* OBX-8: "Abnormal Flags" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public IS getObx8_AbnormalFlags(int rep) {
IS ret = null;
try {
Type t = this.getField(8, 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 Abnormal Flags (OBX-8).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObx8_AbnormalFlagsReps() {
IS[] 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
* OBX-8: "Abnormal Flags" 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 insertAbnormalFlags(int rep) throws HL7Exception {
return (IS) super.insertRepetition(8, rep);
}
/**
* Inserts a repetition of
* OBX-8: "Abnormal Flags" 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 insertObx8_AbnormalFlags(int rep) throws HL7Exception {
return (IS) super.insertRepetition(8, rep);
}
/**
* Removes a repetition of
* OBX-8: "Abnormal Flags" 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 removeAbnormalFlags(int rep) throws HL7Exception {
return (IS) super.removeRepetition(8, rep);
}
/**
* Removes a repetition of
* OBX-8: "Abnormal Flags" 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 removeObx8_AbnormalFlags(int rep) throws HL7Exception {
return (IS) super.removeRepetition(8, rep);
}
/**
* Returns
* OBX-9: "Probability" - creates it if necessary
*/
public NM getProbability() {
NM ret = null;
try {
Type t = this.getField(9, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* OBX-9: "Probability" - creates it if necessary
*/
public NM getObx9_Probability() {
NM ret = null;
try {
Type t = this.getField(9, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Nature of Abnormal Test (OBX-10).
*/
public ID[] getNatureOfAbnormalTest() {
ID[] ret = null;
try {
Type[] t = this.getField(10);
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 Nature of Abnormal Test (OBX-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getNatureOfAbnormalTestReps() {
ID[] 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
* OBX-10: "Nature of Abnormal Test" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ID getNatureOfAbnormalTest(int rep) {
ID ret = null;
try {
Type t = this.getField(10, 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
* OBX-10: "Nature of Abnormal Test" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ID getObx10_NatureOfAbnormalTest(int rep) {
ID ret = null;
try {
Type t = this.getField(10, 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 Nature of Abnormal Test (OBX-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObx10_NatureOfAbnormalTestReps() {
ID[] 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
* OBX-10: "Nature of Abnormal Test" 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 insertNatureOfAbnormalTest(int rep) throws HL7Exception {
return (ID) super.insertRepetition(10, rep);
}
/**
* Inserts a repetition of
* OBX-10: "Nature of Abnormal Test" 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 insertObx10_NatureOfAbnormalTest(int rep) throws HL7Exception {
return (ID) super.insertRepetition(10, rep);
}
/**
* Removes a repetition of
* OBX-10: "Nature of Abnormal Test" 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 removeNatureOfAbnormalTest(int rep) throws HL7Exception {
return (ID) super.removeRepetition(10, rep);
}
/**
* Removes a repetition of
* OBX-10: "Nature of Abnormal Test" 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 removeObx10_NatureOfAbnormalTest(int rep) throws HL7Exception {
return (ID) super.removeRepetition(10, rep);
}
/**
* Returns
* OBX-11: "Observation Result Status" - creates it if necessary
*/
public ID getObservationResultStatus() {
ID ret = null;
try {
Type t = this.getField(11, 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
* OBX-11: "Observation Result Status" - creates it if necessary
*/
public ID getObx11_ObservationResultStatus() {
ID ret = null;
try {
Type t = this.getField(11, 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
* OBX-12: "Effective Date of Reference Range" - creates it if necessary
*/
public DTM getEffectiveDateOfReferenceRange() {
DTM ret = null;
try {
Type t = this.getField(12, 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
* OBX-12: "Effective Date of Reference Range" - creates it if necessary
*/
public DTM getObx12_EffectiveDateOfReferenceRange() {
DTM ret = null;
try {
Type t = this.getField(12, 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
* OBX-13: "User Defined Access Checks" - creates it if necessary
*/
public ST getUserDefinedAccessChecks() {
ST ret = null;
try {
Type t = this.getField(13, 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
* OBX-13: "User Defined Access Checks" - creates it if necessary
*/
public ST getObx13_UserDefinedAccessChecks() {
ST ret = null;
try {
Type t = this.getField(13, 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
* OBX-14: "Date/Time of the Observation" - creates it if necessary
*/
public DTM getDateTimeOfTheObservation() {
DTM ret = null;
try {
Type t = this.getField(14, 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
* OBX-14: "Date/Time of the Observation" - creates it if necessary
*/
public DTM getObx14_DateTimeOfTheObservation() {
DTM ret = null;
try {
Type t = this.getField(14, 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
* OBX-15: "Producer's ID" - creates it if necessary
*/
public CWE getProducerSID() {
CWE ret = null;
try {
Type t = this.getField(15, 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
* OBX-15: "Producer's ID" - creates it if necessary
*/
public CWE getObx15_ProducerSID() {
CWE ret = null;
try {
Type t = this.getField(15, 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 Responsible Observer (OBX-16).
*/
public XCN[] getResponsibleObserver() {
XCN[] ret = null;
try {
Type[] t = this.getField(16);
ret = new XCN[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (XCN)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 Responsible Observer (OBX-16).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getResponsibleObserverReps() {
XCN[] 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
* OBX-16: "Responsible Observer" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getResponsibleObserver(int rep) {
XCN ret = null;
try {
Type t = this.getField(16, rep);
ret = (XCN)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
* OBX-16: "Responsible Observer" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getObx16_ResponsibleObserver(int rep) {
XCN ret = null;
try {
Type t = this.getField(16, rep);
ret = (XCN)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 Responsible Observer (OBX-16).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObx16_ResponsibleObserverReps() {
XCN[] 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
* OBX-16: "Responsible Observer" 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 XCN insertResponsibleObserver(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(16, rep);
}
/**
* Inserts a repetition of
* OBX-16: "Responsible Observer" 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 XCN insertObx16_ResponsibleObserver(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(16, rep);
}
/**
* Removes a repetition of
* OBX-16: "Responsible Observer" 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 XCN removeResponsibleObserver(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(16, rep);
}
/**
* Removes a repetition of
* OBX-16: "Responsible Observer" 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 XCN removeObx16_ResponsibleObserver(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(16, rep);
}
/**
* Returns all repetitions of Observation Method (OBX-17).
*/
public CWE[] getObservationMethod() {
CWE[] ret = null;
try {
Type[] t = this.getField(17);
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 Observation Method (OBX-17).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObservationMethodReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(17);
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
* OBX-17: "Observation Method" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getObservationMethod(int rep) {
CWE ret = null;
try {
Type t = this.getField(17, 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
* OBX-17: "Observation Method" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getObx17_ObservationMethod(int rep) {
CWE ret = null;
try {
Type t = this.getField(17, 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 Observation Method (OBX-17).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObx17_ObservationMethodReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(17);
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
* OBX-17: "Observation Method" 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 insertObservationMethod(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(17, rep);
}
/**
* Inserts a repetition of
* OBX-17: "Observation Method" 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 insertObx17_ObservationMethod(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(17, rep);
}
/**
* Removes a repetition of
* OBX-17: "Observation Method" 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 removeObservationMethod(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(17, rep);
}
/**
* Removes a repetition of
* OBX-17: "Observation Method" 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 removeObx17_ObservationMethod(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(17, rep);
}
/**
* Returns all repetitions of Equipment Instance Identifier (OBX-18).
*/
public EI[] getEquipmentInstanceIdentifier() {
EI[] ret = null;
try {
Type[] t = this.getField(18);
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 Equipment Instance Identifier (OBX-18).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getEquipmentInstanceIdentifierReps() {
EI[] ret = null;
try {
Type[] t = this.getField(18);
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
* OBX-18: "Equipment Instance Identifier" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public EI getEquipmentInstanceIdentifier(int rep) {
EI ret = null;
try {
Type t = this.getField(18, 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
* OBX-18: "Equipment Instance Identifier" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public EI getObx18_EquipmentInstanceIdentifier(int rep) {
EI ret = null;
try {
Type t = this.getField(18, 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 Equipment Instance Identifier (OBX-18).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObx18_EquipmentInstanceIdentifierReps() {
EI[] ret = null;
try {
Type[] t = this.getField(18);
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
* OBX-18: "Equipment Instance 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 insertEquipmentInstanceIdentifier(int rep) throws HL7Exception {
return (EI) super.insertRepetition(18, rep);
}
/**
* Inserts a repetition of
* OBX-18: "Equipment Instance 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 insertObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception {
return (EI) super.insertRepetition(18, rep);
}
/**
* Removes a repetition of
* OBX-18: "Equipment Instance 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 removeEquipmentInstanceIdentifier(int rep) throws HL7Exception {
return (EI) super.removeRepetition(18, rep);
}
/**
* Removes a repetition of
* OBX-18: "Equipment Instance 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 removeObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception {
return (EI) super.removeRepetition(18, rep);
}
/**
* Returns
* OBX-19: "Date/Time of the Analysis" - creates it if necessary
*/
public DTM getDateTimeOfTheAnalysis() {
DTM ret = null;
try {
Type t = this.getField(19, 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
* OBX-19: "Date/Time of the Analysis" - creates it if necessary
*/
public DTM getObx19_DateTimeOfTheAnalysis() {
DTM ret = null;
try {
Type t = this.getField(19, 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 Observation Site (OBX-20).
*/
public CWE[] getObservationSite() {
CWE[] ret = null;
try {
Type[] t = this.getField(20);
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 Observation Site (OBX-20).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObservationSiteReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(20);
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
* OBX-20: "Observation Site" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getObservationSite(int rep) {
CWE ret = null;
try {
Type t = this.getField(20, 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
* OBX-20: "Observation Site" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getObx20_ObservationSite(int rep) {
CWE ret = null;
try {
Type t = this.getField(20, 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 Observation Site (OBX-20).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObx20_ObservationSiteReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(20);
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
* OBX-20: "Observation Site" 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 insertObservationSite(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(20, rep);
}
/**
* Inserts a repetition of
* OBX-20: "Observation Site" 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 insertObx20_ObservationSite(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(20, rep);
}
/**
* Removes a repetition of
* OBX-20: "Observation Site" 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 removeObservationSite(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(20, rep);
}
/**
* Removes a repetition of
* OBX-20: "Observation Site" 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 removeObx20_ObservationSite(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(20, rep);
}
/**
* Returns
* OBX-21: "Observation Instance Identifier" - creates it if necessary
*/
public EI getObservationInstanceIdentifier() {
EI ret = null;
try {
Type t = this.getField(21, 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
* OBX-21: "Observation Instance Identifier" - creates it if necessary
*/
public EI getObx21_ObservationInstanceIdentifier() {
EI ret = null;
try {
Type t = this.getField(21, 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
* OBX-22: "Mood Code" - creates it if necessary
*/
public CNE getMoodCode() {
CNE ret = null;
try {
Type t = this.getField(22, 0);
ret = (CNE)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
* OBX-22: "Mood Code" - creates it if necessary
*/
public CNE getObx22_MoodCode() {
CNE ret = null;
try {
Type t = this.getField(22, 0);
ret = (CNE)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
* OBX-23: "Performing Organization Name" - creates it if necessary
*/
public XON getPerformingOrganizationName() {
XON ret = null;
try {
Type t = this.getField(23, 0);
ret = (XON)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
* OBX-23: "Performing Organization Name" - creates it if necessary
*/
public XON getObx23_PerformingOrganizationName() {
XON ret = null;
try {
Type t = this.getField(23, 0);
ret = (XON)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
* OBX-24: "Performing Organization Address" - creates it if necessary
*/
public XAD getPerformingOrganizationAddress() {
XAD ret = null;
try {
Type t = this.getField(24, 0);
ret = (XAD)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
* OBX-24: "Performing Organization Address" - creates it if necessary
*/
public XAD getObx24_PerformingOrganizationAddress() {
XAD ret = null;
try {
Type t = this.getField(24, 0);
ret = (XAD)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
* OBX-25: "Performing Organization Medical Director" - creates it if necessary
*/
public XCN getPerformingOrganizationMedicalDirector() {
XCN ret = null;
try {
Type t = this.getField(25, 0);
ret = (XCN)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
* OBX-25: "Performing Organization Medical Director" - creates it if necessary
*/
public XCN getObx25_PerformingOrganizationMedicalDirector() {
XCN ret = null;
try {
Type t = this.getField(25, 0);
ret = (XCN)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 ID(getMessage(), new Integer( 125 ));
case 2: return new CWE(getMessage());
case 3: return new ST(getMessage());
case 4: return new Varies(getMessage());
case 5: return new CWE(getMessage());
case 6: return new ST(getMessage());
case 7: return new IS(getMessage(), new Integer( 78 ));
case 8: return new NM(getMessage());
case 9: return new ID(getMessage(), new Integer( 80 ));
case 10: return new ID(getMessage(), new Integer( 85 ));
case 11: return new DTM(getMessage());
case 12: return new ST(getMessage());
case 13: return new DTM(getMessage());
case 14: return new CWE(getMessage());
case 15: return new XCN(getMessage());
case 16: return new CWE(getMessage());
case 17: return new EI(getMessage());
case 18: return new DTM(getMessage());
case 19: return new CWE(getMessage());
case 20: return new EI(getMessage());
case 21: return new CNE(getMessage());
case 22: return new XON(getMessage());
case 23: return new XAD(getMessage());
case 24: return new XCN(getMessage());
default: return null;
}
}
}