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