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 @SuppressWarnings("unused")
71 public class RXG extends AbstractSegment {
72
73
74
75
76 public RXG(Group parent, ModelClassFactory factory) {
77 super(parent, factory);
78 init(factory);
79 }
80
81 private void init(ModelClassFactory factory) {
82 try {
83 this.add(NM.class, true, 1, 4, new Object[]{ getMessage() }, "Give Sub-ID Counter");
84 this.add(NM.class, false, 1, 4, new Object[]{ getMessage() }, "Dispense Sub-ID Counter");
85 this.add(TQ.class, false, 0, 200, new Object[]{ getMessage() }, "Quantity / timing");
86 this.add(CE.class, true, 1, 100, new Object[]{ getMessage() }, "Give Code");
87 this.add(NM.class, true, 1, 20, new Object[]{ getMessage() }, "Give Amount - Minimum");
88 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Give Amount - Maximum");
89 this.add(CE.class, true, 1, 60, new Object[]{ getMessage() }, "Give Units");
90 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Give Dosage Form");
91 this.add(ST.class, false, 1, 200, new Object[]{ getMessage() }, "Administration Notes");
92 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(167) }, "Substitution Status");
93 this.add(CM_LA1.class, false, 1, 12, new Object[]{ getMessage() }, "Deliver-to location");
94 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "Needs Human Review");
95 this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Pharmacy Special Administration Instructions");
96 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Give Per (Time Unit)");
97 this.add(CE.class, false, 1, 6, new Object[]{ getMessage() }, "Give Rate Amount");
98 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Give Rate Units");
99 } catch(HL7Exception e) {
100 log.error("Unexpected error creating RXG - this is probably a bug in the source code generator.", e);
101 }
102 }
103
104
105
106
107
108
109
110 public NM getGiveSubIDCounter() {
111 NM retVal = this.getTypedField(1, 0);
112 return retVal;
113 }
114
115
116
117
118
119 public NM getRxg1_GiveSubIDCounter() {
120 NM retVal = this.getTypedField(1, 0);
121 return retVal;
122 }
123
124
125
126
127
128
129
130 public NM getDispenseSubIDCounter() {
131 NM retVal = this.getTypedField(2, 0);
132 return retVal;
133 }
134
135
136
137
138
139 public NM getRxg2_DispenseSubIDCounter() {
140 NM retVal = this.getTypedField(2, 0);
141 return retVal;
142 }
143
144
145
146
147
148 public TQ[] getQuantityTiming() {
149 TQ[] retVal = this.getTypedField(3, new TQ[0]);
150 return retVal;
151 }
152
153
154
155
156
157 public TQ[] getRxg3_QuantityTiming() {
158 TQ[] retVal = this.getTypedField(3, new TQ[0]);
159 return retVal;
160 }
161
162
163
164
165
166
167
168 public int getQuantityTimingReps() {
169 return this.getReps(3);
170 }
171
172
173
174
175
176
177
178
179 public TQ getQuantityTiming(int rep) {
180 TQ retVal = this.getTypedField(3, rep);
181 return retVal;
182 }
183
184
185
186
187
188
189
190 public TQ getRxg3_QuantityTiming(int rep) {
191 TQ retVal = this.getTypedField(3, rep);
192 return retVal;
193 }
194
195
196
197
198
199
200 public int getRxg3_QuantityTimingReps() {
201 return this.getReps(3);
202 }
203
204
205
206
207
208
209
210
211
212 public TQ insertQuantityTiming(int rep) throws HL7Exception {
213 return (TQ) super.insertRepetition(3, rep);
214 }
215
216
217
218
219
220
221
222
223
224 public TQ insertRxg3_QuantityTiming(int rep) throws HL7Exception {
225 return (TQ) super.insertRepetition(3, rep);
226 }
227
228
229
230
231
232
233
234
235
236 public TQ removeQuantityTiming(int rep) throws HL7Exception {
237 return (TQ) super.removeRepetition(3, rep);
238 }
239
240
241
242
243
244
245
246
247
248 public TQ removeRxg3_QuantityTiming(int rep) throws HL7Exception {
249 return (TQ) super.removeRepetition(3, rep);
250 }
251
252
253
254
255
256
257
258
259 public CE getGiveCode() {
260 CE retVal = this.getTypedField(4, 0);
261 return retVal;
262 }
263
264
265
266
267
268 public CE getRxg4_GiveCode() {
269 CE retVal = this.getTypedField(4, 0);
270 return retVal;
271 }
272
273
274
275
276
277
278
279 public NM getGiveAmountMinimum() {
280 NM retVal = this.getTypedField(5, 0);
281 return retVal;
282 }
283
284
285
286
287
288 public NM getRxg5_GiveAmountMinimum() {
289 NM retVal = this.getTypedField(5, 0);
290 return retVal;
291 }
292
293
294
295
296
297
298
299 public NM getGiveAmountMaximum() {
300 NM retVal = this.getTypedField(6, 0);
301 return retVal;
302 }
303
304
305
306
307
308 public NM getRxg6_GiveAmountMaximum() {
309 NM retVal = this.getTypedField(6, 0);
310 return retVal;
311 }
312
313
314
315
316
317
318
319 public CE getGiveUnits() {
320 CE retVal = this.getTypedField(7, 0);
321 return retVal;
322 }
323
324
325
326
327
328 public CE getRxg7_GiveUnits() {
329 CE retVal = this.getTypedField(7, 0);
330 return retVal;
331 }
332
333
334
335
336
337
338
339 public CE getGiveDosageForm() {
340 CE retVal = this.getTypedField(8, 0);
341 return retVal;
342 }
343
344
345
346
347
348 public CE getRxg8_GiveDosageForm() {
349 CE retVal = this.getTypedField(8, 0);
350 return retVal;
351 }
352
353
354
355
356
357
358
359 public ST getAdministrationNotes() {
360 ST retVal = this.getTypedField(9, 0);
361 return retVal;
362 }
363
364
365
366
367
368 public ST getRxg9_AdministrationNotes() {
369 ST retVal = this.getTypedField(9, 0);
370 return retVal;
371 }
372
373
374
375
376
377
378
379 public ID getSubstitutionStatus() {
380 ID retVal = this.getTypedField(10, 0);
381 return retVal;
382 }
383
384
385
386
387
388 public ID getRxg10_SubstitutionStatus() {
389 ID retVal = this.getTypedField(10, 0);
390 return retVal;
391 }
392
393
394
395
396
397
398
399 public CM_LA1 getDeliverToLocation() {
400 CM_LA1 retVal = this.getTypedField(11, 0);
401 return retVal;
402 }
403
404
405
406
407
408 public CM_LA1 getRxg11_DeliverToLocation() {
409 CM_LA1 retVal = this.getTypedField(11, 0);
410 return retVal;
411 }
412
413
414
415
416
417
418
419 public ID getNeedsHumanReview() {
420 ID retVal = this.getTypedField(12, 0);
421 return retVal;
422 }
423
424
425
426
427
428 public ID getRxg12_NeedsHumanReview() {
429 ID retVal = this.getTypedField(12, 0);
430 return retVal;
431 }
432
433
434
435
436
437 public CE[] getPharmacySpecialAdministrationInstructions() {
438 CE[] retVal = this.getTypedField(13, new CE[0]);
439 return retVal;
440 }
441
442
443
444
445
446 public CE[] getRxg13_PharmacySpecialAdministrationInstructions() {
447 CE[] retVal = this.getTypedField(13, new CE[0]);
448 return retVal;
449 }
450
451
452
453
454
455
456
457 public int getPharmacySpecialAdministrationInstructionsReps() {
458 return this.getReps(13);
459 }
460
461
462
463
464
465
466
467
468 public CE getPharmacySpecialAdministrationInstructions(int rep) {
469 CE retVal = this.getTypedField(13, rep);
470 return retVal;
471 }
472
473
474
475
476
477
478
479 public CE getRxg13_PharmacySpecialAdministrationInstructions(int rep) {
480 CE retVal = this.getTypedField(13, rep);
481 return retVal;
482 }
483
484
485
486
487
488
489 public int getRxg13_PharmacySpecialAdministrationInstructionsReps() {
490 return this.getReps(13);
491 }
492
493
494
495
496
497
498
499
500
501 public CE insertPharmacySpecialAdministrationInstructions(int rep) throws HL7Exception {
502 return (CE) super.insertRepetition(13, rep);
503 }
504
505
506
507
508
509
510
511
512
513 public CE insertRxg13_PharmacySpecialAdministrationInstructions(int rep) throws HL7Exception {
514 return (CE) super.insertRepetition(13, rep);
515 }
516
517
518
519
520
521
522
523
524
525 public CE removePharmacySpecialAdministrationInstructions(int rep) throws HL7Exception {
526 return (CE) super.removeRepetition(13, rep);
527 }
528
529
530
531
532
533
534
535
536
537 public CE removeRxg13_PharmacySpecialAdministrationInstructions(int rep) throws HL7Exception {
538 return (CE) super.removeRepetition(13, rep);
539 }
540
541
542
543
544
545
546
547
548 public ST getGivePerTimeUnit() {
549 ST retVal = this.getTypedField(14, 0);
550 return retVal;
551 }
552
553
554
555
556
557 public ST getRxg14_GivePerTimeUnit() {
558 ST retVal = this.getTypedField(14, 0);
559 return retVal;
560 }
561
562
563
564
565
566
567
568 public CE getGiveRateAmount() {
569 CE retVal = this.getTypedField(15, 0);
570 return retVal;
571 }
572
573
574
575
576
577 public CE getRxg15_GiveRateAmount() {
578 CE retVal = this.getTypedField(15, 0);
579 return retVal;
580 }
581
582
583
584
585
586
587
588 public CE getGiveRateUnits() {
589 CE retVal = this.getTypedField(16, 0);
590 return retVal;
591 }
592
593
594
595
596
597 public CE getRxg16_GiveRateUnits() {
598 CE retVal = this.getTypedField(16, 0);
599 return retVal;
600 }
601
602
603
604
605
606
607 protected Type createNewTypeWithoutReflection(int field) {
608 switch (field) {
609 case 0: return new NM(getMessage());
610 case 1: return new NM(getMessage());
611 case 2: return new TQ(getMessage());
612 case 3: return new CE(getMessage());
613 case 4: return new NM(getMessage());
614 case 5: return new NM(getMessage());
615 case 6: return new CE(getMessage());
616 case 7: return new CE(getMessage());
617 case 8: return new ST(getMessage());
618 case 9: return new ID(getMessage(), new Integer( 167 ));
619 case 10: return new CM_LA1(getMessage());
620 case 11: return new ID(getMessage(), new Integer( 0 ));
621 case 12: return new CE(getMessage());
622 case 13: return new ST(getMessage());
623 case 14: return new CE(getMessage());
624 case 15: return new CE(getMessage());
625 default: return null;
626 }
627 }
628
629
630 }
631