All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.hl7v2.model.v22.segment.RXG Maven / Gradle / Ivy

There is a newer version: 2.3
Show newest version
/*
 * 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.v22.segment;

// import ca.uhn.hl7v2.model.v22.group.*;
import ca.uhn.hl7v2.model.v22.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 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 repeating *
  • RXG-4: Give Code (CE) *
  • RXG-5: Give Amount - Minimum (NM) *
  • RXG-6: Give Amount - Maximum (NM) optional *
  • RXG-7: Give Units (CE) *
  • RXG-8: Give Dosage Form (CE) optional *
  • RXG-9: Administration Notes (ST) optional *
  • RXG-10: Substitution Status (ID) optional *
  • RXG-11: Deliver-to location (CM_LA1) optional *
  • RXG-12: Needs Human Review (ID) optional *
  • RXG-13: Pharmacy Special Administration Instructions (CE) optional repeating *
  • RXG-14: Give Per (Time Unit) (ST) optional *
  • RXG-15: Give Rate Amount (CE) optional *
  • RXG-16: Give Rate Units (CE) 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, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Quantity / timing"); this.add(CE.class, true, 1, 100, new Object[]{ getMessage(), new Integer(0) }, "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(CE.class, true, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Give Units"); this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Give Dosage Form"); this.add(ST.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Administration Notes"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Substitution Status"); this.add(CM_LA1.class, false, 1, 12, new Object[]{ getMessage(), new Integer(0) }, "Deliver-to location"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Needs Human Review"); this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Pharmacy Special Administration Instructions"); this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Give Per (Time Unit)"); this.add(CE.class, false, 1, 6, new Object[]{ getMessage(), new Integer(0) }, "Give Rate Amount"); this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Give Rate Units"); } 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 all repetitions of Quantity / timing (RXG-3). */ public TQ[] getQuantityTiming() { TQ[] ret = null; try { Type[] t = this.getField(3); ret = new TQ[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (TQ)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 Quantity / timing (RXG-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getQuantityTimingReps() { TQ[] ret = null; try { Type[] t = this.getField(3); 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-3: "Quantity / timing" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public TQ getQuantityTiming(int rep) { TQ ret = null; try { Type t = this.getField(3, rep); 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 a specific repetition of * RXG-3: "Quantity / timing" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public TQ getRxg3_QuantityTiming(int rep) { TQ ret = null; try { Type t = this.getField(3, rep); 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 a count of the current number of repetitions of Quantity / timing (RXG-3). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRxg3_QuantityTimingReps() { TQ[] ret = null; try { Type[] t = this.getField(3); 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-3: "Quantity / timing" 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 TQ insertQuantityTiming(int rep) throws HL7Exception { return (TQ) super.insertRepetition(3, rep); } /** * Inserts a repetition of * RXG-3: "Quantity / timing" 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 TQ insertRxg3_QuantityTiming(int rep) throws HL7Exception { return (TQ) super.insertRepetition(3, rep); } /** * Removes a repetition of * RXG-3: "Quantity / timing" 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 TQ removeQuantityTiming(int rep) throws HL7Exception { return (TQ) super.removeRepetition(3, rep); } /** * Removes a repetition of * RXG-3: "Quantity / timing" 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 TQ removeRxg3_QuantityTiming(int rep) throws HL7Exception { return (TQ) super.removeRepetition(3, rep); } /** * Returns * RXG-4: "Give Code" - creates it if necessary */ public CE getGiveCode() { 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 * RXG-4: "Give Code" - creates it if necessary */ public CE getRxg4_GiveCode() { 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 * 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 CE getGiveUnits() { CE ret = null; try { Type t = this.getField(7, 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 * RXG-7: "Give Units" - creates it if necessary */ public CE getRxg7_GiveUnits() { CE ret = null; try { Type t = this.getField(7, 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 * RXG-8: "Give Dosage Form" - creates it if necessary */ public CE getGiveDosageForm() { CE ret = null; try { Type t = this.getField(8, 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 * RXG-8: "Give Dosage Form" - creates it if necessary */ public CE getRxg8_GiveDosageForm() { CE ret = null; try { Type t = this.getField(8, 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 * RXG-9: "Administration Notes" - creates it if necessary */ public ST getAdministrationNotes() { ST ret = null; try { Type t = this.getField(9, 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-9: "Administration Notes" - creates it if necessary */ public ST getRxg9_AdministrationNotes() { ST ret = null; try { Type t = this.getField(9, 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-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: "Deliver-to location" - creates it if necessary */ public CM_LA1 getDeliverToLocation() { CM_LA1 ret = null; try { Type t = this.getField(11, 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 * RXG-11: "Deliver-to location" - creates it if necessary */ public CM_LA1 getRxg11_DeliverToLocation() { CM_LA1 ret = null; try { Type t = this.getField(11, 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 * 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 Special Administration Instructions (RXG-13). */ public CE[] getPharmacySpecialAdministrationInstructions() { CE[] ret = null; try { Type[] t = this.getField(13); 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 Pharmacy 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 getPharmacySpecialAdministrationInstructionsReps() { CE[] 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 Special Administration Instructions" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getPharmacySpecialAdministrationInstructions(int rep) { CE ret = null; try { Type t = this.getField(13, 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 * RXG-13: "Pharmacy Special Administration Instructions" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getRxg13_PharmacySpecialAdministrationInstructions(int rep) { CE ret = null; try { Type t = this.getField(13, 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 Pharmacy 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_PharmacySpecialAdministrationInstructionsReps() { CE[] 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 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 CE insertPharmacySpecialAdministrationInstructions(int rep) throws HL7Exception { return (CE) super.insertRepetition(13, rep); } /** * Inserts a repetition of * RXG-13: "Pharmacy 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 CE insertRxg13_PharmacySpecialAdministrationInstructions(int rep) throws HL7Exception { return (CE) super.insertRepetition(13, rep); } /** * Removes a repetition of * RXG-13: "Pharmacy 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 CE removePharmacySpecialAdministrationInstructions(int rep) throws HL7Exception { return (CE) super.removeRepetition(13, rep); } /** * Removes a repetition of * RXG-13: "Pharmacy 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 CE removeRxg13_PharmacySpecialAdministrationInstructions(int rep) throws HL7Exception { return (CE) 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 CE getGiveRateAmount() { CE ret = null; try { Type t = this.getField(15, 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 * RXG-15: "Give Rate Amount" - creates it if necessary */ public CE getRxg15_GiveRateAmount() { CE ret = null; try { Type t = this.getField(15, 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 * RXG-16: "Give Rate Units" - creates it if necessary */ public CE getGiveRateUnits() { CE ret = null; try { Type t = this.getField(16, 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 * RXG-16: "Give Rate Units" - creates it if necessary */ public CE getRxg16_GiveRateUnits() { CE ret = null; try { Type t = this.getField(16, 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 NM(getMessage()); case 1: return new NM(getMessage()); case 2: return new TQ(getMessage()); case 3: return new CE(getMessage()); case 4: return new NM(getMessage()); case 5: return new NM(getMessage()); case 6: return new CE(getMessage()); case 7: return new CE(getMessage()); case 8: return new ST(getMessage()); case 9: return new ID(getMessage(), new Integer( 167 )); case 10: return new CM_LA1(getMessage()); case 11: return new ID(getMessage(), new Integer( 0 )); case 12: return new CE(getMessage()); case 13: return new ST(getMessage()); case 14: return new CE(getMessage()); case 15: return new CE(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy