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 @SuppressWarnings("unused")
66 public class OM2 extends AbstractSegment {
67
68
69
70
71 public OM2(Group parent, ModelClassFactory factory) {
72 super(parent, factory);
73 init(factory);
74 }
75
76 private void init(ModelClassFactory factory) {
77 try {
78 this.add(ST.class, false, 1, 3, new Object[]{ getMessage() }, "Segment Type ID");
79 this.add(NM.class, false, 1, 4, new Object[]{ getMessage() }, "Sequence Number - Test/ Observation Master File");
80 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Units of Measure");
81 this.add(NM.class, false, 1, 10, new Object[]{ getMessage() }, "Range of Decimal Precision");
82 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Corresponding SI Units of Measure");
83 this.add(TX.class, true, 0, 20, new Object[]{ getMessage() }, "SI Conversion Factor");
84 this.add(CM_RFR.class, false, 0, 200, new Object[]{ getMessage() }, "Reference (normal) range - ordinal & continuous observations");
85 this.add(CM_RANGE.class, false, 1, 200, new Object[]{ getMessage() }, "Critical range for ordinal and continuous observations");
86 this.add(CM_ABS_RANGE.class, false, 1, 200, new Object[]{ getMessage() }, "Absolute range for ordinal and continuous observations");
87 this.add(CM_DLT.class, false, 0, 200, new Object[]{ getMessage() }, "Delta Check Criteria");
88 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Minimum Meaningful Increments");
89 } catch(HL7Exception e) {
90 log.error("Unexpected error creating OM2 - this is probably a bug in the source code generator.", e);
91 }
92 }
93
94
95
96
97
98
99
100 public ST getSegmentTypeID() {
101 ST retVal = this.getTypedField(1, 0);
102 return retVal;
103 }
104
105
106
107
108
109 public ST getOm21_SegmentTypeID() {
110 ST retVal = this.getTypedField(1, 0);
111 return retVal;
112 }
113
114
115
116
117
118
119
120 public NM getSequenceNumberTestObservationMasterFile() {
121 NM retVal = this.getTypedField(2, 0);
122 return retVal;
123 }
124
125
126
127
128
129 public NM getOm22_SequenceNumberTestObservationMasterFile() {
130 NM retVal = this.getTypedField(2, 0);
131 return retVal;
132 }
133
134
135
136
137
138
139
140 public CE getUnitsOfMeasure() {
141 CE retVal = this.getTypedField(3, 0);
142 return retVal;
143 }
144
145
146
147
148
149 public CE getOm23_UnitsOfMeasure() {
150 CE retVal = this.getTypedField(3, 0);
151 return retVal;
152 }
153
154
155
156
157
158
159
160 public NM getRangeOfDecimalPrecision() {
161 NM retVal = this.getTypedField(4, 0);
162 return retVal;
163 }
164
165
166
167
168
169 public NM getOm24_RangeOfDecimalPrecision() {
170 NM retVal = this.getTypedField(4, 0);
171 return retVal;
172 }
173
174
175
176
177
178
179
180 public CE getCorrespondingSIUnitsOfMeasure() {
181 CE retVal = this.getTypedField(5, 0);
182 return retVal;
183 }
184
185
186
187
188
189 public CE getOm25_CorrespondingSIUnitsOfMeasure() {
190 CE retVal = this.getTypedField(5, 0);
191 return retVal;
192 }
193
194
195
196
197
198 public TX[] getSIConversionFactor() {
199 TX[] retVal = this.getTypedField(6, new TX[0]);
200 return retVal;
201 }
202
203
204
205
206
207 public TX[] getOm26_SIConversionFactor() {
208 TX[] retVal = this.getTypedField(6, new TX[0]);
209 return retVal;
210 }
211
212
213
214
215
216
217
218 public int getSIConversionFactorReps() {
219 return this.getReps(6);
220 }
221
222
223
224
225
226
227
228
229 public TX getSIConversionFactor(int rep) {
230 TX retVal = this.getTypedField(6, rep);
231 return retVal;
232 }
233
234
235
236
237
238
239
240 public TX getOm26_SIConversionFactor(int rep) {
241 TX retVal = this.getTypedField(6, rep);
242 return retVal;
243 }
244
245
246
247
248
249
250 public int getOm26_SIConversionFactorReps() {
251 return this.getReps(6);
252 }
253
254
255
256
257
258
259
260
261
262 public TX insertSIConversionFactor(int rep) throws HL7Exception {
263 return (TX) super.insertRepetition(6, rep);
264 }
265
266
267
268
269
270
271
272
273
274 public TX insertOm26_SIConversionFactor(int rep) throws HL7Exception {
275 return (TX) super.insertRepetition(6, rep);
276 }
277
278
279
280
281
282
283
284
285
286 public TX removeSIConversionFactor(int rep) throws HL7Exception {
287 return (TX) super.removeRepetition(6, rep);
288 }
289
290
291
292
293
294
295
296
297
298 public TX removeOm26_SIConversionFactor(int rep) throws HL7Exception {
299 return (TX) super.removeRepetition(6, rep);
300 }
301
302
303
304
305
306
307 public CM_RFR[] getReferenceNormalRangeOrdinalContinuousObservations() {
308 CM_RFR[] retVal = this.getTypedField(7, new CM_RFR[0]);
309 return retVal;
310 }
311
312
313
314
315
316 public CM_RFR[] getOm27_ReferenceNormalRangeOrdinalContinuousObservations() {
317 CM_RFR[] retVal = this.getTypedField(7, new CM_RFR[0]);
318 return retVal;
319 }
320
321
322
323
324
325
326
327 public int getReferenceNormalRangeOrdinalContinuousObservationsReps() {
328 return this.getReps(7);
329 }
330
331
332
333
334
335
336
337
338 public CM_RFR getReferenceNormalRangeOrdinalContinuousObservations(int rep) {
339 CM_RFR retVal = this.getTypedField(7, rep);
340 return retVal;
341 }
342
343
344
345
346
347
348
349 public CM_RFR getOm27_ReferenceNormalRangeOrdinalContinuousObservations(int rep) {
350 CM_RFR retVal = this.getTypedField(7, rep);
351 return retVal;
352 }
353
354
355
356
357
358
359 public int getOm27_ReferenceNormalRangeOrdinalContinuousObservationsReps() {
360 return this.getReps(7);
361 }
362
363
364
365
366
367
368
369
370
371 public CM_RFR insertReferenceNormalRangeOrdinalContinuousObservations(int rep) throws HL7Exception {
372 return (CM_RFR) super.insertRepetition(7, rep);
373 }
374
375
376
377
378
379
380
381
382
383 public CM_RFR insertOm27_ReferenceNormalRangeOrdinalContinuousObservations(int rep) throws HL7Exception {
384 return (CM_RFR) super.insertRepetition(7, rep);
385 }
386
387
388
389
390
391
392
393
394
395 public CM_RFR removeReferenceNormalRangeOrdinalContinuousObservations(int rep) throws HL7Exception {
396 return (CM_RFR) super.removeRepetition(7, rep);
397 }
398
399
400
401
402
403
404
405
406
407 public CM_RFR removeOm27_ReferenceNormalRangeOrdinalContinuousObservations(int rep) throws HL7Exception {
408 return (CM_RFR) super.removeRepetition(7, rep);
409 }
410
411
412
413
414
415
416
417
418 public CM_RANGE getCriticalRangeForOrdinalAndContinuousObservations() {
419 CM_RANGE retVal = this.getTypedField(8, 0);
420 return retVal;
421 }
422
423
424
425
426
427 public CM_RANGE getOm28_CriticalRangeForOrdinalAndContinuousObservations() {
428 CM_RANGE retVal = this.getTypedField(8, 0);
429 return retVal;
430 }
431
432
433
434
435
436
437
438 public CM_ABS_RANGE getAbsoluteRangeForOrdinalAndContinuousObservations() {
439 CM_ABS_RANGE retVal = this.getTypedField(9, 0);
440 return retVal;
441 }
442
443
444
445
446
447 public CM_ABS_RANGE getOm29_AbsoluteRangeForOrdinalAndContinuousObservations() {
448 CM_ABS_RANGE retVal = this.getTypedField(9, 0);
449 return retVal;
450 }
451
452
453
454
455
456 public CM_DLT[] getDeltaCheckCriteria() {
457 CM_DLT[] retVal = this.getTypedField(10, new CM_DLT[0]);
458 return retVal;
459 }
460
461
462
463
464
465 public CM_DLT[] getOm210_DeltaCheckCriteria() {
466 CM_DLT[] retVal = this.getTypedField(10, new CM_DLT[0]);
467 return retVal;
468 }
469
470
471
472
473
474
475
476 public int getDeltaCheckCriteriaReps() {
477 return this.getReps(10);
478 }
479
480
481
482
483
484
485
486
487 public CM_DLT getDeltaCheckCriteria(int rep) {
488 CM_DLT retVal = this.getTypedField(10, rep);
489 return retVal;
490 }
491
492
493
494
495
496
497
498 public CM_DLT getOm210_DeltaCheckCriteria(int rep) {
499 CM_DLT retVal = this.getTypedField(10, rep);
500 return retVal;
501 }
502
503
504
505
506
507
508 public int getOm210_DeltaCheckCriteriaReps() {
509 return this.getReps(10);
510 }
511
512
513
514
515
516
517
518
519
520 public CM_DLT insertDeltaCheckCriteria(int rep) throws HL7Exception {
521 return (CM_DLT) super.insertRepetition(10, rep);
522 }
523
524
525
526
527
528
529
530
531
532 public CM_DLT insertOm210_DeltaCheckCriteria(int rep) throws HL7Exception {
533 return (CM_DLT) super.insertRepetition(10, rep);
534 }
535
536
537
538
539
540
541
542
543
544 public CM_DLT removeDeltaCheckCriteria(int rep) throws HL7Exception {
545 return (CM_DLT) super.removeRepetition(10, rep);
546 }
547
548
549
550
551
552
553
554
555
556 public CM_DLT removeOm210_DeltaCheckCriteria(int rep) throws HL7Exception {
557 return (CM_DLT) super.removeRepetition(10, rep);
558 }
559
560
561
562
563
564
565
566
567 public NM getMinimumMeaningfulIncrements() {
568 NM retVal = this.getTypedField(11, 0);
569 return retVal;
570 }
571
572
573
574
575
576 public NM getOm211_MinimumMeaningfulIncrements() {
577 NM retVal = this.getTypedField(11, 0);
578 return retVal;
579 }
580
581
582
583
584
585
586 protected Type createNewTypeWithoutReflection(int field) {
587 switch (field) {
588 case 0: return new ST(getMessage());
589 case 1: return new NM(getMessage());
590 case 2: return new CE(getMessage());
591 case 3: return new NM(getMessage());
592 case 4: return new CE(getMessage());
593 case 5: return new TX(getMessage());
594 case 6: return new CM_RFR(getMessage());
595 case 7: return new CM_RANGE(getMessage());
596 case 8: return new CM_ABS_RANGE(getMessage());
597 case 9: return new CM_DLT(getMessage());
598 case 10: return new NM(getMessage());
599 default: return null;
600 }
601 }
602
603
604 }
605