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