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.group;
035
036import ca.uhn.hl7v2.model.v251.segment.*;
037
038import java.util.List;
039
040import ca.uhn.hl7v2.HL7Exception;
041import ca.uhn.hl7v2.parser.ModelClassFactory;
042import ca.uhn.hl7v2.model.*;
043
044/**
045 * <p>Represents a BAR_P01_VISIT group structure (a Group object).
046 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
047 * This Group contains the following elements:  
048 * </p>
049 * <ul>
050                 * <li>1: PV1 (Patient Visit) <b>optional </b></li>
051                 * <li>2: PV2 (Patient Visit - Additional Information) <b>optional </b></li>
052                 * <li>3: ROL (Role) <b>optional repeating</b></li>
053                 * <li>4: DB1 (Disability) <b>optional repeating</b></li>
054                 * <li>5: OBX (Observation/Result) <b>optional repeating</b></li>
055                 * <li>6: AL1 (Patient Allergy Information) <b>optional repeating</b></li>
056                 * <li>7: DG1 (Diagnosis) <b>optional repeating</b></li>
057                 * <li>8: DRG (Diagnosis Related Group) <b>optional </b></li>
058                 * <li>9: BAR_P01_PROCEDURE (a Group object) <b>optional repeating</b></li>
059                 * <li>10: GT1 (Guarantor) <b>optional repeating</b></li>
060                 * <li>11: NK1 (Next of Kin / Associated Parties) <b>optional repeating</b></li>
061                 * <li>12: BAR_P01_INSURANCE (a Group object) <b>optional repeating</b></li>
062                 * <li>13: ACC (Accident) <b>optional </b></li>
063                 * <li>14: UB1 (UB82) <b>optional </b></li>
064                 * <li>15: UB2 (UB92 Data) <b>optional </b></li>
065 * </ul>
066 */
067@SuppressWarnings("unused")
068public class BAR_P01_VISIT extends AbstractGroup {
069
070    /** 
071     * Creates a new BAR_P01_VISIT group
072     */
073    public BAR_P01_VISIT(Group parent, ModelClassFactory factory) {
074       super(parent, factory);
075       init(factory);
076    }
077
078    private void init(ModelClassFactory factory) {
079       try {
080                          this.add(PV1.class, false, false);
081                          this.add(PV2.class, false, false);
082                          this.add(ROL.class, false, true);
083                          this.add(DB1.class, false, true);
084                          this.add(OBX.class, false, true);
085                          this.add(AL1.class, false, true);
086                          this.add(DG1.class, false, true);
087                          this.add(DRG.class, false, false);
088                          this.add(BAR_P01_PROCEDURE.class, false, true);
089                          this.add(GT1.class, false, true);
090                          this.add(NK1.class, false, true);
091                          this.add(BAR_P01_INSURANCE.class, false, true);
092                          this.add(ACC.class, false, false);
093                          this.add(UB1.class, false, false);
094                          this.add(UB2.class, false, false);
095       } catch(HL7Exception e) {
096          log.error("Unexpected error creating BAR_P01_VISIT - this is probably a bug in the source code generator.", e);
097       }
098    }
099
100    /** 
101     * Returns "2.5.1"
102     */
103    public String getVersion() {
104       return "2.5.1";
105    }
106
107
108
109    /**
110     * Returns
111     * PV1 (Patient Visit) - creates it if necessary
112     */
113    public PV1 getPV1() { 
114       PV1 retVal = getTyped("PV1", PV1.class);
115       return retVal;
116    }
117
118
119
120
121    /**
122     * Returns
123     * PV2 (Patient Visit - Additional Information) - creates it if necessary
124     */
125    public PV2 getPV2() { 
126       PV2 retVal = getTyped("PV2", PV2.class);
127       return retVal;
128    }
129
130
131
132
133    /**
134     * Returns
135     * the first repetition of 
136     * ROL (Role) - creates it if necessary
137     */
138    public ROL getROL() { 
139       ROL retVal = getTyped("ROL", ROL.class);
140       return retVal;
141    }
142
143
144    /**
145     * Returns a specific repetition of
146     * ROL (Role) - creates it if necessary
147     *
148     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
149     * @throws HL7Exception if the repetition requested is more than one 
150     *     greater than the number of existing repetitions.
151     */
152    public ROL getROL(int rep) { 
153       ROL retVal = getTyped("ROL", rep, ROL.class);
154       return retVal;
155    }
156
157    /** 
158     * Returns the number of existing repetitions of ROL 
159     */ 
160    public int getROLReps() {  
161        return getReps("ROL");
162    } 
163
164    /** 
165     * <p>
166     * Returns a non-modifiable List containing all current existing repetitions of ROL.
167     * <p>
168     * <p>
169     * Note that unlike {@link #getROL()}, this method will not create any reps
170     * if none are already present, so an empty list may be returned.
171     * </p>
172     */ 
173    public List<ROL> getROLAll() throws HL7Exception {
174        return getAllAsList("ROL", ROL.class);
175    } 
176
177    /**
178     * Inserts a specific repetition of ROL (Role)
179     * @see AbstractGroup#insertRepetition(Structure, int) 
180     */
181    public void insertROL(ROL structure, int rep) throws HL7Exception { 
182       super.insertRepetition("ROL", structure, rep);
183    }
184
185
186    /**
187     * Inserts a specific repetition of ROL (Role)
188     * @see AbstractGroup#insertRepetition(Structure, int) 
189     */
190    public ROL insertROL(int rep) throws HL7Exception { 
191       return (ROL)super.insertRepetition("ROL", rep);
192    }
193
194
195    /**
196     * Removes a specific repetition of ROL (Role)
197     * @see AbstractGroup#removeRepetition(String, int) 
198     */
199    public ROL removeROL(int rep) throws HL7Exception { 
200       return (ROL)super.removeRepetition("ROL", rep);
201    }
202
203
204
205    /**
206     * Returns
207     * the first repetition of 
208     * DB1 (Disability) - creates it if necessary
209     */
210    public DB1 getDB1() { 
211       DB1 retVal = getTyped("DB1", DB1.class);
212       return retVal;
213    }
214
215
216    /**
217     * Returns a specific repetition of
218     * DB1 (Disability) - creates it if necessary
219     *
220     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
221     * @throws HL7Exception if the repetition requested is more than one 
222     *     greater than the number of existing repetitions.
223     */
224    public DB1 getDB1(int rep) { 
225       DB1 retVal = getTyped("DB1", rep, DB1.class);
226       return retVal;
227    }
228
229    /** 
230     * Returns the number of existing repetitions of DB1 
231     */ 
232    public int getDB1Reps() {  
233        return getReps("DB1");
234    } 
235
236    /** 
237     * <p>
238     * Returns a non-modifiable List containing all current existing repetitions of DB1.
239     * <p>
240     * <p>
241     * Note that unlike {@link #getDB1()}, this method will not create any reps
242     * if none are already present, so an empty list may be returned.
243     * </p>
244     */ 
245    public List<DB1> getDB1All() throws HL7Exception {
246        return getAllAsList("DB1", DB1.class);
247    } 
248
249    /**
250     * Inserts a specific repetition of DB1 (Disability)
251     * @see AbstractGroup#insertRepetition(Structure, int) 
252     */
253    public void insertDB1(DB1 structure, int rep) throws HL7Exception { 
254       super.insertRepetition("DB1", structure, rep);
255    }
256
257
258    /**
259     * Inserts a specific repetition of DB1 (Disability)
260     * @see AbstractGroup#insertRepetition(Structure, int) 
261     */
262    public DB1 insertDB1(int rep) throws HL7Exception { 
263       return (DB1)super.insertRepetition("DB1", rep);
264    }
265
266
267    /**
268     * Removes a specific repetition of DB1 (Disability)
269     * @see AbstractGroup#removeRepetition(String, int) 
270     */
271    public DB1 removeDB1(int rep) throws HL7Exception { 
272       return (DB1)super.removeRepetition("DB1", rep);
273    }
274
275
276
277    /**
278     * Returns
279     * the first repetition of 
280     * OBX (Observation/Result) - creates it if necessary
281     */
282    public OBX getOBX() { 
283       OBX retVal = getTyped("OBX", OBX.class);
284       return retVal;
285    }
286
287
288    /**
289     * Returns a specific repetition of
290     * OBX (Observation/Result) - creates it if necessary
291     *
292     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
293     * @throws HL7Exception if the repetition requested is more than one 
294     *     greater than the number of existing repetitions.
295     */
296    public OBX getOBX(int rep) { 
297       OBX retVal = getTyped("OBX", rep, OBX.class);
298       return retVal;
299    }
300
301    /** 
302     * Returns the number of existing repetitions of OBX 
303     */ 
304    public int getOBXReps() {  
305        return getReps("OBX");
306    } 
307
308    /** 
309     * <p>
310     * Returns a non-modifiable List containing all current existing repetitions of OBX.
311     * <p>
312     * <p>
313     * Note that unlike {@link #getOBX()}, this method will not create any reps
314     * if none are already present, so an empty list may be returned.
315     * </p>
316     */ 
317    public List<OBX> getOBXAll() throws HL7Exception {
318        return getAllAsList("OBX", OBX.class);
319    } 
320
321    /**
322     * Inserts a specific repetition of OBX (Observation/Result)
323     * @see AbstractGroup#insertRepetition(Structure, int) 
324     */
325    public void insertOBX(OBX structure, int rep) throws HL7Exception { 
326       super.insertRepetition("OBX", structure, rep);
327    }
328
329
330    /**
331     * Inserts a specific repetition of OBX (Observation/Result)
332     * @see AbstractGroup#insertRepetition(Structure, int) 
333     */
334    public OBX insertOBX(int rep) throws HL7Exception { 
335       return (OBX)super.insertRepetition("OBX", rep);
336    }
337
338
339    /**
340     * Removes a specific repetition of OBX (Observation/Result)
341     * @see AbstractGroup#removeRepetition(String, int) 
342     */
343    public OBX removeOBX(int rep) throws HL7Exception { 
344       return (OBX)super.removeRepetition("OBX", rep);
345    }
346
347
348
349    /**
350     * Returns
351     * the first repetition of 
352     * AL1 (Patient Allergy Information) - creates it if necessary
353     */
354    public AL1 getAL1() { 
355       AL1 retVal = getTyped("AL1", AL1.class);
356       return retVal;
357    }
358
359
360    /**
361     * Returns a specific repetition of
362     * AL1 (Patient Allergy Information) - creates it if necessary
363     *
364     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
365     * @throws HL7Exception if the repetition requested is more than one 
366     *     greater than the number of existing repetitions.
367     */
368    public AL1 getAL1(int rep) { 
369       AL1 retVal = getTyped("AL1", rep, AL1.class);
370       return retVal;
371    }
372
373    /** 
374     * Returns the number of existing repetitions of AL1 
375     */ 
376    public int getAL1Reps() {  
377        return getReps("AL1");
378    } 
379
380    /** 
381     * <p>
382     * Returns a non-modifiable List containing all current existing repetitions of AL1.
383     * <p>
384     * <p>
385     * Note that unlike {@link #getAL1()}, this method will not create any reps
386     * if none are already present, so an empty list may be returned.
387     * </p>
388     */ 
389    public List<AL1> getAL1All() throws HL7Exception {
390        return getAllAsList("AL1", AL1.class);
391    } 
392
393    /**
394     * Inserts a specific repetition of AL1 (Patient Allergy Information)
395     * @see AbstractGroup#insertRepetition(Structure, int) 
396     */
397    public void insertAL1(AL1 structure, int rep) throws HL7Exception { 
398       super.insertRepetition("AL1", structure, rep);
399    }
400
401
402    /**
403     * Inserts a specific repetition of AL1 (Patient Allergy Information)
404     * @see AbstractGroup#insertRepetition(Structure, int) 
405     */
406    public AL1 insertAL1(int rep) throws HL7Exception { 
407       return (AL1)super.insertRepetition("AL1", rep);
408    }
409
410
411    /**
412     * Removes a specific repetition of AL1 (Patient Allergy Information)
413     * @see AbstractGroup#removeRepetition(String, int) 
414     */
415    public AL1 removeAL1(int rep) throws HL7Exception { 
416       return (AL1)super.removeRepetition("AL1", rep);
417    }
418
419
420
421    /**
422     * Returns
423     * the first repetition of 
424     * DG1 (Diagnosis) - creates it if necessary
425     */
426    public DG1 getDG1() { 
427       DG1 retVal = getTyped("DG1", DG1.class);
428       return retVal;
429    }
430
431
432    /**
433     * Returns a specific repetition of
434     * DG1 (Diagnosis) - creates it if necessary
435     *
436     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
437     * @throws HL7Exception if the repetition requested is more than one 
438     *     greater than the number of existing repetitions.
439     */
440    public DG1 getDG1(int rep) { 
441       DG1 retVal = getTyped("DG1", rep, DG1.class);
442       return retVal;
443    }
444
445    /** 
446     * Returns the number of existing repetitions of DG1 
447     */ 
448    public int getDG1Reps() {  
449        return getReps("DG1");
450    } 
451
452    /** 
453     * <p>
454     * Returns a non-modifiable List containing all current existing repetitions of DG1.
455     * <p>
456     * <p>
457     * Note that unlike {@link #getDG1()}, this method will not create any reps
458     * if none are already present, so an empty list may be returned.
459     * </p>
460     */ 
461    public List<DG1> getDG1All() throws HL7Exception {
462        return getAllAsList("DG1", DG1.class);
463    } 
464
465    /**
466     * Inserts a specific repetition of DG1 (Diagnosis)
467     * @see AbstractGroup#insertRepetition(Structure, int) 
468     */
469    public void insertDG1(DG1 structure, int rep) throws HL7Exception { 
470       super.insertRepetition("DG1", structure, rep);
471    }
472
473
474    /**
475     * Inserts a specific repetition of DG1 (Diagnosis)
476     * @see AbstractGroup#insertRepetition(Structure, int) 
477     */
478    public DG1 insertDG1(int rep) throws HL7Exception { 
479       return (DG1)super.insertRepetition("DG1", rep);
480    }
481
482
483    /**
484     * Removes a specific repetition of DG1 (Diagnosis)
485     * @see AbstractGroup#removeRepetition(String, int) 
486     */
487    public DG1 removeDG1(int rep) throws HL7Exception { 
488       return (DG1)super.removeRepetition("DG1", rep);
489    }
490
491
492
493    /**
494     * Returns
495     * DRG (Diagnosis Related Group) - creates it if necessary
496     */
497    public DRG getDRG() { 
498       DRG retVal = getTyped("DRG", DRG.class);
499       return retVal;
500    }
501
502
503
504
505    /**
506     * Returns
507     * the first repetition of 
508     * PROCEDURE (a Group object) - creates it if necessary
509     */
510    public BAR_P01_PROCEDURE getPROCEDURE() { 
511       BAR_P01_PROCEDURE retVal = getTyped("PROCEDURE", BAR_P01_PROCEDURE.class);
512       return retVal;
513    }
514
515
516    /**
517     * Returns a specific repetition of
518     * PROCEDURE (a Group object) - creates it if necessary
519     *
520     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
521     * @throws HL7Exception if the repetition requested is more than one 
522     *     greater than the number of existing repetitions.
523     */
524    public BAR_P01_PROCEDURE getPROCEDURE(int rep) { 
525       BAR_P01_PROCEDURE retVal = getTyped("PROCEDURE", rep, BAR_P01_PROCEDURE.class);
526       return retVal;
527    }
528
529    /** 
530     * Returns the number of existing repetitions of PROCEDURE 
531     */ 
532    public int getPROCEDUREReps() {  
533        return getReps("PROCEDURE");
534    } 
535
536    /** 
537     * <p>
538     * Returns a non-modifiable List containing all current existing repetitions of PROCEDURE.
539     * <p>
540     * <p>
541     * Note that unlike {@link #getPROCEDURE()}, this method will not create any reps
542     * if none are already present, so an empty list may be returned.
543     * </p>
544     */ 
545    public List<BAR_P01_PROCEDURE> getPROCEDUREAll() throws HL7Exception {
546        return getAllAsList("PROCEDURE", BAR_P01_PROCEDURE.class);
547    } 
548
549    /**
550     * Inserts a specific repetition of PROCEDURE (a Group object)
551     * @see AbstractGroup#insertRepetition(Structure, int) 
552     */
553    public void insertPROCEDURE(BAR_P01_PROCEDURE structure, int rep) throws HL7Exception { 
554       super.insertRepetition("PROCEDURE", structure, rep);
555    }
556
557
558    /**
559     * Inserts a specific repetition of PROCEDURE (a Group object)
560     * @see AbstractGroup#insertRepetition(Structure, int) 
561     */
562    public BAR_P01_PROCEDURE insertPROCEDURE(int rep) throws HL7Exception { 
563       return (BAR_P01_PROCEDURE)super.insertRepetition("PROCEDURE", rep);
564    }
565
566
567    /**
568     * Removes a specific repetition of PROCEDURE (a Group object)
569     * @see AbstractGroup#removeRepetition(String, int) 
570     */
571    public BAR_P01_PROCEDURE removePROCEDURE(int rep) throws HL7Exception { 
572       return (BAR_P01_PROCEDURE)super.removeRepetition("PROCEDURE", rep);
573    }
574
575
576
577    /**
578     * Returns
579     * the first repetition of 
580     * GT1 (Guarantor) - creates it if necessary
581     */
582    public GT1 getGT1() { 
583       GT1 retVal = getTyped("GT1", GT1.class);
584       return retVal;
585    }
586
587
588    /**
589     * Returns a specific repetition of
590     * GT1 (Guarantor) - creates it if necessary
591     *
592     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
593     * @throws HL7Exception if the repetition requested is more than one 
594     *     greater than the number of existing repetitions.
595     */
596    public GT1 getGT1(int rep) { 
597       GT1 retVal = getTyped("GT1", rep, GT1.class);
598       return retVal;
599    }
600
601    /** 
602     * Returns the number of existing repetitions of GT1 
603     */ 
604    public int getGT1Reps() {  
605        return getReps("GT1");
606    } 
607
608    /** 
609     * <p>
610     * Returns a non-modifiable List containing all current existing repetitions of GT1.
611     * <p>
612     * <p>
613     * Note that unlike {@link #getGT1()}, this method will not create any reps
614     * if none are already present, so an empty list may be returned.
615     * </p>
616     */ 
617    public List<GT1> getGT1All() throws HL7Exception {
618        return getAllAsList("GT1", GT1.class);
619    } 
620
621    /**
622     * Inserts a specific repetition of GT1 (Guarantor)
623     * @see AbstractGroup#insertRepetition(Structure, int) 
624     */
625    public void insertGT1(GT1 structure, int rep) throws HL7Exception { 
626       super.insertRepetition("GT1", structure, rep);
627    }
628
629
630    /**
631     * Inserts a specific repetition of GT1 (Guarantor)
632     * @see AbstractGroup#insertRepetition(Structure, int) 
633     */
634    public GT1 insertGT1(int rep) throws HL7Exception { 
635       return (GT1)super.insertRepetition("GT1", rep);
636    }
637
638
639    /**
640     * Removes a specific repetition of GT1 (Guarantor)
641     * @see AbstractGroup#removeRepetition(String, int) 
642     */
643    public GT1 removeGT1(int rep) throws HL7Exception { 
644       return (GT1)super.removeRepetition("GT1", rep);
645    }
646
647
648
649    /**
650     * Returns
651     * the first repetition of 
652     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
653     */
654    public NK1 getNK1() { 
655       NK1 retVal = getTyped("NK1", NK1.class);
656       return retVal;
657    }
658
659
660    /**
661     * Returns a specific repetition of
662     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
663     *
664     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
665     * @throws HL7Exception if the repetition requested is more than one 
666     *     greater than the number of existing repetitions.
667     */
668    public NK1 getNK1(int rep) { 
669       NK1 retVal = getTyped("NK1", rep, NK1.class);
670       return retVal;
671    }
672
673    /** 
674     * Returns the number of existing repetitions of NK1 
675     */ 
676    public int getNK1Reps() {  
677        return getReps("NK1");
678    } 
679
680    /** 
681     * <p>
682     * Returns a non-modifiable List containing all current existing repetitions of NK1.
683     * <p>
684     * <p>
685     * Note that unlike {@link #getNK1()}, this method will not create any reps
686     * if none are already present, so an empty list may be returned.
687     * </p>
688     */ 
689    public List<NK1> getNK1All() throws HL7Exception {
690        return getAllAsList("NK1", NK1.class);
691    } 
692
693    /**
694     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
695     * @see AbstractGroup#insertRepetition(Structure, int) 
696     */
697    public void insertNK1(NK1 structure, int rep) throws HL7Exception { 
698       super.insertRepetition("NK1", structure, rep);
699    }
700
701
702    /**
703     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
704     * @see AbstractGroup#insertRepetition(Structure, int) 
705     */
706    public NK1 insertNK1(int rep) throws HL7Exception { 
707       return (NK1)super.insertRepetition("NK1", rep);
708    }
709
710
711    /**
712     * Removes a specific repetition of NK1 (Next of Kin / Associated Parties)
713     * @see AbstractGroup#removeRepetition(String, int) 
714     */
715    public NK1 removeNK1(int rep) throws HL7Exception { 
716       return (NK1)super.removeRepetition("NK1", rep);
717    }
718
719
720
721    /**
722     * Returns
723     * the first repetition of 
724     * INSURANCE (a Group object) - creates it if necessary
725     */
726    public BAR_P01_INSURANCE getINSURANCE() { 
727       BAR_P01_INSURANCE retVal = getTyped("INSURANCE", BAR_P01_INSURANCE.class);
728       return retVal;
729    }
730
731
732    /**
733     * Returns a specific repetition of
734     * INSURANCE (a Group object) - creates it if necessary
735     *
736     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
737     * @throws HL7Exception if the repetition requested is more than one 
738     *     greater than the number of existing repetitions.
739     */
740    public BAR_P01_INSURANCE getINSURANCE(int rep) { 
741       BAR_P01_INSURANCE retVal = getTyped("INSURANCE", rep, BAR_P01_INSURANCE.class);
742       return retVal;
743    }
744
745    /** 
746     * Returns the number of existing repetitions of INSURANCE 
747     */ 
748    public int getINSURANCEReps() {  
749        return getReps("INSURANCE");
750    } 
751
752    /** 
753     * <p>
754     * Returns a non-modifiable List containing all current existing repetitions of INSURANCE.
755     * <p>
756     * <p>
757     * Note that unlike {@link #getINSURANCE()}, this method will not create any reps
758     * if none are already present, so an empty list may be returned.
759     * </p>
760     */ 
761    public List<BAR_P01_INSURANCE> getINSURANCEAll() throws HL7Exception {
762        return getAllAsList("INSURANCE", BAR_P01_INSURANCE.class);
763    } 
764
765    /**
766     * Inserts a specific repetition of INSURANCE (a Group object)
767     * @see AbstractGroup#insertRepetition(Structure, int) 
768     */
769    public void insertINSURANCE(BAR_P01_INSURANCE structure, int rep) throws HL7Exception { 
770       super.insertRepetition("INSURANCE", structure, rep);
771    }
772
773
774    /**
775     * Inserts a specific repetition of INSURANCE (a Group object)
776     * @see AbstractGroup#insertRepetition(Structure, int) 
777     */
778    public BAR_P01_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 
779       return (BAR_P01_INSURANCE)super.insertRepetition("INSURANCE", rep);
780    }
781
782
783    /**
784     * Removes a specific repetition of INSURANCE (a Group object)
785     * @see AbstractGroup#removeRepetition(String, int) 
786     */
787    public BAR_P01_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 
788       return (BAR_P01_INSURANCE)super.removeRepetition("INSURANCE", rep);
789    }
790
791
792
793    /**
794     * Returns
795     * ACC (Accident) - creates it if necessary
796     */
797    public ACC getACC() { 
798       ACC retVal = getTyped("ACC", ACC.class);
799       return retVal;
800    }
801
802
803
804
805    /**
806     * Returns
807     * UB1 (UB82) - creates it if necessary
808     */
809    public UB1 getUB1() { 
810       UB1 retVal = getTyped("UB1", UB1.class);
811       return retVal;
812    }
813
814
815
816
817    /**
818     * Returns
819     * UB2 (UB92 Data) - creates it if necessary
820     */
821    public UB2 getUB2() { 
822       UB2 retVal = getTyped("UB2", UB2.class);
823       return retVal;
824    }
825
826
827
828
829}
830