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 @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, 1, 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(310) }, "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, 2, new Object[]{ getMessage(), new Integer(136) }, "Separate Bill");
88 this.add(CX.class, false, 0, 2, new Object[]{ getMessage() }, "Duplicate Patient");
89 this.add(CE.class, false, 1, 1, new Object[]{ getMessage() }, "Publicity Indicator");
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
101
102 public IS getLivingDependency() {
103 IS retVal = this.getTypedField(1, 0);
104 return retVal;
105 }
106
107
108
109
110
111 public IS getPd11_LivingDependency() {
112 IS retVal = this.getTypedField(1, 0);
113 return retVal;
114 }
115
116
117
118
119
120
121
122 public IS getLivingArrangement() {
123 IS retVal = this.getTypedField(2, 0);
124 return retVal;
125 }
126
127
128
129
130
131 public IS getPd12_LivingArrangement() {
132 IS retVal = this.getTypedField(2, 0);
133 return retVal;
134 }
135
136
137
138
139
140 public XON[] getPatientPrimaryFacility() {
141 XON[] retVal = this.getTypedField(3, new XON[0]);
142 return retVal;
143 }
144
145
146
147
148
149 public XON[] getPd13_PatientPrimaryFacility() {
150 XON[] retVal = this.getTypedField(3, new XON[0]);
151 return retVal;
152 }
153
154
155
156
157
158
159
160 public int getPatientPrimaryFacilityReps() {
161 return this.getReps(3);
162 }
163
164
165
166
167
168
169
170
171 public XON getPatientPrimaryFacility(int rep) {
172 XON retVal = this.getTypedField(3, rep);
173 return retVal;
174 }
175
176
177
178
179
180
181
182 public XON getPd13_PatientPrimaryFacility(int rep) {
183 XON retVal = this.getTypedField(3, rep);
184 return retVal;
185 }
186
187
188
189
190
191
192 public int getPd13_PatientPrimaryFacilityReps() {
193 return this.getReps(3);
194 }
195
196
197
198
199
200
201
202
203
204 public XON insertPatientPrimaryFacility(int rep) throws HL7Exception {
205 return (XON) super.insertRepetition(3, rep);
206 }
207
208
209
210
211
212
213
214
215
216 public XON insertPd13_PatientPrimaryFacility(int rep) throws HL7Exception {
217 return (XON) super.insertRepetition(3, rep);
218 }
219
220
221
222
223
224
225
226
227
228 public XON removePatientPrimaryFacility(int rep) throws HL7Exception {
229 return (XON) super.removeRepetition(3, rep);
230 }
231
232
233
234
235
236
237
238
239
240 public XON removePd13_PatientPrimaryFacility(int rep) throws HL7Exception {
241 return (XON) super.removeRepetition(3, rep);
242 }
243
244
245
246
247
248
249 public XCN[] getPatientPrimaryCareProviderNameIDNo() {
250 XCN[] retVal = this.getTypedField(4, new XCN[0]);
251 return retVal;
252 }
253
254
255
256
257
258 public XCN[] getPd14_PatientPrimaryCareProviderNameIDNo() {
259 XCN[] retVal = this.getTypedField(4, new XCN[0]);
260 return retVal;
261 }
262
263
264
265
266
267
268
269 public int getPatientPrimaryCareProviderNameIDNoReps() {
270 return this.getReps(4);
271 }
272
273
274
275
276
277
278
279
280 public XCN getPatientPrimaryCareProviderNameIDNo(int rep) {
281 XCN retVal = this.getTypedField(4, rep);
282 return retVal;
283 }
284
285
286
287
288
289
290
291 public XCN getPd14_PatientPrimaryCareProviderNameIDNo(int rep) {
292 XCN retVal = this.getTypedField(4, rep);
293 return retVal;
294 }
295
296
297
298
299
300
301 public int getPd14_PatientPrimaryCareProviderNameIDNoReps() {
302 return this.getReps(4);
303 }
304
305
306
307
308
309
310
311
312
313 public XCN insertPatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
314 return (XCN) super.insertRepetition(4, rep);
315 }
316
317
318
319
320
321
322
323
324
325 public XCN insertPd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
326 return (XCN) super.insertRepetition(4, rep);
327 }
328
329
330
331
332
333
334
335
336
337 public XCN removePatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
338 return (XCN) super.removeRepetition(4, rep);
339 }
340
341
342
343
344
345
346
347
348
349 public XCN removePd14_PatientPrimaryCareProviderNameIDNo(int rep) throws HL7Exception {
350 return (XCN) super.removeRepetition(4, rep);
351 }
352
353
354
355
356
357
358
359
360 public IS getStudentIndicator() {
361 IS retVal = this.getTypedField(5, 0);
362 return retVal;
363 }
364
365
366
367
368
369 public IS getPd15_StudentIndicator() {
370 IS retVal = this.getTypedField(5, 0);
371 return retVal;
372 }
373
374
375
376
377
378
379
380 public IS getHandicap() {
381 IS retVal = this.getTypedField(6, 0);
382 return retVal;
383 }
384
385
386
387
388
389 public IS getPd16_Handicap() {
390 IS retVal = this.getTypedField(6, 0);
391 return retVal;
392 }
393
394
395
396
397
398
399
400 public IS getLivingWill() {
401 IS retVal = this.getTypedField(7, 0);
402 return retVal;
403 }
404
405
406
407
408
409 public IS getPd17_LivingWill() {
410 IS retVal = this.getTypedField(7, 0);
411 return retVal;
412 }
413
414
415
416
417
418
419
420 public IS getOrganDonor() {
421 IS retVal = this.getTypedField(8, 0);
422 return retVal;
423 }
424
425
426
427
428
429 public IS getPd18_OrganDonor() {
430 IS retVal = this.getTypedField(8, 0);
431 return retVal;
432 }
433
434
435
436
437
438
439
440 public ID getSeparateBill() {
441 ID retVal = this.getTypedField(9, 0);
442 return retVal;
443 }
444
445
446
447
448
449 public ID getPd19_SeparateBill() {
450 ID retVal = this.getTypedField(9, 0);
451 return retVal;
452 }
453
454
455
456
457
458 public CX[] getDuplicatePatient() {
459 CX[] retVal = this.getTypedField(10, new CX[0]);
460 return retVal;
461 }
462
463
464
465
466
467 public CX[] getPd110_DuplicatePatient() {
468 CX[] retVal = this.getTypedField(10, new CX[0]);
469 return retVal;
470 }
471
472
473
474
475
476
477
478 public int getDuplicatePatientReps() {
479 return this.getReps(10);
480 }
481
482
483
484
485
486
487
488
489 public CX getDuplicatePatient(int rep) {
490 CX retVal = this.getTypedField(10, rep);
491 return retVal;
492 }
493
494
495
496
497
498
499
500 public CX getPd110_DuplicatePatient(int rep) {
501 CX retVal = this.getTypedField(10, rep);
502 return retVal;
503 }
504
505
506
507
508
509
510 public int getPd110_DuplicatePatientReps() {
511 return this.getReps(10);
512 }
513
514
515
516
517
518
519
520
521
522 public CX insertDuplicatePatient(int rep) throws HL7Exception {
523 return (CX) super.insertRepetition(10, rep);
524 }
525
526
527
528
529
530
531
532
533
534 public CX insertPd110_DuplicatePatient(int rep) throws HL7Exception {
535 return (CX) super.insertRepetition(10, rep);
536 }
537
538
539
540
541
542
543
544
545
546 public CX removeDuplicatePatient(int rep) throws HL7Exception {
547 return (CX) super.removeRepetition(10, rep);
548 }
549
550
551
552
553
554
555
556
557
558 public CX removePd110_DuplicatePatient(int rep) throws HL7Exception {
559 return (CX) super.removeRepetition(10, rep);
560 }
561
562
563
564
565
566
567
568
569 public CE getPublicityIndicator() {
570 CE retVal = this.getTypedField(11, 0);
571 return retVal;
572 }
573
574
575
576
577
578 public CE getPd111_PublicityIndicator() {
579 CE retVal = this.getTypedField(11, 0);
580 return retVal;
581 }
582
583
584
585
586
587
588
589 public ID getProtectionIndicator() {
590 ID retVal = this.getTypedField(12, 0);
591 return retVal;
592 }
593
594
595
596
597
598 public ID getPd112_ProtectionIndicator() {
599 ID retVal = this.getTypedField(12, 0);
600 return retVal;
601 }
602
603
604
605
606
607
608 protected Type createNewTypeWithoutReflection(int field) {
609 switch (field) {
610 case 0: return new IS(getMessage(), new Integer( 223 ));
611 case 1: return new IS(getMessage(), new Integer( 220 ));
612 case 2: return new XON(getMessage());
613 case 3: return new XCN(getMessage());
614 case 4: return new IS(getMessage(), new Integer( 231 ));
615 case 5: return new IS(getMessage(), new Integer( 310 ));
616 case 6: return new IS(getMessage(), new Integer( 315 ));
617 case 7: return new IS(getMessage(), new Integer( 316 ));
618 case 8: return new ID(getMessage(), new Integer( 136 ));
619 case 9: return new CX(getMessage());
620 case 10: return new CE(getMessage());
621 case 11: return new ID(getMessage(), new Integer( 136 ));
622 default: return null;
623 }
624 }
625
626
627 }
628