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.v281.segment;
35
36
37 import ca.uhn.hl7v2.model.v281.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 @SuppressWarnings("unused")
69 public class GP2 extends AbstractSegment {
70
71
72
73
74 public GP2(Group parent, ModelClassFactory factory) {
75 super(parent, factory);
76 init(factory);
77 }
78
79 private void init(ModelClassFactory factory) {
80 try {
81 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Revenue Code");
82 this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Number of Service Units");
83 this.add(CP.class, false, 1, 0, new Object[]{ getMessage() }, "Charge");
84 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Reimbursement Action Code");
85 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Denial or Rejection Code");
86 this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "OCE Edit Code");
87 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Ambulatory Payment Classification Code");
88 this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Modifier Edit Code");
89 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Payment Adjustment Code");
90 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Packaging Status Code");
91 this.add(CP.class, false, 1, 0, new Object[]{ getMessage() }, "Expected CMS Payment Amount");
92 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Reimbursement Type Code");
93 this.add(CP.class, false, 1, 0, new Object[]{ getMessage() }, "Co-Pay Amount");
94 this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Pay Rate per Service Unit");
95 } catch(HL7Exception e) {
96 log.error("Unexpected error creating GP2 - this is probably a bug in the source code generator.", e);
97 }
98 }
99
100
101
102
103
104
105
106 public CWE getRevenueCode() {
107 CWE retVal = this.getTypedField(1, 0);
108 return retVal;
109 }
110
111
112
113
114
115 public CWE getGp21_RevenueCode() {
116 CWE retVal = this.getTypedField(1, 0);
117 return retVal;
118 }
119
120
121
122
123
124
125
126 public NM getNumberOfServiceUnits() {
127 NM retVal = this.getTypedField(2, 0);
128 return retVal;
129 }
130
131
132
133
134
135 public NM getGp22_NumberOfServiceUnits() {
136 NM retVal = this.getTypedField(2, 0);
137 return retVal;
138 }
139
140
141
142
143
144
145
146 public CP getCharge() {
147 CP retVal = this.getTypedField(3, 0);
148 return retVal;
149 }
150
151
152
153
154
155 public CP getGp23_Charge() {
156 CP retVal = this.getTypedField(3, 0);
157 return retVal;
158 }
159
160
161
162
163
164
165
166 public CWE getReimbursementActionCode() {
167 CWE retVal = this.getTypedField(4, 0);
168 return retVal;
169 }
170
171
172
173
174
175 public CWE getGp24_ReimbursementActionCode() {
176 CWE retVal = this.getTypedField(4, 0);
177 return retVal;
178 }
179
180
181
182
183
184
185
186 public CWE getDenialOrRejectionCode() {
187 CWE retVal = this.getTypedField(5, 0);
188 return retVal;
189 }
190
191
192
193
194
195 public CWE getGp25_DenialOrRejectionCode() {
196 CWE retVal = this.getTypedField(5, 0);
197 return retVal;
198 }
199
200
201
202
203
204 public CWE[] getOCEEditCode() {
205 CWE[] retVal = this.getTypedField(6, new CWE[0]);
206 return retVal;
207 }
208
209
210
211
212
213 public CWE[] getGp26_OCEEditCode() {
214 CWE[] retVal = this.getTypedField(6, new CWE[0]);
215 return retVal;
216 }
217
218
219
220
221
222
223
224 public int getOCEEditCodeReps() {
225 return this.getReps(6);
226 }
227
228
229
230
231
232
233
234
235 public CWE getOCEEditCode(int rep) {
236 CWE retVal = this.getTypedField(6, rep);
237 return retVal;
238 }
239
240
241
242
243
244
245
246 public CWE getGp26_OCEEditCode(int rep) {
247 CWE retVal = this.getTypedField(6, rep);
248 return retVal;
249 }
250
251
252
253
254
255
256 public int getGp26_OCEEditCodeReps() {
257 return this.getReps(6);
258 }
259
260
261
262
263
264
265
266
267
268 public CWE insertOCEEditCode(int rep) throws HL7Exception {
269 return (CWE) super.insertRepetition(6, rep);
270 }
271
272
273
274
275
276
277
278
279
280 public CWE insertGp26_OCEEditCode(int rep) throws HL7Exception {
281 return (CWE) super.insertRepetition(6, rep);
282 }
283
284
285
286
287
288
289
290
291
292 public CWE removeOCEEditCode(int rep) throws HL7Exception {
293 return (CWE) super.removeRepetition(6, rep);
294 }
295
296
297
298
299
300
301
302
303
304 public CWE removeGp26_OCEEditCode(int rep) throws HL7Exception {
305 return (CWE) super.removeRepetition(6, rep);
306 }
307
308
309
310
311
312
313
314
315 public CWE getAmbulatoryPaymentClassificationCode() {
316 CWE retVal = this.getTypedField(7, 0);
317 return retVal;
318 }
319
320
321
322
323
324 public CWE getGp27_AmbulatoryPaymentClassificationCode() {
325 CWE retVal = this.getTypedField(7, 0);
326 return retVal;
327 }
328
329
330
331
332
333 public CWE[] getModifierEditCode() {
334 CWE[] retVal = this.getTypedField(8, new CWE[0]);
335 return retVal;
336 }
337
338
339
340
341
342 public CWE[] getGp28_ModifierEditCode() {
343 CWE[] retVal = this.getTypedField(8, new CWE[0]);
344 return retVal;
345 }
346
347
348
349
350
351
352
353 public int getModifierEditCodeReps() {
354 return this.getReps(8);
355 }
356
357
358
359
360
361
362
363
364 public CWE getModifierEditCode(int rep) {
365 CWE retVal = this.getTypedField(8, rep);
366 return retVal;
367 }
368
369
370
371
372
373
374
375 public CWE getGp28_ModifierEditCode(int rep) {
376 CWE retVal = this.getTypedField(8, rep);
377 return retVal;
378 }
379
380
381
382
383
384
385 public int getGp28_ModifierEditCodeReps() {
386 return this.getReps(8);
387 }
388
389
390
391
392
393
394
395
396
397 public CWE insertModifierEditCode(int rep) throws HL7Exception {
398 return (CWE) super.insertRepetition(8, rep);
399 }
400
401
402
403
404
405
406
407
408
409 public CWE insertGp28_ModifierEditCode(int rep) throws HL7Exception {
410 return (CWE) super.insertRepetition(8, rep);
411 }
412
413
414
415
416
417
418
419
420
421 public CWE removeModifierEditCode(int rep) throws HL7Exception {
422 return (CWE) super.removeRepetition(8, rep);
423 }
424
425
426
427
428
429
430
431
432
433 public CWE removeGp28_ModifierEditCode(int rep) throws HL7Exception {
434 return (CWE) super.removeRepetition(8, rep);
435 }
436
437
438
439
440
441
442
443
444 public CWE getPaymentAdjustmentCode() {
445 CWE retVal = this.getTypedField(9, 0);
446 return retVal;
447 }
448
449
450
451
452
453 public CWE getGp29_PaymentAdjustmentCode() {
454 CWE retVal = this.getTypedField(9, 0);
455 return retVal;
456 }
457
458
459
460
461
462
463
464 public CWE getPackagingStatusCode() {
465 CWE retVal = this.getTypedField(10, 0);
466 return retVal;
467 }
468
469
470
471
472
473 public CWE getGp210_PackagingStatusCode() {
474 CWE retVal = this.getTypedField(10, 0);
475 return retVal;
476 }
477
478
479
480
481
482
483
484 public CP getExpectedCMSPaymentAmount() {
485 CP retVal = this.getTypedField(11, 0);
486 return retVal;
487 }
488
489
490
491
492
493 public CP getGp211_ExpectedCMSPaymentAmount() {
494 CP retVal = this.getTypedField(11, 0);
495 return retVal;
496 }
497
498
499
500
501
502
503
504 public CWE getReimbursementTypeCode() {
505 CWE retVal = this.getTypedField(12, 0);
506 return retVal;
507 }
508
509
510
511
512
513 public CWE getGp212_ReimbursementTypeCode() {
514 CWE retVal = this.getTypedField(12, 0);
515 return retVal;
516 }
517
518
519
520
521
522
523
524 public CP getCoPayAmount() {
525 CP retVal = this.getTypedField(13, 0);
526 return retVal;
527 }
528
529
530
531
532
533 public CP getGp213_CoPayAmount() {
534 CP retVal = this.getTypedField(13, 0);
535 return retVal;
536 }
537
538
539
540
541
542
543
544 public NM getPayRatePerServiceUnit() {
545 NM retVal = this.getTypedField(14, 0);
546 return retVal;
547 }
548
549
550
551
552
553 public NM getGp214_PayRatePerServiceUnit() {
554 NM retVal = this.getTypedField(14, 0);
555 return retVal;
556 }
557
558
559
560
561
562
563 protected Type createNewTypeWithoutReflection(int field) {
564 switch (field) {
565 case 0: return new CWE(getMessage());
566 case 1: return new NM(getMessage());
567 case 2: return new CP(getMessage());
568 case 3: return new CWE(getMessage());
569 case 4: return new CWE(getMessage());
570 case 5: return new CWE(getMessage());
571 case 6: return new CWE(getMessage());
572 case 7: return new CWE(getMessage());
573 case 8: return new CWE(getMessage());
574 case 9: return new CWE(getMessage());
575 case 10: return new CP(getMessage());
576 case 11: return new CWE(getMessage());
577 case 12: return new CP(getMessage());
578 case 13: return new NM(getMessage());
579 default: return null;
580 }
581 }
582
583
584 }
585