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 @SuppressWarnings("unused")
65 public class OM2 extends AbstractSegment {
66
67
68
69
70 public OM2(Group parent, ModelClassFactory factory) {
71 super(parent, factory);
72 init(factory);
73 }
74
75 private void init(ModelClassFactory factory) {
76 try {
77 this.add(NM.class, false, 1, 4, new Object[]{ getMessage() }, "Sequence Number - Test/ Observation Master File");
78 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Units of Measure");
79 this.add(NM.class, false, 0, 10, new Object[]{ getMessage() }, "Range of Decimal Precision");
80 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Corresponding SI Units of Measure");
81 this.add(TX.class, false, 1, 60, new Object[]{ getMessage() }, "SI Conversion Factor");
82 this.add(CM_RFR.class, false, 1, 200, new Object[]{ getMessage() }, "Reference (Normal) Range - Ordinal & Continuous Obs");
83 this.add(CM_RANGE.class, false, 1, 200, new Object[]{ getMessage() }, "Critical Range for Ordinal & Continuous Obs");
84 this.add(CM_ABS_RANGE.class, false, 1, 200, new Object[]{ getMessage() }, "Absolute Range for Ordinal & Continuous Obs");
85 this.add(CM_DLT.class, false, 0, 200, new Object[]{ getMessage() }, "Delta Check Criteria");
86 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Minimum Meaningful Increments");
87 } catch(HL7Exception e) {
88 log.error("Unexpected error creating OM2 - this is probably a bug in the source code generator.", e);
89 }
90 }
91
92
93
94
95
96
97
98 public NM getSequenceNumberTestObservationMasterFile() {
99 NM retVal = this.getTypedField(1, 0);
100 return retVal;
101 }
102
103
104
105
106
107 public NM getOm21_SequenceNumberTestObservationMasterFile() {
108 NM retVal = this.getTypedField(1, 0);
109 return retVal;
110 }
111
112
113
114
115
116
117
118 public CE getUnitsOfMeasure() {
119 CE retVal = this.getTypedField(2, 0);
120 return retVal;
121 }
122
123
124
125
126
127 public CE getOm22_UnitsOfMeasure() {
128 CE retVal = this.getTypedField(2, 0);
129 return retVal;
130 }
131
132
133
134
135
136 public NM[] getRangeOfDecimalPrecision() {
137 NM[] retVal = this.getTypedField(3, new NM[0]);
138 return retVal;
139 }
140
141
142
143
144
145 public NM[] getOm23_RangeOfDecimalPrecision() {
146 NM[] retVal = this.getTypedField(3, new NM[0]);
147 return retVal;
148 }
149
150
151
152
153
154
155
156 public int getRangeOfDecimalPrecisionReps() {
157 return this.getReps(3);
158 }
159
160
161
162
163
164
165
166
167 public NM getRangeOfDecimalPrecision(int rep) {
168 NM retVal = this.getTypedField(3, rep);
169 return retVal;
170 }
171
172
173
174
175
176
177
178 public NM getOm23_RangeOfDecimalPrecision(int rep) {
179 NM retVal = this.getTypedField(3, rep);
180 return retVal;
181 }
182
183
184
185
186
187
188 public int getOm23_RangeOfDecimalPrecisionReps() {
189 return this.getReps(3);
190 }
191
192
193
194
195
196
197
198
199
200 public NM insertRangeOfDecimalPrecision(int rep) throws HL7Exception {
201 return (NM) super.insertRepetition(3, rep);
202 }
203
204
205
206
207
208
209
210
211
212 public NM insertOm23_RangeOfDecimalPrecision(int rep) throws HL7Exception {
213 return (NM) super.insertRepetition(3, rep);
214 }
215
216
217
218
219
220
221
222
223
224 public NM removeRangeOfDecimalPrecision(int rep) throws HL7Exception {
225 return (NM) super.removeRepetition(3, rep);
226 }
227
228
229
230
231
232
233
234
235
236 public NM removeOm23_RangeOfDecimalPrecision(int rep) throws HL7Exception {
237 return (NM) super.removeRepetition(3, rep);
238 }
239
240
241
242
243
244
245
246
247 public CE getCorrespondingSIUnitsOfMeasure() {
248 CE retVal = this.getTypedField(4, 0);
249 return retVal;
250 }
251
252
253
254
255
256 public CE getOm24_CorrespondingSIUnitsOfMeasure() {
257 CE retVal = this.getTypedField(4, 0);
258 return retVal;
259 }
260
261
262
263
264
265
266
267 public TX getSIConversionFactor() {
268 TX retVal = this.getTypedField(5, 0);
269 return retVal;
270 }
271
272
273
274
275
276 public TX getOm25_SIConversionFactor() {
277 TX retVal = this.getTypedField(5, 0);
278 return retVal;
279 }
280
281
282
283
284
285
286
287 public CM_RFR getReferenceNormalRangeOrdinalContinuousObs() {
288 CM_RFR retVal = this.getTypedField(6, 0);
289 return retVal;
290 }
291
292
293
294
295
296 public CM_RFR getOm26_ReferenceNormalRangeOrdinalContinuousObs() {
297 CM_RFR retVal = this.getTypedField(6, 0);
298 return retVal;
299 }
300
301
302
303
304
305
306
307 public CM_RANGE getCriticalRangeForOrdinalContinuousObs() {
308 CM_RANGE retVal = this.getTypedField(7, 0);
309 return retVal;
310 }
311
312
313
314
315
316 public CM_RANGE getOm27_CriticalRangeForOrdinalContinuousObs() {
317 CM_RANGE retVal = this.getTypedField(7, 0);
318 return retVal;
319 }
320
321
322
323
324
325
326
327 public CM_ABS_RANGE getAbsoluteRangeForOrdinalContinuousObs() {
328 CM_ABS_RANGE retVal = this.getTypedField(8, 0);
329 return retVal;
330 }
331
332
333
334
335
336 public CM_ABS_RANGE getOm28_AbsoluteRangeForOrdinalContinuousObs() {
337 CM_ABS_RANGE retVal = this.getTypedField(8, 0);
338 return retVal;
339 }
340
341
342
343
344
345 public CM_DLT[] getDeltaCheckCriteria() {
346 CM_DLT[] retVal = this.getTypedField(9, new CM_DLT[0]);
347 return retVal;
348 }
349
350
351
352
353
354 public CM_DLT[] getOm29_DeltaCheckCriteria() {
355 CM_DLT[] retVal = this.getTypedField(9, new CM_DLT[0]);
356 return retVal;
357 }
358
359
360
361
362
363
364
365 public int getDeltaCheckCriteriaReps() {
366 return this.getReps(9);
367 }
368
369
370
371
372
373
374
375
376 public CM_DLT getDeltaCheckCriteria(int rep) {
377 CM_DLT retVal = this.getTypedField(9, rep);
378 return retVal;
379 }
380
381
382
383
384
385
386
387 public CM_DLT getOm29_DeltaCheckCriteria(int rep) {
388 CM_DLT retVal = this.getTypedField(9, rep);
389 return retVal;
390 }
391
392
393
394
395
396
397 public int getOm29_DeltaCheckCriteriaReps() {
398 return this.getReps(9);
399 }
400
401
402
403
404
405
406
407
408
409 public CM_DLT insertDeltaCheckCriteria(int rep) throws HL7Exception {
410 return (CM_DLT) super.insertRepetition(9, rep);
411 }
412
413
414
415
416
417
418
419
420
421 public CM_DLT insertOm29_DeltaCheckCriteria(int rep) throws HL7Exception {
422 return (CM_DLT) super.insertRepetition(9, rep);
423 }
424
425
426
427
428
429
430
431
432
433 public CM_DLT removeDeltaCheckCriteria(int rep) throws HL7Exception {
434 return (CM_DLT) super.removeRepetition(9, rep);
435 }
436
437
438
439
440
441
442
443
444
445 public CM_DLT removeOm29_DeltaCheckCriteria(int rep) throws HL7Exception {
446 return (CM_DLT) super.removeRepetition(9, rep);
447 }
448
449
450
451
452
453
454
455
456 public NM getMinimumMeaningfulIncrements() {
457 NM retVal = this.getTypedField(10, 0);
458 return retVal;
459 }
460
461
462
463
464
465 public NM getOm210_MinimumMeaningfulIncrements() {
466 NM retVal = this.getTypedField(10, 0);
467 return retVal;
468 }
469
470
471
472
473
474
475 protected Type createNewTypeWithoutReflection(int field) {
476 switch (field) {
477 case 0: return new NM(getMessage());
478 case 1: return new CE(getMessage());
479 case 2: return new NM(getMessage());
480 case 3: return new CE(getMessage());
481 case 4: return new TX(getMessage());
482 case 5: return new CM_RFR(getMessage());
483 case 6: return new CM_RANGE(getMessage());
484 case 7: return new CM_ABS_RANGE(getMessage());
485 case 8: return new CM_DLT(getMessage());
486 case 9: return new NM(getMessage());
487 default: return null;
488 }
489 }
490
491
492 }
493