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.v231.segment;
35
36
37 import ca.uhn.hl7v2.model.v231.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 @SuppressWarnings("unused")
67 public class PD1 extends AbstractSegment {
68
69
70
71
72 public PD1(Group parent, ModelClassFactory factory) {
73 super(parent, factory);
74 init(factory);
75 }
76
77 private void init(ModelClassFactory factory) {
78 try {
79 this.add(IS.class, false, 0, 2, new Object[]{ getMessage(), new Integer(223) }, "Living Dependency");
80 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(220) }, "Living Arrangement");
81 this.add(XON.class, false, 0, 90, new Object[]{ getMessage() }, "Patient Primary Facility");
82 this.add(XCN.class, false, 0, 90, new Object[]{ getMessage() }, "Patient Primary Care Provider Name & ID No.");
83 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(231) }, "Student Indicator");
84 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(295) }, "Handicap");
85 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(315) }, "Living Will");
86 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(316) }, "Organ Donor");
87 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Separate Bill");
88 this.add(CX.class, false, 0, 20, new Object[]{ getMessage() }, "Duplicate Patient");
89 this.add(CE.class, false, 1, 80, new Object[]{ getMessage() }, "Publicity Code");
90 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Protection Indicator");
91 } catch(HL7Exception e) {
92 log.error("Unexpected error creating PD1 - this is probably a bug in the source code generator.", e);
93 }
94 }
95
96
97
98
99
100 public IS[] getLivingDependency() {
101 IS[] retVal = this.getTypedField(1, new IS[0]);
102 return retVal;
103 }
104
105
106
107
108
109 public IS[] getPd11_LivingDependency() {
110 IS[] retVal = this.getTypedField(1, new IS[0]);
111 return retVal;
112 }
113
114
115
116
117
118
119
120 public int getLivingDependencyReps() {
121 return this.getReps(1);
122 }
123
124
125
126
127
128
129
130
131 public IS getLivingDependency(int rep) {
132 IS retVal = this.getTypedField(1, rep);
133 return retVal;
134 }
135
136
137
138
139
140
141
142 public IS getPd11_LivingDependency(int rep) {
143 IS retVal = this.getTypedField(1, rep);
144 return retVal;
145 }
146
147
148
149
150
151
152 public int getPd11_LivingDependencyReps() {
153 return this.getReps(1);
154 }
155
156
157
158
159
160
161
162
163
164 public IS insertLivingDependency(int rep) throws HL7Exception {
165 return (IS) super.insertRepetition(1, rep);
166 }
167
168
169
170
171
172
173
174
175
176 public IS insertPd11_LivingDependency(int rep) throws HL7Exception {
177 return (IS) super.insertRepetition(1, rep);
178 }
179
180
181
182
183
184
185
186
187
188 public IS removeLivingDependency(int rep) throws HL7Exception {
189 return (IS) super.removeRepetition(1, rep);
190 }
191
192
193
194
195
196
197
198
199
200 public IS removePd11_LivingDependency(int rep) throws HL7Exception {
201 return (IS) super.removeRepetition(1, rep);
202 }
203
204
205
206
207
208
209
210
211 public IS getLivingArrangement() {
212 IS retVal = this.getTypedField(2, 0);
213 return retVal;
214 }
215
216
217
218
219
220 public IS getPd12_LivingArrangement() {
221 IS retVal = this.getTypedField(2, 0);
222 return retVal;
223 }
224
225
226
227
228
229 public XON[] getPatientPrimaryFacility() {
230 XON[] retVal = this.getTypedField(3, new XON[0]);
231 return retVal;
232 }
233
234
235
236
237
238 public XON[] getPd13_PatientPrimaryFacility() {
239 XON[] retVal = this.getTypedField(3, new XON[0]);
240 return retVal;
241 }
242
243
244
245
246
247
248
249 public int getPatientPrimaryFacilityReps() {
250 return this.getReps(3);
251 }
252
253
254
255
256
257
258
259
260 public XON getPatientPrimaryFacility(int rep) {
261 XON retVal = this.getTypedField(3, rep);
262 return retVal;
263 }
264
265
266
267
268
269
270
271 public XON getPd13_PatientPrimaryFacility(int rep) {
272 XON retVal = this.getTypedField(3, rep);
273 return retVal;
274 }
275
276
277
278
279
280
281 public int getPd13_PatientPrimaryFacilityReps() {
282 return this.getReps(3);
283 }
284
285
286
287
288
289
290
291
292
293 public XON insertPatientPrimaryFacility(int rep) throws HL7Exception {
294 return (XON) super.insertRepetition(3, rep);
295 }
296
297
298
299
300
301
302
303
304
305 public XON insertPd13_PatientPrimaryFacility(int rep) throws HL7Exception {
306 return (XON) super.insertRepetition(3, rep);
307 }
308
309
310
311
312
313
314
315
316
317 public XON removePatientPrimaryFacility(int rep) throws HL7Exception {
318 return (XON) super.removeRepetition(3, rep);
319 }
320
321
322
323
324
325
326
327
328
329 public XON removePd13_PatientPrimaryFacility(int rep) throws HL7Exception {
330 return (XON) super.removeRepetition(3, rep);
331 }
332
333
334
335
336
337
338 public XCN[] getPatientPrimaryCareProviderNameIDNo() {
339 XCN[] retVal = this.getTypedField(4, new XCN[0]);
340 return retVal;
341 }
342
343
344
345
346
347 public XCN[] getPd14_PatientPrimaryCareProviderNameIDNo() {
348 XCN[] retVal = this.getTypedField(4, new XCN[0]);
349 return retVal;
350 }
351
352
353
354
355
356
357
358 public int getPatientPrimaryCareProviderNameIDNoReps() {
359 return this.getReps(4);
360 }
361
362
363
364
365
366
367
368
369 public XCN getPatientPrimaryCareProviderNameIDNo(int rep) {
370 XCN retVal = this.getTypedField(4, rep);
371 return retVal;
372 }
373
374
375
376
377
378
379
380 public XCN getPd14_PatientPrimaryCareProviderNameIDNo(int rep) {
381 XCN retVal = this.getTypedField(4, rep);
382 return retVal;
383 }
384
385
386
387
388
389
390 public int getPd14_PatientPrimaryCareProviderNameIDNoReps() {
391 return this.getReps(4);
392 }
393
394
395
396
397
398
399
400
401
402 public XCN insertPatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
403 return (XCN) super.insertRepetition(4, rep);
404 }
405
406
407
408
409
410
411
412
413
414 public XCN insertPd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
415 return (XCN) super.insertRepetition(4, rep);
416 }
417
418
419
420
421
422
423
424
425
426 public XCN removePatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
427 return (XCN) super.removeRepetition(4, rep);
428 }
429
430
431
432
433
434
435
436
437
438 public XCN removePd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
439 return (XCN) super.removeRepetition(4, rep);
440 }
441
442
443
444
445
446
447
448
449 public IS getStudentIndicator() {
450 IS retVal = this.getTypedField(5, 0);
451 return retVal;
452 }
453
454
455
456
457
458 public IS getPd15_StudentIndicator() {
459 IS retVal = this.getTypedField(5, 0);
460 return retVal;
461 }
462
463
464
465
466
467
468
469 public IS getHandicap() {
470 IS retVal = this.getTypedField(6, 0);
471 return retVal;
472 }
473
474
475
476
477
478 public IS getPd16_Handicap() {
479 IS retVal = this.getTypedField(6, 0);
480 return retVal;
481 }
482
483
484
485
486
487
488
489 public IS getLivingWill() {
490 IS retVal = this.getTypedField(7, 0);
491 return retVal;
492 }
493
494
495
496
497
498 public IS getPd17_LivingWill() {
499 IS retVal = this.getTypedField(7, 0);
500 return retVal;
501 }
502
503
504
505
506
507
508
509 public IS getOrganDonor() {
510 IS retVal = this.getTypedField(8, 0);
511 return retVal;
512 }
513
514
515
516
517
518 public IS getPd18_OrganDonor() {
519 IS retVal = this.getTypedField(8, 0);
520 return retVal;
521 }
522
523
524
525
526
527
528
529 public ID getSeparateBill() {
530 ID retVal = this.getTypedField(9, 0);
531 return retVal;
532 }
533
534
535
536
537
538 public ID getPd19_SeparateBill() {
539 ID retVal = this.getTypedField(9, 0);
540 return retVal;
541 }
542
543
544
545
546
547 public CX[] getDuplicatePatient() {
548 CX[] retVal = this.getTypedField(10, new CX[0]);
549 return retVal;
550 }
551
552
553
554
555
556 public CX[] getPd110_DuplicatePatient() {
557 CX[] retVal = this.getTypedField(10, new CX[0]);
558 return retVal;
559 }
560
561
562
563
564
565
566
567 public int getDuplicatePatientReps() {
568 return this.getReps(10);
569 }
570
571
572
573
574
575
576
577
578 public CX getDuplicatePatient(int rep) {
579 CX retVal = this.getTypedField(10, rep);
580 return retVal;
581 }
582
583
584
585
586
587
588
589 public CX getPd110_DuplicatePatient(int rep) {
590 CX retVal = this.getTypedField(10, rep);
591 return retVal;
592 }
593
594
595
596
597
598
599 public int getPd110_DuplicatePatientReps() {
600 return this.getReps(10);
601 }
602
603
604
605
606
607
608
609
610
611 public CX insertDuplicatePatient(int rep) throws HL7Exception {
612 return (CX) super.insertRepetition(10, rep);
613 }
614
615
616
617
618
619
620
621
622
623 public CX insertPd110_DuplicatePatient(int rep) throws HL7Exception {
624 return (CX) super.insertRepetition(10, rep);
625 }
626
627
628
629
630
631
632
633
634
635 public CX removeDuplicatePatient(int rep) throws HL7Exception {
636 return (CX) super.removeRepetition(10, rep);
637 }
638
639
640
641
642
643
644
645
646
647 public CX removePd110_DuplicatePatient(int rep) throws HL7Exception {
648 return (CX) super.removeRepetition(10, rep);
649 }
650
651
652
653
654
655
656
657
658 public CE getPublicityCode() {
659 CE retVal = this.getTypedField(11, 0);
660 return retVal;
661 }
662
663
664
665
666
667 public CE getPd111_PublicityCode() {
668 CE retVal = this.getTypedField(11, 0);
669 return retVal;
670 }
671
672
673
674
675
676
677
678 public ID getProtectionIndicator() {
679 ID retVal = this.getTypedField(12, 0);
680 return retVal;
681 }
682
683
684
685
686
687 public ID getPd112_ProtectionIndicator() {
688 ID retVal = this.getTypedField(12, 0);
689 return retVal;
690 }
691
692
693
694
695
696
697 protected Type createNewTypeWithoutReflection(int field) {
698 switch (field) {
699 case 0: return new IS(getMessage(), new Integer( 223 ));
700 case 1: return new IS(getMessage(), new Integer( 220 ));
701 case 2: return new XON(getMessage());
702 case 3: return new XCN(getMessage());
703 case 4: return new IS(getMessage(), new Integer( 231 ));
704 case 5: return new IS(getMessage(), new Integer( 295 ));
705 case 6: return new IS(getMessage(), new Integer( 315 ));
706 case 7: return new IS(getMessage(), new Integer( 316 ));
707 case 8: return new ID(getMessage(), new Integer( 136 ));
708 case 9: return new CX(getMessage());
709 case 10: return new CE(getMessage());
710 case 11: return new ID(getMessage(), new Integer( 136 ));
711 default: return null;
712 }
713 }
714
715
716 }
717