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