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.v231.segment;
35
36
37 import ca.uhn.hl7v2.model.v231.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 @SuppressWarnings("unused")
70 public class PDC extends AbstractSegment {
71
72
73
74
75 public PDC(Group parent, ModelClassFactory factory) {
76 super(parent, factory);
77 init(factory);
78 }
79
80 private void init(ModelClassFactory factory) {
81 try {
82 this.add(XON.class, true, 0, 80, new Object[]{ getMessage() }, "Manufacturer/Distributor");
83 this.add(CE.class, true, 1, 60, new Object[]{ getMessage() }, "Country");
84 this.add(ST.class, true, 1, 60, new Object[]{ getMessage() }, "Brand Name");
85 this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "Device Family Name");
86 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Generic Name");
87 this.add(ST.class, false, 0, 60, new Object[]{ getMessage() }, "Model Identifier");
88 this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "Catalogue Identifier");
89 this.add(ST.class, false, 0, 60, new Object[]{ getMessage() }, "Other Identifier");
90 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Product Code");
91 this.add(ID.class, false, 1, 4, new Object[]{ getMessage(), new Integer(330) }, "Marketing Basis");
92 this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "Marketing Approval ID");
93 this.add(CQ.class, false, 1, 12, new Object[]{ getMessage() }, "Labeled Shelf Life");
94 this.add(CQ.class, false, 1, 12, new Object[]{ getMessage() }, "Expected Shelf Life");
95 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date First Marketed");
96 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date Last Marketed");
97 } catch(HL7Exception e) {
98 log.error("Unexpected error creating PDC - this is probably a bug in the source code generator.", e);
99 }
100 }
101
102
103
104
105
106 public XON[] getManufacturerDistributor() {
107 XON[] retVal = this.getTypedField(1, new XON[0]);
108 return retVal;
109 }
110
111
112
113
114
115 public XON[] getPdc1_ManufacturerDistributor() {
116 XON[] retVal = this.getTypedField(1, new XON[0]);
117 return retVal;
118 }
119
120
121
122
123
124
125
126 public int getManufacturerDistributorReps() {
127 return this.getReps(1);
128 }
129
130
131
132
133
134
135
136
137 public XON getManufacturerDistributor(int rep) {
138 XON retVal = this.getTypedField(1, rep);
139 return retVal;
140 }
141
142
143
144
145
146
147
148 public XON getPdc1_ManufacturerDistributor(int rep) {
149 XON retVal = this.getTypedField(1, rep);
150 return retVal;
151 }
152
153
154
155
156
157
158 public int getPdc1_ManufacturerDistributorReps() {
159 return this.getReps(1);
160 }
161
162
163
164
165
166
167
168
169
170 public XON insertManufacturerDistributor(int rep) throws HL7Exception {
171 return (XON) super.insertRepetition(1, rep);
172 }
173
174
175
176
177
178
179
180
181
182 public XON insertPdc1_ManufacturerDistributor(int rep) throws HL7Exception {
183 return (XON) super.insertRepetition(1, rep);
184 }
185
186
187
188
189
190
191
192
193
194 public XON removeManufacturerDistributor(int rep) throws HL7Exception {
195 return (XON) super.removeRepetition(1, rep);
196 }
197
198
199
200
201
202
203
204
205
206 public XON removePdc1_ManufacturerDistributor(int rep) throws HL7Exception {
207 return (XON) super.removeRepetition(1, rep);
208 }
209
210
211
212
213
214
215
216
217 public CE getCountry() {
218 CE retVal = this.getTypedField(2, 0);
219 return retVal;
220 }
221
222
223
224
225
226 public CE getPdc2_Country() {
227 CE retVal = this.getTypedField(2, 0);
228 return retVal;
229 }
230
231
232
233
234
235
236
237 public ST getBrandName() {
238 ST retVal = this.getTypedField(3, 0);
239 return retVal;
240 }
241
242
243
244
245
246 public ST getPdc3_BrandName() {
247 ST retVal = this.getTypedField(3, 0);
248 return retVal;
249 }
250
251
252
253
254
255
256
257 public ST getDeviceFamilyName() {
258 ST retVal = this.getTypedField(4, 0);
259 return retVal;
260 }
261
262
263
264
265
266 public ST getPdc4_DeviceFamilyName() {
267 ST retVal = this.getTypedField(4, 0);
268 return retVal;
269 }
270
271
272
273
274
275
276
277 public CE getGenericName() {
278 CE retVal = this.getTypedField(5, 0);
279 return retVal;
280 }
281
282
283
284
285
286 public CE getPdc5_GenericName() {
287 CE retVal = this.getTypedField(5, 0);
288 return retVal;
289 }
290
291
292
293
294
295 public ST[] getModelIdentifier() {
296 ST[] retVal = this.getTypedField(6, new ST[0]);
297 return retVal;
298 }
299
300
301
302
303
304 public ST[] getPdc6_ModelIdentifier() {
305 ST[] retVal = this.getTypedField(6, new ST[0]);
306 return retVal;
307 }
308
309
310
311
312
313
314
315 public int getModelIdentifierReps() {
316 return this.getReps(6);
317 }
318
319
320
321
322
323
324
325
326 public ST getModelIdentifier(int rep) {
327 ST retVal = this.getTypedField(6, rep);
328 return retVal;
329 }
330
331
332
333
334
335
336
337 public ST getPdc6_ModelIdentifier(int rep) {
338 ST retVal = this.getTypedField(6, rep);
339 return retVal;
340 }
341
342
343
344
345
346
347 public int getPdc6_ModelIdentifierReps() {
348 return this.getReps(6);
349 }
350
351
352
353
354
355
356
357
358
359 public ST insertModelIdentifier(int rep) throws HL7Exception {
360 return (ST) super.insertRepetition(6, rep);
361 }
362
363
364
365
366
367
368
369
370
371 public ST insertPdc6_ModelIdentifier(int rep) throws HL7Exception {
372 return (ST) super.insertRepetition(6, rep);
373 }
374
375
376
377
378
379
380
381
382
383 public ST removeModelIdentifier(int rep) throws HL7Exception {
384 return (ST) super.removeRepetition(6, rep);
385 }
386
387
388
389
390
391
392
393
394
395 public ST removePdc6_ModelIdentifier(int rep) throws HL7Exception {
396 return (ST) super.removeRepetition(6, rep);
397 }
398
399
400
401
402
403
404
405
406 public ST getCatalogueIdentifier() {
407 ST retVal = this.getTypedField(7, 0);
408 return retVal;
409 }
410
411
412
413
414
415 public ST getPdc7_CatalogueIdentifier() {
416 ST retVal = this.getTypedField(7, 0);
417 return retVal;
418 }
419
420
421
422
423
424 public ST[] getOtherIdentifier() {
425 ST[] retVal = this.getTypedField(8, new ST[0]);
426 return retVal;
427 }
428
429
430
431
432
433 public ST[] getPdc8_OtherIdentifier() {
434 ST[] retVal = this.getTypedField(8, new ST[0]);
435 return retVal;
436 }
437
438
439
440
441
442
443
444 public int getOtherIdentifierReps() {
445 return this.getReps(8);
446 }
447
448
449
450
451
452
453
454
455 public ST getOtherIdentifier(int rep) {
456 ST retVal = this.getTypedField(8, rep);
457 return retVal;
458 }
459
460
461
462
463
464
465
466 public ST getPdc8_OtherIdentifier(int rep) {
467 ST retVal = this.getTypedField(8, rep);
468 return retVal;
469 }
470
471
472
473
474
475
476 public int getPdc8_OtherIdentifierReps() {
477 return this.getReps(8);
478 }
479
480
481
482
483
484
485
486
487
488 public ST insertOtherIdentifier(int rep) throws HL7Exception {
489 return (ST) super.insertRepetition(8, rep);
490 }
491
492
493
494
495
496
497
498
499
500 public ST insertPdc8_OtherIdentifier(int rep) throws HL7Exception {
501 return (ST) super.insertRepetition(8, rep);
502 }
503
504
505
506
507
508
509
510
511
512 public ST removeOtherIdentifier(int rep) throws HL7Exception {
513 return (ST) super.removeRepetition(8, rep);
514 }
515
516
517
518
519
520
521
522
523
524 public ST removePdc8_OtherIdentifier(int rep) throws HL7Exception {
525 return (ST) super.removeRepetition(8, rep);
526 }
527
528
529
530
531
532
533
534
535 public CE getProductCode() {
536 CE retVal = this.getTypedField(9, 0);
537 return retVal;
538 }
539
540
541
542
543
544 public CE getPdc9_ProductCode() {
545 CE retVal = this.getTypedField(9, 0);
546 return retVal;
547 }
548
549
550
551
552
553
554
555 public ID getMarketingBasis() {
556 ID retVal = this.getTypedField(10, 0);
557 return retVal;
558 }
559
560
561
562
563
564 public ID getPdc10_MarketingBasis() {
565 ID retVal = this.getTypedField(10, 0);
566 return retVal;
567 }
568
569
570
571
572
573
574
575 public ST getMarketingApprovalID() {
576 ST retVal = this.getTypedField(11, 0);
577 return retVal;
578 }
579
580
581
582
583
584 public ST getPdc11_MarketingApprovalID() {
585 ST retVal = this.getTypedField(11, 0);
586 return retVal;
587 }
588
589
590
591
592
593
594
595 public CQ getLabeledShelfLife() {
596 CQ retVal = this.getTypedField(12, 0);
597 return retVal;
598 }
599
600
601
602
603
604 public CQ getPdc12_LabeledShelfLife() {
605 CQ retVal = this.getTypedField(12, 0);
606 return retVal;
607 }
608
609
610
611
612
613
614
615 public CQ getExpectedShelfLife() {
616 CQ retVal = this.getTypedField(13, 0);
617 return retVal;
618 }
619
620
621
622
623
624 public CQ getPdc13_ExpectedShelfLife() {
625 CQ retVal = this.getTypedField(13, 0);
626 return retVal;
627 }
628
629
630
631
632
633
634
635 public TS getDateFirstMarketed() {
636 TS retVal = this.getTypedField(14, 0);
637 return retVal;
638 }
639
640
641
642
643
644 public TS getPdc14_DateFirstMarketed() {
645 TS retVal = this.getTypedField(14, 0);
646 return retVal;
647 }
648
649
650
651
652
653
654
655 public TS getDateLastMarketed() {
656 TS retVal = this.getTypedField(15, 0);
657 return retVal;
658 }
659
660
661
662
663
664 public TS getPdc15_DateLastMarketed() {
665 TS retVal = this.getTypedField(15, 0);
666 return retVal;
667 }
668
669
670
671
672
673
674 protected Type createNewTypeWithoutReflection(int field) {
675 switch (field) {
676 case 0: return new XON(getMessage());
677 case 1: return new CE(getMessage());
678 case 2: return new ST(getMessage());
679 case 3: return new ST(getMessage());
680 case 4: return new CE(getMessage());
681 case 5: return new ST(getMessage());
682 case 6: return new ST(getMessage());
683 case 7: return new ST(getMessage());
684 case 8: return new CE(getMessage());
685 case 9: return new ID(getMessage(), new Integer( 330 ));
686 case 10: return new ST(getMessage());
687 case 11: return new CQ(getMessage());
688 case 12: return new CQ(getMessage());
689 case 13: return new TS(getMessage());
690 case 14: return new TS(getMessage());
691 default: return null;
692 }
693 }
694
695
696 }
697