ca.uhn.hl7v2.model.v22.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.v22.segment;
// import ca.uhn.hl7v2.model.v22.group.*;
import ca.uhn.hl7v2.model.v22.datatype.*;
import ca.uhn.log.HapiLogFactory;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
import ca.uhn.hl7v2.model.AbstractMessage;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Varies;
/**
*Represents an HL7 OBX message segment (OBSERVATION RESULT).
* This segment has the following fields:
*
* - OBX-1: Set ID - Observational Simple (SI) optional
*
- OBX-2: Value Type (ID)
*
- OBX-3: Observation Identifier (CE)
*
- OBX-4: Observation Sub-ID (ST) optional
*
- OBX-5: Observation Value (Varies) optional
*
- OBX-6: Units (CE) optional
*
- OBX-7: References Range (ST) optional
*
- OBX-8: Abnormal Flags (ID) optional repeating
*
- OBX-9: Probability (NM) optional
*
- OBX-10: Nature of Abnormal Test (ID) optional
*
- OBX-11: Observation result status (ID)
*
- OBX-12: Effective date last observation normal values (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 (CN) 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 - Observational Simple");
this.add(ID.class, true, 1, 2, new Object[]{ getMessage() }, "Value Type");
this.add(CE.class, true, 1, 80, new Object[]{ getMessage(), new Integer(0) }, "Observation Identifier");
this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Observation Sub-ID");
this.add(Varies.class, false, 1, 65536, new Object[]{ getMessage(), new Integer(0) }, "Observation Value");
this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Units");
this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "References Range");
this.add(ID.class, false, 5, 10, new Object[]{ getMessage() }, "Abnormal Flags");
this.add(NM.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Probability");
this.add(ID.class, false, 1, 5, new Object[]{ getMessage() }, "Nature of Abnormal Test");
this.add(ID.class, true, 1, 2, new Object[]{ getMessage() }, "Observation result status");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Effective date last observation normal values");
this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "User Defined Access Checks");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date / time of the observation");
this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Producer's ID");
this.add(CN.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Responsible Observer");
} 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 - Observational Simple" - creates it if necessary
*/
public SI getSetIDObservationalSimple() {
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 - Observational Simple" - creates it if necessary
*/
public SI getObx1_SetIDObservationalSimple() {
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 CE getObservationIdentifier() {
CE ret = null;
try {
Type t = this.getField(3, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* 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) {
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
* OBX-5: "Observation Value" - creates it if necessary
*/
public Varies getObservationValue() {
Varies ret = null;
try {
Type t = this.getField(5, 0);
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
* OBX-5: "Observation Value" - creates it if necessary
*/
public Varies getObx5_ObservationValue() {
Varies ret = null;
try {
Type t = this.getField(5, 0);
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
* 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) {
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 CE getObx6_Units() {
CE ret = null;
try {
Type t = this.getField(6, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* 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 ID[] getAbnormalFlags() {
ID[] ret = null;
try {
Type[] t = this.getField(8);
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 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() {
ID[] 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 ID getAbnormalFlags(int rep) {
ID ret = null;
try {
Type t = this.getField(8, 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-8: "Abnormal Flags" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ID getObx8_AbnormalFlags(int rep) {
ID ret = null;
try {
Type t = this.getField(8, 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 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() {
ID[] 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 ID insertAbnormalFlags(int rep) throws HL7Exception {
return (ID) 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 ID insertObx8_AbnormalFlags(int rep) throws HL7Exception {
return (ID) 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 ID removeAbnormalFlags(int rep) throws HL7Exception {
return (ID) 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 ID removeObx8_AbnormalFlags(int rep) throws HL7Exception {
return (ID) 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
* 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) {
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-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) {
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 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 last observation normal values" - creates it if necessary
*/
public TS getEffectiveDateLastObservationNormalValues() {
TS ret = null;
try {
Type t = this.getField(12, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* OBX-12: "Effective date last observation normal values" - creates it if necessary
*/
public TS getObx12_EffectiveDateLastObservationNormalValues() {
TS ret = null;
try {
Type t = this.getField(12, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* 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 TS getDateTimeOfTheObservation() {
TS ret = null;
try {
Type t = this.getField(14, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* 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) {
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 CE getProducerSID() {
CE ret = null;
try {
Type t = this.getField(15, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* 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) {
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-16: "Responsible Observer" - creates it if necessary
*/
public CN getResponsibleObserver() {
CN ret = null;
try {
Type t = this.getField(16, 0);
ret = (CN)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-16: "Responsible Observer" - creates it if necessary
*/
public CN getObx16_ResponsibleObserver() {
CN ret = null;
try {
Type t = this.getField(16, 0);
ret = (CN)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 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 ID(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 CN(getMessage());
default: return null;
}
}
}