001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v25.message;
035
036import ca.uhn.hl7v2.model.v25.group.*;
037import ca.uhn.hl7v2.model.v25.segment.*;
038
039import java.util.List;
040
041import ca.uhn.hl7v2.HL7Exception;
042import ca.uhn.hl7v2.parser.ModelClassFactory;
043import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
044import ca.uhn.hl7v2.model.AbstractMessage;
045
046/**
047 * <p>Represents a ADT_A03 message structure (see chapter 3.3.3). This structure contains the 
048 * following elements: </p>
049 * <ul>
050                 * <li>1: MSH (Message Header) <b> </b></li>
051                 * <li>2: SFT (Software Segment) <b>optional repeating</b></li>
052                 * <li>3: EVN (Event Type) <b> </b></li>
053                 * <li>4: PID (Patient Identification) <b> </b></li>
054                 * <li>5: PD1 (Patient Additional Demographic) <b>optional </b></li>
055                 * <li>6: ROL (Role) <b>optional repeating</b></li>
056                 * <li>7: NK1 (Next of Kin / Associated Parties) <b>optional repeating</b></li>
057                 * <li>8: PV1 (Patient Visit) <b> </b></li>
058                 * <li>9: PV2 (Patient Visit - Additional Information) <b>optional </b></li>
059                 * <li>10: ROL (Role) <b>optional repeating</b></li>
060                 * <li>11: DB1 (Disability) <b>optional repeating</b></li>
061                 * <li>12: AL1 (Patient Allergy Information) <b>optional repeating</b></li>
062                 * <li>13: DG1 (Diagnosis) <b>optional repeating</b></li>
063                 * <li>14: DRG (Diagnosis Related Group) <b>optional </b></li>
064                 * <li>15: ADT_A03_PROCEDURE (a Group object) <b>optional repeating</b></li>
065                 * <li>16: OBX (Observation/Result) <b>optional repeating</b></li>
066                 * <li>17: GT1 (Guarantor) <b>optional repeating</b></li>
067                 * <li>18: ADT_A03_INSURANCE (a Group object) <b>optional repeating</b></li>
068                 * <li>19: ACC (Accident) <b>optional </b></li>
069                 * <li>20: PDA (Patient Death and Autopsy) <b>optional </b></li>
070 * </ul>
071 */
072@SuppressWarnings("unused")
073public class ADT_A03 extends AbstractMessage  {
074
075    /**
076     * Creates a new ADT_A03 message with DefaultModelClassFactory. 
077     */ 
078    public ADT_A03() { 
079       this(new DefaultModelClassFactory());
080    }
081
082    /** 
083     * Creates a new ADT_A03 message with custom ModelClassFactory.
084     */
085    public ADT_A03(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(SFT.class, false, true);
094                          this.add(EVN.class, true, false);
095                          this.add(PID.class, true, false);
096                          this.add(PD1.class, false, false);
097                          this.add(ROL.class, false, true);
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(AL1.class, false, true);
104                          this.add(DG1.class, false, true);
105                          this.add(DRG.class, false, false);
106                          this.add(ADT_A03_PROCEDURE.class, false, true);
107                          this.add(OBX.class, false, true);
108                          this.add(GT1.class, false, true);
109                          this.add(ADT_A03_INSURANCE.class, false, true);
110                          this.add(ACC.class, false, false);
111                          this.add(PDA.class, false, false);
112       } catch(HL7Exception e) {
113          log.error("Unexpected error creating ADT_A03 - this is probably a bug in the source code generator.", e);
114       }
115    }
116
117    /** 
118     * Returns "2.5"
119     */
120    public String getVersion() {
121       return "2.5";
122    }
123
124
125
126    /**
127     * Returns
128     * MSH (Message Header) - creates it if necessary
129     */
130    public MSH getMSH() { 
131       return getTyped("MSH", MSH.class);
132    }
133
134
135
136
137    /**
138     * Returns
139     * the first repetition of 
140     * SFT (Software Segment) - creates it if necessary
141     */
142    public SFT getSFT() { 
143       return getTyped("SFT", SFT.class);
144    }
145
146
147    /**
148     * Returns a specific repetition of
149     * SFT (Software Segment) - creates it if necessary
150     *
151     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
152     * @throws HL7Exception if the repetition requested is more than one 
153     *     greater than the number of existing repetitions.
154     */
155    public SFT getSFT(int rep) { 
156       return getTyped("SFT", rep, SFT.class);
157    }
158
159    /** 
160     * Returns the number of existing repetitions of SFT 
161     */ 
162    public int getSFTReps() { 
163        return getReps("SFT");
164    } 
165
166    /** 
167     * <p>
168     * Returns a non-modifiable List containing all current existing repetitions of SFT.
169     * <p>
170     * <p>
171     * Note that unlike {@link #getSFT()}, this method will not create any reps
172     * if none are already present, so an empty list may be returned.
173     * </p>
174     */ 
175    public List<SFT> getSFTAll() throws HL7Exception {
176        return getAllAsList("SFT", SFT.class);
177    } 
178
179    /**
180     * Inserts a specific repetition of SFT (Software Segment)
181     * @see AbstractGroup#insertRepetition(Structure, int) 
182     */
183    public void insertSFT(SFT structure, int rep) throws HL7Exception { 
184       super.insertRepetition( "SFT", structure, rep);
185    }
186
187
188    /**
189     * Inserts a specific repetition of SFT (Software Segment)
190     * @see AbstractGroup#insertRepetition(Structure, int) 
191     */
192    public SFT insertSFT(int rep) throws HL7Exception { 
193       return (SFT)super.insertRepetition("SFT", rep);
194    }
195
196
197    /**
198     * Removes a specific repetition of SFT (Software Segment)
199     * @see AbstractGroup#removeRepetition(String, int) 
200     */
201    public SFT removeSFT(int rep) throws HL7Exception { 
202       return (SFT)super.removeRepetition("SFT", rep);
203    }
204
205
206
207    /**
208     * Returns
209     * EVN (Event Type) - creates it if necessary
210     */
211    public EVN getEVN() { 
212       return getTyped("EVN", EVN.class);
213    }
214
215
216
217
218    /**
219     * Returns
220     * PID (Patient Identification) - creates it if necessary
221     */
222    public PID getPID() { 
223       return getTyped("PID", PID.class);
224    }
225
226
227
228
229    /**
230     * Returns
231     * PD1 (Patient Additional Demographic) - creates it if necessary
232     */
233    public PD1 getPD1() { 
234       return getTyped("PD1", PD1.class);
235    }
236
237
238
239
240    /**
241     * Returns
242     * the first repetition of 
243     * ROL (Role) - creates it if necessary
244     */
245    public ROL getROL() { 
246       return getTyped("ROL", ROL.class);
247    }
248
249
250    /**
251     * Returns a specific repetition of
252     * ROL (Role) - creates it if necessary
253     *
254     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
255     * @throws HL7Exception if the repetition requested is more than one 
256     *     greater than the number of existing repetitions.
257     */
258    public ROL getROL(int rep) { 
259       return getTyped("ROL", rep, ROL.class);
260    }
261
262    /** 
263     * Returns the number of existing repetitions of ROL 
264     */ 
265    public int getROLReps() { 
266        return getReps("ROL");
267    } 
268
269    /** 
270     * <p>
271     * Returns a non-modifiable List containing all current existing repetitions of ROL.
272     * <p>
273     * <p>
274     * Note that unlike {@link #getROL()}, this method will not create any reps
275     * if none are already present, so an empty list may be returned.
276     * </p>
277     */ 
278    public List<ROL> getROLAll() throws HL7Exception {
279        return getAllAsList("ROL", ROL.class);
280    } 
281
282    /**
283     * Inserts a specific repetition of ROL (Role)
284     * @see AbstractGroup#insertRepetition(Structure, int) 
285     */
286    public void insertROL(ROL structure, int rep) throws HL7Exception { 
287       super.insertRepetition( "ROL", structure, rep);
288    }
289
290
291    /**
292     * Inserts a specific repetition of ROL (Role)
293     * @see AbstractGroup#insertRepetition(Structure, int) 
294     */
295    public ROL insertROL(int rep) throws HL7Exception { 
296       return (ROL)super.insertRepetition("ROL", rep);
297    }
298
299
300    /**
301     * Removes a specific repetition of ROL (Role)
302     * @see AbstractGroup#removeRepetition(String, int) 
303     */
304    public ROL removeROL(int rep) throws HL7Exception { 
305       return (ROL)super.removeRepetition("ROL", rep);
306    }
307
308
309
310    /**
311     * Returns
312     * the first repetition of 
313     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
314     */
315    public NK1 getNK1() { 
316       return getTyped("NK1", NK1.class);
317    }
318
319
320    /**
321     * Returns a specific repetition of
322     * NK1 (Next of Kin / Associated Parties) - creates it if necessary
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     * Returns the number of existing repetitions of NK1 
334     */ 
335    public int getNK1Reps() { 
336        return getReps("NK1");
337    } 
338
339    /** 
340     * <p>
341     * Returns a non-modifiable List containing all current existing repetitions of NK1.
342     * <p>
343     * <p>
344     * Note that unlike {@link #getNK1()}, this method will not create any reps
345     * if none are already present, so an empty list may be returned.
346     * </p>
347     */ 
348    public List<NK1> getNK1All() throws HL7Exception {
349        return getAllAsList("NK1", NK1.class);
350    } 
351
352    /**
353     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
354     * @see AbstractGroup#insertRepetition(Structure, int) 
355     */
356    public void insertNK1(NK1 structure, int rep) throws HL7Exception { 
357       super.insertRepetition( "NK1", structure, rep);
358    }
359
360
361    /**
362     * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties)
363     * @see AbstractGroup#insertRepetition(Structure, int) 
364     */
365    public NK1 insertNK1(int rep) throws HL7Exception { 
366       return (NK1)super.insertRepetition("NK1", rep);
367    }
368
369
370    /**
371     * Removes a specific repetition of NK1 (Next of Kin / Associated Parties)
372     * @see AbstractGroup#removeRepetition(String, int) 
373     */
374    public NK1 removeNK1(int rep) throws HL7Exception { 
375       return (NK1)super.removeRepetition("NK1", rep);
376    }
377
378
379
380    /**
381     * Returns
382     * PV1 (Patient Visit) - creates it if necessary
383     */
384    public PV1 getPV1() { 
385       return getTyped("PV1", PV1.class);
386    }
387
388
389
390
391    /**
392     * Returns
393     * PV2 (Patient Visit - Additional Information) - creates it if necessary
394     */
395    public PV2 getPV2() { 
396       return getTyped("PV2", PV2.class);
397    }
398
399
400
401
402    /**
403     * Returns
404     * the first repetition of 
405     * ROL2 (Role) - creates it if necessary
406     */
407    public ROL getROL2() { 
408       return getTyped("ROL2", ROL.class);
409    }
410
411
412    /**
413     * Returns a specific repetition of
414     * ROL2 (Role) - creates it if necessary
415     *
416     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
417     * @throws HL7Exception if the repetition requested is more than one 
418     *     greater than the number of existing repetitions.
419     */
420    public ROL getROL2(int rep) { 
421       return getTyped("ROL2", rep, ROL.class);
422    }
423
424    /** 
425     * Returns the number of existing repetitions of ROL2 
426     */ 
427    public int getROL2Reps() { 
428        return getReps("ROL2");
429    } 
430
431    /** 
432     * <p>
433     * Returns a non-modifiable List containing all current existing repetitions of ROL2.
434     * <p>
435     * <p>
436     * Note that unlike {@link #getROL2()}, this method will not create any reps
437     * if none are already present, so an empty list may be returned.
438     * </p>
439     */ 
440    public List<ROL> getROL2All() throws HL7Exception {
441        return getAllAsList("ROL2", ROL.class);
442    } 
443
444    /**
445     * Inserts a specific repetition of ROL2 (Role)
446     * @see AbstractGroup#insertRepetition(Structure, int) 
447     */
448    public void insertROL2(ROL structure, int rep) throws HL7Exception { 
449       super.insertRepetition( "ROL2", structure, rep);
450    }
451
452
453    /**
454     * Inserts a specific repetition of ROL2 (Role)
455     * @see AbstractGroup#insertRepetition(Structure, int) 
456     */
457    public ROL insertROL2(int rep) throws HL7Exception { 
458       return (ROL)super.insertRepetition("ROL2", rep);
459    }
460
461
462    /**
463     * Removes a specific repetition of ROL2 (Role)
464     * @see AbstractGroup#removeRepetition(String, int) 
465     */
466    public ROL removeROL2(int rep) throws HL7Exception { 
467       return (ROL)super.removeRepetition("ROL2", rep);
468    }
469
470
471
472    /**
473     * Returns
474     * the first repetition of 
475     * DB1 (Disability) - creates it if necessary
476     */
477    public DB1 getDB1() { 
478       return getTyped("DB1", DB1.class);
479    }
480
481
482    /**
483     * Returns a specific repetition of
484     * DB1 (Disability) - creates it if necessary
485     *
486     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
487     * @throws HL7Exception if the repetition requested is more than one 
488     *     greater than the number of existing repetitions.
489     */
490    public DB1 getDB1(int rep) { 
491       return getTyped("DB1", rep, DB1.class);
492    }
493
494    /** 
495     * Returns the number of existing repetitions of DB1 
496     */ 
497    public int getDB1Reps() { 
498        return getReps("DB1");
499    } 
500
501    /** 
502     * <p>
503     * Returns a non-modifiable List containing all current existing repetitions of DB1.
504     * <p>
505     * <p>
506     * Note that unlike {@link #getDB1()}, this method will not create any reps
507     * if none are already present, so an empty list may be returned.
508     * </p>
509     */ 
510    public List<DB1> getDB1All() throws HL7Exception {
511        return getAllAsList("DB1", DB1.class);
512    } 
513
514    /**
515     * Inserts a specific repetition of DB1 (Disability)
516     * @see AbstractGroup#insertRepetition(Structure, int) 
517     */
518    public void insertDB1(DB1 structure, int rep) throws HL7Exception { 
519       super.insertRepetition( "DB1", structure, rep);
520    }
521
522
523    /**
524     * Inserts a specific repetition of DB1 (Disability)
525     * @see AbstractGroup#insertRepetition(Structure, int) 
526     */
527    public DB1 insertDB1(int rep) throws HL7Exception { 
528       return (DB1)super.insertRepetition("DB1", rep);
529    }
530
531
532    /**
533     * Removes a specific repetition of DB1 (Disability)
534     * @see AbstractGroup#removeRepetition(String, int) 
535     */
536    public DB1 removeDB1(int rep) throws HL7Exception { 
537       return (DB1)super.removeRepetition("DB1", rep);
538    }
539
540
541
542    /**
543     * Returns
544     * the first repetition of 
545     * AL1 (Patient Allergy Information) - creates it if necessary
546     */
547    public AL1 getAL1() { 
548       return getTyped("AL1", AL1.class);
549    }
550
551
552    /**
553     * Returns a specific repetition of
554     * AL1 (Patient Allergy Information) - creates it if necessary
555     *
556     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
557     * @throws HL7Exception if the repetition requested is more than one 
558     *     greater than the number of existing repetitions.
559     */
560    public AL1 getAL1(int rep) { 
561       return getTyped("AL1", rep, AL1.class);
562    }
563
564    /** 
565     * Returns the number of existing repetitions of AL1 
566     */ 
567    public int getAL1Reps() { 
568        return getReps("AL1");
569    } 
570
571    /** 
572     * <p>
573     * Returns a non-modifiable List containing all current existing repetitions of AL1.
574     * <p>
575     * <p>
576     * Note that unlike {@link #getAL1()}, this method will not create any reps
577     * if none are already present, so an empty list may be returned.
578     * </p>
579     */ 
580    public List<AL1> getAL1All() throws HL7Exception {
581        return getAllAsList("AL1", AL1.class);
582    } 
583
584    /**
585     * Inserts a specific repetition of AL1 (Patient Allergy Information)
586     * @see AbstractGroup#insertRepetition(Structure, int) 
587     */
588    public void insertAL1(AL1 structure, int rep) throws HL7Exception { 
589       super.insertRepetition( "AL1", structure, rep);
590    }
591
592
593    /**
594     * Inserts a specific repetition of AL1 (Patient Allergy Information)
595     * @see AbstractGroup#insertRepetition(Structure, int) 
596     */
597    public AL1 insertAL1(int rep) throws HL7Exception { 
598       return (AL1)super.insertRepetition("AL1", rep);
599    }
600
601
602    /**
603     * Removes a specific repetition of AL1 (Patient Allergy Information)
604     * @see AbstractGroup#removeRepetition(String, int) 
605     */
606    public AL1 removeAL1(int rep) throws HL7Exception { 
607       return (AL1)super.removeRepetition("AL1", rep);
608    }
609
610
611
612    /**
613     * Returns
614     * the first repetition of 
615     * DG1 (Diagnosis) - creates it if necessary
616     */
617    public DG1 getDG1() { 
618       return getTyped("DG1", DG1.class);
619    }
620
621
622    /**
623     * Returns a specific repetition of
624     * DG1 (Diagnosis) - creates it if necessary
625     *
626     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
627     * @throws HL7Exception if the repetition requested is more than one 
628     *     greater than the number of existing repetitions.
629     */
630    public DG1 getDG1(int rep) { 
631       return getTyped("DG1", rep, DG1.class);
632    }
633
634    /** 
635     * Returns the number of existing repetitions of DG1 
636     */ 
637    public int getDG1Reps() { 
638        return getReps("DG1");
639    } 
640
641    /** 
642     * <p>
643     * Returns a non-modifiable List containing all current existing repetitions of DG1.
644     * <p>
645     * <p>
646     * Note that unlike {@link #getDG1()}, this method will not create any reps
647     * if none are already present, so an empty list may be returned.
648     * </p>
649     */ 
650    public List<DG1> getDG1All() throws HL7Exception {
651        return getAllAsList("DG1", DG1.class);
652    } 
653
654    /**
655     * Inserts a specific repetition of DG1 (Diagnosis)
656     * @see AbstractGroup#insertRepetition(Structure, int) 
657     */
658    public void insertDG1(DG1 structure, int rep) throws HL7Exception { 
659       super.insertRepetition( "DG1", structure, rep);
660    }
661
662
663    /**
664     * Inserts a specific repetition of DG1 (Diagnosis)
665     * @see AbstractGroup#insertRepetition(Structure, int) 
666     */
667    public DG1 insertDG1(int rep) throws HL7Exception { 
668       return (DG1)super.insertRepetition("DG1", rep);
669    }
670
671
672    /**
673     * Removes a specific repetition of DG1 (Diagnosis)
674     * @see AbstractGroup#removeRepetition(String, int) 
675     */
676    public DG1 removeDG1(int rep) throws HL7Exception { 
677       return (DG1)super.removeRepetition("DG1", rep);
678    }
679
680
681
682    /**
683     * Returns
684     * DRG (Diagnosis Related Group) - creates it if necessary
685     */
686    public DRG getDRG() { 
687       return getTyped("DRG", DRG.class);
688    }
689
690
691
692
693    /**
694     * Returns
695     * the first repetition of 
696     * PROCEDURE (a Group object) - creates it if necessary
697     */
698    public ADT_A03_PROCEDURE getPROCEDURE() { 
699       return getTyped("PROCEDURE", ADT_A03_PROCEDURE.class);
700    }
701
702
703    /**
704     * Returns a specific repetition of
705     * PROCEDURE (a Group object) - creates it if necessary
706     *
707     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
708     * @throws HL7Exception if the repetition requested is more than one 
709     *     greater than the number of existing repetitions.
710     */
711    public ADT_A03_PROCEDURE getPROCEDURE(int rep) { 
712       return getTyped("PROCEDURE", rep, ADT_A03_PROCEDURE.class);
713    }
714
715    /** 
716     * Returns the number of existing repetitions of PROCEDURE 
717     */ 
718    public int getPROCEDUREReps() { 
719        return getReps("PROCEDURE");
720    } 
721
722    /** 
723     * <p>
724     * Returns a non-modifiable List containing all current existing repetitions of PROCEDURE.
725     * <p>
726     * <p>
727     * Note that unlike {@link #getPROCEDURE()}, this method will not create any reps
728     * if none are already present, so an empty list may be returned.
729     * </p>
730     */ 
731    public List<ADT_A03_PROCEDURE> getPROCEDUREAll() throws HL7Exception {
732        return getAllAsList("PROCEDURE", ADT_A03_PROCEDURE.class);
733    } 
734
735    /**
736     * Inserts a specific repetition of PROCEDURE (a Group object)
737     * @see AbstractGroup#insertRepetition(Structure, int) 
738     */
739    public void insertPROCEDURE(ADT_A03_PROCEDURE structure, int rep) throws HL7Exception { 
740       super.insertRepetition( "PROCEDURE", structure, rep);
741    }
742
743
744    /**
745     * Inserts a specific repetition of PROCEDURE (a Group object)
746     * @see AbstractGroup#insertRepetition(Structure, int) 
747     */
748    public ADT_A03_PROCEDURE insertPROCEDURE(int rep) throws HL7Exception { 
749       return (ADT_A03_PROCEDURE)super.insertRepetition("PROCEDURE", rep);
750    }
751
752
753    /**
754     * Removes a specific repetition of PROCEDURE (a Group object)
755     * @see AbstractGroup#removeRepetition(String, int) 
756     */
757    public ADT_A03_PROCEDURE removePROCEDURE(int rep) throws HL7Exception { 
758       return (ADT_A03_PROCEDURE)super.removeRepetition("PROCEDURE", rep);
759    }
760
761
762
763    /**
764     * Returns
765     * the first repetition of 
766     * OBX (Observation/Result) - creates it if necessary
767     */
768    public OBX getOBX() { 
769       return getTyped("OBX", OBX.class);
770    }
771
772
773    /**
774     * Returns a specific repetition of
775     * OBX (Observation/Result) - creates it if necessary
776     *
777     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
778     * @throws HL7Exception if the repetition requested is more than one 
779     *     greater than the number of existing repetitions.
780     */
781    public OBX getOBX(int rep) { 
782       return getTyped("OBX", rep, OBX.class);
783    }
784
785    /** 
786     * Returns the number of existing repetitions of OBX 
787     */ 
788    public int getOBXReps() { 
789        return getReps("OBX");
790    } 
791
792    /** 
793     * <p>
794     * Returns a non-modifiable List containing all current existing repetitions of OBX.
795     * <p>
796     * <p>
797     * Note that unlike {@link #getOBX()}, this method will not create any reps
798     * if none are already present, so an empty list may be returned.
799     * </p>
800     */ 
801    public List<OBX> getOBXAll() throws HL7Exception {
802        return getAllAsList("OBX", OBX.class);
803    } 
804
805    /**
806     * Inserts a specific repetition of OBX (Observation/Result)
807     * @see AbstractGroup#insertRepetition(Structure, int) 
808     */
809    public void insertOBX(OBX structure, int rep) throws HL7Exception { 
810       super.insertRepetition( "OBX", structure, rep);
811    }
812
813
814    /**
815     * Inserts a specific repetition of OBX (Observation/Result)
816     * @see AbstractGroup#insertRepetition(Structure, int) 
817     */
818    public OBX insertOBX(int rep) throws HL7Exception { 
819       return (OBX)super.insertRepetition("OBX", rep);
820    }
821
822
823    /**
824     * Removes a specific repetition of OBX (Observation/Result)
825     * @see AbstractGroup#removeRepetition(String, int) 
826     */
827    public OBX removeOBX(int rep) throws HL7Exception { 
828       return (OBX)super.removeRepetition("OBX", rep);
829    }
830
831
832
833    /**
834     * Returns
835     * the first repetition of 
836     * GT1 (Guarantor) - creates it if necessary
837     */
838    public GT1 getGT1() { 
839       return getTyped("GT1", GT1.class);
840    }
841
842
843    /**
844     * Returns a specific repetition of
845     * GT1 (Guarantor) - creates it if necessary
846     *
847     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
848     * @throws HL7Exception if the repetition requested is more than one 
849     *     greater than the number of existing repetitions.
850     */
851    public GT1 getGT1(int rep) { 
852       return getTyped("GT1", rep, GT1.class);
853    }
854
855    /** 
856     * Returns the number of existing repetitions of GT1 
857     */ 
858    public int getGT1Reps() { 
859        return getReps("GT1");
860    } 
861
862    /** 
863     * <p>
864     * Returns a non-modifiable List containing all current existing repetitions of GT1.
865     * <p>
866     * <p>
867     * Note that unlike {@link #getGT1()}, this method will not create any reps
868     * if none are already present, so an empty list may be returned.
869     * </p>
870     */ 
871    public List<GT1> getGT1All() throws HL7Exception {
872        return getAllAsList("GT1", GT1.class);
873    } 
874
875    /**
876     * Inserts a specific repetition of GT1 (Guarantor)
877     * @see AbstractGroup#insertRepetition(Structure, int) 
878     */
879    public void insertGT1(GT1 structure, int rep) throws HL7Exception { 
880       super.insertRepetition( "GT1", structure, rep);
881    }
882
883
884    /**
885     * Inserts a specific repetition of GT1 (Guarantor)
886     * @see AbstractGroup#insertRepetition(Structure, int) 
887     */
888    public GT1 insertGT1(int rep) throws HL7Exception { 
889       return (GT1)super.insertRepetition("GT1", rep);
890    }
891
892
893    /**
894     * Removes a specific repetition of GT1 (Guarantor)
895     * @see AbstractGroup#removeRepetition(String, int) 
896     */
897    public GT1 removeGT1(int rep) throws HL7Exception { 
898       return (GT1)super.removeRepetition("GT1", rep);
899    }
900
901
902
903    /**
904     * Returns
905     * the first repetition of 
906     * INSURANCE (a Group object) - creates it if necessary
907     */
908    public ADT_A03_INSURANCE getINSURANCE() { 
909       return getTyped("INSURANCE", ADT_A03_INSURANCE.class);
910    }
911
912
913    /**
914     * Returns a specific repetition of
915     * INSURANCE (a Group object) - creates it if necessary
916     *
917     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
918     * @throws HL7Exception if the repetition requested is more than one 
919     *     greater than the number of existing repetitions.
920     */
921    public ADT_A03_INSURANCE getINSURANCE(int rep) { 
922       return getTyped("INSURANCE", rep, ADT_A03_INSURANCE.class);
923    }
924
925    /** 
926     * Returns the number of existing repetitions of INSURANCE 
927     */ 
928    public int getINSURANCEReps() { 
929        return getReps("INSURANCE");
930    } 
931
932    /** 
933     * <p>
934     * Returns a non-modifiable List containing all current existing repetitions of INSURANCE.
935     * <p>
936     * <p>
937     * Note that unlike {@link #getINSURANCE()}, this method will not create any reps
938     * if none are already present, so an empty list may be returned.
939     * </p>
940     */ 
941    public List<ADT_A03_INSURANCE> getINSURANCEAll() throws HL7Exception {
942        return getAllAsList("INSURANCE", ADT_A03_INSURANCE.class);
943    } 
944
945    /**
946     * Inserts a specific repetition of INSURANCE (a Group object)
947     * @see AbstractGroup#insertRepetition(Structure, int) 
948     */
949    public void insertINSURANCE(ADT_A03_INSURANCE structure, int rep) throws HL7Exception { 
950       super.insertRepetition( "INSURANCE", structure, rep);
951    }
952
953
954    /**
955     * Inserts a specific repetition of INSURANCE (a Group object)
956     * @see AbstractGroup#insertRepetition(Structure, int) 
957     */
958    public ADT_A03_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 
959       return (ADT_A03_INSURANCE)super.insertRepetition("INSURANCE", rep);
960    }
961
962
963    /**
964     * Removes a specific repetition of INSURANCE (a Group object)
965     * @see AbstractGroup#removeRepetition(String, int) 
966     */
967    public ADT_A03_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 
968       return (ADT_A03_INSURANCE)super.removeRepetition("INSURANCE", rep);
969    }
970
971
972
973    /**
974     * Returns
975     * ACC (Accident) - creates it if necessary
976     */
977    public ACC getACC() { 
978       return getTyped("ACC", ACC.class);
979    }
980
981
982
983
984    /**
985     * Returns
986     * PDA (Patient Death and Autopsy) - creates it if necessary
987     */
988    public PDA getPDA() { 
989       return getTyped("PDA", PDA.class);
990    }
991
992
993
994
995}
996