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