ca.uhn.hl7v2.model.v24.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/
*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.mozilla.org/MPL/
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
* specific language governing rights and limitations under the License.
*
* The Original Code is "[file_name]". Description:
* "[one_line_description]"
*
* The Initial Developer of the Original Code is University Health Network. Copyright (C)
* 2002. All Rights Reserved.
*
* Contributor(s): ______________________________________.
*
* Alternatively, the contents of this file may be used under the terms of the
* GNU General Public License (the "GPL"), in which case the provisions of the GPL are
* applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of the GPL and not to allow others to use your version
* of this file under the MPL, indicate your decision by deleting the provisions above
* and replace them with the notice and other provisions required by the GPL License.
* If you do not delete the provisions above, a recipient may use your version of
* this file under either the MPL or the GPL.
*
*/
package ca.uhn.hl7v2.model.v24.segment;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// import ca.uhn.hl7v2.model.v24.group.*;
import ca.uhn.hl7v2.model.v24.datatype.*;
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 (CE)
*
- OBX-4: Observation Sub-Id (ST) optional
*
- OBX-5: Observation Value (Varies) optional repeating
*
- OBX-6: Units (CE) optional
*
- OBX-7: References Range (ST) optional
*
- OBX-8: Abnormal Flags (IS) optional
*
- OBX-9: Probability (NM) optional repeating
*
- OBX-10: Nature of Abnormal Test (ID) optional
*
- OBX-11: Observation Result Status (ID)
*
- OBX-12: Date Last Observation Normal Value (TS) optional
*
- OBX-13: User Defined Access Checks (ST) optional
*
- OBX-14: Date/Time of the Observation (TS) optional
*
- OBX-15: Producer's ID (CE) optional
*
- OBX-16: Responsible Observer (XCN) optional
*
- OBX-17: Observation Method (CE) optional repeating
*
- OBX-18: Equipment Instance Identifier (EI) optional repeating
*
- OBX-19: Date/Time of the Analysis (TS) optional
*
*/
@SuppressWarnings("unused")
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() }, "Set ID - OBX");
this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(125) }, "Value Type");
this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Observation Identifier");
this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Observation Sub-Id");
this.add(Varies.class, false, 0, 65536, new Object[]{ getMessage() }, "Observation Value");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Units");
this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "References Range");
this.add(IS.class, false, 1, 5, new Object[]{ getMessage(), new Integer(78) }, "Abnormal Flags");
this.add(NM.class, false, 5, 5, new Object[]{ getMessage() }, "Probability");
this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(80) }, "Nature of Abnormal Test");
this.add(ID.class, true, 1, 1, new Object[]{ getMessage(), new Integer(85) }, "Observation Result Status");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date Last Observation Normal Value");
this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "User Defined Access Checks");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time of the Observation");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Producer's ID");
this.add(XCN.class, false, 1, 250, new Object[]{ getMessage() }, "Responsible Observer");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Observation Method");
this.add(EI.class, false, 0, 22, new Object[]{ getMessage() }, "Equipment Instance Identifier");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time of the Analysis");
} catch(HL7Exception e) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE getObservationIdentifier() {
CE ret = null;
try {
Type t = this.getField(3, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE getObx3_ObservationIdentifier() {
CE ret = null;
try {
Type t = this.getField(3, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE getUnits() {
CE ret = null;
try {
Type t = this.getField(6, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE getObx6_Units() {
CE ret = null;
try {
Type t = this.getField(6, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* OBX-8: "Abnormal Flags" - creates it if necessary
*/
public IS getAbnormalFlags() {
IS ret = null;
try {
Type t = this.getField(8, 0);
ret = (IS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* OBX-8: "Abnormal Flags" - creates it if necessary
*/
public IS getObx8_AbnormalFlags() {
IS ret = null;
try {
Type t = this.getField(8, 0);
ret = (IS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Probability (OBX-9).
*/
public NM[] getProbability() {
NM[] ret = null;
try {
Type[] t = this.getField(9);
ret = new NM[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (NM)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Probability (OBX-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getProbabilityReps() {
NM[] ret = null;
try {
Type[] t = this.getField(9);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* OBX-9: "Probability" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public NM getProbability(int rep) {
NM ret = null;
try {
Type t = this.getField(9, rep);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* OBX-9: "Probability" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public NM getObx9_Probability(int rep) {
NM ret = null;
try {
Type t = this.getField(9, rep);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 Probability (OBX-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getObx9_ProbabilityReps() {
NM[] ret = null;
try {
Type[] t = this.getField(9);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* OBX-9: "Probability" 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 NM insertProbability(int rep) throws HL7Exception {
return (NM) super.insertRepetition(9, rep);
}
/**
* Inserts a repetition of
* OBX-9: "Probability" 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 NM insertObx9_Probability(int rep) throws HL7Exception {
return (NM) super.insertRepetition(9, rep);
}
/**
* Removes a repetition of
* OBX-9: "Probability" 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 NM removeProbability(int rep) throws HL7Exception {
return (NM) super.removeRepetition(9, rep);
}
/**
* Removes a repetition of
* OBX-9: "Probability" 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 NM removeObx9_Probability(int rep) throws HL7Exception {
return (NM) super.removeRepetition(9, rep);
}
/**
* Returns
* OBX-10: "Nature of Abnormal Test" - creates it if necessary
*/
public ID getNatureOfAbnormalTest() {
ID ret = null;
try {
Type t = this.getField(10, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* OBX-10: "Nature of Abnormal Test" - creates it if necessary
*/
public ID getObx10_NatureOfAbnormalTest() {
ID ret = null;
try {
Type t = this.getField(10, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 getObservationResultStatus() {
ID ret = null;
try {
Type t = this.getField(11, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* OBX-12: "Date Last Observation Normal Value" - creates it if necessary
*/
public TS getDateLastObservationNormalValue() {
TS ret = null;
try {
Type t = this.getField(12, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* OBX-12: "Date Last Observation Normal Value" - creates it if necessary
*/
public TS getObx12_DateLastObservationNormalValue() {
TS ret = null;
try {
Type t = this.getField(12, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 TS getDateTimeOfTheObservation() {
TS ret = null;
try {
Type t = this.getField(14, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 TS getObx14_DateTimeOfTheObservation() {
TS ret = null;
try {
Type t = this.getField(14, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE getProducerSID() {
CE ret = null;
try {
Type t = this.getField(15, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE getObx15_ProducerSID() {
CE ret = null;
try {
Type t = this.getField(15, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* OBX-16: "Responsible Observer" - creates it if necessary
*/
public XCN getResponsibleObserver() {
XCN ret = null;
try {
Type t = this.getField(16, 0);
ret = (XCN)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* OBX-16: "Responsible Observer" - creates it if necessary
*/
public XCN getObx16_ResponsibleObserver() {
XCN ret = null;
try {
Type t = this.getField(16, 0);
ret = (XCN)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Observation Method (OBX-17).
*/
public CE[] getObservationMethod() {
CE[] ret = null;
try {
Type[] t = this.getField(17);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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() {
CE[] ret = null;
try {
Type[] t = this.getField(17);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE getObservationMethod(int rep) {
CE ret = null;
try {
Type t = this.getField(17, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE getObx17_ObservationMethod(int rep) {
CE ret = null;
try {
Type t = this.getField(17, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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() {
CE[] ret = null;
try {
Type[] t = this.getField(17);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE insertObservationMethod(int rep) throws HL7Exception {
return (CE) 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 CE insertObx17_ObservationMethod(int rep) throws HL7Exception {
return (CE) 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 CE removeObservationMethod(int rep) throws HL7Exception {
return (CE) 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 CE removeObx17_ObservationMethod(int rep) throws HL7Exception {
return (CE) 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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 TS getDateTimeOfTheAnalysis() {
TS ret = null;
try {
Type t = this.getField(19, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 TS getObx19_DateTimeOfTheAnalysis() {
TS ret = null;
try {
Type t = this.getField(19, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(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 CE(getMessage());
case 3: return new ST(getMessage());
case 4: return new Varies(getMessage());
case 5: return new CE(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 TS(getMessage());
case 12: return new ST(getMessage());
case 13: return new TS(getMessage());
case 14: return new CE(getMessage());
case 15: return new XCN(getMessage());
case 16: return new CE(getMessage());
case 17: return new EI(getMessage());
case 18: return new TS(getMessage());
default: return null;
}
}
}