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 PCR message segment (Possible Causal Relationship). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>PCR-1: Implicated Product (CE) <b> </b> 052 * <li>PCR-2: Generic Product (IS) <b>optional </b> 053 * <li>PCR-3: Product Class (CE) <b>optional </b> 054 * <li>PCR-4: Total Duration Of Therapy (CQ) <b>optional </b> 055 * <li>PCR-5: Product Manufacture Date (TS) <b>optional </b> 056 * <li>PCR-6: Product Expiration Date (TS) <b>optional </b> 057 * <li>PCR-7: Product Implantation Date (TS) <b>optional </b> 058 * <li>PCR-8: Product Explantation Date (TS) <b>optional </b> 059 * <li>PCR-9: Single Use Device (IS) <b>optional </b> 060 * <li>PCR-10: Indication For Product Use (CE) <b>optional </b> 061 * <li>PCR-11: Product Problem (IS) <b>optional </b> 062 * <li>PCR-12: Product Serial/Lot Number (ST) <b>optional repeating</b> 063 * <li>PCR-13: Product Available For Inspection (IS) <b>optional </b> 064 * <li>PCR-14: Product Evaluation Performed (CE) <b>optional </b> 065 * <li>PCR-15: Product Evaluation Status (CE) <b>optional </b> 066 * <li>PCR-16: Product Evaluation Results (CE) <b>optional </b> 067 * <li>PCR-17: Evaluated Product Source (ID) <b>optional </b> 068 * <li>PCR-18: Date Product Returned To Manufacturer (TS) <b>optional </b> 069 * <li>PCR-19: Device Operator Qualifications (ID) <b>optional </b> 070 * <li>PCR-20: Relatedness Assessment (ID) <b>optional </b> 071 * <li>PCR-21: Action Taken In Response To The Event (ID) <b>optional repeating</b> 072 * <li>PCR-22: Event Causality Observations (ID) <b>optional repeating</b> 073 * <li>PCR-23: Indirect Exposure Mechanism (ID) <b>optional repeating</b> 074 * </ul> 075 */ 076@SuppressWarnings("unused") 077public class PCR extends AbstractSegment { 078 079 /** 080 * Creates a new PCR segment 081 */ 082 public PCR(Group parent, ModelClassFactory factory) { 083 super(parent, factory); 084 init(factory); 085 } 086 087 private void init(ModelClassFactory factory) { 088 try { 089 this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Implicated Product"); 090 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(249) }, "Generic Product"); 091 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Product Class"); 092 this.add(CQ.class, false, 1, 8, new Object[]{ getMessage() }, "Total Duration Of Therapy"); 093 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Product Manufacture Date"); 094 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Product Expiration Date"); 095 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Product Implantation Date"); 096 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Product Explantation Date"); 097 this.add(IS.class, false, 1, 8, new Object[]{ getMessage(), new Integer(244) }, "Single Use Device"); 098 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Indication For Product Use"); 099 this.add(IS.class, false, 1, 8, new Object[]{ getMessage(), new Integer(245) }, "Product Problem"); 100 this.add(ST.class, false, 0, 30, new Object[]{ getMessage() }, "Product Serial/Lot Number"); 101 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(246) }, "Product Available For Inspection"); 102 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Product Evaluation Performed"); 103 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Product Evaluation Status"); 104 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Product Evaluation Results"); 105 this.add(ID.class, false, 1, 8, new Object[]{ getMessage(), new Integer(248) }, "Evaluated Product Source"); 106 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date Product Returned To Manufacturer"); 107 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(242) }, "Device Operator Qualifications"); 108 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(250) }, "Relatedness Assessment"); 109 this.add(ID.class, false, 0, 2, new Object[]{ getMessage(), new Integer(251) }, "Action Taken In Response To The Event"); 110 this.add(ID.class, false, 0, 2, new Object[]{ getMessage(), new Integer(252) }, "Event Causality Observations"); 111 this.add(ID.class, false, 0, 1, new Object[]{ getMessage(), new Integer(253) }, "Indirect Exposure Mechanism"); 112 } catch(HL7Exception e) { 113 log.error("Unexpected error creating PCR - this is probably a bug in the source code generator.", e); 114 } 115 } 116 117 118 119 /** 120 * Returns 121 * PCR-1: "Implicated Product" - creates it if necessary 122 */ 123 public CE getImplicatedProduct() { 124 CE retVal = this.getTypedField(1, 0); 125 return retVal; 126 } 127 128 /** 129 * Returns 130 * PCR-1: "Implicated Product" - creates it if necessary 131 */ 132 public CE getPcr1_ImplicatedProduct() { 133 CE retVal = this.getTypedField(1, 0); 134 return retVal; 135 } 136 137 138 139 /** 140 * Returns 141 * PCR-2: "Generic Product" - creates it if necessary 142 */ 143 public IS getGenericProduct() { 144 IS retVal = this.getTypedField(2, 0); 145 return retVal; 146 } 147 148 /** 149 * Returns 150 * PCR-2: "Generic Product" - creates it if necessary 151 */ 152 public IS getPcr2_GenericProduct() { 153 IS retVal = this.getTypedField(2, 0); 154 return retVal; 155 } 156 157 158 159 /** 160 * Returns 161 * PCR-3: "Product Class" - creates it if necessary 162 */ 163 public CE getProductClass() { 164 CE retVal = this.getTypedField(3, 0); 165 return retVal; 166 } 167 168 /** 169 * Returns 170 * PCR-3: "Product Class" - creates it if necessary 171 */ 172 public CE getPcr3_ProductClass() { 173 CE retVal = this.getTypedField(3, 0); 174 return retVal; 175 } 176 177 178 179 /** 180 * Returns 181 * PCR-4: "Total Duration Of Therapy" - creates it if necessary 182 */ 183 public CQ getTotalDurationOfTherapy() { 184 CQ retVal = this.getTypedField(4, 0); 185 return retVal; 186 } 187 188 /** 189 * Returns 190 * PCR-4: "Total Duration Of Therapy" - creates it if necessary 191 */ 192 public CQ getPcr4_TotalDurationOfTherapy() { 193 CQ retVal = this.getTypedField(4, 0); 194 return retVal; 195 } 196 197 198 199 /** 200 * Returns 201 * PCR-5: "Product Manufacture Date" - creates it if necessary 202 */ 203 public TS getProductManufactureDate() { 204 TS retVal = this.getTypedField(5, 0); 205 return retVal; 206 } 207 208 /** 209 * Returns 210 * PCR-5: "Product Manufacture Date" - creates it if necessary 211 */ 212 public TS getPcr5_ProductManufactureDate() { 213 TS retVal = this.getTypedField(5, 0); 214 return retVal; 215 } 216 217 218 219 /** 220 * Returns 221 * PCR-6: "Product Expiration Date" - creates it if necessary 222 */ 223 public TS getProductExpirationDate() { 224 TS retVal = this.getTypedField(6, 0); 225 return retVal; 226 } 227 228 /** 229 * Returns 230 * PCR-6: "Product Expiration Date" - creates it if necessary 231 */ 232 public TS getPcr6_ProductExpirationDate() { 233 TS retVal = this.getTypedField(6, 0); 234 return retVal; 235 } 236 237 238 239 /** 240 * Returns 241 * PCR-7: "Product Implantation Date" - creates it if necessary 242 */ 243 public TS getProductImplantationDate() { 244 TS retVal = this.getTypedField(7, 0); 245 return retVal; 246 } 247 248 /** 249 * Returns 250 * PCR-7: "Product Implantation Date" - creates it if necessary 251 */ 252 public TS getPcr7_ProductImplantationDate() { 253 TS retVal = this.getTypedField(7, 0); 254 return retVal; 255 } 256 257 258 259 /** 260 * Returns 261 * PCR-8: "Product Explantation Date" - creates it if necessary 262 */ 263 public TS getProductExplantationDate() { 264 TS retVal = this.getTypedField(8, 0); 265 return retVal; 266 } 267 268 /** 269 * Returns 270 * PCR-8: "Product Explantation Date" - creates it if necessary 271 */ 272 public TS getPcr8_ProductExplantationDate() { 273 TS retVal = this.getTypedField(8, 0); 274 return retVal; 275 } 276 277 278 279 /** 280 * Returns 281 * PCR-9: "Single Use Device" - creates it if necessary 282 */ 283 public IS getSingleUseDevice() { 284 IS retVal = this.getTypedField(9, 0); 285 return retVal; 286 } 287 288 /** 289 * Returns 290 * PCR-9: "Single Use Device" - creates it if necessary 291 */ 292 public IS getPcr9_SingleUseDevice() { 293 IS retVal = this.getTypedField(9, 0); 294 return retVal; 295 } 296 297 298 299 /** 300 * Returns 301 * PCR-10: "Indication For Product Use" - creates it if necessary 302 */ 303 public CE getIndicationForProductUse() { 304 CE retVal = this.getTypedField(10, 0); 305 return retVal; 306 } 307 308 /** 309 * Returns 310 * PCR-10: "Indication For Product Use" - creates it if necessary 311 */ 312 public CE getPcr10_IndicationForProductUse() { 313 CE retVal = this.getTypedField(10, 0); 314 return retVal; 315 } 316 317 318 319 /** 320 * Returns 321 * PCR-11: "Product Problem" - creates it if necessary 322 */ 323 public IS getProductProblem() { 324 IS retVal = this.getTypedField(11, 0); 325 return retVal; 326 } 327 328 /** 329 * Returns 330 * PCR-11: "Product Problem" - creates it if necessary 331 */ 332 public IS getPcr11_ProductProblem() { 333 IS retVal = this.getTypedField(11, 0); 334 return retVal; 335 } 336 337 338 /** 339 * Returns all repetitions of Product Serial/Lot Number (PCR-12). 340 */ 341 public ST[] getProductSerialLotNumber() { 342 ST[] retVal = this.getTypedField(12, new ST[0]); 343 return retVal; 344 } 345 346 347 /** 348 * Returns all repetitions of Product Serial/Lot Number (PCR-12). 349 */ 350 public ST[] getPcr12_ProductSerialLotNumber() { 351 ST[] retVal = this.getTypedField(12, new ST[0]); 352 return retVal; 353 } 354 355 356 /** 357 * Returns a count of the current number of repetitions of Product Serial/Lot Number (PCR-12). 358 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 359 * it will return zero. 360 */ 361 public int getProductSerialLotNumberReps() { 362 return this.getReps(12); 363 } 364 365 366 /** 367 * Returns a specific repetition of 368 * PCR-12: "Product Serial/Lot Number" - creates it if necessary 369 * 370 * @param rep The repetition index (0-indexed) 371 */ 372 public ST getProductSerialLotNumber(int rep) { 373 ST retVal = this.getTypedField(12, rep); 374 return retVal; 375 } 376 377 /** 378 * Returns a specific repetition of 379 * PCR-12: "Product Serial/Lot Number" - creates it if necessary 380 * 381 * @param rep The repetition index (0-indexed) 382 */ 383 public ST getPcr12_ProductSerialLotNumber(int rep) { 384 ST retVal = this.getTypedField(12, rep); 385 return retVal; 386 } 387 388 /** 389 * Returns a count of the current number of repetitions of Product Serial/Lot Number (PCR-12). 390 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 391 * it will return zero. 392 */ 393 public int getPcr12_ProductSerialLotNumberReps() { 394 return this.getReps(12); 395 } 396 397 398 /** 399 * Inserts a repetition of 400 * PCR-12: "Product Serial/Lot Number" at a specific index 401 * 402 * @param rep The repetition index (0-indexed) 403 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 404 */ 405 public ST insertProductSerialLotNumber(int rep) throws HL7Exception { 406 return (ST) super.insertRepetition(12, rep); 407 } 408 409 410 /** 411 * Inserts a repetition of 412 * PCR-12: "Product Serial/Lot Number" at a specific index 413 * 414 * @param rep The repetition index (0-indexed) 415 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 416 */ 417 public ST insertPcr12_ProductSerialLotNumber(int rep) throws HL7Exception { 418 return (ST) super.insertRepetition(12, rep); 419 } 420 421 422 /** 423 * Removes a repetition of 424 * PCR-12: "Product Serial/Lot Number" at a specific index 425 * 426 * @param rep The repetition index (0-indexed) 427 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 428 */ 429 public ST removeProductSerialLotNumber(int rep) throws HL7Exception { 430 return (ST) super.removeRepetition(12, rep); 431 } 432 433 434 /** 435 * Removes a repetition of 436 * PCR-12: "Product Serial/Lot Number" at a specific index 437 * 438 * @param rep The repetition index (0-indexed) 439 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 440 */ 441 public ST removePcr12_ProductSerialLotNumber(int rep) throws HL7Exception { 442 return (ST) super.removeRepetition(12, rep); 443 } 444 445 446 447 448 /** 449 * Returns 450 * PCR-13: "Product Available For Inspection" - creates it if necessary 451 */ 452 public IS getProductAvailableForInspection() { 453 IS retVal = this.getTypedField(13, 0); 454 return retVal; 455 } 456 457 /** 458 * Returns 459 * PCR-13: "Product Available For Inspection" - creates it if necessary 460 */ 461 public IS getPcr13_ProductAvailableForInspection() { 462 IS retVal = this.getTypedField(13, 0); 463 return retVal; 464 } 465 466 467 468 /** 469 * Returns 470 * PCR-14: "Product Evaluation Performed" - creates it if necessary 471 */ 472 public CE getProductEvaluationPerformed() { 473 CE retVal = this.getTypedField(14, 0); 474 return retVal; 475 } 476 477 /** 478 * Returns 479 * PCR-14: "Product Evaluation Performed" - creates it if necessary 480 */ 481 public CE getPcr14_ProductEvaluationPerformed() { 482 CE retVal = this.getTypedField(14, 0); 483 return retVal; 484 } 485 486 487 488 /** 489 * Returns 490 * PCR-15: "Product Evaluation Status" - creates it if necessary 491 */ 492 public CE getProductEvaluationStatus() { 493 CE retVal = this.getTypedField(15, 0); 494 return retVal; 495 } 496 497 /** 498 * Returns 499 * PCR-15: "Product Evaluation Status" - creates it if necessary 500 */ 501 public CE getPcr15_ProductEvaluationStatus() { 502 CE retVal = this.getTypedField(15, 0); 503 return retVal; 504 } 505 506 507 508 /** 509 * Returns 510 * PCR-16: "Product Evaluation Results" - creates it if necessary 511 */ 512 public CE getProductEvaluationResults() { 513 CE retVal = this.getTypedField(16, 0); 514 return retVal; 515 } 516 517 /** 518 * Returns 519 * PCR-16: "Product Evaluation Results" - creates it if necessary 520 */ 521 public CE getPcr16_ProductEvaluationResults() { 522 CE retVal = this.getTypedField(16, 0); 523 return retVal; 524 } 525 526 527 528 /** 529 * Returns 530 * PCR-17: "Evaluated Product Source" - creates it if necessary 531 */ 532 public ID getEvaluatedProductSource() { 533 ID retVal = this.getTypedField(17, 0); 534 return retVal; 535 } 536 537 /** 538 * Returns 539 * PCR-17: "Evaluated Product Source" - creates it if necessary 540 */ 541 public ID getPcr17_EvaluatedProductSource() { 542 ID retVal = this.getTypedField(17, 0); 543 return retVal; 544 } 545 546 547 548 /** 549 * Returns 550 * PCR-18: "Date Product Returned To Manufacturer" - creates it if necessary 551 */ 552 public TS getDateProductReturnedToManufacturer() { 553 TS retVal = this.getTypedField(18, 0); 554 return retVal; 555 } 556 557 /** 558 * Returns 559 * PCR-18: "Date Product Returned To Manufacturer" - creates it if necessary 560 */ 561 public TS getPcr18_DateProductReturnedToManufacturer() { 562 TS retVal = this.getTypedField(18, 0); 563 return retVal; 564 } 565 566 567 568 /** 569 * Returns 570 * PCR-19: "Device Operator Qualifications" - creates it if necessary 571 */ 572 public ID getDeviceOperatorQualifications() { 573 ID retVal = this.getTypedField(19, 0); 574 return retVal; 575 } 576 577 /** 578 * Returns 579 * PCR-19: "Device Operator Qualifications" - creates it if necessary 580 */ 581 public ID getPcr19_DeviceOperatorQualifications() { 582 ID retVal = this.getTypedField(19, 0); 583 return retVal; 584 } 585 586 587 588 /** 589 * Returns 590 * PCR-20: "Relatedness Assessment" - creates it if necessary 591 */ 592 public ID getRelatednessAssessment() { 593 ID retVal = this.getTypedField(20, 0); 594 return retVal; 595 } 596 597 /** 598 * Returns 599 * PCR-20: "Relatedness Assessment" - creates it if necessary 600 */ 601 public ID getPcr20_RelatednessAssessment() { 602 ID retVal = this.getTypedField(20, 0); 603 return retVal; 604 } 605 606 607 /** 608 * Returns all repetitions of Action Taken In Response To The Event (PCR-21). 609 */ 610 public ID[] getActionTakenInResponseToTheEvent() { 611 ID[] retVal = this.getTypedField(21, new ID[0]); 612 return retVal; 613 } 614 615 616 /** 617 * Returns all repetitions of Action Taken In Response To The Event (PCR-21). 618 */ 619 public ID[] getPcr21_ActionTakenInResponseToTheEvent() { 620 ID[] retVal = this.getTypedField(21, new ID[0]); 621 return retVal; 622 } 623 624 625 /** 626 * Returns a count of the current number of repetitions of Action Taken In Response To The Event (PCR-21). 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 getActionTakenInResponseToTheEventReps() { 631 return this.getReps(21); 632 } 633 634 635 /** 636 * Returns a specific repetition of 637 * PCR-21: "Action Taken In Response To The Event" - creates it if necessary 638 * 639 * @param rep The repetition index (0-indexed) 640 */ 641 public ID getActionTakenInResponseToTheEvent(int rep) { 642 ID retVal = this.getTypedField(21, rep); 643 return retVal; 644 } 645 646 /** 647 * Returns a specific repetition of 648 * PCR-21: "Action Taken In Response To The Event" - creates it if necessary 649 * 650 * @param rep The repetition index (0-indexed) 651 */ 652 public ID getPcr21_ActionTakenInResponseToTheEvent(int rep) { 653 ID retVal = this.getTypedField(21, rep); 654 return retVal; 655 } 656 657 /** 658 * Returns a count of the current number of repetitions of Action Taken In Response To The Event (PCR-21). 659 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 660 * it will return zero. 661 */ 662 public int getPcr21_ActionTakenInResponseToTheEventReps() { 663 return this.getReps(21); 664 } 665 666 667 /** 668 * Inserts a repetition of 669 * PCR-21: "Action Taken In Response To The Event" at a specific index 670 * 671 * @param rep The repetition index (0-indexed) 672 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 673 */ 674 public ID insertActionTakenInResponseToTheEvent(int rep) throws HL7Exception { 675 return (ID) super.insertRepetition(21, rep); 676 } 677 678 679 /** 680 * Inserts a repetition of 681 * PCR-21: "Action Taken In Response To The Event" at a specific index 682 * 683 * @param rep The repetition index (0-indexed) 684 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 685 */ 686 public ID insertPcr21_ActionTakenInResponseToTheEvent(int rep) throws HL7Exception { 687 return (ID) super.insertRepetition(21, rep); 688 } 689 690 691 /** 692 * Removes a repetition of 693 * PCR-21: "Action Taken In Response To The Event" at a specific index 694 * 695 * @param rep The repetition index (0-indexed) 696 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 697 */ 698 public ID removeActionTakenInResponseToTheEvent(int rep) throws HL7Exception { 699 return (ID) super.removeRepetition(21, rep); 700 } 701 702 703 /** 704 * Removes a repetition of 705 * PCR-21: "Action Taken In Response To The Event" at a specific index 706 * 707 * @param rep The repetition index (0-indexed) 708 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 709 */ 710 public ID removePcr21_ActionTakenInResponseToTheEvent(int rep) throws HL7Exception { 711 return (ID) super.removeRepetition(21, rep); 712 } 713 714 715 716 /** 717 * Returns all repetitions of Event Causality Observations (PCR-22). 718 */ 719 public ID[] getEventCausalityObservations() { 720 ID[] retVal = this.getTypedField(22, new ID[0]); 721 return retVal; 722 } 723 724 725 /** 726 * Returns all repetitions of Event Causality Observations (PCR-22). 727 */ 728 public ID[] getPcr22_EventCausalityObservations() { 729 ID[] retVal = this.getTypedField(22, new ID[0]); 730 return retVal; 731 } 732 733 734 /** 735 * Returns a count of the current number of repetitions of Event Causality Observations (PCR-22). 736 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 737 * it will return zero. 738 */ 739 public int getEventCausalityObservationsReps() { 740 return this.getReps(22); 741 } 742 743 744 /** 745 * Returns a specific repetition of 746 * PCR-22: "Event Causality Observations" - creates it if necessary 747 * 748 * @param rep The repetition index (0-indexed) 749 */ 750 public ID getEventCausalityObservations(int rep) { 751 ID retVal = this.getTypedField(22, rep); 752 return retVal; 753 } 754 755 /** 756 * Returns a specific repetition of 757 * PCR-22: "Event Causality Observations" - creates it if necessary 758 * 759 * @param rep The repetition index (0-indexed) 760 */ 761 public ID getPcr22_EventCausalityObservations(int rep) { 762 ID retVal = this.getTypedField(22, rep); 763 return retVal; 764 } 765 766 /** 767 * Returns a count of the current number of repetitions of Event Causality Observations (PCR-22). 768 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 769 * it will return zero. 770 */ 771 public int getPcr22_EventCausalityObservationsReps() { 772 return this.getReps(22); 773 } 774 775 776 /** 777 * Inserts a repetition of 778 * PCR-22: "Event Causality Observations" at a specific index 779 * 780 * @param rep The repetition index (0-indexed) 781 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 782 */ 783 public ID insertEventCausalityObservations(int rep) throws HL7Exception { 784 return (ID) super.insertRepetition(22, rep); 785 } 786 787 788 /** 789 * Inserts a repetition of 790 * PCR-22: "Event Causality Observations" at a specific index 791 * 792 * @param rep The repetition index (0-indexed) 793 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 794 */ 795 public ID insertPcr22_EventCausalityObservations(int rep) throws HL7Exception { 796 return (ID) super.insertRepetition(22, rep); 797 } 798 799 800 /** 801 * Removes a repetition of 802 * PCR-22: "Event Causality Observations" at a specific index 803 * 804 * @param rep The repetition index (0-indexed) 805 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 806 */ 807 public ID removeEventCausalityObservations(int rep) throws HL7Exception { 808 return (ID) super.removeRepetition(22, rep); 809 } 810 811 812 /** 813 * Removes a repetition of 814 * PCR-22: "Event Causality Observations" at a specific index 815 * 816 * @param rep The repetition index (0-indexed) 817 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 818 */ 819 public ID removePcr22_EventCausalityObservations(int rep) throws HL7Exception { 820 return (ID) super.removeRepetition(22, rep); 821 } 822 823 824 825 /** 826 * Returns all repetitions of Indirect Exposure Mechanism (PCR-23). 827 */ 828 public ID[] getIndirectExposureMechanism() { 829 ID[] retVal = this.getTypedField(23, new ID[0]); 830 return retVal; 831 } 832 833 834 /** 835 * Returns all repetitions of Indirect Exposure Mechanism (PCR-23). 836 */ 837 public ID[] getPcr23_IndirectExposureMechanism() { 838 ID[] retVal = this.getTypedField(23, new ID[0]); 839 return retVal; 840 } 841 842 843 /** 844 * Returns a count of the current number of repetitions of Indirect Exposure Mechanism (PCR-23). 845 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 846 * it will return zero. 847 */ 848 public int getIndirectExposureMechanismReps() { 849 return this.getReps(23); 850 } 851 852 853 /** 854 * Returns a specific repetition of 855 * PCR-23: "Indirect Exposure Mechanism" - creates it if necessary 856 * 857 * @param rep The repetition index (0-indexed) 858 */ 859 public ID getIndirectExposureMechanism(int rep) { 860 ID retVal = this.getTypedField(23, rep); 861 return retVal; 862 } 863 864 /** 865 * Returns a specific repetition of 866 * PCR-23: "Indirect Exposure Mechanism" - creates it if necessary 867 * 868 * @param rep The repetition index (0-indexed) 869 */ 870 public ID getPcr23_IndirectExposureMechanism(int rep) { 871 ID retVal = this.getTypedField(23, rep); 872 return retVal; 873 } 874 875 /** 876 * Returns a count of the current number of repetitions of Indirect Exposure Mechanism (PCR-23). 877 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 878 * it will return zero. 879 */ 880 public int getPcr23_IndirectExposureMechanismReps() { 881 return this.getReps(23); 882 } 883 884 885 /** 886 * Inserts a repetition of 887 * PCR-23: "Indirect Exposure Mechanism" at a specific index 888 * 889 * @param rep The repetition index (0-indexed) 890 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 891 */ 892 public ID insertIndirectExposureMechanism(int rep) throws HL7Exception { 893 return (ID) super.insertRepetition(23, rep); 894 } 895 896 897 /** 898 * Inserts a repetition of 899 * PCR-23: "Indirect Exposure Mechanism" at a specific index 900 * 901 * @param rep The repetition index (0-indexed) 902 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 903 */ 904 public ID insertPcr23_IndirectExposureMechanism(int rep) throws HL7Exception { 905 return (ID) super.insertRepetition(23, rep); 906 } 907 908 909 /** 910 * Removes a repetition of 911 * PCR-23: "Indirect Exposure Mechanism" at a specific index 912 * 913 * @param rep The repetition index (0-indexed) 914 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 915 */ 916 public ID removeIndirectExposureMechanism(int rep) throws HL7Exception { 917 return (ID) super.removeRepetition(23, rep); 918 } 919 920 921 /** 922 * Removes a repetition of 923 * PCR-23: "Indirect Exposure Mechanism" at a specific index 924 * 925 * @param rep The repetition index (0-indexed) 926 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 927 */ 928 public ID removePcr23_IndirectExposureMechanism(int rep) throws HL7Exception { 929 return (ID) super.removeRepetition(23, rep); 930 } 931 932 933 934 935 936 937 /** {@inheritDoc} */ 938 protected Type createNewTypeWithoutReflection(int field) { 939 switch (field) { 940 case 0: return new CE(getMessage()); 941 case 1: return new IS(getMessage(), new Integer( 249 )); 942 case 2: return new CE(getMessage()); 943 case 3: return new CQ(getMessage()); 944 case 4: return new TS(getMessage()); 945 case 5: return new TS(getMessage()); 946 case 6: return new TS(getMessage()); 947 case 7: return new TS(getMessage()); 948 case 8: return new IS(getMessage(), new Integer( 244 )); 949 case 9: return new CE(getMessage()); 950 case 10: return new IS(getMessage(), new Integer( 245 )); 951 case 11: return new ST(getMessage()); 952 case 12: return new IS(getMessage(), new Integer( 246 )); 953 case 13: return new CE(getMessage()); 954 case 14: return new CE(getMessage()); 955 case 15: return new CE(getMessage()); 956 case 16: return new ID(getMessage(), new Integer( 248 )); 957 case 17: return new TS(getMessage()); 958 case 18: return new ID(getMessage(), new Integer( 242 )); 959 case 19: return new ID(getMessage(), new Integer( 250 )); 960 case 20: return new ID(getMessage(), new Integer( 251 )); 961 case 21: return new ID(getMessage(), new Integer( 252 )); 962 case 22: return new ID(getMessage(), new Integer( 253 )); 963 default: return null; 964 } 965 } 966 967 968} 969