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.v25.segment; 035 036// import ca.uhn.hl7v2.model.v25.group.*; 037import ca.uhn.hl7v2.model.v25.datatype.*; 038import ca.uhn.hl7v2.HL7Exception; 039import ca.uhn.hl7v2.parser.ModelClassFactory; 040import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 041import ca.uhn.hl7v2.model.AbstractMessage; 042import ca.uhn.hl7v2.model.Group; 043import ca.uhn.hl7v2.model.Type; 044import ca.uhn.hl7v2.model.AbstractSegment; 045import ca.uhn.hl7v2.model.Varies; 046 047/** 048 *<p>Represents an HL7 ERR message segment (Error). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>ERR-1: Error Code and Location (ELD) <b>optional repeating</b> 052 * <li>ERR-2: Error Location (ERL) <b>optional repeating</b> 053 * <li>ERR-3: HL7 Error Code (CWE) <b> </b> 054 * <li>ERR-4: Severity (ID) <b> </b> 055 * <li>ERR-5: Application Error Code (CWE) <b>optional </b> 056 * <li>ERR-6: Application Error Parameter (ST) <b>optional repeating</b> 057 * <li>ERR-7: Diagnostic Information (TX) <b>optional </b> 058 * <li>ERR-8: User Message (TX) <b>optional </b> 059 * <li>ERR-9: Inform Person Indicator (IS) <b>optional repeating</b> 060 * <li>ERR-10: Override Type (CWE) <b>optional </b> 061 * <li>ERR-11: Override Reason Code (CWE) <b>optional repeating</b> 062 * <li>ERR-12: Help Desk Contact Point (XTN) <b>optional repeating</b> 063 * </ul> 064 */ 065@SuppressWarnings("unused") 066public class ERR extends AbstractSegment { 067 068 /** 069 * Creates a new ERR segment 070 */ 071 public ERR(Group parent, ModelClassFactory factory) { 072 super(parent, factory); 073 init(factory); 074 } 075 076 private void init(ModelClassFactory factory) { 077 try { 078 this.add(ELD.class, false, 0, 493, new Object[]{ getMessage() }, "Error Code and Location"); 079 this.add(ERL.class, false, 0, 18, new Object[]{ getMessage() }, "Error Location"); 080 this.add(CWE.class, true, 1, 705, new Object[]{ getMessage() }, "HL7 Error Code"); 081 this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(516) }, "Severity"); 082 this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Application Error Code"); 083 this.add(ST.class, false, 0, 80, new Object[]{ getMessage() }, "Application Error Parameter"); 084 this.add(TX.class, false, 1, 2048, new Object[]{ getMessage() }, "Diagnostic Information"); 085 this.add(TX.class, false, 1, 250, new Object[]{ getMessage() }, "User Message"); 086 this.add(IS.class, false, 0, 20, new Object[]{ getMessage(), new Integer(517) }, "Inform Person Indicator"); 087 this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Override Type"); 088 this.add(CWE.class, false, 0, 705, new Object[]{ getMessage() }, "Override Reason Code"); 089 this.add(XTN.class, false, 0, 652, new Object[]{ getMessage() }, "Help Desk Contact Point"); 090 } catch(HL7Exception e) { 091 log.error("Unexpected error creating ERR - this is probably a bug in the source code generator.", e); 092 } 093 } 094 095 096 /** 097 * Returns all repetitions of Error Code and Location (ERR-1). 098 */ 099 public ELD[] getErrorCodeAndLocation() { 100 ELD[] retVal = this.getTypedField(1, new ELD[0]); 101 return retVal; 102 } 103 104 105 /** 106 * Returns all repetitions of Error Code and Location (ERR-1). 107 */ 108 public ELD[] getErr1_ErrorCodeAndLocation() { 109 ELD[] retVal = this.getTypedField(1, new ELD[0]); 110 return retVal; 111 } 112 113 114 /** 115 * Returns a count of the current number of repetitions of Error Code and Location (ERR-1). 116 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 117 * it will return zero. 118 */ 119 public int getErrorCodeAndLocationReps() { 120 return this.getReps(1); 121 } 122 123 124 /** 125 * Returns a specific repetition of 126 * ERR-1: "Error Code and Location" - creates it if necessary 127 * 128 * @param rep The repetition index (0-indexed) 129 */ 130 public ELD getErrorCodeAndLocation(int rep) { 131 ELD retVal = this.getTypedField(1, rep); 132 return retVal; 133 } 134 135 /** 136 * Returns a specific repetition of 137 * ERR-1: "Error Code and Location" - creates it if necessary 138 * 139 * @param rep The repetition index (0-indexed) 140 */ 141 public ELD getErr1_ErrorCodeAndLocation(int rep) { 142 ELD retVal = this.getTypedField(1, rep); 143 return retVal; 144 } 145 146 /** 147 * Returns a count of the current number of repetitions of Error Code and Location (ERR-1). 148 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 149 * it will return zero. 150 */ 151 public int getErr1_ErrorCodeAndLocationReps() { 152 return this.getReps(1); 153 } 154 155 156 /** 157 * Inserts a repetition of 158 * ERR-1: "Error Code and Location" at a specific index 159 * 160 * @param rep The repetition index (0-indexed) 161 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 162 */ 163 public ELD insertErrorCodeAndLocation(int rep) throws HL7Exception { 164 return (ELD) super.insertRepetition(1, rep); 165 } 166 167 168 /** 169 * Inserts a repetition of 170 * ERR-1: "Error Code and Location" at a specific index 171 * 172 * @param rep The repetition index (0-indexed) 173 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 174 */ 175 public ELD insertErr1_ErrorCodeAndLocation(int rep) throws HL7Exception { 176 return (ELD) super.insertRepetition(1, rep); 177 } 178 179 180 /** 181 * Removes a repetition of 182 * ERR-1: "Error Code and Location" at a specific index 183 * 184 * @param rep The repetition index (0-indexed) 185 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 186 */ 187 public ELD removeErrorCodeAndLocation(int rep) throws HL7Exception { 188 return (ELD) super.removeRepetition(1, rep); 189 } 190 191 192 /** 193 * Removes a repetition of 194 * ERR-1: "Error Code and Location" at a specific index 195 * 196 * @param rep The repetition index (0-indexed) 197 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 198 */ 199 public ELD removeErr1_ErrorCodeAndLocation(int rep) throws HL7Exception { 200 return (ELD) super.removeRepetition(1, rep); 201 } 202 203 204 205 /** 206 * Returns all repetitions of Error Location (ERR-2). 207 */ 208 public ERL[] getErrorLocation() { 209 ERL[] retVal = this.getTypedField(2, new ERL[0]); 210 return retVal; 211 } 212 213 214 /** 215 * Returns all repetitions of Error Location (ERR-2). 216 */ 217 public ERL[] getErr2_ErrorLocation() { 218 ERL[] retVal = this.getTypedField(2, new ERL[0]); 219 return retVal; 220 } 221 222 223 /** 224 * Returns a count of the current number of repetitions of Error Location (ERR-2). 225 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 226 * it will return zero. 227 */ 228 public int getErrorLocationReps() { 229 return this.getReps(2); 230 } 231 232 233 /** 234 * Returns a specific repetition of 235 * ERR-2: "Error Location" - creates it if necessary 236 * 237 * @param rep The repetition index (0-indexed) 238 */ 239 public ERL getErrorLocation(int rep) { 240 ERL retVal = this.getTypedField(2, rep); 241 return retVal; 242 } 243 244 /** 245 * Returns a specific repetition of 246 * ERR-2: "Error Location" - creates it if necessary 247 * 248 * @param rep The repetition index (0-indexed) 249 */ 250 public ERL getErr2_ErrorLocation(int rep) { 251 ERL retVal = this.getTypedField(2, rep); 252 return retVal; 253 } 254 255 /** 256 * Returns a count of the current number of repetitions of Error Location (ERR-2). 257 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 258 * it will return zero. 259 */ 260 public int getErr2_ErrorLocationReps() { 261 return this.getReps(2); 262 } 263 264 265 /** 266 * Inserts a repetition of 267 * ERR-2: "Error Location" at a specific index 268 * 269 * @param rep The repetition index (0-indexed) 270 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 271 */ 272 public ERL insertErrorLocation(int rep) throws HL7Exception { 273 return (ERL) super.insertRepetition(2, rep); 274 } 275 276 277 /** 278 * Inserts a repetition of 279 * ERR-2: "Error Location" at a specific index 280 * 281 * @param rep The repetition index (0-indexed) 282 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 283 */ 284 public ERL insertErr2_ErrorLocation(int rep) throws HL7Exception { 285 return (ERL) super.insertRepetition(2, rep); 286 } 287 288 289 /** 290 * Removes a repetition of 291 * ERR-2: "Error Location" at a specific index 292 * 293 * @param rep The repetition index (0-indexed) 294 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 295 */ 296 public ERL removeErrorLocation(int rep) throws HL7Exception { 297 return (ERL) super.removeRepetition(2, rep); 298 } 299 300 301 /** 302 * Removes a repetition of 303 * ERR-2: "Error Location" at a specific index 304 * 305 * @param rep The repetition index (0-indexed) 306 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 307 */ 308 public ERL removeErr2_ErrorLocation(int rep) throws HL7Exception { 309 return (ERL) super.removeRepetition(2, rep); 310 } 311 312 313 314 315 /** 316 * Returns 317 * ERR-3: "HL7 Error Code" - creates it if necessary 318 */ 319 public CWE getHL7ErrorCode() { 320 CWE retVal = this.getTypedField(3, 0); 321 return retVal; 322 } 323 324 /** 325 * Returns 326 * ERR-3: "HL7 Error Code" - creates it if necessary 327 */ 328 public CWE getErr3_HL7ErrorCode() { 329 CWE retVal = this.getTypedField(3, 0); 330 return retVal; 331 } 332 333 334 335 /** 336 * Returns 337 * ERR-4: "Severity" - creates it if necessary 338 */ 339 public ID getSeverity() { 340 ID retVal = this.getTypedField(4, 0); 341 return retVal; 342 } 343 344 /** 345 * Returns 346 * ERR-4: "Severity" - creates it if necessary 347 */ 348 public ID getErr4_Severity() { 349 ID retVal = this.getTypedField(4, 0); 350 return retVal; 351 } 352 353 354 355 /** 356 * Returns 357 * ERR-5: "Application Error Code" - creates it if necessary 358 */ 359 public CWE getApplicationErrorCode() { 360 CWE retVal = this.getTypedField(5, 0); 361 return retVal; 362 } 363 364 /** 365 * Returns 366 * ERR-5: "Application Error Code" - creates it if necessary 367 */ 368 public CWE getErr5_ApplicationErrorCode() { 369 CWE retVal = this.getTypedField(5, 0); 370 return retVal; 371 } 372 373 374 /** 375 * Returns all repetitions of Application Error Parameter (ERR-6). 376 */ 377 public ST[] getApplicationErrorParameter() { 378 ST[] retVal = this.getTypedField(6, new ST[0]); 379 return retVal; 380 } 381 382 383 /** 384 * Returns all repetitions of Application Error Parameter (ERR-6). 385 */ 386 public ST[] getErr6_ApplicationErrorParameter() { 387 ST[] retVal = this.getTypedField(6, new ST[0]); 388 return retVal; 389 } 390 391 392 /** 393 * Returns a count of the current number of repetitions of Application Error Parameter (ERR-6). 394 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 395 * it will return zero. 396 */ 397 public int getApplicationErrorParameterReps() { 398 return this.getReps(6); 399 } 400 401 402 /** 403 * Returns a specific repetition of 404 * ERR-6: "Application Error Parameter" - creates it if necessary 405 * 406 * @param rep The repetition index (0-indexed) 407 */ 408 public ST getApplicationErrorParameter(int rep) { 409 ST retVal = this.getTypedField(6, rep); 410 return retVal; 411 } 412 413 /** 414 * Returns a specific repetition of 415 * ERR-6: "Application Error Parameter" - creates it if necessary 416 * 417 * @param rep The repetition index (0-indexed) 418 */ 419 public ST getErr6_ApplicationErrorParameter(int rep) { 420 ST retVal = this.getTypedField(6, rep); 421 return retVal; 422 } 423 424 /** 425 * Returns a count of the current number of repetitions of Application Error Parameter (ERR-6). 426 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 427 * it will return zero. 428 */ 429 public int getErr6_ApplicationErrorParameterReps() { 430 return this.getReps(6); 431 } 432 433 434 /** 435 * Inserts a repetition of 436 * ERR-6: "Application Error Parameter" at a specific index 437 * 438 * @param rep The repetition index (0-indexed) 439 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 440 */ 441 public ST insertApplicationErrorParameter(int rep) throws HL7Exception { 442 return (ST) super.insertRepetition(6, rep); 443 } 444 445 446 /** 447 * Inserts a repetition of 448 * ERR-6: "Application Error Parameter" at a specific index 449 * 450 * @param rep The repetition index (0-indexed) 451 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 452 */ 453 public ST insertErr6_ApplicationErrorParameter(int rep) throws HL7Exception { 454 return (ST) super.insertRepetition(6, rep); 455 } 456 457 458 /** 459 * Removes a repetition of 460 * ERR-6: "Application Error Parameter" at a specific index 461 * 462 * @param rep The repetition index (0-indexed) 463 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 464 */ 465 public ST removeApplicationErrorParameter(int rep) throws HL7Exception { 466 return (ST) super.removeRepetition(6, rep); 467 } 468 469 470 /** 471 * Removes a repetition of 472 * ERR-6: "Application Error Parameter" at a specific index 473 * 474 * @param rep The repetition index (0-indexed) 475 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 476 */ 477 public ST removeErr6_ApplicationErrorParameter(int rep) throws HL7Exception { 478 return (ST) super.removeRepetition(6, rep); 479 } 480 481 482 483 484 /** 485 * Returns 486 * ERR-7: "Diagnostic Information" - creates it if necessary 487 */ 488 public TX getDiagnosticInformation() { 489 TX retVal = this.getTypedField(7, 0); 490 return retVal; 491 } 492 493 /** 494 * Returns 495 * ERR-7: "Diagnostic Information" - creates it if necessary 496 */ 497 public TX getErr7_DiagnosticInformation() { 498 TX retVal = this.getTypedField(7, 0); 499 return retVal; 500 } 501 502 503 504 /** 505 * Returns 506 * ERR-8: "User Message" - creates it if necessary 507 */ 508 public TX getUserMessage() { 509 TX retVal = this.getTypedField(8, 0); 510 return retVal; 511 } 512 513 /** 514 * Returns 515 * ERR-8: "User Message" - creates it if necessary 516 */ 517 public TX getErr8_UserMessage() { 518 TX retVal = this.getTypedField(8, 0); 519 return retVal; 520 } 521 522 523 /** 524 * Returns all repetitions of Inform Person Indicator (ERR-9). 525 */ 526 public IS[] getInformPersonIndicator() { 527 IS[] retVal = this.getTypedField(9, new IS[0]); 528 return retVal; 529 } 530 531 532 /** 533 * Returns all repetitions of Inform Person Indicator (ERR-9). 534 */ 535 public IS[] getErr9_InformPersonIndicator() { 536 IS[] retVal = this.getTypedField(9, new IS[0]); 537 return retVal; 538 } 539 540 541 /** 542 * Returns a count of the current number of repetitions of Inform Person Indicator (ERR-9). 543 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 544 * it will return zero. 545 */ 546 public int getInformPersonIndicatorReps() { 547 return this.getReps(9); 548 } 549 550 551 /** 552 * Returns a specific repetition of 553 * ERR-9: "Inform Person Indicator" - creates it if necessary 554 * 555 * @param rep The repetition index (0-indexed) 556 */ 557 public IS getInformPersonIndicator(int rep) { 558 IS retVal = this.getTypedField(9, rep); 559 return retVal; 560 } 561 562 /** 563 * Returns a specific repetition of 564 * ERR-9: "Inform Person Indicator" - creates it if necessary 565 * 566 * @param rep The repetition index (0-indexed) 567 */ 568 public IS getErr9_InformPersonIndicator(int rep) { 569 IS retVal = this.getTypedField(9, rep); 570 return retVal; 571 } 572 573 /** 574 * Returns a count of the current number of repetitions of Inform Person Indicator (ERR-9). 575 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 576 * it will return zero. 577 */ 578 public int getErr9_InformPersonIndicatorReps() { 579 return this.getReps(9); 580 } 581 582 583 /** 584 * Inserts a repetition of 585 * ERR-9: "Inform Person Indicator" at a specific index 586 * 587 * @param rep The repetition index (0-indexed) 588 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 589 */ 590 public IS insertInformPersonIndicator(int rep) throws HL7Exception { 591 return (IS) super.insertRepetition(9, rep); 592 } 593 594 595 /** 596 * Inserts a repetition of 597 * ERR-9: "Inform Person Indicator" at a specific index 598 * 599 * @param rep The repetition index (0-indexed) 600 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 601 */ 602 public IS insertErr9_InformPersonIndicator(int rep) throws HL7Exception { 603 return (IS) super.insertRepetition(9, rep); 604 } 605 606 607 /** 608 * Removes a repetition of 609 * ERR-9: "Inform Person Indicator" at a specific index 610 * 611 * @param rep The repetition index (0-indexed) 612 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 613 */ 614 public IS removeInformPersonIndicator(int rep) throws HL7Exception { 615 return (IS) super.removeRepetition(9, rep); 616 } 617 618 619 /** 620 * Removes a repetition of 621 * ERR-9: "Inform Person Indicator" at a specific index 622 * 623 * @param rep The repetition index (0-indexed) 624 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 625 */ 626 public IS removeErr9_InformPersonIndicator(int rep) throws HL7Exception { 627 return (IS) super.removeRepetition(9, rep); 628 } 629 630 631 632 633 /** 634 * Returns 635 * ERR-10: "Override Type" - creates it if necessary 636 */ 637 public CWE getOverrideType() { 638 CWE retVal = this.getTypedField(10, 0); 639 return retVal; 640 } 641 642 /** 643 * Returns 644 * ERR-10: "Override Type" - creates it if necessary 645 */ 646 public CWE getErr10_OverrideType() { 647 CWE retVal = this.getTypedField(10, 0); 648 return retVal; 649 } 650 651 652 /** 653 * Returns all repetitions of Override Reason Code (ERR-11). 654 */ 655 public CWE[] getOverrideReasonCode() { 656 CWE[] retVal = this.getTypedField(11, new CWE[0]); 657 return retVal; 658 } 659 660 661 /** 662 * Returns all repetitions of Override Reason Code (ERR-11). 663 */ 664 public CWE[] getErr11_OverrideReasonCode() { 665 CWE[] retVal = this.getTypedField(11, new CWE[0]); 666 return retVal; 667 } 668 669 670 /** 671 * Returns a count of the current number of repetitions of Override Reason Code (ERR-11). 672 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 673 * it will return zero. 674 */ 675 public int getOverrideReasonCodeReps() { 676 return this.getReps(11); 677 } 678 679 680 /** 681 * Returns a specific repetition of 682 * ERR-11: "Override Reason Code" - creates it if necessary 683 * 684 * @param rep The repetition index (0-indexed) 685 */ 686 public CWE getOverrideReasonCode(int rep) { 687 CWE retVal = this.getTypedField(11, rep); 688 return retVal; 689 } 690 691 /** 692 * Returns a specific repetition of 693 * ERR-11: "Override Reason Code" - creates it if necessary 694 * 695 * @param rep The repetition index (0-indexed) 696 */ 697 public CWE getErr11_OverrideReasonCode(int rep) { 698 CWE retVal = this.getTypedField(11, rep); 699 return retVal; 700 } 701 702 /** 703 * Returns a count of the current number of repetitions of Override Reason Code (ERR-11). 704 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 705 * it will return zero. 706 */ 707 public int getErr11_OverrideReasonCodeReps() { 708 return this.getReps(11); 709 } 710 711 712 /** 713 * Inserts a repetition of 714 * ERR-11: "Override Reason Code" at a specific index 715 * 716 * @param rep The repetition index (0-indexed) 717 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 718 */ 719 public CWE insertOverrideReasonCode(int rep) throws HL7Exception { 720 return (CWE) super.insertRepetition(11, rep); 721 } 722 723 724 /** 725 * Inserts a repetition of 726 * ERR-11: "Override Reason Code" at a specific index 727 * 728 * @param rep The repetition index (0-indexed) 729 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 730 */ 731 public CWE insertErr11_OverrideReasonCode(int rep) throws HL7Exception { 732 return (CWE) super.insertRepetition(11, rep); 733 } 734 735 736 /** 737 * Removes a repetition of 738 * ERR-11: "Override Reason Code" at a specific index 739 * 740 * @param rep The repetition index (0-indexed) 741 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 742 */ 743 public CWE removeOverrideReasonCode(int rep) throws HL7Exception { 744 return (CWE) super.removeRepetition(11, rep); 745 } 746 747 748 /** 749 * Removes a repetition of 750 * ERR-11: "Override Reason Code" at a specific index 751 * 752 * @param rep The repetition index (0-indexed) 753 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 754 */ 755 public CWE removeErr11_OverrideReasonCode(int rep) throws HL7Exception { 756 return (CWE) super.removeRepetition(11, rep); 757 } 758 759 760 761 /** 762 * Returns all repetitions of Help Desk Contact Point (ERR-12). 763 */ 764 public XTN[] getHelpDeskContactPoint() { 765 XTN[] retVal = this.getTypedField(12, new XTN[0]); 766 return retVal; 767 } 768 769 770 /** 771 * Returns all repetitions of Help Desk Contact Point (ERR-12). 772 */ 773 public XTN[] getErr12_HelpDeskContactPoint() { 774 XTN[] retVal = this.getTypedField(12, new XTN[0]); 775 return retVal; 776 } 777 778 779 /** 780 * Returns a count of the current number of repetitions of Help Desk Contact Point (ERR-12). 781 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 782 * it will return zero. 783 */ 784 public int getHelpDeskContactPointReps() { 785 return this.getReps(12); 786 } 787 788 789 /** 790 * Returns a specific repetition of 791 * ERR-12: "Help Desk Contact Point" - creates it if necessary 792 * 793 * @param rep The repetition index (0-indexed) 794 */ 795 public XTN getHelpDeskContactPoint(int rep) { 796 XTN retVal = this.getTypedField(12, rep); 797 return retVal; 798 } 799 800 /** 801 * Returns a specific repetition of 802 * ERR-12: "Help Desk Contact Point" - creates it if necessary 803 * 804 * @param rep The repetition index (0-indexed) 805 */ 806 public XTN getErr12_HelpDeskContactPoint(int rep) { 807 XTN retVal = this.getTypedField(12, rep); 808 return retVal; 809 } 810 811 /** 812 * Returns a count of the current number of repetitions of Help Desk Contact Point (ERR-12). 813 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 814 * it will return zero. 815 */ 816 public int getErr12_HelpDeskContactPointReps() { 817 return this.getReps(12); 818 } 819 820 821 /** 822 * Inserts a repetition of 823 * ERR-12: "Help Desk Contact Point" at a specific index 824 * 825 * @param rep The repetition index (0-indexed) 826 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 827 */ 828 public XTN insertHelpDeskContactPoint(int rep) throws HL7Exception { 829 return (XTN) super.insertRepetition(12, rep); 830 } 831 832 833 /** 834 * Inserts a repetition of 835 * ERR-12: "Help Desk Contact Point" at a specific index 836 * 837 * @param rep The repetition index (0-indexed) 838 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 839 */ 840 public XTN insertErr12_HelpDeskContactPoint(int rep) throws HL7Exception { 841 return (XTN) super.insertRepetition(12, rep); 842 } 843 844 845 /** 846 * Removes a repetition of 847 * ERR-12: "Help Desk Contact Point" at a specific index 848 * 849 * @param rep The repetition index (0-indexed) 850 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 851 */ 852 public XTN removeHelpDeskContactPoint(int rep) throws HL7Exception { 853 return (XTN) super.removeRepetition(12, rep); 854 } 855 856 857 /** 858 * Removes a repetition of 859 * ERR-12: "Help Desk Contact Point" at a specific index 860 * 861 * @param rep The repetition index (0-indexed) 862 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 863 */ 864 public XTN removeErr12_HelpDeskContactPoint(int rep) throws HL7Exception { 865 return (XTN) super.removeRepetition(12, rep); 866 } 867 868 869 870 871 872 873 /** {@inheritDoc} */ 874 protected Type createNewTypeWithoutReflection(int field) { 875 switch (field) { 876 case 0: return new ELD(getMessage()); 877 case 1: return new ERL(getMessage()); 878 case 2: return new CWE(getMessage()); 879 case 3: return new ID(getMessage(), new Integer( 516 )); 880 case 4: return new CWE(getMessage()); 881 case 5: return new ST(getMessage()); 882 case 6: return new TX(getMessage()); 883 case 7: return new TX(getMessage()); 884 case 8: return new IS(getMessage(), new Integer( 517 )); 885 case 9: return new CWE(getMessage()); 886 case 10: return new CWE(getMessage()); 887 case 11: return new XTN(getMessage()); 888 default: return null; 889 } 890 } 891 892 893} 894