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.v23.segment;
35
36
37 import ca.uhn.hl7v2.model.v23.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 @SuppressWarnings("unused")
77 public class RXG extends AbstractSegment {
78
79
80
81
82 public RXG(Group parent, ModelClassFactory factory) {
83 super(parent, factory);
84 init(factory);
85 }
86
87 private void init(ModelClassFactory factory) {
88 try {
89 this.add(ID.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Give Sub-ID Counter");
90 this.add(NM.class, true, 1, 4, new Object[]{ getMessage() }, "Dispense Sub-ID Counter");
91 this.add(TQ.class, true, 1, 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() }, "Administration Notes");
98 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(167) }, "Substitution Status");
99 this.add(CM_LA1.class, false, 1, 200, new Object[]{ getMessage() }, "Dispense-To Location");
100 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Needs Human Review");
101 this.add(CE.class, false, 1, 200, new Object[]{ getMessage() }, "Pharmacy Special Administration Instructions");
102 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Give Per (Time Unit)");
103 this.add(ST.class, false, 1, 6, new Object[]{ getMessage() }, "Give Rate Amount");
104 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Give Rate Units");
105 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Give Strength");
106 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Give Strength Units");
107 this.add(ST.class, false, 0, 20, new Object[]{ getMessage() }, "Substance Lot Number");
108 this.add(TS.class, false, 0, 26, new Object[]{ getMessage() }, "Substance Expiration Date");
109 this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Substance Manufacturer Name");
110 this.add(CE.class, false, 1, 200, new Object[]{ getMessage() }, "Indication");
111 } catch(HL7Exception e) {
112 log.error("Unexpected error creating RXG - this is probably a bug in the source code generator.", e);
113 }
114 }
115
116
117
118
119
120
121
122 public ID getGiveSubIDCounter() {
123 ID retVal = this.getTypedField(1, 0);
124 return retVal;
125 }
126
127
128
129
130
131 public ID getRxg1_GiveSubIDCounter() {
132 ID retVal = this.getTypedField(1, 0);
133 return retVal;
134 }
135
136
137
138
139
140
141
142 public NM getDispenseSubIDCounter() {
143 NM retVal = this.getTypedField(2, 0);
144 return retVal;
145 }
146
147
148
149
150
151 public NM getRxg2_DispenseSubIDCounter() {
152 NM retVal = this.getTypedField(2, 0);
153 return retVal;
154 }
155
156
157
158
159
160
161
162 public TQ getQuantityTiming() {
163 TQ retVal = this.getTypedField(3, 0);
164 return retVal;
165 }
166
167
168
169
170
171 public TQ getRxg3_QuantityTiming() {
172 TQ retVal = this.getTypedField(3, 0);
173 return retVal;
174 }
175
176
177
178
179
180
181
182 public CE getGiveCode() {
183 CE retVal = this.getTypedField(4, 0);
184 return retVal;
185 }
186
187
188
189
190
191 public CE getRxg4_GiveCode() {
192 CE retVal = this.getTypedField(4, 0);
193 return retVal;
194 }
195
196
197
198
199
200
201
202 public NM getGiveAmountMinimum() {
203 NM retVal = this.getTypedField(5, 0);
204 return retVal;
205 }
206
207
208
209
210
211 public NM getRxg5_GiveAmountMinimum() {
212 NM retVal = this.getTypedField(5, 0);
213 return retVal;
214 }
215
216
217
218
219
220
221
222 public NM getGiveAmountMaximum() {
223 NM retVal = this.getTypedField(6, 0);
224 return retVal;
225 }
226
227
228
229
230
231 public NM getRxg6_GiveAmountMaximum() {
232 NM retVal = this.getTypedField(6, 0);
233 return retVal;
234 }
235
236
237
238
239
240
241
242 public CE getGiveUnits() {
243 CE retVal = this.getTypedField(7, 0);
244 return retVal;
245 }
246
247
248
249
250
251 public CE getRxg7_GiveUnits() {
252 CE retVal = this.getTypedField(7, 0);
253 return retVal;
254 }
255
256
257
258
259
260
261
262 public CE getGiveDosageForm() {
263 CE retVal = this.getTypedField(8, 0);
264 return retVal;
265 }
266
267
268
269
270
271 public CE getRxg8_GiveDosageForm() {
272 CE retVal = this.getTypedField(8, 0);
273 return retVal;
274 }
275
276
277
278
279
280 public CE[] getAdministrationNotes() {
281 CE[] retVal = this.getTypedField(9, new CE[0]);
282 return retVal;
283 }
284
285
286
287
288
289 public CE[] getRxg9_AdministrationNotes() {
290 CE[] retVal = this.getTypedField(9, new CE[0]);
291 return retVal;
292 }
293
294
295
296
297
298
299
300 public int getAdministrationNotesReps() {
301 return this.getReps(9);
302 }
303
304
305
306
307
308
309
310
311 public CE getAdministrationNotes(int rep) {
312 CE retVal = this.getTypedField(9, rep);
313 return retVal;
314 }
315
316
317
318
319
320
321
322 public CE getRxg9_AdministrationNotes(int rep) {
323 CE retVal = this.getTypedField(9, rep);
324 return retVal;
325 }
326
327
328
329
330
331
332 public int getRxg9_AdministrationNotesReps() {
333 return this.getReps(9);
334 }
335
336
337
338
339
340
341
342
343
344 public CE insertAdministrationNotes(int rep) throws HL7Exception {
345 return (CE) super.insertRepetition(9, rep);
346 }
347
348
349
350
351
352
353
354
355
356 public CE insertRxg9_AdministrationNotes(int rep) throws HL7Exception {
357 return (CE) super.insertRepetition(9, rep);
358 }
359
360
361
362
363
364
365
366
367
368 public CE removeAdministrationNotes(int rep) throws HL7Exception {
369 return (CE) super.removeRepetition(9, rep);
370 }
371
372
373
374
375
376
377
378
379
380 public CE removeRxg9_AdministrationNotes(int rep) throws HL7Exception {
381 return (CE) super.removeRepetition(9, rep);
382 }
383
384
385
386
387
388
389
390
391 public ID getSubstitutionStatus() {
392 ID retVal = this.getTypedField(10, 0);
393 return retVal;
394 }
395
396
397
398
399
400 public ID getRxg10_SubstitutionStatus() {
401 ID retVal = this.getTypedField(10, 0);
402 return retVal;
403 }
404
405
406
407
408
409
410
411 public CM_LA1 getDispenseToLocation() {
412 CM_LA1 retVal = this.getTypedField(11, 0);
413 return retVal;
414 }
415
416
417
418
419
420 public CM_LA1 getRxg11_DispenseToLocation() {
421 CM_LA1 retVal = this.getTypedField(11, 0);
422 return retVal;
423 }
424
425
426
427
428
429
430
431 public ID getNeedsHumanReview() {
432 ID retVal = this.getTypedField(12, 0);
433 return retVal;
434 }
435
436
437
438
439
440 public ID getRxg12_NeedsHumanReview() {
441 ID retVal = this.getTypedField(12, 0);
442 return retVal;
443 }
444
445
446
447
448
449
450
451 public CE getPharmacySpecialAdministrationInstructions() {
452 CE retVal = this.getTypedField(13, 0);
453 return retVal;
454 }
455
456
457
458
459
460 public CE getRxg13_PharmacySpecialAdministrationInstructions() {
461 CE retVal = this.getTypedField(13, 0);
462 return retVal;
463 }
464
465
466
467
468
469
470
471 public ST getGivePerTimeUnit() {
472 ST retVal = this.getTypedField(14, 0);
473 return retVal;
474 }
475
476
477
478
479
480 public ST getRxg14_GivePerTimeUnit() {
481 ST retVal = this.getTypedField(14, 0);
482 return retVal;
483 }
484
485
486
487
488
489
490
491 public ST getGiveRateAmount() {
492 ST retVal = this.getTypedField(15, 0);
493 return retVal;
494 }
495
496
497
498
499
500 public ST getRxg15_GiveRateAmount() {
501 ST retVal = this.getTypedField(15, 0);
502 return retVal;
503 }
504
505
506
507
508
509
510
511 public CE getGiveRateUnits() {
512 CE retVal = this.getTypedField(16, 0);
513 return retVal;
514 }
515
516
517
518
519
520 public CE getRxg16_GiveRateUnits() {
521 CE retVal = this.getTypedField(16, 0);
522 return retVal;
523 }
524
525
526
527
528
529
530
531 public NM getGiveStrength() {
532 NM retVal = this.getTypedField(17, 0);
533 return retVal;
534 }
535
536
537
538
539
540 public NM getRxg17_GiveStrength() {
541 NM retVal = this.getTypedField(17, 0);
542 return retVal;
543 }
544
545
546
547
548
549
550
551 public CE getGiveStrengthUnits() {
552 CE retVal = this.getTypedField(18, 0);
553 return retVal;
554 }
555
556
557
558
559
560 public CE getRxg18_GiveStrengthUnits() {
561 CE retVal = this.getTypedField(18, 0);
562 return retVal;
563 }
564
565
566
567
568
569 public ST[] getSubstanceLotNumber() {
570 ST[] retVal = this.getTypedField(19, new ST[0]);
571 return retVal;
572 }
573
574
575
576
577
578 public ST[] getRxg19_SubstanceLotNumber() {
579 ST[] retVal = this.getTypedField(19, new ST[0]);
580 return retVal;
581 }
582
583
584
585
586
587
588
589 public int getSubstanceLotNumberReps() {
590 return this.getReps(19);
591 }
592
593
594
595
596
597
598
599
600 public ST getSubstanceLotNumber(int rep) {
601 ST retVal = this.getTypedField(19, rep);
602 return retVal;
603 }
604
605
606
607
608
609
610
611 public ST getRxg19_SubstanceLotNumber(int rep) {
612 ST retVal = this.getTypedField(19, rep);
613 return retVal;
614 }
615
616
617
618
619
620
621 public int getRxg19_SubstanceLotNumberReps() {
622 return this.getReps(19);
623 }
624
625
626
627
628
629
630
631
632
633 public ST insertSubstanceLotNumber(int rep) throws HL7Exception {
634 return (ST) super.insertRepetition(19, rep);
635 }
636
637
638
639
640
641
642
643
644
645 public ST insertRxg19_SubstanceLotNumber(int rep) throws HL7Exception {
646 return (ST) super.insertRepetition(19, rep);
647 }
648
649
650
651
652
653
654
655
656
657 public ST removeSubstanceLotNumber(int rep) throws HL7Exception {
658 return (ST) super.removeRepetition(19, rep);
659 }
660
661
662
663
664
665
666
667
668
669 public ST removeRxg19_SubstanceLotNumber(int rep) throws HL7Exception {
670 return (ST) super.removeRepetition(19, rep);
671 }
672
673
674
675
676
677
678 public TS[] getSubstanceExpirationDate() {
679 TS[] retVal = this.getTypedField(20, new TS[0]);
680 return retVal;
681 }
682
683
684
685
686
687 public TS[] getRxg20_SubstanceExpirationDate() {
688 TS[] retVal = this.getTypedField(20, new TS[0]);
689 return retVal;
690 }
691
692
693
694
695
696
697
698 public int getSubstanceExpirationDateReps() {
699 return this.getReps(20);
700 }
701
702
703
704
705
706
707
708
709 public TS getSubstanceExpirationDate(int rep) {
710 TS retVal = this.getTypedField(20, rep);
711 return retVal;
712 }
713
714
715
716
717
718
719
720 public TS getRxg20_SubstanceExpirationDate(int rep) {
721 TS retVal = this.getTypedField(20, rep);
722 return retVal;
723 }
724
725
726
727
728
729
730 public int getRxg20_SubstanceExpirationDateReps() {
731 return this.getReps(20);
732 }
733
734
735
736
737
738
739
740
741
742 public TS insertSubstanceExpirationDate(int rep) throws HL7Exception {
743 return (TS) super.insertRepetition(20, rep);
744 }
745
746
747
748
749
750
751
752
753
754 public TS insertRxg20_SubstanceExpirationDate(int rep) throws HL7Exception {
755 return (TS) super.insertRepetition(20, rep);
756 }
757
758
759
760
761
762
763
764
765
766 public TS removeSubstanceExpirationDate(int rep) throws HL7Exception {
767 return (TS) super.removeRepetition(20, rep);
768 }
769
770
771
772
773
774
775
776
777
778 public TS removeRxg20_SubstanceExpirationDate(int rep) throws HL7Exception {
779 return (TS) super.removeRepetition(20, rep);
780 }
781
782
783
784
785
786
787 public CE[] getSubstanceManufacturerName() {
788 CE[] retVal = this.getTypedField(21, new CE[0]);
789 return retVal;
790 }
791
792
793
794
795
796 public CE[] getRxg21_SubstanceManufacturerName() {
797 CE[] retVal = this.getTypedField(21, new CE[0]);
798 return retVal;
799 }
800
801
802
803
804
805
806
807 public int getSubstanceManufacturerNameReps() {
808 return this.getReps(21);
809 }
810
811
812
813
814
815
816
817
818 public CE getSubstanceManufacturerName(int rep) {
819 CE retVal = this.getTypedField(21, rep);
820 return retVal;
821 }
822
823
824
825
826
827
828
829 public CE getRxg21_SubstanceManufacturerName(int rep) {
830 CE retVal = this.getTypedField(21, rep);
831 return retVal;
832 }
833
834
835
836
837
838
839 public int getRxg21_SubstanceManufacturerNameReps() {
840 return this.getReps(21);
841 }
842
843
844
845
846
847
848
849
850
851 public CE insertSubstanceManufacturerName(int rep) throws HL7Exception {
852 return (CE) super.insertRepetition(21, rep);
853 }
854
855
856
857
858
859
860
861
862
863 public CE insertRxg21_SubstanceManufacturerName(int rep) throws HL7Exception {
864 return (CE) super.insertRepetition(21, rep);
865 }
866
867
868
869
870
871
872
873
874
875 public CE removeSubstanceManufacturerName(int rep) throws HL7Exception {
876 return (CE) super.removeRepetition(21, rep);
877 }
878
879
880
881
882
883
884
885
886
887 public CE removeRxg21_SubstanceManufacturerName(int rep) throws HL7Exception {
888 return (CE) super.removeRepetition(21, rep);
889 }
890
891
892
893
894
895
896
897
898 public CE getIndication() {
899 CE retVal = this.getTypedField(22, 0);
900 return retVal;
901 }
902
903
904
905
906
907 public CE getRxg22_Indication() {
908 CE retVal = this.getTypedField(22, 0);
909 return retVal;
910 }
911
912
913
914
915
916
917 protected Type createNewTypeWithoutReflection(int field) {
918 switch (field) {
919 case 0: return new ID(getMessage(), new Integer( 0 ));
920 case 1: return new NM(getMessage());
921 case 2: return new TQ(getMessage());
922 case 3: return new CE(getMessage());
923 case 4: return new NM(getMessage());
924 case 5: return new NM(getMessage());
925 case 6: return new CE(getMessage());
926 case 7: return new CE(getMessage());
927 case 8: return new CE(getMessage());
928 case 9: return new ID(getMessage(), new Integer( 167 ));
929 case 10: return new CM_LA1(getMessage());
930 case 11: return new ID(getMessage(), new Integer( 136 ));
931 case 12: return new CE(getMessage());
932 case 13: return new ST(getMessage());
933 case 14: return new ST(getMessage());
934 case 15: return new CE(getMessage());
935 case 16: return new NM(getMessage());
936 case 17: return new CE(getMessage());
937 case 18: return new ST(getMessage());
938 case 19: return new TS(getMessage());
939 case 20: return new CE(getMessage());
940 case 21: return new CE(getMessage());
941 default: return null;
942 }
943 }
944
945
946 }
947