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