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