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