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