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