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.v23.message;
035
036import ca.uhn.hl7v2.model.v23.group.*;
037import ca.uhn.hl7v2.model.v23.segment.*;
038
039import java.util.List;
040
041import ca.uhn.hl7v2.HL7Exception;
042import ca.uhn.hl7v2.parser.ModelClassFactory;
043import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
044import ca.uhn.hl7v2.model.AbstractMessage;
045
046/**
047 * <p>Represents a RPA_I09 message structure (see chapter ?). This structure contains the 
048 * following elements: </p>
049 * <ul>
050                 * <li>1: MSH (Message header segment) <b> </b></li>
051                 * <li>2: MSA (Message acknowledgement segment) <b> </b></li>
052                 * <li>3: RF1 (Referral Information Segment) <b>optional </b></li>
053                 * <li>4: RPA_I09_AUTHORIZATION (a Group object) <b>optional </b></li>
054                 * <li>5: RPA_I09_PROVIDER (a Group object) <b> repeating</b></li>
055                 * <li>6: PID (Patient Identification) <b> </b></li>
056                 * <li>7: NK1 (Next of kin) <b>optional repeating</b></li>
057                 * <li>8: GT1 (Guarantor) <b>optional repeating</b></li>
058                 * <li>9: RPA_I09_INSURANCE (a Group object) <b>optional repeating</b></li>
059                 * <li>10: ACC (Accident) <b>optional </b></li>
060                 * <li>11: DG1 (Diagnosis) <b>optional repeating</b></li>
061                 * <li>12: DRG (Diagnosis Related Group) <b>optional repeating</b></li>
062                 * <li>13: AL1 (Patient allergy information) <b>optional repeating</b></li>
063                 * <li>14: RPA_I09_PROCEDURE (a Group object) <b> repeating</b></li>
064                 * <li>15: RPA_I09_RESULTS (a Group object) <b>optional repeating</b></li>
065                 * <li>16: RPA_I09_VISIT (a Group object) <b>optional </b></li>
066 * </ul>
067 */
068@SuppressWarnings("unused")
069public class RPA_I09 extends AbstractMessage  {
070
071    /**
072     * Creates a new RPA_I09 message with DefaultModelClassFactory. 
073     */ 
074    public RPA_I09() { 
075       this(new DefaultModelClassFactory());
076    }
077
078    /** 
079     * Creates a new RPA_I09 message with custom ModelClassFactory.
080     */
081    public RPA_I09(ModelClassFactory factory) {
082       super(factory);
083       init(factory);
084    }
085
086    private void init(ModelClassFactory factory) {
087       try {
088                          this.add(MSH.class, true, false);
089                          this.add(MSA.class, true, false);
090                          this.add(RF1.class, false, false);
091                          this.add(RPA_I09_AUTHORIZATION.class, false, false);
092                          this.add(RPA_I09_PROVIDER.class, true, true);
093                          this.add(PID.class, true, false);
094                          this.add(NK1.class, false, true);
095                          this.add(GT1.class, false, true);
096                          this.add(RPA_I09_INSURANCE.class, false, true);
097                          this.add(ACC.class, false, false);
098                          this.add(DG1.class, false, true);
099                          this.add(DRG.class, false, true);
100                          this.add(AL1.class, false, true);
101                          this.add(RPA_I09_PROCEDURE.class, true, true);
102                          this.add(RPA_I09_RESULTS.class, false, true);
103                          this.add(RPA_I09_VISIT.class, false, false);
104       } catch(HL7Exception e) {
105          log.error("Unexpected error creating RPA_I09 - this is probably a bug in the source code generator.", e);
106       }
107    }
108
109    /** 
110     * Returns "2.3"
111     */
112    public String getVersion() {
113       return "2.3";
114    }
115
116
117
118    /**
119     * Returns
120     * MSH (Message header segment) - creates it if necessary
121     */
122    public MSH getMSH() { 
123       return getTyped("MSH", MSH.class);
124    }
125
126
127
128
129    /**
130     * Returns
131     * MSA (Message acknowledgement segment) - creates it if necessary
132     */
133    public MSA getMSA() { 
134       return getTyped("MSA", MSA.class);
135    }
136
137
138
139
140    /**
141     * Returns
142     * RF1 (Referral Information Segment) - creates it if necessary
143     */
144    public RF1 getRF1() { 
145       return getTyped("RF1", RF1.class);
146    }
147
148
149
150
151    /**
152     * Returns
153     * AUTHORIZATION (a Group object) - creates it if necessary
154     */
155    public RPA_I09_AUTHORIZATION getAUTHORIZATION() { 
156       return getTyped("AUTHORIZATION", RPA_I09_AUTHORIZATION.class);
157    }
158
159
160
161
162    /**
163     * Returns
164     * the first repetition of 
165     * PROVIDER (a Group object) - creates it if necessary
166     */
167    public RPA_I09_PROVIDER getPROVIDER() { 
168       return getTyped("PROVIDER", RPA_I09_PROVIDER.class);
169    }
170
171
172    /**
173     * Returns a specific repetition of
174     * PROVIDER (a Group object) - creates it if necessary
175     *
176     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
177     * @throws HL7Exception if the repetition requested is more than one 
178     *     greater than the number of existing repetitions.
179     */
180    public RPA_I09_PROVIDER getPROVIDER(int rep) { 
181       return getTyped("PROVIDER", rep, RPA_I09_PROVIDER.class);
182    }
183
184    /** 
185     * Returns the number of existing repetitions of PROVIDER 
186     */ 
187    public int getPROVIDERReps() { 
188        return getReps("PROVIDER");
189    } 
190
191    /** 
192     * <p>
193     * Returns a non-modifiable List containing all current existing repetitions of PROVIDER.
194     * <p>
195     * <p>
196     * Note that unlike {@link #getPROVIDER()}, this method will not create any reps
197     * if none are already present, so an empty list may be returned.
198     * </p>
199     */ 
200    public List<RPA_I09_PROVIDER> getPROVIDERAll() throws HL7Exception {
201        return getAllAsList("PROVIDER", RPA_I09_PROVIDER.class);
202    } 
203
204    /**
205     * Inserts a specific repetition of PROVIDER (a Group object)
206     * @see AbstractGroup#insertRepetition(Structure, int) 
207     */
208    public void insertPROVIDER(RPA_I09_PROVIDER structure, int rep) throws HL7Exception { 
209       super.insertRepetition( "PROVIDER", structure, rep);
210    }
211
212
213    /**
214     * Inserts a specific repetition of PROVIDER (a Group object)
215     * @see AbstractGroup#insertRepetition(Structure, int) 
216     */
217    public RPA_I09_PROVIDER insertPROVIDER(int rep) throws HL7Exception { 
218       return (RPA_I09_PROVIDER)super.insertRepetition("PROVIDER", rep);
219    }
220
221
222    /**
223     * Removes a specific repetition of PROVIDER (a Group object)
224     * @see AbstractGroup#removeRepetition(String, int) 
225     */
226    public RPA_I09_PROVIDER removePROVIDER(int rep) throws HL7Exception { 
227       return (RPA_I09_PROVIDER)super.removeRepetition("PROVIDER", rep);
228    }
229
230
231
232    /**
233     * Returns
234     * PID (Patient Identification) - creates it if necessary
235     */
236    public PID getPID() { 
237       return getTyped("PID", PID.class);
238    }
239
240
241
242
243    /**
244     * Returns
245     * the first repetition of 
246     * NK1 (Next of kin) - creates it if necessary
247     */
248    public NK1 getNK1() { 
249       return getTyped("NK1", NK1.class);
250    }
251
252
253    /**
254     * Returns a specific repetition of
255     * NK1 (Next of kin) - creates it if necessary
256     *
257     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
258     * @throws HL7Exception if the repetition requested is more than one 
259     *     greater than the number of existing repetitions.
260     */
261    public NK1 getNK1(int rep) { 
262       return getTyped("NK1", rep, NK1.class);
263    }
264
265    /** 
266     * Returns the number of existing repetitions of NK1 
267     */ 
268    public int getNK1Reps() { 
269        return getReps("NK1");
270    } 
271
272    /** 
273     * <p>
274     * Returns a non-modifiable List containing all current existing repetitions of NK1.
275     * <p>
276     * <p>
277     * Note that unlike {@link #getNK1()}, this method will not create any reps
278     * if none are already present, so an empty list may be returned.
279     * </p>
280     */ 
281    public List<NK1> getNK1All() throws HL7Exception {
282        return getAllAsList("NK1", NK1.class);
283    } 
284
285    /**
286     * Inserts a specific repetition of NK1 (Next of kin)
287     * @see AbstractGroup#insertRepetition(Structure, int) 
288     */
289    public void insertNK1(NK1 structure, int rep) throws HL7Exception { 
290       super.insertRepetition( "NK1", structure, rep);
291    }
292
293
294    /**
295     * Inserts a specific repetition of NK1 (Next of kin)
296     * @see AbstractGroup#insertRepetition(Structure, int) 
297     */
298    public NK1 insertNK1(int rep) throws HL7Exception { 
299       return (NK1)super.insertRepetition("NK1", rep);
300    }
301
302
303    /**
304     * Removes a specific repetition of NK1 (Next of kin)
305     * @see AbstractGroup#removeRepetition(String, int) 
306     */
307    public NK1 removeNK1(int rep) throws HL7Exception { 
308       return (NK1)super.removeRepetition("NK1", rep);
309    }
310
311
312
313    /**
314     * Returns
315     * the first repetition of 
316     * GT1 (Guarantor) - creates it if necessary
317     */
318    public GT1 getGT1() { 
319       return getTyped("GT1", GT1.class);
320    }
321
322
323    /**
324     * Returns a specific repetition of
325     * GT1 (Guarantor) - creates it if necessary
326     *
327     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
328     * @throws HL7Exception if the repetition requested is more than one 
329     *     greater than the number of existing repetitions.
330     */
331    public GT1 getGT1(int rep) { 
332       return getTyped("GT1", rep, GT1.class);
333    }
334
335    /** 
336     * Returns the number of existing repetitions of GT1 
337     */ 
338    public int getGT1Reps() { 
339        return getReps("GT1");
340    } 
341
342    /** 
343     * <p>
344     * Returns a non-modifiable List containing all current existing repetitions of GT1.
345     * <p>
346     * <p>
347     * Note that unlike {@link #getGT1()}, this method will not create any reps
348     * if none are already present, so an empty list may be returned.
349     * </p>
350     */ 
351    public List<GT1> getGT1All() throws HL7Exception {
352        return getAllAsList("GT1", GT1.class);
353    } 
354
355    /**
356     * Inserts a specific repetition of GT1 (Guarantor)
357     * @see AbstractGroup#insertRepetition(Structure, int) 
358     */
359    public void insertGT1(GT1 structure, int rep) throws HL7Exception { 
360       super.insertRepetition( "GT1", structure, rep);
361    }
362
363
364    /**
365     * Inserts a specific repetition of GT1 (Guarantor)
366     * @see AbstractGroup#insertRepetition(Structure, int) 
367     */
368    public GT1 insertGT1(int rep) throws HL7Exception { 
369       return (GT1)super.insertRepetition("GT1", rep);
370    }
371
372
373    /**
374     * Removes a specific repetition of GT1 (Guarantor)
375     * @see AbstractGroup#removeRepetition(String, int) 
376     */
377    public GT1 removeGT1(int rep) throws HL7Exception { 
378       return (GT1)super.removeRepetition("GT1", rep);
379    }
380
381
382
383    /**
384     * Returns
385     * the first repetition of 
386     * INSURANCE (a Group object) - creates it if necessary
387     */
388    public RPA_I09_INSURANCE getINSURANCE() { 
389       return getTyped("INSURANCE", RPA_I09_INSURANCE.class);
390    }
391
392
393    /**
394     * Returns a specific repetition of
395     * INSURANCE (a Group object) - creates it if necessary
396     *
397     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
398     * @throws HL7Exception if the repetition requested is more than one 
399     *     greater than the number of existing repetitions.
400     */
401    public RPA_I09_INSURANCE getINSURANCE(int rep) { 
402       return getTyped("INSURANCE", rep, RPA_I09_INSURANCE.class);
403    }
404
405    /** 
406     * Returns the number of existing repetitions of INSURANCE 
407     */ 
408    public int getINSURANCEReps() { 
409        return getReps("INSURANCE");
410    } 
411
412    /** 
413     * <p>
414     * Returns a non-modifiable List containing all current existing repetitions of INSURANCE.
415     * <p>
416     * <p>
417     * Note that unlike {@link #getINSURANCE()}, this method will not create any reps
418     * if none are already present, so an empty list may be returned.
419     * </p>
420     */ 
421    public List<RPA_I09_INSURANCE> getINSURANCEAll() throws HL7Exception {
422        return getAllAsList("INSURANCE", RPA_I09_INSURANCE.class);
423    } 
424
425    /**
426     * Inserts a specific repetition of INSURANCE (a Group object)
427     * @see AbstractGroup#insertRepetition(Structure, int) 
428     */
429    public void insertINSURANCE(RPA_I09_INSURANCE structure, int rep) throws HL7Exception { 
430       super.insertRepetition( "INSURANCE", structure, rep);
431    }
432
433
434    /**
435     * Inserts a specific repetition of INSURANCE (a Group object)
436     * @see AbstractGroup#insertRepetition(Structure, int) 
437     */
438    public RPA_I09_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 
439       return (RPA_I09_INSURANCE)super.insertRepetition("INSURANCE", rep);
440    }
441
442
443    /**
444     * Removes a specific repetition of INSURANCE (a Group object)
445     * @see AbstractGroup#removeRepetition(String, int) 
446     */
447    public RPA_I09_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 
448       return (RPA_I09_INSURANCE)super.removeRepetition("INSURANCE", rep);
449    }
450
451
452
453    /**
454     * Returns
455     * ACC (Accident) - creates it if necessary
456     */
457    public ACC getACC() { 
458       return getTyped("ACC", ACC.class);
459    }
460
461
462
463
464    /**
465     * Returns
466     * the first repetition of 
467     * DG1 (Diagnosis) - creates it if necessary
468     */
469    public DG1 getDG1() { 
470       return getTyped("DG1", DG1.class);
471    }
472
473
474    /**
475     * Returns a specific repetition of
476     * DG1 (Diagnosis) - creates it if necessary
477     *
478     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
479     * @throws HL7Exception if the repetition requested is more than one 
480     *     greater than the number of existing repetitions.
481     */
482    public DG1 getDG1(int rep) { 
483       return getTyped("DG1", rep, DG1.class);
484    }
485
486    /** 
487     * Returns the number of existing repetitions of DG1 
488     */ 
489    public int getDG1Reps() { 
490        return getReps("DG1");
491    } 
492
493    /** 
494     * <p>
495     * Returns a non-modifiable List containing all current existing repetitions of DG1.
496     * <p>
497     * <p>
498     * Note that unlike {@link #getDG1()}, this method will not create any reps
499     * if none are already present, so an empty list may be returned.
500     * </p>
501     */ 
502    public List<DG1> getDG1All() throws HL7Exception {
503        return getAllAsList("DG1", DG1.class);
504    } 
505
506    /**
507     * Inserts a specific repetition of DG1 (Diagnosis)
508     * @see AbstractGroup#insertRepetition(Structure, int) 
509     */
510    public void insertDG1(DG1 structure, int rep) throws HL7Exception { 
511       super.insertRepetition( "DG1", structure, rep);
512    }
513
514
515    /**
516     * Inserts a specific repetition of DG1 (Diagnosis)
517     * @see AbstractGroup#insertRepetition(Structure, int) 
518     */
519    public DG1 insertDG1(int rep) throws HL7Exception { 
520       return (DG1)super.insertRepetition("DG1", rep);
521    }
522
523
524    /**
525     * Removes a specific repetition of DG1 (Diagnosis)
526     * @see AbstractGroup#removeRepetition(String, int) 
527     */
528    public DG1 removeDG1(int rep) throws HL7Exception { 
529       return (DG1)super.removeRepetition("DG1", rep);
530    }
531
532
533
534    /**
535     * Returns
536     * the first repetition of 
537     * DRG (Diagnosis Related Group) - creates it if necessary
538     */
539    public DRG getDRG() { 
540       return getTyped("DRG", DRG.class);
541    }
542
543
544    /**
545     * Returns a specific repetition of
546     * DRG (Diagnosis Related Group) - creates it if necessary
547     *
548     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
549     * @throws HL7Exception if the repetition requested is more than one 
550     *     greater than the number of existing repetitions.
551     */
552    public DRG getDRG(int rep) { 
553       return getTyped("DRG", rep, DRG.class);
554    }
555
556    /** 
557     * Returns the number of existing repetitions of DRG 
558     */ 
559    public int getDRGReps() { 
560        return getReps("DRG");
561    } 
562
563    /** 
564     * <p>
565     * Returns a non-modifiable List containing all current existing repetitions of DRG.
566     * <p>
567     * <p>
568     * Note that unlike {@link #getDRG()}, this method will not create any reps
569     * if none are already present, so an empty list may be returned.
570     * </p>
571     */ 
572    public List<DRG> getDRGAll() throws HL7Exception {
573        return getAllAsList("DRG", DRG.class);
574    } 
575
576    /**
577     * Inserts a specific repetition of DRG (Diagnosis Related Group)
578     * @see AbstractGroup#insertRepetition(Structure, int) 
579     */
580    public void insertDRG(DRG structure, int rep) throws HL7Exception { 
581       super.insertRepetition( "DRG", structure, rep);
582    }
583
584
585    /**
586     * Inserts a specific repetition of DRG (Diagnosis Related Group)
587     * @see AbstractGroup#insertRepetition(Structure, int) 
588     */
589    public DRG insertDRG(int rep) throws HL7Exception { 
590       return (DRG)super.insertRepetition("DRG", rep);
591    }
592
593
594    /**
595     * Removes a specific repetition of DRG (Diagnosis Related Group)
596     * @see AbstractGroup#removeRepetition(String, int) 
597     */
598    public DRG removeDRG(int rep) throws HL7Exception { 
599       return (DRG)super.removeRepetition("DRG", rep);
600    }
601
602
603
604    /**
605     * Returns
606     * the first repetition of 
607     * AL1 (Patient allergy information) - creates it if necessary
608     */
609    public AL1 getAL1() { 
610       return getTyped("AL1", AL1.class);
611    }
612
613
614    /**
615     * Returns a specific repetition of
616     * AL1 (Patient allergy information) - creates it if necessary
617     *
618     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
619     * @throws HL7Exception if the repetition requested is more than one 
620     *     greater than the number of existing repetitions.
621     */
622    public AL1 getAL1(int rep) { 
623       return getTyped("AL1", rep, AL1.class);
624    }
625
626    /** 
627     * Returns the number of existing repetitions of AL1 
628     */ 
629    public int getAL1Reps() { 
630        return getReps("AL1");
631    } 
632
633    /** 
634     * <p>
635     * Returns a non-modifiable List containing all current existing repetitions of AL1.
636     * <p>
637     * <p>
638     * Note that unlike {@link #getAL1()}, this method will not create any reps
639     * if none are already present, so an empty list may be returned.
640     * </p>
641     */ 
642    public List<AL1> getAL1All() throws HL7Exception {
643        return getAllAsList("AL1", AL1.class);
644    } 
645
646    /**
647     * Inserts a specific repetition of AL1 (Patient allergy information)
648     * @see AbstractGroup#insertRepetition(Structure, int) 
649     */
650    public void insertAL1(AL1 structure, int rep) throws HL7Exception { 
651       super.insertRepetition( "AL1", structure, rep);
652    }
653
654
655    /**
656     * Inserts a specific repetition of AL1 (Patient allergy information)
657     * @see AbstractGroup#insertRepetition(Structure, int) 
658     */
659    public AL1 insertAL1(int rep) throws HL7Exception { 
660       return (AL1)super.insertRepetition("AL1", rep);
661    }
662
663
664    /**
665     * Removes a specific repetition of AL1 (Patient allergy information)
666     * @see AbstractGroup#removeRepetition(String, int) 
667     */
668    public AL1 removeAL1(int rep) throws HL7Exception { 
669       return (AL1)super.removeRepetition("AL1", rep);
670    }
671
672
673
674    /**
675     * Returns
676     * the first repetition of 
677     * PROCEDURE (a Group object) - creates it if necessary
678     */
679    public RPA_I09_PROCEDURE getPROCEDURE() { 
680       return getTyped("PROCEDURE", RPA_I09_PROCEDURE.class);
681    }
682
683
684    /**
685     * Returns a specific repetition of
686     * PROCEDURE (a Group object) - creates it if necessary
687     *
688     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
689     * @throws HL7Exception if the repetition requested is more than one 
690     *     greater than the number of existing repetitions.
691     */
692    public RPA_I09_PROCEDURE getPROCEDURE(int rep) { 
693       return getTyped("PROCEDURE", rep, RPA_I09_PROCEDURE.class);
694    }
695
696    /** 
697     * Returns the number of existing repetitions of PROCEDURE 
698     */ 
699    public int getPROCEDUREReps() { 
700        return getReps("PROCEDURE");
701    } 
702
703    /** 
704     * <p>
705     * Returns a non-modifiable List containing all current existing repetitions of PROCEDURE.
706     * <p>
707     * <p>
708     * Note that unlike {@link #getPROCEDURE()}, this method will not create any reps
709     * if none are already present, so an empty list may be returned.
710     * </p>
711     */ 
712    public List<RPA_I09_PROCEDURE> getPROCEDUREAll() throws HL7Exception {
713        return getAllAsList("PROCEDURE", RPA_I09_PROCEDURE.class);
714    } 
715
716    /**
717     * Inserts a specific repetition of PROCEDURE (a Group object)
718     * @see AbstractGroup#insertRepetition(Structure, int) 
719     */
720    public void insertPROCEDURE(RPA_I09_PROCEDURE structure, int rep) throws HL7Exception { 
721       super.insertRepetition( "PROCEDURE", structure, rep);
722    }
723
724
725    /**
726     * Inserts a specific repetition of PROCEDURE (a Group object)
727     * @see AbstractGroup#insertRepetition(Structure, int) 
728     */
729    public RPA_I09_PROCEDURE insertPROCEDURE(int rep) throws HL7Exception { 
730       return (RPA_I09_PROCEDURE)super.insertRepetition("PROCEDURE", rep);
731    }
732
733
734    /**
735     * Removes a specific repetition of PROCEDURE (a Group object)
736     * @see AbstractGroup#removeRepetition(String, int) 
737     */
738    public RPA_I09_PROCEDURE removePROCEDURE(int rep) throws HL7Exception { 
739       return (RPA_I09_PROCEDURE)super.removeRepetition("PROCEDURE", rep);
740    }
741
742
743
744    /**
745     * Returns
746     * the first repetition of 
747     * RESULTS (a Group object) - creates it if necessary
748     */
749    public RPA_I09_RESULTS getRESULTS() { 
750       return getTyped("RESULTS", RPA_I09_RESULTS.class);
751    }
752
753
754    /**
755     * Returns a specific repetition of
756     * RESULTS (a Group object) - creates it if necessary
757     *
758     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
759     * @throws HL7Exception if the repetition requested is more than one 
760     *     greater than the number of existing repetitions.
761     */
762    public RPA_I09_RESULTS getRESULTS(int rep) { 
763       return getTyped("RESULTS", rep, RPA_I09_RESULTS.class);
764    }
765
766    /** 
767     * Returns the number of existing repetitions of RESULTS 
768     */ 
769    public int getRESULTSReps() { 
770        return getReps("RESULTS");
771    } 
772
773    /** 
774     * <p>
775     * Returns a non-modifiable List containing all current existing repetitions of RESULTS.
776     * <p>
777     * <p>
778     * Note that unlike {@link #getRESULTS()}, this method will not create any reps
779     * if none are already present, so an empty list may be returned.
780     * </p>
781     */ 
782    public List<RPA_I09_RESULTS> getRESULTSAll() throws HL7Exception {
783        return getAllAsList("RESULTS", RPA_I09_RESULTS.class);
784    } 
785
786    /**
787     * Inserts a specific repetition of RESULTS (a Group object)
788     * @see AbstractGroup#insertRepetition(Structure, int) 
789     */
790    public void insertRESULTS(RPA_I09_RESULTS structure, int rep) throws HL7Exception { 
791       super.insertRepetition( "RESULTS", structure, rep);
792    }
793
794
795    /**
796     * Inserts a specific repetition of RESULTS (a Group object)
797     * @see AbstractGroup#insertRepetition(Structure, int) 
798     */
799    public RPA_I09_RESULTS insertRESULTS(int rep) throws HL7Exception { 
800       return (RPA_I09_RESULTS)super.insertRepetition("RESULTS", rep);
801    }
802
803
804    /**
805     * Removes a specific repetition of RESULTS (a Group object)
806     * @see AbstractGroup#removeRepetition(String, int) 
807     */
808    public RPA_I09_RESULTS removeRESULTS(int rep) throws HL7Exception { 
809       return (RPA_I09_RESULTS)super.removeRepetition("RESULTS", rep);
810    }
811
812
813
814    /**
815     * Returns
816     * VISIT (a Group object) - creates it if necessary
817     */
818    public RPA_I09_VISIT getVISIT() { 
819       return getTyped("VISIT", RPA_I09_VISIT.class);
820    }
821
822
823
824
825}
826