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.v26.message; 35 36 import ca.uhn.hl7v2.model.v26.group.*; 37 import ca.uhn.hl7v2.model.v26.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 VXR_V03 message structure (see chapter 4.17.5). This structure contains the 47 * following elements: </p> 48 * <ul> 49 * <li>1: MSH (Message Header) <b> </b> </li> 50 * <li>2: MSA (Message Acknowledgment) <b> </b> </li> 51 * <li>3: SFT (Software Segment) <b>optional repeating</b> </li> 52 * <li>4: UAC (User Authentication Credential Segment) <b>optional </b> </li> 53 * <li>5: QRD (Original-Style Query Definition) <b> </b> </li> 54 * <li>6: QRF (Original style query filter) <b>optional </b> </li> 55 * <li>7: PID (Patient Identification) <b> </b> </li> 56 * <li>8: PD1 (Patient Additional Demographic) <b>optional </b> </li> 57 * <li>9: NK1 (Next of Kin / Associated Parties) <b>optional repeating</b> </li> 58 * <li>10: VXR_V03_PATIENT_VISIT (a Group object) <b>optional </b> </li> 59 * <li>11: GT1 (Guarantor) <b>optional repeating</b> </li> 60 * <li>12: VXR_V03_INSURANCE (a Group object) <b>optional repeating</b> </li> 61 * <li>13: VXR_V03_ORDER (a Group object) <b>optional repeating</b> </li> 62 * </ul> 63 */ 64 //@SuppressWarnings("unused") 65 public class VXR_V03 extends AbstractMessage { 66 67 /** 68 * Creates a new VXR_V03 message with DefaultModelClassFactory. 69 */ 70 public VXR_V03() { 71 this(new DefaultModelClassFactory()); 72 } 73 74 /** 75 * Creates a new VXR_V03 message with custom ModelClassFactory. 76 */ 77 public VXR_V03(ModelClassFactory factory) { 78 super(factory); 79 init(factory); 80 } 81 82 private void init(ModelClassFactory factory) { 83 try { 84 this.add(MSH.class, true, false); 85 this.add(MSA.class, true, false); 86 this.add(SFT.class, false, true); 87 this.add(UAC.class, false, false); 88 this.add(QRD.class, true, false); 89 this.add(QRF.class, false, false); 90 this.add(PID.class, true, false); 91 this.add(PD1.class, false, false); 92 this.add(NK1.class, false, true); 93 this.add(VXR_V03_PATIENT_VISIT.class, false, false); 94 this.add(GT1.class, false, true); 95 this.add(VXR_V03_INSURANCE.class, false, true); 96 this.add(VXR_V03_ORDER.class, false, true); 97 } catch(HL7Exception e) { 98 log.error("Unexpected error creating VXR_V03 - this is probably a bug in the source code generator.", e); 99 } 100 } 101 102 103 /** 104 * Returns "2.6" 105 */ 106 public String getVersion() { 107 return "2.6"; 108 } 109 110 111 112 113 /** 114 * <p> 115 * Returns 116 * MSH (Message Header) - creates it if necessary 117 * </p> 118 * 119 * 120 */ 121 public MSH getMSH() { 122 return getTyped("MSH", MSH.class); 123 } 124 125 126 127 128 129 /** 130 * <p> 131 * Returns 132 * MSA (Message Acknowledgment) - creates it if necessary 133 * </p> 134 * 135 * 136 */ 137 public MSA getMSA() { 138 return getTyped("MSA", MSA.class); 139 } 140 141 142 143 144 145 /** 146 * <p> 147 * Returns 148 * the first repetition of 149 * SFT (Software Segment) - creates it if necessary 150 * </p> 151 * 152 * 153 */ 154 public SFT getSFT() { 155 return getTyped("SFT", SFT.class); 156 } 157 158 159 /** 160 * <p> 161 * Returns a specific repetition of 162 * SFT (Software Segment) - creates it if necessary 163 * </p> 164 * 165 * 166 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 167 * @throws HL7Exception if the repetition requested is more than one 168 * greater than the number of existing repetitions. 169 */ 170 public SFT getSFT(int rep) { 171 return getTyped("SFT", rep, SFT.class); 172 } 173 174 /** 175 * <p> 176 * Returns the number of existing repetitions of SFT 177 * </p> 178 * 179 */ 180 public int getSFTReps() { 181 return getReps("SFT"); 182 } 183 184 /** 185 * <p> 186 * Returns a non-modifiable List containing all current existing repetitions of SFT. 187 * <p> 188 * <p> 189 * Note that unlike {@link #getSFT()}, this method will not create any reps 190 * if none are already present, so an empty list may be returned. 191 * </p> 192 * 193 */ 194 public java.util.List<SFT> getSFTAll() throws HL7Exception { 195 return getAllAsList("SFT", SFT.class); 196 } 197 198 /** 199 * <p> 200 * Inserts a specific repetition of SFT (Software Segment) 201 * </p> 202 * 203 * 204 * @see AbstractGroup#insertRepetition(Structure, int) 205 */ 206 public void insertSFT(SFT structure, int rep) throws HL7Exception { 207 super.insertRepetition( "SFT", structure, rep); 208 } 209 210 211 /** 212 * <p> 213 * Inserts a specific repetition of SFT (Software Segment) 214 * </p> 215 * 216 * 217 * @see AbstractGroup#insertRepetition(Structure, int) 218 */ 219 public SFT insertSFT(int rep) throws HL7Exception { 220 return (SFT)super.insertRepetition("SFT", rep); 221 } 222 223 224 /** 225 * <p> 226 * Removes a specific repetition of SFT (Software Segment) 227 * </p> 228 * 229 * 230 * @see AbstractGroup#removeRepetition(String, int) 231 */ 232 public SFT removeSFT(int rep) throws HL7Exception { 233 return (SFT)super.removeRepetition("SFT", rep); 234 } 235 236 237 238 239 /** 240 * <p> 241 * Returns 242 * UAC (User Authentication Credential Segment) - creates it if necessary 243 * </p> 244 * 245 * 246 */ 247 public UAC getUAC() { 248 return getTyped("UAC", UAC.class); 249 } 250 251 252 253 254 255 /** 256 * <p> 257 * Returns 258 * QRD (Original-Style Query Definition) - creates it if necessary 259 * </p> 260 * 261 * 262 */ 263 public QRD getQRD() { 264 return getTyped("QRD", QRD.class); 265 } 266 267 268 269 270 271 /** 272 * <p> 273 * Returns 274 * QRF (Original style query filter) - creates it if necessary 275 * </p> 276 * 277 * 278 */ 279 public QRF getQRF() { 280 return getTyped("QRF", QRF.class); 281 } 282 283 284 285 286 287 /** 288 * <p> 289 * Returns 290 * PID (Patient Identification) - creates it if necessary 291 * </p> 292 * 293 * 294 */ 295 public PID getPID() { 296 return getTyped("PID", PID.class); 297 } 298 299 300 301 302 303 /** 304 * <p> 305 * Returns 306 * PD1 (Patient Additional Demographic) - creates it if necessary 307 * </p> 308 * 309 * 310 */ 311 public PD1 getPD1() { 312 return getTyped("PD1", PD1.class); 313 } 314 315 316 317 318 319 /** 320 * <p> 321 * Returns 322 * the first repetition of 323 * NK1 (Next of Kin / Associated Parties) - creates it if necessary 324 * </p> 325 * 326 * 327 */ 328 public NK1 getNK1() { 329 return getTyped("NK1", NK1.class); 330 } 331 332 333 /** 334 * <p> 335 * Returns a specific repetition of 336 * NK1 (Next of Kin / Associated Parties) - 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 NK1 getNK1(int rep) { 345 return getTyped("NK1", rep, NK1.class); 346 } 347 348 /** 349 * <p> 350 * Returns the number of existing repetitions of NK1 351 * </p> 352 * 353 */ 354 public int getNK1Reps() { 355 return getReps("NK1"); 356 } 357 358 /** 359 * <p> 360 * Returns a non-modifiable List containing all current existing repetitions of NK1. 361 * <p> 362 * <p> 363 * Note that unlike {@link #getNK1()}, 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<NK1> getNK1All() throws HL7Exception { 369 return getAllAsList("NK1", NK1.class); 370 } 371 372 /** 373 * <p> 374 * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties) 375 * </p> 376 * 377 * 378 * @see AbstractGroup#insertRepetition(Structure, int) 379 */ 380 public void insertNK1(NK1 structure, int rep) throws HL7Exception { 381 super.insertRepetition( "NK1", structure, rep); 382 } 383 384 385 /** 386 * <p> 387 * Inserts a specific repetition of NK1 (Next of Kin / Associated Parties) 388 * </p> 389 * 390 * 391 * @see AbstractGroup#insertRepetition(Structure, int) 392 */ 393 public NK1 insertNK1(int rep) throws HL7Exception { 394 return (NK1)super.insertRepetition("NK1", rep); 395 } 396 397 398 /** 399 * <p> 400 * Removes a specific repetition of NK1 (Next of Kin / Associated Parties) 401 * </p> 402 * 403 * 404 * @see AbstractGroup#removeRepetition(String, int) 405 */ 406 public NK1 removeNK1(int rep) throws HL7Exception { 407 return (NK1)super.removeRepetition("NK1", rep); 408 } 409 410 411 412 413 /** 414 * <p> 415 * Returns 416 * PATIENT_VISIT (a Group object) - creates it if necessary 417 * </p> 418 * 419 * 420 */ 421 public VXR_V03_PATIENT_VISIT getPATIENT_VISIT() { 422 return getTyped("PATIENT_VISIT", VXR_V03_PATIENT_VISIT.class); 423 } 424 425 426 427 428 429 /** 430 * <p> 431 * Returns 432 * the first repetition of 433 * GT1 (Guarantor) - creates it if necessary 434 * </p> 435 * 436 * 437 */ 438 public GT1 getGT1() { 439 return getTyped("GT1", GT1.class); 440 } 441 442 443 /** 444 * <p> 445 * Returns a specific repetition of 446 * GT1 (Guarantor) - creates it if necessary 447 * </p> 448 * 449 * 450 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 451 * @throws HL7Exception if the repetition requested is more than one 452 * greater than the number of existing repetitions. 453 */ 454 public GT1 getGT1(int rep) { 455 return getTyped("GT1", rep, GT1.class); 456 } 457 458 /** 459 * <p> 460 * Returns the number of existing repetitions of GT1 461 * </p> 462 * 463 */ 464 public int getGT1Reps() { 465 return getReps("GT1"); 466 } 467 468 /** 469 * <p> 470 * Returns a non-modifiable List containing all current existing repetitions of GT1. 471 * <p> 472 * <p> 473 * Note that unlike {@link #getGT1()}, this method will not create any reps 474 * if none are already present, so an empty list may be returned. 475 * </p> 476 * 477 */ 478 public java.util.List<GT1> getGT1All() throws HL7Exception { 479 return getAllAsList("GT1", GT1.class); 480 } 481 482 /** 483 * <p> 484 * Inserts a specific repetition of GT1 (Guarantor) 485 * </p> 486 * 487 * 488 * @see AbstractGroup#insertRepetition(Structure, int) 489 */ 490 public void insertGT1(GT1 structure, int rep) throws HL7Exception { 491 super.insertRepetition( "GT1", structure, rep); 492 } 493 494 495 /** 496 * <p> 497 * Inserts a specific repetition of GT1 (Guarantor) 498 * </p> 499 * 500 * 501 * @see AbstractGroup#insertRepetition(Structure, int) 502 */ 503 public GT1 insertGT1(int rep) throws HL7Exception { 504 return (GT1)super.insertRepetition("GT1", rep); 505 } 506 507 508 /** 509 * <p> 510 * Removes a specific repetition of GT1 (Guarantor) 511 * </p> 512 * 513 * 514 * @see AbstractGroup#removeRepetition(String, int) 515 */ 516 public GT1 removeGT1(int rep) throws HL7Exception { 517 return (GT1)super.removeRepetition("GT1", rep); 518 } 519 520 521 522 523 /** 524 * <p> 525 * Returns 526 * the first repetition of 527 * INSURANCE (a Group object) - creates it if necessary 528 * </p> 529 * 530 * 531 */ 532 public VXR_V03_INSURANCE getINSURANCE() { 533 return getTyped("INSURANCE", VXR_V03_INSURANCE.class); 534 } 535 536 537 /** 538 * <p> 539 * Returns a specific repetition of 540 * INSURANCE (a Group object) - creates it if necessary 541 * </p> 542 * 543 * 544 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 545 * @throws HL7Exception if the repetition requested is more than one 546 * greater than the number of existing repetitions. 547 */ 548 public VXR_V03_INSURANCE getINSURANCE(int rep) { 549 return getTyped("INSURANCE", rep, VXR_V03_INSURANCE.class); 550 } 551 552 /** 553 * <p> 554 * Returns the number of existing repetitions of INSURANCE 555 * </p> 556 * 557 */ 558 public int getINSURANCEReps() { 559 return getReps("INSURANCE"); 560 } 561 562 /** 563 * <p> 564 * Returns a non-modifiable List containing all current existing repetitions of INSURANCE. 565 * <p> 566 * <p> 567 * Note that unlike {@link #getINSURANCE()}, this method will not create any reps 568 * if none are already present, so an empty list may be returned. 569 * </p> 570 * 571 */ 572 public java.util.List<VXR_V03_INSURANCE> getINSURANCEAll() throws HL7Exception { 573 return getAllAsList("INSURANCE", VXR_V03_INSURANCE.class); 574 } 575 576 /** 577 * <p> 578 * Inserts a specific repetition of INSURANCE (a Group object) 579 * </p> 580 * 581 * 582 * @see AbstractGroup#insertRepetition(Structure, int) 583 */ 584 public void insertINSURANCE(VXR_V03_INSURANCE structure, int rep) throws HL7Exception { 585 super.insertRepetition( "INSURANCE", structure, rep); 586 } 587 588 589 /** 590 * <p> 591 * Inserts a specific repetition of INSURANCE (a Group object) 592 * </p> 593 * 594 * 595 * @see AbstractGroup#insertRepetition(Structure, int) 596 */ 597 public VXR_V03_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 598 return (VXR_V03_INSURANCE)super.insertRepetition("INSURANCE", rep); 599 } 600 601 602 /** 603 * <p> 604 * Removes a specific repetition of INSURANCE (a Group object) 605 * </p> 606 * 607 * 608 * @see AbstractGroup#removeRepetition(String, int) 609 */ 610 public VXR_V03_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 611 return (VXR_V03_INSURANCE)super.removeRepetition("INSURANCE", rep); 612 } 613 614 615 616 617 /** 618 * <p> 619 * Returns 620 * the first repetition of 621 * ORDER (a Group object) - creates it if necessary 622 * </p> 623 * 624 * 625 */ 626 public VXR_V03_ORDER getORDER() { 627 return getTyped("ORDER", VXR_V03_ORDER.class); 628 } 629 630 631 /** 632 * <p> 633 * Returns a specific repetition of 634 * ORDER (a Group object) - creates it if necessary 635 * </p> 636 * 637 * 638 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 639 * @throws HL7Exception if the repetition requested is more than one 640 * greater than the number of existing repetitions. 641 */ 642 public VXR_V03_ORDER getORDER(int rep) { 643 return getTyped("ORDER", rep, VXR_V03_ORDER.class); 644 } 645 646 /** 647 * <p> 648 * Returns the number of existing repetitions of ORDER 649 * </p> 650 * 651 */ 652 public int getORDERReps() { 653 return getReps("ORDER"); 654 } 655 656 /** 657 * <p> 658 * Returns a non-modifiable List containing all current existing repetitions of ORDER. 659 * <p> 660 * <p> 661 * Note that unlike {@link #getORDER()}, this method will not create any reps 662 * if none are already present, so an empty list may be returned. 663 * </p> 664 * 665 */ 666 public java.util.List<VXR_V03_ORDER> getORDERAll() throws HL7Exception { 667 return getAllAsList("ORDER", VXR_V03_ORDER.class); 668 } 669 670 /** 671 * <p> 672 * Inserts a specific repetition of ORDER (a Group object) 673 * </p> 674 * 675 * 676 * @see AbstractGroup#insertRepetition(Structure, int) 677 */ 678 public void insertORDER(VXR_V03_ORDER structure, int rep) throws HL7Exception { 679 super.insertRepetition( "ORDER", structure, rep); 680 } 681 682 683 /** 684 * <p> 685 * Inserts a specific repetition of ORDER (a Group object) 686 * </p> 687 * 688 * 689 * @see AbstractGroup#insertRepetition(Structure, int) 690 */ 691 public VXR_V03_ORDER insertORDER(int rep) throws HL7Exception { 692 return (VXR_V03_ORDER)super.insertRepetition("ORDER", rep); 693 } 694 695 696 /** 697 * <p> 698 * Removes a specific repetition of ORDER (a Group object) 699 * </p> 700 * 701 * 702 * @see AbstractGroup#removeRepetition(String, int) 703 */ 704 public VXR_V03_ORDER removeORDER(int rep) throws HL7Exception { 705 return (VXR_V03_ORDER)super.removeRepetition("ORDER", rep); 706 } 707 708 709 710 } 711