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.v26.segment;
35
36
37 import ca.uhn.hl7v2.model.v26.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(IS.class, false, 0, 2, new Object[]{ getMessage(), new Integer(223) }, "Living Dependency");
90 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(220) }, "Living Arrangement");
91 this.add(XON.class, false, 0, 250, new Object[]{ getMessage() }, "Patient Primary Facility");
92 this.add(XCN.class, false, 0, 0, new Object[]{ getMessage() }, "Patient Primary Care Provider Name & ID No.");
93 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(231) }, "Student Indicator");
94 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(295) }, "Handicap");
95 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(315) }, "Living Will Code");
96 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(316) }, "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, 250, new Object[]{ getMessage() }, "Duplicate Patient");
99 this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Publicity Code");
100 this.add(ID.class, false, 1, 0, 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, 250, new Object[]{ getMessage() }, "Place of Worship");
103 this.add(CWE.class, false, 0, 705, new Object[]{ getMessage() }, "Advance Directive Code");
104 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(441) }, "Immunization Registry Status");
105 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Immunization Registry Status Effective Date");
106 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Publicity Code Effective Date");
107 this.add(IS.class, false, 1, 5, new Object[]{ getMessage(), new Integer(140) }, "Military Branch");
108 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(141) }, "Military Rank/Grade");
109 this.add(IS.class, false, 1, 3, new Object[]{ getMessage(), new Integer(142) }, "Military Status");
110 this.add(DT.class, false, 1, 8, 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 IS[] getLivingDependency() {
121 IS[] retVal = this.getTypedField(1, new IS[0]);
122 return retVal;
123 }
124
125
126
127
128
129 public IS[] getPd11_LivingDependency() {
130 IS[] retVal = this.getTypedField(1, new IS[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 IS getLivingDependency(int rep) {
152 IS retVal = this.getTypedField(1, rep);
153 return retVal;
154 }
155
156
157
158
159
160
161
162 public IS getPd11_LivingDependency(int rep) {
163 IS 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 IS insertLivingDependency(int rep) throws HL7Exception {
185 return (IS) super.insertRepetition(1, rep);
186 }
187
188
189
190
191
192
193
194
195
196 public IS insertPd11_LivingDependency(int rep) throws HL7Exception {
197 return (IS) super.insertRepetition(1, rep);
198 }
199
200
201
202
203
204
205
206
207
208 public IS removeLivingDependency(int rep) throws HL7Exception {
209 return (IS) super.removeRepetition(1, rep);
210 }
211
212
213
214
215
216
217
218
219
220 public IS removePd11_LivingDependency(int rep) throws HL7Exception {
221 return (IS) super.removeRepetition(1, rep);
222 }
223
224
225
226
227
228
229
230
231 public IS getLivingArrangement() {
232 IS retVal = this.getTypedField(2, 0);
233 return retVal;
234 }
235
236
237
238
239
240 public IS getPd12_LivingArrangement() {
241 IS 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 public XCN[] getPatientPrimaryCareProviderNameIDNo() {
359 XCN[] retVal = this.getTypedField(4, new XCN[0]);
360 return retVal;
361 }
362
363
364
365
366
367 public XCN[] getPd14_PatientPrimaryCareProviderNameIDNo() {
368 XCN[] retVal = this.getTypedField(4, new XCN[0]);
369 return retVal;
370 }
371
372
373
374
375
376
377
378 public int getPatientPrimaryCareProviderNameIDNoReps() {
379 return this.getReps(4);
380 }
381
382
383
384
385
386
387
388
389 public XCN getPatientPrimaryCareProviderNameIDNo(int rep) {
390 XCN retVal = this.getTypedField(4, rep);
391 return retVal;
392 }
393
394
395
396
397
398
399
400 public XCN getPd14_PatientPrimaryCareProviderNameIDNo(int rep) {
401 XCN retVal = this.getTypedField(4, rep);
402 return retVal;
403 }
404
405
406
407
408
409
410 public int getPd14_PatientPrimaryCareProviderNameIDNoReps() {
411 return this.getReps(4);
412 }
413
414
415
416
417
418
419
420
421
422 public XCN insertPatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
423 return (XCN) super.insertRepetition(4, rep);
424 }
425
426
427
428
429
430
431
432
433
434 public XCN insertPd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
435 return (XCN) super.insertRepetition(4, rep);
436 }
437
438
439
440
441
442
443
444
445
446 public XCN removePatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
447 return (XCN) super.removeRepetition(4, rep);
448 }
449
450
451
452
453
454
455
456
457
458 public XCN removePd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
459 return (XCN) super.removeRepetition(4, rep);
460 }
461
462
463
464
465
466
467
468
469 public IS getStudentIndicator() {
470 IS retVal = this.getTypedField(5, 0);
471 return retVal;
472 }
473
474
475
476
477
478 public IS getPd15_StudentIndicator() {
479 IS retVal = this.getTypedField(5, 0);
480 return retVal;
481 }
482
483
484
485
486
487
488
489 public IS getHandicap() {
490 IS retVal = this.getTypedField(6, 0);
491 return retVal;
492 }
493
494
495
496
497
498 public IS getPd16_Handicap() {
499 IS retVal = this.getTypedField(6, 0);
500 return retVal;
501 }
502
503
504
505
506
507
508
509 public IS getLivingWillCode() {
510 IS retVal = this.getTypedField(7, 0);
511 return retVal;
512 }
513
514
515
516
517
518 public IS getPd17_LivingWillCode() {
519 IS retVal = this.getTypedField(7, 0);
520 return retVal;
521 }
522
523
524
525
526
527
528
529 public IS getOrganDonorCode() {
530 IS retVal = this.getTypedField(8, 0);
531 return retVal;
532 }
533
534
535
536
537
538 public IS getPd18_OrganDonorCode() {
539 IS retVal = this.getTypedField(8, 0);
540 return retVal;
541 }
542
543
544
545
546
547
548
549 public ID getSeparateBill() {
550 ID retVal = this.getTypedField(9, 0);
551 return retVal;
552 }
553
554
555
556
557
558 public ID getPd19_SeparateBill() {
559 ID retVal = this.getTypedField(9, 0);
560 return retVal;
561 }
562
563
564
565
566
567 public CX[] getDuplicatePatient() {
568 CX[] retVal = this.getTypedField(10, new CX[0]);
569 return retVal;
570 }
571
572
573
574
575
576 public CX[] getPd110_DuplicatePatient() {
577 CX[] retVal = this.getTypedField(10, new CX[0]);
578 return retVal;
579 }
580
581
582
583
584
585
586
587 public int getDuplicatePatientReps() {
588 return this.getReps(10);
589 }
590
591
592
593
594
595
596
597
598 public CX getDuplicatePatient(int rep) {
599 CX retVal = this.getTypedField(10, rep);
600 return retVal;
601 }
602
603
604
605
606
607
608
609 public CX getPd110_DuplicatePatient(int rep) {
610 CX retVal = this.getTypedField(10, rep);
611 return retVal;
612 }
613
614
615
616
617
618
619 public int getPd110_DuplicatePatientReps() {
620 return this.getReps(10);
621 }
622
623
624
625
626
627
628
629
630
631 public CX insertDuplicatePatient(int rep) throws HL7Exception {
632 return (CX) super.insertRepetition(10, rep);
633 }
634
635
636
637
638
639
640
641
642
643 public CX insertPd110_DuplicatePatient(int rep) throws HL7Exception {
644 return (CX) super.insertRepetition(10, rep);
645 }
646
647
648
649
650
651
652
653
654
655 public CX removeDuplicatePatient(int rep) throws HL7Exception {
656 return (CX) super.removeRepetition(10, rep);
657 }
658
659
660
661
662
663
664
665
666
667 public CX removePd110_DuplicatePatient(int rep) throws HL7Exception {
668 return (CX) super.removeRepetition(10, rep);
669 }
670
671
672
673
674
675
676
677
678 public CWE getPublicityCode() {
679 CWE retVal = this.getTypedField(11, 0);
680 return retVal;
681 }
682
683
684
685
686
687 public CWE getPd111_PublicityCode() {
688 CWE retVal = this.getTypedField(11, 0);
689 return retVal;
690 }
691
692
693
694
695
696
697
698 public ID getProtectionIndicator() {
699 ID retVal = this.getTypedField(12, 0);
700 return retVal;
701 }
702
703
704
705
706
707 public ID getPd112_ProtectionIndicator() {
708 ID retVal = this.getTypedField(12, 0);
709 return retVal;
710 }
711
712
713
714
715
716
717
718 public DT getProtectionIndicatorEffectiveDate() {
719 DT retVal = this.getTypedField(13, 0);
720 return retVal;
721 }
722
723
724
725
726
727 public DT getPd113_ProtectionIndicatorEffectiveDate() {
728 DT retVal = this.getTypedField(13, 0);
729 return retVal;
730 }
731
732
733
734
735
736 public XON[] getPlaceOfWorship() {
737 XON[] retVal = this.getTypedField(14, new XON[0]);
738 return retVal;
739 }
740
741
742
743
744
745 public XON[] getPd114_PlaceOfWorship() {
746 XON[] retVal = this.getTypedField(14, new XON[0]);
747 return retVal;
748 }
749
750
751
752
753
754
755
756 public int getPlaceOfWorshipReps() {
757 return this.getReps(14);
758 }
759
760
761
762
763
764
765
766
767 public XON getPlaceOfWorship(int rep) {
768 XON retVal = this.getTypedField(14, rep);
769 return retVal;
770 }
771
772
773
774
775
776
777
778 public XON getPd114_PlaceOfWorship(int rep) {
779 XON retVal = this.getTypedField(14, rep);
780 return retVal;
781 }
782
783
784
785
786
787
788 public int getPd114_PlaceOfWorshipReps() {
789 return this.getReps(14);
790 }
791
792
793
794
795
796
797
798
799
800 public XON insertPlaceOfWorship(int rep) throws HL7Exception {
801 return (XON) super.insertRepetition(14, rep);
802 }
803
804
805
806
807
808
809
810
811
812 public XON insertPd114_PlaceOfWorship(int rep) throws HL7Exception {
813 return (XON) super.insertRepetition(14, rep);
814 }
815
816
817
818
819
820
821
822
823
824 public XON removePlaceOfWorship(int rep) throws HL7Exception {
825 return (XON) super.removeRepetition(14, rep);
826 }
827
828
829
830
831
832
833
834
835
836 public XON removePd114_PlaceOfWorship(int rep) throws HL7Exception {
837 return (XON) super.removeRepetition(14, rep);
838 }
839
840
841
842
843
844
845 public CWE[] getAdvanceDirectiveCode() {
846 CWE[] retVal = this.getTypedField(15, new CWE[0]);
847 return retVal;
848 }
849
850
851
852
853
854 public CWE[] getPd115_AdvanceDirectiveCode() {
855 CWE[] retVal = this.getTypedField(15, new CWE[0]);
856 return retVal;
857 }
858
859
860
861
862
863
864
865 public int getAdvanceDirectiveCodeReps() {
866 return this.getReps(15);
867 }
868
869
870
871
872
873
874
875
876 public CWE getAdvanceDirectiveCode(int rep) {
877 CWE retVal = this.getTypedField(15, rep);
878 return retVal;
879 }
880
881
882
883
884
885
886
887 public CWE getPd115_AdvanceDirectiveCode(int rep) {
888 CWE retVal = this.getTypedField(15, rep);
889 return retVal;
890 }
891
892
893
894
895
896
897 public int getPd115_AdvanceDirectiveCodeReps() {
898 return this.getReps(15);
899 }
900
901
902
903
904
905
906
907
908
909 public CWE insertAdvanceDirectiveCode(int rep) throws HL7Exception {
910 return (CWE) super.insertRepetition(15, rep);
911 }
912
913
914
915
916
917
918
919
920
921 public CWE insertPd115_AdvanceDirectiveCode(int rep) throws HL7Exception {
922 return (CWE) super.insertRepetition(15, rep);
923 }
924
925
926
927
928
929
930
931
932
933 public CWE removeAdvanceDirectiveCode(int rep) throws HL7Exception {
934 return (CWE) super.removeRepetition(15, rep);
935 }
936
937
938
939
940
941
942
943
944
945 public CWE removePd115_AdvanceDirectiveCode(int rep) throws HL7Exception {
946 return (CWE) super.removeRepetition(15, rep);
947 }
948
949
950
951
952
953
954
955
956 public IS getImmunizationRegistryStatus() {
957 IS retVal = this.getTypedField(16, 0);
958 return retVal;
959 }
960
961
962
963
964
965 public IS getPd116_ImmunizationRegistryStatus() {
966 IS retVal = this.getTypedField(16, 0);
967 return retVal;
968 }
969
970
971
972
973
974
975
976 public DT getImmunizationRegistryStatusEffectiveDate() {
977 DT retVal = this.getTypedField(17, 0);
978 return retVal;
979 }
980
981
982
983
984
985 public DT getPd117_ImmunizationRegistryStatusEffectiveDate() {
986 DT retVal = this.getTypedField(17, 0);
987 return retVal;
988 }
989
990
991
992
993
994
995
996 public DT getPublicityCodeEffectiveDate() {
997 DT retVal = this.getTypedField(18, 0);
998 return retVal;
999 }
1000
1001
1002
1003
1004
1005 public DT getPd118_PublicityCodeEffectiveDate() {
1006 DT retVal = this.getTypedField(18, 0);
1007 return retVal;
1008 }
1009
1010
1011
1012
1013
1014
1015
1016 public IS getMilitaryBranch() {
1017 IS retVal = this.getTypedField(19, 0);
1018 return retVal;
1019 }
1020
1021
1022
1023
1024
1025 public IS getPd119_MilitaryBranch() {
1026 IS retVal = this.getTypedField(19, 0);
1027 return retVal;
1028 }
1029
1030
1031
1032
1033
1034
1035
1036 public IS getMilitaryRankGrade() {
1037 IS retVal = this.getTypedField(20, 0);
1038 return retVal;
1039 }
1040
1041
1042
1043
1044
1045 public IS getPd120_MilitaryRankGrade() {
1046 IS retVal = this.getTypedField(20, 0);
1047 return retVal;
1048 }
1049
1050
1051
1052
1053
1054
1055
1056 public IS getMilitaryStatus() {
1057 IS retVal = this.getTypedField(21, 0);
1058 return retVal;
1059 }
1060
1061
1062
1063
1064
1065 public IS getPd121_MilitaryStatus() {
1066 IS retVal = this.getTypedField(21, 0);
1067 return retVal;
1068 }
1069
1070
1071
1072
1073
1074
1075
1076 public DT getAdvanceDirectiveLastVerifiedDate() {
1077 DT retVal = this.getTypedField(22, 0);
1078 return retVal;
1079 }
1080
1081
1082
1083
1084
1085 public DT getPd122_AdvanceDirectiveLastVerifiedDate() {
1086 DT retVal = this.getTypedField(22, 0);
1087 return retVal;
1088 }
1089
1090
1091
1092
1093
1094
1095 protected Type createNewTypeWithoutReflection(int field) {
1096 switch (field) {
1097 case 0: return new IS(getMessage(), new Integer( 223 ));
1098 case 1: return new IS(getMessage(), new Integer( 220 ));
1099 case 2: return new XON(getMessage());
1100 case 3: return new XCN(getMessage());
1101 case 4: return new IS(getMessage(), new Integer( 231 ));
1102 case 5: return new IS(getMessage(), new Integer( 295 ));
1103 case 6: return new IS(getMessage(), new Integer( 315 ));
1104 case 7: return new IS(getMessage(), new Integer( 316 ));
1105 case 8: return new ID(getMessage(), new Integer( 136 ));
1106 case 9: return new CX(getMessage());
1107 case 10: return new CWE(getMessage());
1108 case 11: return new ID(getMessage(), new Integer( 136 ));
1109 case 12: return new DT(getMessage());
1110 case 13: return new XON(getMessage());
1111 case 14: return new CWE(getMessage());
1112 case 15: return new IS(getMessage(), new Integer( 441 ));
1113 case 16: return new DT(getMessage());
1114 case 17: return new DT(getMessage());
1115 case 18: return new IS(getMessage(), new Integer( 140 ));
1116 case 19: return new IS(getMessage(), new Integer( 141 ));
1117 case 20: return new IS(getMessage(), new Integer( 142 ));
1118 case 21: return new DT(getMessage());
1119 default: return null;
1120 }
1121 }
1122
1123
1124 }
1125