1 /*
2 * This class is an auto-generated source file for a HAPI
3 * HL7 v2.x standard structure class.
4 *
5 * For more information, visit: http://hl7api.sourceforge.net/
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * (the "License"); you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
12 * specific language governing rights and limitations under the License.
13 *
14 * The Original Code is "[file_name]". Description:
15 * "[one_line_description]"
16 *
17 * The Initial Developer of the Original Code is University Health Network. Copyright (C)
18 * 2012. All Rights Reserved.
19 *
20 * Contributor(s): ______________________________________.
21 *
22 * Alternatively, the contents of this file may be used under the terms of the
23 * GNU General Public License (the "GPL"), in which case the provisions of the GPL are
24 * applicable instead of those above. If you wish to allow use of your version of this
25 * file only under the terms of the GPL and not to allow others to use your version
26 * of this file under the MPL, indicate your decision by deleting the provisions above
27 * and replace them with the notice and other provisions required by the GPL License.
28 * If you do not delete the provisions above, a recipient may use your version of
29 * this file under either the MPL or the GPL.
30 *
31 */
32
33
34 package ca.uhn.hl7v2.model.v281.message;
35
36 import ca.uhn.hl7v2.model.v281.group.*;
37 import ca.uhn.hl7v2.model.v281.segment.*;
38
39 import ca.uhn.hl7v2.HL7Exception;
40 import ca.uhn.hl7v2.parser.ModelClassFactory;
41 import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
42 import ca.uhn.hl7v2.model.*;
43
44
45 /**
46 * <p>Represents a RTB_Z74 message structure (see chapter 4.6.2). This structure contains the
47 * following elements: </p>
48 * <ul>
49 * <li>1: MSH (Message Header) <b> </b> </li>
50 * <li>2: MSA (Message Acknowledgment) <b> </b> </li>
51 * <li>3: ERR (Error) <b>optional repeating</b> </li>
52 * <li>4: SFT (Software Segment) <b>optional repeating</b> </li>
53 * <li>5: UAC (User Authentication Credential Segment) <b>optional </b> </li>
54 * <li>6: QAK (Query Acknowledgment) <b> </b> </li>
55 * <li>7: QPD (Query Parameter Definition) <b> </b> </li>
56 * <li>8: RTB_Z74_ROW_DEFINITION (a Group object) <b>optional </b> </li>
57 * <li>9: DSC (Continuation Pointer) <b>optional </b> </li>
58 * </ul>
59 */
60 //@SuppressWarnings("unused")
61 public class RTB_Z74 extends AbstractMessage {
62
63 /**
64 * Creates a new RTB_Z74 message with DefaultModelClassFactory.
65 */
66 public RTB_Z74() {
67 this(new DefaultModelClassFactory());
68 }
69
70 /**
71 * Creates a new RTB_Z74 message with custom ModelClassFactory.
72 */
73 public RTB_Z74(ModelClassFactory factory) {
74 super(factory);
75 init(factory);
76 }
77
78 private void init(ModelClassFactory factory) {
79 try {
80 this.add(MSH.class, true, false);
81 this.add(MSA.class, true, false);
82 this.add(ERR.class, false, true);
83 this.add(SFT.class, false, true);
84 this.add(UAC.class, false, false);
85 this.add(QAK.class, true, false);
86 this.add(QPD.class, true, false);
87 this.add(RTB_Z74_ROW_DEFINITION.class, false, false);
88 this.add(DSC.class, false, false);
89 } catch(HL7Exception e) {
90 log.error("Unexpected error creating RTB_Z74 - this is probably a bug in the source code generator.", e);
91 }
92 }
93
94
95 /**
96 * Returns "2.8.1"
97 */
98 public String getVersion() {
99 return "2.8.1";
100 }
101
102
103
104
105 /**
106 * <p>
107 * Returns
108 * MSH (Message Header) - creates it if necessary
109 * </p>
110 *
111 *
112 */
113 public MSH getMSH() {
114 return getTyped("MSH", MSH.class);
115 }
116
117
118
119
120
121 /**
122 * <p>
123 * Returns
124 * MSA (Message Acknowledgment) - creates it if necessary
125 * </p>
126 *
127 *
128 */
129 public MSA getMSA() {
130 return getTyped("MSA", MSA.class);
131 }
132
133
134
135
136
137 /**
138 * <p>
139 * Returns
140 * the first repetition of
141 * ERR (Error) - creates it if necessary
142 * </p>
143 *
144 *
145 */
146 public ERR getERR() {
147 return getTyped("ERR", ERR.class);
148 }
149
150
151 /**
152 * <p>
153 * Returns a specific repetition of
154 * ERR (Error) - creates it if necessary
155 * </p>
156 *
157 *
158 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
159 * @throws HL7Exception if the repetition requested is more than one
160 * greater than the number of existing repetitions.
161 */
162 public ERR getERR(int rep) {
163 return getTyped("ERR", rep, ERR.class);
164 }
165
166 /**
167 * <p>
168 * Returns the number of existing repetitions of ERR
169 * </p>
170 *
171 */
172 public int getERRReps() {
173 return getReps("ERR");
174 }
175
176 /**
177 * <p>
178 * Returns a non-modifiable List containing all current existing repetitions of ERR.
179 * <p>
180 * <p>
181 * Note that unlike {@link #getERR()}, this method will not create any reps
182 * if none are already present, so an empty list may be returned.
183 * </p>
184 *
185 */
186 public java.util.List<ERR> getERRAll() throws HL7Exception {
187 return getAllAsList("ERR", ERR.class);
188 }
189
190 /**
191 * <p>
192 * Inserts a specific repetition of ERR (Error)
193 * </p>
194 *
195 *
196 * @see AbstractGroup#insertRepetition(Structure, int)
197 */
198 public void insertERR(ERR structure, int rep) throws HL7Exception {
199 super.insertRepetition( "ERR", structure, rep);
200 }
201
202
203 /**
204 * <p>
205 * Inserts a specific repetition of ERR (Error)
206 * </p>
207 *
208 *
209 * @see AbstractGroup#insertRepetition(Structure, int)
210 */
211 public ERR insertERR(int rep) throws HL7Exception {
212 return (ERR)super.insertRepetition("ERR", rep);
213 }
214
215
216 /**
217 * <p>
218 * Removes a specific repetition of ERR (Error)
219 * </p>
220 *
221 *
222 * @see AbstractGroup#removeRepetition(String, int)
223 */
224 public ERR removeERR(int rep) throws HL7Exception {
225 return (ERR)super.removeRepetition("ERR", rep);
226 }
227
228
229
230
231 /**
232 * <p>
233 * Returns
234 * the first repetition of
235 * SFT (Software Segment) - creates it if necessary
236 * </p>
237 *
238 *
239 */
240 public SFT getSFT() {
241 return getTyped("SFT", SFT.class);
242 }
243
244
245 /**
246 * <p>
247 * Returns a specific repetition of
248 * SFT (Software Segment) - creates it if necessary
249 * </p>
250 *
251 *
252 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
253 * @throws HL7Exception if the repetition requested is more than one
254 * greater than the number of existing repetitions.
255 */
256 public SFT getSFT(int rep) {
257 return getTyped("SFT", rep, SFT.class);
258 }
259
260 /**
261 * <p>
262 * Returns the number of existing repetitions of SFT
263 * </p>
264 *
265 */
266 public int getSFTReps() {
267 return getReps("SFT");
268 }
269
270 /**
271 * <p>
272 * Returns a non-modifiable List containing all current existing repetitions of SFT.
273 * <p>
274 * <p>
275 * Note that unlike {@link #getSFT()}, this method will not create any reps
276 * if none are already present, so an empty list may be returned.
277 * </p>
278 *
279 */
280 public java.util.List<SFT> getSFTAll() throws HL7Exception {
281 return getAllAsList("SFT", SFT.class);
282 }
283
284 /**
285 * <p>
286 * Inserts a specific repetition of SFT (Software Segment)
287 * </p>
288 *
289 *
290 * @see AbstractGroup#insertRepetition(Structure, int)
291 */
292 public void insertSFT(SFT structure, int rep) throws HL7Exception {
293 super.insertRepetition( "SFT", structure, rep);
294 }
295
296
297 /**
298 * <p>
299 * Inserts a specific repetition of SFT (Software Segment)
300 * </p>
301 *
302 *
303 * @see AbstractGroup#insertRepetition(Structure, int)
304 */
305 public SFT insertSFT(int rep) throws HL7Exception {
306 return (SFT)super.insertRepetition("SFT", rep);
307 }
308
309
310 /**
311 * <p>
312 * Removes a specific repetition of SFT (Software Segment)
313 * </p>
314 *
315 *
316 * @see AbstractGroup#removeRepetition(String, int)
317 */
318 public SFT removeSFT(int rep) throws HL7Exception {
319 return (SFT)super.removeRepetition("SFT", rep);
320 }
321
322
323
324
325 /**
326 * <p>
327 * Returns
328 * UAC (User Authentication Credential Segment) - creates it if necessary
329 * </p>
330 *
331 *
332 */
333 public UAC getUAC() {
334 return getTyped("UAC", UAC.class);
335 }
336
337
338
339
340
341 /**
342 * <p>
343 * Returns
344 * QAK (Query Acknowledgment) - creates it if necessary
345 * </p>
346 *
347 *
348 */
349 public QAK getQAK() {
350 return getTyped("QAK", QAK.class);
351 }
352
353
354
355
356
357 /**
358 * <p>
359 * Returns
360 * QPD (Query Parameter Definition) - creates it if necessary
361 * </p>
362 *
363 *
364 */
365 public QPD getQPD() {
366 return getTyped("QPD", QPD.class);
367 }
368
369
370
371
372
373 /**
374 * <p>
375 * Returns
376 * ROW_DEFINITION (a Group object) - creates it if necessary
377 * </p>
378 *
379 *
380 */
381 public RTB_Z74_ROW_DEFINITION getROW_DEFINITION() {
382 return getTyped("ROW_DEFINITION", RTB_Z74_ROW_DEFINITION.class);
383 }
384
385
386
387
388
389 /**
390 * <p>
391 * Returns
392 * DSC (Continuation Pointer) - creates it if necessary
393 * </p>
394 *
395 *
396 */
397 public DSC getDSC() {
398 return getTyped("DSC", DSC.class);
399 }
400
401
402
403
404 }
405