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