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
61
62
63 @SuppressWarnings("unused")
64 public class NSC extends AbstractSegment {
65
66
67
68
69 public NSC(Group parent, ModelClassFactory factory) {
70 super(parent, factory);
71 init(factory);
72 }
73
74 private void init(ModelClassFactory factory) {
75 try {
76 this.add(CWE.class, true, 1, 0, new Object[]{ getMessage() }, "Application Change Type");
77 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Current CPU");
78 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Current Fileserver");
79 this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "Current Application");
80 this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "Current Facility");
81 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "New CPU");
82 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "New Fileserver");
83 this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "New Application");
84 this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "New Facility");
85 } catch(HL7Exception e) {
86 log.error("Unexpected error creating NSC - this is probably a bug in the source code generator.", e);
87 }
88 }
89
90
91
92
93
94
95
96 public CWE getApplicationChangeType() {
97 CWE retVal = this.getTypedField(1, 0);
98 return retVal;
99 }
100
101
102
103
104
105 public CWE getNsc1_ApplicationChangeType() {
106 CWE retVal = this.getTypedField(1, 0);
107 return retVal;
108 }
109
110
111
112
113
114
115
116 public ST getCurrentCPU() {
117 ST retVal = this.getTypedField(2, 0);
118 return retVal;
119 }
120
121
122
123
124
125 public ST getNsc2_CurrentCPU() {
126 ST retVal = this.getTypedField(2, 0);
127 return retVal;
128 }
129
130
131
132
133
134
135
136 public ST getCurrentFileserver() {
137 ST retVal = this.getTypedField(3, 0);
138 return retVal;
139 }
140
141
142
143
144
145 public ST getNsc3_CurrentFileserver() {
146 ST retVal = this.getTypedField(3, 0);
147 return retVal;
148 }
149
150
151
152
153
154
155
156 public HD getCurrentApplication() {
157 HD retVal = this.getTypedField(4, 0);
158 return retVal;
159 }
160
161
162
163
164
165 public HD getNsc4_CurrentApplication() {
166 HD retVal = this.getTypedField(4, 0);
167 return retVal;
168 }
169
170
171
172
173
174
175
176 public HD getCurrentFacility() {
177 HD retVal = this.getTypedField(5, 0);
178 return retVal;
179 }
180
181
182
183
184
185 public HD getNsc5_CurrentFacility() {
186 HD retVal = this.getTypedField(5, 0);
187 return retVal;
188 }
189
190
191
192
193
194
195
196 public ST getNewCPU() {
197 ST retVal = this.getTypedField(6, 0);
198 return retVal;
199 }
200
201
202
203
204
205 public ST getNsc6_NewCPU() {
206 ST retVal = this.getTypedField(6, 0);
207 return retVal;
208 }
209
210
211
212
213
214
215
216 public ST getNewFileserver() {
217 ST retVal = this.getTypedField(7, 0);
218 return retVal;
219 }
220
221
222
223
224
225 public ST getNsc7_NewFileserver() {
226 ST retVal = this.getTypedField(7, 0);
227 return retVal;
228 }
229
230
231
232
233
234
235
236 public HD getNewApplication() {
237 HD retVal = this.getTypedField(8, 0);
238 return retVal;
239 }
240
241
242
243
244
245 public HD getNsc8_NewApplication() {
246 HD retVal = this.getTypedField(8, 0);
247 return retVal;
248 }
249
250
251
252
253
254
255
256 public HD getNewFacility() {
257 HD retVal = this.getTypedField(9, 0);
258 return retVal;
259 }
260
261
262
263
264
265 public HD getNsc9_NewFacility() {
266 HD retVal = this.getTypedField(9, 0);
267 return retVal;
268 }
269
270
271
272
273
274
275 protected Type createNewTypeWithoutReflection(int field) {
276 switch (field) {
277 case 0: return new CWE(getMessage());
278 case 1: return new ST(getMessage());
279 case 2: return new ST(getMessage());
280 case 3: return new HD(getMessage());
281 case 4: return new HD(getMessage());
282 case 5: return new ST(getMessage());
283 case 6: return new ST(getMessage());
284 case 7: return new HD(getMessage());
285 case 8: return new HD(getMessage());
286 default: return null;
287 }
288 }
289
290
291 }
292