ca.uhn.hl7v2.model.v24.segment.RXD Maven / Gradle / Ivy
/*
* This class is an auto-generated source file for a HAPI
* HL7 v2.x standard structure class.
*
* For more information, visit: http://hl7api.sourceforge.net/
*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.mozilla.org/MPL/
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
* specific language governing rights and limitations under the License.
*
* The Original Code is "[file_name]". Description:
* "[one_line_description]"
*
* The Initial Developer of the Original Code is University Health Network. Copyright (C)
* 2002. All Rights Reserved.
*
* Contributor(s): ______________________________________.
*
* Alternatively, the contents of this file may be used under the terms of the
* GNU General Public License (the "GPL"), in which case the provisions of the GPL are
* applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of the GPL and not to allow others to use your version
* of this file under the MPL, indicate your decision by deleting the provisions above
* and replace them with the notice and other provisions required by the GPL License.
* If you do not delete the provisions above, a recipient may use your version of
* this file under either the MPL or the GPL.
*
*/
package ca.uhn.hl7v2.model.v24.segment;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// import ca.uhn.hl7v2.model.v24.group.*;
import ca.uhn.hl7v2.model.v24.datatype.*;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
import ca.uhn.hl7v2.model.AbstractMessage;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Varies;
/**
*Represents an HL7 RXD message segment (Pharmacy/Treatment Dispense).
* This segment has the following fields:
*
* - RXD-1: Dispense Sub-ID Counter (NM)
*
- RXD-2: Dispense/Give Code (CE)
*
- RXD-3: Date/Time Dispensed (TS)
*
- RXD-4: Actual Dispense Amount (NM)
*
- RXD-5: Actual Dispense Units (CE) optional
*
- RXD-6: Actual Dosage Form (CE) optional
*
- RXD-7: Prescription Number (ST)
*
- RXD-8: Number of Refills Remaining (NM) optional
*
- RXD-9: Dispense Notes (ST) optional repeating
*
- RXD-10: Dispensing Provider (XCN) optional repeating
*
- RXD-11: Substitution Status (ID) optional
*
- RXD-12: Total Daily Dose (CQ) optional
*
- RXD-13: Dispense-To Location (LA2) optional
*
- RXD-14: Needs Human Review (ID) optional
*
- RXD-15: Pharmacy/Treatment Supplier's Special Dispensing Instructions (CE) optional repeating
*
- RXD-16: Actual Strength (NM) optional
*
- RXD-17: Actual Strength Unit (CE) optional
*
- RXD-18: Substance Lot Number (ST) optional repeating
*
- RXD-19: Substance Expiration Date (TS) optional repeating
*
- RXD-20: Substance Manufacturer Name (CE) optional repeating
*
- RXD-21: Indication (CE) optional repeating
*
- RXD-22: Dispense Package Size (NM) optional
*
- RXD-23: Dispense Package Size Unit (CE) optional
*
- RXD-24: Dispense Package Method (ID) optional
*
- RXD-25: Supplementary Code (CE) optional repeating
*
- RXD-26: Initiating Location (CE) optional
*
- RXD-27: Packaging/Assembly Location (CE) optional
*
*/
@SuppressWarnings("unused")
public class RXD extends AbstractSegment {
/**
* Creates a new RXD segment
*/
public RXD(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() }, "Dispense Sub-ID Counter");
this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Dispense/Give Code");
this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Date/Time Dispensed");
this.add(NM.class, true, 1, 20, new Object[]{ getMessage() }, "Actual Dispense Amount");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Actual Dispense Units");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Actual Dosage Form");
this.add(ST.class, true, 1, 20, new Object[]{ getMessage() }, "Prescription Number");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Number of Refills Remaining");
this.add(ST.class, false, 0, 200, new Object[]{ getMessage() }, "Dispense Notes");
this.add(XCN.class, false, 0, 200, new Object[]{ getMessage() }, "Dispensing Provider");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(167) }, "Substitution Status");
this.add(CQ.class, false, 1, 10, new Object[]{ getMessage() }, "Total Daily Dose");
this.add(LA2.class, false, 1, 200, new Object[]{ getMessage() }, "Dispense-To Location");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Needs Human Review");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Pharmacy/Treatment Supplier's Special Dispensing Instructions");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Actual Strength");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Actual Strength Unit");
this.add(ST.class, false, 0, 20, new Object[]{ getMessage() }, "Substance Lot Number");
this.add(TS.class, false, 0, 26, new Object[]{ getMessage() }, "Substance Expiration Date");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Substance Manufacturer Name");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Indication");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Dispense Package Size");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Dispense Package Size Unit");
this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(321) }, "Dispense Package Method");
this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Supplementary Code");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Initiating Location");
this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Packaging/Assembly Location");
} catch(HL7Exception e) {
LoggerFactory.getLogger(getClass()).error("Unexpected error creating RXD - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* RXD-1: "Dispense Sub-ID Counter" - creates it if necessary
*/
public NM getDispenseSubIDCounter() {
NM ret = null;
try {
Type t = this.getField(1, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-1: "Dispense Sub-ID Counter" - creates it if necessary
*/
public NM getRxd1_DispenseSubIDCounter() {
NM ret = null;
try {
Type t = this.getField(1, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-2: "Dispense/Give Code" - creates it if necessary
*/
public CE getDispenseGiveCode() {
CE ret = null;
try {
Type t = this.getField(2, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-2: "Dispense/Give Code" - creates it if necessary
*/
public CE getRxd2_DispenseGiveCode() {
CE ret = null;
try {
Type t = this.getField(2, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-3: "Date/Time Dispensed" - creates it if necessary
*/
public TS getDateTimeDispensed() {
TS ret = null;
try {
Type t = this.getField(3, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-3: "Date/Time Dispensed" - creates it if necessary
*/
public TS getRxd3_DateTimeDispensed() {
TS ret = null;
try {
Type t = this.getField(3, 0);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-4: "Actual Dispense Amount" - creates it if necessary
*/
public NM getActualDispenseAmount() {
NM ret = null;
try {
Type t = this.getField(4, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-4: "Actual Dispense Amount" - creates it if necessary
*/
public NM getRxd4_ActualDispenseAmount() {
NM ret = null;
try {
Type t = this.getField(4, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-5: "Actual Dispense Units" - creates it if necessary
*/
public CE getActualDispenseUnits() {
CE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-5: "Actual Dispense Units" - creates it if necessary
*/
public CE getRxd5_ActualDispenseUnits() {
CE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-6: "Actual Dosage Form" - creates it if necessary
*/
public CE getActualDosageForm() {
CE ret = null;
try {
Type t = this.getField(6, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-6: "Actual Dosage Form" - creates it if necessary
*/
public CE getRxd6_ActualDosageForm() {
CE ret = null;
try {
Type t = this.getField(6, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-7: "Prescription Number" - creates it if necessary
*/
public ST getPrescriptionNumber() {
ST ret = null;
try {
Type t = this.getField(7, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-7: "Prescription Number" - creates it if necessary
*/
public ST getRxd7_PrescriptionNumber() {
ST ret = null;
try {
Type t = this.getField(7, 0);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-8: "Number of Refills Remaining" - creates it if necessary
*/
public NM getNumberOfRefillsRemaining() {
NM ret = null;
try {
Type t = this.getField(8, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-8: "Number of Refills Remaining" - creates it if necessary
*/
public NM getRxd8_NumberOfRefillsRemaining() {
NM ret = null;
try {
Type t = this.getField(8, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Dispense Notes (RXD-9).
*/
public ST[] getDispenseNotes() {
ST[] ret = null;
try {
Type[] t = this.getField(9);
ret = new ST[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ST)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Dispense Notes (RXD-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getDispenseNotesReps() {
ST[] ret = null;
try {
Type[] t = this.getField(9);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXD-9: "Dispense Notes" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getDispenseNotes(int rep) {
ST ret = null;
try {
Type t = this.getField(9, rep);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXD-9: "Dispense Notes" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getRxd9_DispenseNotes(int rep) {
ST ret = null;
try {
Type t = this.getField(9, rep);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Dispense Notes (RXD-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxd9_DispenseNotesReps() {
ST[] ret = null;
try {
Type[] t = this.getField(9);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXD-9: "Dispense 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 ST insertDispenseNotes(int rep) throws HL7Exception {
return (ST) super.insertRepetition(9, rep);
}
/**
* Inserts a repetition of
* RXD-9: "Dispense 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 ST insertRxd9_DispenseNotes(int rep) throws HL7Exception {
return (ST) super.insertRepetition(9, rep);
}
/**
* Removes a repetition of
* RXD-9: "Dispense 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 ST removeDispenseNotes(int rep) throws HL7Exception {
return (ST) super.removeRepetition(9, rep);
}
/**
* Removes a repetition of
* RXD-9: "Dispense 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 ST removeRxd9_DispenseNotes(int rep) throws HL7Exception {
return (ST) super.removeRepetition(9, rep);
}
/**
* Returns all repetitions of Dispensing Provider (RXD-10).
*/
public XCN[] getDispensingProvider() {
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) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Dispensing Provider (RXD-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getDispensingProviderReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(10);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXD-10: "Dispensing Provider" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getDispensingProvider(int rep) {
XCN ret = null;
try {
Type t = this.getField(10, rep);
ret = (XCN)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXD-10: "Dispensing Provider" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public XCN getRxd10_DispensingProvider(int rep) {
XCN ret = null;
try {
Type t = this.getField(10, rep);
ret = (XCN)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Dispensing Provider (RXD-10).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxd10_DispensingProviderReps() {
XCN[] ret = null;
try {
Type[] t = this.getField(10);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXD-10: "Dispensing 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 insertDispensingProvider(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(10, rep);
}
/**
* Inserts a repetition of
* RXD-10: "Dispensing 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 insertRxd10_DispensingProvider(int rep) throws HL7Exception {
return (XCN) super.insertRepetition(10, rep);
}
/**
* Removes a repetition of
* RXD-10: "Dispensing 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 removeDispensingProvider(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(10, rep);
}
/**
* Removes a repetition of
* RXD-10: "Dispensing 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 removeRxd10_DispensingProvider(int rep) throws HL7Exception {
return (XCN) super.removeRepetition(10, rep);
}
/**
* Returns
* RXD-11: "Substitution Status" - creates it if necessary
*/
public ID getSubstitutionStatus() {
ID ret = null;
try {
Type t = this.getField(11, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-11: "Substitution Status" - creates it if necessary
*/
public ID getRxd11_SubstitutionStatus() {
ID ret = null;
try {
Type t = this.getField(11, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-12: "Total Daily Dose" - creates it if necessary
*/
public CQ getTotalDailyDose() {
CQ ret = null;
try {
Type t = this.getField(12, 0);
ret = (CQ)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-12: "Total Daily Dose" - creates it if necessary
*/
public CQ getRxd12_TotalDailyDose() {
CQ ret = null;
try {
Type t = this.getField(12, 0);
ret = (CQ)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-13: "Dispense-To Location" - creates it if necessary
*/
public LA2 getDispenseToLocation() {
LA2 ret = null;
try {
Type t = this.getField(13, 0);
ret = (LA2)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-13: "Dispense-To Location" - creates it if necessary
*/
public LA2 getRxd13_DispenseToLocation() {
LA2 ret = null;
try {
Type t = this.getField(13, 0);
ret = (LA2)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-14: "Needs Human Review" - creates it if necessary
*/
public ID getNeedsHumanReview() {
ID ret = null;
try {
Type t = this.getField(14, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-14: "Needs Human Review" - creates it if necessary
*/
public ID getRxd14_NeedsHumanReview() {
ID ret = null;
try {
Type t = this.getField(14, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15).
*/
public CE[] getPharmacyTreatmentSupplierSSpecialDispensingInstructions() {
CE[] ret = null;
try {
Type[] t = this.getField(15);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() {
CE[] ret = null;
try {
Type[] t = this.getField(15);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) {
CE ret = null;
try {
Type t = this.getField(15, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) {
CE ret = null;
try {
Type t = this.getField(15, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() {
CE[] ret = null;
try {
Type[] t = this.getField(15);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE insertPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception {
return (CE) super.insertRepetition(15, rep);
}
/**
* Inserts a repetition of
* RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE insertRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception {
return (CE) super.insertRepetition(15, rep);
}
/**
* Removes a repetition of
* RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE removePharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception {
return (CE) super.removeRepetition(15, rep);
}
/**
* Removes a repetition of
* RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE removeRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception {
return (CE) super.removeRepetition(15, rep);
}
/**
* Returns
* RXD-16: "Actual Strength" - creates it if necessary
*/
public NM getActualStrength() {
NM ret = null;
try {
Type t = this.getField(16, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-16: "Actual Strength" - creates it if necessary
*/
public NM getRxd16_ActualStrength() {
NM ret = null;
try {
Type t = this.getField(16, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-17: "Actual Strength Unit" - creates it if necessary
*/
public CE getActualStrengthUnit() {
CE ret = null;
try {
Type t = this.getField(17, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-17: "Actual Strength Unit" - creates it if necessary
*/
public CE getRxd17_ActualStrengthUnit() {
CE ret = null;
try {
Type t = this.getField(17, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Substance Lot Number (RXD-18).
*/
public ST[] getSubstanceLotNumber() {
ST[] ret = null;
try {
Type[] t = this.getField(18);
ret = new ST[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (ST)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Substance Lot Number (RXD-18).
* 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(18);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXD-18: "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(18, rep);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXD-18: "Substance Lot Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getRxd18_SubstanceLotNumber(int rep) {
ST ret = null;
try {
Type t = this.getField(18, rep);
ret = (ST)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Substance Lot Number (RXD-18).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxd18_SubstanceLotNumberReps() {
ST[] ret = null;
try {
Type[] t = this.getField(18);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXD-18: "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(18, rep);
}
/**
* Inserts a repetition of
* RXD-18: "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 insertRxd18_SubstanceLotNumber(int rep) throws HL7Exception {
return (ST) super.insertRepetition(18, rep);
}
/**
* Removes a repetition of
* RXD-18: "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(18, rep);
}
/**
* Removes a repetition of
* RXD-18: "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 removeRxd18_SubstanceLotNumber(int rep) throws HL7Exception {
return (ST) super.removeRepetition(18, rep);
}
/**
* Returns all repetitions of Substance Expiration Date (RXD-19).
*/
public TS[] getSubstanceExpirationDate() {
TS[] ret = null;
try {
Type[] t = this.getField(19);
ret = new TS[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (TS)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSubstanceExpirationDateReps() {
TS[] ret = null;
try {
Type[] t = this.getField(19);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXD-19: "Substance Expiration Date" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public TS getSubstanceExpirationDate(int rep) {
TS ret = null;
try {
Type t = this.getField(19, rep);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXD-19: "Substance Expiration Date" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public TS getRxd19_SubstanceExpirationDate(int rep) {
TS ret = null;
try {
Type t = this.getField(19, rep);
ret = (TS)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxd19_SubstanceExpirationDateReps() {
TS[] ret = null;
try {
Type[] t = this.getField(19);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXD-19: "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 TS insertSubstanceExpirationDate(int rep) throws HL7Exception {
return (TS) super.insertRepetition(19, rep);
}
/**
* Inserts a repetition of
* RXD-19: "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 TS insertRxd19_SubstanceExpirationDate(int rep) throws HL7Exception {
return (TS) super.insertRepetition(19, rep);
}
/**
* Removes a repetition of
* RXD-19: "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 TS removeSubstanceExpirationDate(int rep) throws HL7Exception {
return (TS) super.removeRepetition(19, rep);
}
/**
* Removes a repetition of
* RXD-19: "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 TS removeRxd19_SubstanceExpirationDate(int rep) throws HL7Exception {
return (TS) super.removeRepetition(19, rep);
}
/**
* Returns all repetitions of Substance Manufacturer Name (RXD-20).
*/
public CE[] getSubstanceManufacturerName() {
CE[] ret = null;
try {
Type[] t = this.getField(20);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSubstanceManufacturerNameReps() {
CE[] ret = null;
try {
Type[] t = this.getField(20);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXD-20: "Substance Manufacturer Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getSubstanceManufacturerName(int rep) {
CE ret = null;
try {
Type t = this.getField(20, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXD-20: "Substance Manufacturer Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getRxd20_SubstanceManufacturerName(int rep) {
CE ret = null;
try {
Type t = this.getField(20, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxd20_SubstanceManufacturerNameReps() {
CE[] ret = null;
try {
Type[] t = this.getField(20);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXD-20: "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 CE insertSubstanceManufacturerName(int rep) throws HL7Exception {
return (CE) super.insertRepetition(20, rep);
}
/**
* Inserts a repetition of
* RXD-20: "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 CE insertRxd20_SubstanceManufacturerName(int rep) throws HL7Exception {
return (CE) super.insertRepetition(20, rep);
}
/**
* Removes a repetition of
* RXD-20: "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 CE removeSubstanceManufacturerName(int rep) throws HL7Exception {
return (CE) super.removeRepetition(20, rep);
}
/**
* Removes a repetition of
* RXD-20: "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 CE removeRxd20_SubstanceManufacturerName(int rep) throws HL7Exception {
return (CE) super.removeRepetition(20, rep);
}
/**
* Returns all repetitions of Indication (RXD-21).
*/
public CE[] getIndication() {
CE[] ret = null;
try {
Type[] t = this.getField(21);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Indication (RXD-21).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getIndicationReps() {
CE[] ret = null;
try {
Type[] t = this.getField(21);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXD-21: "Indication" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getIndication(int rep) {
CE ret = null;
try {
Type t = this.getField(21, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXD-21: "Indication" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getRxd21_Indication(int rep) {
CE ret = null;
try {
Type t = this.getField(21, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Indication (RXD-21).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxd21_IndicationReps() {
CE[] ret = null;
try {
Type[] t = this.getField(21);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXD-21: "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 CE insertIndication(int rep) throws HL7Exception {
return (CE) super.insertRepetition(21, rep);
}
/**
* Inserts a repetition of
* RXD-21: "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 CE insertRxd21_Indication(int rep) throws HL7Exception {
return (CE) super.insertRepetition(21, rep);
}
/**
* Removes a repetition of
* RXD-21: "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 CE removeIndication(int rep) throws HL7Exception {
return (CE) super.removeRepetition(21, rep);
}
/**
* Removes a repetition of
* RXD-21: "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 CE removeRxd21_Indication(int rep) throws HL7Exception {
return (CE) super.removeRepetition(21, rep);
}
/**
* Returns
* RXD-22: "Dispense Package Size" - creates it if necessary
*/
public NM getDispensePackageSize() {
NM ret = null;
try {
Type t = this.getField(22, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-22: "Dispense Package Size" - creates it if necessary
*/
public NM getRxd22_DispensePackageSize() {
NM ret = null;
try {
Type t = this.getField(22, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-23: "Dispense Package Size Unit" - creates it if necessary
*/
public CE getDispensePackageSizeUnit() {
CE ret = null;
try {
Type t = this.getField(23, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-23: "Dispense Package Size Unit" - creates it if necessary
*/
public CE getRxd23_DispensePackageSizeUnit() {
CE ret = null;
try {
Type t = this.getField(23, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-24: "Dispense Package Method" - creates it if necessary
*/
public ID getDispensePackageMethod() {
ID ret = null;
try {
Type t = this.getField(24, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-24: "Dispense Package Method" - creates it if necessary
*/
public ID getRxd24_DispensePackageMethod() {
ID ret = null;
try {
Type t = this.getField(24, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Supplementary Code (RXD-25).
*/
public CE[] getSupplementaryCode() {
CE[] ret = null;
try {
Type[] t = this.getField(25);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)t[i];
}
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Supplementary Code (RXD-25).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getSupplementaryCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(25);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Returns a specific repetition of
* RXD-25: "Supplementary Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getSupplementaryCode(int rep) {
CE ret = null;
try {
Type t = this.getField(25, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXD-25: "Supplementary Code" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getRxd25_SupplementaryCode(int rep) {
CE ret = null;
try {
Type t = this.getField(25, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Supplementary Code (RXD-25).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxd25_SupplementaryCodeReps() {
CE[] ret = null;
try {
Type[] t = this.getField(25);
return t.length;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
}
/**
* Inserts a repetition of
* RXD-25: "Supplementary Code" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE insertSupplementaryCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(25, rep);
}
/**
* Inserts a repetition of
* RXD-25: "Supplementary Code" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE insertRxd25_SupplementaryCode(int rep) throws HL7Exception {
return (CE) super.insertRepetition(25, rep);
}
/**
* Removes a repetition of
* RXD-25: "Supplementary Code" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE removeSupplementaryCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(25, rep);
}
/**
* Removes a repetition of
* RXD-25: "Supplementary Code" at a specific index
*
* @param rep The repetition index (0-indexed)
* @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
*/
public CE removeRxd25_SupplementaryCode(int rep) throws HL7Exception {
return (CE) super.removeRepetition(25, rep);
}
/**
* Returns
* RXD-26: "Initiating Location" - creates it if necessary
*/
public CE getInitiatingLocation() {
CE ret = null;
try {
Type t = this.getField(26, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-26: "Initiating Location" - creates it if necessary
*/
public CE getRxd26_InitiatingLocation() {
CE ret = null;
try {
Type t = this.getField(26, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-27: "Packaging/Assembly Location" - creates it if necessary
*/
public CE getPackagingAssemblyLocation() {
CE ret = null;
try {
Type t = this.getField(27, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXD-27: "Packaging/Assembly Location" - creates it if necessary
*/
public CE getRxd27_PackagingAssemblyLocation() {
CE ret = null;
try {
Type t = this.getField(27, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
LoggerFactory.getLogger(getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new NM(getMessage());
case 1: return new CE(getMessage());
case 2: return new TS(getMessage());
case 3: return new NM(getMessage());
case 4: return new CE(getMessage());
case 5: return new CE(getMessage());
case 6: return new ST(getMessage());
case 7: return new NM(getMessage());
case 8: return new ST(getMessage());
case 9: return new XCN(getMessage());
case 10: return new ID(getMessage(), new Integer( 167 ));
case 11: return new CQ(getMessage());
case 12: return new LA2(getMessage());
case 13: return new ID(getMessage(), new Integer( 136 ));
case 14: return new CE(getMessage());
case 15: return new NM(getMessage());
case 16: return new CE(getMessage());
case 17: return new ST(getMessage());
case 18: return new TS(getMessage());
case 19: return new CE(getMessage());
case 20: return new CE(getMessage());
case 21: return new NM(getMessage());
case 22: return new CE(getMessage());
case 23: return new ID(getMessage(), new Integer( 321 ));
case 24: return new CE(getMessage());
case 25: return new CE(getMessage());
case 26: return new CE(getMessage());
default: return null;
}
}
}