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.v25.segment;
35
36
37 import ca.uhn.hl7v2.model.v25.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 EVN extends AbstractSegment {
63
64
65
66
67 public EVN(Group parent, ModelClassFactory factory) {
68 super(parent, factory);
69 init(factory);
70 }
71
72 private void init(ModelClassFactory factory) {
73 try {
74 this.add(ID.class, false, 1, 3, new Object[]{ getMessage(), new Integer(3) }, "Event Type Code");
75 this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Recorded Date/Time");
76 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time Planned Event");
77 this.add(IS.class, false, 1, 3, new Object[]{ getMessage(), new Integer(62) }, "Event Reason Code");
78 this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Operator ID");
79 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Event Occurred");
80 this.add(HD.class, false, 1, 241, new Object[]{ getMessage() }, "Event Facility");
81 } catch(HL7Exception e) {
82 log.error("Unexpected error creating EVN - this is probably a bug in the source code generator.", e);
83 }
84 }
85
86
87
88
89
90
91
92 public ID getEventTypeCode() {
93 ID retVal = this.getTypedField(1, 0);
94 return retVal;
95 }
96
97
98
99
100
101 public ID getEvn1_EventTypeCode() {
102 ID retVal = this.getTypedField(1, 0);
103 return retVal;
104 }
105
106
107
108
109
110
111
112 public TS getRecordedDateTime() {
113 TS retVal = this.getTypedField(2, 0);
114 return retVal;
115 }
116
117
118
119
120
121 public TS getEvn2_RecordedDateTime() {
122 TS retVal = this.getTypedField(2, 0);
123 return retVal;
124 }
125
126
127
128
129
130
131
132 public TS getDateTimePlannedEvent() {
133 TS retVal = this.getTypedField(3, 0);
134 return retVal;
135 }
136
137
138
139
140
141 public TS getEvn3_DateTimePlannedEvent() {
142 TS retVal = this.getTypedField(3, 0);
143 return retVal;
144 }
145
146
147
148
149
150
151
152 public IS getEventReasonCode() {
153 IS retVal = this.getTypedField(4, 0);
154 return retVal;
155 }
156
157
158
159
160
161 public IS getEvn4_EventReasonCode() {
162 IS retVal = this.getTypedField(4, 0);
163 return retVal;
164 }
165
166
167
168
169
170 public XCN[] getOperatorID() {
171 XCN[] retVal = this.getTypedField(5, new XCN[0]);
172 return retVal;
173 }
174
175
176
177
178
179 public XCN[] getEvn5_OperatorID() {
180 XCN[] retVal = this.getTypedField(5, new XCN[0]);
181 return retVal;
182 }
183
184
185
186
187
188
189
190 public int getOperatorIDReps() {
191 return this.getReps(5);
192 }
193
194
195
196
197
198
199
200
201 public XCN getOperatorID(int rep) {
202 XCN retVal = this.getTypedField(5, rep);
203 return retVal;
204 }
205
206
207
208
209
210
211
212 public XCN getEvn5_OperatorID(int rep) {
213 XCN retVal = this.getTypedField(5, rep);
214 return retVal;
215 }
216
217
218
219
220
221
222 public int getEvn5_OperatorIDReps() {
223 return this.getReps(5);
224 }
225
226
227
228
229
230
231
232
233
234 public XCN insertOperatorID(int rep) throws HL7Exception {
235 return (XCN) super.insertRepetition(5, rep);
236 }
237
238
239
240
241
242
243
244
245
246 public XCN insertEvn5_OperatorID(int rep) throws HL7Exception {
247 return (XCN) super.insertRepetition(5, rep);
248 }
249
250
251
252
253
254
255
256
257
258 public XCN removeOperatorID(int rep) throws HL7Exception {
259 return (XCN) super.removeRepetition(5, rep);
260 }
261
262
263
264
265
266
267
268
269
270 public XCN removeEvn5_OperatorID(int rep) throws HL7Exception {
271 return (XCN) super.removeRepetition(5, rep);
272 }
273
274
275
276
277
278
279
280
281 public TS getEventOccurred() {
282 TS retVal = this.getTypedField(6, 0);
283 return retVal;
284 }
285
286
287
288
289
290 public TS getEvn6_EventOccurred() {
291 TS retVal = this.getTypedField(6, 0);
292 return retVal;
293 }
294
295
296
297
298
299
300
301 public HD getEventFacility() {
302 HD retVal = this.getTypedField(7, 0);
303 return retVal;
304 }
305
306
307
308
309
310 public HD getEvn7_EventFacility() {
311 HD 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 ID(getMessage(), new Integer( 3 ));
323 case 1: return new TS(getMessage());
324 case 2: return new TS(getMessage());
325 case 3: return new IS(getMessage(), new Integer( 62 ));
326 case 4: return new XCN(getMessage());
327 case 5: return new TS(getMessage());
328 case 6: return new HD(getMessage());
329 default: return null;
330 }
331 }
332
333
334 }
335