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