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 @SuppressWarnings("unused")
72 public class OBX extends AbstractSegment {
73
74
75
76
77 public OBX(Group parent, ModelClassFactory factory) {
78 super(parent, factory);
79 init(factory);
80 }
81
82 private void init(ModelClassFactory factory) {
83 try {
84 this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - OBX");
85 this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(125) }, "Value Type");
86 this.add(CE.class, true, 1, 590, new Object[]{ getMessage() }, "Observation Identifier");
87 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Observation Sub-ID");
88 this.add(Varies.class, false, 0, 65536, new Object[]{ getMessage() }, "Observation Value");
89 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Units");
90 this.add(ST.class, false, 1, 10, new Object[]{ getMessage() }, "References Range");
91 this.add(ID.class, false, 5, 5, new Object[]{ getMessage(), new Integer(78) }, "Abnormal Flags");
92 this.add(NM.class, false, 1, 5, new Object[]{ getMessage() }, "Probability");
93 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(80) }, "Nature of Abnormal Test");
94 this.add(ID.class, true, 1, 1, new Object[]{ getMessage(), new Integer(85) }, "Observ Result Status");
95 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date Last Obs Normal Values");
96 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "User Defined Access Checks");
97 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time of the Observation");
98 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Producer's ID");
99 this.add(XCN.class, false, 1, 80, new Object[]{ getMessage() }, "Responsible Observer");
100 this.add(CE.class, false, 0, 80, new Object[]{ getMessage() }, "Observation Method");
101 } catch(HL7Exception e) {
102 log.error("Unexpected error creating OBX - this is probably a bug in the source code generator.", e);
103 }
104 }
105
106
107
108
109
110
111
112 public SI getSetIDOBX() {
113 SI retVal = this.getTypedField(1, 0);
114 return retVal;
115 }
116
117
118
119
120
121 public SI getObx1_SetIDOBX() {
122 SI retVal = this.getTypedField(1, 0);
123 return retVal;
124 }
125
126
127
128
129
130
131
132 public ID getValueType() {
133 ID retVal = this.getTypedField(2, 0);
134 return retVal;
135 }
136
137
138
139
140
141 public ID getObx2_ValueType() {
142 ID retVal = this.getTypedField(2, 0);
143 return retVal;
144 }
145
146
147
148
149
150
151
152 public CE getObservationIdentifier() {
153 CE retVal = this.getTypedField(3, 0);
154 return retVal;
155 }
156
157
158
159
160
161 public CE getObx3_ObservationIdentifier() {
162 CE retVal = this.getTypedField(3, 0);
163 return retVal;
164 }
165
166
167
168
169
170
171
172 public ST getObservationSubID() {
173 ST retVal = this.getTypedField(4, 0);
174 return retVal;
175 }
176
177
178
179
180
181 public ST getObx4_ObservationSubID() {
182 ST retVal = this.getTypedField(4, 0);
183 return retVal;
184 }
185
186
187
188
189
190 public Varies[] getObservationValue() {
191 Varies[] retVal = this.getTypedField(5, new Varies[0]);
192 return retVal;
193 }
194
195
196
197
198
199 public Varies[] getObx5_ObservationValue() {
200 Varies[] retVal = this.getTypedField(5, new Varies[0]);
201 return retVal;
202 }
203
204
205
206
207
208
209
210 public int getObservationValueReps() {
211 return this.getReps(5);
212 }
213
214
215
216
217
218
219
220
221 public Varies getObservationValue(int rep) {
222 Varies retVal = this.getTypedField(5, rep);
223 return retVal;
224 }
225
226
227
228
229
230
231
232 public Varies getObx5_ObservationValue(int rep) {
233 Varies retVal = this.getTypedField(5, rep);
234 return retVal;
235 }
236
237
238
239
240
241
242 public int getObx5_ObservationValueReps() {
243 return this.getReps(5);
244 }
245
246
247
248
249
250
251
252
253
254 public Varies insertObservationValue(int rep) throws HL7Exception {
255 return (Varies) super.insertRepetition(5, rep);
256 }
257
258
259
260
261
262
263
264
265
266 public Varies insertObx5_ObservationValue(int rep) throws HL7Exception {
267 return (Varies) super.insertRepetition(5, rep);
268 }
269
270
271
272
273
274
275
276
277
278 public Varies removeObservationValue(int rep) throws HL7Exception {
279 return (Varies) super.removeRepetition(5, rep);
280 }
281
282
283
284
285
286
287
288
289
290 public Varies removeObx5_ObservationValue(int rep) throws HL7Exception {
291 return (Varies) super.removeRepetition(5, rep);
292 }
293
294
295
296
297
298
299
300
301 public CE getUnits() {
302 CE retVal = this.getTypedField(6, 0);
303 return retVal;
304 }
305
306
307
308
309
310 public CE getObx6_Units() {
311 CE retVal = this.getTypedField(6, 0);
312 return retVal;
313 }
314
315
316
317
318
319
320
321 public ST getReferencesRange() {
322 ST retVal = this.getTypedField(7, 0);
323 return retVal;
324 }
325
326
327
328
329
330 public ST getObx7_ReferencesRange() {
331 ST retVal = this.getTypedField(7, 0);
332 return retVal;
333 }
334
335
336
337
338
339 public ID[] getAbnormalFlags() {
340 ID[] retVal = this.getTypedField(8, new ID[0]);
341 return retVal;
342 }
343
344
345
346
347
348 public ID[] getObx8_AbnormalFlags() {
349 ID[] retVal = this.getTypedField(8, new ID[0]);
350 return retVal;
351 }
352
353
354
355
356
357
358
359 public int getAbnormalFlagsReps() {
360 return this.getReps(8);
361 }
362
363
364
365
366
367
368
369
370 public ID getAbnormalFlags(int rep) {
371 ID retVal = this.getTypedField(8, rep);
372 return retVal;
373 }
374
375
376
377
378
379
380
381 public ID getObx8_AbnormalFlags(int rep) {
382 ID retVal = this.getTypedField(8, rep);
383 return retVal;
384 }
385
386
387
388
389
390
391 public int getObx8_AbnormalFlagsReps() {
392 return this.getReps(8);
393 }
394
395
396
397
398
399
400
401
402
403 public ID insertAbnormalFlags(int rep) throws HL7Exception {
404 return (ID) super.insertRepetition(8, rep);
405 }
406
407
408
409
410
411
412
413
414
415 public ID insertObx8_AbnormalFlags(int rep) throws HL7Exception {
416 return (ID) super.insertRepetition(8, rep);
417 }
418
419
420
421
422
423
424
425
426
427 public ID removeAbnormalFlags(int rep) throws HL7Exception {
428 return (ID) super.removeRepetition(8, rep);
429 }
430
431
432
433
434
435
436
437
438
439 public ID removeObx8_AbnormalFlags(int rep) throws HL7Exception {
440 return (ID) super.removeRepetition(8, rep);
441 }
442
443
444
445
446
447
448
449
450 public NM getProbability() {
451 NM retVal = this.getTypedField(9, 0);
452 return retVal;
453 }
454
455
456
457
458
459 public NM getObx9_Probability() {
460 NM retVal = this.getTypedField(9, 0);
461 return retVal;
462 }
463
464
465
466
467
468
469
470 public ID getNatureOfAbnormalTest() {
471 ID retVal = this.getTypedField(10, 0);
472 return retVal;
473 }
474
475
476
477
478
479 public ID getObx10_NatureOfAbnormalTest() {
480 ID retVal = this.getTypedField(10, 0);
481 return retVal;
482 }
483
484
485
486
487
488
489
490 public ID getObservResultStatus() {
491 ID retVal = this.getTypedField(11, 0);
492 return retVal;
493 }
494
495
496
497
498
499 public ID getObx11_ObservResultStatus() {
500 ID retVal = this.getTypedField(11, 0);
501 return retVal;
502 }
503
504
505
506
507
508
509
510 public TS getDateLastObsNormalValues() {
511 TS retVal = this.getTypedField(12, 0);
512 return retVal;
513 }
514
515
516
517
518
519 public TS getObx12_DateLastObsNormalValues() {
520 TS retVal = this.getTypedField(12, 0);
521 return retVal;
522 }
523
524
525
526
527
528
529
530 public ST getUserDefinedAccessChecks() {
531 ST retVal = this.getTypedField(13, 0);
532 return retVal;
533 }
534
535
536
537
538
539 public ST getObx13_UserDefinedAccessChecks() {
540 ST retVal = this.getTypedField(13, 0);
541 return retVal;
542 }
543
544
545
546
547
548
549
550 public TS getDateTimeOfTheObservation() {
551 TS retVal = this.getTypedField(14, 0);
552 return retVal;
553 }
554
555
556
557
558
559 public TS getObx14_DateTimeOfTheObservation() {
560 TS retVal = this.getTypedField(14, 0);
561 return retVal;
562 }
563
564
565
566
567
568
569
570 public CE getProducerSID() {
571 CE retVal = this.getTypedField(15, 0);
572 return retVal;
573 }
574
575
576
577
578
579 public CE getObx15_ProducerSID() {
580 CE retVal = this.getTypedField(15, 0);
581 return retVal;
582 }
583
584
585
586
587
588
589
590 public XCN getResponsibleObserver() {
591 XCN retVal = this.getTypedField(16, 0);
592 return retVal;
593 }
594
595
596
597
598
599 public XCN getObx16_ResponsibleObserver() {
600 XCN retVal = this.getTypedField(16, 0);
601 return retVal;
602 }
603
604
605
606
607
608 public CE[] getObservationMethod() {
609 CE[] retVal = this.getTypedField(17, new CE[0]);
610 return retVal;
611 }
612
613
614
615
616
617 public CE[] getObx17_ObservationMethod() {
618 CE[] retVal = this.getTypedField(17, new CE[0]);
619 return retVal;
620 }
621
622
623
624
625
626
627
628 public int getObservationMethodReps() {
629 return this.getReps(17);
630 }
631
632
633
634
635
636
637
638
639 public CE getObservationMethod(int rep) {
640 CE retVal = this.getTypedField(17, rep);
641 return retVal;
642 }
643
644
645
646
647
648
649
650 public CE getObx17_ObservationMethod(int rep) {
651 CE retVal = this.getTypedField(17, rep);
652 return retVal;
653 }
654
655
656
657
658
659
660 public int getObx17_ObservationMethodReps() {
661 return this.getReps(17);
662 }
663
664
665
666
667
668
669
670
671
672 public CE insertObservationMethod(int rep) throws HL7Exception {
673 return (CE) super.insertRepetition(17, rep);
674 }
675
676
677
678
679
680
681
682
683
684 public CE insertObx17_ObservationMethod(int rep) throws HL7Exception {
685 return (CE) super.insertRepetition(17, rep);
686 }
687
688
689
690
691
692
693
694
695
696 public CE removeObservationMethod(int rep) throws HL7Exception {
697 return (CE) super.removeRepetition(17, rep);
698 }
699
700
701
702
703
704
705
706
707
708 public CE removeObx17_ObservationMethod(int rep) throws HL7Exception {
709 return (CE) super.removeRepetition(17, rep);
710 }
711
712
713
714
715
716
717
718 protected Type createNewTypeWithoutReflection(int field) {
719 switch (field) {
720 case 0: return new SI(getMessage());
721 case 1: return new ID(getMessage(), new Integer( 125 ));
722 case 2: return new CE(getMessage());
723 case 3: return new ST(getMessage());
724 case 4: return new Varies(getMessage());
725 case 5: return new CE(getMessage());
726 case 6: return new ST(getMessage());
727 case 7: return new ID(getMessage(), new Integer( 78 ));
728 case 8: return new NM(getMessage());
729 case 9: return new ID(getMessage(), new Integer( 80 ));
730 case 10: return new ID(getMessage(), new Integer( 85 ));
731 case 11: return new TS(getMessage());
732 case 12: return new ST(getMessage());
733 case 13: return new TS(getMessage());
734 case 14: return new CE(getMessage());
735 case 15: return new XCN(getMessage());
736 case 16: return new CE(getMessage());
737 default: return null;
738 }
739 }
740
741
742 }
743