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