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.v251.message; 035 036import ca.uhn.hl7v2.model.v251.group.*; 037import ca.uhn.hl7v2.model.v251.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 PMU_B01 message structure (see chapter 15.3.1). This structure contains the 047 * following elements: </p> 048 * <ul> 049 * <li>1: MSH (Message Header) <b> </b> </li> 050 * <li>2: SFT (Software Segment) <b>optional repeating</b> </li> 051 * <li>3: EVN (Event Type) <b> </b> </li> 052 * <li>4: STF (Staff Identification) <b> </b> </li> 053 * <li>5: PRA (Practitioner Detail) <b>optional repeating</b> </li> 054 * <li>6: ORG (Practitioner Organization Unit) <b>optional repeating</b> </li> 055 * <li>7: AFF (Professional Affiliation) <b>optional repeating</b> </li> 056 * <li>8: LAN (Language Detail) <b>optional repeating</b> </li> 057 * <li>9: EDU (Educational Detail) <b>optional repeating</b> </li> 058 * <li>10: CER (Certificate Detail) <b>optional repeating</b> </li> 059 * </ul> 060 */ 061//@SuppressWarnings("unused") 062public class PMU_B01 extends AbstractMessage { 063 064 /** 065 * Creates a new PMU_B01 message with DefaultModelClassFactory. 066 */ 067 public PMU_B01() { 068 this(new DefaultModelClassFactory()); 069 } 070 071 /** 072 * Creates a new PMU_B01 message with custom ModelClassFactory. 073 */ 074 public PMU_B01(ModelClassFactory factory) { 075 super(factory); 076 init(factory); 077 } 078 079 private void init(ModelClassFactory factory) { 080 try { 081 this.add(MSH.class, true, false); 082 this.add(SFT.class, false, true); 083 this.add(EVN.class, true, false); 084 this.add(STF.class, true, false); 085 this.add(PRA.class, false, true); 086 this.add(ORG.class, false, true); 087 this.add(AFF.class, false, true); 088 this.add(LAN.class, false, true); 089 this.add(EDU.class, false, true); 090 this.add(CER.class, false, true); 091 } catch(HL7Exception e) { 092 log.error("Unexpected error creating PMU_B01 - this is probably a bug in the source code generator.", e); 093 } 094 } 095 096 097 /** 098 * Returns "2.5.1" 099 */ 100 public String getVersion() { 101 return "2.5.1"; 102 } 103 104 105 106 107 /** 108 * <p> 109 * Returns 110 * MSH (Message Header) - creates it if necessary 111 * </p> 112 * 113 * 114 */ 115 public MSH getMSH() { 116 return getTyped("MSH", MSH.class); 117 } 118 119 120 121 122 123 /** 124 * <p> 125 * Returns 126 * the first repetition of 127 * SFT (Software Segment) - creates it if necessary 128 * </p> 129 * 130 * 131 */ 132 public SFT getSFT() { 133 return getTyped("SFT", SFT.class); 134 } 135 136 137 /** 138 * <p> 139 * Returns a specific repetition of 140 * SFT (Software Segment) - creates it if necessary 141 * </p> 142 * 143 * 144 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 145 * @throws HL7Exception if the repetition requested is more than one 146 * greater than the number of existing repetitions. 147 */ 148 public SFT getSFT(int rep) { 149 return getTyped("SFT", rep, SFT.class); 150 } 151 152 /** 153 * <p> 154 * Returns the number of existing repetitions of SFT 155 * </p> 156 * 157 */ 158 public int getSFTReps() { 159 return getReps("SFT"); 160 } 161 162 /** 163 * <p> 164 * Returns a non-modifiable List containing all current existing repetitions of SFT. 165 * <p> 166 * <p> 167 * Note that unlike {@link #getSFT()}, this method will not create any reps 168 * if none are already present, so an empty list may be returned. 169 * </p> 170 * 171 */ 172 public java.util.List<SFT> getSFTAll() throws HL7Exception { 173 return getAllAsList("SFT", SFT.class); 174 } 175 176 /** 177 * <p> 178 * Inserts a specific repetition of SFT (Software Segment) 179 * </p> 180 * 181 * 182 * @see AbstractGroup#insertRepetition(Structure, int) 183 */ 184 public void insertSFT(SFT structure, int rep) throws HL7Exception { 185 super.insertRepetition( "SFT", structure, rep); 186 } 187 188 189 /** 190 * <p> 191 * Inserts a specific repetition of SFT (Software Segment) 192 * </p> 193 * 194 * 195 * @see AbstractGroup#insertRepetition(Structure, int) 196 */ 197 public SFT insertSFT(int rep) throws HL7Exception { 198 return (SFT)super.insertRepetition("SFT", rep); 199 } 200 201 202 /** 203 * <p> 204 * Removes a specific repetition of SFT (Software Segment) 205 * </p> 206 * 207 * 208 * @see AbstractGroup#removeRepetition(String, int) 209 */ 210 public SFT removeSFT(int rep) throws HL7Exception { 211 return (SFT)super.removeRepetition("SFT", rep); 212 } 213 214 215 216 217 /** 218 * <p> 219 * Returns 220 * EVN (Event Type) - creates it if necessary 221 * </p> 222 * 223 * 224 */ 225 public EVN getEVN() { 226 return getTyped("EVN", EVN.class); 227 } 228 229 230 231 232 233 /** 234 * <p> 235 * Returns 236 * STF (Staff Identification) - creates it if necessary 237 * </p> 238 * 239 * 240 */ 241 public STF getSTF() { 242 return getTyped("STF", STF.class); 243 } 244 245 246 247 248 249 /** 250 * <p> 251 * Returns 252 * the first repetition of 253 * PRA (Practitioner Detail) - creates it if necessary 254 * </p> 255 * 256 * 257 */ 258 public PRA getPRA() { 259 return getTyped("PRA", PRA.class); 260 } 261 262 263 /** 264 * <p> 265 * Returns a specific repetition of 266 * PRA (Practitioner Detail) - creates it if necessary 267 * </p> 268 * 269 * 270 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 271 * @throws HL7Exception if the repetition requested is more than one 272 * greater than the number of existing repetitions. 273 */ 274 public PRA getPRA(int rep) { 275 return getTyped("PRA", rep, PRA.class); 276 } 277 278 /** 279 * <p> 280 * Returns the number of existing repetitions of PRA 281 * </p> 282 * 283 */ 284 public int getPRAReps() { 285 return getReps("PRA"); 286 } 287 288 /** 289 * <p> 290 * Returns a non-modifiable List containing all current existing repetitions of PRA. 291 * <p> 292 * <p> 293 * Note that unlike {@link #getPRA()}, this method will not create any reps 294 * if none are already present, so an empty list may be returned. 295 * </p> 296 * 297 */ 298 public java.util.List<PRA> getPRAAll() throws HL7Exception { 299 return getAllAsList("PRA", PRA.class); 300 } 301 302 /** 303 * <p> 304 * Inserts a specific repetition of PRA (Practitioner Detail) 305 * </p> 306 * 307 * 308 * @see AbstractGroup#insertRepetition(Structure, int) 309 */ 310 public void insertPRA(PRA structure, int rep) throws HL7Exception { 311 super.insertRepetition( "PRA", structure, rep); 312 } 313 314 315 /** 316 * <p> 317 * Inserts a specific repetition of PRA (Practitioner Detail) 318 * </p> 319 * 320 * 321 * @see AbstractGroup#insertRepetition(Structure, int) 322 */ 323 public PRA insertPRA(int rep) throws HL7Exception { 324 return (PRA)super.insertRepetition("PRA", rep); 325 } 326 327 328 /** 329 * <p> 330 * Removes a specific repetition of PRA (Practitioner Detail) 331 * </p> 332 * 333 * 334 * @see AbstractGroup#removeRepetition(String, int) 335 */ 336 public PRA removePRA(int rep) throws HL7Exception { 337 return (PRA)super.removeRepetition("PRA", rep); 338 } 339 340 341 342 343 /** 344 * <p> 345 * Returns 346 * the first repetition of 347 * ORG (Practitioner Organization Unit) - creates it if necessary 348 * </p> 349 * 350 * 351 */ 352 public ORG getORG() { 353 return getTyped("ORG", ORG.class); 354 } 355 356 357 /** 358 * <p> 359 * Returns a specific repetition of 360 * ORG (Practitioner Organization Unit) - creates it if necessary 361 * </p> 362 * 363 * 364 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 365 * @throws HL7Exception if the repetition requested is more than one 366 * greater than the number of existing repetitions. 367 */ 368 public ORG getORG(int rep) { 369 return getTyped("ORG", rep, ORG.class); 370 } 371 372 /** 373 * <p> 374 * Returns the number of existing repetitions of ORG 375 * </p> 376 * 377 */ 378 public int getORGReps() { 379 return getReps("ORG"); 380 } 381 382 /** 383 * <p> 384 * Returns a non-modifiable List containing all current existing repetitions of ORG. 385 * <p> 386 * <p> 387 * Note that unlike {@link #getORG()}, this method will not create any reps 388 * if none are already present, so an empty list may be returned. 389 * </p> 390 * 391 */ 392 public java.util.List<ORG> getORGAll() throws HL7Exception { 393 return getAllAsList("ORG", ORG.class); 394 } 395 396 /** 397 * <p> 398 * Inserts a specific repetition of ORG (Practitioner Organization Unit) 399 * </p> 400 * 401 * 402 * @see AbstractGroup#insertRepetition(Structure, int) 403 */ 404 public void insertORG(ORG structure, int rep) throws HL7Exception { 405 super.insertRepetition( "ORG", structure, rep); 406 } 407 408 409 /** 410 * <p> 411 * Inserts a specific repetition of ORG (Practitioner Organization Unit) 412 * </p> 413 * 414 * 415 * @see AbstractGroup#insertRepetition(Structure, int) 416 */ 417 public ORG insertORG(int rep) throws HL7Exception { 418 return (ORG)super.insertRepetition("ORG", rep); 419 } 420 421 422 /** 423 * <p> 424 * Removes a specific repetition of ORG (Practitioner Organization Unit) 425 * </p> 426 * 427 * 428 * @see AbstractGroup#removeRepetition(String, int) 429 */ 430 public ORG removeORG(int rep) throws HL7Exception { 431 return (ORG)super.removeRepetition("ORG", rep); 432 } 433 434 435 436 437 /** 438 * <p> 439 * Returns 440 * the first repetition of 441 * AFF (Professional Affiliation) - creates it if necessary 442 * </p> 443 * 444 * 445 */ 446 public AFF getAFF() { 447 return getTyped("AFF", AFF.class); 448 } 449 450 451 /** 452 * <p> 453 * Returns a specific repetition of 454 * AFF (Professional Affiliation) - creates it if necessary 455 * </p> 456 * 457 * 458 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 459 * @throws HL7Exception if the repetition requested is more than one 460 * greater than the number of existing repetitions. 461 */ 462 public AFF getAFF(int rep) { 463 return getTyped("AFF", rep, AFF.class); 464 } 465 466 /** 467 * <p> 468 * Returns the number of existing repetitions of AFF 469 * </p> 470 * 471 */ 472 public int getAFFReps() { 473 return getReps("AFF"); 474 } 475 476 /** 477 * <p> 478 * Returns a non-modifiable List containing all current existing repetitions of AFF. 479 * <p> 480 * <p> 481 * Note that unlike {@link #getAFF()}, this method will not create any reps 482 * if none are already present, so an empty list may be returned. 483 * </p> 484 * 485 */ 486 public java.util.List<AFF> getAFFAll() throws HL7Exception { 487 return getAllAsList("AFF", AFF.class); 488 } 489 490 /** 491 * <p> 492 * Inserts a specific repetition of AFF (Professional Affiliation) 493 * </p> 494 * 495 * 496 * @see AbstractGroup#insertRepetition(Structure, int) 497 */ 498 public void insertAFF(AFF structure, int rep) throws HL7Exception { 499 super.insertRepetition( "AFF", structure, rep); 500 } 501 502 503 /** 504 * <p> 505 * Inserts a specific repetition of AFF (Professional Affiliation) 506 * </p> 507 * 508 * 509 * @see AbstractGroup#insertRepetition(Structure, int) 510 */ 511 public AFF insertAFF(int rep) throws HL7Exception { 512 return (AFF)super.insertRepetition("AFF", rep); 513 } 514 515 516 /** 517 * <p> 518 * Removes a specific repetition of AFF (Professional Affiliation) 519 * </p> 520 * 521 * 522 * @see AbstractGroup#removeRepetition(String, int) 523 */ 524 public AFF removeAFF(int rep) throws HL7Exception { 525 return (AFF)super.removeRepetition("AFF", rep); 526 } 527 528 529 530 531 /** 532 * <p> 533 * Returns 534 * the first repetition of 535 * LAN (Language Detail) - creates it if necessary 536 * </p> 537 * 538 * 539 */ 540 public LAN getLAN() { 541 return getTyped("LAN", LAN.class); 542 } 543 544 545 /** 546 * <p> 547 * Returns a specific repetition of 548 * LAN (Language Detail) - creates it if necessary 549 * </p> 550 * 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 LAN getLAN(int rep) { 557 return getTyped("LAN", rep, LAN.class); 558 } 559 560 /** 561 * <p> 562 * Returns the number of existing repetitions of LAN 563 * </p> 564 * 565 */ 566 public int getLANReps() { 567 return getReps("LAN"); 568 } 569 570 /** 571 * <p> 572 * Returns a non-modifiable List containing all current existing repetitions of LAN. 573 * <p> 574 * <p> 575 * Note that unlike {@link #getLAN()}, this method will not create any reps 576 * if none are already present, so an empty list may be returned. 577 * </p> 578 * 579 */ 580 public java.util.List<LAN> getLANAll() throws HL7Exception { 581 return getAllAsList("LAN", LAN.class); 582 } 583 584 /** 585 * <p> 586 * Inserts a specific repetition of LAN (Language Detail) 587 * </p> 588 * 589 * 590 * @see AbstractGroup#insertRepetition(Structure, int) 591 */ 592 public void insertLAN(LAN structure, int rep) throws HL7Exception { 593 super.insertRepetition( "LAN", structure, rep); 594 } 595 596 597 /** 598 * <p> 599 * Inserts a specific repetition of LAN (Language Detail) 600 * </p> 601 * 602 * 603 * @see AbstractGroup#insertRepetition(Structure, int) 604 */ 605 public LAN insertLAN(int rep) throws HL7Exception { 606 return (LAN)super.insertRepetition("LAN", rep); 607 } 608 609 610 /** 611 * <p> 612 * Removes a specific repetition of LAN (Language Detail) 613 * </p> 614 * 615 * 616 * @see AbstractGroup#removeRepetition(String, int) 617 */ 618 public LAN removeLAN(int rep) throws HL7Exception { 619 return (LAN)super.removeRepetition("LAN", rep); 620 } 621 622 623 624 625 /** 626 * <p> 627 * Returns 628 * the first repetition of 629 * EDU (Educational Detail) - creates it if necessary 630 * </p> 631 * 632 * 633 */ 634 public EDU getEDU() { 635 return getTyped("EDU", EDU.class); 636 } 637 638 639 /** 640 * <p> 641 * Returns a specific repetition of 642 * EDU (Educational Detail) - creates it if necessary 643 * </p> 644 * 645 * 646 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 647 * @throws HL7Exception if the repetition requested is more than one 648 * greater than the number of existing repetitions. 649 */ 650 public EDU getEDU(int rep) { 651 return getTyped("EDU", rep, EDU.class); 652 } 653 654 /** 655 * <p> 656 * Returns the number of existing repetitions of EDU 657 * </p> 658 * 659 */ 660 public int getEDUReps() { 661 return getReps("EDU"); 662 } 663 664 /** 665 * <p> 666 * Returns a non-modifiable List containing all current existing repetitions of EDU. 667 * <p> 668 * <p> 669 * Note that unlike {@link #getEDU()}, this method will not create any reps 670 * if none are already present, so an empty list may be returned. 671 * </p> 672 * 673 */ 674 public java.util.List<EDU> getEDUAll() throws HL7Exception { 675 return getAllAsList("EDU", EDU.class); 676 } 677 678 /** 679 * <p> 680 * Inserts a specific repetition of EDU (Educational Detail) 681 * </p> 682 * 683 * 684 * @see AbstractGroup#insertRepetition(Structure, int) 685 */ 686 public void insertEDU(EDU structure, int rep) throws HL7Exception { 687 super.insertRepetition( "EDU", structure, rep); 688 } 689 690 691 /** 692 * <p> 693 * Inserts a specific repetition of EDU (Educational Detail) 694 * </p> 695 * 696 * 697 * @see AbstractGroup#insertRepetition(Structure, int) 698 */ 699 public EDU insertEDU(int rep) throws HL7Exception { 700 return (EDU)super.insertRepetition("EDU", rep); 701 } 702 703 704 /** 705 * <p> 706 * Removes a specific repetition of EDU (Educational Detail) 707 * </p> 708 * 709 * 710 * @see AbstractGroup#removeRepetition(String, int) 711 */ 712 public EDU removeEDU(int rep) throws HL7Exception { 713 return (EDU)super.removeRepetition("EDU", rep); 714 } 715 716 717 718 719 /** 720 * <p> 721 * Returns 722 * the first repetition of 723 * CER (Certificate Detail) - creates it if necessary 724 * </p> 725 * 726 * 727 */ 728 public CER getCER() { 729 return getTyped("CER", CER.class); 730 } 731 732 733 /** 734 * <p> 735 * Returns a specific repetition of 736 * CER (Certificate Detail) - creates it if necessary 737 * </p> 738 * 739 * 740 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 741 * @throws HL7Exception if the repetition requested is more than one 742 * greater than the number of existing repetitions. 743 */ 744 public CER getCER(int rep) { 745 return getTyped("CER", rep, CER.class); 746 } 747 748 /** 749 * <p> 750 * Returns the number of existing repetitions of CER 751 * </p> 752 * 753 */ 754 public int getCERReps() { 755 return getReps("CER"); 756 } 757 758 /** 759 * <p> 760 * Returns a non-modifiable List containing all current existing repetitions of CER. 761 * <p> 762 * <p> 763 * Note that unlike {@link #getCER()}, this method will not create any reps 764 * if none are already present, so an empty list may be returned. 765 * </p> 766 * 767 */ 768 public java.util.List<CER> getCERAll() throws HL7Exception { 769 return getAllAsList("CER", CER.class); 770 } 771 772 /** 773 * <p> 774 * Inserts a specific repetition of CER (Certificate Detail) 775 * </p> 776 * 777 * 778 * @see AbstractGroup#insertRepetition(Structure, int) 779 */ 780 public void insertCER(CER structure, int rep) throws HL7Exception { 781 super.insertRepetition( "CER", structure, rep); 782 } 783 784 785 /** 786 * <p> 787 * Inserts a specific repetition of CER (Certificate Detail) 788 * </p> 789 * 790 * 791 * @see AbstractGroup#insertRepetition(Structure, int) 792 */ 793 public CER insertCER(int rep) throws HL7Exception { 794 return (CER)super.insertRepetition("CER", rep); 795 } 796 797 798 /** 799 * <p> 800 * Removes a specific repetition of CER (Certificate Detail) 801 * </p> 802 * 803 * 804 * @see AbstractGroup#removeRepetition(String, int) 805 */ 806 public CER removeCER(int rep) throws HL7Exception { 807 return (CER)super.removeRepetition("CER", rep); 808 } 809 810 811 812} 813