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.v231.segment;
009
010 // import ca.uhn.hl7v2.model.v231.group.*;
011 import ca.uhn.hl7v2.model.v231.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 RXO message segment (RXO - pharmacy/treatment order segment).
024 * This segment has the following fields:</p>
025 * <ul>
026 * <li>RXO-1: Requested Give Code (CE) <b>optional </b>
027 * <li>RXO-2: Requested Give Amount - Minimum (NM) <b>optional </b>
028 * <li>RXO-3: Requested Give Amount - Maximum (NM) <b>optional </b>
029 * <li>RXO-4: Requested Give Units (CE) <b>optional </b>
030 * <li>RXO-5: Requested Dosage Form (CE) <b>optional </b>
031 * <li>RXO-6: Provider’s Pharmacy/Treatment Instructions (CE) <b>optional repeating</b>
032 * <li>RXO-7: Provider’s Administration Instructions (CE) <b>optional repeating</b>
033 * <li>RXO-8: Deliver-to Location (LA1) <b>optional </b>
034 * <li>RXO-9: Allow Substitutions (ID) <b>optional </b>
035 * <li>RXO-10: Requested Dispense Code (CE) <b>optional </b>
036 * <li>RXO-11: Requested Dispense Amount (NM) <b>optional </b>
037 * <li>RXO-12: Requested Dispense Units (CE) <b>optional </b>
038 * <li>RXO-13: Number Of Refills (NM) <b>optional </b>
039 * <li>RXO-14: Ordering Provider’s DEA Number (XCN) <b>optional repeating</b>
040 * <li>RXO-15: Pharmacist/Treatment Supplier’s Verifier ID (XCN) <b>optional repeating</b>
041 * <li>RXO-16: Needs Human Review (ID) <b>optional </b>
042 * <li>RXO-17: Requested Give Per (Time Unit) (ST) <b>optional </b>
043 * <li>RXO-18: Requested Give Strength (NM) <b>optional </b>
044 * <li>RXO-19: Requested Give Strength Units (CE) <b>optional </b>
045 * <li>RXO-20: Indication (CE) <b>optional repeating</b>
046 * <li>RXO-21: Requested Give Rate Amount (ST) <b>optional </b>
047 * <li>RXO-22: Requested Give Rate Units (CE) <b>optional </b>
048 * <li>RXO-23: Total Daily Dose (CQ) <b>optional </b>
049 * </ul>
050 */
051 public class RXO extends AbstractSegment {
052
053 /**
054 * Creates a new RXO segment
055 */
056 public RXO(Group parent, ModelClassFactory factory) {
057 super(parent, factory);
058 init(factory);
059 }
060
061 private void init(ModelClassFactory factory) {
062 try {
063 this.add(CE.class, false, 1, 100, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Code");
064 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Amount - Minimum");
065 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Amount - Maximum");
066 this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Units");
067 this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Dosage Form");
068 this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Provider’s Pharmacy/Treatment Instructions");
069 this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Provider’s Administration Instructions");
070 this.add(LA1.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Deliver-to Location");
071 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Allow Substitutions");
072 this.add(CE.class, false, 1, 100, new Object[]{ getMessage(), new Integer(0) }, "Requested Dispense Code");
073 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Dispense Amount");
074 this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Dispense Units");
075 this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Number Of Refills");
076 this.add(XCN.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Ordering Provider’s DEA Number");
077 this.add(XCN.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Pharmacist/Treatment Supplier’s Verifier ID");
078 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Needs Human Review");
079 this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Per (Time Unit)");
080 this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Strength");
081 this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Strength Units");
082 this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Indication");
083 this.add(ST.class, false, 1, 6, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Rate Amount");
084 this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Requested Give Rate Units");
085 this.add(CQ.class, false, 1, 10, new Object[]{ getMessage(), new Integer(0) }, "Total Daily Dose");
086 } catch(HL7Exception e) {
087 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RXO - this is probably a bug in the source code generator.", e);
088 }
089 }
090
091
092
093 /**
094 * Returns
095 * RXO-1: "Requested Give Code" - creates it if necessary
096 */
097 public CE getRequestedGiveCode() {
098 CE ret = null;
099 try {
100 Type t = this.getField(1, 0);
101 ret = (CE)t;
102 } catch (ClassCastException cce) {
103 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
104 throw new RuntimeException(cce);
105 } catch (HL7Exception he) {
106 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
107 throw new RuntimeException(he);
108 }
109 return ret;
110 }
111
112
113 /**
114 * Returns
115 * RXO-1: "Requested Give Code" - creates it if necessary
116 */
117 public CE getRxo1_RequestedGiveCode() {
118 CE ret = null;
119 try {
120 Type t = this.getField(1, 0);
121 ret = (CE)t;
122 } catch (ClassCastException cce) {
123 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
124 throw new RuntimeException(cce);
125 } catch (HL7Exception he) {
126 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
127 throw new RuntimeException(he);
128 }
129 return ret;
130 }
131
132
133
134 /**
135 * Returns
136 * RXO-2: "Requested Give Amount - Minimum" - creates it if necessary
137 */
138 public NM getRequestedGiveAmountMinimum() {
139 NM ret = null;
140 try {
141 Type t = this.getField(2, 0);
142 ret = (NM)t;
143 } catch (ClassCastException cce) {
144 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
145 throw new RuntimeException(cce);
146 } catch (HL7Exception he) {
147 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
148 throw new RuntimeException(he);
149 }
150 return ret;
151 }
152
153
154 /**
155 * Returns
156 * RXO-2: "Requested Give Amount - Minimum" - creates it if necessary
157 */
158 public NM getRxo2_RequestedGiveAmountMinimum() {
159 NM ret = null;
160 try {
161 Type t = this.getField(2, 0);
162 ret = (NM)t;
163 } catch (ClassCastException cce) {
164 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
165 throw new RuntimeException(cce);
166 } catch (HL7Exception he) {
167 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
168 throw new RuntimeException(he);
169 }
170 return ret;
171 }
172
173
174
175 /**
176 * Returns
177 * RXO-3: "Requested Give Amount - Maximum" - creates it if necessary
178 */
179 public NM getRequestedGiveAmountMaximum() {
180 NM ret = null;
181 try {
182 Type t = this.getField(3, 0);
183 ret = (NM)t;
184 } catch (ClassCastException cce) {
185 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
186 throw new RuntimeException(cce);
187 } catch (HL7Exception he) {
188 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
189 throw new RuntimeException(he);
190 }
191 return ret;
192 }
193
194
195 /**
196 * Returns
197 * RXO-3: "Requested Give Amount - Maximum" - creates it if necessary
198 */
199 public NM getRxo3_RequestedGiveAmountMaximum() {
200 NM ret = null;
201 try {
202 Type t = this.getField(3, 0);
203 ret = (NM)t;
204 } catch (ClassCastException cce) {
205 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
206 throw new RuntimeException(cce);
207 } catch (HL7Exception he) {
208 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
209 throw new RuntimeException(he);
210 }
211 return ret;
212 }
213
214
215
216 /**
217 * Returns
218 * RXO-4: "Requested Give Units" - creates it if necessary
219 */
220 public CE getRequestedGiveUnits() {
221 CE ret = null;
222 try {
223 Type t = this.getField(4, 0);
224 ret = (CE)t;
225 } catch (ClassCastException cce) {
226 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
227 throw new RuntimeException(cce);
228 } catch (HL7Exception he) {
229 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
230 throw new RuntimeException(he);
231 }
232 return ret;
233 }
234
235
236 /**
237 * Returns
238 * RXO-4: "Requested Give Units" - creates it if necessary
239 */
240 public CE getRxo4_RequestedGiveUnits() {
241 CE ret = null;
242 try {
243 Type t = this.getField(4, 0);
244 ret = (CE)t;
245 } catch (ClassCastException cce) {
246 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
247 throw new RuntimeException(cce);
248 } catch (HL7Exception he) {
249 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
250 throw new RuntimeException(he);
251 }
252 return ret;
253 }
254
255
256
257 /**
258 * Returns
259 * RXO-5: "Requested Dosage Form" - creates it if necessary
260 */
261 public CE getRequestedDosageForm() {
262 CE ret = null;
263 try {
264 Type t = this.getField(5, 0);
265 ret = (CE)t;
266 } catch (ClassCastException cce) {
267 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
268 throw new RuntimeException(cce);
269 } catch (HL7Exception he) {
270 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
271 throw new RuntimeException(he);
272 }
273 return ret;
274 }
275
276
277 /**
278 * Returns
279 * RXO-5: "Requested Dosage Form" - creates it if necessary
280 */
281 public CE getRxo5_RequestedDosageForm() {
282 CE ret = null;
283 try {
284 Type t = this.getField(5, 0);
285 ret = (CE)t;
286 } catch (ClassCastException cce) {
287 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
288 throw new RuntimeException(cce);
289 } catch (HL7Exception he) {
290 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
291 throw new RuntimeException(he);
292 }
293 return ret;
294 }
295
296
297 /**
298 * Returns all repetitions of Provider’s Pharmacy/Treatment Instructions (RXO-6).
299 */
300 public CE[] getProviderSPharmacyTreatmentInstructions() {
301 CE[] ret = null;
302 try {
303 Type[] t = this.getField(6);
304 ret = new CE[t.length];
305 for (int i = 0; i < ret.length; i++) {
306 ret[i] = (CE)t[i];
307 }
308 } catch (ClassCastException cce) {
309 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
310 throw new RuntimeException(cce);
311 } catch (HL7Exception he) {
312 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
313 throw new RuntimeException(he);
314 }
315 return ret;
316 }
317
318
319 /**
320 * Returns a count of the current number of repetitions of Provider’s Pharmacy/Treatment Instructions (RXO-6).
321 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
322 * it will return zero.
323 */
324 public int getProviderSPharmacyTreatmentInstructionsReps() {
325 CE[] ret = null;
326 try {
327 Type[] t = this.getField(6);
328 return t.length;
329 } catch (ClassCastException cce) {
330 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
331 throw new RuntimeException(cce);
332 } catch (HL7Exception he) {
333 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
334 throw new RuntimeException(he);
335 }
336 }
337
338
339 /**
340 * Returns a specific repetition of
341 * RXO-6: "Provider’s Pharmacy/Treatment Instructions" - creates it if necessary
342 *
343 * @param rep The repetition index (0-indexed)
344 */
345 public CE getProviderSPharmacyTreatmentInstructions(int rep) {
346 CE ret = null;
347 try {
348 Type t = this.getField(6, rep);
349 ret = (CE)t;
350 } catch (ClassCastException cce) {
351 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
352 throw new RuntimeException(cce);
353 } catch (HL7Exception he) {
354 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
355 throw new RuntimeException(he);
356 }
357 return ret;
358 }
359
360 /**
361 * Returns a specific repetition of
362 * RXO-6: "Provider’s Pharmacy/Treatment Instructions" - creates it if necessary
363 *
364 * @param rep The repetition index (0-indexed)
365 */
366 public CE getRxo6_ProviderSPharmacyTreatmentInstructions(int rep) {
367 CE ret = null;
368 try {
369 Type t = this.getField(6, rep);
370 ret = (CE)t;
371 } catch (ClassCastException cce) {
372 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
373 throw new RuntimeException(cce);
374 } catch (HL7Exception he) {
375 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
376 throw new RuntimeException(he);
377 }
378 return ret;
379 }
380
381
382 /**
383 * Returns a count of the current number of repetitions of Provider’s Pharmacy/Treatment Instructions (RXO-6).
384 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
385 * it will return zero.
386 */
387 public int getRxo6_ProviderSPharmacyTreatmentInstructionsReps() {
388 CE[] ret = null;
389 try {
390 Type[] t = this.getField(6);
391 return t.length;
392 } catch (ClassCastException cce) {
393 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
394 throw new RuntimeException(cce);
395 } catch (HL7Exception he) {
396 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
397 throw new RuntimeException(he);
398 }
399 }
400
401
402
403 /**
404 * Inserts a repetition of
405 * RXO-6: "Provider’s Pharmacy/Treatment Instructions" at a specific index
406 *
407 * @param rep The repetition index (0-indexed)
408 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
409 */
410 public CE insertProviderSPharmacyTreatmentInstructions(int rep) throws HL7Exception {
411 return (CE) super.insertRepetition(6, rep);
412 }
413
414
415
416 /**
417 * Inserts a repetition of
418 * RXO-6: "Provider’s Pharmacy/Treatment Instructions" at a specific index
419 *
420 * @param rep The repetition index (0-indexed)
421 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
422 */
423 public CE insertRxo6_ProviderSPharmacyTreatmentInstructions(int rep) throws HL7Exception {
424 return (CE) super.insertRepetition(6, rep);
425 }
426
427
428 /**
429 * Removes a repetition of
430 * RXO-6: "Provider’s Pharmacy/Treatment Instructions" at a specific index
431 *
432 * @param rep The repetition index (0-indexed)
433 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
434 */
435 public CE removeProviderSPharmacyTreatmentInstructions(int rep) throws HL7Exception {
436 return (CE) super.removeRepetition(6, rep);
437 }
438
439
440 /**
441 * Removes a repetition of
442 * RXO-6: "Provider’s Pharmacy/Treatment Instructions" at a specific index
443 *
444 * @param rep The repetition index (0-indexed)
445 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
446 */
447 public CE removeRxo6_ProviderSPharmacyTreatmentInstructions(int rep) throws HL7Exception {
448 return (CE) super.removeRepetition(6, rep);
449 }
450
451
452
453 /**
454 * Returns all repetitions of Provider’s Administration Instructions (RXO-7).
455 */
456 public CE[] getProviderSAdministrationInstructions() {
457 CE[] ret = null;
458 try {
459 Type[] t = this.getField(7);
460 ret = new CE[t.length];
461 for (int i = 0; i < ret.length; i++) {
462 ret[i] = (CE)t[i];
463 }
464 } catch (ClassCastException cce) {
465 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
466 throw new RuntimeException(cce);
467 } catch (HL7Exception he) {
468 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
469 throw new RuntimeException(he);
470 }
471 return ret;
472 }
473
474
475 /**
476 * Returns a count of the current number of repetitions of Provider’s Administration Instructions (RXO-7).
477 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
478 * it will return zero.
479 */
480 public int getProviderSAdministrationInstructionsReps() {
481 CE[] ret = null;
482 try {
483 Type[] t = this.getField(7);
484 return t.length;
485 } catch (ClassCastException cce) {
486 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
487 throw new RuntimeException(cce);
488 } catch (HL7Exception he) {
489 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
490 throw new RuntimeException(he);
491 }
492 }
493
494
495 /**
496 * Returns a specific repetition of
497 * RXO-7: "Provider’s Administration Instructions" - creates it if necessary
498 *
499 * @param rep The repetition index (0-indexed)
500 */
501 public CE getProviderSAdministrationInstructions(int rep) {
502 CE ret = null;
503 try {
504 Type t = this.getField(7, rep);
505 ret = (CE)t;
506 } catch (ClassCastException cce) {
507 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
508 throw new RuntimeException(cce);
509 } catch (HL7Exception he) {
510 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
511 throw new RuntimeException(he);
512 }
513 return ret;
514 }
515
516 /**
517 * Returns a specific repetition of
518 * RXO-7: "Provider’s Administration Instructions" - creates it if necessary
519 *
520 * @param rep The repetition index (0-indexed)
521 */
522 public CE getRxo7_ProviderSAdministrationInstructions(int rep) {
523 CE ret = null;
524 try {
525 Type t = this.getField(7, rep);
526 ret = (CE)t;
527 } catch (ClassCastException cce) {
528 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
529 throw new RuntimeException(cce);
530 } catch (HL7Exception he) {
531 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
532 throw new RuntimeException(he);
533 }
534 return ret;
535 }
536
537
538 /**
539 * Returns a count of the current number of repetitions of Provider’s Administration Instructions (RXO-7).
540 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
541 * it will return zero.
542 */
543 public int getRxo7_ProviderSAdministrationInstructionsReps() {
544 CE[] ret = null;
545 try {
546 Type[] t = this.getField(7);
547 return t.length;
548 } catch (ClassCastException cce) {
549 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
550 throw new RuntimeException(cce);
551 } catch (HL7Exception he) {
552 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
553 throw new RuntimeException(he);
554 }
555 }
556
557
558
559 /**
560 * Inserts a repetition of
561 * RXO-7: "Provider’s Administration Instructions" at a specific index
562 *
563 * @param rep The repetition index (0-indexed)
564 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
565 */
566 public CE insertProviderSAdministrationInstructions(int rep) throws HL7Exception {
567 return (CE) super.insertRepetition(7, rep);
568 }
569
570
571
572 /**
573 * Inserts a repetition of
574 * RXO-7: "Provider’s Administration Instructions" at a specific index
575 *
576 * @param rep The repetition index (0-indexed)
577 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
578 */
579 public CE insertRxo7_ProviderSAdministrationInstructions(int rep) throws HL7Exception {
580 return (CE) super.insertRepetition(7, rep);
581 }
582
583
584 /**
585 * Removes a repetition of
586 * RXO-7: "Provider’s Administration Instructions" at a specific index
587 *
588 * @param rep The repetition index (0-indexed)
589 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
590 */
591 public CE removeProviderSAdministrationInstructions(int rep) throws HL7Exception {
592 return (CE) super.removeRepetition(7, rep);
593 }
594
595
596 /**
597 * Removes a repetition of
598 * RXO-7: "Provider’s Administration Instructions" at a specific index
599 *
600 * @param rep The repetition index (0-indexed)
601 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
602 */
603 public CE removeRxo7_ProviderSAdministrationInstructions(int rep) throws HL7Exception {
604 return (CE) super.removeRepetition(7, rep);
605 }
606
607
608
609
610 /**
611 * Returns
612 * RXO-8: "Deliver-to Location" - creates it if necessary
613 */
614 public LA1 getDeliverToLocation() {
615 LA1 ret = null;
616 try {
617 Type t = this.getField(8, 0);
618 ret = (LA1)t;
619 } catch (ClassCastException cce) {
620 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
621 throw new RuntimeException(cce);
622 } catch (HL7Exception he) {
623 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
624 throw new RuntimeException(he);
625 }
626 return ret;
627 }
628
629
630 /**
631 * Returns
632 * RXO-8: "Deliver-to Location" - creates it if necessary
633 */
634 public LA1 getRxo8_DeliverToLocation() {
635 LA1 ret = null;
636 try {
637 Type t = this.getField(8, 0);
638 ret = (LA1)t;
639 } catch (ClassCastException cce) {
640 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
641 throw new RuntimeException(cce);
642 } catch (HL7Exception he) {
643 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
644 throw new RuntimeException(he);
645 }
646 return ret;
647 }
648
649
650
651 /**
652 * Returns
653 * RXO-9: "Allow Substitutions" - creates it if necessary
654 */
655 public ID getAllowSubstitutions() {
656 ID ret = null;
657 try {
658 Type t = this.getField(9, 0);
659 ret = (ID)t;
660 } catch (ClassCastException cce) {
661 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
662 throw new RuntimeException(cce);
663 } catch (HL7Exception he) {
664 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
665 throw new RuntimeException(he);
666 }
667 return ret;
668 }
669
670
671 /**
672 * Returns
673 * RXO-9: "Allow Substitutions" - creates it if necessary
674 */
675 public ID getRxo9_AllowSubstitutions() {
676 ID ret = null;
677 try {
678 Type t = this.getField(9, 0);
679 ret = (ID)t;
680 } catch (ClassCastException cce) {
681 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
682 throw new RuntimeException(cce);
683 } catch (HL7Exception he) {
684 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
685 throw new RuntimeException(he);
686 }
687 return ret;
688 }
689
690
691
692 /**
693 * Returns
694 * RXO-10: "Requested Dispense Code" - creates it if necessary
695 */
696 public CE getRequestedDispenseCode() {
697 CE ret = null;
698 try {
699 Type t = this.getField(10, 0);
700 ret = (CE)t;
701 } catch (ClassCastException cce) {
702 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
703 throw new RuntimeException(cce);
704 } catch (HL7Exception he) {
705 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
706 throw new RuntimeException(he);
707 }
708 return ret;
709 }
710
711
712 /**
713 * Returns
714 * RXO-10: "Requested Dispense Code" - creates it if necessary
715 */
716 public CE getRxo10_RequestedDispenseCode() {
717 CE ret = null;
718 try {
719 Type t = this.getField(10, 0);
720 ret = (CE)t;
721 } catch (ClassCastException cce) {
722 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
723 throw new RuntimeException(cce);
724 } catch (HL7Exception he) {
725 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
726 throw new RuntimeException(he);
727 }
728 return ret;
729 }
730
731
732
733 /**
734 * Returns
735 * RXO-11: "Requested Dispense Amount" - creates it if necessary
736 */
737 public NM getRequestedDispenseAmount() {
738 NM ret = null;
739 try {
740 Type t = this.getField(11, 0);
741 ret = (NM)t;
742 } catch (ClassCastException cce) {
743 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
744 throw new RuntimeException(cce);
745 } catch (HL7Exception he) {
746 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
747 throw new RuntimeException(he);
748 }
749 return ret;
750 }
751
752
753 /**
754 * Returns
755 * RXO-11: "Requested Dispense Amount" - creates it if necessary
756 */
757 public NM getRxo11_RequestedDispenseAmount() {
758 NM ret = null;
759 try {
760 Type t = this.getField(11, 0);
761 ret = (NM)t;
762 } catch (ClassCastException cce) {
763 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
764 throw new RuntimeException(cce);
765 } catch (HL7Exception he) {
766 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
767 throw new RuntimeException(he);
768 }
769 return ret;
770 }
771
772
773
774 /**
775 * Returns
776 * RXO-12: "Requested Dispense Units" - creates it if necessary
777 */
778 public CE getRequestedDispenseUnits() {
779 CE ret = null;
780 try {
781 Type t = this.getField(12, 0);
782 ret = (CE)t;
783 } catch (ClassCastException cce) {
784 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
785 throw new RuntimeException(cce);
786 } catch (HL7Exception he) {
787 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
788 throw new RuntimeException(he);
789 }
790 return ret;
791 }
792
793
794 /**
795 * Returns
796 * RXO-12: "Requested Dispense Units" - creates it if necessary
797 */
798 public CE getRxo12_RequestedDispenseUnits() {
799 CE ret = null;
800 try {
801 Type t = this.getField(12, 0);
802 ret = (CE)t;
803 } catch (ClassCastException cce) {
804 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
805 throw new RuntimeException(cce);
806 } catch (HL7Exception he) {
807 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
808 throw new RuntimeException(he);
809 }
810 return ret;
811 }
812
813
814
815 /**
816 * Returns
817 * RXO-13: "Number Of Refills" - creates it if necessary
818 */
819 public NM getNumberOfRefills() {
820 NM ret = null;
821 try {
822 Type t = this.getField(13, 0);
823 ret = (NM)t;
824 } catch (ClassCastException cce) {
825 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
826 throw new RuntimeException(cce);
827 } catch (HL7Exception he) {
828 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
829 throw new RuntimeException(he);
830 }
831 return ret;
832 }
833
834
835 /**
836 * Returns
837 * RXO-13: "Number Of Refills" - creates it if necessary
838 */
839 public NM getRxo13_NumberOfRefills() {
840 NM ret = null;
841 try {
842 Type t = this.getField(13, 0);
843 ret = (NM)t;
844 } catch (ClassCastException cce) {
845 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
846 throw new RuntimeException(cce);
847 } catch (HL7Exception he) {
848 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
849 throw new RuntimeException(he);
850 }
851 return ret;
852 }
853
854
855 /**
856 * Returns all repetitions of Ordering Provider’s DEA Number (RXO-14).
857 */
858 public XCN[] getOrderingProviderSDEANumber() {
859 XCN[] ret = null;
860 try {
861 Type[] t = this.getField(14);
862 ret = new XCN[t.length];
863 for (int i = 0; i < ret.length; i++) {
864 ret[i] = (XCN)t[i];
865 }
866 } catch (ClassCastException cce) {
867 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
868 throw new RuntimeException(cce);
869 } catch (HL7Exception he) {
870 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
871 throw new RuntimeException(he);
872 }
873 return ret;
874 }
875
876
877 /**
878 * Returns a count of the current number of repetitions of Ordering Provider’s DEA Number (RXO-14).
879 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
880 * it will return zero.
881 */
882 public int getOrderingProviderSDEANumberReps() {
883 XCN[] ret = null;
884 try {
885 Type[] t = this.getField(14);
886 return t.length;
887 } catch (ClassCastException cce) {
888 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
889 throw new RuntimeException(cce);
890 } catch (HL7Exception he) {
891 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
892 throw new RuntimeException(he);
893 }
894 }
895
896
897 /**
898 * Returns a specific repetition of
899 * RXO-14: "Ordering Provider’s DEA Number" - creates it if necessary
900 *
901 * @param rep The repetition index (0-indexed)
902 */
903 public XCN getOrderingProviderSDEANumber(int rep) {
904 XCN ret = null;
905 try {
906 Type t = this.getField(14, rep);
907 ret = (XCN)t;
908 } catch (ClassCastException cce) {
909 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
910 throw new RuntimeException(cce);
911 } catch (HL7Exception he) {
912 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
913 throw new RuntimeException(he);
914 }
915 return ret;
916 }
917
918 /**
919 * Returns a specific repetition of
920 * RXO-14: "Ordering Provider’s DEA Number" - creates it if necessary
921 *
922 * @param rep The repetition index (0-indexed)
923 */
924 public XCN getRxo14_OrderingProviderSDEANumber(int rep) {
925 XCN ret = null;
926 try {
927 Type t = this.getField(14, rep);
928 ret = (XCN)t;
929 } catch (ClassCastException cce) {
930 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
931 throw new RuntimeException(cce);
932 } catch (HL7Exception he) {
933 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
934 throw new RuntimeException(he);
935 }
936 return ret;
937 }
938
939
940 /**
941 * Returns a count of the current number of repetitions of Ordering Provider’s DEA Number (RXO-14).
942 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
943 * it will return zero.
944 */
945 public int getRxo14_OrderingProviderSDEANumberReps() {
946 XCN[] ret = null;
947 try {
948 Type[] t = this.getField(14);
949 return t.length;
950 } catch (ClassCastException cce) {
951 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
952 throw new RuntimeException(cce);
953 } catch (HL7Exception he) {
954 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
955 throw new RuntimeException(he);
956 }
957 }
958
959
960
961 /**
962 * Inserts a repetition of
963 * RXO-14: "Ordering Provider’s DEA Number" at a specific index
964 *
965 * @param rep The repetition index (0-indexed)
966 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
967 */
968 public XCN insertOrderingProviderSDEANumber(int rep) throws HL7Exception {
969 return (XCN) super.insertRepetition(14, rep);
970 }
971
972
973
974 /**
975 * Inserts a repetition of
976 * RXO-14: "Ordering Provider’s DEA Number" at a specific index
977 *
978 * @param rep The repetition index (0-indexed)
979 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
980 */
981 public XCN insertRxo14_OrderingProviderSDEANumber(int rep) throws HL7Exception {
982 return (XCN) super.insertRepetition(14, rep);
983 }
984
985
986 /**
987 * Removes a repetition of
988 * RXO-14: "Ordering Provider’s DEA Number" at a specific index
989 *
990 * @param rep The repetition index (0-indexed)
991 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
992 */
993 public XCN removeOrderingProviderSDEANumber(int rep) throws HL7Exception {
994 return (XCN) super.removeRepetition(14, rep);
995 }
996
997
998 /**
999 * Removes a repetition of
1000 * RXO-14: "Ordering Provider’s DEA Number" at a specific index
1001 *
1002 * @param rep The repetition index (0-indexed)
1003 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1004 */
1005 public XCN removeRxo14_OrderingProviderSDEANumber(int rep) throws HL7Exception {
1006 return (XCN) super.removeRepetition(14, rep);
1007 }
1008
1009
1010
1011 /**
1012 * Returns all repetitions of Pharmacist/Treatment Supplier’s Verifier ID (RXO-15).
1013 */
1014 public XCN[] getPharmacistTreatmentSupplierSVerifierID() {
1015 XCN[] ret = null;
1016 try {
1017 Type[] t = this.getField(15);
1018 ret = new XCN[t.length];
1019 for (int i = 0; i < ret.length; i++) {
1020 ret[i] = (XCN)t[i];
1021 }
1022 } catch (ClassCastException cce) {
1023 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1024 throw new RuntimeException(cce);
1025 } catch (HL7Exception he) {
1026 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1027 throw new RuntimeException(he);
1028 }
1029 return ret;
1030 }
1031
1032
1033 /**
1034 * Returns a count of the current number of repetitions of Pharmacist/Treatment Supplier’s Verifier ID (RXO-15).
1035 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1036 * it will return zero.
1037 */
1038 public int getPharmacistTreatmentSupplierSVerifierIDReps() {
1039 XCN[] ret = null;
1040 try {
1041 Type[] t = this.getField(15);
1042 return t.length;
1043 } catch (ClassCastException cce) {
1044 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1045 throw new RuntimeException(cce);
1046 } catch (HL7Exception he) {
1047 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1048 throw new RuntimeException(he);
1049 }
1050 }
1051
1052
1053 /**
1054 * Returns a specific repetition of
1055 * RXO-15: "Pharmacist/Treatment Supplier’s Verifier ID" - creates it if necessary
1056 *
1057 * @param rep The repetition index (0-indexed)
1058 */
1059 public XCN getPharmacistTreatmentSupplierSVerifierID(int rep) {
1060 XCN ret = null;
1061 try {
1062 Type t = this.getField(15, rep);
1063 ret = (XCN)t;
1064 } catch (ClassCastException cce) {
1065 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1066 throw new RuntimeException(cce);
1067 } catch (HL7Exception he) {
1068 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1069 throw new RuntimeException(he);
1070 }
1071 return ret;
1072 }
1073
1074 /**
1075 * Returns a specific repetition of
1076 * RXO-15: "Pharmacist/Treatment Supplier’s Verifier ID" - creates it if necessary
1077 *
1078 * @param rep The repetition index (0-indexed)
1079 */
1080 public XCN getRxo15_PharmacistTreatmentSupplierSVerifierID(int rep) {
1081 XCN ret = null;
1082 try {
1083 Type t = this.getField(15, rep);
1084 ret = (XCN)t;
1085 } catch (ClassCastException cce) {
1086 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1087 throw new RuntimeException(cce);
1088 } catch (HL7Exception he) {
1089 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1090 throw new RuntimeException(he);
1091 }
1092 return ret;
1093 }
1094
1095
1096 /**
1097 * Returns a count of the current number of repetitions of Pharmacist/Treatment Supplier’s Verifier ID (RXO-15).
1098 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1099 * it will return zero.
1100 */
1101 public int getRxo15_PharmacistTreatmentSupplierSVerifierIDReps() {
1102 XCN[] ret = null;
1103 try {
1104 Type[] t = this.getField(15);
1105 return t.length;
1106 } catch (ClassCastException cce) {
1107 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1108 throw new RuntimeException(cce);
1109 } catch (HL7Exception he) {
1110 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1111 throw new RuntimeException(he);
1112 }
1113 }
1114
1115
1116
1117 /**
1118 * Inserts a repetition of
1119 * RXO-15: "Pharmacist/Treatment Supplier’s Verifier ID" at a specific index
1120 *
1121 * @param rep The repetition index (0-indexed)
1122 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1123 */
1124 public XCN insertPharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception {
1125 return (XCN) super.insertRepetition(15, rep);
1126 }
1127
1128
1129
1130 /**
1131 * Inserts a repetition of
1132 * RXO-15: "Pharmacist/Treatment Supplier’s Verifier ID" at a specific index
1133 *
1134 * @param rep The repetition index (0-indexed)
1135 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1136 */
1137 public XCN insertRxo15_PharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception {
1138 return (XCN) super.insertRepetition(15, rep);
1139 }
1140
1141
1142 /**
1143 * Removes a repetition of
1144 * RXO-15: "Pharmacist/Treatment Supplier’s Verifier ID" at a specific index
1145 *
1146 * @param rep The repetition index (0-indexed)
1147 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1148 */
1149 public XCN removePharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception {
1150 return (XCN) super.removeRepetition(15, rep);
1151 }
1152
1153
1154 /**
1155 * Removes a repetition of
1156 * RXO-15: "Pharmacist/Treatment Supplier’s Verifier ID" at a specific index
1157 *
1158 * @param rep The repetition index (0-indexed)
1159 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1160 */
1161 public XCN removeRxo15_PharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception {
1162 return (XCN) super.removeRepetition(15, rep);
1163 }
1164
1165
1166
1167
1168 /**
1169 * Returns
1170 * RXO-16: "Needs Human Review" - creates it if necessary
1171 */
1172 public ID getNeedsHumanReview() {
1173 ID ret = null;
1174 try {
1175 Type t = this.getField(16, 0);
1176 ret = (ID)t;
1177 } catch (ClassCastException cce) {
1178 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1179 throw new RuntimeException(cce);
1180 } catch (HL7Exception he) {
1181 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1182 throw new RuntimeException(he);
1183 }
1184 return ret;
1185 }
1186
1187
1188 /**
1189 * Returns
1190 * RXO-16: "Needs Human Review" - creates it if necessary
1191 */
1192 public ID getRxo16_NeedsHumanReview() {
1193 ID ret = null;
1194 try {
1195 Type t = this.getField(16, 0);
1196 ret = (ID)t;
1197 } catch (ClassCastException cce) {
1198 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1199 throw new RuntimeException(cce);
1200 } catch (HL7Exception he) {
1201 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1202 throw new RuntimeException(he);
1203 }
1204 return ret;
1205 }
1206
1207
1208
1209 /**
1210 * Returns
1211 * RXO-17: "Requested Give Per (Time Unit)" - creates it if necessary
1212 */
1213 public ST getRequestedGivePerTimeUnit() {
1214 ST ret = null;
1215 try {
1216 Type t = this.getField(17, 0);
1217 ret = (ST)t;
1218 } catch (ClassCastException cce) {
1219 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1220 throw new RuntimeException(cce);
1221 } catch (HL7Exception he) {
1222 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1223 throw new RuntimeException(he);
1224 }
1225 return ret;
1226 }
1227
1228
1229 /**
1230 * Returns
1231 * RXO-17: "Requested Give Per (Time Unit)" - creates it if necessary
1232 */
1233 public ST getRxo17_RequestedGivePerTimeUnit() {
1234 ST ret = null;
1235 try {
1236 Type t = this.getField(17, 0);
1237 ret = (ST)t;
1238 } catch (ClassCastException cce) {
1239 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1240 throw new RuntimeException(cce);
1241 } catch (HL7Exception he) {
1242 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1243 throw new RuntimeException(he);
1244 }
1245 return ret;
1246 }
1247
1248
1249
1250 /**
1251 * Returns
1252 * RXO-18: "Requested Give Strength" - creates it if necessary
1253 */
1254 public NM getRequestedGiveStrength() {
1255 NM ret = null;
1256 try {
1257 Type t = this.getField(18, 0);
1258 ret = (NM)t;
1259 } catch (ClassCastException cce) {
1260 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1261 throw new RuntimeException(cce);
1262 } catch (HL7Exception he) {
1263 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1264 throw new RuntimeException(he);
1265 }
1266 return ret;
1267 }
1268
1269
1270 /**
1271 * Returns
1272 * RXO-18: "Requested Give Strength" - creates it if necessary
1273 */
1274 public NM getRxo18_RequestedGiveStrength() {
1275 NM ret = null;
1276 try {
1277 Type t = this.getField(18, 0);
1278 ret = (NM)t;
1279 } catch (ClassCastException cce) {
1280 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1281 throw new RuntimeException(cce);
1282 } catch (HL7Exception he) {
1283 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1284 throw new RuntimeException(he);
1285 }
1286 return ret;
1287 }
1288
1289
1290
1291 /**
1292 * Returns
1293 * RXO-19: "Requested Give Strength Units" - creates it if necessary
1294 */
1295 public CE getRequestedGiveStrengthUnits() {
1296 CE ret = null;
1297 try {
1298 Type t = this.getField(19, 0);
1299 ret = (CE)t;
1300 } catch (ClassCastException cce) {
1301 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1302 throw new RuntimeException(cce);
1303 } catch (HL7Exception he) {
1304 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1305 throw new RuntimeException(he);
1306 }
1307 return ret;
1308 }
1309
1310
1311 /**
1312 * Returns
1313 * RXO-19: "Requested Give Strength Units" - creates it if necessary
1314 */
1315 public CE getRxo19_RequestedGiveStrengthUnits() {
1316 CE ret = null;
1317 try {
1318 Type t = this.getField(19, 0);
1319 ret = (CE)t;
1320 } catch (ClassCastException cce) {
1321 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1322 throw new RuntimeException(cce);
1323 } catch (HL7Exception he) {
1324 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1325 throw new RuntimeException(he);
1326 }
1327 return ret;
1328 }
1329
1330
1331 /**
1332 * Returns all repetitions of Indication (RXO-20).
1333 */
1334 public CE[] getIndication() {
1335 CE[] ret = null;
1336 try {
1337 Type[] t = this.getField(20);
1338 ret = new CE[t.length];
1339 for (int i = 0; i < ret.length; i++) {
1340 ret[i] = (CE)t[i];
1341 }
1342 } catch (ClassCastException cce) {
1343 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1344 throw new RuntimeException(cce);
1345 } catch (HL7Exception he) {
1346 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1347 throw new RuntimeException(he);
1348 }
1349 return ret;
1350 }
1351
1352
1353 /**
1354 * Returns a count of the current number of repetitions of Indication (RXO-20).
1355 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1356 * it will return zero.
1357 */
1358 public int getIndicationReps() {
1359 CE[] ret = null;
1360 try {
1361 Type[] t = this.getField(20);
1362 return t.length;
1363 } catch (ClassCastException cce) {
1364 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1365 throw new RuntimeException(cce);
1366 } catch (HL7Exception he) {
1367 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1368 throw new RuntimeException(he);
1369 }
1370 }
1371
1372
1373 /**
1374 * Returns a specific repetition of
1375 * RXO-20: "Indication" - creates it if necessary
1376 *
1377 * @param rep The repetition index (0-indexed)
1378 */
1379 public CE getIndication(int rep) {
1380 CE ret = null;
1381 try {
1382 Type t = this.getField(20, rep);
1383 ret = (CE)t;
1384 } catch (ClassCastException cce) {
1385 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1386 throw new RuntimeException(cce);
1387 } catch (HL7Exception he) {
1388 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1389 throw new RuntimeException(he);
1390 }
1391 return ret;
1392 }
1393
1394 /**
1395 * Returns a specific repetition of
1396 * RXO-20: "Indication" - creates it if necessary
1397 *
1398 * @param rep The repetition index (0-indexed)
1399 */
1400 public CE getRxo20_Indication(int rep) {
1401 CE ret = null;
1402 try {
1403 Type t = this.getField(20, rep);
1404 ret = (CE)t;
1405 } catch (ClassCastException cce) {
1406 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1407 throw new RuntimeException(cce);
1408 } catch (HL7Exception he) {
1409 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1410 throw new RuntimeException(he);
1411 }
1412 return ret;
1413 }
1414
1415
1416 /**
1417 * Returns a count of the current number of repetitions of Indication (RXO-20).
1418 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1419 * it will return zero.
1420 */
1421 public int getRxo20_IndicationReps() {
1422 CE[] ret = null;
1423 try {
1424 Type[] t = this.getField(20);
1425 return t.length;
1426 } catch (ClassCastException cce) {
1427 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1428 throw new RuntimeException(cce);
1429 } catch (HL7Exception he) {
1430 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1431 throw new RuntimeException(he);
1432 }
1433 }
1434
1435
1436
1437 /**
1438 * Inserts a repetition of
1439 * RXO-20: "Indication" at a specific index
1440 *
1441 * @param rep The repetition index (0-indexed)
1442 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1443 */
1444 public CE insertIndication(int rep) throws HL7Exception {
1445 return (CE) super.insertRepetition(20, rep);
1446 }
1447
1448
1449
1450 /**
1451 * Inserts a repetition of
1452 * RXO-20: "Indication" at a specific index
1453 *
1454 * @param rep The repetition index (0-indexed)
1455 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1456 */
1457 public CE insertRxo20_Indication(int rep) throws HL7Exception {
1458 return (CE) super.insertRepetition(20, rep);
1459 }
1460
1461
1462 /**
1463 * Removes a repetition of
1464 * RXO-20: "Indication" at a specific index
1465 *
1466 * @param rep The repetition index (0-indexed)
1467 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1468 */
1469 public CE removeIndication(int rep) throws HL7Exception {
1470 return (CE) super.removeRepetition(20, rep);
1471 }
1472
1473
1474 /**
1475 * Removes a repetition of
1476 * RXO-20: "Indication" at a specific index
1477 *
1478 * @param rep The repetition index (0-indexed)
1479 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1480 */
1481 public CE removeRxo20_Indication(int rep) throws HL7Exception {
1482 return (CE) super.removeRepetition(20, rep);
1483 }
1484
1485
1486
1487
1488 /**
1489 * Returns
1490 * RXO-21: "Requested Give Rate Amount" - creates it if necessary
1491 */
1492 public ST getRequestedGiveRateAmount() {
1493 ST ret = null;
1494 try {
1495 Type t = this.getField(21, 0);
1496 ret = (ST)t;
1497 } catch (ClassCastException cce) {
1498 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1499 throw new RuntimeException(cce);
1500 } catch (HL7Exception he) {
1501 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1502 throw new RuntimeException(he);
1503 }
1504 return ret;
1505 }
1506
1507
1508 /**
1509 * Returns
1510 * RXO-21: "Requested Give Rate Amount" - creates it if necessary
1511 */
1512 public ST getRxo21_RequestedGiveRateAmount() {
1513 ST ret = null;
1514 try {
1515 Type t = this.getField(21, 0);
1516 ret = (ST)t;
1517 } catch (ClassCastException cce) {
1518 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1519 throw new RuntimeException(cce);
1520 } catch (HL7Exception he) {
1521 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1522 throw new RuntimeException(he);
1523 }
1524 return ret;
1525 }
1526
1527
1528
1529 /**
1530 * Returns
1531 * RXO-22: "Requested Give Rate Units" - creates it if necessary
1532 */
1533 public CE getRequestedGiveRateUnits() {
1534 CE ret = null;
1535 try {
1536 Type t = this.getField(22, 0);
1537 ret = (CE)t;
1538 } catch (ClassCastException cce) {
1539 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1540 throw new RuntimeException(cce);
1541 } catch (HL7Exception he) {
1542 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1543 throw new RuntimeException(he);
1544 }
1545 return ret;
1546 }
1547
1548
1549 /**
1550 * Returns
1551 * RXO-22: "Requested Give Rate Units" - creates it if necessary
1552 */
1553 public CE getRxo22_RequestedGiveRateUnits() {
1554 CE ret = null;
1555 try {
1556 Type t = this.getField(22, 0);
1557 ret = (CE)t;
1558 } catch (ClassCastException cce) {
1559 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1560 throw new RuntimeException(cce);
1561 } catch (HL7Exception he) {
1562 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1563 throw new RuntimeException(he);
1564 }
1565 return ret;
1566 }
1567
1568
1569
1570 /**
1571 * Returns
1572 * RXO-23: "Total Daily Dose" - creates it if necessary
1573 */
1574 public CQ getTotalDailyDose() {
1575 CQ ret = null;
1576 try {
1577 Type t = this.getField(23, 0);
1578 ret = (CQ)t;
1579 } catch (ClassCastException cce) {
1580 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1581 throw new RuntimeException(cce);
1582 } catch (HL7Exception he) {
1583 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1584 throw new RuntimeException(he);
1585 }
1586 return ret;
1587 }
1588
1589
1590 /**
1591 * Returns
1592 * RXO-23: "Total Daily Dose" - creates it if necessary
1593 */
1594 public CQ getRxo23_TotalDailyDose() {
1595 CQ ret = null;
1596 try {
1597 Type t = this.getField(23, 0);
1598 ret = (CQ)t;
1599 } catch (ClassCastException cce) {
1600 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1601 throw new RuntimeException(cce);
1602 } catch (HL7Exception he) {
1603 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1604 throw new RuntimeException(he);
1605 }
1606 return ret;
1607 }
1608
1609
1610
1611
1612
1613 /** {@inheritDoc} */
1614 protected Type createNewTypeWithoutReflection(int field) {
1615 switch (field) {
1616 case 0: return new CE(getMessage());
1617 case 1: return new NM(getMessage());
1618 case 2: return new NM(getMessage());
1619 case 3: return new CE(getMessage());
1620 case 4: return new CE(getMessage());
1621 case 5: return new CE(getMessage());
1622 case 6: return new CE(getMessage());
1623 case 7: return new LA1(getMessage());
1624 case 8: return new ID(getMessage(), new Integer( 161 ));
1625 case 9: return new CE(getMessage());
1626 case 10: return new NM(getMessage());
1627 case 11: return new CE(getMessage());
1628 case 12: return new NM(getMessage());
1629 case 13: return new XCN(getMessage());
1630 case 14: return new XCN(getMessage());
1631 case 15: return new ID(getMessage(), new Integer( 136 ));
1632 case 16: return new ST(getMessage());
1633 case 17: return new NM(getMessage());
1634 case 18: return new CE(getMessage());
1635 case 19: return new CE(getMessage());
1636 case 20: return new ST(getMessage());
1637 case 21: return new CE(getMessage());
1638 case 22: return new CQ(getMessage());
1639 default: return null;
1640 }
1641 }
1642
1643
1644 }
1645