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