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.v24.message; 035 036import ca.uhn.hl7v2.model.v24.group.*; 037import ca.uhn.hl7v2.model.v24.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 ADT_A05 message structure (see chapter 3). This structure contains the 048 * following elements: </p> 049 * <ul> 050 * <li>1: MSH (Message Header) <b> </b></li> 051 * <li>2: EVN (Event Type) <b> </b></li> 052 * <li>3: PID (Patient identification) <b> </b></li> 053 * <li>4: PD1 (patient additional demographic) <b>optional </b></li> 054 * <li>5: ROL (Role) <b>optional repeating</b></li> 055 * <li>6: NK1 (Next of kin / associated parties) <b>optional repeating</b></li> 056 * <li>7: PV1 (Patient visit) <b> </b></li> 057 * <li>8: PV2 (Patient visit - additional information) <b>optional </b></li> 058 * <li>9: ROL (Role) <b>optional repeating</b></li> 059 * <li>10: DB1 (Disability) <b>optional repeating</b></li> 060 * <li>11: OBX (Observation/Result) <b>optional repeating</b></li> 061 * <li>12: AL1 (Patient allergy information) <b>optional repeating</b></li> 062 * <li>13: DG1 (Diagnosis) <b>optional repeating</b></li> 063 * <li>14: DRG (Diagnosis Related Group) <b>optional </b></li> 064 * <li>15: ADT_A05_PROCEDURE (a Group object) <b>optional repeating</b></li> 065 * <li>16: GT1 (Guarantor) <b>optional repeating</b></li> 066 * <li>17: ADT_A05_INSURANCE (a Group object) <b>optional repeating</b></li> 067 * <li>18: ACC (Accident) <b>optional </b></li> 068 * <li>19: UB1 (UB82) <b>optional </b></li> 069 * <li>20: UB2 (UB92 Data) <b>optional </b></li> 070 * </ul> 071 */ 072@SuppressWarnings("unused") 073public class ADT_A05 extends AbstractMessage { 074 075 /** 076 * Creates a new ADT_A05 message with DefaultModelClassFactory. 077 */ 078 public ADT_A05() { 079 this(new DefaultModelClassFactory()); 080 } 081 082 /** 083 * Creates a new ADT_A05 message with custom ModelClassFactory. 084 */ 085 public ADT_A05(ModelClassFactory factory) { 086 super(factory); 087 init(factory); 088 } 089 090 private void init(ModelClassFactory factory) { 091 try { 092 this.add(MSH.class, true, false); 093 this.add(EVN.class, true, false); 094 this.add(PID.class, true, false); 095 this.add(PD1.class, false, false); 096 this.add(ROL.class, false, true); 097 this.add(NK1.class, false, true); 098 this.add(PV1.class, true, false); 099 this.add(PV2.class, false, false); 100 this.add(ROL.class, false, true); 101 this.add(DB1.class, false, true); 102 this.add(OBX.class, false, true); 103 this.add(AL1.class, false, true); 104 this.add(DG1.class, false, true); 105 this.add(DRG.class, false, false); 106 this.add(ADT_A05_PROCEDURE.class, false, true); 107 this.add(GT1.class, false, true); 108 this.add(ADT_A05_INSURANCE.class, false, true); 109 this.add(ACC.class, false, false); 110 this.add(UB1.class, false, false); 111 this.add(UB2.class, false, false); 112 } catch(HL7Exception e) { 113 log.error("Unexpected error creating ADT_A05 - this is probably a bug in the source code generator.", e); 114 } 115 } 116 117 /** 118 * Returns "2.4" 119 */ 120 public String getVersion() { 121 return "2.4"; 122 } 123 124 125 126 /** 127 * Returns 128 * MSH (Message Header) - creates it if necessary 129 */ 130 public MSH getMSH() { 131 return getTyped("MSH", MSH.class); 132 } 133 134 135 136 137 /** 138 * Returns 139 * EVN (Event Type) - creates it if necessary 140 */ 141 public EVN getEVN() { 142 return getTyped("EVN", EVN.class); 143 } 144 145 146 147 148 /** 149 * Returns 150 * PID (Patient identification) - creates it if necessary 151 */ 152 public PID getPID() { 153 return getTyped("PID", PID.class); 154 } 155 156 157 158 159 /** 160 * Returns 161 * PD1 (patient additional demographic) - creates it if necessary 162 */ 163 public PD1 getPD1() { 164 return getTyped("PD1", PD1.class); 165 } 166 167 168 169 170 /** 171 * Returns 172 * the first repetition of 173 * ROL (Role) - creates it if necessary 174 */ 175 public ROL getROL() { 176 return getTyped("ROL", ROL.class); 177 } 178 179 180 /** 181 * Returns a specific repetition of 182 * ROL (Role) - creates it if necessary 183 * 184 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 185 * @throws HL7Exception if the repetition requested is more than one 186 * greater than the number of existing repetitions. 187 */ 188 public ROL getROL(int rep) { 189 return getTyped("ROL", rep, ROL.class); 190 } 191 192 /** 193 * Returns the number of existing repetitions of ROL 194 */ 195 public int getROLReps() { 196 return getReps("ROL"); 197 } 198 199 /** 200 * <p> 201 * Returns a non-modifiable List containing all current existing repetitions of ROL. 202 * <p> 203 * <p> 204 * Note that unlike {@link #getROL()}, this method will not create any reps 205 * if none are already present, so an empty list may be returned. 206 * </p> 207 */ 208 public List<ROL> getROLAll() throws HL7Exception { 209 return getAllAsList("ROL", ROL.class); 210 } 211 212 /** 213 * Inserts a specific repetition of ROL (Role) 214 * @see AbstractGroup#insertRepetition(Structure, int) 215 */ 216 public void insertROL(ROL structure, int rep) throws HL7Exception { 217 super.insertRepetition( "ROL", structure, rep); 218 } 219 220 221 /** 222 * Inserts a specific repetition of ROL (Role) 223 * @see AbstractGroup#insertRepetition(Structure, int) 224 */ 225 public ROL insertROL(int rep) throws HL7Exception { 226 return (ROL)super.insertRepetition("ROL", rep); 227 } 228 229 230 /** 231 * Removes a specific repetition of ROL (Role) 232 * @see AbstractGroup#removeRepetition(String, int) 233 */ 234 public ROL removeROL(int rep) throws HL7Exception { 235 return (ROL)super.removeRepetition("ROL", rep); 236 } 237 238 239 240 /** 241 * Returns 242 * the first repetition of 243 * NK1 (Next of kin / associated parties) - creates it if necessary 244 */ 245 public NK1 getNK1() { 246 return getTyped("NK1", NK1.class); 247 } 248 249 250 /** 251 * Returns a specific repetition of 252 * NK1 (Next of kin / associated parties) - creates it if necessary 253 * 254 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 255 * @throws HL7Exception if the repetition requested is more than one 256 * greater than the number of existing repetitions. 257 */ 258 public NK1 getNK1(int rep) { 259 return getTyped("NK1", rep, NK1.class); 260 } 261 262 /** 263 * Returns the number of existing repetitions of NK1 264 */ 265 public int getNK1Reps() { 266 return getReps("NK1"); 267 } 268 269 /** 270 * <p> 271 * Returns a non-modifiable List containing all current existing repetitions of NK1. 272 * <p> 273 * <p> 274 * Note that unlike {@link #getNK1()}, this method will not create any reps 275 * if none are already present, so an empty list may be returned. 276 * </p> 277 */ 278 public List<NK1> getNK1All() throws HL7Exception { 279 return getAllAsList("NK1", NK1.class); 280 } 281 282 /** 283 * Inserts a specific repetition of NK1 (Next of kin / associated parties) 284 * @see AbstractGroup#insertRepetition(Structure, int) 285 */ 286 public void insertNK1(NK1 structure, int rep) throws HL7Exception { 287 super.insertRepetition( "NK1", structure, rep); 288 } 289 290 291 /** 292 * Inserts a specific repetition of NK1 (Next of kin / associated parties) 293 * @see AbstractGroup#insertRepetition(Structure, int) 294 */ 295 public NK1 insertNK1(int rep) throws HL7Exception { 296 return (NK1)super.insertRepetition("NK1", rep); 297 } 298 299 300 /** 301 * Removes a specific repetition of NK1 (Next of kin / associated parties) 302 * @see AbstractGroup#removeRepetition(String, int) 303 */ 304 public NK1 removeNK1(int rep) throws HL7Exception { 305 return (NK1)super.removeRepetition("NK1", rep); 306 } 307 308 309 310 /** 311 * Returns 312 * PV1 (Patient visit) - creates it if necessary 313 */ 314 public PV1 getPV1() { 315 return getTyped("PV1", PV1.class); 316 } 317 318 319 320 321 /** 322 * Returns 323 * PV2 (Patient visit - additional information) - creates it if necessary 324 */ 325 public PV2 getPV2() { 326 return getTyped("PV2", PV2.class); 327 } 328 329 330 331 332 /** 333 * Returns 334 * the first repetition of 335 * ROL2 (Role) - creates it if necessary 336 */ 337 public ROL getROL2() { 338 return getTyped("ROL2", ROL.class); 339 } 340 341 342 /** 343 * Returns a specific repetition of 344 * ROL2 (Role) - creates it if necessary 345 * 346 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 347 * @throws HL7Exception if the repetition requested is more than one 348 * greater than the number of existing repetitions. 349 */ 350 public ROL getROL2(int rep) { 351 return getTyped("ROL2", rep, ROL.class); 352 } 353 354 /** 355 * Returns the number of existing repetitions of ROL2 356 */ 357 public int getROL2Reps() { 358 return getReps("ROL2"); 359 } 360 361 /** 362 * <p> 363 * Returns a non-modifiable List containing all current existing repetitions of ROL2. 364 * <p> 365 * <p> 366 * Note that unlike {@link #getROL2()}, this method will not create any reps 367 * if none are already present, so an empty list may be returned. 368 * </p> 369 */ 370 public List<ROL> getROL2All() throws HL7Exception { 371 return getAllAsList("ROL2", ROL.class); 372 } 373 374 /** 375 * Inserts a specific repetition of ROL2 (Role) 376 * @see AbstractGroup#insertRepetition(Structure, int) 377 */ 378 public void insertROL2(ROL structure, int rep) throws HL7Exception { 379 super.insertRepetition( "ROL2", structure, rep); 380 } 381 382 383 /** 384 * Inserts a specific repetition of ROL2 (Role) 385 * @see AbstractGroup#insertRepetition(Structure, int) 386 */ 387 public ROL insertROL2(int rep) throws HL7Exception { 388 return (ROL)super.insertRepetition("ROL2", rep); 389 } 390 391 392 /** 393 * Removes a specific repetition of ROL2 (Role) 394 * @see AbstractGroup#removeRepetition(String, int) 395 */ 396 public ROL removeROL2(int rep) throws HL7Exception { 397 return (ROL)super.removeRepetition("ROL2", rep); 398 } 399 400 401 402 /** 403 * Returns 404 * the first repetition of 405 * DB1 (Disability) - creates it if necessary 406 */ 407 public DB1 getDB1() { 408 return getTyped("DB1", DB1.class); 409 } 410 411 412 /** 413 * Returns a specific repetition of 414 * DB1 (Disability) - creates it if necessary 415 * 416 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 417 * @throws HL7Exception if the repetition requested is more than one 418 * greater than the number of existing repetitions. 419 */ 420 public DB1 getDB1(int rep) { 421 return getTyped("DB1", rep, DB1.class); 422 } 423 424 /** 425 * Returns the number of existing repetitions of DB1 426 */ 427 public int getDB1Reps() { 428 return getReps("DB1"); 429 } 430 431 /** 432 * <p> 433 * Returns a non-modifiable List containing all current existing repetitions of DB1. 434 * <p> 435 * <p> 436 * Note that unlike {@link #getDB1()}, this method will not create any reps 437 * if none are already present, so an empty list may be returned. 438 * </p> 439 */ 440 public List<DB1> getDB1All() throws HL7Exception { 441 return getAllAsList("DB1", DB1.class); 442 } 443 444 /** 445 * Inserts a specific repetition of DB1 (Disability) 446 * @see AbstractGroup#insertRepetition(Structure, int) 447 */ 448 public void insertDB1(DB1 structure, int rep) throws HL7Exception { 449 super.insertRepetition( "DB1", structure, rep); 450 } 451 452 453 /** 454 * Inserts a specific repetition of DB1 (Disability) 455 * @see AbstractGroup#insertRepetition(Structure, int) 456 */ 457 public DB1 insertDB1(int rep) throws HL7Exception { 458 return (DB1)super.insertRepetition("DB1", rep); 459 } 460 461 462 /** 463 * Removes a specific repetition of DB1 (Disability) 464 * @see AbstractGroup#removeRepetition(String, int) 465 */ 466 public DB1 removeDB1(int rep) throws HL7Exception { 467 return (DB1)super.removeRepetition("DB1", rep); 468 } 469 470 471 472 /** 473 * Returns 474 * the first repetition of 475 * OBX (Observation/Result) - creates it if necessary 476 */ 477 public OBX getOBX() { 478 return getTyped("OBX", OBX.class); 479 } 480 481 482 /** 483 * Returns a specific repetition of 484 * OBX (Observation/Result) - creates it if necessary 485 * 486 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 487 * @throws HL7Exception if the repetition requested is more than one 488 * greater than the number of existing repetitions. 489 */ 490 public OBX getOBX(int rep) { 491 return getTyped("OBX", rep, OBX.class); 492 } 493 494 /** 495 * Returns the number of existing repetitions of OBX 496 */ 497 public int getOBXReps() { 498 return getReps("OBX"); 499 } 500 501 /** 502 * <p> 503 * Returns a non-modifiable List containing all current existing repetitions of OBX. 504 * <p> 505 * <p> 506 * Note that unlike {@link #getOBX()}, this method will not create any reps 507 * if none are already present, so an empty list may be returned. 508 * </p> 509 */ 510 public List<OBX> getOBXAll() throws HL7Exception { 511 return getAllAsList("OBX", OBX.class); 512 } 513 514 /** 515 * Inserts a specific repetition of OBX (Observation/Result) 516 * @see AbstractGroup#insertRepetition(Structure, int) 517 */ 518 public void insertOBX(OBX structure, int rep) throws HL7Exception { 519 super.insertRepetition( "OBX", structure, rep); 520 } 521 522 523 /** 524 * Inserts a specific repetition of OBX (Observation/Result) 525 * @see AbstractGroup#insertRepetition(Structure, int) 526 */ 527 public OBX insertOBX(int rep) throws HL7Exception { 528 return (OBX)super.insertRepetition("OBX", rep); 529 } 530 531 532 /** 533 * Removes a specific repetition of OBX (Observation/Result) 534 * @see AbstractGroup#removeRepetition(String, int) 535 */ 536 public OBX removeOBX(int rep) throws HL7Exception { 537 return (OBX)super.removeRepetition("OBX", rep); 538 } 539 540 541 542 /** 543 * Returns 544 * the first repetition of 545 * AL1 (Patient allergy information) - creates it if necessary 546 */ 547 public AL1 getAL1() { 548 return getTyped("AL1", AL1.class); 549 } 550 551 552 /** 553 * Returns a specific repetition of 554 * AL1 (Patient allergy information) - creates it if necessary 555 * 556 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 557 * @throws HL7Exception if the repetition requested is more than one 558 * greater than the number of existing repetitions. 559 */ 560 public AL1 getAL1(int rep) { 561 return getTyped("AL1", rep, AL1.class); 562 } 563 564 /** 565 * Returns the number of existing repetitions of AL1 566 */ 567 public int getAL1Reps() { 568 return getReps("AL1"); 569 } 570 571 /** 572 * <p> 573 * Returns a non-modifiable List containing all current existing repetitions of AL1. 574 * <p> 575 * <p> 576 * Note that unlike {@link #getAL1()}, this method will not create any reps 577 * if none are already present, so an empty list may be returned. 578 * </p> 579 */ 580 public List<AL1> getAL1All() throws HL7Exception { 581 return getAllAsList("AL1", AL1.class); 582 } 583 584 /** 585 * Inserts a specific repetition of AL1 (Patient allergy information) 586 * @see AbstractGroup#insertRepetition(Structure, int) 587 */ 588 public void insertAL1(AL1 structure, int rep) throws HL7Exception { 589 super.insertRepetition( "AL1", structure, rep); 590 } 591 592 593 /** 594 * Inserts a specific repetition of AL1 (Patient allergy information) 595 * @see AbstractGroup#insertRepetition(Structure, int) 596 */ 597 public AL1 insertAL1(int rep) throws HL7Exception { 598 return (AL1)super.insertRepetition("AL1", rep); 599 } 600 601 602 /** 603 * Removes a specific repetition of AL1 (Patient allergy information) 604 * @see AbstractGroup#removeRepetition(String, int) 605 */ 606 public AL1 removeAL1(int rep) throws HL7Exception { 607 return (AL1)super.removeRepetition("AL1", rep); 608 } 609 610 611 612 /** 613 * Returns 614 * the first repetition of 615 * DG1 (Diagnosis) - creates it if necessary 616 */ 617 public DG1 getDG1() { 618 return getTyped("DG1", DG1.class); 619 } 620 621 622 /** 623 * Returns a specific repetition of 624 * DG1 (Diagnosis) - creates it if necessary 625 * 626 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 627 * @throws HL7Exception if the repetition requested is more than one 628 * greater than the number of existing repetitions. 629 */ 630 public DG1 getDG1(int rep) { 631 return getTyped("DG1", rep, DG1.class); 632 } 633 634 /** 635 * Returns the number of existing repetitions of DG1 636 */ 637 public int getDG1Reps() { 638 return getReps("DG1"); 639 } 640 641 /** 642 * <p> 643 * Returns a non-modifiable List containing all current existing repetitions of DG1. 644 * <p> 645 * <p> 646 * Note that unlike {@link #getDG1()}, this method will not create any reps 647 * if none are already present, so an empty list may be returned. 648 * </p> 649 */ 650 public List<DG1> getDG1All() throws HL7Exception { 651 return getAllAsList("DG1", DG1.class); 652 } 653 654 /** 655 * Inserts a specific repetition of DG1 (Diagnosis) 656 * @see AbstractGroup#insertRepetition(Structure, int) 657 */ 658 public void insertDG1(DG1 structure, int rep) throws HL7Exception { 659 super.insertRepetition( "DG1", structure, rep); 660 } 661 662 663 /** 664 * Inserts a specific repetition of DG1 (Diagnosis) 665 * @see AbstractGroup#insertRepetition(Structure, int) 666 */ 667 public DG1 insertDG1(int rep) throws HL7Exception { 668 return (DG1)super.insertRepetition("DG1", rep); 669 } 670 671 672 /** 673 * Removes a specific repetition of DG1 (Diagnosis) 674 * @see AbstractGroup#removeRepetition(String, int) 675 */ 676 public DG1 removeDG1(int rep) throws HL7Exception { 677 return (DG1)super.removeRepetition("DG1", rep); 678 } 679 680 681 682 /** 683 * Returns 684 * DRG (Diagnosis Related Group) - creates it if necessary 685 */ 686 public DRG getDRG() { 687 return getTyped("DRG", DRG.class); 688 } 689 690 691 692 693 /** 694 * Returns 695 * the first repetition of 696 * PROCEDURE (a Group object) - creates it if necessary 697 */ 698 public ADT_A05_PROCEDURE getPROCEDURE() { 699 return getTyped("PROCEDURE", ADT_A05_PROCEDURE.class); 700 } 701 702 703 /** 704 * Returns a specific repetition of 705 * PROCEDURE (a Group object) - creates it if necessary 706 * 707 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 708 * @throws HL7Exception if the repetition requested is more than one 709 * greater than the number of existing repetitions. 710 */ 711 public ADT_A05_PROCEDURE getPROCEDURE(int rep) { 712 return getTyped("PROCEDURE", rep, ADT_A05_PROCEDURE.class); 713 } 714 715 /** 716 * Returns the number of existing repetitions of PROCEDURE 717 */ 718 public int getPROCEDUREReps() { 719 return getReps("PROCEDURE"); 720 } 721 722 /** 723 * <p> 724 * Returns a non-modifiable List containing all current existing repetitions of PROCEDURE. 725 * <p> 726 * <p> 727 * Note that unlike {@link #getPROCEDURE()}, this method will not create any reps 728 * if none are already present, so an empty list may be returned. 729 * </p> 730 */ 731 public List<ADT_A05_PROCEDURE> getPROCEDUREAll() throws HL7Exception { 732 return getAllAsList("PROCEDURE", ADT_A05_PROCEDURE.class); 733 } 734 735 /** 736 * Inserts a specific repetition of PROCEDURE (a Group object) 737 * @see AbstractGroup#insertRepetition(Structure, int) 738 */ 739 public void insertPROCEDURE(ADT_A05_PROCEDURE structure, int rep) throws HL7Exception { 740 super.insertRepetition( "PROCEDURE", structure, rep); 741 } 742 743 744 /** 745 * Inserts a specific repetition of PROCEDURE (a Group object) 746 * @see AbstractGroup#insertRepetition(Structure, int) 747 */ 748 public ADT_A05_PROCEDURE insertPROCEDURE(int rep) throws HL7Exception { 749 return (ADT_A05_PROCEDURE)super.insertRepetition("PROCEDURE", rep); 750 } 751 752 753 /** 754 * Removes a specific repetition of PROCEDURE (a Group object) 755 * @see AbstractGroup#removeRepetition(String, int) 756 */ 757 public ADT_A05_PROCEDURE removePROCEDURE(int rep) throws HL7Exception { 758 return (ADT_A05_PROCEDURE)super.removeRepetition("PROCEDURE", rep); 759 } 760 761 762 763 /** 764 * Returns 765 * the first repetition of 766 * GT1 (Guarantor) - creates it if necessary 767 */ 768 public GT1 getGT1() { 769 return getTyped("GT1", GT1.class); 770 } 771 772 773 /** 774 * Returns a specific repetition of 775 * GT1 (Guarantor) - creates it if necessary 776 * 777 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 778 * @throws HL7Exception if the repetition requested is more than one 779 * greater than the number of existing repetitions. 780 */ 781 public GT1 getGT1(int rep) { 782 return getTyped("GT1", rep, GT1.class); 783 } 784 785 /** 786 * Returns the number of existing repetitions of GT1 787 */ 788 public int getGT1Reps() { 789 return getReps("GT1"); 790 } 791 792 /** 793 * <p> 794 * Returns a non-modifiable List containing all current existing repetitions of GT1. 795 * <p> 796 * <p> 797 * Note that unlike {@link #getGT1()}, this method will not create any reps 798 * if none are already present, so an empty list may be returned. 799 * </p> 800 */ 801 public List<GT1> getGT1All() throws HL7Exception { 802 return getAllAsList("GT1", GT1.class); 803 } 804 805 /** 806 * Inserts a specific repetition of GT1 (Guarantor) 807 * @see AbstractGroup#insertRepetition(Structure, int) 808 */ 809 public void insertGT1(GT1 structure, int rep) throws HL7Exception { 810 super.insertRepetition( "GT1", structure, rep); 811 } 812 813 814 /** 815 * Inserts a specific repetition of GT1 (Guarantor) 816 * @see AbstractGroup#insertRepetition(Structure, int) 817 */ 818 public GT1 insertGT1(int rep) throws HL7Exception { 819 return (GT1)super.insertRepetition("GT1", rep); 820 } 821 822 823 /** 824 * Removes a specific repetition of GT1 (Guarantor) 825 * @see AbstractGroup#removeRepetition(String, int) 826 */ 827 public GT1 removeGT1(int rep) throws HL7Exception { 828 return (GT1)super.removeRepetition("GT1", rep); 829 } 830 831 832 833 /** 834 * Returns 835 * the first repetition of 836 * INSURANCE (a Group object) - creates it if necessary 837 */ 838 public ADT_A05_INSURANCE getINSURANCE() { 839 return getTyped("INSURANCE", ADT_A05_INSURANCE.class); 840 } 841 842 843 /** 844 * Returns a specific repetition of 845 * INSURANCE (a Group object) - creates it if necessary 846 * 847 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 848 * @throws HL7Exception if the repetition requested is more than one 849 * greater than the number of existing repetitions. 850 */ 851 public ADT_A05_INSURANCE getINSURANCE(int rep) { 852 return getTyped("INSURANCE", rep, ADT_A05_INSURANCE.class); 853 } 854 855 /** 856 * Returns the number of existing repetitions of INSURANCE 857 */ 858 public int getINSURANCEReps() { 859 return getReps("INSURANCE"); 860 } 861 862 /** 863 * <p> 864 * Returns a non-modifiable List containing all current existing repetitions of INSURANCE. 865 * <p> 866 * <p> 867 * Note that unlike {@link #getINSURANCE()}, this method will not create any reps 868 * if none are already present, so an empty list may be returned. 869 * </p> 870 */ 871 public List<ADT_A05_INSURANCE> getINSURANCEAll() throws HL7Exception { 872 return getAllAsList("INSURANCE", ADT_A05_INSURANCE.class); 873 } 874 875 /** 876 * Inserts a specific repetition of INSURANCE (a Group object) 877 * @see AbstractGroup#insertRepetition(Structure, int) 878 */ 879 public void insertINSURANCE(ADT_A05_INSURANCE structure, int rep) throws HL7Exception { 880 super.insertRepetition( "INSURANCE", structure, rep); 881 } 882 883 884 /** 885 * Inserts a specific repetition of INSURANCE (a Group object) 886 * @see AbstractGroup#insertRepetition(Structure, int) 887 */ 888 public ADT_A05_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 889 return (ADT_A05_INSURANCE)super.insertRepetition("INSURANCE", rep); 890 } 891 892 893 /** 894 * Removes a specific repetition of INSURANCE (a Group object) 895 * @see AbstractGroup#removeRepetition(String, int) 896 */ 897 public ADT_A05_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 898 return (ADT_A05_INSURANCE)super.removeRepetition("INSURANCE", rep); 899 } 900 901 902 903 /** 904 * Returns 905 * ACC (Accident) - creates it if necessary 906 */ 907 public ACC getACC() { 908 return getTyped("ACC", ACC.class); 909 } 910 911 912 913 914 /** 915 * Returns 916 * UB1 (UB82) - creates it if necessary 917 */ 918 public UB1 getUB1() { 919 return getTyped("UB1", UB1.class); 920 } 921 922 923 924 925 /** 926 * Returns 927 * UB2 (UB92 Data) - creates it if necessary 928 */ 929 public UB2 getUB2() { 930 return getTyped("UB2", UB2.class); 931 } 932 933 934 935 936} 937