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