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