ca.uhn.hl7v2.model.v25.segment.BTX 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.v25.segment;
// import ca.uhn.hl7v2.model.v25.group.*;
import ca.uhn.hl7v2.model.v25.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 BTX message segment (Blood Product Transfusion/Disposition).
* This segment has the following fields:
*
* - BTX-1: Set ID _ BTX (SI)
*
- BTX-2: BC Donation ID (EI) optional
*
- BTX-3: BC Component (CNE) optional
*
- BTX-4: BC Blood Group (CNE) optional
*
- BTX-5: CP Commercial Product (CWE) optional
*
- BTX-6: CP Manufacturer (XON) optional
*
- BTX-7: CP Lot Number (EI) optional
*
- BTX-8: BP Quantity (NM)
*
- BTX-9: BP Amount (NM) optional
*
- BTX-10: BP Units (CE) optional
*
- BTX-11: BP Transfusion/Disposition Status (CWE)
*
- BTX-12: BP Message Status (ID)
*
- BTX-13: BP Date/Time of Status (TS)
*
- BTX-14: BP Administrator (XCN) optional
*
- BTX-15: BP Verifier (XCN) optional
*
- BTX-16: BP Transfusion Start Date/Time of Status (TS) optional
*
- BTX-17: BP Transfusion End Date/Time of Status (TS) optional
*
- BTX-18: BP Adverse Reaction Type (CWE) optional repeating
*
- BTX-19: BP Transfusion Interrupted Reason (CWE) optional
*
*/
public class BTX extends AbstractSegment {
/**
* Creates a new BTX segment
*/
public BTX(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(SI.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID _ BTX");
this.add(EI.class, false, 1, 22, new Object[]{ getMessage(), new Integer(0) }, "BC Donation ID");
this.add(CNE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "BC Component");
this.add(CNE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "BC Blood Group");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(512) }, "CP Commercial Product");
this.add(XON.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "CP Manufacturer");
this.add(EI.class, false, 1, 22, new Object[]{ getMessage(), new Integer(0) }, "CP Lot Number");
this.add(NM.class, true, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "BP Quantity");
this.add(NM.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "BP Amount");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "BP Units");
this.add(CWE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(513) }, "BP Transfusion/Disposition Status");
this.add(ID.class, true, 1, 1, new Object[]{ getMessage() }, "BP Message Status");
this.add(TS.class, true, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "BP Date/Time of Status");
this.add(XCN.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "BP Administrator");
this.add(XCN.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "BP Verifier");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "BP Transfusion Start Date/Time of Status");
this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "BP Transfusion End Date/Time of Status");
this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(514) }, "BP Adverse Reaction Type");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(515) }, "BP Transfusion Interrupted Reason");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating BTX - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* BTX-1: "Set ID _ BTX" - creates it if necessary
*/
public SI getSetIDBTX() {
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
* BTX-1: "Set ID _ BTX" - creates it if necessary
*/
public SI getBtx1_SetIDBTX() {
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
* BTX-2: "BC Donation ID" - creates it if necessary
*/
public EI getBCDonationID() {
EI ret = null;
try {
Type t = this.getField(2, 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
* BTX-2: "BC Donation ID" - creates it if necessary
*/
public EI getBtx2_BCDonationID() {
EI ret = null;
try {
Type t = this.getField(2, 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
* BTX-3: "BC Component" - creates it if necessary
*/
public CNE getBCComponent() {
CNE ret = null;
try {
Type t = this.getField(3, 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
* BTX-3: "BC Component" - creates it if necessary
*/
public CNE getBtx3_BCComponent() {
CNE ret = null;
try {
Type t = this.getField(3, 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
* BTX-4: "BC Blood Group" - creates it if necessary
*/
public CNE getBCBloodGroup() {
CNE ret = null;
try {
Type t = this.getField(4, 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
* BTX-4: "BC Blood Group" - creates it if necessary
*/
public CNE getBtx4_BCBloodGroup() {
CNE ret = null;
try {
Type t = this.getField(4, 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
* BTX-5: "CP Commercial Product" - creates it if necessary
*/
public CWE getCPCommercialProduct() {
CWE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* BTX-5: "CP Commercial Product" - creates it if necessary
*/
public CWE getBtx5_CPCommercialProduct() {
CWE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* BTX-6: "CP Manufacturer" - creates it if necessary
*/
public XON getCPManufacturer() {
XON ret = null;
try {
Type t = this.getField(6, 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
* BTX-6: "CP Manufacturer" - creates it if necessary
*/
public XON getBtx6_CPManufacturer() {
XON ret = null;
try {
Type t = this.getField(6, 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
* BTX-7: "CP Lot Number" - creates it if necessary
*/
public EI getCPLotNumber() {
EI ret = null;
try {
Type t = this.getField(7, 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
* BTX-7: "CP Lot Number" - creates it if necessary
*/
public EI getBtx7_CPLotNumber() {
EI ret = null;
try {
Type t = this.getField(7, 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
* BTX-8: "BP Quantity" - creates it if necessary
*/
public NM getBPQuantity() {
NM ret = null;
try {
Type t = this.getField(8, 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
* BTX-8: "BP Quantity" - creates it if necessary
*/
public NM getBtx8_BPQuantity() {
NM ret = null;
try {
Type t = this.getField(8, 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
* BTX-9: "BP Amount" - creates it if necessary
*/
public NM getBPAmount() {
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
* BTX-9: "BP Amount" - creates it if necessary
*/
public NM getBtx9_BPAmount() {
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
* BTX-10: "BP Units" - creates it if necessary
*/
public CE getBPUnits() {
CE ret = null;
try {
Type t = this.getField(10, 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
* BTX-10: "BP Units" - creates it if necessary
*/
public CE getBtx10_BPUnits() {
CE ret = null;
try {
Type t = this.getField(10, 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
* BTX-11: "BP Transfusion/Disposition Status" - creates it if necessary
*/
public CWE getBPTransfusionDispositionStatus() {
CWE ret = null;
try {
Type t = this.getField(11, 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
* BTX-11: "BP Transfusion/Disposition Status" - creates it if necessary
*/
public CWE getBtx11_BPTransfusionDispositionStatus() {
CWE ret = null;
try {
Type t = this.getField(11, 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
* BTX-12: "BP Message Status" - creates it if necessary
*/
public ID getBPMessageStatus() {
ID ret = null;
try {
Type t = this.getField(12, 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
* BTX-12: "BP Message Status" - creates it if necessary
*/
public ID getBtx12_BPMessageStatus() {
ID ret = null;
try {
Type t = this.getField(12, 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
* BTX-13: "BP Date/Time of Status" - creates it if necessary
*/
public TS getBPDateTimeOfStatus() {
TS ret = null;
try {
Type t = this.getField(13, 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
* BTX-13: "BP Date/Time of Status" - creates it if necessary
*/
public TS getBtx13_BPDateTimeOfStatus() {
TS ret = null;
try {
Type t = this.getField(13, 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
* BTX-14: "BP Administrator" - creates it if necessary
*/
public XCN getBPAdministrator() {
XCN ret = null;
try {
Type t = this.getField(14, 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
* BTX-14: "BP Administrator" - creates it if necessary
*/
public XCN getBtx14_BPAdministrator() {
XCN ret = null;
try {
Type t = this.getField(14, 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
* BTX-15: "BP Verifier" - creates it if necessary
*/
public XCN getBPVerifier() {
XCN ret = null;
try {
Type t = this.getField(15, 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
* BTX-15: "BP Verifier" - creates it if necessary
*/
public XCN getBtx15_BPVerifier() {
XCN ret = null;
try {
Type t = this.getField(15, 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
* BTX-16: "BP Transfusion Start Date/Time of Status" - creates it if necessary
*/
public TS getBPTransfusionStartDateTimeOfStatus() {
TS ret = null;
try {
Type t = this.getField(16, 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
* BTX-16: "BP Transfusion Start Date/Time of Status" - creates it if necessary
*/
public TS getBtx16_BPTransfusionStartDateTimeOfStatus() {
TS ret = null;
try {
Type t = this.getField(16, 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
* BTX-17: "BP Transfusion End Date/Time of Status" - creates it if necessary
*/
public TS getBPTransfusionEndDateTimeOfStatus() {
TS ret = null;
try {
Type t = this.getField(17, 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
* BTX-17: "BP Transfusion End Date/Time of Status" - creates it if necessary
*/
public TS getBtx17_BPTransfusionEndDateTimeOfStatus() {
TS ret = null;
try {
Type t = this.getField(17, 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 all repetitions of BP Adverse Reaction Type (BTX-18).
*/
public CWE[] getBPAdverseReactionType() {
CWE[] ret = null;
try {
Type[] t = this.getField(18);
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 BP Adverse Reaction Type (BTX-18).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getBPAdverseReactionTypeReps() {
CWE[] 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
* BTX-18: "BP Adverse Reaction Type" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getBPAdverseReactionType(int rep) {
CWE ret = null;
try {
Type t = this.getField(18, 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
* BTX-18: "BP Adverse Reaction Type" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getBtx18_BPAdverseReactionType(int rep) {
CWE ret = null;
try {
Type t = this.getField(18, 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 BP Adverse Reaction Type (BTX-18).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getBtx18_BPAdverseReactionTypeReps() {
CWE[] 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
* BTX-18: "BP Adverse Reaction Type" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE insertBPAdverseReactionType(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(18, rep);
}
/**
* Inserts a repetition of
* BTX-18: "BP Adverse Reaction Type" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE insertBtx18_BPAdverseReactionType(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(18, rep);
}
/**
* Removes a repetition of
* BTX-18: "BP Adverse Reaction Type" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE removeBPAdverseReactionType(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(18, rep);
}
/**
* Removes a repetition of
* BTX-18: "BP Adverse Reaction Type" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE removeBtx18_BPAdverseReactionType(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(18, rep);
}
/**
* Returns
* BTX-19: "BP Transfusion Interrupted Reason" - creates it if necessary
*/
public CWE getBPTransfusionInterruptedReason() {
CWE ret = null;
try {
Type t = this.getField(19, 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
* BTX-19: "BP Transfusion Interrupted Reason" - creates it if necessary
*/
public CWE getBtx19_BPTransfusionInterruptedReason() {
CWE ret = null;
try {
Type t = this.getField(19, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new SI(getMessage());
case 1: return new EI(getMessage());
case 2: return new CNE(getMessage());
case 3: return new CNE(getMessage());
case 4: return new CWE(getMessage());
case 5: return new XON(getMessage());
case 6: return new EI(getMessage());
case 7: return new NM(getMessage());
case 8: return new NM(getMessage());
case 9: return new CE(getMessage());
case 10: return new CWE(getMessage());
case 11: return new ID(getMessage(), new Integer( 511 ));
case 12: return new TS(getMessage());
case 13: return new XCN(getMessage());
case 14: return new XCN(getMessage());
case 15: return new TS(getMessage());
case 16: return new TS(getMessage());
case 17: return new CWE(getMessage());
case 18: return new CWE(getMessage());
default: return null;
}
}
}