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 ADT_A05 message structure (see chapter 3.3.5). 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: ARV (Access Restriction) <b>optional repeating</b> </li>
056                                 * <li>8: ROL (Role) <b>optional repeating</b> </li>
057                                 * <li>9: NK1 (Next of Kin / Associated Parties) <b>optional repeating</b> </li>
058                                 * <li>10: PV1 (Patient Visit) <b> </b> </li>
059                                 * <li>11: PV2 (Patient Visit - Additional Information) <b>optional </b> </li>
060                                 * <li>12: ARV (Access Restriction) <b>optional repeating</b> </li>
061                                 * <li>13: ROL (Role) <b>optional repeating</b> </li>
062                                 * <li>14: DB1 (Disability) <b>optional repeating</b> </li>
063                                 * <li>15: OBX (Observation/Result) <b>optional repeating</b> </li>
064                                 * <li>16: AL1 (Patient Allergy Information) <b>optional repeating</b> </li>
065                                 * <li>17: DG1 (Diagnosis) <b>optional repeating</b> </li>
066                                 * <li>18: DRG (Diagnosis Related Group) <b>optional </b> </li>
067                                 * <li>19: ADT_A05_PROCEDURE (a Group object) <b>optional repeating</b> </li>
068                                 * <li>20: GT1 (Guarantor) <b>optional repeating</b> </li>
069                                 * <li>21: ADT_A05_INSURANCE (a Group object) <b>optional repeating</b> </li>
070                                 * <li>22: ACC (Accident) <b>optional </b> </li>
071                                 * <li>23: UB1 (UB82) <b>optional </b> </li>
072                                 * <li>24: UB2 (Uniform Billing Data) <b>optional </b> </li>
073 * </ul>
074 */
075//@SuppressWarnings("unused")
076public class ADT_A05 extends AbstractMessage  {
077
078    /**
079     * Creates a new ADT_A05 message with DefaultModelClassFactory. 
080     */ 
081    public ADT_A05() { 
082       this(new DefaultModelClassFactory());
083    }
084
085    /** 
086     * Creates a new ADT_A05 message with custom ModelClassFactory.
087     */
088    public ADT_A05(ModelClassFactory factory) {
089       super(factory);
090       init(factory);
091    }
092
093    private void init(ModelClassFactory factory) {
094       try {
095                          this.add(MSH.class, true, false);
096                                  this.add(SFT.class, false, true);
097                                  this.add(UAC.class, false, false);
098                                  this.add(EVN.class, true, false);
099                                  this.add(PID.class, true, false);
100                                  this.add(PD1.class, false, false);
101                                  this.add(ARV.class, false, true);
102                                  this.add(ROL.class, false, true);
103                                  this.add(NK1.class, false, true);
104                                  this.add(PV1.class, true, false);
105                                  this.add(PV2.class, false, false);
106                                  this.add(ARV.class, false, true);
107                                  this.add(ROL.class, false, true);
108                                  this.add(DB1.class, false, true);
109                                  this.add(OBX.class, false, true);
110                                  this.add(AL1.class, false, true);
111                                  this.add(DG1.class, false, true);
112                                  this.add(DRG.class, false, false);
113                                  this.add(ADT_A05_PROCEDURE.class, false, true);
114                                  this.add(GT1.class, false, true);
115                                  this.add(ADT_A05_INSURANCE.class, false, true);
116                                  this.add(ACC.class, false, false);
117                                  this.add(UB1.class, false, false);
118                                  this.add(UB2.class, false, false);
119               } catch(HL7Exception e) {
120          log.error("Unexpected error creating ADT_A05 - this is probably a bug in the source code generator.", e);
121       }
122    }
123
124
125    /** 
126     * Returns "2.7"
127     */
128    public String getVersion() {
129       return "2.7";
130    }
131
132
133
134
135    /**
136     * <p>
137     * Returns
138     * MSH (Message Header) - creates it if necessary
139     * </p>
140     * 
141     *
142     */
143    public MSH getMSH() { 
144       return getTyped("MSH", MSH.class);
145    }
146
147
148
149
150
151    /**
152     * <p>
153     * Returns
154     * the first repetition of 
155     * SFT (Software Segment) - creates it if necessary
156     * </p>
157     * 
158     *
159     */
160    public SFT getSFT() { 
161       return getTyped("SFT", SFT.class);
162    }
163
164
165    /**
166     * <p>
167     * Returns a specific repetition of
168     * SFT (Software Segment) - creates it if necessary
169     * </p>
170     * 
171     *
172     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
173     * @throws HL7Exception if the repetition requested is more than one 
174     *     greater than the number of existing repetitions.
175     */
176    public SFT getSFT(int rep) { 
177       return getTyped("SFT", rep, SFT.class);
178    }
179
180    /** 
181     * <p>
182     * Returns the number of existing repetitions of SFT 
183     * </p>
184     * 
185     */ 
186    public int getSFTReps() { 
187        return getReps("SFT");
188    } 
189
190    /** 
191     * <p>
192     * Returns a non-modifiable List containing all current existing repetitions of SFT.
193     * <p>
194     * <p>
195     * Note that unlike {@link #getSFT()}, this method will not create any reps
196     * if none are already present, so an empty list may be returned.
197     * </p>
198     * 
199     */ 
200    public java.util.List<SFT> getSFTAll() throws HL7Exception {
201        return getAllAsList("SFT", SFT.class);
202    } 
203
204    /**
205     * <p>
206     * Inserts a specific repetition of SFT (Software Segment)
207     * </p>
208     * 
209     *
210     * @see AbstractGroup#insertRepetition(Structure, int) 
211     */
212    public void insertSFT(SFT structure, int rep) throws HL7Exception { 
213       super.insertRepetition( "SFT", structure, rep);
214    }
215
216
217    /**
218     * <p>
219     * Inserts a specific repetition of SFT (Software Segment)
220     * </p>
221     * 
222     *
223     * @see AbstractGroup#insertRepetition(Structure, int) 
224     */
225    public SFT insertSFT(int rep) throws HL7Exception { 
226       return (SFT)super.insertRepetition("SFT", rep);
227    }
228
229
230    /**
231     * <p>
232     * Removes a specific repetition of SFT (Software Segment)
233     * </p>
234     * 
235     *
236     * @see AbstractGroup#removeRepetition(String, int) 
237     */
238    public SFT removeSFT(int rep) throws HL7Exception { 
239       return (SFT)super.removeRepetition("SFT", rep);
240    }
241
242
243
244
245    /**
246     * <p>
247     * Returns
248     * UAC (User Authentication Credential Segment) - creates it if necessary
249     * </p>
250     * 
251     *
252     */
253    public UAC getUAC() { 
254       return getTyped("UAC", UAC.class);
255    }
256
257
258
259
260
261    /**
262     * <p>
263     * Returns
264     * EVN (Event Type) - creates it if necessary
265     * </p>
266     * 
267     *
268     */
269    public EVN getEVN() { 
270       return getTyped("EVN", EVN.class);
271    }
272
273
274
275
276
277    /**
278     * <p>
279     * Returns
280     * PID (Patient Identification) - creates it if necessary
281     * </p>
282     * 
283     *
284     */
285    public PID getPID() { 
286       return getTyped("PID", PID.class);
287    }
288
289
290
291
292
293    /**
294     * <p>
295     * Returns
296     * PD1 (Patient Additional Demographic) - creates it if necessary
297     * </p>
298     * 
299     *
300     */
301    public PD1 getPD1() { 
302       return getTyped("PD1", PD1.class);
303    }
304
305
306
307
308
309    /**
310     * <p>
311     * Returns
312     * the first repetition of 
313     * ARV (Access Restriction) - creates it if necessary
314     * </p>
315     * 
316     *
317     */
318    public ARV getARV() { 
319       return getTyped("ARV", ARV.class);
320    }
321
322
323    /**
324     * <p>
325     * Returns a specific repetition of
326     * ARV (Access Restriction) - creates it if necessary
327     * </p>
328     * 
329     *
330     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
331     * @throws HL7Exception if the repetition requested is more than one 
332     *     greater than the number of existing repetitions.
333     */
334    public ARV getARV(int rep) { 
335       return getTyped("ARV", rep, ARV.class);
336    }
337
338    /** 
339     * <p>
340     * Returns the number of existing repetitions of ARV 
341     * </p>
342     * 
343     */ 
344    public int getARVReps() { 
345        return getReps("ARV");
346    } 
347
348    /** 
349     * <p>
350     * Returns a non-modifiable List containing all current existing repetitions of ARV.
351     * <p>
352     * <p>
353     * Note that unlike {@link #getARV()}, this method will not create any reps
354     * if none are already present, so an empty list may be returned.
355     * </p>
356     * 
357     */ 
358    public java.util.List<ARV> getARVAll() throws HL7Exception {
359        return getAllAsList("ARV", ARV.class);
360    } 
361
362    /**
363     * <p>
364     * Inserts a specific repetition of ARV (Access Restriction)
365     * </p>
366     * 
367     *
368     * @see AbstractGroup#insertRepetition(Structure, int) 
369     */
370    public void insertARV(ARV structure, int rep) throws HL7Exception { 
371       super.insertRepetition( "ARV", structure, rep);
372    }
373
374
375    /**
376     * <p>
377     * Inserts a specific repetition of ARV (Access Restriction)
378     * </p>
379     * 
380     *
381     * @see AbstractGroup#insertRepetition(Structure, int) 
382     */
383    public ARV insertARV(int rep) throws HL7Exception { 
384       return (ARV)super.insertRepetition("ARV", rep);
385    }
386
387
388    /**
389     * <p>
390     * Removes a specific repetition of ARV (Access Restriction)
391     * </p>
392     * 
393     *
394     * @see AbstractGroup#removeRepetition(String, int) 
395     */
396    public ARV removeARV(int rep) throws HL7Exception { 
397       return (ARV)super.removeRepetition("ARV", rep);
398    }
399
400
401
402
403    /**
404     * <p>
405     * Returns
406     * the first repetition of 
407     * ROL (Role) - creates it if necessary
408     * </p>
409     * 
410     *
411     */
412    public ROL getROL() { 
413       return getTyped("ROL", ROL.class);
414    }
415
416
417    /**
418     * <p>
419     * Returns a specific repetition of
420     * ROL (Role) - creates it if necessary
421     * </p>
422     * 
423     *
424     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
425     * @throws HL7Exception if the repetition requested is more than one 
426     *     greater than the number of existing repetitions.
427     */
428    public ROL getROL(int rep) { 
429       return getTyped("ROL", rep, ROL.class);
430    }
431
432    /** 
433     * <p>
434     * Returns the number of existing repetitions of ROL 
435     * </p>
436     * 
437     */ 
438    public int getROLReps() { 
439        return getReps("ROL");
440    } 
441
442    /** 
443     * <p>
444     * Returns a non-modifiable List containing all current existing repetitions of ROL.
445     * <p>
446     * <p>
447     * Note that unlike {@link #getROL()}, this method will not create any reps
448     * if none are already present, so an empty list may be returned.
449     * </p>
450     * 
451     */ 
452    public java.util.List<ROL> getROLAll() throws HL7Exception {
453        return getAllAsList("ROL", ROL.class);
454    } 
455
456    /**
457     * <p>
458     * Inserts a specific repetition of ROL (Role)
459     * </p>
460     * 
461     *
462     * @see AbstractGroup#insertRepetition(Structure, int) 
463     */
464    public void insertROL(ROL structure, int rep) throws HL7Exception { 
465       super.insertRepetition( "ROL", structure, rep);
466    }
467
468
469    /**
470     * <p>
471     * Inserts a specific repetition of ROL (Role)
472     * </p>
473     * 
474     *
475     * @see AbstractGroup#insertRepetition(Structure, int) 
476     */
477    public ROL insertROL(int rep) throws HL7Exception { 
478       return (ROL)super.insertRepetition("ROL", rep);
479    }
480
481
482    /**
483     * <p>
484     * Removes a specific repetition of ROL (Role)
485     * </p>
486     * 
487     *
488     * @see AbstractGroup#removeRepetition(String, int) 
489     */
490    public ROL removeROL(int rep) throws HL7Exception { 
491       return (ROL)super.removeRepetition("ROL", rep);
492    }
493
494
495
496
497    /**
498     * <p>
499     * Returns
500     * the first repetition of 
501     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
502     * </p>
503     * 
504     *
505     */
506    public NK1 getNK1() { 
507       return getTyped("NK1", NK1.class);
508    }
509
510
511    /**
512     * <p>
513     * Returns a specific repetition of
514     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
515     * </p>
516     * 
517     *
518     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
519     * @throws HL7Exception if the repetition requested is more than one 
520     *     greater than the number of existing repetitions.
521     */
522    public NK1 getNK1(int rep) { 
523       return getTyped("NK1", rep, NK1.class);
524    }
525
526    /** 
527     * <p>
528     * Returns the number of existing repetitions of NK1 
529     * </p>
530     * 
531     */ 
532    public int getNK1Reps() { 
533        return getReps("NK1");
534    } 
535
536    /** 
537     * <p>
538     * Returns a non-modifiable List containing all current existing repetitions of NK1.
539     * <p>
540     * <p>
541     * Note that unlike {@link #getNK1()}, this method will not create any reps
542     * if none are already present, so an empty list may be returned.
543     * </p>
544     * 
545     */ 
546    public java.util.List<NK1> getNK1All() throws HL7Exception {
547        return getAllAsList("NK1", NK1.class);
548    } 
549
550    /**
551     * <p>
552     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
553     * </p>
554     * 
555     *
556     * @see AbstractGroup#insertRepetition(Structure, int) 
557     */
558    public void insertNK1(NK1 structure, int rep) throws HL7Exception { 
559       super.insertRepetition( "NK1", structure, rep);
560    }
561
562
563    /**
564     * <p>
565     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
566     * </p>
567     * 
568     *
569     * @see AbstractGroup#insertRepetition(Structure, int) 
570     */
571    public NK1 insertNK1(int rep) throws HL7Exception { 
572       return (NK1)super.insertRepetition("NK1", rep);
573    }
574
575
576    /**
577     * <p>
578     * Removes a specific repetition of NK1 (Next of Kin / Associated Parties)
579     * </p>
580     * 
581     *
582     * @see AbstractGroup#removeRepetition(String, int) 
583     */
584    public NK1 removeNK1(int rep) throws HL7Exception { 
585       return (NK1)super.removeRepetition("NK1", rep);
586    }
587
588
589
590
591    /**
592     * <p>
593     * Returns
594     * PV1 (Patient Visit) - creates it if necessary
595     * </p>
596     * 
597     *
598     */
599    public PV1 getPV1() { 
600       return getTyped("PV1", PV1.class);
601    }
602
603
604
605
606
607    /**
608     * <p>
609     * Returns
610     * PV2 (Patient Visit - Additional Information) - creates it if necessary
611     * </p>
612     * 
613     *
614     */
615    public PV2 getPV2() { 
616       return getTyped("PV2", PV2.class);
617    }
618
619
620
621
622
623    /**
624     * <p>
625     * Returns
626     * the first repetition of 
627     * ARV2 (Access Restriction) - creates it if necessary
628     * </p>
629     * 
630     *
631     */
632    public ARV getARV2() { 
633       return getTyped("ARV2", ARV.class);
634    }
635
636
637    /**
638     * <p>
639     * Returns a specific repetition of
640     * ARV2 (Access Restriction) - creates it if necessary
641     * </p>
642     * 
643     *
644     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
645     * @throws HL7Exception if the repetition requested is more than one 
646     *     greater than the number of existing repetitions.
647     */
648    public ARV getARV2(int rep) { 
649       return getTyped("ARV2", rep, ARV.class);
650    }
651
652    /** 
653     * <p>
654     * Returns the number of existing repetitions of ARV2 
655     * </p>
656     * 
657     */ 
658    public int getARV2Reps() { 
659        return getReps("ARV2");
660    } 
661
662    /** 
663     * <p>
664     * Returns a non-modifiable List containing all current existing repetitions of ARV2.
665     * <p>
666     * <p>
667     * Note that unlike {@link #getARV2()}, this method will not create any reps
668     * if none are already present, so an empty list may be returned.
669     * </p>
670     * 
671     */ 
672    public java.util.List<ARV> getARV2All() throws HL7Exception {
673        return getAllAsList("ARV2", ARV.class);
674    } 
675
676    /**
677     * <p>
678     * Inserts a specific repetition of ARV2 (Access Restriction)
679     * </p>
680     * 
681     *
682     * @see AbstractGroup#insertRepetition(Structure, int) 
683     */
684    public void insertARV2(ARV structure, int rep) throws HL7Exception { 
685       super.insertRepetition( "ARV2", structure, rep);
686    }
687
688
689    /**
690     * <p>
691     * Inserts a specific repetition of ARV2 (Access Restriction)
692     * </p>
693     * 
694     *
695     * @see AbstractGroup#insertRepetition(Structure, int) 
696     */
697    public ARV insertARV2(int rep) throws HL7Exception { 
698       return (ARV)super.insertRepetition("ARV2", rep);
699    }
700
701
702    /**
703     * <p>
704     * Removes a specific repetition of ARV2 (Access Restriction)
705     * </p>
706     * 
707     *
708     * @see AbstractGroup#removeRepetition(String, int) 
709     */
710    public ARV removeARV2(int rep) throws HL7Exception { 
711       return (ARV)super.removeRepetition("ARV2", rep);
712    }
713
714
715
716
717    /**
718     * <p>
719     * Returns
720     * the first repetition of 
721     * ROL2 (Role) - creates it if necessary
722     * </p>
723     * 
724     *
725     */
726    public ROL getROL2() { 
727       return getTyped("ROL2", ROL.class);
728    }
729
730
731    /**
732     * <p>
733     * Returns a specific repetition of
734     * ROL2 (Role) - creates it if necessary
735     * </p>
736     * 
737     *
738     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
739     * @throws HL7Exception if the repetition requested is more than one 
740     *     greater than the number of existing repetitions.
741     */
742    public ROL getROL2(int rep) { 
743       return getTyped("ROL2", rep, ROL.class);
744    }
745
746    /** 
747     * <p>
748     * Returns the number of existing repetitions of ROL2 
749     * </p>
750     * 
751     */ 
752    public int getROL2Reps() { 
753        return getReps("ROL2");
754    } 
755
756    /** 
757     * <p>
758     * Returns a non-modifiable List containing all current existing repetitions of ROL2.
759     * <p>
760     * <p>
761     * Note that unlike {@link #getROL2()}, this method will not create any reps
762     * if none are already present, so an empty list may be returned.
763     * </p>
764     * 
765     */ 
766    public java.util.List<ROL> getROL2All() throws HL7Exception {
767        return getAllAsList("ROL2", ROL.class);
768    } 
769
770    /**
771     * <p>
772     * Inserts a specific repetition of ROL2 (Role)
773     * </p>
774     * 
775     *
776     * @see AbstractGroup#insertRepetition(Structure, int) 
777     */
778    public void insertROL2(ROL structure, int rep) throws HL7Exception { 
779       super.insertRepetition( "ROL2", structure, rep);
780    }
781
782
783    /**
784     * <p>
785     * Inserts a specific repetition of ROL2 (Role)
786     * </p>
787     * 
788     *
789     * @see AbstractGroup#insertRepetition(Structure, int) 
790     */
791    public ROL insertROL2(int rep) throws HL7Exception { 
792       return (ROL)super.insertRepetition("ROL2", rep);
793    }
794
795
796    /**
797     * <p>
798     * Removes a specific repetition of ROL2 (Role)
799     * </p>
800     * 
801     *
802     * @see AbstractGroup#removeRepetition(String, int) 
803     */
804    public ROL removeROL2(int rep) throws HL7Exception { 
805       return (ROL)super.removeRepetition("ROL2", rep);
806    }
807
808
809
810
811    /**
812     * <p>
813     * Returns
814     * the first repetition of 
815     * DB1 (Disability) - creates it if necessary
816     * </p>
817     * 
818     *
819     */
820    public DB1 getDB1() { 
821       return getTyped("DB1", DB1.class);
822    }
823
824
825    /**
826     * <p>
827     * Returns a specific repetition of
828     * DB1 (Disability) - creates it if necessary
829     * </p>
830     * 
831     *
832     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
833     * @throws HL7Exception if the repetition requested is more than one 
834     *     greater than the number of existing repetitions.
835     */
836    public DB1 getDB1(int rep) { 
837       return getTyped("DB1", rep, DB1.class);
838    }
839
840    /** 
841     * <p>
842     * Returns the number of existing repetitions of DB1 
843     * </p>
844     * 
845     */ 
846    public int getDB1Reps() { 
847        return getReps("DB1");
848    } 
849
850    /** 
851     * <p>
852     * Returns a non-modifiable List containing all current existing repetitions of DB1.
853     * <p>
854     * <p>
855     * Note that unlike {@link #getDB1()}, this method will not create any reps
856     * if none are already present, so an empty list may be returned.
857     * </p>
858     * 
859     */ 
860    public java.util.List<DB1> getDB1All() throws HL7Exception {
861        return getAllAsList("DB1", DB1.class);
862    } 
863
864    /**
865     * <p>
866     * Inserts a specific repetition of DB1 (Disability)
867     * </p>
868     * 
869     *
870     * @see AbstractGroup#insertRepetition(Structure, int) 
871     */
872    public void insertDB1(DB1 structure, int rep) throws HL7Exception { 
873       super.insertRepetition( "DB1", structure, rep);
874    }
875
876
877    /**
878     * <p>
879     * Inserts a specific repetition of DB1 (Disability)
880     * </p>
881     * 
882     *
883     * @see AbstractGroup#insertRepetition(Structure, int) 
884     */
885    public DB1 insertDB1(int rep) throws HL7Exception { 
886       return (DB1)super.insertRepetition("DB1", rep);
887    }
888
889
890    /**
891     * <p>
892     * Removes a specific repetition of DB1 (Disability)
893     * </p>
894     * 
895     *
896     * @see AbstractGroup#removeRepetition(String, int) 
897     */
898    public DB1 removeDB1(int rep) throws HL7Exception { 
899       return (DB1)super.removeRepetition("DB1", rep);
900    }
901
902
903
904
905    /**
906     * <p>
907     * Returns
908     * the first repetition of 
909     * OBX (Observation/Result) - creates it if necessary
910     * </p>
911     * 
912     *
913     */
914    public OBX getOBX() { 
915       return getTyped("OBX", OBX.class);
916    }
917
918
919    /**
920     * <p>
921     * Returns a specific repetition of
922     * OBX (Observation/Result) - creates it if necessary
923     * </p>
924     * 
925     *
926     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
927     * @throws HL7Exception if the repetition requested is more than one 
928     *     greater than the number of existing repetitions.
929     */
930    public OBX getOBX(int rep) { 
931       return getTyped("OBX", rep, OBX.class);
932    }
933
934    /** 
935     * <p>
936     * Returns the number of existing repetitions of OBX 
937     * </p>
938     * 
939     */ 
940    public int getOBXReps() { 
941        return getReps("OBX");
942    } 
943
944    /** 
945     * <p>
946     * Returns a non-modifiable List containing all current existing repetitions of OBX.
947     * <p>
948     * <p>
949     * Note that unlike {@link #getOBX()}, this method will not create any reps
950     * if none are already present, so an empty list may be returned.
951     * </p>
952     * 
953     */ 
954    public java.util.List<OBX> getOBXAll() throws HL7Exception {
955        return getAllAsList("OBX", OBX.class);
956    } 
957
958    /**
959     * <p>
960     * Inserts a specific repetition of OBX (Observation/Result)
961     * </p>
962     * 
963     *
964     * @see AbstractGroup#insertRepetition(Structure, int) 
965     */
966    public void insertOBX(OBX structure, int rep) throws HL7Exception { 
967       super.insertRepetition( "OBX", structure, rep);
968    }
969
970
971    /**
972     * <p>
973     * Inserts a specific repetition of OBX (Observation/Result)
974     * </p>
975     * 
976     *
977     * @see AbstractGroup#insertRepetition(Structure, int) 
978     */
979    public OBX insertOBX(int rep) throws HL7Exception { 
980       return (OBX)super.insertRepetition("OBX", rep);
981    }
982
983
984    /**
985     * <p>
986     * Removes a specific repetition of OBX (Observation/Result)
987     * </p>
988     * 
989     *
990     * @see AbstractGroup#removeRepetition(String, int) 
991     */
992    public OBX removeOBX(int rep) throws HL7Exception { 
993       return (OBX)super.removeRepetition("OBX", rep);
994    }
995
996
997
998
999    /**
1000     * <p>
1001     * Returns
1002     * the first repetition of 
1003     * AL1 (Patient Allergy Information) - creates it if necessary
1004     * </p>
1005     * 
1006     *
1007     */
1008    public AL1 getAL1() { 
1009       return getTyped("AL1", AL1.class);
1010    }
1011
1012
1013    /**
1014     * <p>
1015     * Returns a specific repetition of
1016     * AL1 (Patient Allergy Information) - creates it if necessary
1017     * </p>
1018     * 
1019     *
1020     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
1021     * @throws HL7Exception if the repetition requested is more than one 
1022     *     greater than the number of existing repetitions.
1023     */
1024    public AL1 getAL1(int rep) { 
1025       return getTyped("AL1", rep, AL1.class);
1026    }
1027
1028    /** 
1029     * <p>
1030     * Returns the number of existing repetitions of AL1 
1031     * </p>
1032     * 
1033     */ 
1034    public int getAL1Reps() { 
1035        return getReps("AL1");
1036    } 
1037
1038    /** 
1039     * <p>
1040     * Returns a non-modifiable List containing all current existing repetitions of AL1.
1041     * <p>
1042     * <p>
1043     * Note that unlike {@link #getAL1()}, this method will not create any reps
1044     * if none are already present, so an empty list may be returned.
1045     * </p>
1046     * 
1047     */ 
1048    public java.util.List<AL1> getAL1All() throws HL7Exception {
1049        return getAllAsList("AL1", AL1.class);
1050    } 
1051
1052    /**
1053     * <p>
1054     * Inserts a specific repetition of AL1 (Patient Allergy Information)
1055     * </p>
1056     * 
1057     *
1058     * @see AbstractGroup#insertRepetition(Structure, int) 
1059     */
1060    public void insertAL1(AL1 structure, int rep) throws HL7Exception { 
1061       super.insertRepetition( "AL1", structure, rep);
1062    }
1063
1064
1065    /**
1066     * <p>
1067     * Inserts a specific repetition of AL1 (Patient Allergy Information)
1068     * </p>
1069     * 
1070     *
1071     * @see AbstractGroup#insertRepetition(Structure, int) 
1072     */
1073    public AL1 insertAL1(int rep) throws HL7Exception { 
1074       return (AL1)super.insertRepetition("AL1", rep);
1075    }
1076
1077
1078    /**
1079     * <p>
1080     * Removes a specific repetition of AL1 (Patient Allergy Information)
1081     * </p>
1082     * 
1083     *
1084     * @see AbstractGroup#removeRepetition(String, int) 
1085     */
1086    public AL1 removeAL1(int rep) throws HL7Exception { 
1087       return (AL1)super.removeRepetition("AL1", rep);
1088    }
1089
1090
1091
1092
1093    /**
1094     * <p>
1095     * Returns
1096     * the first repetition of 
1097     * DG1 (Diagnosis) - creates it if necessary
1098     * </p>
1099     * 
1100     *
1101     */
1102    public DG1 getDG1() { 
1103       return getTyped("DG1", DG1.class);
1104    }
1105
1106
1107    /**
1108     * <p>
1109     * Returns a specific repetition of
1110     * DG1 (Diagnosis) - creates it if necessary
1111     * </p>
1112     * 
1113     *
1114     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
1115     * @throws HL7Exception if the repetition requested is more than one 
1116     *     greater than the number of existing repetitions.
1117     */
1118    public DG1 getDG1(int rep) { 
1119       return getTyped("DG1", rep, DG1.class);
1120    }
1121
1122    /** 
1123     * <p>
1124     * Returns the number of existing repetitions of DG1 
1125     * </p>
1126     * 
1127     */ 
1128    public int getDG1Reps() { 
1129        return getReps("DG1");
1130    } 
1131
1132    /** 
1133     * <p>
1134     * Returns a non-modifiable List containing all current existing repetitions of DG1.
1135     * <p>
1136     * <p>
1137     * Note that unlike {@link #getDG1()}, this method will not create any reps
1138     * if none are already present, so an empty list may be returned.
1139     * </p>
1140     * 
1141     */ 
1142    public java.util.List<DG1> getDG1All() throws HL7Exception {
1143        return getAllAsList("DG1", DG1.class);
1144    } 
1145
1146    /**
1147     * <p>
1148     * Inserts a specific repetition of DG1 (Diagnosis)
1149     * </p>
1150     * 
1151     *
1152     * @see AbstractGroup#insertRepetition(Structure, int) 
1153     */
1154    public void insertDG1(DG1 structure, int rep) throws HL7Exception { 
1155       super.insertRepetition( "DG1", structure, rep);
1156    }
1157
1158
1159    /**
1160     * <p>
1161     * Inserts a specific repetition of DG1 (Diagnosis)
1162     * </p>
1163     * 
1164     *
1165     * @see AbstractGroup#insertRepetition(Structure, int) 
1166     */
1167    public DG1 insertDG1(int rep) throws HL7Exception { 
1168       return (DG1)super.insertRepetition("DG1", rep);
1169    }
1170
1171
1172    /**
1173     * <p>
1174     * Removes a specific repetition of DG1 (Diagnosis)
1175     * </p>
1176     * 
1177     *
1178     * @see AbstractGroup#removeRepetition(String, int) 
1179     */
1180    public DG1 removeDG1(int rep) throws HL7Exception { 
1181       return (DG1)super.removeRepetition("DG1", rep);
1182    }
1183
1184
1185
1186
1187    /**
1188     * <p>
1189     * Returns
1190     * DRG (Diagnosis Related Group) - creates it if necessary
1191     * </p>
1192     * 
1193     *
1194     */
1195    public DRG getDRG() { 
1196       return getTyped("DRG", DRG.class);
1197    }
1198
1199
1200
1201
1202
1203    /**
1204     * <p>
1205     * Returns
1206     * the first repetition of 
1207     * PROCEDURE (a Group object) - creates it if necessary
1208     * </p>
1209     * 
1210     *
1211     */
1212    public ADT_A05_PROCEDURE getPROCEDURE() { 
1213       return getTyped("PROCEDURE", ADT_A05_PROCEDURE.class);
1214    }
1215
1216
1217    /**
1218     * <p>
1219     * Returns a specific repetition of
1220     * PROCEDURE (a Group object) - creates it if necessary
1221     * </p>
1222     * 
1223     *
1224     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
1225     * @throws HL7Exception if the repetition requested is more than one 
1226     *     greater than the number of existing repetitions.
1227     */
1228    public ADT_A05_PROCEDURE getPROCEDURE(int rep) { 
1229       return getTyped("PROCEDURE", rep, ADT_A05_PROCEDURE.class);
1230    }
1231
1232    /** 
1233     * <p>
1234     * Returns the number of existing repetitions of PROCEDURE 
1235     * </p>
1236     * 
1237     */ 
1238    public int getPROCEDUREReps() { 
1239        return getReps("PROCEDURE");
1240    } 
1241
1242    /** 
1243     * <p>
1244     * Returns a non-modifiable List containing all current existing repetitions of PROCEDURE.
1245     * <p>
1246     * <p>
1247     * Note that unlike {@link #getPROCEDURE()}, this method will not create any reps
1248     * if none are already present, so an empty list may be returned.
1249     * </p>
1250     * 
1251     */ 
1252    public java.util.List<ADT_A05_PROCEDURE> getPROCEDUREAll() throws HL7Exception {
1253        return getAllAsList("PROCEDURE", ADT_A05_PROCEDURE.class);
1254    } 
1255
1256    /**
1257     * <p>
1258     * Inserts a specific repetition of PROCEDURE (a Group object)
1259     * </p>
1260     * 
1261     *
1262     * @see AbstractGroup#insertRepetition(Structure, int) 
1263     */
1264    public void insertPROCEDURE(ADT_A05_PROCEDURE structure, int rep) throws HL7Exception { 
1265       super.insertRepetition( "PROCEDURE", structure, rep);
1266    }
1267
1268
1269    /**
1270     * <p>
1271     * Inserts a specific repetition of PROCEDURE (a Group object)
1272     * </p>
1273     * 
1274     *
1275     * @see AbstractGroup#insertRepetition(Structure, int) 
1276     */
1277    public ADT_A05_PROCEDURE insertPROCEDURE(int rep) throws HL7Exception { 
1278       return (ADT_A05_PROCEDURE)super.insertRepetition("PROCEDURE", rep);
1279    }
1280
1281
1282    /**
1283     * <p>
1284     * Removes a specific repetition of PROCEDURE (a Group object)
1285     * </p>
1286     * 
1287     *
1288     * @see AbstractGroup#removeRepetition(String, int) 
1289     */
1290    public ADT_A05_PROCEDURE removePROCEDURE(int rep) throws HL7Exception { 
1291       return (ADT_A05_PROCEDURE)super.removeRepetition("PROCEDURE", rep);
1292    }
1293
1294
1295
1296
1297    /**
1298     * <p>
1299     * Returns
1300     * the first repetition of 
1301     * GT1 (Guarantor) - creates it if necessary
1302     * </p>
1303     * 
1304     *
1305     */
1306    public GT1 getGT1() { 
1307       return getTyped("GT1", GT1.class);
1308    }
1309
1310
1311    /**
1312     * <p>
1313     * Returns a specific repetition of
1314     * GT1 (Guarantor) - creates it if necessary
1315     * </p>
1316     * 
1317     *
1318     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
1319     * @throws HL7Exception if the repetition requested is more than one 
1320     *     greater than the number of existing repetitions.
1321     */
1322    public GT1 getGT1(int rep) { 
1323       return getTyped("GT1", rep, GT1.class);
1324    }
1325
1326    /** 
1327     * <p>
1328     * Returns the number of existing repetitions of GT1 
1329     * </p>
1330     * 
1331     */ 
1332    public int getGT1Reps() { 
1333        return getReps("GT1");
1334    } 
1335
1336    /** 
1337     * <p>
1338     * Returns a non-modifiable List containing all current existing repetitions of GT1.
1339     * <p>
1340     * <p>
1341     * Note that unlike {@link #getGT1()}, this method will not create any reps
1342     * if none are already present, so an empty list may be returned.
1343     * </p>
1344     * 
1345     */ 
1346    public java.util.List<GT1> getGT1All() throws HL7Exception {
1347        return getAllAsList("GT1", GT1.class);
1348    } 
1349
1350    /**
1351     * <p>
1352     * Inserts a specific repetition of GT1 (Guarantor)
1353     * </p>
1354     * 
1355     *
1356     * @see AbstractGroup#insertRepetition(Structure, int) 
1357     */
1358    public void insertGT1(GT1 structure, int rep) throws HL7Exception { 
1359       super.insertRepetition( "GT1", structure, rep);
1360    }
1361
1362
1363    /**
1364     * <p>
1365     * Inserts a specific repetition of GT1 (Guarantor)
1366     * </p>
1367     * 
1368     *
1369     * @see AbstractGroup#insertRepetition(Structure, int) 
1370     */
1371    public GT1 insertGT1(int rep) throws HL7Exception { 
1372       return (GT1)super.insertRepetition("GT1", rep);
1373    }
1374
1375
1376    /**
1377     * <p>
1378     * Removes a specific repetition of GT1 (Guarantor)
1379     * </p>
1380     * 
1381     *
1382     * @see AbstractGroup#removeRepetition(String, int) 
1383     */
1384    public GT1 removeGT1(int rep) throws HL7Exception { 
1385       return (GT1)super.removeRepetition("GT1", rep);
1386    }
1387
1388
1389
1390
1391    /**
1392     * <p>
1393     * Returns
1394     * the first repetition of 
1395     * INSURANCE (a Group object) - creates it if necessary
1396     * </p>
1397     * 
1398     *
1399     */
1400    public ADT_A05_INSURANCE getINSURANCE() { 
1401       return getTyped("INSURANCE", ADT_A05_INSURANCE.class);
1402    }
1403
1404
1405    /**
1406     * <p>
1407     * Returns a specific repetition of
1408     * INSURANCE (a Group object) - creates it if necessary
1409     * </p>
1410     * 
1411     *
1412     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
1413     * @throws HL7Exception if the repetition requested is more than one 
1414     *     greater than the number of existing repetitions.
1415     */
1416    public ADT_A05_INSURANCE getINSURANCE(int rep) { 
1417       return getTyped("INSURANCE", rep, ADT_A05_INSURANCE.class);
1418    }
1419
1420    /** 
1421     * <p>
1422     * Returns the number of existing repetitions of INSURANCE 
1423     * </p>
1424     * 
1425     */ 
1426    public int getINSURANCEReps() { 
1427        return getReps("INSURANCE");
1428    } 
1429
1430    /** 
1431     * <p>
1432     * Returns a non-modifiable List containing all current existing repetitions of INSURANCE.
1433     * <p>
1434     * <p>
1435     * Note that unlike {@link #getINSURANCE()}, this method will not create any reps
1436     * if none are already present, so an empty list may be returned.
1437     * </p>
1438     * 
1439     */ 
1440    public java.util.List<ADT_A05_INSURANCE> getINSURANCEAll() throws HL7Exception {
1441        return getAllAsList("INSURANCE", ADT_A05_INSURANCE.class);
1442    } 
1443
1444    /**
1445     * <p>
1446     * Inserts a specific repetition of INSURANCE (a Group object)
1447     * </p>
1448     * 
1449     *
1450     * @see AbstractGroup#insertRepetition(Structure, int) 
1451     */
1452    public void insertINSURANCE(ADT_A05_INSURANCE structure, int rep) throws HL7Exception { 
1453       super.insertRepetition( "INSURANCE", structure, rep);
1454    }
1455
1456
1457    /**
1458     * <p>
1459     * Inserts a specific repetition of INSURANCE (a Group object)
1460     * </p>
1461     * 
1462     *
1463     * @see AbstractGroup#insertRepetition(Structure, int) 
1464     */
1465    public ADT_A05_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 
1466       return (ADT_A05_INSURANCE)super.insertRepetition("INSURANCE", rep);
1467    }
1468
1469
1470    /**
1471     * <p>
1472     * Removes a specific repetition of INSURANCE (a Group object)
1473     * </p>
1474     * 
1475     *
1476     * @see AbstractGroup#removeRepetition(String, int) 
1477     */
1478    public ADT_A05_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 
1479       return (ADT_A05_INSURANCE)super.removeRepetition("INSURANCE", rep);
1480    }
1481
1482
1483
1484
1485    /**
1486     * <p>
1487     * Returns
1488     * ACC (Accident) - creates it if necessary
1489     * </p>
1490     * 
1491     *
1492     */
1493    public ACC getACC() { 
1494       return getTyped("ACC", ACC.class);
1495    }
1496
1497
1498
1499
1500
1501    /**
1502     * <p>
1503     * Returns
1504     * UB1 (UB82) - creates it if necessary
1505     * </p>
1506     * 
1507     *
1508     */
1509    public UB1 getUB1() { 
1510       return getTyped("UB1", UB1.class);
1511    }
1512
1513
1514
1515
1516
1517    /**
1518     * <p>
1519     * Returns
1520     * UB2 (Uniform Billing Data) - creates it if necessary
1521     * </p>
1522     * 
1523     *
1524     */
1525    public UB2 getUB2() { 
1526       return getTyped("UB2", UB2.class);
1527    }
1528
1529
1530
1531
1532}
1533