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