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
70 @SuppressWarnings("unused")
71 public class DG1 extends AbstractSegment {
72
73
74
75
76 public DG1(Group parent, ModelClassFactory factory) {
77 super(parent, factory);
78 init(factory);
79 }
80
81 private void init(ModelClassFactory factory) {
82 try {
83 this.add(SI.class, true, 1, 4, new Object[]{ getMessage() }, "Set ID - diagnosis");
84 this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(53) }, "Diagnosis coding method");
85 this.add(ID.class, false, 1, 8, new Object[]{ getMessage(), new Integer(51) }, "Diagnosis code");
86 this.add(ST.class, false, 1, 40, new Object[]{ getMessage() }, "Diagnosis description");
87 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Diagnosis date / time");
88 this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(52) }, "Diagnosis / DRG type");
89 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Major diagnostic category");
90 this.add(ID.class, false, 1, 4, new Object[]{ getMessage(), new Integer(55) }, "Diagnostic related group");
91 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "DRG approval indicator");
92 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(56) }, "DRG grouper review code");
93 this.add(ID.class, false, 1, 60, new Object[]{ getMessage(), new Integer(83) }, "Outlier type");
94 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Outlier days");
95 this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "Outlier cost");
96 this.add(ST.class, false, 1, 4, new Object[]{ getMessage() }, "Grouper version and type");
97 this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Diagnosis / DRG priority");
98 this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Diagnosing clinician");
99 } catch(HL7Exception e) {
100 log.error("Unexpected error creating DG1 - this is probably a bug in the source code generator.", e);
101 }
102 }
103
104
105
106
107
108
109
110 public SI getSetIDDiagnosis() {
111 SI retVal = this.getTypedField(1, 0);
112 return retVal;
113 }
114
115
116
117
118
119 public SI getDg11_SetIDDiagnosis() {
120 SI retVal = this.getTypedField(1, 0);
121 return retVal;
122 }
123
124
125
126
127
128
129
130 public ID getDiagnosisCodingMethod() {
131 ID retVal = this.getTypedField(2, 0);
132 return retVal;
133 }
134
135
136
137
138
139 public ID getDg12_DiagnosisCodingMethod() {
140 ID retVal = this.getTypedField(2, 0);
141 return retVal;
142 }
143
144
145
146
147
148
149
150 public ID getDiagnosisCode() {
151 ID retVal = this.getTypedField(3, 0);
152 return retVal;
153 }
154
155
156
157
158
159 public ID getDg13_DiagnosisCode() {
160 ID retVal = this.getTypedField(3, 0);
161 return retVal;
162 }
163
164
165
166
167
168
169
170 public ST getDiagnosisDescription() {
171 ST retVal = this.getTypedField(4, 0);
172 return retVal;
173 }
174
175
176
177
178
179 public ST getDg14_DiagnosisDescription() {
180 ST retVal = this.getTypedField(4, 0);
181 return retVal;
182 }
183
184
185
186
187
188
189
190 public TS getDiagnosisDateTime() {
191 TS retVal = this.getTypedField(5, 0);
192 return retVal;
193 }
194
195
196
197
198
199 public TS getDg15_DiagnosisDateTime() {
200 TS retVal = this.getTypedField(5, 0);
201 return retVal;
202 }
203
204
205
206
207
208
209
210 public ID getDiagnosisDRGType() {
211 ID retVal = this.getTypedField(6, 0);
212 return retVal;
213 }
214
215
216
217
218
219 public ID getDg16_DiagnosisDRGType() {
220 ID retVal = this.getTypedField(6, 0);
221 return retVal;
222 }
223
224
225
226
227
228
229
230 public CE getMajorDiagnosticCategory() {
231 CE retVal = this.getTypedField(7, 0);
232 return retVal;
233 }
234
235
236
237
238
239 public CE getDg17_MajorDiagnosticCategory() {
240 CE retVal = this.getTypedField(7, 0);
241 return retVal;
242 }
243
244
245
246
247
248
249
250 public ID getDiagnosticRelatedGroup() {
251 ID retVal = this.getTypedField(8, 0);
252 return retVal;
253 }
254
255
256
257
258
259 public ID getDg18_DiagnosticRelatedGroup() {
260 ID retVal = this.getTypedField(8, 0);
261 return retVal;
262 }
263
264
265
266
267
268
269
270 public ID getDRGApprovalIndicator() {
271 ID retVal = this.getTypedField(9, 0);
272 return retVal;
273 }
274
275
276
277
278
279 public ID getDg19_DRGApprovalIndicator() {
280 ID retVal = this.getTypedField(9, 0);
281 return retVal;
282 }
283
284
285
286
287
288
289
290 public ID getDRGGrouperReviewCode() {
291 ID retVal = this.getTypedField(10, 0);
292 return retVal;
293 }
294
295
296
297
298
299 public ID getDg110_DRGGrouperReviewCode() {
300 ID retVal = this.getTypedField(10, 0);
301 return retVal;
302 }
303
304
305
306
307
308
309
310 public ID getOutlierType() {
311 ID retVal = this.getTypedField(11, 0);
312 return retVal;
313 }
314
315
316
317
318
319 public ID getDg111_OutlierType() {
320 ID retVal = this.getTypedField(11, 0);
321 return retVal;
322 }
323
324
325
326
327
328
329
330 public NM getOutlierDays() {
331 NM retVal = this.getTypedField(12, 0);
332 return retVal;
333 }
334
335
336
337
338
339 public NM getDg112_OutlierDays() {
340 NM retVal = this.getTypedField(12, 0);
341 return retVal;
342 }
343
344
345
346
347
348
349
350 public NM getOutlierCost() {
351 NM retVal = this.getTypedField(13, 0);
352 return retVal;
353 }
354
355
356
357
358
359 public NM getDg113_OutlierCost() {
360 NM retVal = this.getTypedField(13, 0);
361 return retVal;
362 }
363
364
365
366
367
368
369
370 public ST getGrouperVersionAndType() {
371 ST retVal = this.getTypedField(14, 0);
372 return retVal;
373 }
374
375
376
377
378
379 public ST getDg114_GrouperVersionAndType() {
380 ST retVal = this.getTypedField(14, 0);
381 return retVal;
382 }
383
384
385
386
387
388
389
390 public NM getDiagnosisDRGPriority() {
391 NM retVal = this.getTypedField(15, 0);
392 return retVal;
393 }
394
395
396
397
398
399 public NM getDg115_DiagnosisDRGPriority() {
400 NM retVal = this.getTypedField(15, 0);
401 return retVal;
402 }
403
404
405
406
407
408
409
410 public CN getDiagnosingClinician() {
411 CN retVal = this.getTypedField(16, 0);
412 return retVal;
413 }
414
415
416
417
418
419 public CN getDg116_DiagnosingClinician() {
420 CN retVal = this.getTypedField(16, 0);
421 return retVal;
422 }
423
424
425
426
427
428
429 protected Type createNewTypeWithoutReflection(int field) {
430 switch (field) {
431 case 0: return new SI(getMessage());
432 case 1: return new ID(getMessage(), new Integer( 53 ));
433 case 2: return new ID(getMessage(), new Integer( 51 ));
434 case 3: return new ST(getMessage());
435 case 4: return new TS(getMessage());
436 case 5: return new ID(getMessage(), new Integer( 52 ));
437 case 6: return new CE(getMessage());
438 case 7: return new ID(getMessage(), new Integer( 55 ));
439 case 8: return new ID(getMessage(), new Integer( 0 ));
440 case 9: return new ID(getMessage(), new Integer( 56 ));
441 case 10: return new ID(getMessage(), new Integer( 83 ));
442 case 11: return new NM(getMessage());
443 case 12: return new NM(getMessage());
444 case 13: return new ST(getMessage());
445 case 14: return new NM(getMessage());
446 case 15: return new CN(getMessage());
447 default: return null;
448 }
449 }
450
451
452 }
453