001 /*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 */
007
008 package ca.uhn.hl7v2.model.v24.segment;
009
010 // import ca.uhn.hl7v2.model.v24.group.*;
011 import ca.uhn.hl7v2.model.v24.datatype.*;
012 import ca.uhn.log.HapiLogFactory;
013 import ca.uhn.hl7v2.HL7Exception;
014 import ca.uhn.hl7v2.parser.ModelClassFactory;
015 import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
016 import ca.uhn.hl7v2.model.AbstractMessage;
017 import ca.uhn.hl7v2.model.Group;
018 import ca.uhn.hl7v2.model.Type;
019 import ca.uhn.hl7v2.model.AbstractSegment;
020 import ca.uhn.hl7v2.model.Varies;
021
022 /**
023 *<p>Represents an HL7 RXE message segment (Pharmacy/Treatment Encoded Order).
024 * This segment has the following fields:</p>
025 * <ul>
026 * <li>RXE-1: Quantity/Timing (TQ) <b> </b>
027 * <li>RXE-2: Give Code (CE) <b> </b>
028 * <li>RXE-3: Give Amount - Minimum (NM) <b> </b>
029 * <li>RXE-4: Give Amount - Maximum (NM) <b>optional </b>
030 * <li>RXE-5: Give Units (CE) <b> </b>
031 * <li>RXE-6: Give Dosage Form (CE) <b>optional </b>
032 * <li>RXE-7: Provider's Administration Instructions (CE) <b>optional repeating</b>
033 * <li>RXE-8: Deliver-To Location (LA1) <b>optional </b>
034 * <li>RXE-9: Substitution Status (ID) <b>optional </b>
035 * <li>RXE-10: Dispense Amount (NM) <b>optional </b>
036 * <li>RXE-11: Dispense Units (CE) <b>optional </b>
037 * <li>RXE-12: Number of Refills (NM) <b>optional </b>
038 * <li>RXE-13: Ordering Provider's DEA Number (XCN) <b>optional repeating</b>
039 * <li>RXE-14: Pharmacist/Treatment Supplier's Verifier ID (XCN) <b>optional repeating</b>
040 * <li>RXE-15: Prescription Number (ST) <b>optional </b>
041 * <li>RXE-16: Number of Refills Remaining (NM) <b>optional </b>
042 * <li>RXE-17: Number of Refills/Doses Dispensed (NM) <b>optional </b>
043 * <li>RXE-18: D/T of Most Recent Refill or Dose Dispensed (TS) <b>optional </b>
044 * <li>RXE-19: Total Daily Dose (CQ) <b>optional </b>
045 * <li>RXE-20: Needs Human Review (ID) <b>optional </b>
046 * <li>RXE-21: Pharmacy/Treatment Supplier's Special Dispensing Instructions (CE) <b>optional repeating</b>
047 * <li>RXE-22: Give Per (Time Unit) (ST) <b>optional </b>
048 * <li>RXE-23: Give Rate Amount (ST) <b>optional </b>
049 * <li>RXE-24: Give Rate Units (CE) <b>optional </b>
050 * <li>RXE-25: Give Strength (NM) <b>optional </b>
051 * <li>RXE-26: Give Strength Units (CE) <b>optional </b>
052 * <li>RXE-27: Give Indication (CE) <b>optional repeating</b>
053 * <li>RXE-28: Dispense Package Size (NM) <b>optional </b>
054 * <li>RXE-29: Dispense Package Size Unit (CE) <b>optional </b>
055 * <li>RXE-30: Dispense Package Method (ID) <b>optional </b>
056 * <li>RXE-31: Supplementary Code (CE) <b>optional repeating</b>
057 * </ul>
058 */
059 public class RXE extends AbstractSegment {
060
061 /**
062 * Creates a new RXE segment
063 */
064 public RXE(Group parent, ModelClassFactory factory) {
065 super(parent, factory);
066 init(factory);
067 }
068
069 private void init(ModelClassFactory factory) {
070 try {
071 this.add(TQ.class, true, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Quantity/Timing");
072 this.add(CE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(292) }, "Give Code");
073 this.add(NM.class, true, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Give Amount - Minimum");
074 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Give Amount - Maximum");
075 this.add(CE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Give Units");
076 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Give Dosage Form");
077 this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Provider's Administration Instructions");
078 this.add(LA1.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Deliver-To Location");
079 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Substitution Status");
080 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Dispense Amount");
081 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Dispense Units");
082 this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Number of Refills");
083 this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Ordering Provider's DEA Number");
084 this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Pharmacist/Treatment Supplier's Verifier ID");
085 this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Prescription Number");
086 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Number of Refills Remaining");
087 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Number of Refills/Doses Dispensed");
088 this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "D/T of Most Recent Refill or Dose Dispensed");
089 this.add(CQ.class, false, 1, 10, new Object[]{ getMessage(), new Integer(0) }, "Total Daily Dose");
090 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Needs Human Review");
091 this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Pharmacy/Treatment Supplier's Special Dispensing Instructions");
092 this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Give Per (Time Unit)");
093 this.add(ST.class, false, 1, 6, new Object[]{ getMessage(), new Integer(0) }, "Give Rate Amount");
094 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Give Rate Units");
095 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Give Strength");
096 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Give Strength Units");
097 this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Give Indication");
098 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Dispense Package Size");
099 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Dispense Package Size Unit");
100 this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Dispense Package Method");
101 this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Supplementary Code");
102 } catch(HL7Exception e) {
103 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RXE - this is probably a bug in the source code generator.", e);
104 }
105 }
106
107
108
109 /**
110 * Returns
111 * RXE-1: "Quantity/Timing" - creates it if necessary
112 */
113 public TQ getQuantityTiming() {
114 TQ ret = null;
115 try {
116 Type t = this.getField(1, 0);
117 ret = (TQ)t;
118 } catch (ClassCastException cce) {
119 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
120 throw new RuntimeException(cce);
121 } catch (HL7Exception he) {
122 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
123 throw new RuntimeException(he);
124 }
125 return ret;
126 }
127
128
129 /**
130 * Returns
131 * RXE-1: "Quantity/Timing" - creates it if necessary
132 */
133 public TQ getRxe1_QuantityTiming() {
134 TQ ret = null;
135 try {
136 Type t = this.getField(1, 0);
137 ret = (TQ)t;
138 } catch (ClassCastException cce) {
139 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
140 throw new RuntimeException(cce);
141 } catch (HL7Exception he) {
142 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
143 throw new RuntimeException(he);
144 }
145 return ret;
146 }
147
148
149
150 /**
151 * Returns
152 * RXE-2: "Give Code" - creates it if necessary
153 */
154 public CE getGiveCode() {
155 CE ret = null;
156 try {
157 Type t = this.getField(2, 0);
158 ret = (CE)t;
159 } catch (ClassCastException cce) {
160 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
161 throw new RuntimeException(cce);
162 } catch (HL7Exception he) {
163 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
164 throw new RuntimeException(he);
165 }
166 return ret;
167 }
168
169
170 /**
171 * Returns
172 * RXE-2: "Give Code" - creates it if necessary
173 */
174 public CE getRxe2_GiveCode() {
175 CE ret = null;
176 try {
177 Type t = this.getField(2, 0);
178 ret = (CE)t;
179 } catch (ClassCastException cce) {
180 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
181 throw new RuntimeException(cce);
182 } catch (HL7Exception he) {
183 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
184 throw new RuntimeException(he);
185 }
186 return ret;
187 }
188
189
190
191 /**
192 * Returns
193 * RXE-3: "Give Amount - Minimum" - creates it if necessary
194 */
195 public NM getGiveAmountMinimum() {
196 NM ret = null;
197 try {
198 Type t = this.getField(3, 0);
199 ret = (NM)t;
200 } catch (ClassCastException cce) {
201 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
202 throw new RuntimeException(cce);
203 } catch (HL7Exception he) {
204 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
205 throw new RuntimeException(he);
206 }
207 return ret;
208 }
209
210
211 /**
212 * Returns
213 * RXE-3: "Give Amount - Minimum" - creates it if necessary
214 */
215 public NM getRxe3_GiveAmountMinimum() {
216 NM ret = null;
217 try {
218 Type t = this.getField(3, 0);
219 ret = (NM)t;
220 } catch (ClassCastException cce) {
221 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
222 throw new RuntimeException(cce);
223 } catch (HL7Exception he) {
224 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
225 throw new RuntimeException(he);
226 }
227 return ret;
228 }
229
230
231
232 /**
233 * Returns
234 * RXE-4: "Give Amount - Maximum" - creates it if necessary
235 */
236 public NM getGiveAmountMaximum() {
237 NM ret = null;
238 try {
239 Type t = this.getField(4, 0);
240 ret = (NM)t;
241 } catch (ClassCastException cce) {
242 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
243 throw new RuntimeException(cce);
244 } catch (HL7Exception he) {
245 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
246 throw new RuntimeException(he);
247 }
248 return ret;
249 }
250
251
252 /**
253 * Returns
254 * RXE-4: "Give Amount - Maximum" - creates it if necessary
255 */
256 public NM getRxe4_GiveAmountMaximum() {
257 NM ret = null;
258 try {
259 Type t = this.getField(4, 0);
260 ret = (NM)t;
261 } catch (ClassCastException cce) {
262 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
263 throw new RuntimeException(cce);
264 } catch (HL7Exception he) {
265 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
266 throw new RuntimeException(he);
267 }
268 return ret;
269 }
270
271
272
273 /**
274 * Returns
275 * RXE-5: "Give Units" - creates it if necessary
276 */
277 public CE getGiveUnits() {
278 CE ret = null;
279 try {
280 Type t = this.getField(5, 0);
281 ret = (CE)t;
282 } catch (ClassCastException cce) {
283 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
284 throw new RuntimeException(cce);
285 } catch (HL7Exception he) {
286 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
287 throw new RuntimeException(he);
288 }
289 return ret;
290 }
291
292
293 /**
294 * Returns
295 * RXE-5: "Give Units" - creates it if necessary
296 */
297 public CE getRxe5_GiveUnits() {
298 CE ret = null;
299 try {
300 Type t = this.getField(5, 0);
301 ret = (CE)t;
302 } catch (ClassCastException cce) {
303 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
304 throw new RuntimeException(cce);
305 } catch (HL7Exception he) {
306 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
307 throw new RuntimeException(he);
308 }
309 return ret;
310 }
311
312
313
314 /**
315 * Returns
316 * RXE-6: "Give Dosage Form" - creates it if necessary
317 */
318 public CE getGiveDosageForm() {
319 CE ret = null;
320 try {
321 Type t = this.getField(6, 0);
322 ret = (CE)t;
323 } catch (ClassCastException cce) {
324 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
325 throw new RuntimeException(cce);
326 } catch (HL7Exception he) {
327 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
328 throw new RuntimeException(he);
329 }
330 return ret;
331 }
332
333
334 /**
335 * Returns
336 * RXE-6: "Give Dosage Form" - creates it if necessary
337 */
338 public CE getRxe6_GiveDosageForm() {
339 CE ret = null;
340 try {
341 Type t = this.getField(6, 0);
342 ret = (CE)t;
343 } catch (ClassCastException cce) {
344 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
345 throw new RuntimeException(cce);
346 } catch (HL7Exception he) {
347 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
348 throw new RuntimeException(he);
349 }
350 return ret;
351 }
352
353
354 /**
355 * Returns all repetitions of Provider's Administration Instructions (RXE-7).
356 */
357 public CE[] getProviderSAdministrationInstructions() {
358 CE[] ret = null;
359 try {
360 Type[] t = this.getField(7);
361 ret = new CE[t.length];
362 for (int i = 0; i < ret.length; i++) {
363 ret[i] = (CE)t[i];
364 }
365 } catch (ClassCastException cce) {
366 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
367 throw new RuntimeException(cce);
368 } catch (HL7Exception he) {
369 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
370 throw new RuntimeException(he);
371 }
372 return ret;
373 }
374
375
376 /**
377 * Returns a count of the current number of repetitions of Provider's Administration Instructions (RXE-7).
378 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
379 * it will return zero.
380 */
381 public int getProviderSAdministrationInstructionsReps() {
382 CE[] ret = null;
383 try {
384 Type[] t = this.getField(7);
385 return t.length;
386 } catch (ClassCastException cce) {
387 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
388 throw new RuntimeException(cce);
389 } catch (HL7Exception he) {
390 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
391 throw new RuntimeException(he);
392 }
393 }
394
395
396 /**
397 * Returns a specific repetition of
398 * RXE-7: "Provider's Administration Instructions" - creates it if necessary
399 *
400 * @param rep The repetition index (0-indexed)
401 */
402 public CE getProviderSAdministrationInstructions(int rep) {
403 CE ret = null;
404 try {
405 Type t = this.getField(7, rep);
406 ret = (CE)t;
407 } catch (ClassCastException cce) {
408 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
409 throw new RuntimeException(cce);
410 } catch (HL7Exception he) {
411 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
412 throw new RuntimeException(he);
413 }
414 return ret;
415 }
416
417 /**
418 * Returns a specific repetition of
419 * RXE-7: "Provider's Administration Instructions" - creates it if necessary
420 *
421 * @param rep The repetition index (0-indexed)
422 */
423 public CE getRxe7_ProviderSAdministrationInstructions(int rep) {
424 CE ret = null;
425 try {
426 Type t = this.getField(7, rep);
427 ret = (CE)t;
428 } catch (ClassCastException cce) {
429 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
430 throw new RuntimeException(cce);
431 } catch (HL7Exception he) {
432 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
433 throw new RuntimeException(he);
434 }
435 return ret;
436 }
437
438
439 /**
440 * Returns a count of the current number of repetitions of Provider's Administration Instructions (RXE-7).
441 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
442 * it will return zero.
443 */
444 public int getRxe7_ProviderSAdministrationInstructionsReps() {
445 CE[] ret = null;
446 try {
447 Type[] t = this.getField(7);
448 return t.length;
449 } catch (ClassCastException cce) {
450 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
451 throw new RuntimeException(cce);
452 } catch (HL7Exception he) {
453 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
454 throw new RuntimeException(he);
455 }
456 }
457
458
459
460 /**
461 * Inserts a repetition of
462 * RXE-7: "Provider's Administration Instructions" at a specific index
463 *
464 * @param rep The repetition index (0-indexed)
465 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
466 */
467 public CE insertProviderSAdministrationInstructions(int rep) throws HL7Exception {
468 return (CE) super.insertRepetition(7, rep);
469 }
470
471
472
473 /**
474 * Inserts a repetition of
475 * RXE-7: "Provider's Administration Instructions" at a specific index
476 *
477 * @param rep The repetition index (0-indexed)
478 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
479 */
480 public CE insertRxe7_ProviderSAdministrationInstructions(int rep) throws HL7Exception {
481 return (CE) super.insertRepetition(7, rep);
482 }
483
484
485 /**
486 * Removes a repetition of
487 * RXE-7: "Provider's Administration Instructions" at a specific index
488 *
489 * @param rep The repetition index (0-indexed)
490 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
491 */
492 public CE removeProviderSAdministrationInstructions(int rep) throws HL7Exception {
493 return (CE) super.removeRepetition(7, rep);
494 }
495
496
497 /**
498 * Removes a repetition of
499 * RXE-7: "Provider's Administration Instructions" at a specific index
500 *
501 * @param rep The repetition index (0-indexed)
502 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
503 */
504 public CE removeRxe7_ProviderSAdministrationInstructions(int rep) throws HL7Exception {
505 return (CE) super.removeRepetition(7, rep);
506 }
507
508
509
510
511 /**
512 * Returns
513 * RXE-8: "Deliver-To Location" - creates it if necessary
514 */
515 public LA1 getDeliverToLocation() {
516 LA1 ret = null;
517 try {
518 Type t = this.getField(8, 0);
519 ret = (LA1)t;
520 } catch (ClassCastException cce) {
521 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
522 throw new RuntimeException(cce);
523 } catch (HL7Exception he) {
524 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
525 throw new RuntimeException(he);
526 }
527 return ret;
528 }
529
530
531 /**
532 * Returns
533 * RXE-8: "Deliver-To Location" - creates it if necessary
534 */
535 public LA1 getRxe8_DeliverToLocation() {
536 LA1 ret = null;
537 try {
538 Type t = this.getField(8, 0);
539 ret = (LA1)t;
540 } catch (ClassCastException cce) {
541 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
542 throw new RuntimeException(cce);
543 } catch (HL7Exception he) {
544 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
545 throw new RuntimeException(he);
546 }
547 return ret;
548 }
549
550
551
552 /**
553 * Returns
554 * RXE-9: "Substitution Status" - creates it if necessary
555 */
556 public ID getSubstitutionStatus() {
557 ID ret = null;
558 try {
559 Type t = this.getField(9, 0);
560 ret = (ID)t;
561 } catch (ClassCastException cce) {
562 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
563 throw new RuntimeException(cce);
564 } catch (HL7Exception he) {
565 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
566 throw new RuntimeException(he);
567 }
568 return ret;
569 }
570
571
572 /**
573 * Returns
574 * RXE-9: "Substitution Status" - creates it if necessary
575 */
576 public ID getRxe9_SubstitutionStatus() {
577 ID ret = null;
578 try {
579 Type t = this.getField(9, 0);
580 ret = (ID)t;
581 } catch (ClassCastException cce) {
582 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
583 throw new RuntimeException(cce);
584 } catch (HL7Exception he) {
585 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
586 throw new RuntimeException(he);
587 }
588 return ret;
589 }
590
591
592
593 /**
594 * Returns
595 * RXE-10: "Dispense Amount" - creates it if necessary
596 */
597 public NM getDispenseAmount() {
598 NM ret = null;
599 try {
600 Type t = this.getField(10, 0);
601 ret = (NM)t;
602 } catch (ClassCastException cce) {
603 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
604 throw new RuntimeException(cce);
605 } catch (HL7Exception he) {
606 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
607 throw new RuntimeException(he);
608 }
609 return ret;
610 }
611
612
613 /**
614 * Returns
615 * RXE-10: "Dispense Amount" - creates it if necessary
616 */
617 public NM getRxe10_DispenseAmount() {
618 NM ret = null;
619 try {
620 Type t = this.getField(10, 0);
621 ret = (NM)t;
622 } catch (ClassCastException cce) {
623 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
624 throw new RuntimeException(cce);
625 } catch (HL7Exception he) {
626 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
627 throw new RuntimeException(he);
628 }
629 return ret;
630 }
631
632
633
634 /**
635 * Returns
636 * RXE-11: "Dispense Units" - creates it if necessary
637 */
638 public CE getDispenseUnits() {
639 CE ret = null;
640 try {
641 Type t = this.getField(11, 0);
642 ret = (CE)t;
643 } catch (ClassCastException cce) {
644 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
645 throw new RuntimeException(cce);
646 } catch (HL7Exception he) {
647 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
648 throw new RuntimeException(he);
649 }
650 return ret;
651 }
652
653
654 /**
655 * Returns
656 * RXE-11: "Dispense Units" - creates it if necessary
657 */
658 public CE getRxe11_DispenseUnits() {
659 CE ret = null;
660 try {
661 Type t = this.getField(11, 0);
662 ret = (CE)t;
663 } catch (ClassCastException cce) {
664 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
665 throw new RuntimeException(cce);
666 } catch (HL7Exception he) {
667 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
668 throw new RuntimeException(he);
669 }
670 return ret;
671 }
672
673
674
675 /**
676 * Returns
677 * RXE-12: "Number of Refills" - creates it if necessary
678 */
679 public NM getNumberOfRefills() {
680 NM ret = null;
681 try {
682 Type t = this.getField(12, 0);
683 ret = (NM)t;
684 } catch (ClassCastException cce) {
685 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
686 throw new RuntimeException(cce);
687 } catch (HL7Exception he) {
688 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
689 throw new RuntimeException(he);
690 }
691 return ret;
692 }
693
694
695 /**
696 * Returns
697 * RXE-12: "Number of Refills" - creates it if necessary
698 */
699 public NM getRxe12_NumberOfRefills() {
700 NM ret = null;
701 try {
702 Type t = this.getField(12, 0);
703 ret = (NM)t;
704 } catch (ClassCastException cce) {
705 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
706 throw new RuntimeException(cce);
707 } catch (HL7Exception he) {
708 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
709 throw new RuntimeException(he);
710 }
711 return ret;
712 }
713
714
715 /**
716 * Returns all repetitions of Ordering Provider's DEA Number (RXE-13).
717 */
718 public XCN[] getOrderingProviderSDEANumber() {
719 XCN[] ret = null;
720 try {
721 Type[] t = this.getField(13);
722 ret = new XCN[t.length];
723 for (int i = 0; i < ret.length; i++) {
724 ret[i] = (XCN)t[i];
725 }
726 } catch (ClassCastException cce) {
727 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
728 throw new RuntimeException(cce);
729 } catch (HL7Exception he) {
730 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
731 throw new RuntimeException(he);
732 }
733 return ret;
734 }
735
736
737 /**
738 * Returns a count of the current number of repetitions of Ordering Provider's DEA Number (RXE-13).
739 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
740 * it will return zero.
741 */
742 public int getOrderingProviderSDEANumberReps() {
743 XCN[] ret = null;
744 try {
745 Type[] t = this.getField(13);
746 return t.length;
747 } catch (ClassCastException cce) {
748 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
749 throw new RuntimeException(cce);
750 } catch (HL7Exception he) {
751 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
752 throw new RuntimeException(he);
753 }
754 }
755
756
757 /**
758 * Returns a specific repetition of
759 * RXE-13: "Ordering Provider's DEA Number" - creates it if necessary
760 *
761 * @param rep The repetition index (0-indexed)
762 */
763 public XCN getOrderingProviderSDEANumber(int rep) {
764 XCN ret = null;
765 try {
766 Type t = this.getField(13, rep);
767 ret = (XCN)t;
768 } catch (ClassCastException cce) {
769 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
770 throw new RuntimeException(cce);
771 } catch (HL7Exception he) {
772 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
773 throw new RuntimeException(he);
774 }
775 return ret;
776 }
777
778 /**
779 * Returns a specific repetition of
780 * RXE-13: "Ordering Provider's DEA Number" - creates it if necessary
781 *
782 * @param rep The repetition index (0-indexed)
783 */
784 public XCN getRxe13_OrderingProviderSDEANumber(int rep) {
785 XCN ret = null;
786 try {
787 Type t = this.getField(13, rep);
788 ret = (XCN)t;
789 } catch (ClassCastException cce) {
790 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
791 throw new RuntimeException(cce);
792 } catch (HL7Exception he) {
793 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
794 throw new RuntimeException(he);
795 }
796 return ret;
797 }
798
799
800 /**
801 * Returns a count of the current number of repetitions of Ordering Provider's DEA Number (RXE-13).
802 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
803 * it will return zero.
804 */
805 public int getRxe13_OrderingProviderSDEANumberReps() {
806 XCN[] ret = null;
807 try {
808 Type[] t = this.getField(13);
809 return t.length;
810 } catch (ClassCastException cce) {
811 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
812 throw new RuntimeException(cce);
813 } catch (HL7Exception he) {
814 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
815 throw new RuntimeException(he);
816 }
817 }
818
819
820
821 /**
822 * Inserts a repetition of
823 * RXE-13: "Ordering Provider's DEA Number" at a specific index
824 *
825 * @param rep The repetition index (0-indexed)
826 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
827 */
828 public XCN insertOrderingProviderSDEANumber(int rep) throws HL7Exception {
829 return (XCN) super.insertRepetition(13, rep);
830 }
831
832
833
834 /**
835 * Inserts a repetition of
836 * RXE-13: "Ordering Provider's DEA Number" at a specific index
837 *
838 * @param rep The repetition index (0-indexed)
839 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
840 */
841 public XCN insertRxe13_OrderingProviderSDEANumber(int rep) throws HL7Exception {
842 return (XCN) super.insertRepetition(13, rep);
843 }
844
845
846 /**
847 * Removes a repetition of
848 * RXE-13: "Ordering Provider's DEA Number" at a specific index
849 *
850 * @param rep The repetition index (0-indexed)
851 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
852 */
853 public XCN removeOrderingProviderSDEANumber(int rep) throws HL7Exception {
854 return (XCN) super.removeRepetition(13, rep);
855 }
856
857
858 /**
859 * Removes a repetition of
860 * RXE-13: "Ordering Provider's DEA Number" at a specific index
861 *
862 * @param rep The repetition index (0-indexed)
863 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
864 */
865 public XCN removeRxe13_OrderingProviderSDEANumber(int rep) throws HL7Exception {
866 return (XCN) super.removeRepetition(13, rep);
867 }
868
869
870
871 /**
872 * Returns all repetitions of Pharmacist/Treatment Supplier's Verifier ID (RXE-14).
873 */
874 public XCN[] getPharmacistTreatmentSupplierSVerifierID() {
875 XCN[] ret = null;
876 try {
877 Type[] t = this.getField(14);
878 ret = new XCN[t.length];
879 for (int i = 0; i < ret.length; i++) {
880 ret[i] = (XCN)t[i];
881 }
882 } catch (ClassCastException cce) {
883 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
884 throw new RuntimeException(cce);
885 } catch (HL7Exception he) {
886 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
887 throw new RuntimeException(he);
888 }
889 return ret;
890 }
891
892
893 /**
894 * Returns a count of the current number of repetitions of Pharmacist/Treatment Supplier's Verifier ID (RXE-14).
895 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
896 * it will return zero.
897 */
898 public int getPharmacistTreatmentSupplierSVerifierIDReps() {
899 XCN[] ret = null;
900 try {
901 Type[] t = this.getField(14);
902 return t.length;
903 } catch (ClassCastException cce) {
904 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
905 throw new RuntimeException(cce);
906 } catch (HL7Exception he) {
907 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
908 throw new RuntimeException(he);
909 }
910 }
911
912
913 /**
914 * Returns a specific repetition of
915 * RXE-14: "Pharmacist/Treatment Supplier's Verifier ID" - creates it if necessary
916 *
917 * @param rep The repetition index (0-indexed)
918 */
919 public XCN getPharmacistTreatmentSupplierSVerifierID(int rep) {
920 XCN ret = null;
921 try {
922 Type t = this.getField(14, rep);
923 ret = (XCN)t;
924 } catch (ClassCastException cce) {
925 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
926 throw new RuntimeException(cce);
927 } catch (HL7Exception he) {
928 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
929 throw new RuntimeException(he);
930 }
931 return ret;
932 }
933
934 /**
935 * Returns a specific repetition of
936 * RXE-14: "Pharmacist/Treatment Supplier's Verifier ID" - creates it if necessary
937 *
938 * @param rep The repetition index (0-indexed)
939 */
940 public XCN getRxe14_PharmacistTreatmentSupplierSVerifierID(int rep) {
941 XCN ret = null;
942 try {
943 Type t = this.getField(14, rep);
944 ret = (XCN)t;
945 } catch (ClassCastException cce) {
946 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
947 throw new RuntimeException(cce);
948 } catch (HL7Exception he) {
949 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
950 throw new RuntimeException(he);
951 }
952 return ret;
953 }
954
955
956 /**
957 * Returns a count of the current number of repetitions of Pharmacist/Treatment Supplier's Verifier ID (RXE-14).
958 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
959 * it will return zero.
960 */
961 public int getRxe14_PharmacistTreatmentSupplierSVerifierIDReps() {
962 XCN[] ret = null;
963 try {
964 Type[] t = this.getField(14);
965 return t.length;
966 } catch (ClassCastException cce) {
967 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
968 throw new RuntimeException(cce);
969 } catch (HL7Exception he) {
970 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
971 throw new RuntimeException(he);
972 }
973 }
974
975
976
977 /**
978 * Inserts a repetition of
979 * RXE-14: "Pharmacist/Treatment Supplier's Verifier ID" at a specific index
980 *
981 * @param rep The repetition index (0-indexed)
982 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
983 */
984 public XCN insertPharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception {
985 return (XCN) super.insertRepetition(14, rep);
986 }
987
988
989
990 /**
991 * Inserts a repetition of
992 * RXE-14: "Pharmacist/Treatment Supplier's Verifier ID" at a specific index
993 *
994 * @param rep The repetition index (0-indexed)
995 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
996 */
997 public XCN insertRxe14_PharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception {
998 return (XCN) super.insertRepetition(14, rep);
999 }
1000
1001
1002 /**
1003 * Removes a repetition of
1004 * RXE-14: "Pharmacist/Treatment Supplier's Verifier ID" at a specific index
1005 *
1006 * @param rep The repetition index (0-indexed)
1007 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1008 */
1009 public XCN removePharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception {
1010 return (XCN) super.removeRepetition(14, rep);
1011 }
1012
1013
1014 /**
1015 * Removes a repetition of
1016 * RXE-14: "Pharmacist/Treatment Supplier's Verifier ID" at a specific index
1017 *
1018 * @param rep The repetition index (0-indexed)
1019 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1020 */
1021 public XCN removeRxe14_PharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception {
1022 return (XCN) super.removeRepetition(14, rep);
1023 }
1024
1025
1026
1027
1028 /**
1029 * Returns
1030 * RXE-15: "Prescription Number" - creates it if necessary
1031 */
1032 public ST getPrescriptionNumber() {
1033 ST ret = null;
1034 try {
1035 Type t = this.getField(15, 0);
1036 ret = (ST)t;
1037 } catch (ClassCastException cce) {
1038 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1039 throw new RuntimeException(cce);
1040 } catch (HL7Exception he) {
1041 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1042 throw new RuntimeException(he);
1043 }
1044 return ret;
1045 }
1046
1047
1048 /**
1049 * Returns
1050 * RXE-15: "Prescription Number" - creates it if necessary
1051 */
1052 public ST getRxe15_PrescriptionNumber() {
1053 ST ret = null;
1054 try {
1055 Type t = this.getField(15, 0);
1056 ret = (ST)t;
1057 } catch (ClassCastException cce) {
1058 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1059 throw new RuntimeException(cce);
1060 } catch (HL7Exception he) {
1061 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1062 throw new RuntimeException(he);
1063 }
1064 return ret;
1065 }
1066
1067
1068
1069 /**
1070 * Returns
1071 * RXE-16: "Number of Refills Remaining" - creates it if necessary
1072 */
1073 public NM getNumberOfRefillsRemaining() {
1074 NM ret = null;
1075 try {
1076 Type t = this.getField(16, 0);
1077 ret = (NM)t;
1078 } catch (ClassCastException cce) {
1079 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1080 throw new RuntimeException(cce);
1081 } catch (HL7Exception he) {
1082 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1083 throw new RuntimeException(he);
1084 }
1085 return ret;
1086 }
1087
1088
1089 /**
1090 * Returns
1091 * RXE-16: "Number of Refills Remaining" - creates it if necessary
1092 */
1093 public NM getRxe16_NumberOfRefillsRemaining() {
1094 NM ret = null;
1095 try {
1096 Type t = this.getField(16, 0);
1097 ret = (NM)t;
1098 } catch (ClassCastException cce) {
1099 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1100 throw new RuntimeException(cce);
1101 } catch (HL7Exception he) {
1102 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1103 throw new RuntimeException(he);
1104 }
1105 return ret;
1106 }
1107
1108
1109
1110 /**
1111 * Returns
1112 * RXE-17: "Number of Refills/Doses Dispensed" - creates it if necessary
1113 */
1114 public NM getNumberOfRefillsDosesDispensed() {
1115 NM ret = null;
1116 try {
1117 Type t = this.getField(17, 0);
1118 ret = (NM)t;
1119 } catch (ClassCastException cce) {
1120 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1121 throw new RuntimeException(cce);
1122 } catch (HL7Exception he) {
1123 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1124 throw new RuntimeException(he);
1125 }
1126 return ret;
1127 }
1128
1129
1130 /**
1131 * Returns
1132 * RXE-17: "Number of Refills/Doses Dispensed" - creates it if necessary
1133 */
1134 public NM getRxe17_NumberOfRefillsDosesDispensed() {
1135 NM ret = null;
1136 try {
1137 Type t = this.getField(17, 0);
1138 ret = (NM)t;
1139 } catch (ClassCastException cce) {
1140 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1141 throw new RuntimeException(cce);
1142 } catch (HL7Exception he) {
1143 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1144 throw new RuntimeException(he);
1145 }
1146 return ret;
1147 }
1148
1149
1150
1151 /**
1152 * Returns
1153 * RXE-18: "D/T of Most Recent Refill or Dose Dispensed" - creates it if necessary
1154 */
1155 public TS getDTOfMostRecentRefillOrDoseDispensed() {
1156 TS ret = null;
1157 try {
1158 Type t = this.getField(18, 0);
1159 ret = (TS)t;
1160 } catch (ClassCastException cce) {
1161 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1162 throw new RuntimeException(cce);
1163 } catch (HL7Exception he) {
1164 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1165 throw new RuntimeException(he);
1166 }
1167 return ret;
1168 }
1169
1170
1171 /**
1172 * Returns
1173 * RXE-18: "D/T of Most Recent Refill or Dose Dispensed" - creates it if necessary
1174 */
1175 public TS getRxe18_DTOfMostRecentRefillOrDoseDispensed() {
1176 TS ret = null;
1177 try {
1178 Type t = this.getField(18, 0);
1179 ret = (TS)t;
1180 } catch (ClassCastException cce) {
1181 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1182 throw new RuntimeException(cce);
1183 } catch (HL7Exception he) {
1184 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1185 throw new RuntimeException(he);
1186 }
1187 return ret;
1188 }
1189
1190
1191
1192 /**
1193 * Returns
1194 * RXE-19: "Total Daily Dose" - creates it if necessary
1195 */
1196 public CQ getTotalDailyDose() {
1197 CQ ret = null;
1198 try {
1199 Type t = this.getField(19, 0);
1200 ret = (CQ)t;
1201 } catch (ClassCastException cce) {
1202 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1203 throw new RuntimeException(cce);
1204 } catch (HL7Exception he) {
1205 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1206 throw new RuntimeException(he);
1207 }
1208 return ret;
1209 }
1210
1211
1212 /**
1213 * Returns
1214 * RXE-19: "Total Daily Dose" - creates it if necessary
1215 */
1216 public CQ getRxe19_TotalDailyDose() {
1217 CQ ret = null;
1218 try {
1219 Type t = this.getField(19, 0);
1220 ret = (CQ)t;
1221 } catch (ClassCastException cce) {
1222 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1223 throw new RuntimeException(cce);
1224 } catch (HL7Exception he) {
1225 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1226 throw new RuntimeException(he);
1227 }
1228 return ret;
1229 }
1230
1231
1232
1233 /**
1234 * Returns
1235 * RXE-20: "Needs Human Review" - creates it if necessary
1236 */
1237 public ID getNeedsHumanReview() {
1238 ID ret = null;
1239 try {
1240 Type t = this.getField(20, 0);
1241 ret = (ID)t;
1242 } catch (ClassCastException cce) {
1243 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1244 throw new RuntimeException(cce);
1245 } catch (HL7Exception he) {
1246 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1247 throw new RuntimeException(he);
1248 }
1249 return ret;
1250 }
1251
1252
1253 /**
1254 * Returns
1255 * RXE-20: "Needs Human Review" - creates it if necessary
1256 */
1257 public ID getRxe20_NeedsHumanReview() {
1258 ID ret = null;
1259 try {
1260 Type t = this.getField(20, 0);
1261 ret = (ID)t;
1262 } catch (ClassCastException cce) {
1263 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1264 throw new RuntimeException(cce);
1265 } catch (HL7Exception he) {
1266 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1267 throw new RuntimeException(he);
1268 }
1269 return ret;
1270 }
1271
1272
1273 /**
1274 * Returns all repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXE-21).
1275 */
1276 public CE[] getPharmacyTreatmentSupplierSSpecialDispensingInstructions() {
1277 CE[] ret = null;
1278 try {
1279 Type[] t = this.getField(21);
1280 ret = new CE[t.length];
1281 for (int i = 0; i < ret.length; i++) {
1282 ret[i] = (CE)t[i];
1283 }
1284 } catch (ClassCastException cce) {
1285 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1286 throw new RuntimeException(cce);
1287 } catch (HL7Exception he) {
1288 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1289 throw new RuntimeException(he);
1290 }
1291 return ret;
1292 }
1293
1294
1295 /**
1296 * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXE-21).
1297 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1298 * it will return zero.
1299 */
1300 public int getPharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() {
1301 CE[] ret = null;
1302 try {
1303 Type[] t = this.getField(21);
1304 return t.length;
1305 } catch (ClassCastException cce) {
1306 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1307 throw new RuntimeException(cce);
1308 } catch (HL7Exception he) {
1309 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1310 throw new RuntimeException(he);
1311 }
1312 }
1313
1314
1315 /**
1316 * Returns a specific repetition of
1317 * RXE-21: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary
1318 *
1319 * @param rep The repetition index (0-indexed)
1320 */
1321 public CE getPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) {
1322 CE ret = null;
1323 try {
1324 Type t = this.getField(21, rep);
1325 ret = (CE)t;
1326 } catch (ClassCastException cce) {
1327 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1328 throw new RuntimeException(cce);
1329 } catch (HL7Exception he) {
1330 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1331 throw new RuntimeException(he);
1332 }
1333 return ret;
1334 }
1335
1336 /**
1337 * Returns a specific repetition of
1338 * RXE-21: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary
1339 *
1340 * @param rep The repetition index (0-indexed)
1341 */
1342 public CE getRxe21_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) {
1343 CE ret = null;
1344 try {
1345 Type t = this.getField(21, rep);
1346 ret = (CE)t;
1347 } catch (ClassCastException cce) {
1348 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1349 throw new RuntimeException(cce);
1350 } catch (HL7Exception he) {
1351 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1352 throw new RuntimeException(he);
1353 }
1354 return ret;
1355 }
1356
1357
1358 /**
1359 * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXE-21).
1360 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1361 * it will return zero.
1362 */
1363 public int getRxe21_PharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() {
1364 CE[] ret = null;
1365 try {
1366 Type[] t = this.getField(21);
1367 return t.length;
1368 } catch (ClassCastException cce) {
1369 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1370 throw new RuntimeException(cce);
1371 } catch (HL7Exception he) {
1372 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1373 throw new RuntimeException(he);
1374 }
1375 }
1376
1377
1378
1379 /**
1380 * Inserts a repetition of
1381 * RXE-21: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
1382 *
1383 * @param rep The repetition index (0-indexed)
1384 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1385 */
1386 public CE insertPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception {
1387 return (CE) super.insertRepetition(21, rep);
1388 }
1389
1390
1391
1392 /**
1393 * Inserts a repetition of
1394 * RXE-21: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
1395 *
1396 * @param rep The repetition index (0-indexed)
1397 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1398 */
1399 public CE insertRxe21_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception {
1400 return (CE) super.insertRepetition(21, rep);
1401 }
1402
1403
1404 /**
1405 * Removes a repetition of
1406 * RXE-21: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
1407 *
1408 * @param rep The repetition index (0-indexed)
1409 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1410 */
1411 public CE removePharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception {
1412 return (CE) super.removeRepetition(21, rep);
1413 }
1414
1415
1416 /**
1417 * Removes a repetition of
1418 * RXE-21: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
1419 *
1420 * @param rep The repetition index (0-indexed)
1421 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1422 */
1423 public CE removeRxe21_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception {
1424 return (CE) super.removeRepetition(21, rep);
1425 }
1426
1427
1428
1429
1430 /**
1431 * Returns
1432 * RXE-22: "Give Per (Time Unit)" - creates it if necessary
1433 */
1434 public ST getGivePerTimeUnit() {
1435 ST ret = null;
1436 try {
1437 Type t = this.getField(22, 0);
1438 ret = (ST)t;
1439 } catch (ClassCastException cce) {
1440 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1441 throw new RuntimeException(cce);
1442 } catch (HL7Exception he) {
1443 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1444 throw new RuntimeException(he);
1445 }
1446 return ret;
1447 }
1448
1449
1450 /**
1451 * Returns
1452 * RXE-22: "Give Per (Time Unit)" - creates it if necessary
1453 */
1454 public ST getRxe22_GivePerTimeUnit() {
1455 ST ret = null;
1456 try {
1457 Type t = this.getField(22, 0);
1458 ret = (ST)t;
1459 } catch (ClassCastException cce) {
1460 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1461 throw new RuntimeException(cce);
1462 } catch (HL7Exception he) {
1463 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1464 throw new RuntimeException(he);
1465 }
1466 return ret;
1467 }
1468
1469
1470
1471 /**
1472 * Returns
1473 * RXE-23: "Give Rate Amount" - creates it if necessary
1474 */
1475 public ST getGiveRateAmount() {
1476 ST ret = null;
1477 try {
1478 Type t = this.getField(23, 0);
1479 ret = (ST)t;
1480 } catch (ClassCastException cce) {
1481 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1482 throw new RuntimeException(cce);
1483 } catch (HL7Exception he) {
1484 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1485 throw new RuntimeException(he);
1486 }
1487 return ret;
1488 }
1489
1490
1491 /**
1492 * Returns
1493 * RXE-23: "Give Rate Amount" - creates it if necessary
1494 */
1495 public ST getRxe23_GiveRateAmount() {
1496 ST ret = null;
1497 try {
1498 Type t = this.getField(23, 0);
1499 ret = (ST)t;
1500 } catch (ClassCastException cce) {
1501 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1502 throw new RuntimeException(cce);
1503 } catch (HL7Exception he) {
1504 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1505 throw new RuntimeException(he);
1506 }
1507 return ret;
1508 }
1509
1510
1511
1512 /**
1513 * Returns
1514 * RXE-24: "Give Rate Units" - creates it if necessary
1515 */
1516 public CE getGiveRateUnits() {
1517 CE ret = null;
1518 try {
1519 Type t = this.getField(24, 0);
1520 ret = (CE)t;
1521 } catch (ClassCastException cce) {
1522 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1523 throw new RuntimeException(cce);
1524 } catch (HL7Exception he) {
1525 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1526 throw new RuntimeException(he);
1527 }
1528 return ret;
1529 }
1530
1531
1532 /**
1533 * Returns
1534 * RXE-24: "Give Rate Units" - creates it if necessary
1535 */
1536 public CE getRxe24_GiveRateUnits() {
1537 CE ret = null;
1538 try {
1539 Type t = this.getField(24, 0);
1540 ret = (CE)t;
1541 } catch (ClassCastException cce) {
1542 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1543 throw new RuntimeException(cce);
1544 } catch (HL7Exception he) {
1545 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1546 throw new RuntimeException(he);
1547 }
1548 return ret;
1549 }
1550
1551
1552
1553 /**
1554 * Returns
1555 * RXE-25: "Give Strength" - creates it if necessary
1556 */
1557 public NM getGiveStrength() {
1558 NM ret = null;
1559 try {
1560 Type t = this.getField(25, 0);
1561 ret = (NM)t;
1562 } catch (ClassCastException cce) {
1563 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1564 throw new RuntimeException(cce);
1565 } catch (HL7Exception he) {
1566 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1567 throw new RuntimeException(he);
1568 }
1569 return ret;
1570 }
1571
1572
1573 /**
1574 * Returns
1575 * RXE-25: "Give Strength" - creates it if necessary
1576 */
1577 public NM getRxe25_GiveStrength() {
1578 NM ret = null;
1579 try {
1580 Type t = this.getField(25, 0);
1581 ret = (NM)t;
1582 } catch (ClassCastException cce) {
1583 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1584 throw new RuntimeException(cce);
1585 } catch (HL7Exception he) {
1586 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1587 throw new RuntimeException(he);
1588 }
1589 return ret;
1590 }
1591
1592
1593
1594 /**
1595 * Returns
1596 * RXE-26: "Give Strength Units" - creates it if necessary
1597 */
1598 public CE getGiveStrengthUnits() {
1599 CE ret = null;
1600 try {
1601 Type t = this.getField(26, 0);
1602 ret = (CE)t;
1603 } catch (ClassCastException cce) {
1604 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1605 throw new RuntimeException(cce);
1606 } catch (HL7Exception he) {
1607 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1608 throw new RuntimeException(he);
1609 }
1610 return ret;
1611 }
1612
1613
1614 /**
1615 * Returns
1616 * RXE-26: "Give Strength Units" - creates it if necessary
1617 */
1618 public CE getRxe26_GiveStrengthUnits() {
1619 CE ret = null;
1620 try {
1621 Type t = this.getField(26, 0);
1622 ret = (CE)t;
1623 } catch (ClassCastException cce) {
1624 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1625 throw new RuntimeException(cce);
1626 } catch (HL7Exception he) {
1627 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1628 throw new RuntimeException(he);
1629 }
1630 return ret;
1631 }
1632
1633
1634 /**
1635 * Returns all repetitions of Give Indication (RXE-27).
1636 */
1637 public CE[] getGiveIndication() {
1638 CE[] ret = null;
1639 try {
1640 Type[] t = this.getField(27);
1641 ret = new CE[t.length];
1642 for (int i = 0; i < ret.length; i++) {
1643 ret[i] = (CE)t[i];
1644 }
1645 } catch (ClassCastException cce) {
1646 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1647 throw new RuntimeException(cce);
1648 } catch (HL7Exception he) {
1649 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1650 throw new RuntimeException(he);
1651 }
1652 return ret;
1653 }
1654
1655
1656 /**
1657 * Returns a count of the current number of repetitions of Give Indication (RXE-27).
1658 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1659 * it will return zero.
1660 */
1661 public int getGiveIndicationReps() {
1662 CE[] ret = null;
1663 try {
1664 Type[] t = this.getField(27);
1665 return t.length;
1666 } catch (ClassCastException cce) {
1667 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1668 throw new RuntimeException(cce);
1669 } catch (HL7Exception he) {
1670 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1671 throw new RuntimeException(he);
1672 }
1673 }
1674
1675
1676 /**
1677 * Returns a specific repetition of
1678 * RXE-27: "Give Indication" - creates it if necessary
1679 *
1680 * @param rep The repetition index (0-indexed)
1681 */
1682 public CE getGiveIndication(int rep) {
1683 CE ret = null;
1684 try {
1685 Type t = this.getField(27, rep);
1686 ret = (CE)t;
1687 } catch (ClassCastException cce) {
1688 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1689 throw new RuntimeException(cce);
1690 } catch (HL7Exception he) {
1691 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1692 throw new RuntimeException(he);
1693 }
1694 return ret;
1695 }
1696
1697 /**
1698 * Returns a specific repetition of
1699 * RXE-27: "Give Indication" - creates it if necessary
1700 *
1701 * @param rep The repetition index (0-indexed)
1702 */
1703 public CE getRxe27_GiveIndication(int rep) {
1704 CE ret = null;
1705 try {
1706 Type t = this.getField(27, rep);
1707 ret = (CE)t;
1708 } catch (ClassCastException cce) {
1709 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1710 throw new RuntimeException(cce);
1711 } catch (HL7Exception he) {
1712 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1713 throw new RuntimeException(he);
1714 }
1715 return ret;
1716 }
1717
1718
1719 /**
1720 * Returns a count of the current number of repetitions of Give Indication (RXE-27).
1721 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1722 * it will return zero.
1723 */
1724 public int getRxe27_GiveIndicationReps() {
1725 CE[] ret = null;
1726 try {
1727 Type[] t = this.getField(27);
1728 return t.length;
1729 } catch (ClassCastException cce) {
1730 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1731 throw new RuntimeException(cce);
1732 } catch (HL7Exception he) {
1733 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1734 throw new RuntimeException(he);
1735 }
1736 }
1737
1738
1739
1740 /**
1741 * Inserts a repetition of
1742 * RXE-27: "Give Indication" at a specific index
1743 *
1744 * @param rep The repetition index (0-indexed)
1745 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1746 */
1747 public CE insertGiveIndication(int rep) throws HL7Exception {
1748 return (CE) super.insertRepetition(27, rep);
1749 }
1750
1751
1752
1753 /**
1754 * Inserts a repetition of
1755 * RXE-27: "Give Indication" at a specific index
1756 *
1757 * @param rep The repetition index (0-indexed)
1758 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1759 */
1760 public CE insertRxe27_GiveIndication(int rep) throws HL7Exception {
1761 return (CE) super.insertRepetition(27, rep);
1762 }
1763
1764
1765 /**
1766 * Removes a repetition of
1767 * RXE-27: "Give Indication" at a specific index
1768 *
1769 * @param rep The repetition index (0-indexed)
1770 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1771 */
1772 public CE removeGiveIndication(int rep) throws HL7Exception {
1773 return (CE) super.removeRepetition(27, rep);
1774 }
1775
1776
1777 /**
1778 * Removes a repetition of
1779 * RXE-27: "Give Indication" at a specific index
1780 *
1781 * @param rep The repetition index (0-indexed)
1782 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1783 */
1784 public CE removeRxe27_GiveIndication(int rep) throws HL7Exception {
1785 return (CE) super.removeRepetition(27, rep);
1786 }
1787
1788
1789
1790
1791 /**
1792 * Returns
1793 * RXE-28: "Dispense Package Size" - creates it if necessary
1794 */
1795 public NM getDispensePackageSize() {
1796 NM ret = null;
1797 try {
1798 Type t = this.getField(28, 0);
1799 ret = (NM)t;
1800 } catch (ClassCastException cce) {
1801 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1802 throw new RuntimeException(cce);
1803 } catch (HL7Exception he) {
1804 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1805 throw new RuntimeException(he);
1806 }
1807 return ret;
1808 }
1809
1810
1811 /**
1812 * Returns
1813 * RXE-28: "Dispense Package Size" - creates it if necessary
1814 */
1815 public NM getRxe28_DispensePackageSize() {
1816 NM ret = null;
1817 try {
1818 Type t = this.getField(28, 0);
1819 ret = (NM)t;
1820 } catch (ClassCastException cce) {
1821 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1822 throw new RuntimeException(cce);
1823 } catch (HL7Exception he) {
1824 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1825 throw new RuntimeException(he);
1826 }
1827 return ret;
1828 }
1829
1830
1831
1832 /**
1833 * Returns
1834 * RXE-29: "Dispense Package Size Unit" - creates it if necessary
1835 */
1836 public CE getDispensePackageSizeUnit() {
1837 CE ret = null;
1838 try {
1839 Type t = this.getField(29, 0);
1840 ret = (CE)t;
1841 } catch (ClassCastException cce) {
1842 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1843 throw new RuntimeException(cce);
1844 } catch (HL7Exception he) {
1845 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1846 throw new RuntimeException(he);
1847 }
1848 return ret;
1849 }
1850
1851
1852 /**
1853 * Returns
1854 * RXE-29: "Dispense Package Size Unit" - creates it if necessary
1855 */
1856 public CE getRxe29_DispensePackageSizeUnit() {
1857 CE ret = null;
1858 try {
1859 Type t = this.getField(29, 0);
1860 ret = (CE)t;
1861 } catch (ClassCastException cce) {
1862 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1863 throw new RuntimeException(cce);
1864 } catch (HL7Exception he) {
1865 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1866 throw new RuntimeException(he);
1867 }
1868 return ret;
1869 }
1870
1871
1872
1873 /**
1874 * Returns
1875 * RXE-30: "Dispense Package Method" - creates it if necessary
1876 */
1877 public ID getDispensePackageMethod() {
1878 ID ret = null;
1879 try {
1880 Type t = this.getField(30, 0);
1881 ret = (ID)t;
1882 } catch (ClassCastException cce) {
1883 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1884 throw new RuntimeException(cce);
1885 } catch (HL7Exception he) {
1886 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1887 throw new RuntimeException(he);
1888 }
1889 return ret;
1890 }
1891
1892
1893 /**
1894 * Returns
1895 * RXE-30: "Dispense Package Method" - creates it if necessary
1896 */
1897 public ID getRxe30_DispensePackageMethod() {
1898 ID ret = null;
1899 try {
1900 Type t = this.getField(30, 0);
1901 ret = (ID)t;
1902 } catch (ClassCastException cce) {
1903 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1904 throw new RuntimeException(cce);
1905 } catch (HL7Exception he) {
1906 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1907 throw new RuntimeException(he);
1908 }
1909 return ret;
1910 }
1911
1912
1913 /**
1914 * Returns all repetitions of Supplementary Code (RXE-31).
1915 */
1916 public CE[] getSupplementaryCode() {
1917 CE[] ret = null;
1918 try {
1919 Type[] t = this.getField(31);
1920 ret = new CE[t.length];
1921 for (int i = 0; i < ret.length; i++) {
1922 ret[i] = (CE)t[i];
1923 }
1924 } catch (ClassCastException cce) {
1925 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1926 throw new RuntimeException(cce);
1927 } catch (HL7Exception he) {
1928 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1929 throw new RuntimeException(he);
1930 }
1931 return ret;
1932 }
1933
1934
1935 /**
1936 * Returns a count of the current number of repetitions of Supplementary Code (RXE-31).
1937 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1938 * it will return zero.
1939 */
1940 public int getSupplementaryCodeReps() {
1941 CE[] ret = null;
1942 try {
1943 Type[] t = this.getField(31);
1944 return t.length;
1945 } catch (ClassCastException cce) {
1946 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1947 throw new RuntimeException(cce);
1948 } catch (HL7Exception he) {
1949 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1950 throw new RuntimeException(he);
1951 }
1952 }
1953
1954
1955 /**
1956 * Returns a specific repetition of
1957 * RXE-31: "Supplementary Code" - creates it if necessary
1958 *
1959 * @param rep The repetition index (0-indexed)
1960 */
1961 public CE getSupplementaryCode(int rep) {
1962 CE ret = null;
1963 try {
1964 Type t = this.getField(31, rep);
1965 ret = (CE)t;
1966 } catch (ClassCastException cce) {
1967 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1968 throw new RuntimeException(cce);
1969 } catch (HL7Exception he) {
1970 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1971 throw new RuntimeException(he);
1972 }
1973 return ret;
1974 }
1975
1976 /**
1977 * Returns a specific repetition of
1978 * RXE-31: "Supplementary Code" - creates it if necessary
1979 *
1980 * @param rep The repetition index (0-indexed)
1981 */
1982 public CE getRxe31_SupplementaryCode(int rep) {
1983 CE ret = null;
1984 try {
1985 Type t = this.getField(31, rep);
1986 ret = (CE)t;
1987 } catch (ClassCastException cce) {
1988 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1989 throw new RuntimeException(cce);
1990 } catch (HL7Exception he) {
1991 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1992 throw new RuntimeException(he);
1993 }
1994 return ret;
1995 }
1996
1997
1998 /**
1999 * Returns a count of the current number of repetitions of Supplementary Code (RXE-31).
2000 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2001 * it will return zero.
2002 */
2003 public int getRxe31_SupplementaryCodeReps() {
2004 CE[] ret = null;
2005 try {
2006 Type[] t = this.getField(31);
2007 return t.length;
2008 } catch (ClassCastException cce) {
2009 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2010 throw new RuntimeException(cce);
2011 } catch (HL7Exception he) {
2012 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2013 throw new RuntimeException(he);
2014 }
2015 }
2016
2017
2018
2019 /**
2020 * Inserts a repetition of
2021 * RXE-31: "Supplementary Code" at a specific index
2022 *
2023 * @param rep The repetition index (0-indexed)
2024 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2025 */
2026 public CE insertSupplementaryCode(int rep) throws HL7Exception {
2027 return (CE) super.insertRepetition(31, rep);
2028 }
2029
2030
2031
2032 /**
2033 * Inserts a repetition of
2034 * RXE-31: "Supplementary Code" at a specific index
2035 *
2036 * @param rep The repetition index (0-indexed)
2037 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2038 */
2039 public CE insertRxe31_SupplementaryCode(int rep) throws HL7Exception {
2040 return (CE) super.insertRepetition(31, rep);
2041 }
2042
2043
2044 /**
2045 * Removes a repetition of
2046 * RXE-31: "Supplementary Code" at a specific index
2047 *
2048 * @param rep The repetition index (0-indexed)
2049 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2050 */
2051 public CE removeSupplementaryCode(int rep) throws HL7Exception {
2052 return (CE) super.removeRepetition(31, rep);
2053 }
2054
2055
2056 /**
2057 * Removes a repetition of
2058 * RXE-31: "Supplementary Code" at a specific index
2059 *
2060 * @param rep The repetition index (0-indexed)
2061 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2062 */
2063 public CE removeRxe31_SupplementaryCode(int rep) throws HL7Exception {
2064 return (CE) super.removeRepetition(31, rep);
2065 }
2066
2067
2068
2069
2070
2071
2072 /** {@inheritDoc} */
2073 protected Type createNewTypeWithoutReflection(int field) {
2074 switch (field) {
2075 case 0: return new TQ(getMessage());
2076 case 1: return new CE(getMessage());
2077 case 2: return new NM(getMessage());
2078 case 3: return new NM(getMessage());
2079 case 4: return new CE(getMessage());
2080 case 5: return new CE(getMessage());
2081 case 6: return new CE(getMessage());
2082 case 7: return new LA1(getMessage());
2083 case 8: return new ID(getMessage(), new Integer( 167 ));
2084 case 9: return new NM(getMessage());
2085 case 10: return new CE(getMessage());
2086 case 11: return new NM(getMessage());
2087 case 12: return new XCN(getMessage());
2088 case 13: return new XCN(getMessage());
2089 case 14: return new ST(getMessage());
2090 case 15: return new NM(getMessage());
2091 case 16: return new NM(getMessage());
2092 case 17: return new TS(getMessage());
2093 case 18: return new CQ(getMessage());
2094 case 19: return new ID(getMessage(), new Integer( 136 ));
2095 case 20: return new CE(getMessage());
2096 case 21: return new ST(getMessage());
2097 case 22: return new ST(getMessage());
2098 case 23: return new CE(getMessage());
2099 case 24: return new NM(getMessage());
2100 case 25: return new CE(getMessage());
2101 case 26: return new CE(getMessage());
2102 case 27: return new NM(getMessage());
2103 case 28: return new CE(getMessage());
2104 case 29: return new ID(getMessage(), new Integer( 321 ));
2105 case 30: return new CE(getMessage());
2106 default: return null;
2107 }
2108 }
2109
2110
2111 }
2112