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

ca.uhn.hl7v2.model.v24.segment.RXA 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.v24.segment;

// import ca.uhn.hl7v2.model.v24.group.*;
import ca.uhn.hl7v2.model.v24.datatype.*;
import ca.uhn.log.HapiLogFactory;
import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.parser.ModelClassFactory;
import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
import ca.uhn.hl7v2.model.AbstractMessage;
import ca.uhn.hl7v2.model.Group;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.AbstractSegment;
import ca.uhn.hl7v2.model.Varies;

/**
 *

Represents an HL7 RXA message segment (Pharmacy/Treatment Administration). * This segment has the following fields:

*
    *
  • RXA-1: Give Sub-ID Counter (NM) *
  • RXA-2: Administration Sub-ID Counter (NM) *
  • RXA-3: Date/Time Start of Administration (TS) *
  • RXA-4: Date/Time End of Administration (TS) *
  • RXA-5: Administered Code (CE) *
  • RXA-6: Administered Amount (NM) *
  • RXA-7: Administered Units (CE) optional *
  • RXA-8: Administered Dosage Form (CE) optional *
  • RXA-9: Administration Notes (CE) optional repeating *
  • RXA-10: Administering Provider (XCN) optional repeating *
  • RXA-11: Administered-at Location (LA2) optional *
  • RXA-12: Administered Per (Time Unit) (ST) optional *
  • RXA-13: Administered Strength (NM) optional *
  • RXA-14: Administered Strength Units (CE) optional *
  • RXA-15: Substance Lot Number (ST) optional repeating *
  • RXA-16: Substance Expiration Date (TS) optional repeating *
  • RXA-17: Substance Manufacturer Name (CE) optional repeating *
  • RXA-18: Substance/Treatment Refusal Reason (CE) optional repeating *
  • RXA-19: Indication (CE) optional repeating *
  • RXA-20: Completion Status (ID) optional *
  • RXA-21: Action Code-RXA (ID) optional *
  • RXA-22: System Entry Date/Time (TS) optional *
*/ public class RXA extends AbstractSegment { /** * Creates a new RXA segment */ public RXA(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(NM.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Give Sub-ID Counter"); this.add(NM.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Administration Sub-ID Counter"); this.add(TS.class, true, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date/Time Start of Administration"); this.add(TS.class, true, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date/Time End of Administration"); this.add(CE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(292) }, "Administered Code"); this.add(NM.class, true, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Administered Amount"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Administered Units"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Administered Dosage Form"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Administration Notes"); this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Administering Provider"); this.add(LA2.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Administered-at Location"); this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Administered Per (Time Unit)"); this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Administered Strength"); this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Administered Strength Units"); this.add(ST.class, false, 0, 20, new Object[]{ getMessage(), new Integer(0) }, "Substance Lot Number"); this.add(TS.class, false, 0, 26, new Object[]{ getMessage(), new Integer(0) }, "Substance Expiration Date"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(227) }, "Substance Manufacturer Name"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Substance/Treatment Refusal Reason"); this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Indication"); this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Completion Status"); this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Action Code-RXA"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "System Entry Date/Time"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RXA - this is probably a bug in the source code generator.", e); } } /** * Returns * RXA-1: "Give Sub-ID Counter" - creates it if necessary */ public NM getGiveSubIDCounter() { NM ret = null; try { Type t = this.getField(1, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-1: "Give Sub-ID Counter" - creates it if necessary */ public NM getRxa1_GiveSubIDCounter() { NM ret = null; try { Type t = this.getField(1, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-2: "Administration Sub-ID Counter" - creates it if necessary */ public NM getAdministrationSubIDCounter() { NM ret = null; try { Type t = this.getField(2, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-2: "Administration Sub-ID Counter" - creates it if necessary */ public NM getRxa2_AdministrationSubIDCounter() { NM ret = null; try { Type t = this.getField(2, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-3: "Date/Time Start of Administration" - creates it if necessary */ public TS getDateTimeStartOfAdministration() { TS ret = null; try { Type t = this.getField(3, 0); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-3: "Date/Time Start of Administration" - creates it if necessary */ public TS getRxa3_DateTimeStartOfAdministration() { TS ret = null; try { Type t = this.getField(3, 0); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-4: "Date/Time End of Administration" - creates it if necessary */ public TS getDateTimeEndOfAdministration() { TS ret = null; try { Type t = this.getField(4, 0); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-4: "Date/Time End of Administration" - creates it if necessary */ public TS getRxa4_DateTimeEndOfAdministration() { TS ret = null; try { Type t = this.getField(4, 0); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-5: "Administered Code" - creates it if necessary */ public CE getAdministeredCode() { 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 * RXA-5: "Administered Code" - creates it if necessary */ public CE getRxa5_AdministeredCode() { 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 * RXA-6: "Administered Amount" - creates it if necessary */ public NM getAdministeredAmount() { NM ret = null; try { Type t = this.getField(6, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-6: "Administered Amount" - creates it if necessary */ public NM getRxa6_AdministeredAmount() { NM ret = null; try { Type t = this.getField(6, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-7: "Administered Units" - creates it if necessary */ public CE getAdministeredUnits() { 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 * RXA-7: "Administered Units" - creates it if necessary */ public CE getRxa7_AdministeredUnits() { 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 * RXA-8: "Administered Dosage Form" - creates it if necessary */ public CE getAdministeredDosageForm() { 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 * RXA-8: "Administered Dosage Form" - creates it if necessary */ public CE getRxa8_AdministeredDosageForm() { 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 all repetitions of Administration Notes (RXA-9). */ public CE[] getAdministrationNotes() { CE[] ret = null; try { Type[] t = this.getField(9); 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 Administration Notes (RXA-9). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getAdministrationNotesReps() { CE[] ret = null; try { Type[] t = this.getField(9); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * RXA-9: "Administration Notes" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getAdministrationNotes(int rep) { CE ret = null; try { Type t = this.getField(9, 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 * RXA-9: "Administration Notes" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getRxa9_AdministrationNotes(int rep) { CE ret = null; try { Type t = this.getField(9, 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 Administration Notes (RXA-9). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRxa9_AdministrationNotesReps() { CE[] ret = null; try { Type[] t = this.getField(9); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * RXA-9: "Administration Notes" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertAdministrationNotes(int rep) throws HL7Exception { return (CE) super.insertRepetition(9, rep); } /** * Inserts a repetition of * RXA-9: "Administration Notes" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertRxa9_AdministrationNotes(int rep) throws HL7Exception { return (CE) super.insertRepetition(9, rep); } /** * Removes a repetition of * RXA-9: "Administration Notes" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeAdministrationNotes(int rep) throws HL7Exception { return (CE) super.removeRepetition(9, rep); } /** * Removes a repetition of * RXA-9: "Administration Notes" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeRxa9_AdministrationNotes(int rep) throws HL7Exception { return (CE) super.removeRepetition(9, rep); } /** * Returns all repetitions of Administering Provider (RXA-10). */ public XCN[] getAdministeringProvider() { XCN[] ret = null; try { Type[] t = this.getField(10); ret = new XCN[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (XCN)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Administering Provider (RXA-10). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getAdministeringProviderReps() { XCN[] ret = null; try { Type[] t = this.getField(10); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * RXA-10: "Administering Provider" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getAdministeringProvider(int rep) { XCN ret = null; try { Type t = this.getField(10, rep); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * RXA-10: "Administering Provider" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public XCN getRxa10_AdministeringProvider(int rep) { XCN ret = null; try { Type t = this.getField(10, rep); ret = (XCN)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Administering Provider (RXA-10). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRxa10_AdministeringProviderReps() { XCN[] ret = null; try { Type[] t = this.getField(10); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * RXA-10: "Administering Provider" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN insertAdministeringProvider(int rep) throws HL7Exception { return (XCN) super.insertRepetition(10, rep); } /** * Inserts a repetition of * RXA-10: "Administering Provider" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN insertRxa10_AdministeringProvider(int rep) throws HL7Exception { return (XCN) super.insertRepetition(10, rep); } /** * Removes a repetition of * RXA-10: "Administering Provider" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN removeAdministeringProvider(int rep) throws HL7Exception { return (XCN) super.removeRepetition(10, rep); } /** * Removes a repetition of * RXA-10: "Administering Provider" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public XCN removeRxa10_AdministeringProvider(int rep) throws HL7Exception { return (XCN) super.removeRepetition(10, rep); } /** * Returns * RXA-11: "Administered-at Location" - creates it if necessary */ public LA2 getAdministeredAtLocation() { LA2 ret = null; try { Type t = this.getField(11, 0); ret = (LA2)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-11: "Administered-at Location" - creates it if necessary */ public LA2 getRxa11_AdministeredAtLocation() { LA2 ret = null; try { Type t = this.getField(11, 0); ret = (LA2)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-12: "Administered Per (Time Unit)" - creates it if necessary */ public ST getAdministeredPerTimeUnit() { ST ret = null; try { Type t = this.getField(12, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-12: "Administered Per (Time Unit)" - creates it if necessary */ public ST getRxa12_AdministeredPerTimeUnit() { ST ret = null; try { Type t = this.getField(12, 0); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-13: "Administered Strength" - creates it if necessary */ public NM getAdministeredStrength() { NM ret = null; try { Type t = this.getField(13, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-13: "Administered Strength" - creates it if necessary */ public NM getRxa13_AdministeredStrength() { NM ret = null; try { Type t = this.getField(13, 0); ret = (NM)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-14: "Administered Strength Units" - creates it if necessary */ public CE getAdministeredStrengthUnits() { CE ret = null; try { Type t = this.getField(14, 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 * RXA-14: "Administered Strength Units" - creates it if necessary */ public CE getRxa14_AdministeredStrengthUnits() { CE ret = null; try { Type t = this.getField(14, 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 Substance Lot Number (RXA-15). */ public ST[] getSubstanceLotNumber() { ST[] ret = null; try { Type[] t = this.getField(15); ret = new ST[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (ST)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Substance Lot Number (RXA-15). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSubstanceLotNumberReps() { ST[] ret = null; try { Type[] t = this.getField(15); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * RXA-15: "Substance Lot Number" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getSubstanceLotNumber(int rep) { ST ret = null; try { Type t = this.getField(15, rep); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * RXA-15: "Substance Lot Number" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getRxa15_SubstanceLotNumber(int rep) { ST ret = null; try { Type t = this.getField(15, rep); ret = (ST)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Substance Lot Number (RXA-15). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRxa15_SubstanceLotNumberReps() { ST[] ret = null; try { Type[] t = this.getField(15); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * RXA-15: "Substance Lot Number" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ST insertSubstanceLotNumber(int rep) throws HL7Exception { return (ST) super.insertRepetition(15, rep); } /** * Inserts a repetition of * RXA-15: "Substance Lot Number" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ST insertRxa15_SubstanceLotNumber(int rep) throws HL7Exception { return (ST) super.insertRepetition(15, rep); } /** * Removes a repetition of * RXA-15: "Substance Lot Number" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ST removeSubstanceLotNumber(int rep) throws HL7Exception { return (ST) super.removeRepetition(15, rep); } /** * Removes a repetition of * RXA-15: "Substance Lot Number" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ST removeRxa15_SubstanceLotNumber(int rep) throws HL7Exception { return (ST) super.removeRepetition(15, rep); } /** * Returns all repetitions of Substance Expiration Date (RXA-16). */ public TS[] getSubstanceExpirationDate() { TS[] ret = null; try { Type[] t = this.getField(16); ret = new TS[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (TS)t[i]; } } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Substance Expiration Date (RXA-16). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSubstanceExpirationDateReps() { TS[] ret = null; try { Type[] t = this.getField(16); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * RXA-16: "Substance Expiration Date" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public TS getSubstanceExpirationDate(int rep) { TS ret = null; try { Type t = this.getField(16, rep); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a specific repetition of * RXA-16: "Substance Expiration Date" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public TS getRxa16_SubstanceExpirationDate(int rep) { TS ret = null; try { Type t = this.getField(16, rep); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns a count of the current number of repetitions of Substance Expiration Date (RXA-16). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRxa16_SubstanceExpirationDateReps() { TS[] ret = null; try { Type[] t = this.getField(16); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * RXA-16: "Substance Expiration Date" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public TS insertSubstanceExpirationDate(int rep) throws HL7Exception { return (TS) super.insertRepetition(16, rep); } /** * Inserts a repetition of * RXA-16: "Substance Expiration Date" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public TS insertRxa16_SubstanceExpirationDate(int rep) throws HL7Exception { return (TS) super.insertRepetition(16, rep); } /** * Removes a repetition of * RXA-16: "Substance Expiration Date" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public TS removeSubstanceExpirationDate(int rep) throws HL7Exception { return (TS) super.removeRepetition(16, rep); } /** * Removes a repetition of * RXA-16: "Substance Expiration Date" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public TS removeRxa16_SubstanceExpirationDate(int rep) throws HL7Exception { return (TS) super.removeRepetition(16, rep); } /** * Returns all repetitions of Substance Manufacturer Name (RXA-17). */ public CE[] getSubstanceManufacturerName() { CE[] ret = null; try { Type[] t = this.getField(17); 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 Substance Manufacturer Name (RXA-17). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSubstanceManufacturerNameReps() { CE[] ret = null; try { Type[] t = this.getField(17); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * RXA-17: "Substance Manufacturer Name" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getSubstanceManufacturerName(int rep) { CE ret = null; try { Type t = this.getField(17, 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 * RXA-17: "Substance Manufacturer Name" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getRxa17_SubstanceManufacturerName(int rep) { CE ret = null; try { Type t = this.getField(17, 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 Substance Manufacturer Name (RXA-17). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRxa17_SubstanceManufacturerNameReps() { CE[] ret = null; try { Type[] t = this.getField(17); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * RXA-17: "Substance Manufacturer Name" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertSubstanceManufacturerName(int rep) throws HL7Exception { return (CE) super.insertRepetition(17, rep); } /** * Inserts a repetition of * RXA-17: "Substance Manufacturer Name" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertRxa17_SubstanceManufacturerName(int rep) throws HL7Exception { return (CE) super.insertRepetition(17, rep); } /** * Removes a repetition of * RXA-17: "Substance Manufacturer Name" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeSubstanceManufacturerName(int rep) throws HL7Exception { return (CE) super.removeRepetition(17, rep); } /** * Removes a repetition of * RXA-17: "Substance Manufacturer Name" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeRxa17_SubstanceManufacturerName(int rep) throws HL7Exception { return (CE) super.removeRepetition(17, rep); } /** * Returns all repetitions of Substance/Treatment Refusal Reason (RXA-18). */ public CE[] getSubstanceTreatmentRefusalReason() { CE[] ret = null; try { Type[] t = this.getField(18); 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 Substance/Treatment Refusal Reason (RXA-18). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getSubstanceTreatmentRefusalReasonReps() { CE[] ret = null; try { Type[] t = this.getField(18); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * RXA-18: "Substance/Treatment Refusal Reason" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getSubstanceTreatmentRefusalReason(int rep) { CE ret = null; try { Type t = this.getField(18, 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 * RXA-18: "Substance/Treatment Refusal Reason" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getRxa18_SubstanceTreatmentRefusalReason(int rep) { CE ret = null; try { Type t = this.getField(18, 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 Substance/Treatment Refusal Reason (RXA-18). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRxa18_SubstanceTreatmentRefusalReasonReps() { CE[] ret = null; try { Type[] t = this.getField(18); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * RXA-18: "Substance/Treatment Refusal Reason" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertSubstanceTreatmentRefusalReason(int rep) throws HL7Exception { return (CE) super.insertRepetition(18, rep); } /** * Inserts a repetition of * RXA-18: "Substance/Treatment Refusal Reason" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception { return (CE) super.insertRepetition(18, rep); } /** * Removes a repetition of * RXA-18: "Substance/Treatment Refusal Reason" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeSubstanceTreatmentRefusalReason(int rep) throws HL7Exception { return (CE) super.removeRepetition(18, rep); } /** * Removes a repetition of * RXA-18: "Substance/Treatment Refusal Reason" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception { return (CE) super.removeRepetition(18, rep); } /** * Returns all repetitions of Indication (RXA-19). */ public CE[] getIndication() { CE[] ret = null; try { Type[] t = this.getField(19); 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 Indication (RXA-19). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getIndicationReps() { CE[] ret = null; try { Type[] t = this.getField(19); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Returns a specific repetition of * RXA-19: "Indication" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getIndication(int rep) { CE ret = null; try { Type t = this.getField(19, 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 * RXA-19: "Indication" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public CE getRxa19_Indication(int rep) { CE ret = null; try { Type t = this.getField(19, 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 Indication (RXA-19). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRxa19_IndicationReps() { CE[] ret = null; try { Type[] t = this.getField(19); return t.length; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } } /** * Inserts a repetition of * RXA-19: "Indication" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertIndication(int rep) throws HL7Exception { return (CE) super.insertRepetition(19, rep); } /** * Inserts a repetition of * RXA-19: "Indication" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE insertRxa19_Indication(int rep) throws HL7Exception { return (CE) super.insertRepetition(19, rep); } /** * Removes a repetition of * RXA-19: "Indication" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeIndication(int rep) throws HL7Exception { return (CE) super.removeRepetition(19, rep); } /** * Removes a repetition of * RXA-19: "Indication" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public CE removeRxa19_Indication(int rep) throws HL7Exception { return (CE) super.removeRepetition(19, rep); } /** * Returns * RXA-20: "Completion Status" - creates it if necessary */ public ID getCompletionStatus() { ID ret = null; try { Type t = this.getField(20, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-20: "Completion Status" - creates it if necessary */ public ID getRxa20_CompletionStatus() { ID ret = null; try { Type t = this.getField(20, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-21: "Action Code-RXA" - creates it if necessary */ public ID getActionCodeRXA() { ID ret = null; try { Type t = this.getField(21, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-21: "Action Code-RXA" - creates it if necessary */ public ID getRxa21_ActionCodeRXA() { ID ret = null; try { Type t = this.getField(21, 0); ret = (ID)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-22: "System Entry Date/Time" - creates it if necessary */ public TS getSystemEntryDateTime() { TS ret = null; try { Type t = this.getField(22, 0); ret = (TS)t; } catch (ClassCastException cce) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce); throw new RuntimeException(cce); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he); throw new RuntimeException(he); } return ret; } /** * Returns * RXA-22: "System Entry Date/Time" - creates it if necessary */ public TS getRxa22_SystemEntryDateTime() { TS ret = null; try { Type t = this.getField(22, 0); ret = (TS)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 TS(getMessage()); case 3: return new TS(getMessage()); case 4: return new CE(getMessage()); case 5: return new NM(getMessage()); case 6: return new CE(getMessage()); case 7: return new CE(getMessage()); case 8: return new CE(getMessage()); case 9: return new XCN(getMessage()); case 10: return new LA2(getMessage()); case 11: return new ST(getMessage()); case 12: return new NM(getMessage()); case 13: return new CE(getMessage()); case 14: return new ST(getMessage()); case 15: return new TS(getMessage()); case 16: return new CE(getMessage()); case 17: return new CE(getMessage()); case 18: return new CE(getMessage()); case 19: return new ID(getMessage(), new Integer( 322 )); case 20: return new ID(getMessage(), new Integer( 323 )); case 21: return new TS(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy