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