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.v22.segment;
35
36
37 import ca.uhn.hl7v2.model.v22.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 @SuppressWarnings("unused")
71 public class OBX extends AbstractSegment {
72
73
74
75
76 public OBX(Group parent, ModelClassFactory factory) {
77 super(parent, factory);
78 init(factory);
79 }
80
81 private void init(ModelClassFactory factory) {
82 try {
83 this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - Observational Simple");
84 this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(125) }, "Value Type");
85 this.add(CE.class, true, 1, 80, new Object[]{ getMessage() }, "Observation Identifier");
86 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Observation Sub-ID");
87 this.add(Varies.class, false, 1, 65536, new Object[]{ getMessage() }, "Observation Value");
88 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Units");
89 this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "References Range");
90 this.add(ID.class, false, 5, 10, new Object[]{ getMessage(), new Integer(78) }, "Abnormal Flags");
91 this.add(NM.class, false, 1, 5, new Object[]{ getMessage() }, "Probability");
92 this.add(ID.class, false, 1, 5, new Object[]{ getMessage(), new Integer(80) }, "Nature of Abnormal Test");
93 this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(85) }, "Observation result status");
94 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Effective date last observation normal values");
95 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "User Defined Access Checks");
96 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date / time of the observation");
97 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Producer's ID");
98 this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Responsible Observer");
99 } catch(HL7Exception e) {
100 log.error("Unexpected error creating OBX - this is probably a bug in the source code generator.", e);
101 }
102 }
103
104
105
106
107
108
109
110 public SI getSetIDObservationalSimple() {
111 SI retVal = this.getTypedField(1, 0);
112 return retVal;
113 }
114
115
116
117
118
119 public SI getObx1_SetIDObservationalSimple() {
120 SI retVal = this.getTypedField(1, 0);
121 return retVal;
122 }
123
124
125
126
127
128
129
130 public ID getValueType() {
131 ID retVal = this.getTypedField(2, 0);
132 return retVal;
133 }
134
135
136
137
138
139 public ID getObx2_ValueType() {
140 ID retVal = this.getTypedField(2, 0);
141 return retVal;
142 }
143
144
145
146
147
148
149
150 public CE getObservationIdentifier() {
151 CE retVal = this.getTypedField(3, 0);
152 return retVal;
153 }
154
155
156
157
158
159 public CE getObx3_ObservationIdentifier() {
160 CE retVal = this.getTypedField(3, 0);
161 return retVal;
162 }
163
164
165
166
167
168
169
170 public ST getObservationSubID() {
171 ST retVal = this.getTypedField(4, 0);
172 return retVal;
173 }
174
175
176
177
178
179 public ST getObx4_ObservationSubID() {
180 ST retVal = this.getTypedField(4, 0);
181 return retVal;
182 }
183
184
185
186
187
188
189
190 public Varies getObservationValue() {
191 Varies retVal = this.getTypedField(5, 0);
192 return retVal;
193 }
194
195
196
197
198
199 public Varies getObx5_ObservationValue() {
200 Varies retVal = this.getTypedField(5, 0);
201 return retVal;
202 }
203
204
205
206
207
208
209
210 public CE getUnits() {
211 CE retVal = this.getTypedField(6, 0);
212 return retVal;
213 }
214
215
216
217
218
219 public CE getObx6_Units() {
220 CE retVal = this.getTypedField(6, 0);
221 return retVal;
222 }
223
224
225
226
227
228
229
230 public ST getReferencesRange() {
231 ST retVal = this.getTypedField(7, 0);
232 return retVal;
233 }
234
235
236
237
238
239 public ST getObx7_ReferencesRange() {
240 ST retVal = this.getTypedField(7, 0);
241 return retVal;
242 }
243
244
245
246
247
248 public ID[] getAbnormalFlags() {
249 ID[] retVal = this.getTypedField(8, new ID[0]);
250 return retVal;
251 }
252
253
254
255
256
257 public ID[] getObx8_AbnormalFlags() {
258 ID[] retVal = this.getTypedField(8, new ID[0]);
259 return retVal;
260 }
261
262
263
264
265
266
267
268 public int getAbnormalFlagsReps() {
269 return this.getReps(8);
270 }
271
272
273
274
275
276
277
278
279 public ID getAbnormalFlags(int rep) {
280 ID retVal = this.getTypedField(8, rep);
281 return retVal;
282 }
283
284
285
286
287
288
289
290 public ID getObx8_AbnormalFlags(int rep) {
291 ID retVal = this.getTypedField(8, rep);
292 return retVal;
293 }
294
295
296
297
298
299
300 public int getObx8_AbnormalFlagsReps() {
301 return this.getReps(8);
302 }
303
304
305
306
307
308
309
310
311
312 public ID insertAbnormalFlags(int rep) throws HL7Exception {
313 return (ID) super.insertRepetition(8, rep);
314 }
315
316
317
318
319
320
321
322
323
324 public ID insertObx8_AbnormalFlags(int rep) throws HL7Exception {
325 return (ID) super.insertRepetition(8, rep);
326 }
327
328
329
330
331
332
333
334
335
336 public ID removeAbnormalFlags(int rep) throws HL7Exception {
337 return (ID) super.removeRepetition(8, rep);
338 }
339
340
341
342
343
344
345
346
347
348 public ID removeObx8_AbnormalFlags(int rep) throws HL7Exception {
349 return (ID) super.removeRepetition(8, rep);
350 }
351
352
353
354
355
356
357
358
359 public NM getProbability() {
360 NM retVal = this.getTypedField(9, 0);
361 return retVal;
362 }
363
364
365
366
367
368 public NM getObx9_Probability() {
369 NM retVal = this.getTypedField(9, 0);
370 return retVal;
371 }
372
373
374
375
376
377
378
379 public ID getNatureOfAbnormalTest() {
380 ID retVal = this.getTypedField(10, 0);
381 return retVal;
382 }
383
384
385
386
387
388 public ID getObx10_NatureOfAbnormalTest() {
389 ID retVal = this.getTypedField(10, 0);
390 return retVal;
391 }
392
393
394
395
396
397
398
399 public ID getObservationResultStatus() {
400 ID retVal = this.getTypedField(11, 0);
401 return retVal;
402 }
403
404
405
406
407
408 public ID getObx11_ObservationResultStatus() {
409 ID retVal = this.getTypedField(11, 0);
410 return retVal;
411 }
412
413
414
415
416
417
418
419 public TS getEffectiveDateLastObservationNormalValues() {
420 TS retVal = this.getTypedField(12, 0);
421 return retVal;
422 }
423
424
425
426
427
428 public TS getObx12_EffectiveDateLastObservationNormalValues() {
429 TS retVal = this.getTypedField(12, 0);
430 return retVal;
431 }
432
433
434
435
436
437
438
439 public ST getUserDefinedAccessChecks() {
440 ST retVal = this.getTypedField(13, 0);
441 return retVal;
442 }
443
444
445
446
447
448 public ST getObx13_UserDefinedAccessChecks() {
449 ST retVal = this.getTypedField(13, 0);
450 return retVal;
451 }
452
453
454
455
456
457
458
459 public TS getDateTimeOfTheObservation() {
460 TS retVal = this.getTypedField(14, 0);
461 return retVal;
462 }
463
464
465
466
467
468 public TS getObx14_DateTimeOfTheObservation() {
469 TS retVal = this.getTypedField(14, 0);
470 return retVal;
471 }
472
473
474
475
476
477
478
479 public CE getProducerSID() {
480 CE retVal = this.getTypedField(15, 0);
481 return retVal;
482 }
483
484
485
486
487
488 public CE getObx15_ProducerSID() {
489 CE retVal = this.getTypedField(15, 0);
490 return retVal;
491 }
492
493
494
495
496
497
498
499 public CN getResponsibleObserver() {
500 CN retVal = this.getTypedField(16, 0);
501 return retVal;
502 }
503
504
505
506
507
508 public CN getObx16_ResponsibleObserver() {
509 CN retVal = this.getTypedField(16, 0);
510 return retVal;
511 }
512
513
514
515
516
517
518 protected Type createNewTypeWithoutReflection(int field) {
519 switch (field) {
520 case 0: return new SI(getMessage());
521 case 1: return new ID(getMessage(), new Integer( 125 ));
522 case 2: return new CE(getMessage());
523 case 3: return new ST(getMessage());
524 case 4: return new Varies(getMessage());
525 case 5: return new CE(getMessage());
526 case 6: return new ST(getMessage());
527 case 7: return new ID(getMessage(), new Integer( 78 ));
528 case 8: return new NM(getMessage());
529 case 9: return new ID(getMessage(), new Integer( 80 ));
530 case 10: return new ID(getMessage(), new Integer( 85 ));
531 case 11: return new TS(getMessage());
532 case 12: return new ST(getMessage());
533 case 13: return new TS(getMessage());
534 case 14: return new CE(getMessage());
535 case 15: return new CN(getMessage());
536 default: return null;
537 }
538 }
539
540
541 }
542