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 @SuppressWarnings("unused")
70 public class OM4 extends AbstractSegment {
71
72
73
74
75 public OM4(Group parent, ModelClassFactory factory) {
76 super(parent, factory);
77 init(factory);
78 }
79
80 private void init(ModelClassFactory factory) {
81 try {
82 this.add(ST.class, false, 1, 3, new Object[]{ getMessage() }, "Segment Type ID");
83 this.add(NM.class, false, 1, 4, new Object[]{ getMessage() }, "Sequence Number - Test/ Observation Master File");
84 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(170) }, "Derived Specimen");
85 this.add(TX.class, false, 1, 60, new Object[]{ getMessage() }, "Container Description");
86 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Container Volume");
87 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Container Units");
88 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Specimen");
89 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Additive");
90 this.add(TX.class, false, 1, 10240, new Object[]{ getMessage() }, "Preparation");
91 this.add(TX.class, false, 1, 10240, new Object[]{ getMessage() }, "Special Handling Requirements");
92 this.add(CQ_QUANTITY.class, false, 1, 20, new Object[]{ getMessage() }, "Normal Collection Volume");
93 this.add(CQ_QUANTITY.class, false, 1, 20, new Object[]{ getMessage() }, "Minimum Collection Volume");
94 this.add(TX.class, false, 1, 10240, new Object[]{ getMessage() }, "Specimen Requirements");
95 this.add(ID.class, false, 0, 60, new Object[]{ getMessage(), new Integer(27) }, "Specimen Priorities");
96 this.add(CQ_QUANTITY.class, false, 1, 20, new Object[]{ getMessage() }, "Specimen Retention Time");
97 } catch(HL7Exception e) {
98 log.error("Unexpected error creating OM4 - this is probably a bug in the source code generator.", e);
99 }
100 }
101
102
103
104
105
106
107
108 public ST getSegmentTypeID() {
109 ST retVal = this.getTypedField(1, 0);
110 return retVal;
111 }
112
113
114
115
116
117 public ST getOm41_SegmentTypeID() {
118 ST retVal = this.getTypedField(1, 0);
119 return retVal;
120 }
121
122
123
124
125
126
127
128 public NM getSequenceNumberTestObservationMasterFile() {
129 NM retVal = this.getTypedField(2, 0);
130 return retVal;
131 }
132
133
134
135
136
137 public NM getOm42_SequenceNumberTestObservationMasterFile() {
138 NM retVal = this.getTypedField(2, 0);
139 return retVal;
140 }
141
142
143
144
145
146
147
148 public ID getDerivedSpecimen() {
149 ID retVal = this.getTypedField(3, 0);
150 return retVal;
151 }
152
153
154
155
156
157 public ID getOm43_DerivedSpecimen() {
158 ID retVal = this.getTypedField(3, 0);
159 return retVal;
160 }
161
162
163
164
165
166
167
168 public TX getContainerDescription() {
169 TX retVal = this.getTypedField(4, 0);
170 return retVal;
171 }
172
173
174
175
176
177 public TX getOm44_ContainerDescription() {
178 TX retVal = this.getTypedField(4, 0);
179 return retVal;
180 }
181
182
183
184
185
186
187
188 public NM getContainerVolume() {
189 NM retVal = this.getTypedField(5, 0);
190 return retVal;
191 }
192
193
194
195
196
197 public NM getOm45_ContainerVolume() {
198 NM retVal = this.getTypedField(5, 0);
199 return retVal;
200 }
201
202
203
204
205
206
207
208 public CE getContainerUnits() {
209 CE retVal = this.getTypedField(6, 0);
210 return retVal;
211 }
212
213
214
215
216
217 public CE getOm46_ContainerUnits() {
218 CE retVal = this.getTypedField(6, 0);
219 return retVal;
220 }
221
222
223
224
225
226
227
228 public CE getSpecimen() {
229 CE retVal = this.getTypedField(7, 0);
230 return retVal;
231 }
232
233
234
235
236
237 public CE getOm47_Specimen() {
238 CE retVal = this.getTypedField(7, 0);
239 return retVal;
240 }
241
242
243
244
245
246
247
248 public CE getAdditive() {
249 CE retVal = this.getTypedField(8, 0);
250 return retVal;
251 }
252
253
254
255
256
257 public CE getOm48_Additive() {
258 CE retVal = this.getTypedField(8, 0);
259 return retVal;
260 }
261
262
263
264
265
266
267
268 public TX getPreparation() {
269 TX retVal = this.getTypedField(9, 0);
270 return retVal;
271 }
272
273
274
275
276
277 public TX getOm49_Preparation() {
278 TX retVal = this.getTypedField(9, 0);
279 return retVal;
280 }
281
282
283
284
285
286
287
288 public TX getSpecialHandlingRequirements() {
289 TX retVal = this.getTypedField(10, 0);
290 return retVal;
291 }
292
293
294
295
296
297 public TX getOm410_SpecialHandlingRequirements() {
298 TX retVal = this.getTypedField(10, 0);
299 return retVal;
300 }
301
302
303
304
305
306
307
308 public CQ_QUANTITY getNormalCollectionVolume() {
309 CQ_QUANTITY retVal = this.getTypedField(11, 0);
310 return retVal;
311 }
312
313
314
315
316
317 public CQ_QUANTITY getOm411_NormalCollectionVolume() {
318 CQ_QUANTITY retVal = this.getTypedField(11, 0);
319 return retVal;
320 }
321
322
323
324
325
326
327
328 public CQ_QUANTITY getMinimumCollectionVolume() {
329 CQ_QUANTITY retVal = this.getTypedField(12, 0);
330 return retVal;
331 }
332
333
334
335
336
337 public CQ_QUANTITY getOm412_MinimumCollectionVolume() {
338 CQ_QUANTITY retVal = this.getTypedField(12, 0);
339 return retVal;
340 }
341
342
343
344
345
346
347
348 public TX getSpecimenRequirements() {
349 TX retVal = this.getTypedField(13, 0);
350 return retVal;
351 }
352
353
354
355
356
357 public TX getOm413_SpecimenRequirements() {
358 TX retVal = this.getTypedField(13, 0);
359 return retVal;
360 }
361
362
363
364
365
366 public ID[] getSpecimenPriorities() {
367 ID[] retVal = this.getTypedField(14, new ID[0]);
368 return retVal;
369 }
370
371
372
373
374
375 public ID[] getOm414_SpecimenPriorities() {
376 ID[] retVal = this.getTypedField(14, new ID[0]);
377 return retVal;
378 }
379
380
381
382
383
384
385
386 public int getSpecimenPrioritiesReps() {
387 return this.getReps(14);
388 }
389
390
391
392
393
394
395
396
397 public ID getSpecimenPriorities(int rep) {
398 ID retVal = this.getTypedField(14, rep);
399 return retVal;
400 }
401
402
403
404
405
406
407
408 public ID getOm414_SpecimenPriorities(int rep) {
409 ID retVal = this.getTypedField(14, rep);
410 return retVal;
411 }
412
413
414
415
416
417
418 public int getOm414_SpecimenPrioritiesReps() {
419 return this.getReps(14);
420 }
421
422
423
424
425
426
427
428
429
430 public ID insertSpecimenPriorities(int rep) throws HL7Exception {
431 return (ID) super.insertRepetition(14, rep);
432 }
433
434
435
436
437
438
439
440
441
442 public ID insertOm414_SpecimenPriorities(int rep) throws HL7Exception {
443 return (ID) super.insertRepetition(14, rep);
444 }
445
446
447
448
449
450
451
452
453
454 public ID removeSpecimenPriorities(int rep) throws HL7Exception {
455 return (ID) super.removeRepetition(14, rep);
456 }
457
458
459
460
461
462
463
464
465
466 public ID removeOm414_SpecimenPriorities(int rep) throws HL7Exception {
467 return (ID) super.removeRepetition(14, rep);
468 }
469
470
471
472
473
474
475
476
477 public CQ_QUANTITY getSpecimenRetentionTime() {
478 CQ_QUANTITY retVal = this.getTypedField(15, 0);
479 return retVal;
480 }
481
482
483
484
485
486 public CQ_QUANTITY getOm415_SpecimenRetentionTime() {
487 CQ_QUANTITY retVal = this.getTypedField(15, 0);
488 return retVal;
489 }
490
491
492
493
494
495
496 protected Type createNewTypeWithoutReflection(int field) {
497 switch (field) {
498 case 0: return new ST(getMessage());
499 case 1: return new NM(getMessage());
500 case 2: return new ID(getMessage(), new Integer( 170 ));
501 case 3: return new TX(getMessage());
502 case 4: return new NM(getMessage());
503 case 5: return new CE(getMessage());
504 case 6: return new CE(getMessage());
505 case 7: return new CE(getMessage());
506 case 8: return new TX(getMessage());
507 case 9: return new TX(getMessage());
508 case 10: return new CQ_QUANTITY(getMessage());
509 case 11: return new CQ_QUANTITY(getMessage());
510 case 12: return new TX(getMessage());
511 case 13: return new ID(getMessage(), new Integer( 27 ));
512 case 14: return new CQ_QUANTITY(getMessage());
513 default: return null;
514 }
515 }
516
517
518 }
519