1 /* 2 * This class is an auto-generated source file for a HAPI 3 * HL7 v2.x standard structure class. 4 * 5 * For more information, visit: http://hl7api.sourceforge.net/ 6 * 7 * The contents of this file are subject to the Mozilla Public License Version 1.1 8 * (the "License"); you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 10 * Software distributed under the License is distributed on an "AS IS" basis, 11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 12 * specific language governing rights and limitations under the License. 13 * 14 * The Original Code is "[file_name]". Description: 15 * "[one_line_description]" 16 * 17 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 18 * 2012. All Rights Reserved. 19 * 20 * Contributor(s): ______________________________________. 21 * 22 * Alternatively, the contents of this file may be used under the terms of the 23 * GNU General Public License (the "GPL"), in which case the provisions of the GPL are 24 * applicable instead of those above. If you wish to allow use of your version of this 25 * file only under the terms of the GPL and not to allow others to use your version 26 * of this file under the MPL, indicate your decision by deleting the provisions above 27 * and replace them with the notice and other provisions required by the GPL License. 28 * If you do not delete the provisions above, a recipient may use your version of 29 * this file under either the MPL or the GPL. 30 * 31 */ 32 33 34 package ca.uhn.hl7v2.model.v281.message; 35 36 import ca.uhn.hl7v2.model.v281.group.*; 37 import ca.uhn.hl7v2.model.v281.segment.*; 38 39 import ca.uhn.hl7v2.HL7Exception; 40 import ca.uhn.hl7v2.parser.ModelClassFactory; 41 import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 42 import ca.uhn.hl7v2.model.*; 43 44 45 /** 46 * <p>Represents a PMU_B01 message structure (see chapter 15.3.1). This structure contains the 47 * following elements: </p> 48 * <ul> 49 * <li>1: MSH (Message Header) <b> </b> </li> 50 * <li>2: SFT (Software Segment) <b>optional repeating</b> </li> 51 * <li>3: UAC (User Authentication Credential Segment) <b>optional </b> </li> 52 * <li>4: EVN (Event Type) <b> </b> </li> 53 * <li>5: STF (Staff Identification) <b> </b> </li> 54 * <li>6: PRA (Practitioner Detail) <b>optional repeating</b> </li> 55 * <li>7: ORG (Practitioner Organization Unit) <b>optional repeating</b> </li> 56 * <li>8: AFF (Professional Affiliation) <b>optional repeating</b> </li> 57 * <li>9: LAN (Language Detail) <b>optional repeating</b> </li> 58 * <li>10: EDU (Educational Detail) <b>optional repeating</b> </li> 59 * <li>11: CER (Certificate Detail) <b>optional repeating</b> </li> 60 * <li>12: NK1 (Next of Kin / Associated Parties) <b>optional repeating</b> </li> 61 * <li>13: PRT (Participation Information) <b>optional repeating</b> </li> 62 * <li>14: ROL (Role) <b>optional repeating</b> </li> 63 * </ul> 64 */ 65 //@SuppressWarnings("unused") 66 public class PMU_B01 extends AbstractMessage { 67 68 /** 69 * Creates a new PMU_B01 message with DefaultModelClassFactory. 70 */ 71 public PMU_B01() { 72 this(new DefaultModelClassFactory()); 73 } 74 75 /** 76 * Creates a new PMU_B01 message with custom ModelClassFactory. 77 */ 78 public PMU_B01(ModelClassFactory factory) { 79 super(factory); 80 init(factory); 81 } 82 83 private void init(ModelClassFactory factory) { 84 try { 85 this.add(MSH.class, true, false); 86 this.add(SFT.class, false, true); 87 this.add(UAC.class, false, false); 88 this.add(EVN.class, true, false); 89 this.add(STF.class, true, false); 90 this.add(PRA.class, false, true); 91 this.add(ORG.class, false, true); 92 this.add(AFF.class, false, true); 93 this.add(LAN.class, false, true); 94 this.add(EDU.class, false, true); 95 this.add(CER.class, false, true); 96 this.add(NK1.class, false, true); 97 this.add(PRT.class, false, true); 98 this.add(ROL.class, false, true); 99 } catch(HL7Exception e) { 100 log.error("Unexpected error creating PMU_B01 - this is probably a bug in the source code generator.", e); 101 } 102 } 103 104 105 /** 106 * Returns "2.8.1" 107 */ 108 public String getVersion() { 109 return "2.8.1"; 110 } 111 112 113 114 115 /** 116 * <p> 117 * Returns 118 * MSH (Message Header) - creates it if necessary 119 * </p> 120 * 121 * 122 */ 123 public MSH getMSH() { 124 return getTyped("MSH", MSH.class); 125 } 126 127 128 129 130 131 /** 132 * <p> 133 * Returns 134 * the first repetition of 135 * SFT (Software Segment) - creates it if necessary 136 * </p> 137 * 138 * 139 */ 140 public SFT getSFT() { 141 return getTyped("SFT", SFT.class); 142 } 143 144 145 /** 146 * <p> 147 * Returns a specific repetition of 148 * SFT (Software Segment) - creates it if necessary 149 * </p> 150 * 151 * 152 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 153 * @throws HL7Exception if the repetition requested is more than one 154 * greater than the number of existing repetitions. 155 */ 156 public SFT getSFT(int rep) { 157 return getTyped("SFT", rep, SFT.class); 158 } 159 160 /** 161 * <p> 162 * Returns the number of existing repetitions of SFT 163 * </p> 164 * 165 */ 166 public int getSFTReps() { 167 return getReps("SFT"); 168 } 169 170 /** 171 * <p> 172 * Returns a non-modifiable List containing all current existing repetitions of SFT. 173 * <p> 174 * <p> 175 * Note that unlike {@link #getSFT()}, this method will not create any reps 176 * if none are already present, so an empty list may be returned. 177 * </p> 178 * 179 */ 180 public java.util.List<SFT> getSFTAll() throws HL7Exception { 181 return getAllAsList("SFT", SFT.class); 182 } 183 184 /** 185 * <p> 186 * Inserts a specific repetition of SFT (Software Segment) 187 * </p> 188 * 189 * 190 * @see AbstractGroup#insertRepetition(Structure, int) 191 */ 192 public void insertSFT(SFT structure, int rep) throws HL7Exception { 193 super.insertRepetition( "SFT", structure, rep); 194 } 195 196 197 /** 198 * <p> 199 * Inserts a specific repetition of SFT (Software Segment) 200 * </p> 201 * 202 * 203 * @see AbstractGroup#insertRepetition(Structure, int) 204 */ 205 public SFT insertSFT(int rep) throws HL7Exception { 206 return (SFT)super.insertRepetition("SFT", rep); 207 } 208 209 210 /** 211 * <p> 212 * Removes a specific repetition of SFT (Software Segment) 213 * </p> 214 * 215 * 216 * @see AbstractGroup#removeRepetition(String, int) 217 */ 218 public SFT removeSFT(int rep) throws HL7Exception { 219 return (SFT)super.removeRepetition("SFT", rep); 220 } 221 222 223 224 225 /** 226 * <p> 227 * Returns 228 * UAC (User Authentication Credential Segment) - creates it if necessary 229 * </p> 230 * 231 * 232 */ 233 public UAC getUAC() { 234 return getTyped("UAC", UAC.class); 235 } 236 237 238 239 240 241 /** 242 * <p> 243 * Returns 244 * EVN (Event Type) - creates it if necessary 245 * </p> 246 * 247 * 248 */ 249 public EVN getEVN() { 250 return getTyped("EVN", EVN.class); 251 } 252 253 254 255 256 257 /** 258 * <p> 259 * Returns 260 * STF (Staff Identification) - creates it if necessary 261 * </p> 262 * 263 * 264 */ 265 public STF getSTF() { 266 return getTyped("STF", STF.class); 267 } 268 269 270 271 272 273 /** 274 * <p> 275 * Returns 276 * the first repetition of 277 * PRA (Practitioner Detail) - creates it if necessary 278 * </p> 279 * 280 * 281 */ 282 public PRA getPRA() { 283 return getTyped("PRA", PRA.class); 284 } 285 286 287 /** 288 * <p> 289 * Returns a specific repetition of 290 * PRA (Practitioner Detail) - creates it if necessary 291 * </p> 292 * 293 * 294 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 295 * @throws HL7Exception if the repetition requested is more than one 296 * greater than the number of existing repetitions. 297 */ 298 public PRA getPRA(int rep) { 299 return getTyped("PRA", rep, PRA.class); 300 } 301 302 /** 303 * <p> 304 * Returns the number of existing repetitions of PRA 305 * </p> 306 * 307 */ 308 public int getPRAReps() { 309 return getReps("PRA"); 310 } 311 312 /** 313 * <p> 314 * Returns a non-modifiable List containing all current existing repetitions of PRA. 315 * <p> 316 * <p> 317 * Note that unlike {@link #getPRA()}, this method will not create any reps 318 * if none are already present, so an empty list may be returned. 319 * </p> 320 * 321 */ 322 public java.util.List<PRA> getPRAAll() throws HL7Exception { 323 return getAllAsList("PRA", PRA.class); 324 } 325 326 /** 327 * <p> 328 * Inserts a specific repetition of PRA (Practitioner Detail) 329 * </p> 330 * 331 * 332 * @see AbstractGroup#insertRepetition(Structure, int) 333 */ 334 public void insertPRA(PRA structure, int rep) throws HL7Exception { 335 super.insertRepetition( "PRA", structure, rep); 336 } 337 338 339 /** 340 * <p> 341 * Inserts a specific repetition of PRA (Practitioner Detail) 342 * </p> 343 * 344 * 345 * @see AbstractGroup#insertRepetition(Structure, int) 346 */ 347 public PRA insertPRA(int rep) throws HL7Exception { 348 return (PRA)super.insertRepetition("PRA", rep); 349 } 350 351 352 /** 353 * <p> 354 * Removes a specific repetition of PRA (Practitioner Detail) 355 * </p> 356 * 357 * 358 * @see AbstractGroup#removeRepetition(String, int) 359 */ 360 public PRA removePRA(int rep) throws HL7Exception { 361 return (PRA)super.removeRepetition("PRA", rep); 362 } 363 364 365 366 367 /** 368 * <p> 369 * Returns 370 * the first repetition of 371 * ORG (Practitioner Organization Unit) - creates it if necessary 372 * </p> 373 * 374 * 375 */ 376 public ORG getORG() { 377 return getTyped("ORG", ORG.class); 378 } 379 380 381 /** 382 * <p> 383 * Returns a specific repetition of 384 * ORG (Practitioner Organization Unit) - creates it if necessary 385 * </p> 386 * 387 * 388 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 389 * @throws HL7Exception if the repetition requested is more than one 390 * greater than the number of existing repetitions. 391 */ 392 public ORG getORG(int rep) { 393 return getTyped("ORG", rep, ORG.class); 394 } 395 396 /** 397 * <p> 398 * Returns the number of existing repetitions of ORG 399 * </p> 400 * 401 */ 402 public int getORGReps() { 403 return getReps("ORG"); 404 } 405 406 /** 407 * <p> 408 * Returns a non-modifiable List containing all current existing repetitions of ORG. 409 * <p> 410 * <p> 411 * Note that unlike {@link #getORG()}, this method will not create any reps 412 * if none are already present, so an empty list may be returned. 413 * </p> 414 * 415 */ 416 public java.util.List<ORG> getORGAll() throws HL7Exception { 417 return getAllAsList("ORG", ORG.class); 418 } 419 420 /** 421 * <p> 422 * Inserts a specific repetition of ORG (Practitioner Organization Unit) 423 * </p> 424 * 425 * 426 * @see AbstractGroup#insertRepetition(Structure, int) 427 */ 428 public void insertORG(ORG structure, int rep) throws HL7Exception { 429 super.insertRepetition( "ORG", structure, rep); 430 } 431 432 433 /** 434 * <p> 435 * Inserts a specific repetition of ORG (Practitioner Organization Unit) 436 * </p> 437 * 438 * 439 * @see AbstractGroup#insertRepetition(Structure, int) 440 */ 441 public ORG insertORG(int rep) throws HL7Exception { 442 return (ORG)super.insertRepetition("ORG", rep); 443 } 444 445 446 /** 447 * <p> 448 * Removes a specific repetition of ORG (Practitioner Organization Unit) 449 * </p> 450 * 451 * 452 * @see AbstractGroup#removeRepetition(String, int) 453 */ 454 public ORG removeORG(int rep) throws HL7Exception { 455 return (ORG)super.removeRepetition("ORG", rep); 456 } 457 458 459 460 461 /** 462 * <p> 463 * Returns 464 * the first repetition of 465 * AFF (Professional Affiliation) - creates it if necessary 466 * </p> 467 * 468 * 469 */ 470 public AFF getAFF() { 471 return getTyped("AFF", AFF.class); 472 } 473 474 475 /** 476 * <p> 477 * Returns a specific repetition of 478 * AFF (Professional Affiliation) - creates it if necessary 479 * </p> 480 * 481 * 482 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 483 * @throws HL7Exception if the repetition requested is more than one 484 * greater than the number of existing repetitions. 485 */ 486 public AFF getAFF(int rep) { 487 return getTyped("AFF", rep, AFF.class); 488 } 489 490 /** 491 * <p> 492 * Returns the number of existing repetitions of AFF 493 * </p> 494 * 495 */ 496 public int getAFFReps() { 497 return getReps("AFF"); 498 } 499 500 /** 501 * <p> 502 * Returns a non-modifiable List containing all current existing repetitions of AFF. 503 * <p> 504 * <p> 505 * Note that unlike {@link #getAFF()}, this method will not create any reps 506 * if none are already present, so an empty list may be returned. 507 * </p> 508 * 509 */ 510 public java.util.List<AFF> getAFFAll() throws HL7Exception { 511 return getAllAsList("AFF", AFF.class); 512 } 513 514 /** 515 * <p> 516 * Inserts a specific repetition of AFF (Professional Affiliation) 517 * </p> 518 * 519 * 520 * @see AbstractGroup#insertRepetition(Structure, int) 521 */ 522 public void insertAFF(AFF structure, int rep) throws HL7Exception { 523 super.insertRepetition( "AFF", structure, rep); 524 } 525 526 527 /** 528 * <p> 529 * Inserts a specific repetition of AFF (Professional Affiliation) 530 * </p> 531 * 532 * 533 * @see AbstractGroup#insertRepetition(Structure, int) 534 */ 535 public AFF insertAFF(int rep) throws HL7Exception { 536 return (AFF)super.insertRepetition("AFF", rep); 537 } 538 539 540 /** 541 * <p> 542 * Removes a specific repetition of AFF (Professional Affiliation) 543 * </p> 544 * 545 * 546 * @see AbstractGroup#removeRepetition(String, int) 547 */ 548 public AFF removeAFF(int rep) throws HL7Exception { 549 return (AFF)super.removeRepetition("AFF", rep); 550 } 551 552 553 554 555 /** 556 * <p> 557 * Returns 558 * the first repetition of 559 * LAN (Language Detail) - creates it if necessary 560 * </p> 561 * 562 * 563 */ 564 public LAN getLAN() { 565 return getTyped("LAN", LAN.class); 566 } 567 568 569 /** 570 * <p> 571 * Returns a specific repetition of 572 * LAN (Language Detail) - creates it if necessary 573 * </p> 574 * 575 * 576 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 577 * @throws HL7Exception if the repetition requested is more than one 578 * greater than the number of existing repetitions. 579 */ 580 public LAN getLAN(int rep) { 581 return getTyped("LAN", rep, LAN.class); 582 } 583 584 /** 585 * <p> 586 * Returns the number of existing repetitions of LAN 587 * </p> 588 * 589 */ 590 public int getLANReps() { 591 return getReps("LAN"); 592 } 593 594 /** 595 * <p> 596 * Returns a non-modifiable List containing all current existing repetitions of LAN. 597 * <p> 598 * <p> 599 * Note that unlike {@link #getLAN()}, this method will not create any reps 600 * if none are already present, so an empty list may be returned. 601 * </p> 602 * 603 */ 604 public java.util.List<LAN> getLANAll() throws HL7Exception { 605 return getAllAsList("LAN", LAN.class); 606 } 607 608 /** 609 * <p> 610 * Inserts a specific repetition of LAN (Language Detail) 611 * </p> 612 * 613 * 614 * @see AbstractGroup#insertRepetition(Structure, int) 615 */ 616 public void insertLAN(LAN structure, int rep) throws HL7Exception { 617 super.insertRepetition( "LAN", structure, rep); 618 } 619 620 621 /** 622 * <p> 623 * Inserts a specific repetition of LAN (Language Detail) 624 * </p> 625 * 626 * 627 * @see AbstractGroup#insertRepetition(Structure, int) 628 */ 629 public LAN insertLAN(int rep) throws HL7Exception { 630 return (LAN)super.insertRepetition("LAN", rep); 631 } 632 633 634 /** 635 * <p> 636 * Removes a specific repetition of LAN (Language Detail) 637 * </p> 638 * 639 * 640 * @see AbstractGroup#removeRepetition(String, int) 641 */ 642 public LAN removeLAN(int rep) throws HL7Exception { 643 return (LAN)super.removeRepetition("LAN", rep); 644 } 645 646 647 648 649 /** 650 * <p> 651 * Returns 652 * the first repetition of 653 * EDU (Educational Detail) - creates it if necessary 654 * </p> 655 * 656 * 657 */ 658 public EDU getEDU() { 659 return getTyped("EDU", EDU.class); 660 } 661 662 663 /** 664 * <p> 665 * Returns a specific repetition of 666 * EDU (Educational Detail) - creates it if necessary 667 * </p> 668 * 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 EDU getEDU(int rep) { 675 return getTyped("EDU", rep, EDU.class); 676 } 677 678 /** 679 * <p> 680 * Returns the number of existing repetitions of EDU 681 * </p> 682 * 683 */ 684 public int getEDUReps() { 685 return getReps("EDU"); 686 } 687 688 /** 689 * <p> 690 * Returns a non-modifiable List containing all current existing repetitions of EDU. 691 * <p> 692 * <p> 693 * Note that unlike {@link #getEDU()}, this method will not create any reps 694 * if none are already present, so an empty list may be returned. 695 * </p> 696 * 697 */ 698 public java.util.List<EDU> getEDUAll() throws HL7Exception { 699 return getAllAsList("EDU", EDU.class); 700 } 701 702 /** 703 * <p> 704 * Inserts a specific repetition of EDU (Educational Detail) 705 * </p> 706 * 707 * 708 * @see AbstractGroup#insertRepetition(Structure, int) 709 */ 710 public void insertEDU(EDU structure, int rep) throws HL7Exception { 711 super.insertRepetition( "EDU", structure, rep); 712 } 713 714 715 /** 716 * <p> 717 * Inserts a specific repetition of EDU (Educational Detail) 718 * </p> 719 * 720 * 721 * @see AbstractGroup#insertRepetition(Structure, int) 722 */ 723 public EDU insertEDU(int rep) throws HL7Exception { 724 return (EDU)super.insertRepetition("EDU", rep); 725 } 726 727 728 /** 729 * <p> 730 * Removes a specific repetition of EDU (Educational Detail) 731 * </p> 732 * 733 * 734 * @see AbstractGroup#removeRepetition(String, int) 735 */ 736 public EDU removeEDU(int rep) throws HL7Exception { 737 return (EDU)super.removeRepetition("EDU", rep); 738 } 739 740 741 742 743 /** 744 * <p> 745 * Returns 746 * the first repetition of 747 * CER (Certificate Detail) - creates it if necessary 748 * </p> 749 * 750 * 751 */ 752 public CER getCER() { 753 return getTyped("CER", CER.class); 754 } 755 756 757 /** 758 * <p> 759 * Returns a specific repetition of 760 * CER (Certificate Detail) - creates it if necessary 761 * </p> 762 * 763 * 764 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 765 * @throws HL7Exception if the repetition requested is more than one 766 * greater than the number of existing repetitions. 767 */ 768 public CER getCER(int rep) { 769 return getTyped("CER", rep, CER.class); 770 } 771 772 /** 773 * <p> 774 * Returns the number of existing repetitions of CER 775 * </p> 776 * 777 */ 778 public int getCERReps() { 779 return getReps("CER"); 780 } 781 782 /** 783 * <p> 784 * Returns a non-modifiable List containing all current existing repetitions of CER. 785 * <p> 786 * <p> 787 * Note that unlike {@link #getCER()}, this method will not create any reps 788 * if none are already present, so an empty list may be returned. 789 * </p> 790 * 791 */ 792 public java.util.List<CER> getCERAll() throws HL7Exception { 793 return getAllAsList("CER", CER.class); 794 } 795 796 /** 797 * <p> 798 * Inserts a specific repetition of CER (Certificate Detail) 799 * </p> 800 * 801 * 802 * @see AbstractGroup#insertRepetition(Structure, int) 803 */ 804 public void insertCER(CER structure, int rep) throws HL7Exception { 805 super.insertRepetition( "CER", structure, rep); 806 } 807 808 809 /** 810 * <p> 811 * Inserts a specific repetition of CER (Certificate Detail) 812 * </p> 813 * 814 * 815 * @see AbstractGroup#insertRepetition(Structure, int) 816 */ 817 public CER insertCER(int rep) throws HL7Exception { 818 return (CER)super.insertRepetition("CER", rep); 819 } 820 821 822 /** 823 * <p> 824 * Removes a specific repetition of CER (Certificate Detail) 825 * </p> 826 * 827 * 828 * @see AbstractGroup#removeRepetition(String, int) 829 */ 830 public CER removeCER(int rep) throws HL7Exception { 831 return (CER)super.removeRepetition("CER", rep); 832 } 833 834 835 836 837 /** 838 * <p> 839 * Returns 840 * the first repetition of 841 * NK1 (Next of Kin / Associated Parties) - creates it if necessary 842 * </p> 843 * 844 * 845 */ 846 public NK1 getNK1() { 847 return getTyped("NK1", NK1.class); 848 } 849 850 851 /** 852 * <p> 853 * Returns a specific repetition of 854 * NK1 (Next of Kin / Associated Parties) - creates it if necessary 855 * </p> 856 * 857 * 858 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 859 * @throws HL7Exception if the repetition requested is more than one 860 * greater than the number of existing repetitions. 861 */ 862 public NK1 getNK1(int rep) { 863 return getTyped("NK1", rep, NK1.class); 864 } 865 866 /** 867 * <p> 868 * Returns the number of existing repetitions of NK1 869 * </p> 870 * 871 */ 872 public int getNK1Reps() { 873 return getReps("NK1"); 874 } 875 876 /** 877 * <p> 878 * Returns a non-modifiable List containing all current existing repetitions of NK1. 879 * <p> 880 * <p> 881 * Note that unlike {@link #getNK1()}, this method will not create any reps 882 * if none are already present, so an empty list may be returned. 883 * </p> 884 * 885 */ 886 public java.util.List<NK1> getNK1All() throws HL7Exception { 887 return getAllAsList("NK1", NK1.class); 888 } 889 890 /** 891 * <p> 892 * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties) 893 * </p> 894 * 895 * 896 * @see AbstractGroup#insertRepetition(Structure, int) 897 */ 898 public void insertNK1(NK1 structure, int rep) throws HL7Exception { 899 super.insertRepetition( "NK1", structure, rep); 900 } 901 902 903 /** 904 * <p> 905 * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties) 906 * </p> 907 * 908 * 909 * @see AbstractGroup#insertRepetition(Structure, int) 910 */ 911 public NK1 insertNK1(int rep) throws HL7Exception { 912 return (NK1)super.insertRepetition("NK1", rep); 913 } 914 915 916 /** 917 * <p> 918 * Removes a specific repetition of NK1 (Next of Kin / Associated Parties) 919 * </p> 920 * 921 * 922 * @see AbstractGroup#removeRepetition(String, int) 923 */ 924 public NK1 removeNK1(int rep) throws HL7Exception { 925 return (NK1)super.removeRepetition("NK1", rep); 926 } 927 928 929 930 931 /** 932 * <p> 933 * Returns 934 * the first repetition of 935 * PRT (Participation Information) - creates it if necessary 936 * </p> 937 * 938 * 939 */ 940 public PRT getPRT() { 941 return getTyped("PRT", PRT.class); 942 } 943 944 945 /** 946 * <p> 947 * Returns a specific repetition of 948 * PRT (Participation Information) - creates it if necessary 949 * </p> 950 * 951 * 952 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 953 * @throws HL7Exception if the repetition requested is more than one 954 * greater than the number of existing repetitions. 955 */ 956 public PRT getPRT(int rep) { 957 return getTyped("PRT", rep, PRT.class); 958 } 959 960 /** 961 * <p> 962 * Returns the number of existing repetitions of PRT 963 * </p> 964 * 965 */ 966 public int getPRTReps() { 967 return getReps("PRT"); 968 } 969 970 /** 971 * <p> 972 * Returns a non-modifiable List containing all current existing repetitions of PRT. 973 * <p> 974 * <p> 975 * Note that unlike {@link #getPRT()}, this method will not create any reps 976 * if none are already present, so an empty list may be returned. 977 * </p> 978 * 979 */ 980 public java.util.List<PRT> getPRTAll() throws HL7Exception { 981 return getAllAsList("PRT", PRT.class); 982 } 983 984 /** 985 * <p> 986 * Inserts a specific repetition of PRT (Participation Information) 987 * </p> 988 * 989 * 990 * @see AbstractGroup#insertRepetition(Structure, int) 991 */ 992 public void insertPRT(PRT structure, int rep) throws HL7Exception { 993 super.insertRepetition( "PRT", structure, rep); 994 } 995 996 997 /** 998 * <p> 999 * Inserts a specific repetition of PRT (Participation Information) 1000 * </p> 1001 * 1002 * 1003 * @see AbstractGroup#insertRepetition(Structure, int) 1004 */ 1005 public PRT insertPRT(int rep) throws HL7Exception { 1006 return (PRT)super.insertRepetition("PRT", rep); 1007 } 1008 1009 1010 /** 1011 * <p> 1012 * Removes a specific repetition of PRT (Participation Information) 1013 * </p> 1014 * 1015 * 1016 * @see AbstractGroup#removeRepetition(String, int) 1017 */ 1018 public PRT removePRT(int rep) throws HL7Exception { 1019 return (PRT)super.removeRepetition("PRT", rep); 1020 } 1021 1022 1023 1024 1025 /** 1026 * <p> 1027 * Returns 1028 * the first repetition of 1029 * ROL (Role) - creates it if necessary 1030 * </p> 1031 * 1032 * 1033 */ 1034 public ROL getROL() { 1035 return getTyped("ROL", ROL.class); 1036 } 1037 1038 1039 /** 1040 * <p> 1041 * Returns a specific repetition of 1042 * ROL (Role) - creates it if necessary 1043 * </p> 1044 * 1045 * 1046 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 1047 * @throws HL7Exception if the repetition requested is more than one 1048 * greater than the number of existing repetitions. 1049 */ 1050 public ROL getROL(int rep) { 1051 return getTyped("ROL", rep, ROL.class); 1052 } 1053 1054 /** 1055 * <p> 1056 * Returns the number of existing repetitions of ROL 1057 * </p> 1058 * 1059 */ 1060 public int getROLReps() { 1061 return getReps("ROL"); 1062 } 1063 1064 /** 1065 * <p> 1066 * Returns a non-modifiable List containing all current existing repetitions of ROL. 1067 * <p> 1068 * <p> 1069 * Note that unlike {@link #getROL()}, this method will not create any reps 1070 * if none are already present, so an empty list may be returned. 1071 * </p> 1072 * 1073 */ 1074 public java.util.List<ROL> getROLAll() throws HL7Exception { 1075 return getAllAsList("ROL", ROL.class); 1076 } 1077 1078 /** 1079 * <p> 1080 * Inserts a specific repetition of ROL (Role) 1081 * </p> 1082 * 1083 * 1084 * @see AbstractGroup#insertRepetition(Structure, int) 1085 */ 1086 public void insertROL(ROL structure, int rep) throws HL7Exception { 1087 super.insertRepetition( "ROL", structure, rep); 1088 } 1089 1090 1091 /** 1092 * <p> 1093 * Inserts a specific repetition of ROL (Role) 1094 * </p> 1095 * 1096 * 1097 * @see AbstractGroup#insertRepetition(Structure, int) 1098 */ 1099 public ROL insertROL(int rep) throws HL7Exception { 1100 return (ROL)super.insertRepetition("ROL", rep); 1101 } 1102 1103 1104 /** 1105 * <p> 1106 * Removes a specific repetition of ROL (Role) 1107 * </p> 1108 * 1109 * 1110 * @see AbstractGroup#removeRepetition(String, int) 1111 */ 1112 public ROL removeROL(int rep) throws HL7Exception { 1113 return (ROL)super.removeRepetition("ROL", rep); 1114 } 1115 1116 1117 1118 } 1119