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.v231.message; 035 036import ca.uhn.hl7v2.model.v231.group.*; 037import ca.uhn.hl7v2.model.v231.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 RCL_I06 message structure (see chapter ?). This structure contains the 047 * following elements: </p> 048 * <ul> 049 * <li>1: MSH (MSH - message header segment) <b> </b> </li> 050 * <li>2: MSA (MSA - message acknowledgment segment) <b> </b> </li> 051 * <li>3: QRD (QRD - original-style query definition segment) <b> </b> </li> 052 * <li>4: QRF (QRF - original style query filter segment) <b>optional </b> </li> 053 * <li>5: RCL_I06_PRDCTD (a Group object) <b> repeating</b> </li> 054 * <li>6: PID (PID - patient identification segment) <b> </b> </li> 055 * <li>7: DG1 (DG1 - diagnosis segment) <b>optional repeating</b> </li> 056 * <li>8: DRG (DRG - diagnosis related group segment) <b>optional repeating</b> </li> 057 * <li>9: AL1 (AL1 - patient allergy information segment) <b>optional repeating</b> </li> 058 * <li>10: NTE (NTE - notes and comments segment) <b>optional repeating</b> </li> 059 * <li>11: DSP (DSP - display data segment) <b>optional repeating</b> </li> 060 * <li>12: DSC (DSC - Continuation pointer segment) <b>optional </b> </li> 061 * </ul> 062 */ 063//@SuppressWarnings("unused") 064public class RCL_I06 extends AbstractMessage { 065 066 /** 067 * Creates a new RCL_I06 message with DefaultModelClassFactory. 068 */ 069 public RCL_I06() { 070 this(new DefaultModelClassFactory()); 071 } 072 073 /** 074 * Creates a new RCL_I06 message with custom ModelClassFactory. 075 */ 076 public RCL_I06(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(MSA.class, true, false); 085 this.add(QRD.class, true, false); 086 this.add(QRF.class, false, false); 087 this.add(RCL_I06_PRDCTD.class, true, true); 088 this.add(PID.class, true, false); 089 this.add(DG1.class, false, true); 090 this.add(DRG.class, false, true); 091 this.add(AL1.class, false, true); 092 this.add(NTE.class, false, true); 093 this.add(DSP.class, false, true); 094 this.add(DSC.class, false, false); 095 } catch(HL7Exception e) { 096 log.error("Unexpected error creating RCL_I06 - this is probably a bug in the source code generator.", e); 097 } 098 } 099 100 101 /** 102 * Returns "2.3.1" 103 */ 104 public String getVersion() { 105 return "2.3.1"; 106 } 107 108 109 110 111 /** 112 * <p> 113 * Returns 114 * MSH (MSH - message header segment) - 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 * MSA (MSA - message acknowledgment segment) - creates it if necessary 131 * </p> 132 * 133 * 134 */ 135 public MSA getMSA() { 136 return getTyped("MSA", MSA.class); 137 } 138 139 140 141 142 143 /** 144 * <p> 145 * Returns 146 * QRD (QRD - original-style query definition segment) - creates it if necessary 147 * </p> 148 * 149 * 150 */ 151 public QRD getQRD() { 152 return getTyped("QRD", QRD.class); 153 } 154 155 156 157 158 159 /** 160 * <p> 161 * Returns 162 * QRF (QRF - original style query filter segment) - creates it if necessary 163 * </p> 164 * 165 * 166 */ 167 public QRF getQRF() { 168 return getTyped("QRF", QRF.class); 169 } 170 171 172 173 174 175 /** 176 * <p> 177 * Returns 178 * the first repetition of 179 * PRDCTD (a Group object) - creates it if necessary 180 * </p> 181 * 182 * 183 */ 184 public RCL_I06_PRDCTD getPRDCTD() { 185 return getTyped("PRDCTD", RCL_I06_PRDCTD.class); 186 } 187 188 189 /** 190 * <p> 191 * Returns a specific repetition of 192 * PRDCTD (a Group object) - creates it if necessary 193 * </p> 194 * 195 * 196 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 197 * @throws HL7Exception if the repetition requested is more than one 198 * greater than the number of existing repetitions. 199 */ 200 public RCL_I06_PRDCTD getPRDCTD(int rep) { 201 return getTyped("PRDCTD", rep, RCL_I06_PRDCTD.class); 202 } 203 204 /** 205 * <p> 206 * Returns the number of existing repetitions of PRDCTD 207 * </p> 208 * 209 */ 210 public int getPRDCTDReps() { 211 return getReps("PRDCTD"); 212 } 213 214 /** 215 * <p> 216 * Returns a non-modifiable List containing all current existing repetitions of PRDCTD. 217 * <p> 218 * <p> 219 * Note that unlike {@link #getPRDCTD()}, this method will not create any reps 220 * if none are already present, so an empty list may be returned. 221 * </p> 222 * 223 */ 224 public java.util.List<RCL_I06_PRDCTD> getPRDCTDAll() throws HL7Exception { 225 return getAllAsList("PRDCTD", RCL_I06_PRDCTD.class); 226 } 227 228 /** 229 * <p> 230 * Inserts a specific repetition of PRDCTD (a Group object) 231 * </p> 232 * 233 * 234 * @see AbstractGroup#insertRepetition(Structure, int) 235 */ 236 public void insertPRDCTD(RCL_I06_PRDCTD structure, int rep) throws HL7Exception { 237 super.insertRepetition( "PRDCTD", structure, rep); 238 } 239 240 241 /** 242 * <p> 243 * Inserts a specific repetition of PRDCTD (a Group object) 244 * </p> 245 * 246 * 247 * @see AbstractGroup#insertRepetition(Structure, int) 248 */ 249 public RCL_I06_PRDCTD insertPRDCTD(int rep) throws HL7Exception { 250 return (RCL_I06_PRDCTD)super.insertRepetition("PRDCTD", rep); 251 } 252 253 254 /** 255 * <p> 256 * Removes a specific repetition of PRDCTD (a Group object) 257 * </p> 258 * 259 * 260 * @see AbstractGroup#removeRepetition(String, int) 261 */ 262 public RCL_I06_PRDCTD removePRDCTD(int rep) throws HL7Exception { 263 return (RCL_I06_PRDCTD)super.removeRepetition("PRDCTD", rep); 264 } 265 266 267 268 269 /** 270 * <p> 271 * Returns 272 * PID (PID - patient identification segment) - creates it if necessary 273 * </p> 274 * 275 * 276 */ 277 public PID getPID() { 278 return getTyped("PID", PID.class); 279 } 280 281 282 283 284 285 /** 286 * <p> 287 * Returns 288 * the first repetition of 289 * DG1 (DG1 - diagnosis segment) - creates it if necessary 290 * </p> 291 * 292 * 293 */ 294 public DG1 getDG1() { 295 return getTyped("DG1", DG1.class); 296 } 297 298 299 /** 300 * <p> 301 * Returns a specific repetition of 302 * DG1 (DG1 - diagnosis segment) - creates it if necessary 303 * </p> 304 * 305 * 306 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 307 * @throws HL7Exception if the repetition requested is more than one 308 * greater than the number of existing repetitions. 309 */ 310 public DG1 getDG1(int rep) { 311 return getTyped("DG1", rep, DG1.class); 312 } 313 314 /** 315 * <p> 316 * Returns the number of existing repetitions of DG1 317 * </p> 318 * 319 */ 320 public int getDG1Reps() { 321 return getReps("DG1"); 322 } 323 324 /** 325 * <p> 326 * Returns a non-modifiable List containing all current existing repetitions of DG1. 327 * <p> 328 * <p> 329 * Note that unlike {@link #getDG1()}, this method will not create any reps 330 * if none are already present, so an empty list may be returned. 331 * </p> 332 * 333 */ 334 public java.util.List<DG1> getDG1All() throws HL7Exception { 335 return getAllAsList("DG1", DG1.class); 336 } 337 338 /** 339 * <p> 340 * Inserts a specific repetition of DG1 (DG1 - diagnosis segment) 341 * </p> 342 * 343 * 344 * @see AbstractGroup#insertRepetition(Structure, int) 345 */ 346 public void insertDG1(DG1 structure, int rep) throws HL7Exception { 347 super.insertRepetition( "DG1", structure, rep); 348 } 349 350 351 /** 352 * <p> 353 * Inserts a specific repetition of DG1 (DG1 - diagnosis segment) 354 * </p> 355 * 356 * 357 * @see AbstractGroup#insertRepetition(Structure, int) 358 */ 359 public DG1 insertDG1(int rep) throws HL7Exception { 360 return (DG1)super.insertRepetition("DG1", rep); 361 } 362 363 364 /** 365 * <p> 366 * Removes a specific repetition of DG1 (DG1 - diagnosis segment) 367 * </p> 368 * 369 * 370 * @see AbstractGroup#removeRepetition(String, int) 371 */ 372 public DG1 removeDG1(int rep) throws HL7Exception { 373 return (DG1)super.removeRepetition("DG1", rep); 374 } 375 376 377 378 379 /** 380 * <p> 381 * Returns 382 * the first repetition of 383 * DRG (DRG - diagnosis related group segment) - creates it if necessary 384 * </p> 385 * 386 * 387 */ 388 public DRG getDRG() { 389 return getTyped("DRG", DRG.class); 390 } 391 392 393 /** 394 * <p> 395 * Returns a specific repetition of 396 * DRG (DRG - diagnosis related group segment) - creates it if necessary 397 * </p> 398 * 399 * 400 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 401 * @throws HL7Exception if the repetition requested is more than one 402 * greater than the number of existing repetitions. 403 */ 404 public DRG getDRG(int rep) { 405 return getTyped("DRG", rep, DRG.class); 406 } 407 408 /** 409 * <p> 410 * Returns the number of existing repetitions of DRG 411 * </p> 412 * 413 */ 414 public int getDRGReps() { 415 return getReps("DRG"); 416 } 417 418 /** 419 * <p> 420 * Returns a non-modifiable List containing all current existing repetitions of DRG. 421 * <p> 422 * <p> 423 * Note that unlike {@link #getDRG()}, this method will not create any reps 424 * if none are already present, so an empty list may be returned. 425 * </p> 426 * 427 */ 428 public java.util.List<DRG> getDRGAll() throws HL7Exception { 429 return getAllAsList("DRG", DRG.class); 430 } 431 432 /** 433 * <p> 434 * Inserts a specific repetition of DRG (DRG - diagnosis related group segment) 435 * </p> 436 * 437 * 438 * @see AbstractGroup#insertRepetition(Structure, int) 439 */ 440 public void insertDRG(DRG structure, int rep) throws HL7Exception { 441 super.insertRepetition( "DRG", structure, rep); 442 } 443 444 445 /** 446 * <p> 447 * Inserts a specific repetition of DRG (DRG - diagnosis related group segment) 448 * </p> 449 * 450 * 451 * @see AbstractGroup#insertRepetition(Structure, int) 452 */ 453 public DRG insertDRG(int rep) throws HL7Exception { 454 return (DRG)super.insertRepetition("DRG", rep); 455 } 456 457 458 /** 459 * <p> 460 * Removes a specific repetition of DRG (DRG - diagnosis related group segment) 461 * </p> 462 * 463 * 464 * @see AbstractGroup#removeRepetition(String, int) 465 */ 466 public DRG removeDRG(int rep) throws HL7Exception { 467 return (DRG)super.removeRepetition("DRG", rep); 468 } 469 470 471 472 473 /** 474 * <p> 475 * Returns 476 * the first repetition of 477 * AL1 (AL1 - patient allergy information segment) - creates it if necessary 478 * </p> 479 * 480 * 481 */ 482 public AL1 getAL1() { 483 return getTyped("AL1", AL1.class); 484 } 485 486 487 /** 488 * <p> 489 * Returns a specific repetition of 490 * AL1 (AL1 - patient allergy information segment) - 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 AL1 getAL1(int rep) { 499 return getTyped("AL1", rep, AL1.class); 500 } 501 502 /** 503 * <p> 504 * Returns the number of existing repetitions of AL1 505 * </p> 506 * 507 */ 508 public int getAL1Reps() { 509 return getReps("AL1"); 510 } 511 512 /** 513 * <p> 514 * Returns a non-modifiable List containing all current existing repetitions of AL1. 515 * <p> 516 * <p> 517 * Note that unlike {@link #getAL1()}, 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<AL1> getAL1All() throws HL7Exception { 523 return getAllAsList("AL1", AL1.class); 524 } 525 526 /** 527 * <p> 528 * Inserts a specific repetition of AL1 (AL1 - patient allergy information segment) 529 * </p> 530 * 531 * 532 * @see AbstractGroup#insertRepetition(Structure, int) 533 */ 534 public void insertAL1(AL1 structure, int rep) throws HL7Exception { 535 super.insertRepetition( "AL1", structure, rep); 536 } 537 538 539 /** 540 * <p> 541 * Inserts a specific repetition of AL1 (AL1 - patient allergy information segment) 542 * </p> 543 * 544 * 545 * @see AbstractGroup#insertRepetition(Structure, int) 546 */ 547 public AL1 insertAL1(int rep) throws HL7Exception { 548 return (AL1)super.insertRepetition("AL1", rep); 549 } 550 551 552 /** 553 * <p> 554 * Removes a specific repetition of AL1 (AL1 - patient allergy information segment) 555 * </p> 556 * 557 * 558 * @see AbstractGroup#removeRepetition(String, int) 559 */ 560 public AL1 removeAL1(int rep) throws HL7Exception { 561 return (AL1)super.removeRepetition("AL1", rep); 562 } 563 564 565 566 567 /** 568 * <p> 569 * Returns 570 * the first repetition of 571 * NTE (NTE - notes and comments segment) - creates it if necessary 572 * </p> 573 * 574 * 575 */ 576 public NTE getNTE() { 577 return getTyped("NTE", NTE.class); 578 } 579 580 581 /** 582 * <p> 583 * Returns a specific repetition of 584 * NTE (NTE - notes and comments segment) - 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 NTE getNTE(int rep) { 593 return getTyped("NTE", rep, NTE.class); 594 } 595 596 /** 597 * <p> 598 * Returns the number of existing repetitions of NTE 599 * </p> 600 * 601 */ 602 public int getNTEReps() { 603 return getReps("NTE"); 604 } 605 606 /** 607 * <p> 608 * Returns a non-modifiable List containing all current existing repetitions of NTE. 609 * <p> 610 * <p> 611 * Note that unlike {@link #getNTE()}, 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<NTE> getNTEAll() throws HL7Exception { 617 return getAllAsList("NTE", NTE.class); 618 } 619 620 /** 621 * <p> 622 * Inserts a specific repetition of NTE (NTE - notes and comments segment) 623 * </p> 624 * 625 * 626 * @see AbstractGroup#insertRepetition(Structure, int) 627 */ 628 public void insertNTE(NTE structure, int rep) throws HL7Exception { 629 super.insertRepetition( "NTE", structure, rep); 630 } 631 632 633 /** 634 * <p> 635 * Inserts a specific repetition of NTE (NTE - notes and comments segment) 636 * </p> 637 * 638 * 639 * @see AbstractGroup#insertRepetition(Structure, int) 640 */ 641 public NTE insertNTE(int rep) throws HL7Exception { 642 return (NTE)super.insertRepetition("NTE", rep); 643 } 644 645 646 /** 647 * <p> 648 * Removes a specific repetition of NTE (NTE - notes and comments segment) 649 * </p> 650 * 651 * 652 * @see AbstractGroup#removeRepetition(String, int) 653 */ 654 public NTE removeNTE(int rep) throws HL7Exception { 655 return (NTE)super.removeRepetition("NTE", rep); 656 } 657 658 659 660 661 /** 662 * <p> 663 * Returns 664 * the first repetition of 665 * DSP (DSP - display data segment) - creates it if necessary 666 * </p> 667 * 668 * 669 */ 670 public DSP getDSP() { 671 return getTyped("DSP", DSP.class); 672 } 673 674 675 /** 676 * <p> 677 * Returns a specific repetition of 678 * DSP (DSP - display data segment) - 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 DSP getDSP(int rep) { 687 return getTyped("DSP", rep, DSP.class); 688 } 689 690 /** 691 * <p> 692 * Returns the number of existing repetitions of DSP 693 * </p> 694 * 695 */ 696 public int getDSPReps() { 697 return getReps("DSP"); 698 } 699 700 /** 701 * <p> 702 * Returns a non-modifiable List containing all current existing repetitions of DSP. 703 * <p> 704 * <p> 705 * Note that unlike {@link #getDSP()}, 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<DSP> getDSPAll() throws HL7Exception { 711 return getAllAsList("DSP", DSP.class); 712 } 713 714 /** 715 * <p> 716 * Inserts a specific repetition of DSP (DSP - display data segment) 717 * </p> 718 * 719 * 720 * @see AbstractGroup#insertRepetition(Structure, int) 721 */ 722 public void insertDSP(DSP structure, int rep) throws HL7Exception { 723 super.insertRepetition( "DSP", structure, rep); 724 } 725 726 727 /** 728 * <p> 729 * Inserts a specific repetition of DSP (DSP - display data segment) 730 * </p> 731 * 732 * 733 * @see AbstractGroup#insertRepetition(Structure, int) 734 */ 735 public DSP insertDSP(int rep) throws HL7Exception { 736 return (DSP)super.insertRepetition("DSP", rep); 737 } 738 739 740 /** 741 * <p> 742 * Removes a specific repetition of DSP (DSP - display data segment) 743 * </p> 744 * 745 * 746 * @see AbstractGroup#removeRepetition(String, int) 747 */ 748 public DSP removeDSP(int rep) throws HL7Exception { 749 return (DSP)super.removeRepetition("DSP", rep); 750 } 751 752 753 754 755 /** 756 * <p> 757 * Returns 758 * DSC (DSC - Continuation pointer segment) - creates it if necessary 759 * </p> 760 * 761 * 762 */ 763 public DSC getDSC() { 764 return getTyped("DSC", DSC.class); 765 } 766 767 768 769 770} 771