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.message; 035 036import ca.uhn.hl7v2.model.v27.group.*; 037import ca.uhn.hl7v2.model.v27.segment.*; 038 039import ca.uhn.hl7v2.HL7Exception; 040import ca.uhn.hl7v2.parser.ModelClassFactory; 041import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 042import ca.uhn.hl7v2.model.*; 043 044 045/** 046 * <p>Represents a EHC_E13 message structure (see chapter 16.3.8). This structure contains the 047 * following elements: </p> 048 * <ul> 049 * <li>1: MSH (Message Header) <b> </b> </li> 050 * <li>2: SFT (Software Segment) <b>optional repeating</b> </li> 051 * <li>3: UAC (User Authentication Credential Segment) <b>optional repeating</b> </li> 052 * <li>4: MSA (Message Acknowledgment) <b> </b> </li> 053 * <li>5: ERR (Error) <b>optional repeating</b> </li> 054 * <li>6: RFI (Request for Information) <b> </b> </li> 055 * <li>7: CTD (Contact Data) <b>optional repeating</b> </li> 056 * <li>8: IVC (Invoice Segment) <b> </b> </li> 057 * <li>9: PSS (Product/Service Section) <b> </b> </li> 058 * <li>10: PSG (Product/Service Group) <b> </b> </li> 059 * <li>11: PID (Patient Identification) <b>optional </b> </li> 060 * <li>12: PSL (Product/Service Line Item) <b>optional </b> </li> 061 * <li>13: EHC_E13_REQUEST (a Group object) <b> repeating</b> </li> 062 * </ul> 063 */ 064//@SuppressWarnings("unused") 065public class EHC_E13 extends AbstractMessage { 066 067 /** 068 * Creates a new EHC_E13 message with DefaultModelClassFactory. 069 */ 070 public EHC_E13() { 071 this(new DefaultModelClassFactory()); 072 } 073 074 /** 075 * Creates a new EHC_E13 message with custom ModelClassFactory. 076 */ 077 public EHC_E13(ModelClassFactory factory) { 078 super(factory); 079 init(factory); 080 } 081 082 private void init(ModelClassFactory factory) { 083 try { 084 this.add(MSH.class, true, false); 085 this.add(SFT.class, false, true); 086 this.add(UAC.class, false, true); 087 this.add(MSA.class, true, false); 088 this.add(ERR.class, false, true); 089 this.add(RFI.class, true, false); 090 this.add(CTD.class, false, true); 091 this.add(IVC.class, true, false); 092 this.add(PSS.class, true, false); 093 this.add(PSG.class, true, false); 094 this.add(PID.class, false, false); 095 this.add(PSL.class, false, false); 096 this.add(EHC_E13_REQUEST.class, true, true); 097 } catch(HL7Exception e) { 098 log.error("Unexpected error creating EHC_E13 - this is probably a bug in the source code generator.", e); 099 } 100 } 101 102 103 /** 104 * Returns "2.7" 105 */ 106 public String getVersion() { 107 return "2.7"; 108 } 109 110 111 112 113 /** 114 * <p> 115 * Returns 116 * MSH (Message Header) - creates it if necessary 117 * </p> 118 * 119 * 120 */ 121 public MSH getMSH() { 122 return getTyped("MSH", MSH.class); 123 } 124 125 126 127 128 129 /** 130 * <p> 131 * Returns 132 * the first repetition of 133 * SFT (Software Segment) - creates it if necessary 134 * </p> 135 * 136 * 137 */ 138 public SFT getSFT() { 139 return getTyped("SFT", SFT.class); 140 } 141 142 143 /** 144 * <p> 145 * Returns a specific repetition of 146 * SFT (Software Segment) - creates it if necessary 147 * </p> 148 * 149 * 150 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 151 * @throws HL7Exception if the repetition requested is more than one 152 * greater than the number of existing repetitions. 153 */ 154 public SFT getSFT(int rep) { 155 return getTyped("SFT", rep, SFT.class); 156 } 157 158 /** 159 * <p> 160 * Returns the number of existing repetitions of SFT 161 * </p> 162 * 163 */ 164 public int getSFTReps() { 165 return getReps("SFT"); 166 } 167 168 /** 169 * <p> 170 * Returns a non-modifiable List containing all current existing repetitions of SFT. 171 * <p> 172 * <p> 173 * Note that unlike {@link #getSFT()}, this method will not create any reps 174 * if none are already present, so an empty list may be returned. 175 * </p> 176 * 177 */ 178 public java.util.List<SFT> getSFTAll() throws HL7Exception { 179 return getAllAsList("SFT", SFT.class); 180 } 181 182 /** 183 * <p> 184 * Inserts a specific repetition of SFT (Software Segment) 185 * </p> 186 * 187 * 188 * @see AbstractGroup#insertRepetition(Structure, int) 189 */ 190 public void insertSFT(SFT structure, int rep) throws HL7Exception { 191 super.insertRepetition( "SFT", structure, rep); 192 } 193 194 195 /** 196 * <p> 197 * Inserts a specific repetition of SFT (Software Segment) 198 * </p> 199 * 200 * 201 * @see AbstractGroup#insertRepetition(Structure, int) 202 */ 203 public SFT insertSFT(int rep) throws HL7Exception { 204 return (SFT)super.insertRepetition("SFT", rep); 205 } 206 207 208 /** 209 * <p> 210 * Removes a specific repetition of SFT (Software Segment) 211 * </p> 212 * 213 * 214 * @see AbstractGroup#removeRepetition(String, int) 215 */ 216 public SFT removeSFT(int rep) throws HL7Exception { 217 return (SFT)super.removeRepetition("SFT", rep); 218 } 219 220 221 222 223 /** 224 * <p> 225 * Returns 226 * the first repetition of 227 * UAC (User Authentication Credential Segment) - creates it if necessary 228 * </p> 229 * 230 * 231 */ 232 public UAC getUAC() { 233 return getTyped("UAC", UAC.class); 234 } 235 236 237 /** 238 * <p> 239 * Returns a specific repetition of 240 * UAC (User Authentication Credential Segment) - creates it if necessary 241 * </p> 242 * 243 * 244 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 245 * @throws HL7Exception if the repetition requested is more than one 246 * greater than the number of existing repetitions. 247 */ 248 public UAC getUAC(int rep) { 249 return getTyped("UAC", rep, UAC.class); 250 } 251 252 /** 253 * <p> 254 * Returns the number of existing repetitions of UAC 255 * </p> 256 * 257 */ 258 public int getUACReps() { 259 return getReps("UAC"); 260 } 261 262 /** 263 * <p> 264 * Returns a non-modifiable List containing all current existing repetitions of UAC. 265 * <p> 266 * <p> 267 * Note that unlike {@link #getUAC()}, this method will not create any reps 268 * if none are already present, so an empty list may be returned. 269 * </p> 270 * 271 */ 272 public java.util.List<UAC> getUACAll() throws HL7Exception { 273 return getAllAsList("UAC", UAC.class); 274 } 275 276 /** 277 * <p> 278 * Inserts a specific repetition of UAC (User Authentication Credential Segment) 279 * </p> 280 * 281 * 282 * @see AbstractGroup#insertRepetition(Structure, int) 283 */ 284 public void insertUAC(UAC structure, int rep) throws HL7Exception { 285 super.insertRepetition( "UAC", structure, rep); 286 } 287 288 289 /** 290 * <p> 291 * Inserts a specific repetition of UAC (User Authentication Credential Segment) 292 * </p> 293 * 294 * 295 * @see AbstractGroup#insertRepetition(Structure, int) 296 */ 297 public UAC insertUAC(int rep) throws HL7Exception { 298 return (UAC)super.insertRepetition("UAC", rep); 299 } 300 301 302 /** 303 * <p> 304 * Removes a specific repetition of UAC (User Authentication Credential Segment) 305 * </p> 306 * 307 * 308 * @see AbstractGroup#removeRepetition(String, int) 309 */ 310 public UAC removeUAC(int rep) throws HL7Exception { 311 return (UAC)super.removeRepetition("UAC", rep); 312 } 313 314 315 316 317 /** 318 * <p> 319 * Returns 320 * MSA (Message Acknowledgment) - creates it if necessary 321 * </p> 322 * 323 * 324 */ 325 public MSA getMSA() { 326 return getTyped("MSA", MSA.class); 327 } 328 329 330 331 332 333 /** 334 * <p> 335 * Returns 336 * the first repetition of 337 * ERR (Error) - creates it if necessary 338 * </p> 339 * 340 * 341 */ 342 public ERR getERR() { 343 return getTyped("ERR", ERR.class); 344 } 345 346 347 /** 348 * <p> 349 * Returns a specific repetition of 350 * ERR (Error) - creates it if necessary 351 * </p> 352 * 353 * 354 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 355 * @throws HL7Exception if the repetition requested is more than one 356 * greater than the number of existing repetitions. 357 */ 358 public ERR getERR(int rep) { 359 return getTyped("ERR", rep, ERR.class); 360 } 361 362 /** 363 * <p> 364 * Returns the number of existing repetitions of ERR 365 * </p> 366 * 367 */ 368 public int getERRReps() { 369 return getReps("ERR"); 370 } 371 372 /** 373 * <p> 374 * Returns a non-modifiable List containing all current existing repetitions of ERR. 375 * <p> 376 * <p> 377 * Note that unlike {@link #getERR()}, this method will not create any reps 378 * if none are already present, so an empty list may be returned. 379 * </p> 380 * 381 */ 382 public java.util.List<ERR> getERRAll() throws HL7Exception { 383 return getAllAsList("ERR", ERR.class); 384 } 385 386 /** 387 * <p> 388 * Inserts a specific repetition of ERR (Error) 389 * </p> 390 * 391 * 392 * @see AbstractGroup#insertRepetition(Structure, int) 393 */ 394 public void insertERR(ERR structure, int rep) throws HL7Exception { 395 super.insertRepetition( "ERR", structure, rep); 396 } 397 398 399 /** 400 * <p> 401 * Inserts a specific repetition of ERR (Error) 402 * </p> 403 * 404 * 405 * @see AbstractGroup#insertRepetition(Structure, int) 406 */ 407 public ERR insertERR(int rep) throws HL7Exception { 408 return (ERR)super.insertRepetition("ERR", rep); 409 } 410 411 412 /** 413 * <p> 414 * Removes a specific repetition of ERR (Error) 415 * </p> 416 * 417 * 418 * @see AbstractGroup#removeRepetition(String, int) 419 */ 420 public ERR removeERR(int rep) throws HL7Exception { 421 return (ERR)super.removeRepetition("ERR", rep); 422 } 423 424 425 426 427 /** 428 * <p> 429 * Returns 430 * RFI (Request for Information) - creates it if necessary 431 * </p> 432 * 433 * 434 */ 435 public RFI getRFI() { 436 return getTyped("RFI", RFI.class); 437 } 438 439 440 441 442 443 /** 444 * <p> 445 * Returns 446 * the first repetition of 447 * CTD (Contact Data) - creates it if necessary 448 * </p> 449 * 450 * 451 */ 452 public CTD getCTD() { 453 return getTyped("CTD", CTD.class); 454 } 455 456 457 /** 458 * <p> 459 * Returns a specific repetition of 460 * CTD (Contact Data) - creates it if necessary 461 * </p> 462 * 463 * 464 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 465 * @throws HL7Exception if the repetition requested is more than one 466 * greater than the number of existing repetitions. 467 */ 468 public CTD getCTD(int rep) { 469 return getTyped("CTD", rep, CTD.class); 470 } 471 472 /** 473 * <p> 474 * Returns the number of existing repetitions of CTD 475 * </p> 476 * 477 */ 478 public int getCTDReps() { 479 return getReps("CTD"); 480 } 481 482 /** 483 * <p> 484 * Returns a non-modifiable List containing all current existing repetitions of CTD. 485 * <p> 486 * <p> 487 * Note that unlike {@link #getCTD()}, this method will not create any reps 488 * if none are already present, so an empty list may be returned. 489 * </p> 490 * 491 */ 492 public java.util.List<CTD> getCTDAll() throws HL7Exception { 493 return getAllAsList("CTD", CTD.class); 494 } 495 496 /** 497 * <p> 498 * Inserts a specific repetition of CTD (Contact Data) 499 * </p> 500 * 501 * 502 * @see AbstractGroup#insertRepetition(Structure, int) 503 */ 504 public void insertCTD(CTD structure, int rep) throws HL7Exception { 505 super.insertRepetition( "CTD", structure, rep); 506 } 507 508 509 /** 510 * <p> 511 * Inserts a specific repetition of CTD (Contact Data) 512 * </p> 513 * 514 * 515 * @see AbstractGroup#insertRepetition(Structure, int) 516 */ 517 public CTD insertCTD(int rep) throws HL7Exception { 518 return (CTD)super.insertRepetition("CTD", rep); 519 } 520 521 522 /** 523 * <p> 524 * Removes a specific repetition of CTD (Contact Data) 525 * </p> 526 * 527 * 528 * @see AbstractGroup#removeRepetition(String, int) 529 */ 530 public CTD removeCTD(int rep) throws HL7Exception { 531 return (CTD)super.removeRepetition("CTD", rep); 532 } 533 534 535 536 537 /** 538 * <p> 539 * Returns 540 * IVC (Invoice Segment) - creates it if necessary 541 * </p> 542 * 543 * 544 */ 545 public IVC getIVC() { 546 return getTyped("IVC", IVC.class); 547 } 548 549 550 551 552 553 /** 554 * <p> 555 * Returns 556 * PSS (Product/Service Section) - creates it if necessary 557 * </p> 558 * 559 * 560 */ 561 public PSS getPSS() { 562 return getTyped("PSS", PSS.class); 563 } 564 565 566 567 568 569 /** 570 * <p> 571 * Returns 572 * PSG (Product/Service Group) - creates it if necessary 573 * </p> 574 * 575 * 576 */ 577 public PSG getPSG() { 578 return getTyped("PSG", PSG.class); 579 } 580 581 582 583 584 585 /** 586 * <p> 587 * Returns 588 * PID (Patient Identification) - creates it if necessary 589 * </p> 590 * 591 * 592 */ 593 public PID getPID() { 594 return getTyped("PID", PID.class); 595 } 596 597 598 599 600 601 /** 602 * <p> 603 * Returns 604 * PSL (Product/Service Line Item) - creates it if necessary 605 * </p> 606 * 607 * 608 */ 609 public PSL getPSL() { 610 return getTyped("PSL", PSL.class); 611 } 612 613 614 615 616 617 /** 618 * <p> 619 * Returns 620 * the first repetition of 621 * REQUEST (a Group object) - creates it if necessary 622 * </p> 623 * 624 * 625 */ 626 public EHC_E13_REQUEST getREQUEST() { 627 return getTyped("REQUEST", EHC_E13_REQUEST.class); 628 } 629 630 631 /** 632 * <p> 633 * Returns a specific repetition of 634 * REQUEST (a Group object) - creates it if necessary 635 * </p> 636 * 637 * 638 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 639 * @throws HL7Exception if the repetition requested is more than one 640 * greater than the number of existing repetitions. 641 */ 642 public EHC_E13_REQUEST getREQUEST(int rep) { 643 return getTyped("REQUEST", rep, EHC_E13_REQUEST.class); 644 } 645 646 /** 647 * <p> 648 * Returns the number of existing repetitions of REQUEST 649 * </p> 650 * 651 */ 652 public int getREQUESTReps() { 653 return getReps("REQUEST"); 654 } 655 656 /** 657 * <p> 658 * Returns a non-modifiable List containing all current existing repetitions of REQUEST. 659 * <p> 660 * <p> 661 * Note that unlike {@link #getREQUEST()}, this method will not create any reps 662 * if none are already present, so an empty list may be returned. 663 * </p> 664 * 665 */ 666 public java.util.List<EHC_E13_REQUEST> getREQUESTAll() throws HL7Exception { 667 return getAllAsList("REQUEST", EHC_E13_REQUEST.class); 668 } 669 670 /** 671 * <p> 672 * Inserts a specific repetition of REQUEST (a Group object) 673 * </p> 674 * 675 * 676 * @see AbstractGroup#insertRepetition(Structure, int) 677 */ 678 public void insertREQUEST(EHC_E13_REQUEST structure, int rep) throws HL7Exception { 679 super.insertRepetition( "REQUEST", structure, rep); 680 } 681 682 683 /** 684 * <p> 685 * Inserts a specific repetition of REQUEST (a Group object) 686 * </p> 687 * 688 * 689 * @see AbstractGroup#insertRepetition(Structure, int) 690 */ 691 public EHC_E13_REQUEST insertREQUEST(int rep) throws HL7Exception { 692 return (EHC_E13_REQUEST)super.insertRepetition("REQUEST", rep); 693 } 694 695 696 /** 697 * <p> 698 * Removes a specific repetition of REQUEST (a Group object) 699 * </p> 700 * 701 * 702 * @see AbstractGroup#removeRepetition(String, int) 703 */ 704 public EHC_E13_REQUEST removeREQUEST(int rep) throws HL7Exception { 705 return (EHC_E13_REQUEST)super.removeRepetition("REQUEST", rep); 706 } 707 708 709 710} 711