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.v25.message;
035
036import ca.uhn.hl7v2.model.v25.group.*;
037import ca.uhn.hl7v2.model.v25.segment.*;
038
039import ca.uhn.hl7v2.HL7Exception;
040import ca.uhn.hl7v2.parser.ModelClassFactory;
041import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
042import ca.uhn.hl7v2.model.*;
043
044
045/**
046 * <p>Represents a REF_I12 message structure (see chapter 11.5.1). This structure contains the 
047 * following elements: </p>
048 * <ul>
049                                 * <li>1: MSH (Message Header) <b> </b> </li>
050                                 * <li>2: SFT (Software Segment) <b>optional repeating</b> </li>
051                                 * <li>3: RF1 (Referral Information) <b>optional </b> </li>
052                                 * <li>4: REF_I12_AUTHORIZATION_CONTACT (a Group object) <b>optional </b> </li>
053                                 * <li>5: REF_I12_PROVIDER_CONTACT (a Group object) <b> repeating</b> </li>
054                                 * <li>6: PID (Patient Identification) <b> </b> </li>
055                                 * <li>7: NK1 (Next of Kin / Associated Parties) <b>optional repeating</b> </li>
056                                 * <li>8: GT1 (Guarantor) <b>optional repeating</b> </li>
057                                 * <li>9: REF_I12_INSURANCE (a Group object) <b>optional repeating</b> </li>
058                                 * <li>10: ACC (Accident) <b>optional </b> </li>
059                                 * <li>11: DG1 (Diagnosis) <b>optional repeating</b> </li>
060                                 * <li>12: DRG (Diagnosis Related Group) <b>optional repeating</b> </li>
061                                 * <li>13: AL1 (Patient Allergy Information) <b>optional repeating</b> </li>
062                                 * <li>14: REF_I12_PROCEDURE (a Group object) <b>optional repeating</b> </li>
063                                 * <li>15: REF_I12_OBSERVATION (a Group object) <b>optional repeating</b> </li>
064                                 * <li>16: REF_I12_PATIENT_VISIT (a Group object) <b>optional </b> </li>
065                                 * <li>17: NTE (Notes and Comments) <b>optional repeating</b> </li>
066 * </ul>
067 */
068//@SuppressWarnings("unused")
069public class REF_I12 extends AbstractMessage  {
070
071    /**
072     * Creates a new REF_I12 message with DefaultModelClassFactory. 
073     */ 
074    public REF_I12() { 
075       this(new DefaultModelClassFactory());
076    }
077
078    /** 
079     * Creates a new REF_I12 message with custom ModelClassFactory.
080     */
081    public REF_I12(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(SFT.class, false, true);
090                                  this.add(RF1.class, false, false);
091                                  this.add(REF_I12_AUTHORIZATION_CONTACT.class, false, false);
092                                  this.add(REF_I12_PROVIDER_CONTACT.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(REF_I12_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(REF_I12_PROCEDURE.class, false, true);
102                                  this.add(REF_I12_OBSERVATION.class, false, true);
103                                  this.add(REF_I12_PATIENT_VISIT.class, false, false);
104                                  this.add(NTE.class, false, true);
105               } catch(HL7Exception e) {
106          log.error("Unexpected error creating REF_I12 - this is probably a bug in the source code generator.", e);
107       }
108    }
109
110
111    /** 
112     * Returns "2.5"
113     */
114    public String getVersion() {
115       return "2.5";
116    }
117
118
119
120
121    /**
122     * <p>
123     * Returns
124     * MSH (Message Header) - creates it if necessary
125     * </p>
126     * 
127     *
128     */
129    public MSH getMSH() { 
130       return getTyped("MSH", MSH.class);
131    }
132
133
134
135
136
137    /**
138     * <p>
139     * Returns
140     * the first repetition of 
141     * SFT (Software Segment) - creates it if necessary
142     * </p>
143     * 
144     *
145     */
146    public SFT getSFT() { 
147       return getTyped("SFT", SFT.class);
148    }
149
150
151    /**
152     * <p>
153     * Returns a specific repetition of
154     * SFT (Software Segment) - creates it if necessary
155     * </p>
156     * 
157     *
158     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
159     * @throws HL7Exception if the repetition requested is more than one 
160     *     greater than the number of existing repetitions.
161     */
162    public SFT getSFT(int rep) { 
163       return getTyped("SFT", rep, SFT.class);
164    }
165
166    /** 
167     * <p>
168     * Returns the number of existing repetitions of SFT 
169     * </p>
170     * 
171     */ 
172    public int getSFTReps() { 
173        return getReps("SFT");
174    } 
175
176    /** 
177     * <p>
178     * Returns a non-modifiable List containing all current existing repetitions of SFT.
179     * <p>
180     * <p>
181     * Note that unlike {@link #getSFT()}, this method will not create any reps
182     * if none are already present, so an empty list may be returned.
183     * </p>
184     * 
185     */ 
186    public java.util.List<SFT> getSFTAll() throws HL7Exception {
187        return getAllAsList("SFT", SFT.class);
188    } 
189
190    /**
191     * <p>
192     * Inserts a specific repetition of SFT (Software Segment)
193     * </p>
194     * 
195     *
196     * @see AbstractGroup#insertRepetition(Structure, int) 
197     */
198    public void insertSFT(SFT structure, int rep) throws HL7Exception { 
199       super.insertRepetition( "SFT", structure, rep);
200    }
201
202
203    /**
204     * <p>
205     * Inserts a specific repetition of SFT (Software Segment)
206     * </p>
207     * 
208     *
209     * @see AbstractGroup#insertRepetition(Structure, int) 
210     */
211    public SFT insertSFT(int rep) throws HL7Exception { 
212       return (SFT)super.insertRepetition("SFT", rep);
213    }
214
215
216    /**
217     * <p>
218     * Removes a specific repetition of SFT (Software Segment)
219     * </p>
220     * 
221     *
222     * @see AbstractGroup#removeRepetition(String, int) 
223     */
224    public SFT removeSFT(int rep) throws HL7Exception { 
225       return (SFT)super.removeRepetition("SFT", rep);
226    }
227
228
229
230
231    /**
232     * <p>
233     * Returns
234     * RF1 (Referral Information) - creates it if necessary
235     * </p>
236     * 
237     *
238     */
239    public RF1 getRF1() { 
240       return getTyped("RF1", RF1.class);
241    }
242
243
244
245
246
247    /**
248     * <p>
249     * Returns
250     * AUTHORIZATION_CONTACT (a Group object) - creates it if necessary
251     * </p>
252     * 
253     *
254     */
255    public REF_I12_AUTHORIZATION_CONTACT getAUTHORIZATION_CONTACT() { 
256       return getTyped("AUTHORIZATION_CONTACT", REF_I12_AUTHORIZATION_CONTACT.class);
257    }
258
259
260
261
262
263    /**
264     * <p>
265     * Returns
266     * the first repetition of 
267     * PROVIDER_CONTACT (a Group object) - creates it if necessary
268     * </p>
269     * 
270     *
271     */
272    public REF_I12_PROVIDER_CONTACT getPROVIDER_CONTACT() { 
273       return getTyped("PROVIDER_CONTACT", REF_I12_PROVIDER_CONTACT.class);
274    }
275
276
277    /**
278     * <p>
279     * Returns a specific repetition of
280     * PROVIDER_CONTACT (a Group object) - creates it if necessary
281     * </p>
282     * 
283     *
284     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
285     * @throws HL7Exception if the repetition requested is more than one 
286     *     greater than the number of existing repetitions.
287     */
288    public REF_I12_PROVIDER_CONTACT getPROVIDER_CONTACT(int rep) { 
289       return getTyped("PROVIDER_CONTACT", rep, REF_I12_PROVIDER_CONTACT.class);
290    }
291
292    /** 
293     * <p>
294     * Returns the number of existing repetitions of PROVIDER_CONTACT 
295     * </p>
296     * 
297     */ 
298    public int getPROVIDER_CONTACTReps() { 
299        return getReps("PROVIDER_CONTACT");
300    } 
301
302    /** 
303     * <p>
304     * Returns a non-modifiable List containing all current existing repetitions of PROVIDER_CONTACT.
305     * <p>
306     * <p>
307     * Note that unlike {@link #getPROVIDER_CONTACT()}, this method will not create any reps
308     * if none are already present, so an empty list may be returned.
309     * </p>
310     * 
311     */ 
312    public java.util.List<REF_I12_PROVIDER_CONTACT> getPROVIDER_CONTACTAll() throws HL7Exception {
313        return getAllAsList("PROVIDER_CONTACT", REF_I12_PROVIDER_CONTACT.class);
314    } 
315
316    /**
317     * <p>
318     * Inserts a specific repetition of PROVIDER_CONTACT (a Group object)
319     * </p>
320     * 
321     *
322     * @see AbstractGroup#insertRepetition(Structure, int) 
323     */
324    public void insertPROVIDER_CONTACT(REF_I12_PROVIDER_CONTACT structure, int rep) throws HL7Exception { 
325       super.insertRepetition( "PROVIDER_CONTACT", structure, rep);
326    }
327
328
329    /**
330     * <p>
331     * Inserts a specific repetition of PROVIDER_CONTACT (a Group object)
332     * </p>
333     * 
334     *
335     * @see AbstractGroup#insertRepetition(Structure, int) 
336     */
337    public REF_I12_PROVIDER_CONTACT insertPROVIDER_CONTACT(int rep) throws HL7Exception { 
338       return (REF_I12_PROVIDER_CONTACT)super.insertRepetition("PROVIDER_CONTACT", rep);
339    }
340
341
342    /**
343     * <p>
344     * Removes a specific repetition of PROVIDER_CONTACT (a Group object)
345     * </p>
346     * 
347     *
348     * @see AbstractGroup#removeRepetition(String, int) 
349     */
350    public REF_I12_PROVIDER_CONTACT removePROVIDER_CONTACT(int rep) throws HL7Exception { 
351       return (REF_I12_PROVIDER_CONTACT)super.removeRepetition("PROVIDER_CONTACT", rep);
352    }
353
354
355
356
357    /**
358     * <p>
359     * Returns
360     * PID (Patient Identification) - creates it if necessary
361     * </p>
362     * 
363     *
364     */
365    public PID getPID() { 
366       return getTyped("PID", PID.class);
367    }
368
369
370
371
372
373    /**
374     * <p>
375     * Returns
376     * the first repetition of 
377     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
378     * </p>
379     * 
380     *
381     */
382    public NK1 getNK1() { 
383       return getTyped("NK1", NK1.class);
384    }
385
386
387    /**
388     * <p>
389     * Returns a specific repetition of
390     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
391     * </p>
392     * 
393     *
394     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
395     * @throws HL7Exception if the repetition requested is more than one 
396     *     greater than the number of existing repetitions.
397     */
398    public NK1 getNK1(int rep) { 
399       return getTyped("NK1", rep, NK1.class);
400    }
401
402    /** 
403     * <p>
404     * Returns the number of existing repetitions of NK1 
405     * </p>
406     * 
407     */ 
408    public int getNK1Reps() { 
409        return getReps("NK1");
410    } 
411
412    /** 
413     * <p>
414     * Returns a non-modifiable List containing all current existing repetitions of NK1.
415     * <p>
416     * <p>
417     * Note that unlike {@link #getNK1()}, this method will not create any reps
418     * if none are already present, so an empty list may be returned.
419     * </p>
420     * 
421     */ 
422    public java.util.List<NK1> getNK1All() throws HL7Exception {
423        return getAllAsList("NK1", NK1.class);
424    } 
425
426    /**
427     * <p>
428     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
429     * </p>
430     * 
431     *
432     * @see AbstractGroup#insertRepetition(Structure, int) 
433     */
434    public void insertNK1(NK1 structure, int rep) throws HL7Exception { 
435       super.insertRepetition( "NK1", structure, rep);
436    }
437
438
439    /**
440     * <p>
441     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
442     * </p>
443     * 
444     *
445     * @see AbstractGroup#insertRepetition(Structure, int) 
446     */
447    public NK1 insertNK1(int rep) throws HL7Exception { 
448       return (NK1)super.insertRepetition("NK1", rep);
449    }
450
451
452    /**
453     * <p>
454     * Removes a specific repetition of NK1 (Next of Kin / Associated Parties)
455     * </p>
456     * 
457     *
458     * @see AbstractGroup#removeRepetition(String, int) 
459     */
460    public NK1 removeNK1(int rep) throws HL7Exception { 
461       return (NK1)super.removeRepetition("NK1", rep);
462    }
463
464
465
466
467    /**
468     * <p>
469     * Returns
470     * the first repetition of 
471     * GT1 (Guarantor) - creates it if necessary
472     * </p>
473     * 
474     *
475     */
476    public GT1 getGT1() { 
477       return getTyped("GT1", GT1.class);
478    }
479
480
481    /**
482     * <p>
483     * Returns a specific repetition of
484     * GT1 (Guarantor) - creates it if necessary
485     * </p>
486     * 
487     *
488     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
489     * @throws HL7Exception if the repetition requested is more than one 
490     *     greater than the number of existing repetitions.
491     */
492    public GT1 getGT1(int rep) { 
493       return getTyped("GT1", rep, GT1.class);
494    }
495
496    /** 
497     * <p>
498     * Returns the number of existing repetitions of GT1 
499     * </p>
500     * 
501     */ 
502    public int getGT1Reps() { 
503        return getReps("GT1");
504    } 
505
506    /** 
507     * <p>
508     * Returns a non-modifiable List containing all current existing repetitions of GT1.
509     * <p>
510     * <p>
511     * Note that unlike {@link #getGT1()}, this method will not create any reps
512     * if none are already present, so an empty list may be returned.
513     * </p>
514     * 
515     */ 
516    public java.util.List<GT1> getGT1All() throws HL7Exception {
517        return getAllAsList("GT1", GT1.class);
518    } 
519
520    /**
521     * <p>
522     * Inserts a specific repetition of GT1 (Guarantor)
523     * </p>
524     * 
525     *
526     * @see AbstractGroup#insertRepetition(Structure, int) 
527     */
528    public void insertGT1(GT1 structure, int rep) throws HL7Exception { 
529       super.insertRepetition( "GT1", structure, rep);
530    }
531
532
533    /**
534     * <p>
535     * Inserts a specific repetition of GT1 (Guarantor)
536     * </p>
537     * 
538     *
539     * @see AbstractGroup#insertRepetition(Structure, int) 
540     */
541    public GT1 insertGT1(int rep) throws HL7Exception { 
542       return (GT1)super.insertRepetition("GT1", rep);
543    }
544
545
546    /**
547     * <p>
548     * Removes a specific repetition of GT1 (Guarantor)
549     * </p>
550     * 
551     *
552     * @see AbstractGroup#removeRepetition(String, int) 
553     */
554    public GT1 removeGT1(int rep) throws HL7Exception { 
555       return (GT1)super.removeRepetition("GT1", rep);
556    }
557
558
559
560
561    /**
562     * <p>
563     * Returns
564     * the first repetition of 
565     * INSURANCE (a Group object) - creates it if necessary
566     * </p>
567     * 
568     *
569     */
570    public REF_I12_INSURANCE getINSURANCE() { 
571       return getTyped("INSURANCE", REF_I12_INSURANCE.class);
572    }
573
574
575    /**
576     * <p>
577     * Returns a specific repetition of
578     * INSURANCE (a Group object) - creates it if necessary
579     * </p>
580     * 
581     *
582     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
583     * @throws HL7Exception if the repetition requested is more than one 
584     *     greater than the number of existing repetitions.
585     */
586    public REF_I12_INSURANCE getINSURANCE(int rep) { 
587       return getTyped("INSURANCE", rep, REF_I12_INSURANCE.class);
588    }
589
590    /** 
591     * <p>
592     * Returns the number of existing repetitions of INSURANCE 
593     * </p>
594     * 
595     */ 
596    public int getINSURANCEReps() { 
597        return getReps("INSURANCE");
598    } 
599
600    /** 
601     * <p>
602     * Returns a non-modifiable List containing all current existing repetitions of INSURANCE.
603     * <p>
604     * <p>
605     * Note that unlike {@link #getINSURANCE()}, this method will not create any reps
606     * if none are already present, so an empty list may be returned.
607     * </p>
608     * 
609     */ 
610    public java.util.List<REF_I12_INSURANCE> getINSURANCEAll() throws HL7Exception {
611        return getAllAsList("INSURANCE", REF_I12_INSURANCE.class);
612    } 
613
614    /**
615     * <p>
616     * Inserts a specific repetition of INSURANCE (a Group object)
617     * </p>
618     * 
619     *
620     * @see AbstractGroup#insertRepetition(Structure, int) 
621     */
622    public void insertINSURANCE(REF_I12_INSURANCE structure, int rep) throws HL7Exception { 
623       super.insertRepetition( "INSURANCE", structure, rep);
624    }
625
626
627    /**
628     * <p>
629     * Inserts a specific repetition of INSURANCE (a Group object)
630     * </p>
631     * 
632     *
633     * @see AbstractGroup#insertRepetition(Structure, int) 
634     */
635    public REF_I12_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 
636       return (REF_I12_INSURANCE)super.insertRepetition("INSURANCE", rep);
637    }
638
639
640    /**
641     * <p>
642     * Removes a specific repetition of INSURANCE (a Group object)
643     * </p>
644     * 
645     *
646     * @see AbstractGroup#removeRepetition(String, int) 
647     */
648    public REF_I12_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 
649       return (REF_I12_INSURANCE)super.removeRepetition("INSURANCE", rep);
650    }
651
652
653
654
655    /**
656     * <p>
657     * Returns
658     * ACC (Accident) - creates it if necessary
659     * </p>
660     * 
661     *
662     */
663    public ACC getACC() { 
664       return getTyped("ACC", ACC.class);
665    }
666
667
668
669
670
671    /**
672     * <p>
673     * Returns
674     * the first repetition of 
675     * DG1 (Diagnosis) - creates it if necessary
676     * </p>
677     * 
678     *
679     */
680    public DG1 getDG1() { 
681       return getTyped("DG1", DG1.class);
682    }
683
684
685    /**
686     * <p>
687     * Returns a specific repetition of
688     * DG1 (Diagnosis) - creates it if necessary
689     * </p>
690     * 
691     *
692     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
693     * @throws HL7Exception if the repetition requested is more than one 
694     *     greater than the number of existing repetitions.
695     */
696    public DG1 getDG1(int rep) { 
697       return getTyped("DG1", rep, DG1.class);
698    }
699
700    /** 
701     * <p>
702     * Returns the number of existing repetitions of DG1 
703     * </p>
704     * 
705     */ 
706    public int getDG1Reps() { 
707        return getReps("DG1");
708    } 
709
710    /** 
711     * <p>
712     * Returns a non-modifiable List containing all current existing repetitions of DG1.
713     * <p>
714     * <p>
715     * Note that unlike {@link #getDG1()}, this method will not create any reps
716     * if none are already present, so an empty list may be returned.
717     * </p>
718     * 
719     */ 
720    public java.util.List<DG1> getDG1All() throws HL7Exception {
721        return getAllAsList("DG1", DG1.class);
722    } 
723
724    /**
725     * <p>
726     * Inserts a specific repetition of DG1 (Diagnosis)
727     * </p>
728     * 
729     *
730     * @see AbstractGroup#insertRepetition(Structure, int) 
731     */
732    public void insertDG1(DG1 structure, int rep) throws HL7Exception { 
733       super.insertRepetition( "DG1", structure, rep);
734    }
735
736
737    /**
738     * <p>
739     * Inserts a specific repetition of DG1 (Diagnosis)
740     * </p>
741     * 
742     *
743     * @see AbstractGroup#insertRepetition(Structure, int) 
744     */
745    public DG1 insertDG1(int rep) throws HL7Exception { 
746       return (DG1)super.insertRepetition("DG1", rep);
747    }
748
749
750    /**
751     * <p>
752     * Removes a specific repetition of DG1 (Diagnosis)
753     * </p>
754     * 
755     *
756     * @see AbstractGroup#removeRepetition(String, int) 
757     */
758    public DG1 removeDG1(int rep) throws HL7Exception { 
759       return (DG1)super.removeRepetition("DG1", rep);
760    }
761
762
763
764
765    /**
766     * <p>
767     * Returns
768     * the first repetition of 
769     * DRG (Diagnosis Related Group) - creates it if necessary
770     * </p>
771     * 
772     *
773     */
774    public DRG getDRG() { 
775       return getTyped("DRG", DRG.class);
776    }
777
778
779    /**
780     * <p>
781     * Returns a specific repetition of
782     * DRG (Diagnosis Related Group) - creates it if necessary
783     * </p>
784     * 
785     *
786     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
787     * @throws HL7Exception if the repetition requested is more than one 
788     *     greater than the number of existing repetitions.
789     */
790    public DRG getDRG(int rep) { 
791       return getTyped("DRG", rep, DRG.class);
792    }
793
794    /** 
795     * <p>
796     * Returns the number of existing repetitions of DRG 
797     * </p>
798     * 
799     */ 
800    public int getDRGReps() { 
801        return getReps("DRG");
802    } 
803
804    /** 
805     * <p>
806     * Returns a non-modifiable List containing all current existing repetitions of DRG.
807     * <p>
808     * <p>
809     * Note that unlike {@link #getDRG()}, this method will not create any reps
810     * if none are already present, so an empty list may be returned.
811     * </p>
812     * 
813     */ 
814    public java.util.List<DRG> getDRGAll() throws HL7Exception {
815        return getAllAsList("DRG", DRG.class);
816    } 
817
818    /**
819     * <p>
820     * Inserts a specific repetition of DRG (Diagnosis Related Group)
821     * </p>
822     * 
823     *
824     * @see AbstractGroup#insertRepetition(Structure, int) 
825     */
826    public void insertDRG(DRG structure, int rep) throws HL7Exception { 
827       super.insertRepetition( "DRG", structure, rep);
828    }
829
830
831    /**
832     * <p>
833     * Inserts a specific repetition of DRG (Diagnosis Related Group)
834     * </p>
835     * 
836     *
837     * @see AbstractGroup#insertRepetition(Structure, int) 
838     */
839    public DRG insertDRG(int rep) throws HL7Exception { 
840       return (DRG)super.insertRepetition("DRG", rep);
841    }
842
843
844    /**
845     * <p>
846     * Removes a specific repetition of DRG (Diagnosis Related Group)
847     * </p>
848     * 
849     *
850     * @see AbstractGroup#removeRepetition(String, int) 
851     */
852    public DRG removeDRG(int rep) throws HL7Exception { 
853       return (DRG)super.removeRepetition("DRG", rep);
854    }
855
856
857
858
859    /**
860     * <p>
861     * Returns
862     * the first repetition of 
863     * AL1 (Patient Allergy Information) - creates it if necessary
864     * </p>
865     * 
866     *
867     */
868    public AL1 getAL1() { 
869       return getTyped("AL1", AL1.class);
870    }
871
872
873    /**
874     * <p>
875     * Returns a specific repetition of
876     * AL1 (Patient Allergy Information) - creates it if necessary
877     * </p>
878     * 
879     *
880     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
881     * @throws HL7Exception if the repetition requested is more than one 
882     *     greater than the number of existing repetitions.
883     */
884    public AL1 getAL1(int rep) { 
885       return getTyped("AL1", rep, AL1.class);
886    }
887
888    /** 
889     * <p>
890     * Returns the number of existing repetitions of AL1 
891     * </p>
892     * 
893     */ 
894    public int getAL1Reps() { 
895        return getReps("AL1");
896    } 
897
898    /** 
899     * <p>
900     * Returns a non-modifiable List containing all current existing repetitions of AL1.
901     * <p>
902     * <p>
903     * Note that unlike {@link #getAL1()}, this method will not create any reps
904     * if none are already present, so an empty list may be returned.
905     * </p>
906     * 
907     */ 
908    public java.util.List<AL1> getAL1All() throws HL7Exception {
909        return getAllAsList("AL1", AL1.class);
910    } 
911
912    /**
913     * <p>
914     * Inserts a specific repetition of AL1 (Patient Allergy Information)
915     * </p>
916     * 
917     *
918     * @see AbstractGroup#insertRepetition(Structure, int) 
919     */
920    public void insertAL1(AL1 structure, int rep) throws HL7Exception { 
921       super.insertRepetition( "AL1", structure, rep);
922    }
923
924
925    /**
926     * <p>
927     * Inserts a specific repetition of AL1 (Patient Allergy Information)
928     * </p>
929     * 
930     *
931     * @see AbstractGroup#insertRepetition(Structure, int) 
932     */
933    public AL1 insertAL1(int rep) throws HL7Exception { 
934       return (AL1)super.insertRepetition("AL1", rep);
935    }
936
937
938    /**
939     * <p>
940     * Removes a specific repetition of AL1 (Patient Allergy Information)
941     * </p>
942     * 
943     *
944     * @see AbstractGroup#removeRepetition(String, int) 
945     */
946    public AL1 removeAL1(int rep) throws HL7Exception { 
947       return (AL1)super.removeRepetition("AL1", rep);
948    }
949
950
951
952
953    /**
954     * <p>
955     * Returns
956     * the first repetition of 
957     * PROCEDURE (a Group object) - creates it if necessary
958     * </p>
959     * 
960     *
961     */
962    public REF_I12_PROCEDURE getPROCEDURE() { 
963       return getTyped("PROCEDURE", REF_I12_PROCEDURE.class);
964    }
965
966
967    /**
968     * <p>
969     * Returns a specific repetition of
970     * PROCEDURE (a Group object) - creates it if necessary
971     * </p>
972     * 
973     *
974     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
975     * @throws HL7Exception if the repetition requested is more than one 
976     *     greater than the number of existing repetitions.
977     */
978    public REF_I12_PROCEDURE getPROCEDURE(int rep) { 
979       return getTyped("PROCEDURE", rep, REF_I12_PROCEDURE.class);
980    }
981
982    /** 
983     * <p>
984     * Returns the number of existing repetitions of PROCEDURE 
985     * </p>
986     * 
987     */ 
988    public int getPROCEDUREReps() { 
989        return getReps("PROCEDURE");
990    } 
991
992    /** 
993     * <p>
994     * Returns a non-modifiable List containing all current existing repetitions of PROCEDURE.
995     * <p>
996     * <p>
997     * Note that unlike {@link #getPROCEDURE()}, this method will not create any reps
998     * if none are already present, so an empty list may be returned.
999     * </p>
1000     * 
1001     */ 
1002    public java.util.List<REF_I12_PROCEDURE> getPROCEDUREAll() throws HL7Exception {
1003        return getAllAsList("PROCEDURE", REF_I12_PROCEDURE.class);
1004    } 
1005
1006    /**
1007     * <p>
1008     * Inserts a specific repetition of PROCEDURE (a Group object)
1009     * </p>
1010     * 
1011     *
1012     * @see AbstractGroup#insertRepetition(Structure, int) 
1013     */
1014    public void insertPROCEDURE(REF_I12_PROCEDURE structure, int rep) throws HL7Exception { 
1015       super.insertRepetition( "PROCEDURE", structure, rep);
1016    }
1017
1018
1019    /**
1020     * <p>
1021     * Inserts a specific repetition of PROCEDURE (a Group object)
1022     * </p>
1023     * 
1024     *
1025     * @see AbstractGroup#insertRepetition(Structure, int) 
1026     */
1027    public REF_I12_PROCEDURE insertPROCEDURE(int rep) throws HL7Exception { 
1028       return (REF_I12_PROCEDURE)super.insertRepetition("PROCEDURE", rep);
1029    }
1030
1031
1032    /**
1033     * <p>
1034     * Removes a specific repetition of PROCEDURE (a Group object)
1035     * </p>
1036     * 
1037     *
1038     * @see AbstractGroup#removeRepetition(String, int) 
1039     */
1040    public REF_I12_PROCEDURE removePROCEDURE(int rep) throws HL7Exception { 
1041       return (REF_I12_PROCEDURE)super.removeRepetition("PROCEDURE", rep);
1042    }
1043
1044
1045
1046
1047    /**
1048     * <p>
1049     * Returns
1050     * the first repetition of 
1051     * OBSERVATION (a Group object) - creates it if necessary
1052     * </p>
1053     * 
1054     *
1055     */
1056    public REF_I12_OBSERVATION getOBSERVATION() { 
1057       return getTyped("OBSERVATION", REF_I12_OBSERVATION.class);
1058    }
1059
1060
1061    /**
1062     * <p>
1063     * Returns a specific repetition of
1064     * OBSERVATION (a Group object) - creates it if necessary
1065     * </p>
1066     * 
1067     *
1068     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
1069     * @throws HL7Exception if the repetition requested is more than one 
1070     *     greater than the number of existing repetitions.
1071     */
1072    public REF_I12_OBSERVATION getOBSERVATION(int rep) { 
1073       return getTyped("OBSERVATION", rep, REF_I12_OBSERVATION.class);
1074    }
1075
1076    /** 
1077     * <p>
1078     * Returns the number of existing repetitions of OBSERVATION 
1079     * </p>
1080     * 
1081     */ 
1082    public int getOBSERVATIONReps() { 
1083        return getReps("OBSERVATION");
1084    } 
1085
1086    /** 
1087     * <p>
1088     * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION.
1089     * <p>
1090     * <p>
1091     * Note that unlike {@link #getOBSERVATION()}, this method will not create any reps
1092     * if none are already present, so an empty list may be returned.
1093     * </p>
1094     * 
1095     */ 
1096    public java.util.List<REF_I12_OBSERVATION> getOBSERVATIONAll() throws HL7Exception {
1097        return getAllAsList("OBSERVATION", REF_I12_OBSERVATION.class);
1098    } 
1099
1100    /**
1101     * <p>
1102     * Inserts a specific repetition of OBSERVATION (a Group object)
1103     * </p>
1104     * 
1105     *
1106     * @see AbstractGroup#insertRepetition(Structure, int) 
1107     */
1108    public void insertOBSERVATION(REF_I12_OBSERVATION structure, int rep) throws HL7Exception { 
1109       super.insertRepetition( "OBSERVATION", structure, rep);
1110    }
1111
1112
1113    /**
1114     * <p>
1115     * Inserts a specific repetition of OBSERVATION (a Group object)
1116     * </p>
1117     * 
1118     *
1119     * @see AbstractGroup#insertRepetition(Structure, int) 
1120     */
1121    public REF_I12_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception { 
1122       return (REF_I12_OBSERVATION)super.insertRepetition("OBSERVATION", rep);
1123    }
1124
1125
1126    /**
1127     * <p>
1128     * Removes a specific repetition of OBSERVATION (a Group object)
1129     * </p>
1130     * 
1131     *
1132     * @see AbstractGroup#removeRepetition(String, int) 
1133     */
1134    public REF_I12_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception { 
1135       return (REF_I12_OBSERVATION)super.removeRepetition("OBSERVATION", rep);
1136    }
1137
1138
1139
1140
1141    /**
1142     * <p>
1143     * Returns
1144     * PATIENT_VISIT (a Group object) - creates it if necessary
1145     * </p>
1146     * 
1147     *
1148     */
1149    public REF_I12_PATIENT_VISIT getPATIENT_VISIT() { 
1150       return getTyped("PATIENT_VISIT", REF_I12_PATIENT_VISIT.class);
1151    }
1152
1153
1154
1155
1156
1157    /**
1158     * <p>
1159     * Returns
1160     * the first repetition of 
1161     * NTE (Notes and Comments) - creates it if necessary
1162     * </p>
1163     * 
1164     *
1165     */
1166    public NTE getNTE() { 
1167       return getTyped("NTE", NTE.class);
1168    }
1169
1170
1171    /**
1172     * <p>
1173     * Returns a specific repetition of
1174     * NTE (Notes and Comments) - creates it if necessary
1175     * </p>
1176     * 
1177     *
1178     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
1179     * @throws HL7Exception if the repetition requested is more than one 
1180     *     greater than the number of existing repetitions.
1181     */
1182    public NTE getNTE(int rep) { 
1183       return getTyped("NTE", rep, NTE.class);
1184    }
1185
1186    /** 
1187     * <p>
1188     * Returns the number of existing repetitions of NTE 
1189     * </p>
1190     * 
1191     */ 
1192    public int getNTEReps() { 
1193        return getReps("NTE");
1194    } 
1195
1196    /** 
1197     * <p>
1198     * Returns a non-modifiable List containing all current existing repetitions of NTE.
1199     * <p>
1200     * <p>
1201     * Note that unlike {@link #getNTE()}, this method will not create any reps
1202     * if none are already present, so an empty list may be returned.
1203     * </p>
1204     * 
1205     */ 
1206    public java.util.List<NTE> getNTEAll() throws HL7Exception {
1207        return getAllAsList("NTE", NTE.class);
1208    } 
1209
1210    /**
1211     * <p>
1212     * Inserts a specific repetition of NTE (Notes and Comments)
1213     * </p>
1214     * 
1215     *
1216     * @see AbstractGroup#insertRepetition(Structure, int) 
1217     */
1218    public void insertNTE(NTE structure, int rep) throws HL7Exception { 
1219       super.insertRepetition( "NTE", structure, rep);
1220    }
1221
1222
1223    /**
1224     * <p>
1225     * Inserts a specific repetition of NTE (Notes and Comments)
1226     * </p>
1227     * 
1228     *
1229     * @see AbstractGroup#insertRepetition(Structure, int) 
1230     */
1231    public NTE insertNTE(int rep) throws HL7Exception { 
1232       return (NTE)super.insertRepetition("NTE", rep);
1233    }
1234
1235
1236    /**
1237     * <p>
1238     * Removes a specific repetition of NTE (Notes and Comments)
1239     * </p>
1240     * 
1241     *
1242     * @see AbstractGroup#removeRepetition(String, int) 
1243     */
1244    public NTE removeNTE(int rep) throws HL7Exception { 
1245       return (NTE)super.removeRepetition("NTE", rep);
1246    }
1247
1248
1249
1250}
1251