ca.uhn.hl7v2.model.v23.segment.RXO 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.v23.segment;
// import ca.uhn.hl7v2.model.v23.group.*;
import ca.uhn.hl7v2.model.v23.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 RXO message segment (Pharmacy prescription order segment).
* This segment has the following fields:
*
* - RXO-1: Requested Give Code (CE)
*
- RXO-2: Requested Give Amount - Minimum (NM)
*
- RXO-3: Requested Give Amount - Maximum (NM) optional
*
- RXO-4: Requested Give Units (CE)
*
- RXO-5: Requested Dosage Form (CE) optional
*
- RXO-6: Provider's Pharmacy Instructions (CE) optional repeating
*
- RXO-7: Provider's Administration Instructions (CE) optional repeating
*
- RXO-8: Deliver To Location (CM_LA1) optional
*
- RXO-9: Allow Substitutions (ID) optional
*
- RXO-10: Requested Dispense Code (CE) optional
*
- RXO-11: Requested Dispense Amount (NM) optional
*
- RXO-12: Requested Dispense Units (CE) optional
*
- RXO-13: Number of Refills (NM) optional
*
- RXO-14: Ordering Provider's DEA Number (CN) optional
*
- RXO-15: Pharmacist/Treatment Supplier's Verifier ID (CN) optional
*
- RXO-16: Needs Human Review (ID) optional
*
- RXO-17: Requested Give Per (Time Unit) (ST) optional
*
- RXO-18: Requested Give Strength (NM) optional
*
- RXO-19: Requested Give Strength Units (CE) optional
*
- RXO-20: Indication (CE) optional
*
- RXO-21: Requested Give Rate Amount (ST) optional
*
- RXO-22: Requested Give Rate Units (CE) optional
*
*/
public class RXO extends AbstractSegment {
/**
* Creates a new RXO segment
*/
public RXO(Group parent, ModelClassFactory factory) {
super(parent, factory);
init(factory);
}
private void init(ModelClassFactory factory) {
try {
this.add(CE.class, true, 1, 100, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Code");
this.add(NM.class, true, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Amount - Minimum");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Amount - Maximum");
this.add(CE.class, true, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Units");
this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Dosage Form");
this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Provider's Pharmacy Instructions");
this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Provider's Administration Instructions");
this.add(CM_LA1.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Deliver To Location");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Allow Substitutions");
this.add(CE.class, false, 1, 100, new Object[]{ getMessage(), new Integer(0) }, "Requested Dispense Code");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Dispense Amount");
this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Dispense Units");
this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Number of Refills");
this.add(CN.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Ordering Provider's DEA Number");
this.add(CN.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Pharmacist/Treatment Supplier's Verifier ID");
this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Needs Human Review");
this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Per (Time Unit)");
this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Strength");
this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Strength Units");
this.add(CE.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Indication");
this.add(ST.class, false, 1, 6, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Rate Amount");
this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Rate Units");
} catch(HL7Exception e) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RXO - this is probably a bug in the source code generator.", e);
}
}
/**
* Returns
* RXO-1: "Requested Give Code" - creates it if necessary
*/
public CE getRequestedGiveCode() {
CE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-1: "Requested Give Code" - creates it if necessary
*/
public CE getRxo1_RequestedGiveCode() {
CE ret = null;
try {
Type t = this.getField(1, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-2: "Requested Give Amount - Minimum" - creates it if necessary
*/
public NM getRequestedGiveAmountMinimum() {
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
* RXO-2: "Requested Give Amount - Minimum" - creates it if necessary
*/
public NM getRxo2_RequestedGiveAmountMinimum() {
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
* RXO-3: "Requested Give Amount - Maximum" - creates it if necessary
*/
public NM getRequestedGiveAmountMaximum() {
NM ret = null;
try {
Type t = this.getField(3, 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
* RXO-3: "Requested Give Amount - Maximum" - creates it if necessary
*/
public NM getRxo3_RequestedGiveAmountMaximum() {
NM ret = null;
try {
Type t = this.getField(3, 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
* RXO-4: "Requested Give Units" - creates it if necessary
*/
public CE getRequestedGiveUnits() {
CE ret = null;
try {
Type t = this.getField(4, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-4: "Requested Give Units" - creates it if necessary
*/
public CE getRxo4_RequestedGiveUnits() {
CE ret = null;
try {
Type t = this.getField(4, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-5: "Requested Dosage Form" - creates it if necessary
*/
public CE getRequestedDosageForm() {
CE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-5: "Requested Dosage Form" - creates it if necessary
*/
public CE getRxo5_RequestedDosageForm() {
CE ret = null;
try {
Type t = this.getField(5, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns all repetitions of Provider's Pharmacy Instructions (RXO-6).
*/
public CE[] getProviderSPharmacyInstructions() {
CE[] ret = null;
try {
Type[] t = this.getField(6);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)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 Provider's Pharmacy Instructions (RXO-6).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getProviderSPharmacyInstructionsReps() {
CE[] ret = null;
try {
Type[] t = this.getField(6);
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
* RXO-6: "Provider's Pharmacy Instructions" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getProviderSPharmacyInstructions(int rep) {
CE ret = null;
try {
Type t = this.getField(6, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXO-6: "Provider's Pharmacy Instructions" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getRxo6_ProviderSPharmacyInstructions(int rep) {
CE ret = null;
try {
Type t = this.getField(6, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Provider's Pharmacy Instructions (RXO-6).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxo6_ProviderSPharmacyInstructionsReps() {
CE[] ret = null;
try {
Type[] t = this.getField(6);
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
* RXO-6: "Provider's Pharmacy 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 insertProviderSPharmacyInstructions(int rep) throws HL7Exception {
return (CE) super.insertRepetition(6, rep);
}
/**
* Inserts a repetition of
* RXO-6: "Provider's Pharmacy 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 insertRxo6_ProviderSPharmacyInstructions(int rep) throws HL7Exception {
return (CE) super.insertRepetition(6, rep);
}
/**
* Removes a repetition of
* RXO-6: "Provider's Pharmacy 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 removeProviderSPharmacyInstructions(int rep) throws HL7Exception {
return (CE) super.removeRepetition(6, rep);
}
/**
* Removes a repetition of
* RXO-6: "Provider's Pharmacy 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 removeRxo6_ProviderSPharmacyInstructions(int rep) throws HL7Exception {
return (CE) super.removeRepetition(6, rep);
}
/**
* Returns all repetitions of Provider's Administration Instructions (RXO-7).
*/
public CE[] getProviderSAdministrationInstructions() {
CE[] ret = null;
try {
Type[] t = this.getField(7);
ret = new CE[t.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = (CE)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 Provider's Administration Instructions (RXO-7).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getProviderSAdministrationInstructionsReps() {
CE[] ret = null;
try {
Type[] t = this.getField(7);
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
* RXO-7: "Provider's Administration Instructions" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getProviderSAdministrationInstructions(int rep) {
CE ret = null;
try {
Type t = this.getField(7, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a specific repetition of
* RXO-7: "Provider's Administration Instructions" - creates it if necessary
*
* @param rep The repetition index (0-indexed)
*/
public CE getRxo7_ProviderSAdministrationInstructions(int rep) {
CE ret = null;
try {
Type t = this.getField(7, rep);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns a count of the current number of repetitions of Provider's Administration Instructions (RXO-7).
* This method does not create a repetition, so if no repetitions have currently been defined or accessed,
* it will return zero.
*/
public int getRxo7_ProviderSAdministrationInstructionsReps() {
CE[] ret = null;
try {
Type[] t = this.getField(7);
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
* RXO-7: "Provider's 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 CE insertProviderSAdministrationInstructions(int rep) throws HL7Exception {
return (CE) super.insertRepetition(7, rep);
}
/**
* Inserts a repetition of
* RXO-7: "Provider's 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 CE insertRxo7_ProviderSAdministrationInstructions(int rep) throws HL7Exception {
return (CE) super.insertRepetition(7, rep);
}
/**
* Removes a repetition of
* RXO-7: "Provider's 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 CE removeProviderSAdministrationInstructions(int rep) throws HL7Exception {
return (CE) super.removeRepetition(7, rep);
}
/**
* Removes a repetition of
* RXO-7: "Provider's 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 CE removeRxo7_ProviderSAdministrationInstructions(int rep) throws HL7Exception {
return (CE) super.removeRepetition(7, rep);
}
/**
* Returns
* RXO-8: "Deliver To Location" - creates it if necessary
*/
public CM_LA1 getDeliverToLocation() {
CM_LA1 ret = null;
try {
Type t = this.getField(8, 0);
ret = (CM_LA1)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
* RXO-8: "Deliver To Location" - creates it if necessary
*/
public CM_LA1 getRxo8_DeliverToLocation() {
CM_LA1 ret = null;
try {
Type t = this.getField(8, 0);
ret = (CM_LA1)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
* RXO-9: "Allow Substitutions" - creates it if necessary
*/
public ID getAllowSubstitutions() {
ID ret = null;
try {
Type t = this.getField(9, 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
* RXO-9: "Allow Substitutions" - creates it if necessary
*/
public ID getRxo9_AllowSubstitutions() {
ID ret = null;
try {
Type t = this.getField(9, 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
* RXO-10: "Requested Dispense Code" - creates it if necessary
*/
public CE getRequestedDispenseCode() {
CE ret = null;
try {
Type t = this.getField(10, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-10: "Requested Dispense Code" - creates it if necessary
*/
public CE getRxo10_RequestedDispenseCode() {
CE ret = null;
try {
Type t = this.getField(10, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-11: "Requested Dispense Amount" - creates it if necessary
*/
public NM getRequestedDispenseAmount() {
NM ret = null;
try {
Type t = this.getField(11, 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
* RXO-11: "Requested Dispense Amount" - creates it if necessary
*/
public NM getRxo11_RequestedDispenseAmount() {
NM ret = null;
try {
Type t = this.getField(11, 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
* RXO-12: "Requested Dispense Units" - creates it if necessary
*/
public CE getRequestedDispenseUnits() {
CE ret = null;
try {
Type t = this.getField(12, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-12: "Requested Dispense Units" - creates it if necessary
*/
public CE getRxo12_RequestedDispenseUnits() {
CE ret = null;
try {
Type t = this.getField(12, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-13: "Number of Refills" - creates it if necessary
*/
public NM getNumberOfRefills() {
NM ret = null;
try {
Type t = this.getField(13, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-13: "Number of Refills" - creates it if necessary
*/
public NM getRxo13_NumberOfRefills() {
NM ret = null;
try {
Type t = this.getField(13, 0);
ret = (NM)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-14: "Ordering Provider's DEA Number" - creates it if necessary
*/
public CN getOrderingProviderSDEANumber() {
CN ret = null;
try {
Type t = this.getField(14, 0);
ret = (CN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-14: "Ordering Provider's DEA Number" - creates it if necessary
*/
public CN getRxo14_OrderingProviderSDEANumber() {
CN ret = null;
try {
Type t = this.getField(14, 0);
ret = (CN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-15: "Pharmacist/Treatment Supplier's Verifier ID" - creates it if necessary
*/
public CN getPharmacistTreatmentSupplierSVerifierID() {
CN ret = null;
try {
Type t = this.getField(15, 0);
ret = (CN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-15: "Pharmacist/Treatment Supplier's Verifier ID" - creates it if necessary
*/
public CN getRxo15_PharmacistTreatmentSupplierSVerifierID() {
CN ret = null;
try {
Type t = this.getField(15, 0);
ret = (CN)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-16: "Needs Human Review" - creates it if necessary
*/
public ID getNeedsHumanReview() {
ID ret = null;
try {
Type t = this.getField(16, 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
* RXO-16: "Needs Human Review" - creates it if necessary
*/
public ID getRxo16_NeedsHumanReview() {
ID ret = null;
try {
Type t = this.getField(16, 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
* RXO-17: "Requested Give Per (Time Unit)" - creates it if necessary
*/
public ST getRequestedGivePerTimeUnit() {
ST ret = null;
try {
Type t = this.getField(17, 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
* RXO-17: "Requested Give Per (Time Unit)" - creates it if necessary
*/
public ST getRxo17_RequestedGivePerTimeUnit() {
ST ret = null;
try {
Type t = this.getField(17, 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
* RXO-18: "Requested Give Strength" - creates it if necessary
*/
public NM getRequestedGiveStrength() {
NM ret = null;
try {
Type t = this.getField(18, 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
* RXO-18: "Requested Give Strength" - creates it if necessary
*/
public NM getRxo18_RequestedGiveStrength() {
NM ret = null;
try {
Type t = this.getField(18, 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
* RXO-19: "Requested Give Strength Units" - creates it if necessary
*/
public CE getRequestedGiveStrengthUnits() {
CE ret = null;
try {
Type t = this.getField(19, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-19: "Requested Give Strength Units" - creates it if necessary
*/
public CE getRxo19_RequestedGiveStrengthUnits() {
CE ret = null;
try {
Type t = this.getField(19, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-20: "Indication" - creates it if necessary
*/
public CE getIndication() {
CE ret = null;
try {
Type t = this.getField(20, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-20: "Indication" - creates it if necessary
*/
public CE getRxo20_Indication() {
CE ret = null;
try {
Type t = this.getField(20, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-21: "Requested Give Rate Amount" - creates it if necessary
*/
public ST getRequestedGiveRateAmount() {
ST ret = null;
try {
Type t = this.getField(21, 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
* RXO-21: "Requested Give Rate Amount" - creates it if necessary
*/
public ST getRxo21_RequestedGiveRateAmount() {
ST ret = null;
try {
Type t = this.getField(21, 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
* RXO-22: "Requested Give Rate Units" - creates it if necessary
*/
public CE getRequestedGiveRateUnits() {
CE ret = null;
try {
Type t = this.getField(22, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/**
* Returns
* RXO-22: "Requested Give Rate Units" - creates it if necessary
*/
public CE getRxo22_RequestedGiveRateUnits() {
CE ret = null;
try {
Type t = this.getField(22, 0);
ret = (CE)t;
} catch (ClassCastException cce) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
throw new RuntimeException(cce);
} catch (HL7Exception he) {
HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
throw new RuntimeException(he);
}
return ret;
}
/** {@inheritDoc} */
protected Type createNewTypeWithoutReflection(int field) {
switch (field) {
case 0: return new CE(getMessage());
case 1: return new NM(getMessage());
case 2: return new NM(getMessage());
case 3: return new CE(getMessage());
case 4: return new CE(getMessage());
case 5: return new CE(getMessage());
case 6: return new CE(getMessage());
case 7: return new CM_LA1(getMessage());
case 8: return new ID(getMessage(), new Integer( 161 ));
case 9: return new CE(getMessage());
case 10: return new NM(getMessage());
case 11: return new CE(getMessage());
case 12: return new NM(getMessage());
case 13: return new CN(getMessage());
case 14: return new CN(getMessage());
case 15: return new ID(getMessage(), new Integer( 136 ));
case 16: return new ST(getMessage());
case 17: return new NM(getMessage());
case 18: return new CE(getMessage());
case 19: return new CE(getMessage());
case 20: return new ST(getMessage());
case 21: return new CE(getMessage());
default: return null;
}
}
}