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.v25.segment;
35
36
37 import ca.uhn.hl7v2.model.v25.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 @SuppressWarnings("unused")
69 public class BPO extends AbstractSegment {
70
71
72
73
74 public BPO(Group parent, ModelClassFactory factory) {
75 super(parent, factory);
76 init(factory);
77 }
78
79 private void init(ModelClassFactory factory) {
80 try {
81 this.add(SI.class, true, 1, 4, new Object[]{ getMessage() }, "Set ID _ BPO");
82 this.add(CWE.class, true, 1, 250, new Object[]{ getMessage() }, "BP Universal Service ID");
83 this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "BP Processing Requirements");
84 this.add(NM.class, true, 1, 5, new Object[]{ getMessage() }, "BP Quantity");
85 this.add(NM.class, false, 1, 5, new Object[]{ getMessage() }, "BP Amount");
86 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "BP Units");
87 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "BP Intended Use Date/Time");
88 this.add(PL.class, false, 1, 80, new Object[]{ getMessage() }, "BP Intended Dispense From Location");
89 this.add(XAD.class, false, 1, 250, new Object[]{ getMessage() }, "BP Intended Dispense From Address");
90 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "BP Requested Dispense Date/Time");
91 this.add(PL.class, false, 1, 80, new Object[]{ getMessage() }, "BP Requested Dispense To Location");
92 this.add(XAD.class, false, 1, 250, new Object[]{ getMessage() }, "BP Requested Dispense To Address");
93 this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "BP Indication for Use");
94 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "BP Informed Consent Indicator");
95 } catch(HL7Exception e) {
96 log.error("Unexpected error creating BPO - this is probably a bug in the source code generator.", e);
97 }
98 }
99
100
101
102
103
104
105
106 public SI getSetIDBPO() {
107 SI retVal = this.getTypedField(1, 0);
108 return retVal;
109 }
110
111
112
113
114
115 public SI getBpo1_SetIDBPO() {
116 SI retVal = this.getTypedField(1, 0);
117 return retVal;
118 }
119
120
121
122
123
124
125
126 public CWE getBPUniversalServiceID() {
127 CWE retVal = this.getTypedField(2, 0);
128 return retVal;
129 }
130
131
132
133
134
135 public CWE getBpo2_BPUniversalServiceID() {
136 CWE retVal = this.getTypedField(2, 0);
137 return retVal;
138 }
139
140
141
142
143
144 public CWE[] getBPProcessingRequirements() {
145 CWE[] retVal = this.getTypedField(3, new CWE[0]);
146 return retVal;
147 }
148
149
150
151
152
153 public CWE[] getBpo3_BPProcessingRequirements() {
154 CWE[] retVal = this.getTypedField(3, new CWE[0]);
155 return retVal;
156 }
157
158
159
160
161
162
163
164 public int getBPProcessingRequirementsReps() {
165 return this.getReps(3);
166 }
167
168
169
170
171
172
173
174
175 public CWE getBPProcessingRequirements(int rep) {
176 CWE retVal = this.getTypedField(3, rep);
177 return retVal;
178 }
179
180
181
182
183
184
185
186 public CWE getBpo3_BPProcessingRequirements(int rep) {
187 CWE retVal = this.getTypedField(3, rep);
188 return retVal;
189 }
190
191
192
193
194
195
196 public int getBpo3_BPProcessingRequirementsReps() {
197 return this.getReps(3);
198 }
199
200
201
202
203
204
205
206
207
208 public CWE insertBPProcessingRequirements(int rep) throws HL7Exception {
209 return (CWE) super.insertRepetition(3, rep);
210 }
211
212
213
214
215
216
217
218
219
220 public CWE insertBpo3_BPProcessingRequirements(int rep) throws HL7Exception {
221 return (CWE) super.insertRepetition(3, rep);
222 }
223
224
225
226
227
228
229
230
231
232 public CWE removeBPProcessingRequirements(int rep) throws HL7Exception {
233 return (CWE) super.removeRepetition(3, rep);
234 }
235
236
237
238
239
240
241
242
243
244 public CWE removeBpo3_BPProcessingRequirements(int rep) throws HL7Exception {
245 return (CWE) super.removeRepetition(3, rep);
246 }
247
248
249
250
251
252
253
254
255 public NM getBPQuantity() {
256 NM retVal = this.getTypedField(4, 0);
257 return retVal;
258 }
259
260
261
262
263
264 public NM getBpo4_BPQuantity() {
265 NM retVal = this.getTypedField(4, 0);
266 return retVal;
267 }
268
269
270
271
272
273
274
275 public NM getBPAmount() {
276 NM retVal = this.getTypedField(5, 0);
277 return retVal;
278 }
279
280
281
282
283
284 public NM getBpo5_BPAmount() {
285 NM retVal = this.getTypedField(5, 0);
286 return retVal;
287 }
288
289
290
291
292
293
294
295 public CE getBPUnits() {
296 CE retVal = this.getTypedField(6, 0);
297 return retVal;
298 }
299
300
301
302
303
304 public CE getBpo6_BPUnits() {
305 CE retVal = this.getTypedField(6, 0);
306 return retVal;
307 }
308
309
310
311
312
313
314
315 public TS getBPIntendedUseDateTime() {
316 TS retVal = this.getTypedField(7, 0);
317 return retVal;
318 }
319
320
321
322
323
324 public TS getBpo7_BPIntendedUseDateTime() {
325 TS retVal = this.getTypedField(7, 0);
326 return retVal;
327 }
328
329
330
331
332
333
334
335 public PL getBPIntendedDispenseFromLocation() {
336 PL retVal = this.getTypedField(8, 0);
337 return retVal;
338 }
339
340
341
342
343
344 public PL getBpo8_BPIntendedDispenseFromLocation() {
345 PL retVal = this.getTypedField(8, 0);
346 return retVal;
347 }
348
349
350
351
352
353
354
355 public XAD getBPIntendedDispenseFromAddress() {
356 XAD retVal = this.getTypedField(9, 0);
357 return retVal;
358 }
359
360
361
362
363
364 public XAD getBpo9_BPIntendedDispenseFromAddress() {
365 XAD retVal = this.getTypedField(9, 0);
366 return retVal;
367 }
368
369
370
371
372
373
374
375 public TS getBPRequestedDispenseDateTime() {
376 TS retVal = this.getTypedField(10, 0);
377 return retVal;
378 }
379
380
381
382
383
384 public TS getBpo10_BPRequestedDispenseDateTime() {
385 TS retVal = this.getTypedField(10, 0);
386 return retVal;
387 }
388
389
390
391
392
393
394
395 public PL getBPRequestedDispenseToLocation() {
396 PL retVal = this.getTypedField(11, 0);
397 return retVal;
398 }
399
400
401
402
403
404 public PL getBpo11_BPRequestedDispenseToLocation() {
405 PL retVal = this.getTypedField(11, 0);
406 return retVal;
407 }
408
409
410
411
412
413
414
415 public XAD getBPRequestedDispenseToAddress() {
416 XAD retVal = this.getTypedField(12, 0);
417 return retVal;
418 }
419
420
421
422
423
424 public XAD getBpo12_BPRequestedDispenseToAddress() {
425 XAD retVal = this.getTypedField(12, 0);
426 return retVal;
427 }
428
429
430
431
432
433 public CWE[] getBPIndicationForUse() {
434 CWE[] retVal = this.getTypedField(13, new CWE[0]);
435 return retVal;
436 }
437
438
439
440
441
442 public CWE[] getBpo13_BPIndicationForUse() {
443 CWE[] retVal = this.getTypedField(13, new CWE[0]);
444 return retVal;
445 }
446
447
448
449
450
451
452
453 public int getBPIndicationForUseReps() {
454 return this.getReps(13);
455 }
456
457
458
459
460
461
462
463
464 public CWE getBPIndicationForUse(int rep) {
465 CWE retVal = this.getTypedField(13, rep);
466 return retVal;
467 }
468
469
470
471
472
473
474
475 public CWE getBpo13_BPIndicationForUse(int rep) {
476 CWE retVal = this.getTypedField(13, rep);
477 return retVal;
478 }
479
480
481
482
483
484
485 public int getBpo13_BPIndicationForUseReps() {
486 return this.getReps(13);
487 }
488
489
490
491
492
493
494
495
496
497 public CWE insertBPIndicationForUse(int rep) throws HL7Exception {
498 return (CWE) super.insertRepetition(13, rep);
499 }
500
501
502
503
504
505
506
507
508
509 public CWE insertBpo13_BPIndicationForUse(int rep) throws HL7Exception {
510 return (CWE) super.insertRepetition(13, rep);
511 }
512
513
514
515
516
517
518
519
520
521 public CWE removeBPIndicationForUse(int rep) throws HL7Exception {
522 return (CWE) super.removeRepetition(13, rep);
523 }
524
525
526
527
528
529
530
531
532
533 public CWE removeBpo13_BPIndicationForUse(int rep) throws HL7Exception {
534 return (CWE) super.removeRepetition(13, rep);
535 }
536
537
538
539
540
541
542
543
544 public ID getBPInformedConsentIndicator() {
545 ID retVal = this.getTypedField(14, 0);
546 return retVal;
547 }
548
549
550
551
552
553 public ID getBpo14_BPInformedConsentIndicator() {
554 ID retVal = this.getTypedField(14, 0);
555 return retVal;
556 }
557
558
559
560
561
562
563 protected Type createNewTypeWithoutReflection(int field) {
564 switch (field) {
565 case 0: return new SI(getMessage());
566 case 1: return new CWE(getMessage());
567 case 2: return new CWE(getMessage());
568 case 3: return new NM(getMessage());
569 case 4: return new NM(getMessage());
570 case 5: return new CE(getMessage());
571 case 6: return new TS(getMessage());
572 case 7: return new PL(getMessage());
573 case 8: return new XAD(getMessage());
574 case 9: return new TS(getMessage());
575 case 10: return new PL(getMessage());
576 case 11: return new XAD(getMessage());
577 case 12: return new CWE(getMessage());
578 case 13: return new ID(getMessage(), new Integer( 136 ));
579 default: return null;
580 }
581 }
582
583
584 }
585