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