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