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 OMQ_O42_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: PRT (Participation Information) <b>optional repeating </b></li>
50                           * <li>3: OBX (Observation/Result) <b>  </b></li>
51                           * <li>4: PRT (Participation Information) <b>optional repeating </b></li>
52                           * <li>5: TXA (Transcription Document Header) <b>  </b></li>
53                           * <li>6: CTD (Contact Data) <b>optional  </b></li>
54                           * <li>7: DG1 (Diagnosis) <b>optional repeating </b></li>
55                           * <li>8: OMQ_O42_OBSERVATION (a Group object) <b>optional repeating </b></li>
56                           * <li>9: OMQ_O42_PRIOR_RESULT (a Group object) <b>optional repeating </b></li>
57                           * <li>10: FT1 (Financial Transaction) <b>optional repeating </b></li>
58                           * <li>11: CTI (Clinical Trial Identification) <b>optional repeating </b></li>
59                           * <li>12: BLG (Billing) <b>optional  </b></li>
60   * </ul>
61   */
62  //@SuppressWarnings("unused")
63  public class OMQ_O42_ORDER extends AbstractGroup {
64  
65      /** 
66       * Creates a new OMQ_O42_ORDER group
67       */
68      public OMQ_O42_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(PRT.class, false, true, false);
77                                    this.add(OBX.class, true, false, false);
78                                    this.add(PRT.class, false, true, false);
79                                    this.add(TXA.class, true, false, false);
80                                    this.add(CTD.class, false, false, false);
81                                    this.add(DG1.class, false, true, false);
82                                    this.add(OMQ_O42_OBSERVATION.class, false, true, false);
83                                    this.add(OMQ_O42_PRIOR_RESULT.class, false, true, false);
84                                    this.add(FT1.class, false, true, false);
85                                    this.add(CTI.class, false, true, false);
86                                    this.add(BLG.class, false, false, false);
87         } catch(HL7Exception e) {
88            log.error("Unexpected error creating OMQ_O42_ORDER - this is probably a bug in the source code generator.", e);
89         }
90      }
91  
92      /** 
93       * Returns "2.8"
94       */
95      public String getVersion() {
96         return "2.8";
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      * PRT (Participation Information) - creates it if necessary
117      */
118     public PRT getPRT() { 
119        PRT retVal = getTyped("PRT", PRT.class);
120        return retVal;
121     }
122 
123 
124     /**
125      * Returns a specific repetition of
126      * PRT (Participation Information) - 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 PRT getPRT(int rep) { 
133        PRT retVal = getTyped("PRT", rep, PRT.class);
134        return retVal;
135     }
136 
137     /** 
138      * Returns the number of existing repetitions of PRT 
139      */ 
140     public int getPRTReps() {  
141         return getReps("PRT");
142     } 
143 
144     /** 
145      * <p>
146      * Returns a non-modifiable List containing all current existing repetitions of PRT.
147      * <p>
148      * <p>
149      * Note that unlike {@link #getPRT()}, 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<PRT> getPRTAll() throws HL7Exception {
154     	return getAllAsList("PRT", PRT.class);
155     } 
156 
157     /**
158      * Inserts a specific repetition of PRT (Participation Information)
159      * @see AbstractGroup#insertRepetition(Structure, int) 
160      */
161     public void insertPRT(PRT structure, int rep) throws HL7Exception { 
162        super.insertRepetition("PRT", structure, rep);
163     }
164 
165 
166     /**
167      * Inserts a specific repetition of PRT (Participation Information)
168      * @see AbstractGroup#insertRepetition(Structure, int) 
169      */
170     public PRT insertPRT(int rep) throws HL7Exception { 
171        return (PRT)super.insertRepetition("PRT", rep);
172     }
173 
174 
175     /**
176      * Removes a specific repetition of PRT (Participation Information)
177      * @see AbstractGroup#removeRepetition(String, int) 
178      */
179     public PRT removePRT(int rep) throws HL7Exception { 
180        return (PRT)super.removeRepetition("PRT", rep);
181     }
182 
183 
184 
185     /**
186      * Returns
187      * OBX (Observation/Result) - creates it if necessary
188      */
189     public OBX getOBX() { 
190        OBX retVal = getTyped("OBX", OBX.class);
191        return retVal;
192     }
193 
194 
195 
196 
197     /**
198      * Returns
199      * the first repetition of 
200      * PRT2 (Participation Information) - creates it if necessary
201      */
202     public PRT getPRT2() { 
203        PRT retVal = getTyped("PRT2", 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 getPRT2(int rep) { 
217        PRT retVal = getTyped("PRT2", rep, PRT.class);
218        return retVal;
219     }
220 
221     /** 
222      * Returns the number of existing repetitions of PRT2 
223      */ 
224     public int getPRT2Reps() {  
225         return getReps("PRT2");
226     } 
227 
228     /** 
229      * <p>
230      * Returns a non-modifiable List containing all current existing repetitions of PRT2.
231      * <p>
232      * <p>
233      * Note that unlike {@link #getPRT2()}, 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> getPRT2All() throws HL7Exception {
238     	return getAllAsList("PRT2", PRT.class);
239     } 
240 
241     /**
242      * Inserts a specific repetition of PRT2 (Participation Information)
243      * @see AbstractGroup#insertRepetition(Structure, int) 
244      */
245     public void insertPRT2(PRT structure, int rep) throws HL7Exception { 
246        super.insertRepetition("PRT2", structure, rep);
247     }
248 
249 
250     /**
251      * Inserts a specific repetition of PRT2 (Participation Information)
252      * @see AbstractGroup#insertRepetition(Structure, int) 
253      */
254     public PRT insertPRT2(int rep) throws HL7Exception { 
255        return (PRT)super.insertRepetition("PRT2", rep);
256     }
257 
258 
259     /**
260      * Removes a specific repetition of PRT2 (Participation Information)
261      * @see AbstractGroup#removeRepetition(String, int) 
262      */
263     public PRT removePRT2(int rep) throws HL7Exception { 
264        return (PRT)super.removeRepetition("PRT2", rep);
265     }
266 
267 
268 
269     /**
270      * Returns
271      * TXA (Transcription Document Header) - creates it if necessary
272      */
273     public TXA getTXA() { 
274        TXA retVal = getTyped("TXA", TXA.class);
275        return retVal;
276     }
277 
278 
279 
280 
281     /**
282      * Returns
283      * CTD (Contact Data) - creates it if necessary
284      */
285     public CTD getCTD() { 
286        CTD retVal = getTyped("CTD", CTD.class);
287        return retVal;
288     }
289 
290 
291 
292 
293     /**
294      * Returns
295      * the first repetition of 
296      * DG1 (Diagnosis) - creates it if necessary
297      */
298     public DG1 getDG1() { 
299        DG1 retVal = getTyped("DG1", DG1.class);
300        return retVal;
301     }
302 
303 
304     /**
305      * Returns a specific repetition of
306      * DG1 (Diagnosis) - 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 DG1 getDG1(int rep) { 
313        DG1 retVal = getTyped("DG1", rep, DG1.class);
314        return retVal;
315     }
316 
317     /** 
318      * Returns the number of existing repetitions of DG1 
319      */ 
320     public int getDG1Reps() {  
321         return getReps("DG1");
322     } 
323 
324     /** 
325      * <p>
326      * Returns a non-modifiable List containing all current existing repetitions of DG1.
327      * <p>
328      * <p>
329      * Note that unlike {@link #getDG1()}, 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<DG1> getDG1All() throws HL7Exception {
334     	return getAllAsList("DG1", DG1.class);
335     } 
336 
337     /**
338      * Inserts a specific repetition of DG1 (Diagnosis)
339      * @see AbstractGroup#insertRepetition(Structure, int) 
340      */
341     public void insertDG1(DG1 structure, int rep) throws HL7Exception { 
342        super.insertRepetition("DG1", structure, rep);
343     }
344 
345 
346     /**
347      * Inserts a specific repetition of DG1 (Diagnosis)
348      * @see AbstractGroup#insertRepetition(Structure, int) 
349      */
350     public DG1 insertDG1(int rep) throws HL7Exception { 
351        return (DG1)super.insertRepetition("DG1", rep);
352     }
353 
354 
355     /**
356      * Removes a specific repetition of DG1 (Diagnosis)
357      * @see AbstractGroup#removeRepetition(String, int) 
358      */
359     public DG1 removeDG1(int rep) throws HL7Exception { 
360        return (DG1)super.removeRepetition("DG1", rep);
361     }
362 
363 
364 
365     /**
366      * Returns
367      * the first repetition of 
368      * OBSERVATION (a Group object) - creates it if necessary
369      */
370     public OMQ_O42_OBSERVATION getOBSERVATION() { 
371        OMQ_O42_OBSERVATION retVal = getTyped("OBSERVATION", OMQ_O42_OBSERVATION.class);
372        return retVal;
373     }
374 
375 
376     /**
377      * Returns a specific repetition of
378      * OBSERVATION (a Group object) - 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 OMQ_O42_OBSERVATION getOBSERVATION(int rep) { 
385        OMQ_O42_OBSERVATION retVal = getTyped("OBSERVATION", rep, OMQ_O42_OBSERVATION.class);
386        return retVal;
387     }
388 
389     /** 
390      * Returns the number of existing repetitions of OBSERVATION 
391      */ 
392     public int getOBSERVATIONReps() {  
393         return getReps("OBSERVATION");
394     } 
395 
396     /** 
397      * <p>
398      * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION.
399      * <p>
400      * <p>
401      * Note that unlike {@link #getOBSERVATION()}, 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<OMQ_O42_OBSERVATION> getOBSERVATIONAll() throws HL7Exception {
406     	return getAllAsList("OBSERVATION", OMQ_O42_OBSERVATION.class);
407     } 
408 
409     /**
410      * Inserts a specific repetition of OBSERVATION (a Group object)
411      * @see AbstractGroup#insertRepetition(Structure, int) 
412      */
413     public void insertOBSERVATION(OMQ_O42_OBSERVATION structure, int rep) throws HL7Exception { 
414        super.insertRepetition("OBSERVATION", structure, rep);
415     }
416 
417 
418     /**
419      * Inserts a specific repetition of OBSERVATION (a Group object)
420      * @see AbstractGroup#insertRepetition(Structure, int) 
421      */
422     public OMQ_O42_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception { 
423        return (OMQ_O42_OBSERVATION)super.insertRepetition("OBSERVATION", rep);
424     }
425 
426 
427     /**
428      * Removes a specific repetition of OBSERVATION (a Group object)
429      * @see AbstractGroup#removeRepetition(String, int) 
430      */
431     public OMQ_O42_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception { 
432        return (OMQ_O42_OBSERVATION)super.removeRepetition("OBSERVATION", rep);
433     }
434 
435 
436 
437     /**
438      * Returns
439      * the first repetition of 
440      * PRIOR_RESULT (a Group object) - creates it if necessary
441      */
442     public OMQ_O42_PRIOR_RESULT getPRIOR_RESULT() { 
443        OMQ_O42_PRIOR_RESULT retVal = getTyped("PRIOR_RESULT", OMQ_O42_PRIOR_RESULT.class);
444        return retVal;
445     }
446 
447 
448     /**
449      * Returns a specific repetition of
450      * PRIOR_RESULT (a Group object) - 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 OMQ_O42_PRIOR_RESULT getPRIOR_RESULT(int rep) { 
457        OMQ_O42_PRIOR_RESULT retVal = getTyped("PRIOR_RESULT", rep, OMQ_O42_PRIOR_RESULT.class);
458        return retVal;
459     }
460 
461     /** 
462      * Returns the number of existing repetitions of PRIOR_RESULT 
463      */ 
464     public int getPRIOR_RESULTReps() {  
465         return getReps("PRIOR_RESULT");
466     } 
467 
468     /** 
469      * <p>
470      * Returns a non-modifiable List containing all current existing repetitions of PRIOR_RESULT.
471      * <p>
472      * <p>
473      * Note that unlike {@link #getPRIOR_RESULT()}, 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<OMQ_O42_PRIOR_RESULT> getPRIOR_RESULTAll() throws HL7Exception {
478     	return getAllAsList("PRIOR_RESULT", OMQ_O42_PRIOR_RESULT.class);
479     } 
480 
481     /**
482      * Inserts a specific repetition of PRIOR_RESULT (a Group object)
483      * @see AbstractGroup#insertRepetition(Structure, int) 
484      */
485     public void insertPRIOR_RESULT(OMQ_O42_PRIOR_RESULT structure, int rep) throws HL7Exception { 
486        super.insertRepetition("PRIOR_RESULT", structure, rep);
487     }
488 
489 
490     /**
491      * Inserts a specific repetition of PRIOR_RESULT (a Group object)
492      * @see AbstractGroup#insertRepetition(Structure, int) 
493      */
494     public OMQ_O42_PRIOR_RESULT insertPRIOR_RESULT(int rep) throws HL7Exception { 
495        return (OMQ_O42_PRIOR_RESULT)super.insertRepetition("PRIOR_RESULT", rep);
496     }
497 
498 
499     /**
500      * Removes a specific repetition of PRIOR_RESULT (a Group object)
501      * @see AbstractGroup#removeRepetition(String, int) 
502      */
503     public OMQ_O42_PRIOR_RESULT removePRIOR_RESULT(int rep) throws HL7Exception { 
504        return (OMQ_O42_PRIOR_RESULT)super.removeRepetition("PRIOR_RESULT", rep);
505     }
506 
507 
508 
509     /**
510      * Returns
511      * the first repetition of 
512      * FT1 (Financial Transaction) - creates it if necessary
513      */
514     public FT1 getFT1() { 
515        FT1 retVal = getTyped("FT1", FT1.class);
516        return retVal;
517     }
518 
519 
520     /**
521      * Returns a specific repetition of
522      * FT1 (Financial Transaction) - 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 FT1 getFT1(int rep) { 
529        FT1 retVal = getTyped("FT1", rep, FT1.class);
530        return retVal;
531     }
532 
533     /** 
534      * Returns the number of existing repetitions of FT1 
535      */ 
536     public int getFT1Reps() {  
537         return getReps("FT1");
538     } 
539 
540     /** 
541      * <p>
542      * Returns a non-modifiable List containing all current existing repetitions of FT1.
543      * <p>
544      * <p>
545      * Note that unlike {@link #getFT1()}, 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<FT1> getFT1All() throws HL7Exception {
550     	return getAllAsList("FT1", FT1.class);
551     } 
552 
553     /**
554      * Inserts a specific repetition of FT1 (Financial Transaction)
555      * @see AbstractGroup#insertRepetition(Structure, int) 
556      */
557     public void insertFT1(FT1 structure, int rep) throws HL7Exception { 
558        super.insertRepetition("FT1", structure, rep);
559     }
560 
561 
562     /**
563      * Inserts a specific repetition of FT1 (Financial Transaction)
564      * @see AbstractGroup#insertRepetition(Structure, int) 
565      */
566     public FT1 insertFT1(int rep) throws HL7Exception { 
567        return (FT1)super.insertRepetition("FT1", rep);
568     }
569 
570 
571     /**
572      * Removes a specific repetition of FT1 (Financial Transaction)
573      * @see AbstractGroup#removeRepetition(String, int) 
574      */
575     public FT1 removeFT1(int rep) throws HL7Exception { 
576        return (FT1)super.removeRepetition("FT1", rep);
577     }
578 
579 
580 
581     /**
582      * Returns
583      * the first repetition of 
584      * CTI (Clinical Trial Identification) - creates it if necessary
585      */
586     public CTI getCTI() { 
587        CTI retVal = getTyped("CTI", CTI.class);
588        return retVal;
589     }
590 
591 
592     /**
593      * Returns a specific repetition of
594      * CTI (Clinical Trial Identification) - 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 CTI getCTI(int rep) { 
601        CTI retVal = getTyped("CTI", rep, CTI.class);
602        return retVal;
603     }
604 
605     /** 
606      * Returns the number of existing repetitions of CTI 
607      */ 
608     public int getCTIReps() {  
609         return getReps("CTI");
610     } 
611 
612     /** 
613      * <p>
614      * Returns a non-modifiable List containing all current existing repetitions of CTI.
615      * <p>
616      * <p>
617      * Note that unlike {@link #getCTI()}, 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<CTI> getCTIAll() throws HL7Exception {
622     	return getAllAsList("CTI", CTI.class);
623     } 
624 
625     /**
626      * Inserts a specific repetition of CTI (Clinical Trial Identification)
627      * @see AbstractGroup#insertRepetition(Structure, int) 
628      */
629     public void insertCTI(CTI structure, int rep) throws HL7Exception { 
630        super.insertRepetition("CTI", structure, rep);
631     }
632 
633 
634     /**
635      * Inserts a specific repetition of CTI (Clinical Trial Identification)
636      * @see AbstractGroup#insertRepetition(Structure, int) 
637      */
638     public CTI insertCTI(int rep) throws HL7Exception { 
639        return (CTI)super.insertRepetition("CTI", rep);
640     }
641 
642 
643     /**
644      * Removes a specific repetition of CTI (Clinical Trial Identification)
645      * @see AbstractGroup#removeRepetition(String, int) 
646      */
647     public CTI removeCTI(int rep) throws HL7Exception { 
648        return (CTI)super.removeRepetition("CTI", rep);
649     }
650 
651 
652 
653     /**
654      * Returns
655      * BLG (Billing) - creates it if necessary
656      */
657     public BLG getBLG() { 
658        BLG retVal = getTyped("BLG", BLG.class);
659        return retVal;
660     }
661 
662 
663 
664 
665 }
666