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