001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v24.group;
035
036import ca.uhn.hl7v2.model.v24.segment.*;
037
038import java.util.List;
039
040import ca.uhn.hl7v2.HL7Exception;
041import ca.uhn.hl7v2.parser.ModelClassFactory;
042import ca.uhn.hl7v2.model.*;
043
044/**
045 * <p>Represents a DFT_P11_FINANCIAL group structure (a Group object).
046 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
047 * This Group contains the following elements:  
048 * </p>
049 * <ul>
050                 * <li>1: FT1 (Financial Transaction) <b> </b></li>
051                 * <li>2: DFT_P11_FINANCIAL_PROCEDURE (a Group object) <b>optional repeating</b></li>
052                 * <li>3: DFT_P11_FINANCIAL_COMMON_ORDER (a Group object) <b>optional repeating</b></li>
053                 * <li>4: DG1 (Diagnosis) <b>optional repeating</b></li>
054                 * <li>5: DRG (Diagnosis Related Group) <b>optional </b></li>
055                 * <li>6: GT1 (Guarantor) <b>optional repeating</b></li>
056                 * <li>7: DFT_P11_FINANCIAL_INSURANCE (a Group object) <b>optional repeating</b></li>
057 * </ul>
058 */
059@SuppressWarnings("unused")
060public class DFT_P11_FINANCIAL extends AbstractGroup {
061
062    /** 
063     * Creates a new DFT_P11_FINANCIAL group
064     */
065    public DFT_P11_FINANCIAL(Group parent, ModelClassFactory factory) {
066       super(parent, factory);
067       init(factory);
068    }
069
070    private void init(ModelClassFactory factory) {
071       try {
072                          this.add(FT1.class, true, false);
073                          this.add(DFT_P11_FINANCIAL_PROCEDURE.class, false, true);
074                          this.add(DFT_P11_FINANCIAL_COMMON_ORDER.class, false, true);
075                          this.add(DG1.class, false, true);
076                          this.add(DRG.class, false, false);
077                          this.add(GT1.class, false, true);
078                          this.add(DFT_P11_FINANCIAL_INSURANCE.class, false, true);
079       } catch(HL7Exception e) {
080          log.error("Unexpected error creating DFT_P11_FINANCIAL - this is probably a bug in the source code generator.", e);
081       }
082    }
083
084    /** 
085     * Returns "2.4"
086     */
087    public String getVersion() {
088       return "2.4";
089    }
090
091
092
093    /**
094     * Returns
095     * FT1 (Financial Transaction) - creates it if necessary
096     */
097    public FT1 getFT1() { 
098       FT1 retVal = getTyped("FT1", FT1.class);
099       return retVal;
100    }
101
102
103
104
105    /**
106     * Returns
107     * the first repetition of 
108     * FINANCIAL_PROCEDURE (a Group object) - creates it if necessary
109     */
110    public DFT_P11_FINANCIAL_PROCEDURE getFINANCIAL_PROCEDURE() { 
111       DFT_P11_FINANCIAL_PROCEDURE retVal = getTyped("FINANCIAL_PROCEDURE", DFT_P11_FINANCIAL_PROCEDURE.class);
112       return retVal;
113    }
114
115
116    /**
117     * Returns a specific repetition of
118     * FINANCIAL_PROCEDURE (a Group object) - creates it if necessary
119     *
120     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
121     * @throws HL7Exception if the repetition requested is more than one 
122     *     greater than the number of existing repetitions.
123     */
124    public DFT_P11_FINANCIAL_PROCEDURE getFINANCIAL_PROCEDURE(int rep) { 
125       DFT_P11_FINANCIAL_PROCEDURE retVal = getTyped("FINANCIAL_PROCEDURE", rep, DFT_P11_FINANCIAL_PROCEDURE.class);
126       return retVal;
127    }
128
129    /** 
130     * Returns the number of existing repetitions of FINANCIAL_PROCEDURE 
131     */ 
132    public int getFINANCIAL_PROCEDUREReps() {  
133        return getReps("FINANCIAL_PROCEDURE");
134    } 
135
136    /** 
137     * <p>
138     * Returns a non-modifiable List containing all current existing repetitions of FINANCIAL_PROCEDURE.
139     * <p>
140     * <p>
141     * Note that unlike {@link #getFINANCIAL_PROCEDURE()}, this method will not create any reps
142     * if none are already present, so an empty list may be returned.
143     * </p>
144     */ 
145    public List<DFT_P11_FINANCIAL_PROCEDURE> getFINANCIAL_PROCEDUREAll() throws HL7Exception {
146        return getAllAsList("FINANCIAL_PROCEDURE", DFT_P11_FINANCIAL_PROCEDURE.class);
147    } 
148
149    /**
150     * Inserts a specific repetition of FINANCIAL_PROCEDURE (a Group object)
151     * @see AbstractGroup#insertRepetition(Structure, int) 
152     */
153    public void insertFINANCIAL_PROCEDURE(DFT_P11_FINANCIAL_PROCEDURE structure, int rep) throws HL7Exception { 
154       super.insertRepetition("FINANCIAL_PROCEDURE", structure, rep);
155    }
156
157
158    /**
159     * Inserts a specific repetition of FINANCIAL_PROCEDURE (a Group object)
160     * @see AbstractGroup#insertRepetition(Structure, int) 
161     */
162    public DFT_P11_FINANCIAL_PROCEDURE insertFINANCIAL_PROCEDURE(int rep) throws HL7Exception { 
163       return (DFT_P11_FINANCIAL_PROCEDURE)super.insertRepetition("FINANCIAL_PROCEDURE", rep);
164    }
165
166
167    /**
168     * Removes a specific repetition of FINANCIAL_PROCEDURE (a Group object)
169     * @see AbstractGroup#removeRepetition(String, int) 
170     */
171    public DFT_P11_FINANCIAL_PROCEDURE removeFINANCIAL_PROCEDURE(int rep) throws HL7Exception { 
172       return (DFT_P11_FINANCIAL_PROCEDURE)super.removeRepetition("FINANCIAL_PROCEDURE", rep);
173    }
174
175
176
177    /**
178     * Returns
179     * the first repetition of 
180     * FINANCIAL_COMMON_ORDER (a Group object) - creates it if necessary
181     */
182    public DFT_P11_FINANCIAL_COMMON_ORDER getFINANCIAL_COMMON_ORDER() { 
183       DFT_P11_FINANCIAL_COMMON_ORDER retVal = getTyped("FINANCIAL_COMMON_ORDER", DFT_P11_FINANCIAL_COMMON_ORDER.class);
184       return retVal;
185    }
186
187
188    /**
189     * Returns a specific repetition of
190     * FINANCIAL_COMMON_ORDER (a Group object) - creates it if necessary
191     *
192     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
193     * @throws HL7Exception if the repetition requested is more than one 
194     *     greater than the number of existing repetitions.
195     */
196    public DFT_P11_FINANCIAL_COMMON_ORDER getFINANCIAL_COMMON_ORDER(int rep) { 
197       DFT_P11_FINANCIAL_COMMON_ORDER retVal = getTyped("FINANCIAL_COMMON_ORDER", rep, DFT_P11_FINANCIAL_COMMON_ORDER.class);
198       return retVal;
199    }
200
201    /** 
202     * Returns the number of existing repetitions of FINANCIAL_COMMON_ORDER 
203     */ 
204    public int getFINANCIAL_COMMON_ORDERReps() {  
205        return getReps("FINANCIAL_COMMON_ORDER");
206    } 
207
208    /** 
209     * <p>
210     * Returns a non-modifiable List containing all current existing repetitions of FINANCIAL_COMMON_ORDER.
211     * <p>
212     * <p>
213     * Note that unlike {@link #getFINANCIAL_COMMON_ORDER()}, this method will not create any reps
214     * if none are already present, so an empty list may be returned.
215     * </p>
216     */ 
217    public List<DFT_P11_FINANCIAL_COMMON_ORDER> getFINANCIAL_COMMON_ORDERAll() throws HL7Exception {
218        return getAllAsList("FINANCIAL_COMMON_ORDER", DFT_P11_FINANCIAL_COMMON_ORDER.class);
219    } 
220
221    /**
222     * Inserts a specific repetition of FINANCIAL_COMMON_ORDER (a Group object)
223     * @see AbstractGroup#insertRepetition(Structure, int) 
224     */
225    public void insertFINANCIAL_COMMON_ORDER(DFT_P11_FINANCIAL_COMMON_ORDER structure, int rep) throws HL7Exception { 
226       super.insertRepetition("FINANCIAL_COMMON_ORDER", structure, rep);
227    }
228
229
230    /**
231     * Inserts a specific repetition of FINANCIAL_COMMON_ORDER (a Group object)
232     * @see AbstractGroup#insertRepetition(Structure, int) 
233     */
234    public DFT_P11_FINANCIAL_COMMON_ORDER insertFINANCIAL_COMMON_ORDER(int rep) throws HL7Exception { 
235       return (DFT_P11_FINANCIAL_COMMON_ORDER)super.insertRepetition("FINANCIAL_COMMON_ORDER", rep);
236    }
237
238
239    /**
240     * Removes a specific repetition of FINANCIAL_COMMON_ORDER (a Group object)
241     * @see AbstractGroup#removeRepetition(String, int) 
242     */
243    public DFT_P11_FINANCIAL_COMMON_ORDER removeFINANCIAL_COMMON_ORDER(int rep) throws HL7Exception { 
244       return (DFT_P11_FINANCIAL_COMMON_ORDER)super.removeRepetition("FINANCIAL_COMMON_ORDER", rep);
245    }
246
247
248
249    /**
250     * Returns
251     * the first repetition of 
252     * DG1 (Diagnosis) - creates it if necessary
253     */
254    public DG1 getDG1() { 
255       DG1 retVal = getTyped("DG1", DG1.class);
256       return retVal;
257    }
258
259
260    /**
261     * Returns a specific repetition of
262     * DG1 (Diagnosis) - creates it if necessary
263     *
264     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
265     * @throws HL7Exception if the repetition requested is more than one 
266     *     greater than the number of existing repetitions.
267     */
268    public DG1 getDG1(int rep) { 
269       DG1 retVal = getTyped("DG1", rep, DG1.class);
270       return retVal;
271    }
272
273    /** 
274     * Returns the number of existing repetitions of DG1 
275     */ 
276    public int getDG1Reps() {  
277        return getReps("DG1");
278    } 
279
280    /** 
281     * <p>
282     * Returns a non-modifiable List containing all current existing repetitions of DG1.
283     * <p>
284     * <p>
285     * Note that unlike {@link #getDG1()}, this method will not create any reps
286     * if none are already present, so an empty list may be returned.
287     * </p>
288     */ 
289    public List<DG1> getDG1All() throws HL7Exception {
290        return getAllAsList("DG1", DG1.class);
291    } 
292
293    /**
294     * Inserts a specific repetition of DG1 (Diagnosis)
295     * @see AbstractGroup#insertRepetition(Structure, int) 
296     */
297    public void insertDG1(DG1 structure, int rep) throws HL7Exception { 
298       super.insertRepetition("DG1", structure, rep);
299    }
300
301
302    /**
303     * Inserts a specific repetition of DG1 (Diagnosis)
304     * @see AbstractGroup#insertRepetition(Structure, int) 
305     */
306    public DG1 insertDG1(int rep) throws HL7Exception { 
307       return (DG1)super.insertRepetition("DG1", rep);
308    }
309
310
311    /**
312     * Removes a specific repetition of DG1 (Diagnosis)
313     * @see AbstractGroup#removeRepetition(String, int) 
314     */
315    public DG1 removeDG1(int rep) throws HL7Exception { 
316       return (DG1)super.removeRepetition("DG1", rep);
317    }
318
319
320
321    /**
322     * Returns
323     * DRG (Diagnosis Related Group) - creates it if necessary
324     */
325    public DRG getDRG() { 
326       DRG retVal = getTyped("DRG", DRG.class);
327       return retVal;
328    }
329
330
331
332
333    /**
334     * Returns
335     * the first repetition of 
336     * GT1 (Guarantor) - creates it if necessary
337     */
338    public GT1 getGT1() { 
339       GT1 retVal = getTyped("GT1", GT1.class);
340       return retVal;
341    }
342
343
344    /**
345     * Returns a specific repetition of
346     * GT1 (Guarantor) - creates it if necessary
347     *
348     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
349     * @throws HL7Exception if the repetition requested is more than one 
350     *     greater than the number of existing repetitions.
351     */
352    public GT1 getGT1(int rep) { 
353       GT1 retVal = getTyped("GT1", rep, GT1.class);
354       return retVal;
355    }
356
357    /** 
358     * Returns the number of existing repetitions of GT1 
359     */ 
360    public int getGT1Reps() {  
361        return getReps("GT1");
362    } 
363
364    /** 
365     * <p>
366     * Returns a non-modifiable List containing all current existing repetitions of GT1.
367     * <p>
368     * <p>
369     * Note that unlike {@link #getGT1()}, this method will not create any reps
370     * if none are already present, so an empty list may be returned.
371     * </p>
372     */ 
373    public List<GT1> getGT1All() throws HL7Exception {
374        return getAllAsList("GT1", GT1.class);
375    } 
376
377    /**
378     * Inserts a specific repetition of GT1 (Guarantor)
379     * @see AbstractGroup#insertRepetition(Structure, int) 
380     */
381    public void insertGT1(GT1 structure, int rep) throws HL7Exception { 
382       super.insertRepetition("GT1", structure, rep);
383    }
384
385
386    /**
387     * Inserts a specific repetition of GT1 (Guarantor)
388     * @see AbstractGroup#insertRepetition(Structure, int) 
389     */
390    public GT1 insertGT1(int rep) throws HL7Exception { 
391       return (GT1)super.insertRepetition("GT1", rep);
392    }
393
394
395    /**
396     * Removes a specific repetition of GT1 (Guarantor)
397     * @see AbstractGroup#removeRepetition(String, int) 
398     */
399    public GT1 removeGT1(int rep) throws HL7Exception { 
400       return (GT1)super.removeRepetition("GT1", rep);
401    }
402
403
404
405    /**
406     * Returns
407     * the first repetition of 
408     * FINANCIAL_INSURANCE (a Group object) - creates it if necessary
409     */
410    public DFT_P11_FINANCIAL_INSURANCE getFINANCIAL_INSURANCE() { 
411       DFT_P11_FINANCIAL_INSURANCE retVal = getTyped("FINANCIAL_INSURANCE", DFT_P11_FINANCIAL_INSURANCE.class);
412       return retVal;
413    }
414
415
416    /**
417     * Returns a specific repetition of
418     * FINANCIAL_INSURANCE (a Group object) - creates it if necessary
419     *
420     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
421     * @throws HL7Exception if the repetition requested is more than one 
422     *     greater than the number of existing repetitions.
423     */
424    public DFT_P11_FINANCIAL_INSURANCE getFINANCIAL_INSURANCE(int rep) { 
425       DFT_P11_FINANCIAL_INSURANCE retVal = getTyped("FINANCIAL_INSURANCE", rep, DFT_P11_FINANCIAL_INSURANCE.class);
426       return retVal;
427    }
428
429    /** 
430     * Returns the number of existing repetitions of FINANCIAL_INSURANCE 
431     */ 
432    public int getFINANCIAL_INSURANCEReps() {  
433        return getReps("FINANCIAL_INSURANCE");
434    } 
435
436    /** 
437     * <p>
438     * Returns a non-modifiable List containing all current existing repetitions of FINANCIAL_INSURANCE.
439     * <p>
440     * <p>
441     * Note that unlike {@link #getFINANCIAL_INSURANCE()}, this method will not create any reps
442     * if none are already present, so an empty list may be returned.
443     * </p>
444     */ 
445    public List<DFT_P11_FINANCIAL_INSURANCE> getFINANCIAL_INSURANCEAll() throws HL7Exception {
446        return getAllAsList("FINANCIAL_INSURANCE", DFT_P11_FINANCIAL_INSURANCE.class);
447    } 
448
449    /**
450     * Inserts a specific repetition of FINANCIAL_INSURANCE (a Group object)
451     * @see AbstractGroup#insertRepetition(Structure, int) 
452     */
453    public void insertFINANCIAL_INSURANCE(DFT_P11_FINANCIAL_INSURANCE structure, int rep) throws HL7Exception { 
454       super.insertRepetition("FINANCIAL_INSURANCE", structure, rep);
455    }
456
457
458    /**
459     * Inserts a specific repetition of FINANCIAL_INSURANCE (a Group object)
460     * @see AbstractGroup#insertRepetition(Structure, int) 
461     */
462    public DFT_P11_FINANCIAL_INSURANCE insertFINANCIAL_INSURANCE(int rep) throws HL7Exception { 
463       return (DFT_P11_FINANCIAL_INSURANCE)super.insertRepetition("FINANCIAL_INSURANCE", rep);
464    }
465
466
467    /**
468     * Removes a specific repetition of FINANCIAL_INSURANCE (a Group object)
469     * @see AbstractGroup#removeRepetition(String, int) 
470     */
471    public DFT_P11_FINANCIAL_INSURANCE removeFINANCIAL_INSURANCE(int rep) throws HL7Exception { 
472       return (DFT_P11_FINANCIAL_INSURANCE)super.removeRepetition("FINANCIAL_INSURANCE", rep);
473    }
474
475
476
477}
478