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.v28.segment;
35
36
37 import ca.uhn.hl7v2.model.v28.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 PD1 extends AbstractSegment {
78
79
80
81
82 public PD1(Group parent, ModelClassFactory factory) {
83 super(parent, factory);
84 init(factory);
85 }
86
87 private void init(ModelClassFactory factory) {
88 try {
89 this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Living Dependency");
90 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Living Arrangement");
91 this.add(XON.class, false, 0, 0, new Object[]{ getMessage() }, "Patient Primary Facility");
92 this.add(NULLDT.class, false, 1, 0, new Object[]{ getMessage() }, "Patient Primary Care Provider Name & ID No.");
93 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Student Indicator");
94 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Handicap");
95 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Living Will Code");
96 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Organ Donor Code");
97 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Separate Bill");
98 this.add(CX.class, false, 0, 0, new Object[]{ getMessage() }, "Duplicate Patient");
99 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Publicity Code");
100 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Protection Indicator");
101 this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Protection Indicator Effective Date");
102 this.add(XON.class, false, 0, 0, new Object[]{ getMessage() }, "Place of Worship");
103 this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Advance Directive Code");
104 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Immunization Registry Status");
105 this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Immunization Registry Status Effective Date");
106 this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Publicity Code Effective Date");
107 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Military Branch");
108 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Military Rank/Grade");
109 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Military Status");
110 this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Advance Directive Last Verified Date");
111 } catch(HL7Exception e) {
112 log.error("Unexpected error creating PD1 - this is probably a bug in the source code generator.", e);
113 }
114 }
115
116
117
118
119
120 public CWE[] getLivingDependency() {
121 CWE[] retVal = this.getTypedField(1, new CWE[0]);
122 return retVal;
123 }
124
125
126
127
128
129 public CWE[] getPd11_LivingDependency() {
130 CWE[] retVal = this.getTypedField(1, new CWE[0]);
131 return retVal;
132 }
133
134
135
136
137
138
139
140 public int getLivingDependencyReps() {
141 return this.getReps(1);
142 }
143
144
145
146
147
148
149
150
151 public CWE getLivingDependency(int rep) {
152 CWE retVal = this.getTypedField(1, rep);
153 return retVal;
154 }
155
156
157
158
159
160
161
162 public CWE getPd11_LivingDependency(int rep) {
163 CWE retVal = this.getTypedField(1, rep);
164 return retVal;
165 }
166
167
168
169
170
171
172 public int getPd11_LivingDependencyReps() {
173 return this.getReps(1);
174 }
175
176
177
178
179
180
181
182
183
184 public CWE insertLivingDependency(int rep) throws HL7Exception {
185 return (CWE) super.insertRepetition(1, rep);
186 }
187
188
189
190
191
192
193
194
195
196 public CWE insertPd11_LivingDependency(int rep) throws HL7Exception {
197 return (CWE) super.insertRepetition(1, rep);
198 }
199
200
201
202
203
204
205
206
207
208 public CWE removeLivingDependency(int rep) throws HL7Exception {
209 return (CWE) super.removeRepetition(1, rep);
210 }
211
212
213
214
215
216
217
218
219
220 public CWE removePd11_LivingDependency(int rep) throws HL7Exception {
221 return (CWE) super.removeRepetition(1, rep);
222 }
223
224
225
226
227
228
229
230
231 public CWE getLivingArrangement() {
232 CWE retVal = this.getTypedField(2, 0);
233 return retVal;
234 }
235
236
237
238
239
240 public CWE getPd12_LivingArrangement() {
241 CWE retVal = this.getTypedField(2, 0);
242 return retVal;
243 }
244
245
246
247
248
249 public XON[] getPatientPrimaryFacility() {
250 XON[] retVal = this.getTypedField(3, new XON[0]);
251 return retVal;
252 }
253
254
255
256
257
258 public XON[] getPd13_PatientPrimaryFacility() {
259 XON[] retVal = this.getTypedField(3, new XON[0]);
260 return retVal;
261 }
262
263
264
265
266
267
268
269 public int getPatientPrimaryFacilityReps() {
270 return this.getReps(3);
271 }
272
273
274
275
276
277
278
279
280 public XON getPatientPrimaryFacility(int rep) {
281 XON retVal = this.getTypedField(3, rep);
282 return retVal;
283 }
284
285
286
287
288
289
290
291 public XON getPd13_PatientPrimaryFacility(int rep) {
292 XON retVal = this.getTypedField(3, rep);
293 return retVal;
294 }
295
296
297
298
299
300
301 public int getPd13_PatientPrimaryFacilityReps() {
302 return this.getReps(3);
303 }
304
305
306
307
308
309
310
311
312
313 public XON insertPatientPrimaryFacility(int rep) throws HL7Exception {
314 return (XON) super.insertRepetition(3, rep);
315 }
316
317
318
319
320
321
322
323
324
325 public XON insertPd13_PatientPrimaryFacility(int rep) throws HL7Exception {
326 return (XON) super.insertRepetition(3, rep);
327 }
328
329
330
331
332
333
334
335
336
337 public XON removePatientPrimaryFacility(int rep) throws HL7Exception {
338 return (XON) super.removeRepetition(3, rep);
339 }
340
341
342
343
344
345
346
347
348
349 public XON removePd13_PatientPrimaryFacility(int rep) throws HL7Exception {
350 return (XON) super.removeRepetition(3, rep);
351 }
352
353
354
355
356
357
358
359
360 public NULLDT getPatientPrimaryCareProviderNameIDNo() {
361 NULLDT retVal = this.getTypedField(4, 0);
362 return retVal;
363 }
364
365
366
367
368
369 public NULLDT getPd14_PatientPrimaryCareProviderNameIDNo() {
370 NULLDT retVal = this.getTypedField(4, 0);
371 return retVal;
372 }
373
374
375
376
377
378
379
380 public CWE getStudentIndicator() {
381 CWE retVal = this.getTypedField(5, 0);
382 return retVal;
383 }
384
385
386
387
388
389 public CWE getPd15_StudentIndicator() {
390 CWE retVal = this.getTypedField(5, 0);
391 return retVal;
392 }
393
394
395
396
397
398
399
400 public CWE getHandicap() {
401 CWE retVal = this.getTypedField(6, 0);
402 return retVal;
403 }
404
405
406
407
408
409 public CWE getPd16_Handicap() {
410 CWE retVal = this.getTypedField(6, 0);
411 return retVal;
412 }
413
414
415
416
417
418
419
420 public CWE getLivingWillCode() {
421 CWE retVal = this.getTypedField(7, 0);
422 return retVal;
423 }
424
425
426
427
428
429 public CWE getPd17_LivingWillCode() {
430 CWE retVal = this.getTypedField(7, 0);
431 return retVal;
432 }
433
434
435
436
437
438
439
440 public CWE getOrganDonorCode() {
441 CWE retVal = this.getTypedField(8, 0);
442 return retVal;
443 }
444
445
446
447
448
449 public CWE getPd18_OrganDonorCode() {
450 CWE retVal = this.getTypedField(8, 0);
451 return retVal;
452 }
453
454
455
456
457
458
459
460 public ID getSeparateBill() {
461 ID retVal = this.getTypedField(9, 0);
462 return retVal;
463 }
464
465
466
467
468
469 public ID getPd19_SeparateBill() {
470 ID retVal = this.getTypedField(9, 0);
471 return retVal;
472 }
473
474
475
476
477
478 public CX[] getDuplicatePatient() {
479 CX[] retVal = this.getTypedField(10, new CX[0]);
480 return retVal;
481 }
482
483
484
485
486
487 public CX[] getPd110_DuplicatePatient() {
488 CX[] retVal = this.getTypedField(10, new CX[0]);
489 return retVal;
490 }
491
492
493
494
495
496
497
498 public int getDuplicatePatientReps() {
499 return this.getReps(10);
500 }
501
502
503
504
505
506
507
508
509 public CX getDuplicatePatient(int rep) {
510 CX retVal = this.getTypedField(10, rep);
511 return retVal;
512 }
513
514
515
516
517
518
519
520 public CX getPd110_DuplicatePatient(int rep) {
521 CX retVal = this.getTypedField(10, rep);
522 return retVal;
523 }
524
525
526
527
528
529
530 public int getPd110_DuplicatePatientReps() {
531 return this.getReps(10);
532 }
533
534
535
536
537
538
539
540
541
542 public CX insertDuplicatePatient(int rep) throws HL7Exception {
543 return (CX) super.insertRepetition(10, rep);
544 }
545
546
547
548
549
550
551
552
553
554 public CX insertPd110_DuplicatePatient(int rep) throws HL7Exception {
555 return (CX) super.insertRepetition(10, rep);
556 }
557
558
559
560
561
562
563
564
565
566 public CX removeDuplicatePatient(int rep) throws HL7Exception {
567 return (CX) super.removeRepetition(10, rep);
568 }
569
570
571
572
573
574
575
576
577
578 public CX removePd110_DuplicatePatient(int rep) throws HL7Exception {
579 return (CX) super.removeRepetition(10, rep);
580 }
581
582
583
584
585
586
587
588
589 public CWE getPublicityCode() {
590 CWE retVal = this.getTypedField(11, 0);
591 return retVal;
592 }
593
594
595
596
597
598 public CWE getPd111_PublicityCode() {
599 CWE retVal = this.getTypedField(11, 0);
600 return retVal;
601 }
602
603
604
605
606
607
608
609 public ID getProtectionIndicator() {
610 ID retVal = this.getTypedField(12, 0);
611 return retVal;
612 }
613
614
615
616
617
618 public ID getPd112_ProtectionIndicator() {
619 ID retVal = this.getTypedField(12, 0);
620 return retVal;
621 }
622
623
624
625
626
627
628
629 public DT getProtectionIndicatorEffectiveDate() {
630 DT retVal = this.getTypedField(13, 0);
631 return retVal;
632 }
633
634
635
636
637
638 public DT getPd113_ProtectionIndicatorEffectiveDate() {
639 DT retVal = this.getTypedField(13, 0);
640 return retVal;
641 }
642
643
644
645
646
647 public XON[] getPlaceOfWorship() {
648 XON[] retVal = this.getTypedField(14, new XON[0]);
649 return retVal;
650 }
651
652
653
654
655
656 public XON[] getPd114_PlaceOfWorship() {
657 XON[] retVal = this.getTypedField(14, new XON[0]);
658 return retVal;
659 }
660
661
662
663
664
665
666
667 public int getPlaceOfWorshipReps() {
668 return this.getReps(14);
669 }
670
671
672
673
674
675
676
677
678 public XON getPlaceOfWorship(int rep) {
679 XON retVal = this.getTypedField(14, rep);
680 return retVal;
681 }
682
683
684
685
686
687
688
689 public XON getPd114_PlaceOfWorship(int rep) {
690 XON retVal = this.getTypedField(14, rep);
691 return retVal;
692 }
693
694
695
696
697
698
699 public int getPd114_PlaceOfWorshipReps() {
700 return this.getReps(14);
701 }
702
703
704
705
706
707
708
709
710
711 public XON insertPlaceOfWorship(int rep) throws HL7Exception {
712 return (XON) super.insertRepetition(14, rep);
713 }
714
715
716
717
718
719
720
721
722
723 public XON insertPd114_PlaceOfWorship(int rep) throws HL7Exception {
724 return (XON) super.insertRepetition(14, rep);
725 }
726
727
728
729
730
731
732
733
734
735 public XON removePlaceOfWorship(int rep) throws HL7Exception {
736 return (XON) super.removeRepetition(14, rep);
737 }
738
739
740
741
742
743
744
745
746
747 public XON removePd114_PlaceOfWorship(int rep) throws HL7Exception {
748 return (XON) super.removeRepetition(14, rep);
749 }
750
751
752
753
754
755
756 public CWE[] getAdvanceDirectiveCode() {
757 CWE[] retVal = this.getTypedField(15, new CWE[0]);
758 return retVal;
759 }
760
761
762
763
764
765 public CWE[] getPd115_AdvanceDirectiveCode() {
766 CWE[] retVal = this.getTypedField(15, new CWE[0]);
767 return retVal;
768 }
769
770
771
772
773
774
775
776 public int getAdvanceDirectiveCodeReps() {
777 return this.getReps(15);
778 }
779
780
781
782
783
784
785
786
787 public CWE getAdvanceDirectiveCode(int rep) {
788 CWE retVal = this.getTypedField(15, rep);
789 return retVal;
790 }
791
792
793
794
795
796
797
798 public CWE getPd115_AdvanceDirectiveCode(int rep) {
799 CWE retVal = this.getTypedField(15, rep);
800 return retVal;
801 }
802
803
804
805
806
807
808 public int getPd115_AdvanceDirectiveCodeReps() {
809 return this.getReps(15);
810 }
811
812
813
814
815
816
817
818
819
820 public CWE insertAdvanceDirectiveCode(int rep) throws HL7Exception {
821 return (CWE) super.insertRepetition(15, rep);
822 }
823
824
825
826
827
828
829
830
831
832 public CWE insertPd115_AdvanceDirectiveCode(int rep) throws HL7Exception {
833 return (CWE) super.insertRepetition(15, rep);
834 }
835
836
837
838
839
840
841
842
843
844 public CWE removeAdvanceDirectiveCode(int rep) throws HL7Exception {
845 return (CWE) super.removeRepetition(15, rep);
846 }
847
848
849
850
851
852
853
854
855
856 public CWE removePd115_AdvanceDirectiveCode(int rep) throws HL7Exception {
857 return (CWE) super.removeRepetition(15, rep);
858 }
859
860
861
862
863
864
865
866
867 public CWE getImmunizationRegistryStatus() {
868 CWE retVal = this.getTypedField(16, 0);
869 return retVal;
870 }
871
872
873
874
875
876 public CWE getPd116_ImmunizationRegistryStatus() {
877 CWE retVal = this.getTypedField(16, 0);
878 return retVal;
879 }
880
881
882
883
884
885
886
887 public DT getImmunizationRegistryStatusEffectiveDate() {
888 DT retVal = this.getTypedField(17, 0);
889 return retVal;
890 }
891
892
893
894
895
896 public DT getPd117_ImmunizationRegistryStatusEffectiveDate() {
897 DT retVal = this.getTypedField(17, 0);
898 return retVal;
899 }
900
901
902
903
904
905
906
907 public DT getPublicityCodeEffectiveDate() {
908 DT retVal = this.getTypedField(18, 0);
909 return retVal;
910 }
911
912
913
914
915
916 public DT getPd118_PublicityCodeEffectiveDate() {
917 DT retVal = this.getTypedField(18, 0);
918 return retVal;
919 }
920
921
922
923
924
925
926
927 public CWE getMilitaryBranch() {
928 CWE retVal = this.getTypedField(19, 0);
929 return retVal;
930 }
931
932
933
934
935
936 public CWE getPd119_MilitaryBranch() {
937 CWE retVal = this.getTypedField(19, 0);
938 return retVal;
939 }
940
941
942
943
944
945
946
947 public CWE getMilitaryRankGrade() {
948 CWE retVal = this.getTypedField(20, 0);
949 return retVal;
950 }
951
952
953
954
955
956 public CWE getPd120_MilitaryRankGrade() {
957 CWE retVal = this.getTypedField(20, 0);
958 return retVal;
959 }
960
961
962
963
964
965
966
967 public CWE getMilitaryStatus() {
968 CWE retVal = this.getTypedField(21, 0);
969 return retVal;
970 }
971
972
973
974
975
976 public CWE getPd121_MilitaryStatus() {
977 CWE retVal = this.getTypedField(21, 0);
978 return retVal;
979 }
980
981
982
983
984
985
986
987 public DT getAdvanceDirectiveLastVerifiedDate() {
988 DT retVal = this.getTypedField(22, 0);
989 return retVal;
990 }
991
992
993
994
995
996 public DT getPd122_AdvanceDirectiveLastVerifiedDate() {
997 DT retVal = this.getTypedField(22, 0);
998 return retVal;
999 }
1000
1001
1002
1003
1004
1005
1006 protected Type createNewTypeWithoutReflection(int field) {
1007 switch (field) {
1008 case 0: return new CWE(getMessage());
1009 case 1: return new CWE(getMessage());
1010 case 2: return new XON(getMessage());
1011 case 3: return new NULLDT(getMessage());
1012 case 4: return new CWE(getMessage());
1013 case 5: return new CWE(getMessage());
1014 case 6: return new CWE(getMessage());
1015 case 7: return new CWE(getMessage());
1016 case 8: return new ID(getMessage(), new Integer( 136 ));
1017 case 9: return new CX(getMessage());
1018 case 10: return new CWE(getMessage());
1019 case 11: return new ID(getMessage(), new Integer( 136 ));
1020 case 12: return new DT(getMessage());
1021 case 13: return new XON(getMessage());
1022 case 14: return new CWE(getMessage());
1023 case 15: return new CWE(getMessage());
1024 case 16: return new DT(getMessage());
1025 case 17: return new DT(getMessage());
1026 case 18: return new CWE(getMessage());
1027 case 19: return new CWE(getMessage());
1028 case 20: return new CWE(getMessage());
1029 case 21: return new DT(getMessage());
1030 default: return null;
1031 }
1032 }
1033
1034
1035 }
1036