View Javadoc
1   /*
2    * This class is an auto-generated source file for a HAPI
3    * HL7 v2.x standard structure class.
4    *
5    * For more information, visit: http://hl7api.sourceforge.net/
6    * 
7    * The contents of this file are subject to the Mozilla Public License Version 1.1 
8    * (the "License"); you may not use this file except in compliance with the License. 
9    * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
10   * Software distributed under the License is distributed on an "AS IS" basis, 
11   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
12   * specific language governing rights and limitations under the License. 
13   * 
14   * The Original Code is "[file_name]".  Description: 
15   * "[one_line_description]" 
16   * 
17   * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
18   * 2012.  All Rights Reserved. 
19   * 
20   * Contributor(s): ______________________________________. 
21   * 
22   * Alternatively, the contents of this file may be used under the terms of the 
23   * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
24   * applicable instead of those above.  If you wish to allow use of your version of this 
25   * file only under the terms of the GPL and not to allow others to use your version 
26   * of this file under the MPL, indicate your decision by deleting  the provisions above 
27   * and replace  them with the notice and other provisions required by the GPL License.  
28   * If you do not delete the provisions above, a recipient may use your version of 
29   * this file under either the MPL or the GPL. 
30   * 
31   */
32  
33  
34  package ca.uhn.hl7v2.model.v26.group;
35  
36  import ca.uhn.hl7v2.model.v26.segment.*;
37  
38  import ca.uhn.hl7v2.HL7Exception;
39  import ca.uhn.hl7v2.parser.ModelClassFactory;
40  import ca.uhn.hl7v2.model.*;
41  
42  /**
43   * <p>Represents a EHC_E10_INVOICE_PROCESSING_RESULTS_INFO group structure (a Group object).
44   * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
45   * This Group contains the following elements:  
46   * </p>
47   * <ul>
48                           * <li>1: IPR (Invoice Processing Results) <b>  </b></li>
49                           * <li>2: NTE (Notes and Comments) <b>optional repeating </b></li>
50                           * <li>3: PYE (Payee Information) <b>  </b></li>
51                           * <li>4: IN1 (Insurance) <b>  </b></li>
52                           * <li>5: IN2 (Insurance Additional Information) <b>optional  </b></li>
53                           * <li>6: IVC (Invoice Segment) <b>  </b></li>
54                           * <li>7: EHC_E10_PRODUCT_SERVICE_SECTION (a Group object) <b> repeating </b></li>
55   * </ul>
56   */
57  //@SuppressWarnings("unused")
58  public class EHC_E10_INVOICE_PROCESSING_RESULTS_INFO extends AbstractGroup {
59  
60      /** 
61       * Creates a new EHC_E10_INVOICE_PROCESSING_RESULTS_INFO group
62       */
63      public EHC_E10_INVOICE_PROCESSING_RESULTS_INFO(Group parent, ModelClassFactory factory) {
64         super(parent, factory);
65         init(factory);
66      }
67  
68      private void init(ModelClassFactory factory) {
69         try {
70                                    this.add(IPR.class, true, false, false);
71                                    this.add(NTE.class, false, true, false);
72                                    this.add(PYE.class, true, false, false);
73                                    this.add(IN1.class, true, false, false);
74                                    this.add(IN2.class, false, false, false);
75                                    this.add(IVC.class, true, false, false);
76                                    this.add(EHC_E10_PRODUCT_SERVICE_SECTION.class, true, true, false);
77         } catch(HL7Exception e) {
78            log.error("Unexpected error creating EHC_E10_INVOICE_PROCESSING_RESULTS_INFO - this is probably a bug in the source code generator.", e);
79         }
80      }
81  
82      /** 
83       * Returns "2.6"
84       */
85      public String getVersion() {
86         return "2.6";
87      }
88  
89  
90  
91      /**
92       * Returns
93       * IPR (Invoice Processing Results) - creates it if necessary
94       */
95      public IPR getIPR() { 
96         IPR retVal = getTyped("IPR", IPR.class);
97         return retVal;
98      }
99  
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