View Javadoc
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.v26.message;
35  
36  import ca.uhn.hl7v2.model.v26.group.*;
37  import ca.uhn.hl7v2.model.v26.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 QBP_Qnn message structure (see chapter 5.3.2.3). This structure contains the 
47   * following elements: </p>
48   * <ul>
49  		                 * <li>1: MSH (Message Header) <b> </b> </li>
50  		                 * <li>2: SFT (Software Segment) <b>optional repeating</b> </li>
51  		                 * <li>3: UAC (User Authentication Credential Segment) <b>optional </b> </li>
52  		                 * <li>4: QPD (Query Parameter Definition) <b> </b> </li>
53  		                 * <li>5: RDF (Table Row Definition) <b>optional </b> </li>
54  		                 * <li>6: RCP (Response Control Parameter) <b> </b> </li>
55  		                 * <li>7: DSC (Continuation Pointer) <b>optional </b> </li>
56  		                 * <li>8: MSH (Message Header) <b> </b> </li>
57  		                 * <li>9: SFT (Software Segment) <b>optional repeating</b> </li>
58  		                 * <li>10: UAC (User Authentication Credential Segment) <b>optional </b> </li>
59  		                 * <li>11: MSA (Message Acknowledgment) <b> </b> </li>
60  		                 * <li>12: ERR (Error) <b>optional </b> </li>
61  		                 * <li>13: QAK (Query Acknowledgment) <b> </b> </li>
62  		                 * <li>14: QPD (Query Parameter Definition) <b> </b> </li>
63  		                 * <li>15: Hxx (any HL7 segment) <b> </b> </li>
64  		                 * <li>16: DSC (Continuation Pointer) <b>optional </b> </li>
65   * </ul>
66   */
67  //@SuppressWarnings("unused")
68  public class QBP_Qnn extends AbstractMessage  {
69  
70      /**
71       * Creates a new QBP_Qnn message with DefaultModelClassFactory. 
72       */ 
73      public QBP_Qnn() { 
74         this(new DefaultModelClassFactory());
75      }
76  
77      /** 
78       * Creates a new QBP_Qnn message with custom ModelClassFactory.
79       */
80      public QBP_Qnn(ModelClassFactory factory) {
81         super(factory);
82         init(factory);
83      }
84  
85      private void init(ModelClassFactory factory) {
86         try {
87                            this.add(MSH.class, true, false);
88  	                          this.add(SFT.class, false, true);
89  	                          this.add(UAC.class, false, false);
90  	                          this.add(QPD.class, true, false);
91  	                          this.add(RDF.class, false, false);
92  	                          this.add(RCP.class, true, false);
93  	                          this.add(DSC.class, false, false);
94  	                          this.add(MSH.class, true, false);
95  	                          this.add(SFT.class, false, true);
96  	                          this.add(UAC.class, false, false);
97  	                          this.add(MSA.class, true, false);
98  	                          this.add(ERR.class, false, false);
99  	                          this.add(QAK.class, true, false);
100 	                          this.add(QPD.class, true, false);
101 	                          this.add(Hxx.class, true, false);
102 	                          this.add(DSC.class, false, false);
103 	       } catch(HL7Exception e) {
104           log.error("Unexpected error creating QBP_Qnn - this is probably a bug in the source code generator.", e);
105        }
106     }
107 
108 
109     /** 
110      * Returns "2.6"
111      */
112     public String getVersion() {
113        return "2.6";
114     }
115 
116 
117 
118 
119     /**
120      * <p>
121      * Returns
122      * MSH (Message Header) - creates it if necessary
123      * </p>
124      * 
125      *
126      */
127     public MSH getMSH() { 
128        return getTyped("MSH", MSH.class);
129     }
130 
131 
132 
133 
134 
135     /**
136      * <p>
137      * Returns
138      * the first repetition of 
139      * SFT (Software Segment) - creates it if necessary
140      * </p>
141      * 
142      *
143      */
144     public SFT getSFT() { 
145        return getTyped("SFT", SFT.class);
146     }
147 
148 
149     /**
150      * <p>
151      * Returns a specific repetition of
152      * SFT (Software Segment) - creates it if necessary
153      * </p>
154      * 
155      *
156      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
157      * @throws HL7Exception if the repetition requested is more than one 
158      *     greater than the number of existing repetitions.
159      */
160     public SFT getSFT(int rep) { 
161        return getTyped("SFT", rep, SFT.class);
162     }
163 
164     /** 
165      * <p>
166      * Returns the number of existing repetitions of SFT 
167      * </p>
168      * 
169      */ 
170     public int getSFTReps() { 
171     	return getReps("SFT");
172     } 
173 
174     /** 
175      * <p>
176      * Returns a non-modifiable List containing all current existing repetitions of SFT.
177      * <p>
178      * <p>
179      * Note that unlike {@link #getSFT()}, this method will not create any reps
180      * if none are already present, so an empty list may be returned.
181      * </p>
182      * 
183      */ 
184     public java.util.List<SFT> getSFTAll() throws HL7Exception {
185     	return getAllAsList("SFT", SFT.class);
186     } 
187 
188     /**
189      * <p>
190      * Inserts a specific repetition of SFT (Software Segment)
191      * </p>
192      * 
193      *
194      * @see AbstractGroup#insertRepetition(Structure, int) 
195      */
196     public void insertSFT(SFT structure, int rep) throws HL7Exception { 
197        super.insertRepetition( "SFT", structure, rep);
198     }
199 
200 
201     /**
202      * <p>
203      * Inserts a specific repetition of SFT (Software Segment)
204      * </p>
205      * 
206      *
207      * @see AbstractGroup#insertRepetition(Structure, int) 
208      */
209     public SFT insertSFT(int rep) throws HL7Exception { 
210        return (SFT)super.insertRepetition("SFT", rep);
211     }
212 
213 
214     /**
215      * <p>
216      * Removes a specific repetition of SFT (Software Segment)
217      * </p>
218      * 
219      *
220      * @see AbstractGroup#removeRepetition(String, int) 
221      */
222     public SFT removeSFT(int rep) throws HL7Exception { 
223        return (SFT)super.removeRepetition("SFT", rep);
224     }
225 
226 
227 
228 
229     /**
230      * <p>
231      * Returns
232      * UAC (User Authentication Credential Segment) - creates it if necessary
233      * </p>
234      * 
235      *
236      */
237     public UAC getUAC() { 
238        return getTyped("UAC", UAC.class);
239     }
240 
241 
242 
243 
244 
245     /**
246      * <p>
247      * Returns
248      * QPD (Query Parameter Definition) - creates it if necessary
249      * </p>
250      * 
251      *
252      */
253     public QPD getQPD() { 
254        return getTyped("QPD", QPD.class);
255     }
256 
257 
258 
259 
260 
261     /**
262      * <p>
263      * Returns
264      * RDF (Table Row Definition) - creates it if necessary
265      * </p>
266      * 
267      *
268      */
269     public RDF getRDF() { 
270        return getTyped("RDF", RDF.class);
271     }
272 
273 
274 
275 
276 
277     /**
278      * <p>
279      * Returns
280      * RCP (Response Control Parameter) - creates it if necessary
281      * </p>
282      * 
283      *
284      */
285     public RCP getRCP() { 
286        return getTyped("RCP", RCP.class);
287     }
288 
289 
290 
291 
292 
293     /**
294      * <p>
295      * Returns
296      * DSC (Continuation Pointer) - creates it if necessary
297      * </p>
298      * 
299      *
300      */
301     public DSC getDSC() { 
302        return getTyped("DSC", DSC.class);
303     }
304 
305 
306 
307 
308 
309     /**
310      * <p>
311      * Returns
312      * MSH2 (Message Header) - creates it if necessary
313      * </p>
314      * 
315      *
316      */
317     public MSH getMSH2() { 
318        return getTyped("MSH2", MSH.class);
319     }
320 
321 
322 
323 
324 
325     /**
326      * <p>
327      * Returns
328      * the first repetition of 
329      * SFT2 (Software Segment) - creates it if necessary
330      * </p>
331      * 
332      *
333      */
334     public SFT getSFT2() { 
335        return getTyped("SFT2", SFT.class);
336     }
337 
338 
339     /**
340      * <p>
341      * Returns a specific repetition of
342      * SFT2 (Software Segment) - creates it if necessary
343      * </p>
344      * 
345      *
346      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
347      * @throws HL7Exception if the repetition requested is more than one 
348      *     greater than the number of existing repetitions.
349      */
350     public SFT getSFT2(int rep) { 
351        return getTyped("SFT2", rep, SFT.class);
352     }
353 
354     /** 
355      * <p>
356      * Returns the number of existing repetitions of SFT2 
357      * </p>
358      * 
359      */ 
360     public int getSFT2Reps() { 
361     	return getReps("SFT2");
362     } 
363 
364     /** 
365      * <p>
366      * Returns a non-modifiable List containing all current existing repetitions of SFT2.
367      * <p>
368      * <p>
369      * Note that unlike {@link #getSFT2()}, this method will not create any reps
370      * if none are already present, so an empty list may be returned.
371      * </p>
372      * 
373      */ 
374     public java.util.List<SFT> getSFT2All() throws HL7Exception {
375     	return getAllAsList("SFT2", SFT.class);
376     } 
377 
378     /**
379      * <p>
380      * Inserts a specific repetition of SFT2 (Software Segment)
381      * </p>
382      * 
383      *
384      * @see AbstractGroup#insertRepetition(Structure, int) 
385      */
386     public void insertSFT2(SFT structure, int rep) throws HL7Exception { 
387        super.insertRepetition( "SFT2", structure, rep);
388     }
389 
390 
391     /**
392      * <p>
393      * Inserts a specific repetition of SFT2 (Software Segment)
394      * </p>
395      * 
396      *
397      * @see AbstractGroup#insertRepetition(Structure, int) 
398      */
399     public SFT insertSFT2(int rep) throws HL7Exception { 
400        return (SFT)super.insertRepetition("SFT2", rep);
401     }
402 
403 
404     /**
405      * <p>
406      * Removes a specific repetition of SFT2 (Software Segment)
407      * </p>
408      * 
409      *
410      * @see AbstractGroup#removeRepetition(String, int) 
411      */
412     public SFT removeSFT2(int rep) throws HL7Exception { 
413        return (SFT)super.removeRepetition("SFT2", rep);
414     }
415 
416 
417 
418 
419     /**
420      * <p>
421      * Returns
422      * UAC2 (User Authentication Credential Segment) - creates it if necessary
423      * </p>
424      * 
425      *
426      */
427     public UAC getUAC2() { 
428        return getTyped("UAC2", UAC.class);
429     }
430 
431 
432 
433 
434 
435     /**
436      * <p>
437      * Returns
438      * MSA (Message Acknowledgment) - creates it if necessary
439      * </p>
440      * 
441      *
442      */
443     public MSA getMSA() { 
444        return getTyped("MSA", MSA.class);
445     }
446 
447 
448 
449 
450 
451     /**
452      * <p>
453      * Returns
454      * ERR (Error) - creates it if necessary
455      * </p>
456      * 
457      *
458      */
459     public ERR getERR() { 
460        return getTyped("ERR", ERR.class);
461     }
462 
463 
464 
465 
466 
467     /**
468      * <p>
469      * Returns
470      * QAK (Query Acknowledgment) - creates it if necessary
471      * </p>
472      * 
473      *
474      */
475     public QAK getQAK() { 
476        return getTyped("QAK", QAK.class);
477     }
478 
479 
480 
481 
482 
483     /**
484      * <p>
485      * Returns
486      * QPD2 (Query Parameter Definition) - creates it if necessary
487      * </p>
488      * 
489      *
490      */
491     public QPD getQPD2() { 
492        return getTyped("QPD2", QPD.class);
493     }
494 
495 
496 
497 
498 
499     /**
500      * <p>
501      * Returns
502      * Hxx (any HL7 segment) - creates it if necessary
503      * </p>
504      * 
505      *
506      */
507     public Hxx getHxx() { 
508        return getTyped("Hxx", Hxx.class);
509     }
510 
511 
512 
513 
514 
515     /**
516      * <p>
517      * Returns
518      * DSC2 (Continuation Pointer) - creates it if necessary
519      * </p>
520      * 
521      *
522      */
523     public DSC getDSC2() { 
524        return getTyped("DSC2", DSC.class);
525     }
526 
527 
528 
529 
530 }
531