ca.uhn.hl7v2.model.v26.segment.RXG 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 RXG message segment (Pharmacy/Treatment Give).
* This segment has the following fields:
*
* - RXG-1: Give Sub-ID Counter (NM)
*
- RXG-2: Dispense Sub-ID Counter (NM) optional
*
- RXG-3: Quantity/Timing (TQ) optional
*
- RXG-4: Give Code (CWE)
*
- RXG-5: Give Amount - Minimum (NM)
*
- RXG-6: Give Amount - Maximum (NM) optional
*
- RXG-7: Give Units (CWE)
*
- RXG-8: Give Dosage Form (CWE) optional
*
- RXG-9: Administration Notes (CWE) optional repeating
*
- RXG-10: Substitution Status (ID) optional
*
- RXG-11: Dispense-to Location (LA2) optional
*
- RXG-12: Needs Human Review (ID) optional
*
- RXG-13: Pharmacy/Treatment Supplier's Special Administration Instructions (CWE) optional repeating
*
- RXG-14: Give Per (Time Unit) (ST) optional
*
- RXG-15: Give Rate Amount (ST) optional
*
- RXG-16: Give Rate Units (CWE) optional
*
- RXG-17: Give Strength (NM) optional
*
- RXG-18: Give Strength Units (CWE) optional
*
- RXG-19: Substance Lot Number (ST) optional repeating
*
- RXG-20: Substance Expiration Date (DTM) optional repeating
*
- RXG-21: Substance Manufacturer Name (CWE) optional repeating
*
- RXG-22: Indication (CWE) optional repeating
*
- RXG-23: Give Drug Strength Volume (NM) optional
*
- RXG-24: Give Drug Strength Volume Units (CWE) optional
*
- RXG-25: Give Barcode Identifier (CWE) optional
*
- RXG-26: Pharmacy Order Type (ID) optional
*
- RXG-27: Dispense to Pharmacy (CWE) optional
*
- RXG-28: Dispense to Pharmacy Address (XAD) optional
*
- RXG-29: Deliver-to Patient Location (PL) optional
*
- RXG-30: Deliver-to Address (XAD) optional
*
*/
public class RXG extends AbstractSegment {
/**
* Creates a new RXG segment
*/
public RXG(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, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Dispense Sub-ID Counter");
this.add(TQ.class, false, 1, 0, new Object[]{ getMessage(), new Integer(0) }, "Quantity/Timing");
this.add(CWE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(292) }, "Give Code");
this.add(NM.class, true, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Give Amount - Minimum");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Give Amount - Maximum");
this.add(CWE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Give Units");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Give Dosage Form");
this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(9999) }, "Administration Notes");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Substitution Status");
this.add(LA2.class, false, 1, 0, new Object[]{ getMessage(), new Integer(0) }, "Dispense-to Location");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Needs Human Review");
this.add(CWE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(9999) }, "Pharmacy/Treatment Supplier's Special Administration Instructions");
this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Give Per (Time Unit)");
this.add(ST.class, false, 1, 6, new Object[]{ getMessage(), new Integer(0) }, "Give Rate Amount");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Give Rate Units");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Give Strength");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Give 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) }, "Indication");
this.add(NM.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Give Drug Strength Volume");
this.add(CWE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(9999) }, "Give Drug Strength Volume Units");
this.add(CWE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(9999) }, "Give Barcode Identifier");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Pharmacy Order Type");
this.add(CWE.class, false, 1, 180, new Object[]{ getMessage(), new Integer(9999) }, "Dispense to Pharmacy");
this.add(XAD.class, false, 1, 106, new Object[]{ getMessage(), new Integer(0) }, "Dispense to Pharmacy Address");
this.add(PL.class, false, 1, 80, new Object[]{ getMessage(), new Integer(0) }, "Deliver-to Patient Location");
this.add(XAD.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Deliver-to Address");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RXG - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* RXG-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
* RXG-1: "Give Sub-ID Counter" - creates it if necessary
*/
public NM getRxg1_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
* RXG-2: "Dispense Sub-ID Counter" - creates it if necessary
*/
public NM getDispenseSubIDCounter() {
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
* RXG-2: "Dispense Sub-ID Counter" - creates it if necessary
*/
public NM getRxg2_DispenseSubIDCounter() {
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
* RXG-3: "Quantity/Timing" - creates it if necessary
*/
public TQ getQuantityTiming() {
TQ ret = null;
try {
Type t = this.getField(3, 0);
ret = (TQ)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
* RXG-3: "Quantity/Timing" - creates it if necessary
*/
public TQ getRxg3_QuantityTiming() {
TQ ret = null;
try {
Type t = this.getField(3, 0);
ret = (TQ)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
* RXG-4: "Give Code" - creates it if necessary
*/
public CWE getGiveCode() {
CWE ret = null;
try {
Type t = this.getField(4, 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
* RXG-4: "Give Code" - creates it if necessary
*/
public CWE getRxg4_GiveCode() {
CWE ret = null;
try {
Type t = this.getField(4, 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
* RXG-5: "Give Amount - Minimum" - creates it if necessary
*/
public NM getGiveAmountMinimum() {
NM ret = null;
try {
Type t = this.getField(5, 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
* RXG-5: "Give Amount - Minimum" - creates it if necessary
*/
public NM getRxg5_GiveAmountMinimum() {
NM ret = null;
try {
Type t = this.getField(5, 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
* RXG-6: "Give Amount - Maximum" - creates it if necessary
*/
public NM getGiveAmountMaximum() {
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
* RXG-6: "Give Amount - Maximum" - creates it if necessary
*/
public NM getRxg6_GiveAmountMaximum() {
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
* RXG-7: "Give Units" - creates it if necessary
*/
public CWE getGiveUnits() {
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
* RXG-7: "Give Units" - creates it if necessary
*/
public CWE getRxg7_GiveUnits() {
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
* RXG-8: "Give Dosage Form" - creates it if necessary
*/
public CWE getGiveDosageForm() {
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
* RXG-8: "Give Dosage Form" - creates it if necessary
*/
public CWE getRxg8_GiveDosageForm() {
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 (RXG-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 (RXG-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
* RXG-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
* RXG-9: "Administration Notes" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRxg9_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 (RXG-9).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxg9_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
* RXG-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
* RXG-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 insertRxg9_AdministrationNotes(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(9, rep);
}
/**
* Removes a repetition of
* RXG-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
* RXG-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 removeRxg9_AdministrationNotes(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(9, rep);
}
/**
* Returns
* RXG-10: "Substitution Status" - creates it if necessary
*/
public ID getSubstitutionStatus() {
ID ret = null;
try {
Type t = this.getField(10, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXG-10: "Substitution Status" - creates it if necessary
*/
public ID getRxg10_SubstitutionStatus() {
ID ret = null;
try {
Type t = this.getField(10, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXG-11: "Dispense-to Location" - creates it if necessary
*/
public LA2 getDispenseToLocation() {
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
* RXG-11: "Dispense-to Location" - creates it if necessary
*/
public LA2 getRxg11_DispenseToLocation() {
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
* RXG-12: "Needs Human Review" - creates it if necessary
*/
public ID getNeedsHumanReview() {
ID ret = null;
try {
Type t = this.getField(12, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXG-12: "Needs Human Review" - creates it if necessary
*/
public ID getRxg12_NeedsHumanReview() {
ID ret = null;
try {
Type t = this.getField(12, 0);
ret = (ID)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Pharmacy/Treatment Supplier's Special Administration Instructions (RXG-13).
*/
public CWE[] getPharmacyTreatmentSupplierSSpecialAdministrationInstructions() {
CWE[] ret = null;
try {
Type[] t = this.getField(13);
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 Pharmacy/Treatment Supplier's Special Administration Instructions (RXG-13).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getPharmacyTreatmentSupplierSSpecialAdministrationInstructionsReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(13);
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
* RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getPharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) {
CWE ret = null;
try {
Type t = this.getField(13, 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
* RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) {
CWE ret = null;
try {
Type t = this.getField(13, 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 Pharmacy/Treatment Supplier's Special Administration Instructions (RXG-13).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructionsReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(13);
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
* RXG-13: "Pharmacy/Treatment Supplier's Special Administration 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 CWE insertPharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(13, rep);
}
/**
* Inserts a repetition of
* RXG-13: "Pharmacy/Treatment Supplier's Special Administration 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 CWE insertRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(13, rep);
}
/**
* Removes a repetition of
* RXG-13: "Pharmacy/Treatment Supplier's Special Administration 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 CWE removePharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(13, rep);
}
/**
* Removes a repetition of
* RXG-13: "Pharmacy/Treatment Supplier's Special Administration 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 CWE removeRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(13, rep);
}
/**
* Returns
* RXG-14: "Give Per (Time Unit)" - creates it if necessary
*/
public ST getGivePerTimeUnit() {
ST ret = null;
try {
Type t = this.getField(14, 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
* RXG-14: "Give Per (Time Unit)" - creates it if necessary
*/
public ST getRxg14_GivePerTimeUnit() {
ST ret = null;
try {
Type t = this.getField(14, 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
* RXG-15: "Give Rate Amount" - creates it if necessary
*/
public ST getGiveRateAmount() {
ST ret = null;
try {
Type t = this.getField(15, 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
* RXG-15: "Give Rate Amount" - creates it if necessary
*/
public ST getRxg15_GiveRateAmount() {
ST ret = null;
try {
Type t = this.getField(15, 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
* RXG-16: "Give Rate Units" - creates it if necessary
*/
public CWE getGiveRateUnits() {
CWE ret = null;
try {
Type t = this.getField(16, 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
* RXG-16: "Give Rate Units" - creates it if necessary
*/
public CWE getRxg16_GiveRateUnits() {
CWE ret = null;
try {
Type t = this.getField(16, 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
* RXG-17: "Give Strength" - creates it if necessary
*/
public NM getGiveStrength() {
NM ret = null;
try {
Type t = this.getField(17, 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
* RXG-17: "Give Strength" - creates it if necessary
*/
public NM getRxg17_GiveStrength() {
NM ret = null;
try {
Type t = this.getField(17, 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
* RXG-18: "Give Strength Units" - creates it if necessary
*/
public CWE getGiveStrengthUnits() {
CWE ret = null;
try {
Type t = this.getField(18, 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
* RXG-18: "Give Strength Units" - creates it if necessary
*/
public CWE getRxg18_GiveStrengthUnits() {
CWE ret = null;
try {
Type t = this.getField(18, 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 (RXG-19).
*/
public ST[] getSubstanceLotNumber() {
ST[] ret = null;
try {
Type[] t = this.getField(19);
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 (RXG-19).
* 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(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
* RXG-19: "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(19, 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
* RXG-19: "Substance Lot Number" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public ST getRxg19_SubstanceLotNumber(int rep) {
ST ret = null;
try {
Type t = this.getField(19, 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 (RXG-19).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxg19_SubstanceLotNumberReps() {
ST[] 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
* RXG-19: "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(19, rep);
}
/**
* Inserts a repetition of
* RXG-19: "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 insertRxg19_SubstanceLotNumber(int rep) throws HL7Exception {
return (ST) super.insertRepetition(19, rep);
}
/**
* Removes a repetition of
* RXG-19: "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(19, rep);
}
/**
* Removes a repetition of
* RXG-19: "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 removeRxg19_SubstanceLotNumber(int rep) throws HL7Exception {
return (ST) super.removeRepetition(19, rep);
}
/**
* Returns all repetitions of Substance Expiration Date (RXG-20).
*/
public DTM[] getSubstanceExpirationDate() {
DTM[] ret = null;
try {
Type[] t = this.getField(20);
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 (RXG-20).
* 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(20);
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
* RXG-20: "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(20, 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
* RXG-20: "Substance Expiration Date" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public DTM getRxg20_SubstanceExpirationDate(int rep) {
DTM ret = null;
try {
Type t = this.getField(20, 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 (RXG-20).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxg20_SubstanceExpirationDateReps() {
DTM[] ret = null;
try {
Type[] t = this.getField(20);
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
* RXG-20: "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(20, rep);
}
/**
* Inserts a repetition of
* RXG-20: "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 insertRxg20_SubstanceExpirationDate(int rep) throws HL7Exception {
return (DTM) super.insertRepetition(20, rep);
}
/**
* Removes a repetition of
* RXG-20: "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(20, rep);
}
/**
* Removes a repetition of
* RXG-20: "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 removeRxg20_SubstanceExpirationDate(int rep) throws HL7Exception {
return (DTM) super.removeRepetition(20, rep);
}
/**
* Returns all repetitions of Substance Manufacturer Name (RXG-21).
*/
public CWE[] getSubstanceManufacturerName() {
CWE[] ret = null;
try {
Type[] t = this.getField(21);
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 (RXG-21).
* 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(21);
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
* RXG-21: "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(21, 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
* RXG-21: "Substance Manufacturer Name" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRxg21_SubstanceManufacturerName(int rep) {
CWE ret = null;
try {
Type t = this.getField(21, 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 (RXG-21).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxg21_SubstanceManufacturerNameReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(21);
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
* RXG-21: "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(21, rep);
}
/**
* Inserts a repetition of
* RXG-21: "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 insertRxg21_SubstanceManufacturerName(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(21, rep);
}
/**
* Removes a repetition of
* RXG-21: "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(21, rep);
}
/**
* Removes a repetition of
* RXG-21: "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 removeRxg21_SubstanceManufacturerName(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(21, rep);
}
/**
* Returns all repetitions of Indication (RXG-22).
*/
public CWE[] getIndication() {
CWE[] ret = null;
try {
Type[] t = this.getField(22);
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 (RXG-22).
* 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(22);
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
* RXG-22: "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(22, 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
* RXG-22: "Indication" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CWE getRxg22_Indication(int rep) {
CWE ret = null;
try {
Type t = this.getField(22, 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 (RXG-22).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxg22_IndicationReps() {
CWE[] ret = null;
try {
Type[] t = this.getField(22);
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
* RXG-22: "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(22, rep);
}
/**
* Inserts a repetition of
* RXG-22: "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 insertRxg22_Indication(int rep) throws HL7Exception {
return (CWE) super.insertRepetition(22, rep);
}
/**
* Removes a repetition of
* RXG-22: "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(22, rep);
}
/**
* Removes a repetition of
* RXG-22: "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 removeRxg22_Indication(int rep) throws HL7Exception {
return (CWE) super.removeRepetition(22, rep);
}
/**
* Returns
* RXG-23: "Give Drug Strength Volume" - creates it if necessary
*/
public NM getGiveDrugStrengthVolume() {
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
* RXG-23: "Give Drug Strength Volume" - creates it if necessary
*/
public NM getRxg23_GiveDrugStrengthVolume() {
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
* RXG-24: "Give Drug Strength Volume Units" - creates it if necessary
*/
public CWE getGiveDrugStrengthVolumeUnits() {
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
* RXG-24: "Give Drug Strength Volume Units" - creates it if necessary
*/
public CWE getRxg24_GiveDrugStrengthVolumeUnits() {
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
* RXG-25: "Give Barcode Identifier" - creates it if necessary
*/
public CWE getGiveBarcodeIdentifier() {
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
* RXG-25: "Give Barcode Identifier" - creates it if necessary
*/
public CWE getRxg25_GiveBarcodeIdentifier() {
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
* RXG-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
* RXG-26: "Pharmacy Order Type" - creates it if necessary
*/
public ID getRxg26_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
* RXG-27: "Dispense to Pharmacy" - creates it if necessary
*/
public CWE getDispenseToPharmacy() {
CWE ret = null;
try {
Type t = this.getField(27, 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
* RXG-27: "Dispense to Pharmacy" - creates it if necessary
*/
public CWE getRxg27_DispenseToPharmacy() {
CWE ret = null;
try {
Type t = this.getField(27, 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
* RXG-28: "Dispense to Pharmacy Address" - creates it if necessary
*/
public XAD getDispenseToPharmacyAddress() {
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
* RXG-28: "Dispense to Pharmacy Address" - creates it if necessary
*/
public XAD getRxg28_DispenseToPharmacyAddress() {
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
* RXG-29: "Deliver-to Patient Location" - creates it if necessary
*/
public PL getDeliverToPatientLocation() {
PL ret = null;
try {
Type t = this.getField(29, 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
* RXG-29: "Deliver-to Patient Location" - creates it if necessary
*/
public PL getRxg29_DeliverToPatientLocation() {
PL ret = null;
try {
Type t = this.getField(29, 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
* RXG-30: "Deliver-to Address" - creates it if necessary
*/
public XAD getDeliverToAddress() {
XAD ret = null;
try {
Type t = this.getField(30, 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
* RXG-30: "Deliver-to Address" - creates it if necessary
*/
public XAD getRxg30_DeliverToAddress() {
XAD ret = null;
try {
Type t = this.getField(30, 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 TQ(getMessage());
case 3: return new CWE(getMessage());
case 4: return new NM(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 ID(getMessage(), new Integer( 167 ));
case 10: return new LA2(getMessage());
case 11: return new ID(getMessage(), new Integer( 136 ));
case 12: return new CWE(getMessage());
case 13: return new ST(getMessage());
case 14: return new ST(getMessage());
case 15: return new CWE(getMessage());
case 16: return new NM(getMessage());
case 17: return new CWE(getMessage());
case 18: return new ST(getMessage());
case 19: return new DTM(getMessage());
case 20: return new CWE(getMessage());
case 21: return new CWE(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 CWE(getMessage());
case 27: return new XAD(getMessage());
case 28: return new PL(getMessage());
case 29: return new XAD(getMessage());
default: return null;
}
}
}