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