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