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