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
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, 3, new Object[]{ getMessage(), new Integer(125) }, "Value Type");
86 this.add(CE.class, true, 1, 80, new Object[]{ getMessage() }, "Observation Identifier");
87 this.add(ST.class, true, 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, 60, 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, 5, 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) }, "Observation 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, 0, 80, new Object[]{ getMessage() }, "Responsible Observer");
100 this.add(CE.class, false, 0, 60, 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 public NM[] getProbability() {
449 NM[] retVal = this.getTypedField(9, new NM[0]);
450 return retVal;
451 }
452
453
454
455
456
457 public NM[] getObx9_Probability() {
458 NM[] retVal = this.getTypedField(9, new NM[0]);
459 return retVal;
460 }
461
462
463
464
465
466
467
468 public int getProbabilityReps() {
469 return this.getReps(9);
470 }
471
472
473
474
475
476
477
478
479 public NM getProbability(int rep) {
480 NM retVal = this.getTypedField(9, rep);
481 return retVal;
482 }
483
484
485
486
487
488
489
490 public NM getObx9_Probability(int rep) {
491 NM retVal = this.getTypedField(9, rep);
492 return retVal;
493 }
494
495
496
497
498
499
500 public int getObx9_ProbabilityReps() {
501 return this.getReps(9);
502 }
503
504
505
506
507
508
509
510
511
512 public NM insertProbability(int rep) throws HL7Exception {
513 return (NM) super.insertRepetition(9, rep);
514 }
515
516
517
518
519
520
521
522
523
524 public NM insertObx9_Probability(int rep) throws HL7Exception {
525 return (NM) super.insertRepetition(9, rep);
526 }
527
528
529
530
531
532
533
534
535
536 public NM removeProbability(int rep) throws HL7Exception {
537 return (NM) super.removeRepetition(9, rep);
538 }
539
540
541
542
543
544
545
546
547
548 public NM removeObx9_Probability(int rep) throws HL7Exception {
549 return (NM) super.removeRepetition(9, rep);
550 }
551
552
553
554
555
556
557
558
559 public ID getNatureOfAbnormalTest() {
560 ID retVal = this.getTypedField(10, 0);
561 return retVal;
562 }
563
564
565
566
567
568 public ID getObx10_NatureOfAbnormalTest() {
569 ID retVal = this.getTypedField(10, 0);
570 return retVal;
571 }
572
573
574
575
576
577
578
579 public ID getObservationResultStatus() {
580 ID retVal = this.getTypedField(11, 0);
581 return retVal;
582 }
583
584
585
586
587
588 public ID getObx11_ObservationResultStatus() {
589 ID retVal = this.getTypedField(11, 0);
590 return retVal;
591 }
592
593
594
595
596
597
598
599 public TS getDateLastObsNormalValues() {
600 TS retVal = this.getTypedField(12, 0);
601 return retVal;
602 }
603
604
605
606
607
608 public TS getObx12_DateLastObsNormalValues() {
609 TS retVal = this.getTypedField(12, 0);
610 return retVal;
611 }
612
613
614
615
616
617
618
619 public ST getUserDefinedAccessChecks() {
620 ST retVal = this.getTypedField(13, 0);
621 return retVal;
622 }
623
624
625
626
627
628 public ST getObx13_UserDefinedAccessChecks() {
629 ST retVal = this.getTypedField(13, 0);
630 return retVal;
631 }
632
633
634
635
636
637
638
639 public TS getDateTimeOfTheObservation() {
640 TS retVal = this.getTypedField(14, 0);
641 return retVal;
642 }
643
644
645
646
647
648 public TS getObx14_DateTimeOfTheObservation() {
649 TS retVal = this.getTypedField(14, 0);
650 return retVal;
651 }
652
653
654
655
656
657
658
659 public CE getProducerSID() {
660 CE retVal = this.getTypedField(15, 0);
661 return retVal;
662 }
663
664
665
666
667
668 public CE getObx15_ProducerSID() {
669 CE retVal = this.getTypedField(15, 0);
670 return retVal;
671 }
672
673
674
675
676
677 public XCN[] getResponsibleObserver() {
678 XCN[] retVal = this.getTypedField(16, new XCN[0]);
679 return retVal;
680 }
681
682
683
684
685
686 public XCN[] getObx16_ResponsibleObserver() {
687 XCN[] retVal = this.getTypedField(16, new XCN[0]);
688 return retVal;
689 }
690
691
692
693
694
695
696
697 public int getResponsibleObserverReps() {
698 return this.getReps(16);
699 }
700
701
702
703
704
705
706
707
708 public XCN getResponsibleObserver(int rep) {
709 XCN retVal = this.getTypedField(16, rep);
710 return retVal;
711 }
712
713
714
715
716
717
718
719 public XCN getObx16_ResponsibleObserver(int rep) {
720 XCN retVal = this.getTypedField(16, rep);
721 return retVal;
722 }
723
724
725
726
727
728
729 public int getObx16_ResponsibleObserverReps() {
730 return this.getReps(16);
731 }
732
733
734
735
736
737
738
739
740
741 public XCN insertResponsibleObserver(int rep) throws HL7Exception {
742 return (XCN) super.insertRepetition(16, rep);
743 }
744
745
746
747
748
749
750
751
752
753 public XCN insertObx16_ResponsibleObserver(int rep) throws HL7Exception {
754 return (XCN) super.insertRepetition(16, rep);
755 }
756
757
758
759
760
761
762
763
764
765 public XCN removeResponsibleObserver(int rep) throws HL7Exception {
766 return (XCN) super.removeRepetition(16, rep);
767 }
768
769
770
771
772
773
774
775
776
777 public XCN removeObx16_ResponsibleObserver(int rep) throws HL7Exception {
778 return (XCN) super.removeRepetition(16, rep);
779 }
780
781
782
783
784
785
786 public CE[] getObservationMethod() {
787 CE[] retVal = this.getTypedField(17, new CE[0]);
788 return retVal;
789 }
790
791
792
793
794
795 public CE[] getObx17_ObservationMethod() {
796 CE[] retVal = this.getTypedField(17, new CE[0]);
797 return retVal;
798 }
799
800
801
802
803
804
805
806 public int getObservationMethodReps() {
807 return this.getReps(17);
808 }
809
810
811
812
813
814
815
816
817 public CE getObservationMethod(int rep) {
818 CE retVal = this.getTypedField(17, rep);
819 return retVal;
820 }
821
822
823
824
825
826
827
828 public CE getObx17_ObservationMethod(int rep) {
829 CE retVal = this.getTypedField(17, rep);
830 return retVal;
831 }
832
833
834
835
836
837
838 public int getObx17_ObservationMethodReps() {
839 return this.getReps(17);
840 }
841
842
843
844
845
846
847
848
849
850 public CE insertObservationMethod(int rep) throws HL7Exception {
851 return (CE) super.insertRepetition(17, rep);
852 }
853
854
855
856
857
858
859
860
861
862 public CE insertObx17_ObservationMethod(int rep) throws HL7Exception {
863 return (CE) super.insertRepetition(17, rep);
864 }
865
866
867
868
869
870
871
872
873
874 public CE removeObservationMethod(int rep) throws HL7Exception {
875 return (CE) super.removeRepetition(17, rep);
876 }
877
878
879
880
881
882
883
884
885
886 public CE removeObx17_ObservationMethod(int rep) throws HL7Exception {
887 return (CE) super.removeRepetition(17, rep);
888 }
889
890
891
892
893
894
895
896 protected Type createNewTypeWithoutReflection(int field) {
897 switch (field) {
898 case 0: return new SI(getMessage());
899 case 1: return new ID(getMessage(), new Integer( 125 ));
900 case 2: return new CE(getMessage());
901 case 3: return new ST(getMessage());
902 case 4: return new Varies(getMessage());
903 case 5: return new CE(getMessage());
904 case 6: return new ST(getMessage());
905 case 7: return new ID(getMessage(), new Integer( 78 ));
906 case 8: return new NM(getMessage());
907 case 9: return new ID(getMessage(), new Integer( 80 ));
908 case 10: return new ID(getMessage(), new Integer( 85 ));
909 case 11: return new TS(getMessage());
910 case 12: return new ST(getMessage());
911 case 13: return new TS(getMessage());
912 case 14: return new CE(getMessage());
913 case 15: return new XCN(getMessage());
914 case 16: return new CE(getMessage());
915 default: return null;
916 }
917 }
918
919
920 }
921