001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v26.group;
035
036import ca.uhn.hl7v2.model.v26.segment.*;
037
038import java.util.List;
039
040import ca.uhn.hl7v2.HL7Exception;
041import ca.uhn.hl7v2.parser.ModelClassFactory;
042import ca.uhn.hl7v2.model.*;
043
044/**
045 * <p>Represents a OMG_O19_ORDER group structure (a Group object).
046 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
047 * This Group contains the following elements:  
048 * </p>
049 * <ul>
050                 * <li>1: ORC (Common Order) <b> </b></li>
051                 * <li>2: OMG_O19_TIMING (a Group object) <b>optional repeating</b></li>
052                 * <li>3: OBR (Observation Request) <b> </b></li>
053                 * <li>4: NTE (Notes and Comments) <b>optional repeating</b></li>
054                 * <li>5: ROL (Role) <b>optional repeating</b></li>
055                 * <li>6: CTD (Contact Data) <b>optional </b></li>
056                 * <li>7: DG1 (Diagnosis) <b>optional repeating</b></li>
057                 * <li>8: OMG_O19_OBSERVATION (a Group object) <b>optional repeating</b></li>
058                 * <li>9: OMG_O19_SPECIMEN (a Group object) <b>optional repeating</b></li>
059                 * <li>10: OMG_O19_PRIOR_RESULT (a Group object) <b>optional repeating</b></li>
060                 * <li>11: FT1 (Financial Transaction) <b>optional repeating</b></li>
061                 * <li>12: CTI (Clinical Trial Identification) <b>optional repeating</b></li>
062                 * <li>13: BLG (Billing) <b>optional </b></li>
063 * </ul>
064 */
065@SuppressWarnings("unused")
066public class OMG_O19_ORDER extends AbstractGroup {
067
068    /** 
069     * Creates a new OMG_O19_ORDER group
070     */
071    public OMG_O19_ORDER(Group parent, ModelClassFactory factory) {
072       super(parent, factory);
073       init(factory);
074    }
075
076    private void init(ModelClassFactory factory) {
077       try {
078                          this.add(ORC.class, true, false);
079                          this.add(OMG_O19_TIMING.class, false, true);
080                          this.add(OBR.class, true, false);
081                          this.add(NTE.class, false, true);
082                          this.add(ROL.class, false, true);
083                          this.add(CTD.class, false, false);
084                          this.add(DG1.class, false, true);
085                          this.add(OMG_O19_OBSERVATION.class, false, true);
086                          this.add(OMG_O19_SPECIMEN.class, false, true);
087                          this.add(OMG_O19_PRIOR_RESULT.class, false, true);
088                          this.add(FT1.class, false, true);
089                          this.add(CTI.class, false, true);
090                          this.add(BLG.class, false, false);
091       } catch(HL7Exception e) {
092          log.error("Unexpected error creating OMG_O19_ORDER - this is probably a bug in the source code generator.", e);
093       }
094    }
095
096    /** 
097     * Returns "2.6"
098     */
099    public String getVersion() {
100       return "2.6";
101    }
102
103
104
105    /**
106     * Returns
107     * ORC (Common Order) - creates it if necessary
108     */
109    public ORC getORC() { 
110       ORC retVal = getTyped("ORC", ORC.class);
111       return retVal;
112    }
113
114
115
116
117    /**
118     * Returns
119     * the first repetition of 
120     * TIMING (a Group object) - creates it if necessary
121     */
122    public OMG_O19_TIMING getTIMING() { 
123       OMG_O19_TIMING retVal = getTyped("TIMING", OMG_O19_TIMING.class);
124       return retVal;
125    }
126
127
128    /**
129     * Returns a specific repetition of
130     * TIMING (a Group object) - creates it if necessary
131     *
132     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
133     * @throws HL7Exception if the repetition requested is more than one 
134     *     greater than the number of existing repetitions.
135     */
136    public OMG_O19_TIMING getTIMING(int rep) { 
137       OMG_O19_TIMING retVal = getTyped("TIMING", rep, OMG_O19_TIMING.class);
138       return retVal;
139    }
140
141    /** 
142     * Returns the number of existing repetitions of TIMING 
143     */ 
144    public int getTIMINGReps() {  
145        return getReps("TIMING");
146    } 
147
148    /** 
149     * <p>
150     * Returns a non-modifiable List containing all current existing repetitions of TIMING.
151     * <p>
152     * <p>
153     * Note that unlike {@link #getTIMING()}, this method will not create any reps
154     * if none are already present, so an empty list may be returned.
155     * </p>
156     */ 
157    public List<OMG_O19_TIMING> getTIMINGAll() throws HL7Exception {
158        return getAllAsList("TIMING", OMG_O19_TIMING.class);
159    } 
160
161    /**
162     * Inserts a specific repetition of TIMING (a Group object)
163     * @see AbstractGroup#insertRepetition(Structure, int) 
164     */
165    public void insertTIMING(OMG_O19_TIMING structure, int rep) throws HL7Exception { 
166       super.insertRepetition("TIMING", structure, rep);
167    }
168
169
170    /**
171     * Inserts a specific repetition of TIMING (a Group object)
172     * @see AbstractGroup#insertRepetition(Structure, int) 
173     */
174    public OMG_O19_TIMING insertTIMING(int rep) throws HL7Exception { 
175       return (OMG_O19_TIMING)super.insertRepetition("TIMING", rep);
176    }
177
178
179    /**
180     * Removes a specific repetition of TIMING (a Group object)
181     * @see AbstractGroup#removeRepetition(String, int) 
182     */
183    public OMG_O19_TIMING removeTIMING(int rep) throws HL7Exception { 
184       return (OMG_O19_TIMING)super.removeRepetition("TIMING", rep);
185    }
186
187
188
189    /**
190     * Returns
191     * OBR (Observation Request) - creates it if necessary
192     */
193    public OBR getOBR() { 
194       OBR retVal = getTyped("OBR", OBR.class);
195       return retVal;
196    }
197
198
199
200
201    /**
202     * Returns
203     * the first repetition of 
204     * NTE (Notes and Comments) - creates it if necessary
205     */
206    public NTE getNTE() { 
207       NTE retVal = getTyped("NTE", NTE.class);
208       return retVal;
209    }
210
211
212    /**
213     * Returns a specific repetition of
214     * NTE (Notes and Comments) - creates it if necessary
215     *
216     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
217     * @throws HL7Exception if the repetition requested is more than one 
218     *     greater than the number of existing repetitions.
219     */
220    public NTE getNTE(int rep) { 
221       NTE retVal = getTyped("NTE", rep, NTE.class);
222       return retVal;
223    }
224
225    /** 
226     * Returns the number of existing repetitions of NTE 
227     */ 
228    public int getNTEReps() {  
229        return getReps("NTE");
230    } 
231
232    /** 
233     * <p>
234     * Returns a non-modifiable List containing all current existing repetitions of NTE.
235     * <p>
236     * <p>
237     * Note that unlike {@link #getNTE()}, this method will not create any reps
238     * if none are already present, so an empty list may be returned.
239     * </p>
240     */ 
241    public List<NTE> getNTEAll() throws HL7Exception {
242        return getAllAsList("NTE", NTE.class);
243    } 
244
245    /**
246     * Inserts a specific repetition of NTE (Notes and Comments)
247     * @see AbstractGroup#insertRepetition(Structure, int) 
248     */
249    public void insertNTE(NTE structure, int rep) throws HL7Exception { 
250       super.insertRepetition("NTE", structure, rep);
251    }
252
253
254    /**
255     * Inserts a specific repetition of NTE (Notes and Comments)
256     * @see AbstractGroup#insertRepetition(Structure, int) 
257     */
258    public NTE insertNTE(int rep) throws HL7Exception { 
259       return (NTE)super.insertRepetition("NTE", rep);
260    }
261
262
263    /**
264     * Removes a specific repetition of NTE (Notes and Comments)
265     * @see AbstractGroup#removeRepetition(String, int) 
266     */
267    public NTE removeNTE(int rep) throws HL7Exception { 
268       return (NTE)super.removeRepetition("NTE", rep);
269    }
270
271
272
273    /**
274     * Returns
275     * the first repetition of 
276     * ROL (Role) - creates it if necessary
277     */
278    public ROL getROL() { 
279       ROL retVal = getTyped("ROL", ROL.class);
280       return retVal;
281    }
282
283
284    /**
285     * Returns a specific repetition of
286     * ROL (Role) - creates it if necessary
287     *
288     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
289     * @throws HL7Exception if the repetition requested is more than one 
290     *     greater than the number of existing repetitions.
291     */
292    public ROL getROL(int rep) { 
293       ROL retVal = getTyped("ROL", rep, ROL.class);
294       return retVal;
295    }
296
297    /** 
298     * Returns the number of existing repetitions of ROL 
299     */ 
300    public int getROLReps() {  
301        return getReps("ROL");
302    } 
303
304    /** 
305     * <p>
306     * Returns a non-modifiable List containing all current existing repetitions of ROL.
307     * <p>
308     * <p>
309     * Note that unlike {@link #getROL()}, this method will not create any reps
310     * if none are already present, so an empty list may be returned.
311     * </p>
312     */ 
313    public List<ROL> getROLAll() throws HL7Exception {
314        return getAllAsList("ROL", ROL.class);
315    } 
316
317    /**
318     * Inserts a specific repetition of ROL (Role)
319     * @see AbstractGroup#insertRepetition(Structure, int) 
320     */
321    public void insertROL(ROL structure, int rep) throws HL7Exception { 
322       super.insertRepetition("ROL", structure, rep);
323    }
324
325
326    /**
327     * Inserts a specific repetition of ROL (Role)
328     * @see AbstractGroup#insertRepetition(Structure, int) 
329     */
330    public ROL insertROL(int rep) throws HL7Exception { 
331       return (ROL)super.insertRepetition("ROL", rep);
332    }
333
334
335    /**
336     * Removes a specific repetition of ROL (Role)
337     * @see AbstractGroup#removeRepetition(String, int) 
338     */
339    public ROL removeROL(int rep) throws HL7Exception { 
340       return (ROL)super.removeRepetition("ROL", rep);
341    }
342
343
344
345    /**
346     * Returns
347     * CTD (Contact Data) - creates it if necessary
348     */
349    public CTD getCTD() { 
350       CTD retVal = getTyped("CTD", CTD.class);
351       return retVal;
352    }
353
354
355
356
357    /**
358     * Returns
359     * the first repetition of 
360     * DG1 (Diagnosis) - creates it if necessary
361     */
362    public DG1 getDG1() { 
363       DG1 retVal = getTyped("DG1", DG1.class);
364       return retVal;
365    }
366
367
368    /**
369     * Returns a specific repetition of
370     * DG1 (Diagnosis) - creates it if necessary
371     *
372     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
373     * @throws HL7Exception if the repetition requested is more than one 
374     *     greater than the number of existing repetitions.
375     */
376    public DG1 getDG1(int rep) { 
377       DG1 retVal = getTyped("DG1", rep, DG1.class);
378       return retVal;
379    }
380
381    /** 
382     * Returns the number of existing repetitions of DG1 
383     */ 
384    public int getDG1Reps() {  
385        return getReps("DG1");
386    } 
387
388    /** 
389     * <p>
390     * Returns a non-modifiable List containing all current existing repetitions of DG1.
391     * <p>
392     * <p>
393     * Note that unlike {@link #getDG1()}, this method will not create any reps
394     * if none are already present, so an empty list may be returned.
395     * </p>
396     */ 
397    public List<DG1> getDG1All() throws HL7Exception {
398        return getAllAsList("DG1", DG1.class);
399    } 
400
401    /**
402     * Inserts a specific repetition of DG1 (Diagnosis)
403     * @see AbstractGroup#insertRepetition(Structure, int) 
404     */
405    public void insertDG1(DG1 structure, int rep) throws HL7Exception { 
406       super.insertRepetition("DG1", structure, rep);
407    }
408
409
410    /**
411     * Inserts a specific repetition of DG1 (Diagnosis)
412     * @see AbstractGroup#insertRepetition(Structure, int) 
413     */
414    public DG1 insertDG1(int rep) throws HL7Exception { 
415       return (DG1)super.insertRepetition("DG1", rep);
416    }
417
418
419    /**
420     * Removes a specific repetition of DG1 (Diagnosis)
421     * @see AbstractGroup#removeRepetition(String, int) 
422     */
423    public DG1 removeDG1(int rep) throws HL7Exception { 
424       return (DG1)super.removeRepetition("DG1", rep);
425    }
426
427
428
429    /**
430     * Returns
431     * the first repetition of 
432     * OBSERVATION (a Group object) - creates it if necessary
433     */
434    public OMG_O19_OBSERVATION getOBSERVATION() { 
435       OMG_O19_OBSERVATION retVal = getTyped("OBSERVATION", OMG_O19_OBSERVATION.class);
436       return retVal;
437    }
438
439
440    /**
441     * Returns a specific repetition of
442     * OBSERVATION (a Group object) - creates it if necessary
443     *
444     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
445     * @throws HL7Exception if the repetition requested is more than one 
446     *     greater than the number of existing repetitions.
447     */
448    public OMG_O19_OBSERVATION getOBSERVATION(int rep) { 
449       OMG_O19_OBSERVATION retVal = getTyped("OBSERVATION", rep, OMG_O19_OBSERVATION.class);
450       return retVal;
451    }
452
453    /** 
454     * Returns the number of existing repetitions of OBSERVATION 
455     */ 
456    public int getOBSERVATIONReps() {  
457        return getReps("OBSERVATION");
458    } 
459
460    /** 
461     * <p>
462     * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION.
463     * <p>
464     * <p>
465     * Note that unlike {@link #getOBSERVATION()}, this method will not create any reps
466     * if none are already present, so an empty list may be returned.
467     * </p>
468     */ 
469    public List<OMG_O19_OBSERVATION> getOBSERVATIONAll() throws HL7Exception {
470        return getAllAsList("OBSERVATION", OMG_O19_OBSERVATION.class);
471    } 
472
473    /**
474     * Inserts a specific repetition of OBSERVATION (a Group object)
475     * @see AbstractGroup#insertRepetition(Structure, int) 
476     */
477    public void insertOBSERVATION(OMG_O19_OBSERVATION structure, int rep) throws HL7Exception { 
478       super.insertRepetition("OBSERVATION", structure, rep);
479    }
480
481
482    /**
483     * Inserts a specific repetition of OBSERVATION (a Group object)
484     * @see AbstractGroup#insertRepetition(Structure, int) 
485     */
486    public OMG_O19_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception { 
487       return (OMG_O19_OBSERVATION)super.insertRepetition("OBSERVATION", rep);
488    }
489
490
491    /**
492     * Removes a specific repetition of OBSERVATION (a Group object)
493     * @see AbstractGroup#removeRepetition(String, int) 
494     */
495    public OMG_O19_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception { 
496       return (OMG_O19_OBSERVATION)super.removeRepetition("OBSERVATION", rep);
497    }
498
499
500
501    /**
502     * Returns
503     * the first repetition of 
504     * SPECIMEN (a Group object) - creates it if necessary
505     */
506    public OMG_O19_SPECIMEN getSPECIMEN() { 
507       OMG_O19_SPECIMEN retVal = getTyped("SPECIMEN", OMG_O19_SPECIMEN.class);
508       return retVal;
509    }
510
511
512    /**
513     * Returns a specific repetition of
514     * SPECIMEN (a Group object) - creates it if necessary
515     *
516     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
517     * @throws HL7Exception if the repetition requested is more than one 
518     *     greater than the number of existing repetitions.
519     */
520    public OMG_O19_SPECIMEN getSPECIMEN(int rep) { 
521       OMG_O19_SPECIMEN retVal = getTyped("SPECIMEN", rep, OMG_O19_SPECIMEN.class);
522       return retVal;
523    }
524
525    /** 
526     * Returns the number of existing repetitions of SPECIMEN 
527     */ 
528    public int getSPECIMENReps() {  
529        return getReps("SPECIMEN");
530    } 
531
532    /** 
533     * <p>
534     * Returns a non-modifiable List containing all current existing repetitions of SPECIMEN.
535     * <p>
536     * <p>
537     * Note that unlike {@link #getSPECIMEN()}, this method will not create any reps
538     * if none are already present, so an empty list may be returned.
539     * </p>
540     */ 
541    public List<OMG_O19_SPECIMEN> getSPECIMENAll() throws HL7Exception {
542        return getAllAsList("SPECIMEN", OMG_O19_SPECIMEN.class);
543    } 
544
545    /**
546     * Inserts a specific repetition of SPECIMEN (a Group object)
547     * @see AbstractGroup#insertRepetition(Structure, int) 
548     */
549    public void insertSPECIMEN(OMG_O19_SPECIMEN structure, int rep) throws HL7Exception { 
550       super.insertRepetition("SPECIMEN", structure, rep);
551    }
552
553
554    /**
555     * Inserts a specific repetition of SPECIMEN (a Group object)
556     * @see AbstractGroup#insertRepetition(Structure, int) 
557     */
558    public OMG_O19_SPECIMEN insertSPECIMEN(int rep) throws HL7Exception { 
559       return (OMG_O19_SPECIMEN)super.insertRepetition("SPECIMEN", rep);
560    }
561
562
563    /**
564     * Removes a specific repetition of SPECIMEN (a Group object)
565     * @see AbstractGroup#removeRepetition(String, int) 
566     */
567    public OMG_O19_SPECIMEN removeSPECIMEN(int rep) throws HL7Exception { 
568       return (OMG_O19_SPECIMEN)super.removeRepetition("SPECIMEN", rep);
569    }
570
571
572
573    /**
574     * Returns
575     * the first repetition of 
576     * PRIOR_RESULT (a Group object) - creates it if necessary
577     */
578    public OMG_O19_PRIOR_RESULT getPRIOR_RESULT() { 
579       OMG_O19_PRIOR_RESULT retVal = getTyped("PRIOR_RESULT", OMG_O19_PRIOR_RESULT.class);
580       return retVal;
581    }
582
583
584    /**
585     * Returns a specific repetition of
586     * PRIOR_RESULT (a Group object) - creates it if necessary
587     *
588     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
589     * @throws HL7Exception if the repetition requested is more than one 
590     *     greater than the number of existing repetitions.
591     */
592    public OMG_O19_PRIOR_RESULT getPRIOR_RESULT(int rep) { 
593       OMG_O19_PRIOR_RESULT retVal = getTyped("PRIOR_RESULT", rep, OMG_O19_PRIOR_RESULT.class);
594       return retVal;
595    }
596
597    /** 
598     * Returns the number of existing repetitions of PRIOR_RESULT 
599     */ 
600    public int getPRIOR_RESULTReps() {  
601        return getReps("PRIOR_RESULT");
602    } 
603
604    /** 
605     * <p>
606     * Returns a non-modifiable List containing all current existing repetitions of PRIOR_RESULT.
607     * <p>
608     * <p>
609     * Note that unlike {@link #getPRIOR_RESULT()}, this method will not create any reps
610     * if none are already present, so an empty list may be returned.
611     * </p>
612     */ 
613    public List<OMG_O19_PRIOR_RESULT> getPRIOR_RESULTAll() throws HL7Exception {
614        return getAllAsList("PRIOR_RESULT", OMG_O19_PRIOR_RESULT.class);
615    } 
616
617    /**
618     * Inserts a specific repetition of PRIOR_RESULT (a Group object)
619     * @see AbstractGroup#insertRepetition(Structure, int) 
620     */
621    public void insertPRIOR_RESULT(OMG_O19_PRIOR_RESULT structure, int rep) throws HL7Exception { 
622       super.insertRepetition("PRIOR_RESULT", structure, rep);
623    }
624
625
626    /**
627     * Inserts a specific repetition of PRIOR_RESULT (a Group object)
628     * @see AbstractGroup#insertRepetition(Structure, int) 
629     */
630    public OMG_O19_PRIOR_RESULT insertPRIOR_RESULT(int rep) throws HL7Exception { 
631       return (OMG_O19_PRIOR_RESULT)super.insertRepetition("PRIOR_RESULT", rep);
632    }
633
634
635    /**
636     * Removes a specific repetition of PRIOR_RESULT (a Group object)
637     * @see AbstractGroup#removeRepetition(String, int) 
638     */
639    public OMG_O19_PRIOR_RESULT removePRIOR_RESULT(int rep) throws HL7Exception { 
640       return (OMG_O19_PRIOR_RESULT)super.removeRepetition("PRIOR_RESULT", rep);
641    }
642
643
644
645    /**
646     * Returns
647     * the first repetition of 
648     * FT1 (Financial Transaction) - creates it if necessary
649     */
650    public FT1 getFT1() { 
651       FT1 retVal = getTyped("FT1", FT1.class);
652       return retVal;
653    }
654
655
656    /**
657     * Returns a specific repetition of
658     * FT1 (Financial Transaction) - creates it if necessary
659     *
660     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
661     * @throws HL7Exception if the repetition requested is more than one 
662     *     greater than the number of existing repetitions.
663     */
664    public FT1 getFT1(int rep) { 
665       FT1 retVal = getTyped("FT1", rep, FT1.class);
666       return retVal;
667    }
668
669    /** 
670     * Returns the number of existing repetitions of FT1 
671     */ 
672    public int getFT1Reps() {  
673        return getReps("FT1");
674    } 
675
676    /** 
677     * <p>
678     * Returns a non-modifiable List containing all current existing repetitions of FT1.
679     * <p>
680     * <p>
681     * Note that unlike {@link #getFT1()}, this method will not create any reps
682     * if none are already present, so an empty list may be returned.
683     * </p>
684     */ 
685    public List<FT1> getFT1All() throws HL7Exception {
686        return getAllAsList("FT1", FT1.class);
687    } 
688
689    /**
690     * Inserts a specific repetition of FT1 (Financial Transaction)
691     * @see AbstractGroup#insertRepetition(Structure, int) 
692     */
693    public void insertFT1(FT1 structure, int rep) throws HL7Exception { 
694       super.insertRepetition("FT1", structure, rep);
695    }
696
697
698    /**
699     * Inserts a specific repetition of FT1 (Financial Transaction)
700     * @see AbstractGroup#insertRepetition(Structure, int) 
701     */
702    public FT1 insertFT1(int rep) throws HL7Exception { 
703       return (FT1)super.insertRepetition("FT1", rep);
704    }
705
706
707    /**
708     * Removes a specific repetition of FT1 (Financial Transaction)
709     * @see AbstractGroup#removeRepetition(String, int) 
710     */
711    public FT1 removeFT1(int rep) throws HL7Exception { 
712       return (FT1)super.removeRepetition("FT1", rep);
713    }
714
715
716
717    /**
718     * Returns
719     * the first repetition of 
720     * CTI (Clinical Trial Identification) - creates it if necessary
721     */
722    public CTI getCTI() { 
723       CTI retVal = getTyped("CTI", CTI.class);
724       return retVal;
725    }
726
727
728    /**
729     * Returns a specific repetition of
730     * CTI (Clinical Trial Identification) - creates it if necessary
731     *
732     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
733     * @throws HL7Exception if the repetition requested is more than one 
734     *     greater than the number of existing repetitions.
735     */
736    public CTI getCTI(int rep) { 
737       CTI retVal = getTyped("CTI", rep, CTI.class);
738       return retVal;
739    }
740
741    /** 
742     * Returns the number of existing repetitions of CTI 
743     */ 
744    public int getCTIReps() {  
745        return getReps("CTI");
746    } 
747
748    /** 
749     * <p>
750     * Returns a non-modifiable List containing all current existing repetitions of CTI.
751     * <p>
752     * <p>
753     * Note that unlike {@link #getCTI()}, this method will not create any reps
754     * if none are already present, so an empty list may be returned.
755     * </p>
756     */ 
757    public List<CTI> getCTIAll() throws HL7Exception {
758        return getAllAsList("CTI", CTI.class);
759    } 
760
761    /**
762     * Inserts a specific repetition of CTI (Clinical Trial Identification)
763     * @see AbstractGroup#insertRepetition(Structure, int) 
764     */
765    public void insertCTI(CTI structure, int rep) throws HL7Exception { 
766       super.insertRepetition("CTI", structure, rep);
767    }
768
769
770    /**
771     * Inserts a specific repetition of CTI (Clinical Trial Identification)
772     * @see AbstractGroup#insertRepetition(Structure, int) 
773     */
774    public CTI insertCTI(int rep) throws HL7Exception { 
775       return (CTI)super.insertRepetition("CTI", rep);
776    }
777
778
779    /**
780     * Removes a specific repetition of CTI (Clinical Trial Identification)
781     * @see AbstractGroup#removeRepetition(String, int) 
782     */
783    public CTI removeCTI(int rep) throws HL7Exception { 
784       return (CTI)super.removeRepetition("CTI", rep);
785    }
786
787
788
789    /**
790     * Returns
791     * BLG (Billing) - creates it if necessary
792     */
793    public BLG getBLG() { 
794       BLG retVal = getTyped("BLG", BLG.class);
795       return retVal;
796    }
797
798
799
800
801}
802