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

ca.uhn.hl7v2.model.v22.segment.RXD 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 RXD message segment (PHARMACY DISPENSE). * This segment has the following fields:

*
    *
  • RXD-1: Dispense Sub-ID Counter (NM) optional *
  • RXD-2: Dispense / give code (CE) *
  • RXD-3: Date / time dispensed (TS) optional *
  • RXD-4: Actual Dispense Amount (NM) *
  • RXD-5: Actual Dispense Units (CE) optional *
  • RXD-6: Actual Dosage Form (CE) optional *
  • RXD-7: Prescription Number (ST) *
  • RXD-8: Number of Refills Remaining (NM) optional *
  • RXD-9: Dispense Notes (ST) optional repeating *
  • RXD-10: Dispensing Provider (CN) optional *
  • RXD-11: Substitution Status (ID) optional *
  • RXD-12: Total Daily Dose (CQ_QUANTITY) optional *
  • RXD-13: Deliver-to location (CM_LA1) optional *
  • RXD-14: Needs Human Review (ID) optional *
  • RXD-15: Pharmacy Special Dispensing Instructions (CE) optional *
*/ public class RXD extends AbstractSegment { /** * Creates a new RXD segment */ public RXD(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(NM.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Dispense Sub-ID Counter"); this.add(CE.class, true, 1, 100, new Object[]{ getMessage(), new Integer(0) }, "Dispense / give code"); this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date / time dispensed"); this.add(NM.class, true, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Actual Dispense Amount"); this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Actual Dispense Units"); this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Actual Dosage Form"); this.add(ST.class, true, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Prescription Number"); this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Number of Refills Remaining"); this.add(ST.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Dispense Notes"); this.add(CN.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Dispensing Provider"); this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Substitution Status"); this.add(CQ_QUANTITY.class, false, 1, 10, new Object[]{ getMessage(), new Integer(0) }, "Total Daily Dose"); 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, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Pharmacy Special Dispensing Instructions"); } catch(HL7Exception e) { HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RXD - this is probably a bug in the source code generator.", e); } } /** * Returns * RXD-1: "Dispense Sub-ID Counter" - creates it if necessary */ public NM getDispenseSubIDCounter() { NM ret = null; try { Type t = this.getField(1, 0); ret = (NM)t; } catch (ClassCastException cce) { 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 * RXD-1: "Dispense Sub-ID Counter" - creates it if necessary */ public NM getRxd1_DispenseSubIDCounter() { NM ret = null; try { Type t = this.getField(1, 0); ret = (NM)t; } catch (ClassCastException cce) { 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 * RXD-2: "Dispense / give code" - creates it if necessary */ public CE getDispenseGiveCode() { CE ret = null; try { Type t = this.getField(2, 0); ret = (CE)t; } catch (ClassCastException cce) { 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 * RXD-2: "Dispense / give code" - creates it if necessary */ public CE getRxd2_DispenseGiveCode() { CE ret = null; try { Type t = this.getField(2, 0); ret = (CE)t; } catch (ClassCastException cce) { 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 * RXD-3: "Date / time dispensed" - creates it if necessary */ public TS getDateTimeDispensed() { TS ret = null; try { Type t = this.getField(3, 0); ret = (TS)t; } catch (ClassCastException cce) { 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 * RXD-3: "Date / time dispensed" - creates it if necessary */ public TS getRxd3_DateTimeDispensed() { TS ret = null; try { Type t = this.getField(3, 0); ret = (TS)t; } catch (ClassCastException cce) { 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 * RXD-4: "Actual Dispense Amount" - creates it if necessary */ public NM getActualDispenseAmount() { NM ret = null; try { Type t = this.getField(4, 0); ret = (NM)t; } catch (ClassCastException cce) { 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 * RXD-4: "Actual Dispense Amount" - creates it if necessary */ public NM getRxd4_ActualDispenseAmount() { NM ret = null; try { Type t = this.getField(4, 0); ret = (NM)t; } catch (ClassCastException cce) { 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 * RXD-5: "Actual Dispense Units" - creates it if necessary */ public CE getActualDispenseUnits() { CE ret = null; try { Type t = this.getField(5, 0); ret = (CE)t; } catch (ClassCastException cce) { 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 * RXD-5: "Actual Dispense Units" - creates it if necessary */ public CE getRxd5_ActualDispenseUnits() { CE ret = null; try { Type t = this.getField(5, 0); ret = (CE)t; } catch (ClassCastException cce) { 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 * RXD-6: "Actual Dosage Form" - creates it if necessary */ public CE getActualDosageForm() { CE ret = null; try { Type t = this.getField(6, 0); ret = (CE)t; } catch (ClassCastException cce) { 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 * RXD-6: "Actual Dosage Form" - creates it if necessary */ public CE getRxd6_ActualDosageForm() { CE ret = null; try { Type t = this.getField(6, 0); ret = (CE)t; } catch (ClassCastException cce) { 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 * RXD-7: "Prescription Number" - creates it if necessary */ public ST getPrescriptionNumber() { ST ret = null; try { Type t = this.getField(7, 0); ret = (ST)t; } catch (ClassCastException cce) { 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 * RXD-7: "Prescription Number" - creates it if necessary */ public ST getRxd7_PrescriptionNumber() { ST ret = null; try { Type t = this.getField(7, 0); ret = (ST)t; } catch (ClassCastException cce) { 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 * RXD-8: "Number of Refills Remaining" - creates it if necessary */ public NM getNumberOfRefillsRemaining() { NM ret = null; try { Type t = this.getField(8, 0); ret = (NM)t; } catch (ClassCastException cce) { 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 * RXD-8: "Number of Refills Remaining" - creates it if necessary */ public NM getRxd8_NumberOfRefillsRemaining() { NM ret = null; try { Type t = this.getField(8, 0); ret = (NM)t; } catch (ClassCastException cce) { 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 Dispense Notes (RXD-9). */ public ST[] getDispenseNotes() { ST[] ret = null; try { Type[] t = this.getField(9); ret = new ST[t.length]; for (int i = 0; i < ret.length; i++) { ret[i] = (ST)t[i]; } } catch (ClassCastException cce) { 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 Dispense Notes (RXD-9). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getDispenseNotesReps() { ST[] ret = null; try { Type[] t = this.getField(9); return t.length; } catch (ClassCastException cce) { 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 * RXD-9: "Dispense Notes" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getDispenseNotes(int rep) { ST ret = null; try { Type t = this.getField(9, rep); ret = (ST)t; } catch (ClassCastException cce) { 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 * RXD-9: "Dispense Notes" - creates it if necessary * * @param rep The repetition index (0-indexed) */ public ST getRxd9_DispenseNotes(int rep) { ST ret = null; try { Type t = this.getField(9, rep); ret = (ST)t; } catch (ClassCastException cce) { 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 Dispense Notes (RXD-9). * This method does not create a repetition, so if no repetitions have currently been defined or accessed, * it will return zero. */ public int getRxd9_DispenseNotesReps() { ST[] ret = null; try { Type[] t = this.getField(9); return t.length; } catch (ClassCastException cce) { 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 * RXD-9: "Dispense Notes" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ST insertDispenseNotes(int rep) throws HL7Exception { return (ST) super.insertRepetition(9, rep); } /** * Inserts a repetition of * RXD-9: "Dispense Notes" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ST insertRxd9_DispenseNotes(int rep) throws HL7Exception { return (ST) super.insertRepetition(9, rep); } /** * Removes a repetition of * RXD-9: "Dispense Notes" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ST removeDispenseNotes(int rep) throws HL7Exception { return (ST) super.removeRepetition(9, rep); } /** * Removes a repetition of * RXD-9: "Dispense Notes" at a specific index * * @param rep The repetition index (0-indexed) * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) */ public ST removeRxd9_DispenseNotes(int rep) throws HL7Exception { return (ST) super.removeRepetition(9, rep); } /** * Returns * RXD-10: "Dispensing Provider" - creates it if necessary */ public CN getDispensingProvider() { CN ret = null; try { Type t = this.getField(10, 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 * RXD-10: "Dispensing Provider" - creates it if necessary */ public CN getRxd10_DispensingProvider() { CN ret = null; try { Type t = this.getField(10, 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 * RXD-11: "Substitution Status" - creates it if necessary */ public ID getSubstitutionStatus() { ID ret = null; try { Type t = this.getField(11, 0); ret = (ID)t; } catch (ClassCastException cce) { 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 * RXD-11: "Substitution Status" - creates it if necessary */ public ID getRxd11_SubstitutionStatus() { ID ret = null; try { Type t = this.getField(11, 0); ret = (ID)t; } catch (ClassCastException cce) { 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 * RXD-12: "Total Daily Dose" - creates it if necessary */ public CQ_QUANTITY getTotalDailyDose() { CQ_QUANTITY ret = null; try { Type t = this.getField(12, 0); ret = (CQ_QUANTITY)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 * RXD-12: "Total Daily Dose" - creates it if necessary */ public CQ_QUANTITY getRxd12_TotalDailyDose() { CQ_QUANTITY ret = null; try { Type t = this.getField(12, 0); ret = (CQ_QUANTITY)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 * RXD-13: "Deliver-to location" - creates it if necessary */ public CM_LA1 getDeliverToLocation() { CM_LA1 ret = null; try { Type t = this.getField(13, 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 * RXD-13: "Deliver-to location" - creates it if necessary */ public CM_LA1 getRxd13_DeliverToLocation() { CM_LA1 ret = null; try { Type t = this.getField(13, 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 * RXD-14: "Needs Human Review" - creates it if necessary */ public ID getNeedsHumanReview() { ID ret = null; try { Type t = this.getField(14, 0); ret = (ID)t; } catch (ClassCastException cce) { 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 * RXD-14: "Needs Human Review" - creates it if necessary */ public ID getRxd14_NeedsHumanReview() { ID ret = null; try { Type t = this.getField(14, 0); ret = (ID)t; } catch (ClassCastException cce) { 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 * RXD-15: "Pharmacy Special Dispensing Instructions" - creates it if necessary */ public CE getPharmacySpecialDispensingInstructions() { 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 * RXD-15: "Pharmacy Special Dispensing Instructions" - creates it if necessary */ public CE getRxd15_PharmacySpecialDispensingInstructions() { 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; } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new NM(getMessage()); case 1: return new CE(getMessage()); case 2: return new TS(getMessage()); case 3: return new NM(getMessage()); case 4: return new CE(getMessage()); case 5: return new CE(getMessage()); case 6: return new ST(getMessage()); case 7: return new NM(getMessage()); case 8: return new ST(getMessage()); case 9: return new CN(getMessage()); case 10: return new ID(getMessage(), new Integer( 167 )); case 11: return new CQ_QUANTITY(getMessage()); case 12: return new CM_LA1(getMessage()); case 13: return new ID(getMessage(), new Integer( 0 )); case 14: return new CE(getMessage()); default: return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy