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