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.group;
035
036import ca.uhn.hl7v2.model.v27.segment.*;
037
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.model.*;
041
042/**
043 * <p>Represents a EHC_E10_INVOICE_PROCESSING_RESULTS_INFO group structure (a Group object).
044 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
045 * This Group contains the following elements:  
046 * </p>
047 * <ul>
048                         * <li>1: IPR (Invoice Processing Results) <b>  </b></li>
049                         * <li>2: NTE (Notes and Comments) <b>optional repeating </b></li>
050                         * <li>3: PYE (Payee Information) <b>  </b></li>
051                         * <li>4: IN1 (Insurance) <b>  </b></li>
052                         * <li>5: IN2 (Insurance Additional Information) <b>optional  </b></li>
053                         * <li>6: IVC (Invoice Segment) <b>  </b></li>
054                         * <li>7: EHC_E10_PRODUCT_SERVICE_SECTION (a Group object) <b> repeating </b></li>
055 * </ul>
056 */
057//@SuppressWarnings("unused")
058public class EHC_E10_INVOICE_PROCESSING_RESULTS_INFO extends AbstractGroup {
059
060    /** 
061     * Creates a new EHC_E10_INVOICE_PROCESSING_RESULTS_INFO group
062     */
063    public EHC_E10_INVOICE_PROCESSING_RESULTS_INFO(Group parent, ModelClassFactory factory) {
064       super(parent, factory);
065       init(factory);
066    }
067
068    private void init(ModelClassFactory factory) {
069       try {
070                                  this.add(IPR.class, true, false, false);
071                                  this.add(NTE.class, false, true, false);
072                                  this.add(PYE.class, true, false, false);
073                                  this.add(IN1.class, true, false, false);
074                                  this.add(IN2.class, false, false, false);
075                                  this.add(IVC.class, true, false, false);
076                                  this.add(EHC_E10_PRODUCT_SERVICE_SECTION.class, true, true, false);
077       } catch(HL7Exception e) {
078          log.error("Unexpected error creating EHC_E10_INVOICE_PROCESSING_RESULTS_INFO - this is probably a bug in the source code generator.", e);
079       }
080    }
081
082    /** 
083     * Returns "2.7"
084     */
085    public String getVersion() {
086       return "2.7";
087    }
088
089
090
091    /**
092     * Returns
093     * IPR (Invoice Processing Results) - creates it if necessary
094     */
095    public IPR getIPR() { 
096       IPR retVal = getTyped("IPR", IPR.class);
097       return retVal;
098    }
099
100
101
102
103    /**
104     * Returns
105     * the first repetition of 
106     * NTE (Notes and Comments) - creates it if necessary
107     */
108    public NTE getNTE() { 
109       NTE retVal = getTyped("NTE", NTE.class);
110       return retVal;
111    }
112
113
114    /**
115     * Returns a specific repetition of
116     * NTE (Notes and Comments) - creates it if necessary
117     *
118     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
119     * @throws HL7Exception if the repetition requested is more than one 
120     *     greater than the number of existing repetitions.
121     */
122    public NTE getNTE(int rep) { 
123       NTE retVal = getTyped("NTE", rep, NTE.class);
124       return retVal;
125    }
126
127    /** 
128     * Returns the number of existing repetitions of NTE 
129     */ 
130    public int getNTEReps() {  
131        return getReps("NTE");
132    } 
133
134    /** 
135     * <p>
136     * Returns a non-modifiable List containing all current existing repetitions of NTE.
137     * <p>
138     * <p>
139     * Note that unlike {@link #getNTE()}, this method will not create any reps
140     * if none are already present, so an empty list may be returned.
141     * </p>
142     */ 
143    public java.util.List<NTE> getNTEAll() throws HL7Exception {
144        return getAllAsList("NTE", NTE.class);
145    } 
146
147    /**
148     * Inserts a specific repetition of NTE (Notes and Comments)
149     * @see AbstractGroup#insertRepetition(Structure, int) 
150     */
151    public void insertNTE(NTE structure, int rep) throws HL7Exception { 
152       super.insertRepetition("NTE", structure, rep);
153    }
154
155
156    /**
157     * Inserts a specific repetition of NTE (Notes and Comments)
158     * @see AbstractGroup#insertRepetition(Structure, int) 
159     */
160    public NTE insertNTE(int rep) throws HL7Exception { 
161       return (NTE)super.insertRepetition("NTE", rep);
162    }
163
164
165    /**
166     * Removes a specific repetition of NTE (Notes and Comments)
167     * @see AbstractGroup#removeRepetition(String, int) 
168     */
169    public NTE removeNTE(int rep) throws HL7Exception { 
170       return (NTE)super.removeRepetition("NTE", rep);
171    }
172
173
174
175    /**
176     * Returns
177     * PYE (Payee Information) - creates it if necessary
178     */
179    public PYE getPYE() { 
180       PYE retVal = getTyped("PYE", PYE.class);
181       return retVal;
182    }
183
184
185
186
187    /**
188     * Returns
189     * IN1 (Insurance) - creates it if necessary
190     */
191    public IN1 getIN1() { 
192       IN1 retVal = getTyped("IN1", IN1.class);
193       return retVal;
194    }
195
196
197
198
199    /**
200     * Returns
201     * IN2 (Insurance Additional Information) - creates it if necessary
202     */
203    public IN2 getIN2() { 
204       IN2 retVal = getTyped("IN2", IN2.class);
205       return retVal;
206    }
207
208
209
210
211    /**
212     * Returns
213     * IVC (Invoice Segment) - creates it if necessary
214     */
215    public IVC getIVC() { 
216       IVC retVal = getTyped("IVC", IVC.class);
217       return retVal;
218    }
219
220
221
222
223    /**
224     * Returns
225     * the first repetition of 
226     * PRODUCT_SERVICE_SECTION (a Group object) - creates it if necessary
227     */
228    public EHC_E10_PRODUCT_SERVICE_SECTION getPRODUCT_SERVICE_SECTION() { 
229       EHC_E10_PRODUCT_SERVICE_SECTION retVal = getTyped("PRODUCT_SERVICE_SECTION", EHC_E10_PRODUCT_SERVICE_SECTION.class);
230       return retVal;
231    }
232
233
234    /**
235     * Returns a specific repetition of
236     * PRODUCT_SERVICE_SECTION (a Group object) - creates it if necessary
237     *
238     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
239     * @throws HL7Exception if the repetition requested is more than one 
240     *     greater than the number of existing repetitions.
241     */
242    public EHC_E10_PRODUCT_SERVICE_SECTION getPRODUCT_SERVICE_SECTION(int rep) { 
243       EHC_E10_PRODUCT_SERVICE_SECTION retVal = getTyped("PRODUCT_SERVICE_SECTION", rep, EHC_E10_PRODUCT_SERVICE_SECTION.class);
244       return retVal;
245    }
246
247    /** 
248     * Returns the number of existing repetitions of PRODUCT_SERVICE_SECTION 
249     */ 
250    public int getPRODUCT_SERVICE_SECTIONReps() {  
251        return getReps("PRODUCT_SERVICE_SECTION");
252    } 
253
254    /** 
255     * <p>
256     * Returns a non-modifiable List containing all current existing repetitions of PRODUCT_SERVICE_SECTION.
257     * <p>
258     * <p>
259     * Note that unlike {@link #getPRODUCT_SERVICE_SECTION()}, this method will not create any reps
260     * if none are already present, so an empty list may be returned.
261     * </p>
262     */ 
263    public java.util.List<EHC_E10_PRODUCT_SERVICE_SECTION> getPRODUCT_SERVICE_SECTIONAll() throws HL7Exception {
264        return getAllAsList("PRODUCT_SERVICE_SECTION", EHC_E10_PRODUCT_SERVICE_SECTION.class);
265    } 
266
267    /**
268     * Inserts a specific repetition of PRODUCT_SERVICE_SECTION (a Group object)
269     * @see AbstractGroup#insertRepetition(Structure, int) 
270     */
271    public void insertPRODUCT_SERVICE_SECTION(EHC_E10_PRODUCT_SERVICE_SECTION structure, int rep) throws HL7Exception { 
272       super.insertRepetition("PRODUCT_SERVICE_SECTION", structure, rep);
273    }
274
275
276    /**
277     * Inserts a specific repetition of PRODUCT_SERVICE_SECTION (a Group object)
278     * @see AbstractGroup#insertRepetition(Structure, int) 
279     */
280    public EHC_E10_PRODUCT_SERVICE_SECTION insertPRODUCT_SERVICE_SECTION(int rep) throws HL7Exception { 
281       return (EHC_E10_PRODUCT_SERVICE_SECTION)super.insertRepetition("PRODUCT_SERVICE_SECTION", rep);
282    }
283
284
285    /**
286     * Removes a specific repetition of PRODUCT_SERVICE_SECTION (a Group object)
287     * @see AbstractGroup#removeRepetition(String, int) 
288     */
289    public EHC_E10_PRODUCT_SERVICE_SECTION removePRODUCT_SERVICE_SECTION(int rep) throws HL7Exception { 
290       return (EHC_E10_PRODUCT_SERVICE_SECTION)super.removeRepetition("PRODUCT_SERVICE_SECTION", rep);
291    }
292
293
294
295}
296