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