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.message; 035 036import ca.uhn.hl7v2.model.v26.group.*; 037import ca.uhn.hl7v2.model.v26.segment.*; 038 039import java.util.List; 040 041import ca.uhn.hl7v2.HL7Exception; 042import ca.uhn.hl7v2.parser.ModelClassFactory; 043import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 044import ca.uhn.hl7v2.model.AbstractMessage; 045 046/** 047 * <p>Represents a EHC_E01 message structure (see chapter 16.3.1). This structure contains the 048 * following elements: </p> 049 * <ul> 050 * <li>1: MSH (Message Header) <b> </b></li> 051 * <li>2: SFT (Software Segment) <b>optional repeating</b></li> 052 * <li>3: UAC (User Authentication Credential Segment) <b>optional repeating</b></li> 053 * <li>4: IVC (Invoice Segment) <b> </b></li> 054 * <li>5: PYE (Payee Information) <b>optional </b></li> 055 * <li>6: CTD (Contact Data) <b>optional repeating</b></li> 056 * <li>7: AUT (Authorization Information) <b>optional </b></li> 057 * <li>8: LOC (Location Identification) <b>optional repeating</b></li> 058 * <li>9: ROL (Role) <b>optional repeating</b></li> 059 * <li>10: EHC_E01_PRODUCT_SERVICE_SECTION (a Group object) <b> repeating</b></li> 060 * </ul> 061 */ 062@SuppressWarnings("unused") 063public class EHC_E01 extends AbstractMessage { 064 065 /** 066 * Creates a new EHC_E01 message with DefaultModelClassFactory. 067 */ 068 public EHC_E01() { 069 this(new DefaultModelClassFactory()); 070 } 071 072 /** 073 * Creates a new EHC_E01 message with custom ModelClassFactory. 074 */ 075 public EHC_E01(ModelClassFactory factory) { 076 super(factory); 077 init(factory); 078 } 079 080 private void init(ModelClassFactory factory) { 081 try { 082 this.add(MSH.class, true, false); 083 this.add(SFT.class, false, true); 084 this.add(UAC.class, false, true); 085 this.add(IVC.class, true, false); 086 this.add(PYE.class, false, false); 087 this.add(CTD.class, false, true); 088 this.add(AUT.class, false, false); 089 this.add(LOC.class, false, true); 090 this.add(ROL.class, false, true); 091 this.add(EHC_E01_PRODUCT_SERVICE_SECTION.class, true, true); 092 } catch(HL7Exception e) { 093 log.error("Unexpected error creating EHC_E01 - this is probably a bug in the source code generator.", e); 094 } 095 } 096 097 /** 098 * Returns "2.6" 099 */ 100 public String getVersion() { 101 return "2.6"; 102 } 103 104 105 106 /** 107 * Returns 108 * MSH (Message Header) - creates it if necessary 109 */ 110 public MSH getMSH() { 111 return getTyped("MSH", MSH.class); 112 } 113 114 115 116 117 /** 118 * Returns 119 * the first repetition of 120 * SFT (Software Segment) - creates it if necessary 121 */ 122 public SFT getSFT() { 123 return getTyped("SFT", SFT.class); 124 } 125 126 127 /** 128 * Returns a specific repetition of 129 * SFT (Software Segment) - creates it if necessary 130 * 131 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 132 * @throws HL7Exception if the repetition requested is more than one 133 * greater than the number of existing repetitions. 134 */ 135 public SFT getSFT(int rep) { 136 return getTyped("SFT", rep, SFT.class); 137 } 138 139 /** 140 * Returns the number of existing repetitions of SFT 141 */ 142 public int getSFTReps() { 143 return getReps("SFT"); 144 } 145 146 /** 147 * <p> 148 * Returns a non-modifiable List containing all current existing repetitions of SFT. 149 * <p> 150 * <p> 151 * Note that unlike {@link #getSFT()}, this method will not create any reps 152 * if none are already present, so an empty list may be returned. 153 * </p> 154 */ 155 public List<SFT> getSFTAll() throws HL7Exception { 156 return getAllAsList("SFT", SFT.class); 157 } 158 159 /** 160 * Inserts a specific repetition of SFT (Software Segment) 161 * @see AbstractGroup#insertRepetition(Structure, int) 162 */ 163 public void insertSFT(SFT structure, int rep) throws HL7Exception { 164 super.insertRepetition( "SFT", structure, rep); 165 } 166 167 168 /** 169 * Inserts a specific repetition of SFT (Software Segment) 170 * @see AbstractGroup#insertRepetition(Structure, int) 171 */ 172 public SFT insertSFT(int rep) throws HL7Exception { 173 return (SFT)super.insertRepetition("SFT", rep); 174 } 175 176 177 /** 178 * Removes a specific repetition of SFT (Software Segment) 179 * @see AbstractGroup#removeRepetition(String, int) 180 */ 181 public SFT removeSFT(int rep) throws HL7Exception { 182 return (SFT)super.removeRepetition("SFT", rep); 183 } 184 185 186 187 /** 188 * Returns 189 * the first repetition of 190 * UAC (User Authentication Credential Segment) - creates it if necessary 191 */ 192 public UAC getUAC() { 193 return getTyped("UAC", UAC.class); 194 } 195 196 197 /** 198 * Returns a specific repetition of 199 * UAC (User Authentication Credential Segment) - creates it if necessary 200 * 201 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 202 * @throws HL7Exception if the repetition requested is more than one 203 * greater than the number of existing repetitions. 204 */ 205 public UAC getUAC(int rep) { 206 return getTyped("UAC", rep, UAC.class); 207 } 208 209 /** 210 * Returns the number of existing repetitions of UAC 211 */ 212 public int getUACReps() { 213 return getReps("UAC"); 214 } 215 216 /** 217 * <p> 218 * Returns a non-modifiable List containing all current existing repetitions of UAC. 219 * <p> 220 * <p> 221 * Note that unlike {@link #getUAC()}, this method will not create any reps 222 * if none are already present, so an empty list may be returned. 223 * </p> 224 */ 225 public List<UAC> getUACAll() throws HL7Exception { 226 return getAllAsList("UAC", UAC.class); 227 } 228 229 /** 230 * Inserts a specific repetition of UAC (User Authentication Credential Segment) 231 * @see AbstractGroup#insertRepetition(Structure, int) 232 */ 233 public void insertUAC(UAC structure, int rep) throws HL7Exception { 234 super.insertRepetition( "UAC", structure, rep); 235 } 236 237 238 /** 239 * Inserts a specific repetition of UAC (User Authentication Credential Segment) 240 * @see AbstractGroup#insertRepetition(Structure, int) 241 */ 242 public UAC insertUAC(int rep) throws HL7Exception { 243 return (UAC)super.insertRepetition("UAC", rep); 244 } 245 246 247 /** 248 * Removes a specific repetition of UAC (User Authentication Credential Segment) 249 * @see AbstractGroup#removeRepetition(String, int) 250 */ 251 public UAC removeUAC(int rep) throws HL7Exception { 252 return (UAC)super.removeRepetition("UAC", rep); 253 } 254 255 256 257 /** 258 * Returns 259 * IVC (Invoice Segment) - creates it if necessary 260 */ 261 public IVC getIVC() { 262 return getTyped("IVC", IVC.class); 263 } 264 265 266 267 268 /** 269 * Returns 270 * PYE (Payee Information) - creates it if necessary 271 */ 272 public PYE getPYE() { 273 return getTyped("PYE", PYE.class); 274 } 275 276 277 278 279 /** 280 * Returns 281 * the first repetition of 282 * CTD (Contact Data) - creates it if necessary 283 */ 284 public CTD getCTD() { 285 return getTyped("CTD", CTD.class); 286 } 287 288 289 /** 290 * Returns a specific repetition of 291 * CTD (Contact Data) - creates it if necessary 292 * 293 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 294 * @throws HL7Exception if the repetition requested is more than one 295 * greater than the number of existing repetitions. 296 */ 297 public CTD getCTD(int rep) { 298 return getTyped("CTD", rep, CTD.class); 299 } 300 301 /** 302 * Returns the number of existing repetitions of CTD 303 */ 304 public int getCTDReps() { 305 return getReps("CTD"); 306 } 307 308 /** 309 * <p> 310 * Returns a non-modifiable List containing all current existing repetitions of CTD. 311 * <p> 312 * <p> 313 * Note that unlike {@link #getCTD()}, this method will not create any reps 314 * if none are already present, so an empty list may be returned. 315 * </p> 316 */ 317 public List<CTD> getCTDAll() throws HL7Exception { 318 return getAllAsList("CTD", CTD.class); 319 } 320 321 /** 322 * Inserts a specific repetition of CTD (Contact Data) 323 * @see AbstractGroup#insertRepetition(Structure, int) 324 */ 325 public void insertCTD(CTD structure, int rep) throws HL7Exception { 326 super.insertRepetition( "CTD", structure, rep); 327 } 328 329 330 /** 331 * Inserts a specific repetition of CTD (Contact Data) 332 * @see AbstractGroup#insertRepetition(Structure, int) 333 */ 334 public CTD insertCTD(int rep) throws HL7Exception { 335 return (CTD)super.insertRepetition("CTD", rep); 336 } 337 338 339 /** 340 * Removes a specific repetition of CTD (Contact Data) 341 * @see AbstractGroup#removeRepetition(String, int) 342 */ 343 public CTD removeCTD(int rep) throws HL7Exception { 344 return (CTD)super.removeRepetition("CTD", rep); 345 } 346 347 348 349 /** 350 * Returns 351 * AUT (Authorization Information) - creates it if necessary 352 */ 353 public AUT getAUT() { 354 return getTyped("AUT", AUT.class); 355 } 356 357 358 359 360 /** 361 * Returns 362 * the first repetition of 363 * LOC (Location Identification) - creates it if necessary 364 */ 365 public LOC getLOC() { 366 return getTyped("LOC", LOC.class); 367 } 368 369 370 /** 371 * Returns a specific repetition of 372 * LOC (Location Identification) - creates it if necessary 373 * 374 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 375 * @throws HL7Exception if the repetition requested is more than one 376 * greater than the number of existing repetitions. 377 */ 378 public LOC getLOC(int rep) { 379 return getTyped("LOC", rep, LOC.class); 380 } 381 382 /** 383 * Returns the number of existing repetitions of LOC 384 */ 385 public int getLOCReps() { 386 return getReps("LOC"); 387 } 388 389 /** 390 * <p> 391 * Returns a non-modifiable List containing all current existing repetitions of LOC. 392 * <p> 393 * <p> 394 * Note that unlike {@link #getLOC()}, this method will not create any reps 395 * if none are already present, so an empty list may be returned. 396 * </p> 397 */ 398 public List<LOC> getLOCAll() throws HL7Exception { 399 return getAllAsList("LOC", LOC.class); 400 } 401 402 /** 403 * Inserts a specific repetition of LOC (Location Identification) 404 * @see AbstractGroup#insertRepetition(Structure, int) 405 */ 406 public void insertLOC(LOC structure, int rep) throws HL7Exception { 407 super.insertRepetition( "LOC", structure, rep); 408 } 409 410 411 /** 412 * Inserts a specific repetition of LOC (Location Identification) 413 * @see AbstractGroup#insertRepetition(Structure, int) 414 */ 415 public LOC insertLOC(int rep) throws HL7Exception { 416 return (LOC)super.insertRepetition("LOC", rep); 417 } 418 419 420 /** 421 * Removes a specific repetition of LOC (Location Identification) 422 * @see AbstractGroup#removeRepetition(String, int) 423 */ 424 public LOC removeLOC(int rep) throws HL7Exception { 425 return (LOC)super.removeRepetition("LOC", rep); 426 } 427 428 429 430 /** 431 * Returns 432 * the first repetition of 433 * ROL (Role) - creates it if necessary 434 */ 435 public ROL getROL() { 436 return getTyped("ROL", ROL.class); 437 } 438 439 440 /** 441 * Returns a specific repetition of 442 * ROL (Role) - creates it if necessary 443 * 444 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 445 * @throws HL7Exception if the repetition requested is more than one 446 * greater than the number of existing repetitions. 447 */ 448 public ROL getROL(int rep) { 449 return getTyped("ROL", rep, ROL.class); 450 } 451 452 /** 453 * Returns the number of existing repetitions of ROL 454 */ 455 public int getROLReps() { 456 return getReps("ROL"); 457 } 458 459 /** 460 * <p> 461 * Returns a non-modifiable List containing all current existing repetitions of ROL. 462 * <p> 463 * <p> 464 * Note that unlike {@link #getROL()}, this method will not create any reps 465 * if none are already present, so an empty list may be returned. 466 * </p> 467 */ 468 public List<ROL> getROLAll() throws HL7Exception { 469 return getAllAsList("ROL", ROL.class); 470 } 471 472 /** 473 * Inserts a specific repetition of ROL (Role) 474 * @see AbstractGroup#insertRepetition(Structure, int) 475 */ 476 public void insertROL(ROL structure, int rep) throws HL7Exception { 477 super.insertRepetition( "ROL", structure, rep); 478 } 479 480 481 /** 482 * Inserts a specific repetition of ROL (Role) 483 * @see AbstractGroup#insertRepetition(Structure, int) 484 */ 485 public ROL insertROL(int rep) throws HL7Exception { 486 return (ROL)super.insertRepetition("ROL", rep); 487 } 488 489 490 /** 491 * Removes a specific repetition of ROL (Role) 492 * @see AbstractGroup#removeRepetition(String, int) 493 */ 494 public ROL removeROL(int rep) throws HL7Exception { 495 return (ROL)super.removeRepetition("ROL", rep); 496 } 497 498 499 500 /** 501 * Returns 502 * the first repetition of 503 * PRODUCT_SERVICE_SECTION (a Group object) - creates it if necessary 504 */ 505 public EHC_E01_PRODUCT_SERVICE_SECTION getPRODUCT_SERVICE_SECTION() { 506 return getTyped("PRODUCT_SERVICE_SECTION", EHC_E01_PRODUCT_SERVICE_SECTION.class); 507 } 508 509 510 /** 511 * Returns a specific repetition of 512 * PRODUCT_SERVICE_SECTION (a Group object) - creates it if necessary 513 * 514 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 515 * @throws HL7Exception if the repetition requested is more than one 516 * greater than the number of existing repetitions. 517 */ 518 public EHC_E01_PRODUCT_SERVICE_SECTION getPRODUCT_SERVICE_SECTION(int rep) { 519 return getTyped("PRODUCT_SERVICE_SECTION", rep, EHC_E01_PRODUCT_SERVICE_SECTION.class); 520 } 521 522 /** 523 * Returns the number of existing repetitions of PRODUCT_SERVICE_SECTION 524 */ 525 public int getPRODUCT_SERVICE_SECTIONReps() { 526 return getReps("PRODUCT_SERVICE_SECTION"); 527 } 528 529 /** 530 * <p> 531 * Returns a non-modifiable List containing all current existing repetitions of PRODUCT_SERVICE_SECTION. 532 * <p> 533 * <p> 534 * Note that unlike {@link #getPRODUCT_SERVICE_SECTION()}, this method will not create any reps 535 * if none are already present, so an empty list may be returned. 536 * </p> 537 */ 538 public List<EHC_E01_PRODUCT_SERVICE_SECTION> getPRODUCT_SERVICE_SECTIONAll() throws HL7Exception { 539 return getAllAsList("PRODUCT_SERVICE_SECTION", EHC_E01_PRODUCT_SERVICE_SECTION.class); 540 } 541 542 /** 543 * Inserts a specific repetition of PRODUCT_SERVICE_SECTION (a Group object) 544 * @see AbstractGroup#insertRepetition(Structure, int) 545 */ 546 public void insertPRODUCT_SERVICE_SECTION(EHC_E01_PRODUCT_SERVICE_SECTION structure, int rep) throws HL7Exception { 547 super.insertRepetition( "PRODUCT_SERVICE_SECTION", structure, rep); 548 } 549 550 551 /** 552 * Inserts a specific repetition of PRODUCT_SERVICE_SECTION (a Group object) 553 * @see AbstractGroup#insertRepetition(Structure, int) 554 */ 555 public EHC_E01_PRODUCT_SERVICE_SECTION insertPRODUCT_SERVICE_SECTION(int rep) throws HL7Exception { 556 return (EHC_E01_PRODUCT_SERVICE_SECTION)super.insertRepetition("PRODUCT_SERVICE_SECTION", rep); 557 } 558 559 560 /** 561 * Removes a specific repetition of PRODUCT_SERVICE_SECTION (a Group object) 562 * @see AbstractGroup#removeRepetition(String, int) 563 */ 564 public EHC_E01_PRODUCT_SERVICE_SECTION removePRODUCT_SERVICE_SECTION(int rep) throws HL7Exception { 565 return (EHC_E01_PRODUCT_SERVICE_SECTION)super.removeRepetition("PRODUCT_SERVICE_SECTION", rep); 566 } 567 568 569 570} 571