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.v24.segment;
35
36
37 import ca.uhn.hl7v2.model.v24.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 @SuppressWarnings("unused")
62 public class OM3 extends AbstractSegment {
63
64
65
66
67 public OM3(Group parent, ModelClassFactory factory) {
68 super(parent, factory);
69 init(factory);
70 }
71
72 private void init(ModelClassFactory factory) {
73 try {
74 this.add(NM.class, false, 1, 4, new Object[]{ getMessage() }, "Sequence Number - Test/ Observation Master File");
75 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Preferred Coding System");
76 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Valid Coded \"Answers\"");
77 this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Normal Text/Codes for Categorical Observations");
78 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Abnormal Text/Codes for Categorical Observations");
79 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Critical Text/Codes for Categorical Observations");
80 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(125) }, "Value Type");
81 } catch(HL7Exception e) {
82 log.error("Unexpected error creating OM3 - this is probably a bug in the source code generator.", e);
83 }
84 }
85
86
87
88
89
90
91
92 public NM getSequenceNumberTestObservationMasterFile() {
93 NM retVal = this.getTypedField(1, 0);
94 return retVal;
95 }
96
97
98
99
100
101 public NM getOm31_SequenceNumberTestObservationMasterFile() {
102 NM retVal = this.getTypedField(1, 0);
103 return retVal;
104 }
105
106
107
108
109
110
111
112 public CE getPreferredCodingSystem() {
113 CE retVal = this.getTypedField(2, 0);
114 return retVal;
115 }
116
117
118
119
120
121 public CE getOm32_PreferredCodingSystem() {
122 CE retVal = this.getTypedField(2, 0);
123 return retVal;
124 }
125
126
127
128
129
130
131
132 public CE getValidCodedAnswers() {
133 CE retVal = this.getTypedField(3, 0);
134 return retVal;
135 }
136
137
138
139
140
141 public CE getOm33_ValidCodedAnswers() {
142 CE retVal = this.getTypedField(3, 0);
143 return retVal;
144 }
145
146
147
148
149
150 public CE[] getNormalTextCodesForCategoricalObservations() {
151 CE[] retVal = this.getTypedField(4, new CE[0]);
152 return retVal;
153 }
154
155
156
157
158
159 public CE[] getOm34_NormalTextCodesForCategoricalObservations() {
160 CE[] retVal = this.getTypedField(4, new CE[0]);
161 return retVal;
162 }
163
164
165
166
167
168
169
170 public int getNormalTextCodesForCategoricalObservationsReps() {
171 return this.getReps(4);
172 }
173
174
175
176
177
178
179
180
181 public CE getNormalTextCodesForCategoricalObservations(int rep) {
182 CE retVal = this.getTypedField(4, rep);
183 return retVal;
184 }
185
186
187
188
189
190
191
192 public CE getOm34_NormalTextCodesForCategoricalObservations(int rep) {
193 CE retVal = this.getTypedField(4, rep);
194 return retVal;
195 }
196
197
198
199
200
201
202 public int getOm34_NormalTextCodesForCategoricalObservationsReps() {
203 return this.getReps(4);
204 }
205
206
207
208
209
210
211
212
213
214 public CE insertNormalTextCodesForCategoricalObservations(int rep) throws HL7Exception {
215 return (CE) super.insertRepetition(4, rep);
216 }
217
218
219
220
221
222
223
224
225
226 public CE insertOm34_NormalTextCodesForCategoricalObservations(int rep) throws HL7Exception {
227 return (CE) super.insertRepetition(4, rep);
228 }
229
230
231
232
233
234
235
236
237
238 public CE removeNormalTextCodesForCategoricalObservations(int rep) throws HL7Exception {
239 return (CE) super.removeRepetition(4, rep);
240 }
241
242
243
244
245
246
247
248
249
250 public CE removeOm34_NormalTextCodesForCategoricalObservations(int rep) throws HL7Exception {
251 return (CE) super.removeRepetition(4, rep);
252 }
253
254
255
256
257
258
259
260
261 public CE getAbnormalTextCodesForCategoricalObservations() {
262 CE retVal = this.getTypedField(5, 0);
263 return retVal;
264 }
265
266
267
268
269
270 public CE getOm35_AbnormalTextCodesForCategoricalObservations() {
271 CE retVal = this.getTypedField(5, 0);
272 return retVal;
273 }
274
275
276
277
278
279
280
281 public CE getCriticalTextCodesForCategoricalObservations() {
282 CE retVal = this.getTypedField(6, 0);
283 return retVal;
284 }
285
286
287
288
289
290 public CE getOm36_CriticalTextCodesForCategoricalObservations() {
291 CE retVal = this.getTypedField(6, 0);
292 return retVal;
293 }
294
295
296
297
298
299
300
301 public ID getValueType() {
302 ID retVal = this.getTypedField(7, 0);
303 return retVal;
304 }
305
306
307
308
309
310 public ID getOm37_ValueType() {
311 ID retVal = this.getTypedField(7, 0);
312 return retVal;
313 }
314
315
316
317
318
319
320 protected Type createNewTypeWithoutReflection(int field) {
321 switch (field) {
322 case 0: return new NM(getMessage());
323 case 1: return new CE(getMessage());
324 case 2: return new CE(getMessage());
325 case 3: return new CE(getMessage());
326 case 4: return new CE(getMessage());
327 case 5: return new CE(getMessage());
328 case 6: return new ID(getMessage(), new Integer( 125 ));
329 default: return null;
330 }
331 }
332
333
334 }
335