1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package ca.uhn.hl7v2.model.v22.segment;
35
36
37 import ca.uhn.hl7v2.model.v22.datatype.*;
38 import ca.uhn.hl7v2.HL7Exception;
39 import ca.uhn.hl7v2.parser.ModelClassFactory;
40 import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
41 import ca.uhn.hl7v2.model.AbstractMessage;
42 import ca.uhn.hl7v2.model.Group;
43 import ca.uhn.hl7v2.model.Type;
44 import ca.uhn.hl7v2.model.AbstractSegment;
45 import ca.uhn.hl7v2.model.Varies;
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78 @SuppressWarnings("unused")
79 public class RXE extends AbstractSegment {
80
81
82
83
84 public RXE(Group parent, ModelClassFactory factory) {
85 super(parent, factory);
86 init(factory);
87 }
88
89 private void init(ModelClassFactory factory) {
90 try {
91 this.add(TQ.class, false, 0, 200, new Object[]{ getMessage() }, "Quantity / timing");
92 this.add(CE.class, true, 1, 100, new Object[]{ getMessage() }, "Give Code");
93 this.add(NM.class, true, 1, 20, new Object[]{ getMessage() }, "Give Amount - Minimum");
94 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Give Amount - Maximum");
95 this.add(CE.class, true, 1, 60, new Object[]{ getMessage() }, "Give Units");
96 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Give Dosage Form");
97 this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Provider's Administration Instructions");
98 this.add(CM_LA1.class, false, 1, 12, new Object[]{ getMessage() }, "Deliver-to location");
99 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(167) }, "Substitution Status");
100 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Dispense Amount");
101 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Dispense Units");
102 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Number of Refills");
103 this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Ordering Provider's DEA Number");
104 this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Pharmacist Verifier ID");
105 this.add(ST.class, true, 1, 20, new Object[]{ getMessage() }, "Prescription Number");
106 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Number of Refills Remaining");
107 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Number of refills / doses dispensed");
108 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date / time of most recent refill or dose dispensed");
109 this.add(CQ_QUANTITY.class, false, 1, 10, new Object[]{ getMessage() }, "Total Daily Dose");
110 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "Needs Human Review");
111 this.add(CE.class, false, 1, 200, new Object[]{ getMessage() }, "Pharmacy Special Dispensing Instructions");
112 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Give Per (Time Unit)");
113 this.add(CE.class, false, 1, 6, new Object[]{ getMessage() }, "Give Rate Amount");
114 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Give Rate Units");
115 } catch(HL7Exception e) {
116 log.error("Unexpected error creating RXE - this is probably a bug in the source code generator.", e);
117 }
118 }
119
120
121
122
123
124 public TQ[] getQuantityTiming() {
125 TQ[] retVal = this.getTypedField(1, new TQ[0]);
126 return retVal;
127 }
128
129
130
131
132
133 public TQ[] getRxe1_QuantityTiming() {
134 TQ[] retVal = this.getTypedField(1, new TQ[0]);
135 return retVal;
136 }
137
138
139
140
141
142
143
144 public int getQuantityTimingReps() {
145 return this.getReps(1);
146 }
147
148
149
150
151
152
153
154
155 public TQ getQuantityTiming(int rep) {
156 TQ retVal = this.getTypedField(1, rep);
157 return retVal;
158 }
159
160
161
162
163
164
165
166 public TQ getRxe1_QuantityTiming(int rep) {
167 TQ retVal = this.getTypedField(1, rep);
168 return retVal;
169 }
170
171
172
173
174
175
176 public int getRxe1_QuantityTimingReps() {
177 return this.getReps(1);
178 }
179
180
181
182
183
184
185
186
187
188 public TQ insertQuantityTiming(int rep) throws HL7Exception {
189 return (TQ) super.insertRepetition(1, rep);
190 }
191
192
193
194
195
196
197
198
199
200 public TQ insertRxe1_QuantityTiming(int rep) throws HL7Exception {
201 return (TQ) super.insertRepetition(1, rep);
202 }
203
204
205
206
207
208
209
210
211
212 public TQ removeQuantityTiming(int rep) throws HL7Exception {
213 return (TQ) super.removeRepetition(1, rep);
214 }
215
216
217
218
219
220
221
222
223
224 public TQ removeRxe1_QuantityTiming(int rep) throws HL7Exception {
225 return (TQ) super.removeRepetition(1, rep);
226 }
227
228
229
230
231
232
233
234
235 public CE getGiveCode() {
236 CE retVal = this.getTypedField(2, 0);
237 return retVal;
238 }
239
240
241
242
243
244 public CE getRxe2_GiveCode() {
245 CE retVal = this.getTypedField(2, 0);
246 return retVal;
247 }
248
249
250
251
252
253
254
255 public NM getGiveAmountMinimum() {
256 NM retVal = this.getTypedField(3, 0);
257 return retVal;
258 }
259
260
261
262
263
264 public NM getRxe3_GiveAmountMinimum() {
265 NM retVal = this.getTypedField(3, 0);
266 return retVal;
267 }
268
269
270
271
272
273
274
275 public NM getGiveAmountMaximum() {
276 NM retVal = this.getTypedField(4, 0);
277 return retVal;
278 }
279
280
281
282
283
284 public NM getRxe4_GiveAmountMaximum() {
285 NM retVal = this.getTypedField(4, 0);
286 return retVal;
287 }
288
289
290
291
292
293
294
295 public CE getGiveUnits() {
296 CE retVal = this.getTypedField(5, 0);
297 return retVal;
298 }
299
300
301
302
303
304 public CE getRxe5_GiveUnits() {
305 CE retVal = this.getTypedField(5, 0);
306 return retVal;
307 }
308
309
310
311
312
313
314
315 public CE getGiveDosageForm() {
316 CE retVal = this.getTypedField(6, 0);
317 return retVal;
318 }
319
320
321
322
323
324 public CE getRxe6_GiveDosageForm() {
325 CE retVal = this.getTypedField(6, 0);
326 return retVal;
327 }
328
329
330
331
332
333 public CE[] getProviderSAdministrationInstructions() {
334 CE[] retVal = this.getTypedField(7, new CE[0]);
335 return retVal;
336 }
337
338
339
340
341
342 public CE[] getRxe7_ProviderSAdministrationInstructions() {
343 CE[] retVal = this.getTypedField(7, new CE[0]);
344 return retVal;
345 }
346
347
348
349
350
351
352
353 public int getProviderSAdministrationInstructionsReps() {
354 return this.getReps(7);
355 }
356
357
358
359
360
361
362
363
364 public CE getProviderSAdministrationInstructions(int rep) {
365 CE retVal = this.getTypedField(7, rep);
366 return retVal;
367 }
368
369
370
371
372
373
374
375 public CE getRxe7_ProviderSAdministrationInstructions(int rep) {
376 CE retVal = this.getTypedField(7, rep);
377 return retVal;
378 }
379
380
381
382
383
384
385 public int getRxe7_ProviderSAdministrationInstructionsReps() {
386 return this.getReps(7);
387 }
388
389
390
391
392
393
394
395
396
397 public CE insertProviderSAdministrationInstructions(int rep) throws HL7Exception {
398 return (CE) super.insertRepetition(7, rep);
399 }
400
401
402
403
404
405
406
407
408
409 public CE insertRxe7_ProviderSAdministrationInstructions(int rep) throws HL7Exception {
410 return (CE) super.insertRepetition(7, rep);
411 }
412
413
414
415
416
417
418
419
420
421 public CE removeProviderSAdministrationInstructions(int rep) throws HL7Exception {
422 return (CE) super.removeRepetition(7, rep);
423 }
424
425
426
427
428
429
430
431
432
433 public CE removeRxe7_ProviderSAdministrationInstructions(int rep) throws HL7Exception {
434 return (CE) super.removeRepetition(7, rep);
435 }
436
437
438
439
440
441
442
443
444 public CM_LA1 getDeliverToLocation() {
445 CM_LA1 retVal = this.getTypedField(8, 0);
446 return retVal;
447 }
448
449
450
451
452
453 public CM_LA1 getRxe8_DeliverToLocation() {
454 CM_LA1 retVal = this.getTypedField(8, 0);
455 return retVal;
456 }
457
458
459
460
461
462
463
464 public ID getSubstitutionStatus() {
465 ID retVal = this.getTypedField(9, 0);
466 return retVal;
467 }
468
469
470
471
472
473 public ID getRxe9_SubstitutionStatus() {
474 ID retVal = this.getTypedField(9, 0);
475 return retVal;
476 }
477
478
479
480
481
482
483
484 public NM getDispenseAmount() {
485 NM retVal = this.getTypedField(10, 0);
486 return retVal;
487 }
488
489
490
491
492
493 public NM getRxe10_DispenseAmount() {
494 NM retVal = this.getTypedField(10, 0);
495 return retVal;
496 }
497
498
499
500
501
502
503
504 public CE getDispenseUnits() {
505 CE retVal = this.getTypedField(11, 0);
506 return retVal;
507 }
508
509
510
511
512
513 public CE getRxe11_DispenseUnits() {
514 CE retVal = this.getTypedField(11, 0);
515 return retVal;
516 }
517
518
519
520
521
522
523
524 public NM getNumberOfRefills() {
525 NM retVal = this.getTypedField(12, 0);
526 return retVal;
527 }
528
529
530
531
532
533 public NM getRxe12_NumberOfRefills() {
534 NM retVal = this.getTypedField(12, 0);
535 return retVal;
536 }
537
538
539
540
541
542
543
544 public CN getOrderingProviderSDEANumber() {
545 CN retVal = this.getTypedField(13, 0);
546 return retVal;
547 }
548
549
550
551
552
553 public CN getRxe13_OrderingProviderSDEANumber() {
554 CN retVal = this.getTypedField(13, 0);
555 return retVal;
556 }
557
558
559
560
561
562
563
564 public CN getPharmacistVerifierID() {
565 CN retVal = this.getTypedField(14, 0);
566 return retVal;
567 }
568
569
570
571
572
573 public CN getRxe14_PharmacistVerifierID() {
574 CN retVal = this.getTypedField(14, 0);
575 return retVal;
576 }
577
578
579
580
581
582
583
584 public ST getPrescriptionNumber() {
585 ST retVal = this.getTypedField(15, 0);
586 return retVal;
587 }
588
589
590
591
592
593 public ST getRxe15_PrescriptionNumber() {
594 ST retVal = this.getTypedField(15, 0);
595 return retVal;
596 }
597
598
599
600
601
602
603
604 public NM getNumberOfRefillsRemaining() {
605 NM retVal = this.getTypedField(16, 0);
606 return retVal;
607 }
608
609
610
611
612
613 public NM getRxe16_NumberOfRefillsRemaining() {
614 NM retVal = this.getTypedField(16, 0);
615 return retVal;
616 }
617
618
619
620
621
622
623
624 public NM getNumberOfRefillsDosesDispensed() {
625 NM retVal = this.getTypedField(17, 0);
626 return retVal;
627 }
628
629
630
631
632
633 public NM getRxe17_NumberOfRefillsDosesDispensed() {
634 NM retVal = this.getTypedField(17, 0);
635 return retVal;
636 }
637
638
639
640
641
642
643
644 public TS getDateTimeOfMostRecentRefillOrDoseDispensed() {
645 TS retVal = this.getTypedField(18, 0);
646 return retVal;
647 }
648
649
650
651
652
653 public TS getRxe18_DateTimeOfMostRecentRefillOrDoseDispensed() {
654 TS retVal = this.getTypedField(18, 0);
655 return retVal;
656 }
657
658
659
660
661
662
663
664 public CQ_QUANTITY getTotalDailyDose() {
665 CQ_QUANTITY retVal = this.getTypedField(19, 0);
666 return retVal;
667 }
668
669
670
671
672
673 public CQ_QUANTITY getRxe19_TotalDailyDose() {
674 CQ_QUANTITY retVal = this.getTypedField(19, 0);
675 return retVal;
676 }
677
678
679
680
681
682
683
684 public ID getNeedsHumanReview() {
685 ID retVal = this.getTypedField(20, 0);
686 return retVal;
687 }
688
689
690
691
692
693 public ID getRxe20_NeedsHumanReview() {
694 ID retVal = this.getTypedField(20, 0);
695 return retVal;
696 }
697
698
699
700
701
702
703
704 public CE getPharmacySpecialDispensingInstructions() {
705 CE retVal = this.getTypedField(21, 0);
706 return retVal;
707 }
708
709
710
711
712
713 public CE getRxe21_PharmacySpecialDispensingInstructions() {
714 CE retVal = this.getTypedField(21, 0);
715 return retVal;
716 }
717
718
719
720
721
722
723
724 public ST getGivePerTimeUnit() {
725 ST retVal = this.getTypedField(22, 0);
726 return retVal;
727 }
728
729
730
731
732
733 public ST getRxe22_GivePerTimeUnit() {
734 ST retVal = this.getTypedField(22, 0);
735 return retVal;
736 }
737
738
739
740
741
742
743
744 public CE getGiveRateAmount() {
745 CE retVal = this.getTypedField(23, 0);
746 return retVal;
747 }
748
749
750
751
752
753 public CE getRxe23_GiveRateAmount() {
754 CE retVal = this.getTypedField(23, 0);
755 return retVal;
756 }
757
758
759
760
761
762
763
764 public CE getGiveRateUnits() {
765 CE retVal = this.getTypedField(24, 0);
766 return retVal;
767 }
768
769
770
771
772
773 public CE getRxe24_GiveRateUnits() {
774 CE retVal = this.getTypedField(24, 0);
775 return retVal;
776 }
777
778
779
780
781
782
783 protected Type createNewTypeWithoutReflection(int field) {
784 switch (field) {
785 case 0: return new TQ(getMessage());
786 case 1: return new CE(getMessage());
787 case 2: return new NM(getMessage());
788 case 3: return new NM(getMessage());
789 case 4: return new CE(getMessage());
790 case 5: return new CE(getMessage());
791 case 6: return new CE(getMessage());
792 case 7: return new CM_LA1(getMessage());
793 case 8: return new ID(getMessage(), new Integer( 167 ));
794 case 9: return new NM(getMessage());
795 case 10: return new CE(getMessage());
796 case 11: return new NM(getMessage());
797 case 12: return new CN(getMessage());
798 case 13: return new CN(getMessage());
799 case 14: return new ST(getMessage());
800 case 15: return new NM(getMessage());
801 case 16: return new NM(getMessage());
802 case 17: return new TS(getMessage());
803 case 18: return new CQ_QUANTITY(getMessage());
804 case 19: return new ID(getMessage(), new Integer( 0 ));
805 case 20: return new CE(getMessage());
806 case 21: return new ST(getMessage());
807 case 22: return new CE(getMessage());
808 case 23: return new CE(getMessage());
809 default: return null;
810 }
811 }
812
813
814 }
815