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