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