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