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.v28.group;
35  
36  import ca.uhn.hl7v2.model.v28.segment.*;
37  
38  import ca.uhn.hl7v2.HL7Exception;
39  import ca.uhn.hl7v2.parser.ModelClassFactory;
40  import ca.uhn.hl7v2.model.*;
41  
42  /**
43   * <p>Represents a OUL_R24_ORDER group structure (a Group object).
44   * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
45   * This Group contains the following elements:  
46   * </p>
47   * <ul>
48                           * <li>1: OBR (Observation Request) <b>  </b></li>
49                           * <li>2: PRT (Participation Information) <b>optional repeating </b></li>
50                           * <li>3: OUL_R24_COMMON_ORDER (a Group object) <b>optional  </b></li>
51                           * <li>4: NTE (Notes and Comments) <b>optional repeating </b></li>
52                           * <li>5: PRT (Participation Information) <b>optional repeating </b></li>
53                           * <li>6: OUL_R24_TIMING_QTY (a Group object) <b>optional repeating </b></li>
54                           * <li>7: OUL_R24_SPECIMEN (a Group object) <b>optional repeating </b></li>
55                           * <li>8: OUL_R24_RESULT (a Group object) <b>optional repeating </b></li>
56                           * <li>9: CTI (Clinical Trial Identification) <b>optional repeating </b></li>
57   * </ul>
58   */
59  //@SuppressWarnings("unused")
60  public class OUL_R24_ORDER extends AbstractGroup {
61  
62      /** 
63       * Creates a new OUL_R24_ORDER group
64       */
65      public OUL_R24_ORDER(Group parent, ModelClassFactory factory) {
66         super(parent, factory);
67         init(factory);
68      }
69  
70      private void init(ModelClassFactory factory) {
71         try {
72                                    this.add(OBR.class, true, false, false);
73                                    this.add(PRT.class, false, true, false);
74                                    this.add(OUL_R24_COMMON_ORDER.class, false, false, false);
75                                    this.add(NTE.class, false, true, false);
76                                    this.add(PRT.class, false, true, false);
77                                    this.add(OUL_R24_TIMING_QTY.class, false, true, false);
78                                    this.add(OUL_R24_SPECIMEN.class, false, true, false);
79                                    this.add(OUL_R24_RESULT.class, false, true, false);
80                                    this.add(CTI.class, false, true, false);
81         } catch(HL7Exception e) {
82            log.error("Unexpected error creating OUL_R24_ORDER - this is probably a bug in the source code generator.", e);
83         }
84      }
85  
86      /** 
87       * Returns "2.8"
88       */
89      public String getVersion() {
90         return "2.8";
91      }
92  
93  
94  
95      /**
96       * Returns
97       * OBR (Observation Request) - creates it if necessary
98       */
99      public OBR getOBR() { 
100        OBR retVal = getTyped("OBR", OBR.class);
101        return retVal;
102     }
103 
104 
105 
106 
107     /**
108      * Returns
109      * the first repetition of 
110      * PRT (Participation Information) - creates it if necessary
111      */
112     public PRT getPRT() { 
113        PRT retVal = getTyped("PRT", PRT.class);
114        return retVal;
115     }
116 
117 
118     /**
119      * Returns a specific repetition of
120      * PRT (Participation Information) - creates it if necessary
121      *
122      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
123      * @throws HL7Exception if the repetition requested is more than one 
124      *     greater than the number of existing repetitions.
125      */
126     public PRT getPRT(int rep) { 
127        PRT retVal = getTyped("PRT", rep, PRT.class);
128        return retVal;
129     }
130 
131     /** 
132      * Returns the number of existing repetitions of PRT 
133      */ 
134     public int getPRTReps() {  
135         return getReps("PRT");
136     } 
137 
138     /** 
139      * <p>
140      * Returns a non-modifiable List containing all current existing repetitions of PRT.
141      * <p>
142      * <p>
143      * Note that unlike {@link #getPRT()}, this method will not create any reps
144      * if none are already present, so an empty list may be returned.
145      * </p>
146      */ 
147     public java.util.List<PRT> getPRTAll() throws HL7Exception {
148     	return getAllAsList("PRT", PRT.class);
149     } 
150 
151     /**
152      * Inserts a specific repetition of PRT (Participation Information)
153      * @see AbstractGroup#insertRepetition(Structure, int) 
154      */
155     public void insertPRT(PRT structure, int rep) throws HL7Exception { 
156        super.insertRepetition("PRT", structure, rep);
157     }
158 
159 
160     /**
161      * Inserts a specific repetition of PRT (Participation Information)
162      * @see AbstractGroup#insertRepetition(Structure, int) 
163      */
164     public PRT insertPRT(int rep) throws HL7Exception { 
165        return (PRT)super.insertRepetition("PRT", rep);
166     }
167 
168 
169     /**
170      * Removes a specific repetition of PRT (Participation Information)
171      * @see AbstractGroup#removeRepetition(String, int) 
172      */
173     public PRT removePRT(int rep) throws HL7Exception { 
174        return (PRT)super.removeRepetition("PRT", rep);
175     }
176 
177 
178 
179     /**
180      * Returns
181      * COMMON_ORDER (a Group object) - creates it if necessary
182      */
183     public OUL_R24_COMMON_ORDER getCOMMON_ORDER() { 
184        OUL_R24_COMMON_ORDER retVal = getTyped("COMMON_ORDER", OUL_R24_COMMON_ORDER.class);
185        return retVal;
186     }
187 
188 
189 
190 
191     /**
192      * Returns
193      * the first repetition of 
194      * NTE (Notes and Comments) - creates it if necessary
195      */
196     public NTE getNTE() { 
197        NTE retVal = getTyped("NTE", NTE.class);
198        return retVal;
199     }
200 
201 
202     /**
203      * Returns a specific repetition of
204      * NTE (Notes and Comments) - creates it if necessary
205      *
206      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
207      * @throws HL7Exception if the repetition requested is more than one 
208      *     greater than the number of existing repetitions.
209      */
210     public NTE getNTE(int rep) { 
211        NTE retVal = getTyped("NTE", rep, NTE.class);
212        return retVal;
213     }
214 
215     /** 
216      * Returns the number of existing repetitions of NTE 
217      */ 
218     public int getNTEReps() {  
219         return getReps("NTE");
220     } 
221 
222     /** 
223      * <p>
224      * Returns a non-modifiable List containing all current existing repetitions of NTE.
225      * <p>
226      * <p>
227      * Note that unlike {@link #getNTE()}, this method will not create any reps
228      * if none are already present, so an empty list may be returned.
229      * </p>
230      */ 
231     public java.util.List<NTE> getNTEAll() throws HL7Exception {
232     	return getAllAsList("NTE", NTE.class);
233     } 
234 
235     /**
236      * Inserts a specific repetition of NTE (Notes and Comments)
237      * @see AbstractGroup#insertRepetition(Structure, int) 
238      */
239     public void insertNTE(NTE structure, int rep) throws HL7Exception { 
240        super.insertRepetition("NTE", structure, rep);
241     }
242 
243 
244     /**
245      * Inserts a specific repetition of NTE (Notes and Comments)
246      * @see AbstractGroup#insertRepetition(Structure, int) 
247      */
248     public NTE insertNTE(int rep) throws HL7Exception { 
249        return (NTE)super.insertRepetition("NTE", rep);
250     }
251 
252 
253     /**
254      * Removes a specific repetition of NTE (Notes and Comments)
255      * @see AbstractGroup#removeRepetition(String, int) 
256      */
257     public NTE removeNTE(int rep) throws HL7Exception { 
258        return (NTE)super.removeRepetition("NTE", rep);
259     }
260 
261 
262 
263     /**
264      * Returns
265      * the first repetition of 
266      * PRT2 (Participation Information) - creates it if necessary
267      */
268     public PRT getPRT2() { 
269        PRT retVal = getTyped("PRT2", PRT.class);
270        return retVal;
271     }
272 
273 
274     /**
275      * Returns a specific repetition of
276      * PRT (Participation Information) - creates it if necessary
277      *
278      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
279      * @throws HL7Exception if the repetition requested is more than one 
280      *     greater than the number of existing repetitions.
281      */
282     public PRT getPRT2(int rep) { 
283        PRT retVal = getTyped("PRT2", rep, PRT.class);
284        return retVal;
285     }
286 
287     /** 
288      * Returns the number of existing repetitions of PRT2 
289      */ 
290     public int getPRT2Reps() {  
291         return getReps("PRT2");
292     } 
293 
294     /** 
295      * <p>
296      * Returns a non-modifiable List containing all current existing repetitions of PRT2.
297      * <p>
298      * <p>
299      * Note that unlike {@link #getPRT2()}, this method will not create any reps
300      * if none are already present, so an empty list may be returned.
301      * </p>
302      */ 
303     public java.util.List<PRT> getPRT2All() throws HL7Exception {
304     	return getAllAsList("PRT2", PRT.class);
305     } 
306 
307     /**
308      * Inserts a specific repetition of PRT2 (Participation Information)
309      * @see AbstractGroup#insertRepetition(Structure, int) 
310      */
311     public void insertPRT2(PRT structure, int rep) throws HL7Exception { 
312        super.insertRepetition("PRT2", structure, rep);
313     }
314 
315 
316     /**
317      * Inserts a specific repetition of PRT2 (Participation Information)
318      * @see AbstractGroup#insertRepetition(Structure, int) 
319      */
320     public PRT insertPRT2(int rep) throws HL7Exception { 
321        return (PRT)super.insertRepetition("PRT2", rep);
322     }
323 
324 
325     /**
326      * Removes a specific repetition of PRT2 (Participation Information)
327      * @see AbstractGroup#removeRepetition(String, int) 
328      */
329     public PRT removePRT2(int rep) throws HL7Exception { 
330        return (PRT)super.removeRepetition("PRT2", rep);
331     }
332 
333 
334 
335     /**
336      * Returns
337      * the first repetition of 
338      * TIMING_QTY (a Group object) - creates it if necessary
339      */
340     public OUL_R24_TIMING_QTY getTIMING_QTY() { 
341        OUL_R24_TIMING_QTY retVal = getTyped("TIMING_QTY", OUL_R24_TIMING_QTY.class);
342        return retVal;
343     }
344 
345 
346     /**
347      * Returns a specific repetition of
348      * TIMING_QTY (a Group object) - creates it if necessary
349      *
350      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
351      * @throws HL7Exception if the repetition requested is more than one 
352      *     greater than the number of existing repetitions.
353      */
354     public OUL_R24_TIMING_QTY getTIMING_QTY(int rep) { 
355        OUL_R24_TIMING_QTY retVal = getTyped("TIMING_QTY", rep, OUL_R24_TIMING_QTY.class);
356        return retVal;
357     }
358 
359     /** 
360      * Returns the number of existing repetitions of TIMING_QTY 
361      */ 
362     public int getTIMING_QTYReps() {  
363         return getReps("TIMING_QTY");
364     } 
365 
366     /** 
367      * <p>
368      * Returns a non-modifiable List containing all current existing repetitions of TIMING_QTY.
369      * <p>
370      * <p>
371      * Note that unlike {@link #getTIMING_QTY()}, this method will not create any reps
372      * if none are already present, so an empty list may be returned.
373      * </p>
374      */ 
375     public java.util.List<OUL_R24_TIMING_QTY> getTIMING_QTYAll() throws HL7Exception {
376     	return getAllAsList("TIMING_QTY", OUL_R24_TIMING_QTY.class);
377     } 
378 
379     /**
380      * Inserts a specific repetition of TIMING_QTY (a Group object)
381      * @see AbstractGroup#insertRepetition(Structure, int) 
382      */
383     public void insertTIMING_QTY(OUL_R24_TIMING_QTY structure, int rep) throws HL7Exception { 
384        super.insertRepetition("TIMING_QTY", structure, rep);
385     }
386 
387 
388     /**
389      * Inserts a specific repetition of TIMING_QTY (a Group object)
390      * @see AbstractGroup#insertRepetition(Structure, int) 
391      */
392     public OUL_R24_TIMING_QTY insertTIMING_QTY(int rep) throws HL7Exception { 
393        return (OUL_R24_TIMING_QTY)super.insertRepetition("TIMING_QTY", rep);
394     }
395 
396 
397     /**
398      * Removes a specific repetition of TIMING_QTY (a Group object)
399      * @see AbstractGroup#removeRepetition(String, int) 
400      */
401     public OUL_R24_TIMING_QTY removeTIMING_QTY(int rep) throws HL7Exception { 
402        return (OUL_R24_TIMING_QTY)super.removeRepetition("TIMING_QTY", rep);
403     }
404 
405 
406 
407     /**
408      * Returns
409      * the first repetition of 
410      * SPECIMEN (a Group object) - creates it if necessary
411      */
412     public OUL_R24_SPECIMEN getSPECIMEN() { 
413        OUL_R24_SPECIMEN retVal = getTyped("SPECIMEN", OUL_R24_SPECIMEN.class);
414        return retVal;
415     }
416 
417 
418     /**
419      * Returns a specific repetition of
420      * SPECIMEN (a Group object) - creates it if necessary
421      *
422      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
423      * @throws HL7Exception if the repetition requested is more than one 
424      *     greater than the number of existing repetitions.
425      */
426     public OUL_R24_SPECIMEN getSPECIMEN(int rep) { 
427        OUL_R24_SPECIMEN retVal = getTyped("SPECIMEN", rep, OUL_R24_SPECIMEN.class);
428        return retVal;
429     }
430 
431     /** 
432      * Returns the number of existing repetitions of SPECIMEN 
433      */ 
434     public int getSPECIMENReps() {  
435         return getReps("SPECIMEN");
436     } 
437 
438     /** 
439      * <p>
440      * Returns a non-modifiable List containing all current existing repetitions of SPECIMEN.
441      * <p>
442      * <p>
443      * Note that unlike {@link #getSPECIMEN()}, this method will not create any reps
444      * if none are already present, so an empty list may be returned.
445      * </p>
446      */ 
447     public java.util.List<OUL_R24_SPECIMEN> getSPECIMENAll() throws HL7Exception {
448     	return getAllAsList("SPECIMEN", OUL_R24_SPECIMEN.class);
449     } 
450 
451     /**
452      * Inserts a specific repetition of SPECIMEN (a Group object)
453      * @see AbstractGroup#insertRepetition(Structure, int) 
454      */
455     public void insertSPECIMEN(OUL_R24_SPECIMEN structure, int rep) throws HL7Exception { 
456        super.insertRepetition("SPECIMEN", structure, rep);
457     }
458 
459 
460     /**
461      * Inserts a specific repetition of SPECIMEN (a Group object)
462      * @see AbstractGroup#insertRepetition(Structure, int) 
463      */
464     public OUL_R24_SPECIMEN insertSPECIMEN(int rep) throws HL7Exception { 
465        return (OUL_R24_SPECIMEN)super.insertRepetition("SPECIMEN", rep);
466     }
467 
468 
469     /**
470      * Removes a specific repetition of SPECIMEN (a Group object)
471      * @see AbstractGroup#removeRepetition(String, int) 
472      */
473     public OUL_R24_SPECIMEN removeSPECIMEN(int rep) throws HL7Exception { 
474        return (OUL_R24_SPECIMEN)super.removeRepetition("SPECIMEN", rep);
475     }
476 
477 
478 
479     /**
480      * Returns
481      * the first repetition of 
482      * RESULT (a Group object) - creates it if necessary
483      */
484     public OUL_R24_RESULT getRESULT() { 
485        OUL_R24_RESULT retVal = getTyped("RESULT", OUL_R24_RESULT.class);
486        return retVal;
487     }
488 
489 
490     /**
491      * Returns a specific repetition of
492      * RESULT (a Group object) - creates it if necessary
493      *
494      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
495      * @throws HL7Exception if the repetition requested is more than one 
496      *     greater than the number of existing repetitions.
497      */
498     public OUL_R24_RESULT getRESULT(int rep) { 
499        OUL_R24_RESULT retVal = getTyped("RESULT", rep, OUL_R24_RESULT.class);
500        return retVal;
501     }
502 
503     /** 
504      * Returns the number of existing repetitions of RESULT 
505      */ 
506     public int getRESULTReps() {  
507         return getReps("RESULT");
508     } 
509 
510     /** 
511      * <p>
512      * Returns a non-modifiable List containing all current existing repetitions of RESULT.
513      * <p>
514      * <p>
515      * Note that unlike {@link #getRESULT()}, this method will not create any reps
516      * if none are already present, so an empty list may be returned.
517      * </p>
518      */ 
519     public java.util.List<OUL_R24_RESULT> getRESULTAll() throws HL7Exception {
520     	return getAllAsList("RESULT", OUL_R24_RESULT.class);
521     } 
522 
523     /**
524      * Inserts a specific repetition of RESULT (a Group object)
525      * @see AbstractGroup#insertRepetition(Structure, int) 
526      */
527     public void insertRESULT(OUL_R24_RESULT structure, int rep) throws HL7Exception { 
528        super.insertRepetition("RESULT", structure, rep);
529     }
530 
531 
532     /**
533      * Inserts a specific repetition of RESULT (a Group object)
534      * @see AbstractGroup#insertRepetition(Structure, int) 
535      */
536     public OUL_R24_RESULT insertRESULT(int rep) throws HL7Exception { 
537        return (OUL_R24_RESULT)super.insertRepetition("RESULT", rep);
538     }
539 
540 
541     /**
542      * Removes a specific repetition of RESULT (a Group object)
543      * @see AbstractGroup#removeRepetition(String, int) 
544      */
545     public OUL_R24_RESULT removeRESULT(int rep) throws HL7Exception { 
546        return (OUL_R24_RESULT)super.removeRepetition("RESULT", rep);
547     }
548 
549 
550 
551     /**
552      * Returns
553      * the first repetition of 
554      * CTI (Clinical Trial Identification) - creates it if necessary
555      */
556     public CTI getCTI() { 
557        CTI retVal = getTyped("CTI", CTI.class);
558        return retVal;
559     }
560 
561 
562     /**
563      * Returns a specific repetition of
564      * CTI (Clinical Trial Identification) - creates it if necessary
565      *
566      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
567      * @throws HL7Exception if the repetition requested is more than one 
568      *     greater than the number of existing repetitions.
569      */
570     public CTI getCTI(int rep) { 
571        CTI retVal = getTyped("CTI", rep, CTI.class);
572        return retVal;
573     }
574 
575     /** 
576      * Returns the number of existing repetitions of CTI 
577      */ 
578     public int getCTIReps() {  
579         return getReps("CTI");
580     } 
581 
582     /** 
583      * <p>
584      * Returns a non-modifiable List containing all current existing repetitions of CTI.
585      * <p>
586      * <p>
587      * Note that unlike {@link #getCTI()}, this method will not create any reps
588      * if none are already present, so an empty list may be returned.
589      * </p>
590      */ 
591     public java.util.List<CTI> getCTIAll() throws HL7Exception {
592     	return getAllAsList("CTI", CTI.class);
593     } 
594 
595     /**
596      * Inserts a specific repetition of CTI (Clinical Trial Identification)
597      * @see AbstractGroup#insertRepetition(Structure, int) 
598      */
599     public void insertCTI(CTI structure, int rep) throws HL7Exception { 
600        super.insertRepetition("CTI", structure, rep);
601     }
602 
603 
604     /**
605      * Inserts a specific repetition of CTI (Clinical Trial Identification)
606      * @see AbstractGroup#insertRepetition(Structure, int) 
607      */
608     public CTI insertCTI(int rep) throws HL7Exception { 
609        return (CTI)super.insertRepetition("CTI", rep);
610     }
611 
612 
613     /**
614      * Removes a specific repetition of CTI (Clinical Trial Identification)
615      * @see AbstractGroup#removeRepetition(String, int) 
616      */
617     public CTI removeCTI(int rep) throws HL7Exception { 
618        return (CTI)super.removeRepetition("CTI", rep);
619     }
620 
621 
622 
623 }
624