ca.uhn.hl7v2.model.v26.segment.RXA Maven / Gradle / Ivy
/*
* This class is an auto-generated source file for a HAPI
* HL7 v2.x standard structure class.
*
* For more information, visit: http://hl7api.sourceforge.net/
*/
package ca.uhn.hl7v2.model.v26.segment;
// import ca.uhn.hl7v2.model.v26.group.*;
import ca.uhn.hl7v2.model.v26.datatype.*;
import ca.uhn.log.HapiLogFactory;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
import ca.uhn.hl7v2.model.AbstractMessage;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Varies;
/**
*Represents an HL7 RXA message segment (Pharmacy/Treatment Administration).
* This segment has the following fields:
*
* - RXA-1: Give Sub-ID Counter (NM)
*
- RXA-2: Administration Sub-ID Counter (NM)
*
- RXA-3: Date/Time Start of Administration (DTM)
*
- RXA-4: Date/Time End of Administration (DTM)
*
- RXA-5: Administered Code (CWE)
*
- RXA-6: Administered Amount (NM)
*
- RXA-7: Administered Units (CWE) optional
*
- RXA-8: Administered Dosage Form (CWE) optional
*
- RXA-9: Administration Notes (CWE) optional repeating
*
- RXA-10: Administering Provider (XCN) optional repeating
*
- RXA-11: Administered-at Location (LA2) optional
*
- RXA-12: Administered Per (Time Unit) (ST) optional
*
- RXA-13: Administered Strength (NM) optional
*
- RXA-14: Administered Strength Units (CWE) optional
*
- RXA-15: Substance Lot Number (ST) optional repeating
*
- RXA-16: Substance Expiration Date (DTM) optional repeating
*
- RXA-17: Substance Manufacturer Name (CWE) optional repeating
*
- RXA-18: Substance/Treatment Refusal Reason (CWE) optional repeating
*
- RXA-19: Indication (CWE) optional repeating
*
- RXA-20: Completion Status (ID) optional
*
- RXA-21: Action Code - RXA (ID) optional
*
- RXA-22: System Entry Date/Time (DTM) optional
*
- RXA-23: Administered Drug Strength Volume (NM) optional
*
- RXA-24: Administered Drug Strength Volume Units (CWE) optional
*
- RXA-25: Administered Barcode Identifier (CWE) optional
*
- RXA-26: Pharmacy Order Type (ID) optional
*
- RXA-27: Administer-at (PL) optional
*
- RXA-28: Administered-at Address (XAD) optional
*
*/
public class RXA extends AbstractSegment {
/**
* Creates a new RXA segment
*/
public RXA(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(NM.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Give Sub-ID Counter");
this.add(NM.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Administration Sub-ID Counter");
this.add(DTM.class, true, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Date/Time Start of Administration");
this.add(DTM.class, true, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "Date/Time End of Administration");
this.add(CWE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(292) }, "Administered Code");
this.add(NM.class, true, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Administered Amount");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Administered Units");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Administered Dosage Form");
this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(9999) }, "Administration Notes");
this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Administering Provider");
this.add(LA2.class, false, 1, 0, new Object[]{ getMessage(), new Integer(0) }, "Administered-at Location");
this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Administered Per (Time Unit)");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Administered Strength");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Administered Strength Units");
this.add(ST.class, false, 0, 20, new Object[]{ getMessage(), new Integer(0) }, "Substance Lot Number");
this.add(DTM.class, false, 0, 24, new Object[]{ getMessage(), new Integer(0) }, "Substance Expiration Date");
this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(227) }, "Substance Manufacturer Name");
this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(9999) }, "Substance/Treatment Refusal Reason");
this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(9999) }, "Indication");
this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Completion Status");
this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Action Code - RXA");
this.add(DTM.class, false, 1, 24, new Object[]{ getMessage(), new Integer(0) }, "System Entry Date/Time");
this.add(NM.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Administered Drug Strength Volume");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Administered Drug Strength Volume Units");
this.add(CWE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(9999) }, "Administered Barcode Identifier");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Pharmacy Order Type");
this.add(PL.class, false, 1, 180, new Object[]{ getMessage(), new Integer(0) }, "Administer-at");
this.add(XAD.class, false, 1, 106, new Object[]{ getMessage(), new Integer(0) }, "Administered-at Address");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RXA - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* RXA-1: "Give Sub-ID Counter" - creates it if necessary
*/
public NM getGiveSubIDCounter() {
NM ret = null;
try {
Type t = this.getField(1, 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
* RXA-1: "Give Sub-ID Counter" - creates it if necessary
*/
public NM getRxa1_GiveSubIDCounter() {
NM ret = null;
try {
Type t = this.getField(1, 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
* RXA-2: "Administration Sub-ID Counter" - creates it if necessary
*/
public NM getAdministrationSubIDCounter() {
NM ret = null;
try {
Type t = this.getField(2, 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
* RXA-2: "Administration Sub-ID Counter" - creates it if necessary
*/
public NM getRxa2_AdministrationSubIDCounter() {
NM ret = null;
try {
Type t = this.getField(2, 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
* RXA-3: "Date/Time Start of Administration" - creates it if necessary
*/
public DTM getDateTimeStartOfAdministration() {
DTM ret = null;
try {
Type t = this.getField(3, 0);
ret = (DTM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXA-3: "Date/Time Start of Administration" - creates it if necessary
*/
public DTM getRxa3_DateTimeStartOfAdministration() {
DTM ret = null;
try {
Type t = this.getField(3, 0);
ret = (DTM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXA-4: "Date/Time End of Administration" - creates it if necessary
*/
public DTM getDateTimeEndOfAdministration() {
DTM ret = null;
try {
Type t = this.getField(4, 0);
ret = (DTM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXA-4: "Date/Time End of Administration" - creates it if necessary
*/
public DTM getRxa4_DateTimeEndOfAdministration() {
DTM ret = null;
try {
Type t = this.getField(4, 0);
ret = (DTM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXA-5: "Administered Code" - creates it if necessary
*/
public CWE getAdministeredCode() {
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
* RXA-5: "Administered Code" - creates it if necessary
*/
public CWE getRxa5_AdministeredCode() {
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
* RXA-6: "Administered Amount" - creates it if necessary
*/
public NM getAdministeredAmount() {
NM ret = null;
try {
Type t = this.getField(6, 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
* RXA-6: "Administered Amount" - creates it if necessary
*/
public NM getRxa6_AdministeredAmount() {
NM ret = null;
try {
Type t = this.getField(6, 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
* RXA-7: "Administered Units" - creates it if necessary
*/
public CWE getAdministeredUnits() {
CWE ret = null;
try {
Type t = this.getField(7, 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
* RXA-7: "Administered Units" - creates it if necessary
*/
public CWE getRxa7_AdministeredUnits() {
CWE ret = null;
try {
Type t = this.getField(7, 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
* RXA-8: "Administered Dosage Form" - creates it if necessary
*/
public CWE getAdministeredDosageForm() {
CWE ret = null;
try {
Type t = this.getField(8, 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
* RXA-8: "Administered Dosage Form" - creates it if necessary
*/
public CWE getRxa8_AdministeredDosageForm() {
CWE ret = null;
try {
Type t = this.getField(8, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Administration Notes (RXA-9).
*/
public CWE[] getAdministrationNotes() {
CWE[] ret = null;
try {
Type[] t = this.getField(9);
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 Administration Notes (RXA-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getAdministrationNotesReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(9);
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
* RXA-9: "Administration Notes" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getAdministrationNotes(int rep) {
CWE ret = null;
try {
Type t = this.getField(9, 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
* RXA-9: "Administration Notes" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRxa9_AdministrationNotes(int rep) {
CWE ret = null;
try {
Type t = this.getField(9, 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 Administration Notes (RXA-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxa9_AdministrationNotesReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(9);
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
* RXA-9: "Administration Notes" 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 insertAdministrationNotes(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(9, rep);
}
/**
* Inserts a repetition of
* RXA-9: "Administration Notes" 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 insertRxa9_AdministrationNotes(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(9, rep);
}
/**
* Removes a repetition of
* RXA-9: "Administration Notes" 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 removeAdministrationNotes(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(9, rep);
}
/**
* Removes a repetition of
* RXA-9: "Administration Notes" 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 removeRxa9_AdministrationNotes(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(9, rep);
}
/**
* Returns all repetitions of Administering Provider (RXA-10).
*/
public XCN[] getAdministeringProvider() {
XCN[] ret = null;
try {
Type[] t = this.getField(10);
ret = new XCN[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (XCN)t[i];
}
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Administering Provider (RXA-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getAdministeringProviderReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(10);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXA-10: "Administering Provider" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getAdministeringProvider(int rep) {
XCN ret = null;
try {
Type t = this.getField(10, rep);
ret = (XCN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXA-10: "Administering Provider" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getRxa10_AdministeringProvider(int rep) {
XCN ret = null;
try {
Type t = this.getField(10, rep);
ret = (XCN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Administering Provider (RXA-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxa10_AdministeringProviderReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(10);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXA-10: "Administering Provider" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public XCN insertAdministeringProvider(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(10, rep);
}
/**
* Inserts a repetition of
* RXA-10: "Administering Provider" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public XCN insertRxa10_AdministeringProvider(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(10, rep);
}
/**
* Removes a repetition of
* RXA-10: "Administering Provider" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public XCN removeAdministeringProvider(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(10, rep);
}
/**
* Removes a repetition of
* RXA-10: "Administering Provider" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public XCN removeRxa10_AdministeringProvider(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(10, rep);
}
/**
* Returns
* RXA-11: "Administered-at Location" - creates it if necessary
*/
public LA2 getAdministeredAtLocation() {
LA2 ret = null;
try {
Type t = this.getField(11, 0);
ret = (LA2)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
* RXA-11: "Administered-at Location" - creates it if necessary
*/
public LA2 getRxa11_AdministeredAtLocation() {
LA2 ret = null;
try {
Type t = this.getField(11, 0);
ret = (LA2)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
* RXA-12: "Administered Per (Time Unit)" - creates it if necessary
*/
public ST getAdministeredPerTimeUnit() {
ST ret = null;
try {
Type t = this.getField(12, 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
* RXA-12: "Administered Per (Time Unit)" - creates it if necessary
*/
public ST getRxa12_AdministeredPerTimeUnit() {
ST ret = null;
try {
Type t = this.getField(12, 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
* RXA-13: "Administered Strength" - creates it if necessary
*/
public NM getAdministeredStrength() {
NM ret = null;
try {
Type t = this.getField(13, 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
* RXA-13: "Administered Strength" - creates it if necessary
*/
public NM getRxa13_AdministeredStrength() {
NM ret = null;
try {
Type t = this.getField(13, 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
* RXA-14: "Administered Strength Units" - creates it if necessary
*/
public CWE getAdministeredStrengthUnits() {
CWE ret = null;
try {
Type t = this.getField(14, 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
* RXA-14: "Administered Strength Units" - creates it if necessary
*/
public CWE getRxa14_AdministeredStrengthUnits() {
CWE ret = null;
try {
Type t = this.getField(14, 0);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Substance Lot Number (RXA-15).
*/
public ST[] getSubstanceLotNumber() {
ST[] ret = null;
try {
Type[] t = this.getField(15);
ret = new ST[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ST)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 Substance Lot Number (RXA-15).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSubstanceLotNumberReps() {
ST[] ret = null;
try {
Type[] t = this.getField(15);
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
* RXA-15: "Substance Lot Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getSubstanceLotNumber(int rep) {
ST ret = null;
try {
Type t = this.getField(15, rep);
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 a specific repetition of
* RXA-15: "Substance Lot Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getRxa15_SubstanceLotNumber(int rep) {
ST ret = null;
try {
Type t = this.getField(15, rep);
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 a count of the current number of repetitions of Substance Lot Number (RXA-15).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxa15_SubstanceLotNumberReps() {
ST[] ret = null;
try {
Type[] t = this.getField(15);
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
* RXA-15: "Substance Lot Number" 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 ST insertSubstanceLotNumber(int rep) throws HL7Exception {
return (ST) super.insertRepetition(15, rep);
}
/**
* Inserts a repetition of
* RXA-15: "Substance Lot Number" 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 ST insertRxa15_SubstanceLotNumber(int rep) throws HL7Exception {
return (ST) super.insertRepetition(15, rep);
}
/**
* Removes a repetition of
* RXA-15: "Substance Lot Number" 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 ST removeSubstanceLotNumber(int rep) throws HL7Exception {
return (ST) super.removeRepetition(15, rep);
}
/**
* Removes a repetition of
* RXA-15: "Substance Lot Number" 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 ST removeRxa15_SubstanceLotNumber(int rep) throws HL7Exception {
return (ST) super.removeRepetition(15, rep);
}
/**
* Returns all repetitions of Substance Expiration Date (RXA-16).
*/
public DTM[] getSubstanceExpirationDate() {
DTM[] ret = null;
try {
Type[] t = this.getField(16);
ret = new DTM[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (DTM)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 Substance Expiration Date (RXA-16).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSubstanceExpirationDateReps() {
DTM[] ret = null;
try {
Type[] t = this.getField(16);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXA-16: "Substance Expiration Date" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public DTM getSubstanceExpirationDate(int rep) {
DTM ret = null;
try {
Type t = this.getField(16, rep);
ret = (DTM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXA-16: "Substance Expiration Date" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public DTM getRxa16_SubstanceExpirationDate(int rep) {
DTM ret = null;
try {
Type t = this.getField(16, rep);
ret = (DTM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Substance Expiration Date (RXA-16).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxa16_SubstanceExpirationDateReps() {
DTM[] ret = null;
try {
Type[] t = this.getField(16);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXA-16: "Substance Expiration Date" 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 DTM insertSubstanceExpirationDate(int rep) throws HL7Exception {
return (DTM) super.insertRepetition(16, rep);
}
/**
* Inserts a repetition of
* RXA-16: "Substance Expiration Date" 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 DTM insertRxa16_SubstanceExpirationDate(int rep) throws HL7Exception {
return (DTM) super.insertRepetition(16, rep);
}
/**
* Removes a repetition of
* RXA-16: "Substance Expiration Date" 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 DTM removeSubstanceExpirationDate(int rep) throws HL7Exception {
return (DTM) super.removeRepetition(16, rep);
}
/**
* Removes a repetition of
* RXA-16: "Substance Expiration Date" 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 DTM removeRxa16_SubstanceExpirationDate(int rep) throws HL7Exception {
return (DTM) super.removeRepetition(16, rep);
}
/**
* Returns all repetitions of Substance Manufacturer Name (RXA-17).
*/
public CWE[] getSubstanceManufacturerName() {
CWE[] ret = null;
try {
Type[] t = this.getField(17);
ret = new CWE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CWE)t[i];
}
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Substance Manufacturer Name (RXA-17).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSubstanceManufacturerNameReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(17);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXA-17: "Substance Manufacturer Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getSubstanceManufacturerName(int rep) {
CWE ret = null;
try {
Type t = this.getField(17, rep);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXA-17: "Substance Manufacturer Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRxa17_SubstanceManufacturerName(int rep) {
CWE ret = null;
try {
Type t = this.getField(17, rep);
ret = (CWE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Substance Manufacturer Name (RXA-17).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxa17_SubstanceManufacturerNameReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(17);
return t.length;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXA-17: "Substance Manufacturer Name" 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 insertSubstanceManufacturerName(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(17, rep);
}
/**
* Inserts a repetition of
* RXA-17: "Substance Manufacturer Name" 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 insertRxa17_SubstanceManufacturerName(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(17, rep);
}
/**
* Removes a repetition of
* RXA-17: "Substance Manufacturer Name" 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 removeSubstanceManufacturerName(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(17, rep);
}
/**
* Removes a repetition of
* RXA-17: "Substance Manufacturer Name" 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 removeRxa17_SubstanceManufacturerName(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(17, rep);
}
/**
* Returns all repetitions of Substance/Treatment Refusal Reason (RXA-18).
*/
public CWE[] getSubstanceTreatmentRefusalReason() {
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 Substance/Treatment Refusal Reason (RXA-18).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSubstanceTreatmentRefusalReasonReps() {
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
* RXA-18: "Substance/Treatment Refusal Reason" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getSubstanceTreatmentRefusalReason(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
* RXA-18: "Substance/Treatment Refusal Reason" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRxa18_SubstanceTreatmentRefusalReason(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 Substance/Treatment Refusal Reason (RXA-18).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxa18_SubstanceTreatmentRefusalReasonReps() {
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
* RXA-18: "Substance/Treatment Refusal Reason" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE insertSubstanceTreatmentRefusalReason(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(18, rep);
}
/**
* Inserts a repetition of
* RXA-18: "Substance/Treatment Refusal Reason" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE insertRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(18, rep);
}
/**
* Removes a repetition of
* RXA-18: "Substance/Treatment Refusal Reason" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE removeSubstanceTreatmentRefusalReason(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(18, rep);
}
/**
* Removes a repetition of
* RXA-18: "Substance/Treatment Refusal Reason" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CWE removeRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(18, rep);
}
/**
* Returns all repetitions of Indication (RXA-19).
*/
public CWE[] getIndication() {
CWE[] ret = null;
try {
Type[] t = this.getField(19);
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 Indication (RXA-19).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getIndicationReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(19);
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
* RXA-19: "Indication" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getIndication(int rep) {
CWE ret = null;
try {
Type t = this.getField(19, 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
* RXA-19: "Indication" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRxa19_Indication(int rep) {
CWE ret = null;
try {
Type t = this.getField(19, 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 Indication (RXA-19).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxa19_IndicationReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(19);
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
* RXA-19: "Indication" 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 insertIndication(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(19, rep);
}
/**
* Inserts a repetition of
* RXA-19: "Indication" 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 insertRxa19_Indication(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(19, rep);
}
/**
* Removes a repetition of
* RXA-19: "Indication" 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 removeIndication(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(19, rep);
}
/**
* Removes a repetition of
* RXA-19: "Indication" 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 removeRxa19_Indication(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(19, rep);
}
/**
* Returns
* RXA-20: "Completion Status" - creates it if necessary
*/
public ID getCompletionStatus() {
ID ret = null;
try {
Type t = this.getField(20, 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
* RXA-20: "Completion Status" - creates it if necessary
*/
public ID getRxa20_CompletionStatus() {
ID ret = null;
try {
Type t = this.getField(20, 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
* RXA-21: "Action Code - RXA" - creates it if necessary
*/
public ID getActionCodeRXA() {
ID ret = null;
try {
Type t = this.getField(21, 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
* RXA-21: "Action Code - RXA" - creates it if necessary
*/
public ID getRxa21_ActionCodeRXA() {
ID ret = null;
try {
Type t = this.getField(21, 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
* RXA-22: "System Entry Date/Time" - creates it if necessary
*/
public DTM getSystemEntryDateTime() {
DTM ret = null;
try {
Type t = this.getField(22, 0);
ret = (DTM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXA-22: "System Entry Date/Time" - creates it if necessary
*/
public DTM getRxa22_SystemEntryDateTime() {
DTM ret = null;
try {
Type t = this.getField(22, 0);
ret = (DTM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXA-23: "Administered Drug Strength Volume" - creates it if necessary
*/
public NM getAdministeredDrugStrengthVolume() {
NM ret = null;
try {
Type t = this.getField(23, 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
* RXA-23: "Administered Drug Strength Volume" - creates it if necessary
*/
public NM getRxa23_AdministeredDrugStrengthVolume() {
NM ret = null;
try {
Type t = this.getField(23, 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
* RXA-24: "Administered Drug Strength Volume Units" - creates it if necessary
*/
public CWE getAdministeredDrugStrengthVolumeUnits() {
CWE ret = null;
try {
Type t = this.getField(24, 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
* RXA-24: "Administered Drug Strength Volume Units" - creates it if necessary
*/
public CWE getRxa24_AdministeredDrugStrengthVolumeUnits() {
CWE ret = null;
try {
Type t = this.getField(24, 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
* RXA-25: "Administered Barcode Identifier" - creates it if necessary
*/
public CWE getAdministeredBarcodeIdentifier() {
CWE ret = null;
try {
Type t = this.getField(25, 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
* RXA-25: "Administered Barcode Identifier" - creates it if necessary
*/
public CWE getRxa25_AdministeredBarcodeIdentifier() {
CWE ret = null;
try {
Type t = this.getField(25, 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
* RXA-26: "Pharmacy Order Type" - creates it if necessary
*/
public ID getPharmacyOrderType() {
ID ret = null;
try {
Type t = this.getField(26, 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
* RXA-26: "Pharmacy Order Type" - creates it if necessary
*/
public ID getRxa26_PharmacyOrderType() {
ID ret = null;
try {
Type t = this.getField(26, 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
* RXA-27: "Administer-at" - creates it if necessary
*/
public PL getAdministerAt() {
PL ret = null;
try {
Type t = this.getField(27, 0);
ret = (PL)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
* RXA-27: "Administer-at" - creates it if necessary
*/
public PL getRxa27_AdministerAt() {
PL ret = null;
try {
Type t = this.getField(27, 0);
ret = (PL)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
* RXA-28: "Administered-at Address" - creates it if necessary
*/
public XAD getAdministeredAtAddress() {
XAD ret = null;
try {
Type t = this.getField(28, 0);
ret = (XAD)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXA-28: "Administered-at Address" - creates it if necessary
*/
public XAD getRxa28_AdministeredAtAddress() {
XAD ret = null;
try {
Type t = this.getField(28, 0);
ret = (XAD)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new NM(getMessage());
case 1: return new NM(getMessage());
case 2: return new DTM(getMessage());
case 3: return new DTM(getMessage());
case 4: return new CWE(getMessage());
case 5: return new NM(getMessage());
case 6: return new CWE(getMessage());
case 7: return new CWE(getMessage());
case 8: return new CWE(getMessage());
case 9: return new XCN(getMessage());
case 10: return new LA2(getMessage());
case 11: return new ST(getMessage());
case 12: return new NM(getMessage());
case 13: return new CWE(getMessage());
case 14: return new ST(getMessage());
case 15: return new DTM(getMessage());
case 16: return new CWE(getMessage());
case 17: return new CWE(getMessage());
case 18: return new CWE(getMessage());
case 19: return new ID(getMessage(), new Integer( 322 ));
case 20: return new ID(getMessage(), new Integer( 206 ));
case 21: return new DTM(getMessage());
case 22: return new NM(getMessage());
case 23: return new CWE(getMessage());
case 24: return new CWE(getMessage());
case 25: return new ID(getMessage(), new Integer( 480 ));
case 26: return new PL(getMessage());
case 27: return new XAD(getMessage());
default: return null;
}
}
}