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