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