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.v21.segment; 035 036// import ca.uhn.hl7v2.model.v21.group.*; 037import ca.uhn.hl7v2.model.v21.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 RX1 message segment (PHARMACY ORDER). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>RX1-1: UNUSED (ST) <b>optional </b> 052 * <li>RX1-2: UNUSED Number 2 (ST) <b>optional </b> 053 * <li>RX1-3: ROUTE (ST) <b>optional </b> 054 * <li>RX1-4: SITE ADMINISTERED (ST) <b>optional </b> 055 * <li>RX1-5: IV SOLUTION RATE (CQ) <b>optional </b> 056 * <li>RX1-6: DRUG STRENGTH (CQ) <b>optional </b> 057 * <li>RX1-7: FINAL CONCENTRATION (NM) <b>optional </b> 058 * <li>RX1-8: FINAL VOLUME IN ML. (NM) <b>optional </b> 059 * <li>RX1-9: DRUG DOSE (CM) <b>optional </b> 060 * <li>RX1-10: DRUG ROLE (ID) <b>optional </b> 061 * <li>RX1-11: PRESCRIPTION SEQUENCE # (NM) <b>optional </b> 062 * <li>RX1-12: QUANTITY DISPENSED (CQ) <b>optional </b> 063 * <li>RX1-13: UNUSED Number 3 (ST) <b>optional </b> 064 * <li>RX1-14: DRUG ID (CE) <b>optional </b> 065 * <li>RX1-15: COMPONENT DRUG IDS (ID) <b>optional repeating</b> 066 * <li>RX1-16: PRESCRIPTION TYPE (ID) <b>optional </b> 067 * <li>RX1-17: SUBSTITUTION STATUS (ID) <b>optional </b> 068 * <li>RX1-18: RX ORDER STATUS (ID) <b>optional </b> 069 * <li>RX1-19: NUMBER OF REFILLS (NM) <b>optional </b> 070 * <li>RX1-20: UNUSED Number 4 (ST) <b>optional </b> 071 * <li>RX1-21: REFILLS REMAINING (NM) <b>optional </b> 072 * <li>RX1-22: DEA CLASS (ID) <b>optional </b> 073 * <li>RX1-23: ORDERING MD'S DEA NUMBER (NM) <b>optional </b> 074 * <li>RX1-24: UNUSED Number 5 (ST) <b>optional </b> 075 * <li>RX1-25: LAST REFILL DATE/TIME (TS) <b>optional </b> 076 * <li>RX1-26: RX NUMBER (ST) <b>optional </b> 077 * <li>RX1-27: PRN STATUS (ID) <b>optional </b> 078 * <li>RX1-28: PHARMACY INSTRUCTIONS (TX) <b>optional repeating</b> 079 * <li>RX1-29: PATIENT INSTRUCTIONS (TX) <b>optional repeating</b> 080 * <li>RX1-30: INSTRUCTIONS (SIG) (TX) <b>optional repeating</b> 081 * </ul> 082 */ 083@SuppressWarnings("unused") 084public class RX1 extends AbstractSegment { 085 086 /** 087 * Creates a new RX1 segment 088 */ 089 public RX1(Group parent, ModelClassFactory factory) { 090 super(parent, factory); 091 init(factory); 092 } 093 094 private void init(ModelClassFactory factory) { 095 try { 096 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "UNUSED"); 097 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "UNUSED Number 2"); 098 this.add(ST.class, false, 1, 8, new Object[]{ getMessage() }, "ROUTE"); 099 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "SITE ADMINISTERED"); 100 this.add(CQ.class, false, 1, 10, new Object[]{ getMessage() }, "IV SOLUTION RATE"); 101 this.add(CQ.class, false, 1, 14, new Object[]{ getMessage() }, "DRUG STRENGTH"); 102 this.add(NM.class, false, 1, 10, new Object[]{ getMessage() }, "FINAL CONCENTRATION"); 103 this.add(NM.class, false, 1, 10, new Object[]{ getMessage() }, "FINAL VOLUME IN ML."); 104 this.add(CM.class, false, 1, 10, new Object[]{ getMessage() }, "DRUG DOSE"); 105 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "DRUG ROLE"); 106 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "PRESCRIPTION SEQUENCE #"); 107 this.add(CQ.class, false, 1, 4, new Object[]{ getMessage() }, "QUANTITY DISPENSED"); 108 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "UNUSED Number 3"); 109 this.add(CE.class, false, 1, 5, new Object[]{ getMessage() }, "DRUG ID"); 110 this.add(ID.class, false, 5, 5, new Object[]{ getMessage(), new Integer(0) }, "COMPONENT DRUG IDS"); 111 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "PRESCRIPTION TYPE"); 112 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "SUBSTITUTION STATUS"); 113 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(38) }, "RX ORDER STATUS"); 114 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "NUMBER OF REFILLS"); 115 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "UNUSED Number 4"); 116 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "REFILLS REMAINING"); 117 this.add(ID.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "DEA CLASS"); 118 this.add(NM.class, false, 1, 10, new Object[]{ getMessage() }, "ORDERING MD'S DEA NUMBER"); 119 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "UNUSED Number 5"); 120 this.add(TS.class, false, 1, 19, new Object[]{ getMessage() }, "LAST REFILL DATE/TIME"); 121 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "RX NUMBER"); 122 this.add(ID.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "PRN STATUS"); 123 this.add(TX.class, false, 5, 80, new Object[]{ getMessage() }, "PHARMACY INSTRUCTIONS"); 124 this.add(TX.class, false, 5, 80, new Object[]{ getMessage() }, "PATIENT INSTRUCTIONS"); 125 this.add(TX.class, false, 0, 500, new Object[]{ getMessage() }, "INSTRUCTIONS (SIG)"); 126 } catch(HL7Exception e) { 127 log.error("Unexpected error creating RX1 - this is probably a bug in the source code generator.", e); 128 } 129 } 130 131 132 133 /** 134 * Returns 135 * RX1-1: "UNUSED" - creates it if necessary 136 */ 137 public ST getUNUSED() { 138 ST retVal = this.getTypedField(1, 0); 139 return retVal; 140 } 141 142 /** 143 * Returns 144 * RX1-1: "UNUSED" - creates it if necessary 145 */ 146 public ST getRx11_UNUSED() { 147 ST retVal = this.getTypedField(1, 0); 148 return retVal; 149 } 150 151 152 153 /** 154 * Returns 155 * RX1-2: "UNUSED Number 2" - creates it if necessary 156 */ 157 public ST getUNUSEDNumber2() { 158 ST retVal = this.getTypedField(2, 0); 159 return retVal; 160 } 161 162 /** 163 * Returns 164 * RX1-2: "UNUSED Number 2" - creates it if necessary 165 */ 166 public ST getRx12_UNUSEDNumber2() { 167 ST retVal = this.getTypedField(2, 0); 168 return retVal; 169 } 170 171 172 173 /** 174 * Returns 175 * RX1-3: "ROUTE" - creates it if necessary 176 */ 177 public ST getROUTE() { 178 ST retVal = this.getTypedField(3, 0); 179 return retVal; 180 } 181 182 /** 183 * Returns 184 * RX1-3: "ROUTE" - creates it if necessary 185 */ 186 public ST getRx13_ROUTE() { 187 ST retVal = this.getTypedField(3, 0); 188 return retVal; 189 } 190 191 192 193 /** 194 * Returns 195 * RX1-4: "SITE ADMINISTERED" - creates it if necessary 196 */ 197 public ST getSITEADMINISTERED() { 198 ST retVal = this.getTypedField(4, 0); 199 return retVal; 200 } 201 202 /** 203 * Returns 204 * RX1-4: "SITE ADMINISTERED" - creates it if necessary 205 */ 206 public ST getRx14_SITEADMINISTERED() { 207 ST retVal = this.getTypedField(4, 0); 208 return retVal; 209 } 210 211 212 213 /** 214 * Returns 215 * RX1-5: "IV SOLUTION RATE" - creates it if necessary 216 */ 217 public CQ getIVSOLUTIONRATE() { 218 CQ retVal = this.getTypedField(5, 0); 219 return retVal; 220 } 221 222 /** 223 * Returns 224 * RX1-5: "IV SOLUTION RATE" - creates it if necessary 225 */ 226 public CQ getRx15_IVSOLUTIONRATE() { 227 CQ retVal = this.getTypedField(5, 0); 228 return retVal; 229 } 230 231 232 233 /** 234 * Returns 235 * RX1-6: "DRUG STRENGTH" - creates it if necessary 236 */ 237 public CQ getDRUGSTRENGTH() { 238 CQ retVal = this.getTypedField(6, 0); 239 return retVal; 240 } 241 242 /** 243 * Returns 244 * RX1-6: "DRUG STRENGTH" - creates it if necessary 245 */ 246 public CQ getRx16_DRUGSTRENGTH() { 247 CQ retVal = this.getTypedField(6, 0); 248 return retVal; 249 } 250 251 252 253 /** 254 * Returns 255 * RX1-7: "FINAL CONCENTRATION" - creates it if necessary 256 */ 257 public NM getFINALCONCENTRATION() { 258 NM retVal = this.getTypedField(7, 0); 259 return retVal; 260 } 261 262 /** 263 * Returns 264 * RX1-7: "FINAL CONCENTRATION" - creates it if necessary 265 */ 266 public NM getRx17_FINALCONCENTRATION() { 267 NM retVal = this.getTypedField(7, 0); 268 return retVal; 269 } 270 271 272 273 /** 274 * Returns 275 * RX1-8: "FINAL VOLUME IN ML." - creates it if necessary 276 */ 277 public NM getFINALVOLUMEINML() { 278 NM retVal = this.getTypedField(8, 0); 279 return retVal; 280 } 281 282 /** 283 * Returns 284 * RX1-8: "FINAL VOLUME IN ML." - creates it if necessary 285 */ 286 public NM getRx18_FINALVOLUMEINML() { 287 NM retVal = this.getTypedField(8, 0); 288 return retVal; 289 } 290 291 292 293 /** 294 * Returns 295 * RX1-9: "DRUG DOSE" - creates it if necessary 296 */ 297 public CM getDRUGDOSE() { 298 CM retVal = this.getTypedField(9, 0); 299 return retVal; 300 } 301 302 /** 303 * Returns 304 * RX1-9: "DRUG DOSE" - creates it if necessary 305 */ 306 public CM getRx19_DRUGDOSE() { 307 CM retVal = this.getTypedField(9, 0); 308 return retVal; 309 } 310 311 312 313 /** 314 * Returns 315 * RX1-10: "DRUG ROLE" - creates it if necessary 316 */ 317 public ID getDRUGROLE() { 318 ID retVal = this.getTypedField(10, 0); 319 return retVal; 320 } 321 322 /** 323 * Returns 324 * RX1-10: "DRUG ROLE" - creates it if necessary 325 */ 326 public ID getRx110_DRUGROLE() { 327 ID retVal = this.getTypedField(10, 0); 328 return retVal; 329 } 330 331 332 333 /** 334 * Returns 335 * RX1-11: "PRESCRIPTION SEQUENCE #" - creates it if necessary 336 */ 337 public NM getPRESCRIPTIONSEQUENCE() { 338 NM retVal = this.getTypedField(11, 0); 339 return retVal; 340 } 341 342 /** 343 * Returns 344 * RX1-11: "PRESCRIPTION SEQUENCE #" - creates it if necessary 345 */ 346 public NM getRx111_PRESCRIPTIONSEQUENCE() { 347 NM retVal = this.getTypedField(11, 0); 348 return retVal; 349 } 350 351 352 353 /** 354 * Returns 355 * RX1-12: "QUANTITY DISPENSED" - creates it if necessary 356 */ 357 public CQ getQUANTITYDISPENSED() { 358 CQ retVal = this.getTypedField(12, 0); 359 return retVal; 360 } 361 362 /** 363 * Returns 364 * RX1-12: "QUANTITY DISPENSED" - creates it if necessary 365 */ 366 public CQ getRx112_QUANTITYDISPENSED() { 367 CQ retVal = this.getTypedField(12, 0); 368 return retVal; 369 } 370 371 372 373 /** 374 * Returns 375 * RX1-13: "UNUSED Number 3" - creates it if necessary 376 */ 377 public ST getUNUSEDNumber3() { 378 ST retVal = this.getTypedField(13, 0); 379 return retVal; 380 } 381 382 /** 383 * Returns 384 * RX1-13: "UNUSED Number 3" - creates it if necessary 385 */ 386 public ST getRx113_UNUSEDNumber3() { 387 ST retVal = this.getTypedField(13, 0); 388 return retVal; 389 } 390 391 392 393 /** 394 * Returns 395 * RX1-14: "DRUG ID" - creates it if necessary 396 */ 397 public CE getDRUGID() { 398 CE retVal = this.getTypedField(14, 0); 399 return retVal; 400 } 401 402 /** 403 * Returns 404 * RX1-14: "DRUG ID" - creates it if necessary 405 */ 406 public CE getRx114_DRUGID() { 407 CE retVal = this.getTypedField(14, 0); 408 return retVal; 409 } 410 411 412 /** 413 * Returns all repetitions of COMPONENT DRUG IDS (RX1-15). 414 */ 415 public ID[] getCOMPONENTDRUGIDS() { 416 ID[] retVal = this.getTypedField(15, new ID[0]); 417 return retVal; 418 } 419 420 421 /** 422 * Returns all repetitions of COMPONENT DRUG IDS (RX1-15). 423 */ 424 public ID[] getRx115_COMPONENTDRUGIDS() { 425 ID[] retVal = this.getTypedField(15, new ID[0]); 426 return retVal; 427 } 428 429 430 /** 431 * Returns a count of the current number of repetitions of COMPONENT DRUG IDS (RX1-15). 432 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 433 * it will return zero. 434 */ 435 public int getCOMPONENTDRUGIDSReps() { 436 return this.getReps(15); 437 } 438 439 440 /** 441 * Returns a specific repetition of 442 * RX1-15: "COMPONENT DRUG IDS" - creates it if necessary 443 * 444 * @param rep The repetition index (0-indexed) 445 */ 446 public ID getCOMPONENTDRUGIDS(int rep) { 447 ID retVal = this.getTypedField(15, rep); 448 return retVal; 449 } 450 451 /** 452 * Returns a specific repetition of 453 * RX1-15: "COMPONENT DRUG IDS" - creates it if necessary 454 * 455 * @param rep The repetition index (0-indexed) 456 */ 457 public ID getRx115_COMPONENTDRUGIDS(int rep) { 458 ID retVal = this.getTypedField(15, rep); 459 return retVal; 460 } 461 462 /** 463 * Returns a count of the current number of repetitions of COMPONENT DRUG IDS (RX1-15). 464 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 465 * it will return zero. 466 */ 467 public int getRx115_COMPONENTDRUGIDSReps() { 468 return this.getReps(15); 469 } 470 471 472 /** 473 * Inserts a repetition of 474 * RX1-15: "COMPONENT DRUG IDS" at a specific index 475 * 476 * @param rep The repetition index (0-indexed) 477 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 478 */ 479 public ID insertCOMPONENTDRUGIDS(int rep) throws HL7Exception { 480 return (ID) super.insertRepetition(15, rep); 481 } 482 483 484 /** 485 * Inserts a repetition of 486 * RX1-15: "COMPONENT DRUG IDS" at a specific index 487 * 488 * @param rep The repetition index (0-indexed) 489 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 490 */ 491 public ID insertRx115_COMPONENTDRUGIDS(int rep) throws HL7Exception { 492 return (ID) super.insertRepetition(15, rep); 493 } 494 495 496 /** 497 * Removes a repetition of 498 * RX1-15: "COMPONENT DRUG IDS" at a specific index 499 * 500 * @param rep The repetition index (0-indexed) 501 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 502 */ 503 public ID removeCOMPONENTDRUGIDS(int rep) throws HL7Exception { 504 return (ID) super.removeRepetition(15, rep); 505 } 506 507 508 /** 509 * Removes a repetition of 510 * RX1-15: "COMPONENT DRUG IDS" at a specific index 511 * 512 * @param rep The repetition index (0-indexed) 513 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 514 */ 515 public ID removeRx115_COMPONENTDRUGIDS(int rep) throws HL7Exception { 516 return (ID) super.removeRepetition(15, rep); 517 } 518 519 520 521 522 /** 523 * Returns 524 * RX1-16: "PRESCRIPTION TYPE" - creates it if necessary 525 */ 526 public ID getPRESCRIPTIONTYPE() { 527 ID retVal = this.getTypedField(16, 0); 528 return retVal; 529 } 530 531 /** 532 * Returns 533 * RX1-16: "PRESCRIPTION TYPE" - creates it if necessary 534 */ 535 public ID getRx116_PRESCRIPTIONTYPE() { 536 ID retVal = this.getTypedField(16, 0); 537 return retVal; 538 } 539 540 541 542 /** 543 * Returns 544 * RX1-17: "SUBSTITUTION STATUS" - creates it if necessary 545 */ 546 public ID getSUBSTITUTIONSTATUS() { 547 ID retVal = this.getTypedField(17, 0); 548 return retVal; 549 } 550 551 /** 552 * Returns 553 * RX1-17: "SUBSTITUTION STATUS" - creates it if necessary 554 */ 555 public ID getRx117_SUBSTITUTIONSTATUS() { 556 ID retVal = this.getTypedField(17, 0); 557 return retVal; 558 } 559 560 561 562 /** 563 * Returns 564 * RX1-18: "RX ORDER STATUS" - creates it if necessary 565 */ 566 public ID getRXORDERSTATUS() { 567 ID retVal = this.getTypedField(18, 0); 568 return retVal; 569 } 570 571 /** 572 * Returns 573 * RX1-18: "RX ORDER STATUS" - creates it if necessary 574 */ 575 public ID getRx118_RXORDERSTATUS() { 576 ID retVal = this.getTypedField(18, 0); 577 return retVal; 578 } 579 580 581 582 /** 583 * Returns 584 * RX1-19: "NUMBER OF REFILLS" - creates it if necessary 585 */ 586 public NM getNUMBEROFREFILLS() { 587 NM retVal = this.getTypedField(19, 0); 588 return retVal; 589 } 590 591 /** 592 * Returns 593 * RX1-19: "NUMBER OF REFILLS" - creates it if necessary 594 */ 595 public NM getRx119_NUMBEROFREFILLS() { 596 NM retVal = this.getTypedField(19, 0); 597 return retVal; 598 } 599 600 601 602 /** 603 * Returns 604 * RX1-20: "UNUSED Number 4" - creates it if necessary 605 */ 606 public ST getUNUSEDNumber4() { 607 ST retVal = this.getTypedField(20, 0); 608 return retVal; 609 } 610 611 /** 612 * Returns 613 * RX1-20: "UNUSED Number 4" - creates it if necessary 614 */ 615 public ST getRx120_UNUSEDNumber4() { 616 ST retVal = this.getTypedField(20, 0); 617 return retVal; 618 } 619 620 621 622 /** 623 * Returns 624 * RX1-21: "REFILLS REMAINING" - creates it if necessary 625 */ 626 public NM getREFILLSREMAINING() { 627 NM retVal = this.getTypedField(21, 0); 628 return retVal; 629 } 630 631 /** 632 * Returns 633 * RX1-21: "REFILLS REMAINING" - creates it if necessary 634 */ 635 public NM getRx121_REFILLSREMAINING() { 636 NM retVal = this.getTypedField(21, 0); 637 return retVal; 638 } 639 640 641 642 /** 643 * Returns 644 * RX1-22: "DEA CLASS" - creates it if necessary 645 */ 646 public ID getDEACLASS() { 647 ID retVal = this.getTypedField(22, 0); 648 return retVal; 649 } 650 651 /** 652 * Returns 653 * RX1-22: "DEA CLASS" - creates it if necessary 654 */ 655 public ID getRx122_DEACLASS() { 656 ID retVal = this.getTypedField(22, 0); 657 return retVal; 658 } 659 660 661 662 /** 663 * Returns 664 * RX1-23: "ORDERING MD'S DEA NUMBER" - creates it if necessary 665 */ 666 public NM getORDERINGMDSDEANUMBER() { 667 NM retVal = this.getTypedField(23, 0); 668 return retVal; 669 } 670 671 /** 672 * Returns 673 * RX1-23: "ORDERING MD'S DEA NUMBER" - creates it if necessary 674 */ 675 public NM getRx123_ORDERINGMDSDEANUMBER() { 676 NM retVal = this.getTypedField(23, 0); 677 return retVal; 678 } 679 680 681 682 /** 683 * Returns 684 * RX1-24: "UNUSED Number 5" - creates it if necessary 685 */ 686 public ST getUNUSEDNumber5() { 687 ST retVal = this.getTypedField(24, 0); 688 return retVal; 689 } 690 691 /** 692 * Returns 693 * RX1-24: "UNUSED Number 5" - creates it if necessary 694 */ 695 public ST getRx124_UNUSEDNumber5() { 696 ST retVal = this.getTypedField(24, 0); 697 return retVal; 698 } 699 700 701 702 /** 703 * Returns 704 * RX1-25: "LAST REFILL DATE/TIME" - creates it if necessary 705 */ 706 public TS getLASTREFILLDATETIME() { 707 TS retVal = this.getTypedField(25, 0); 708 return retVal; 709 } 710 711 /** 712 * Returns 713 * RX1-25: "LAST REFILL DATE/TIME" - creates it if necessary 714 */ 715 public TS getRx125_LASTREFILLDATETIME() { 716 TS retVal = this.getTypedField(25, 0); 717 return retVal; 718 } 719 720 721 722 /** 723 * Returns 724 * RX1-26: "RX NUMBER" - creates it if necessary 725 */ 726 public ST getRXNUMBER() { 727 ST retVal = this.getTypedField(26, 0); 728 return retVal; 729 } 730 731 /** 732 * Returns 733 * RX1-26: "RX NUMBER" - creates it if necessary 734 */ 735 public ST getRx126_RXNUMBER() { 736 ST retVal = this.getTypedField(26, 0); 737 return retVal; 738 } 739 740 741 742 /** 743 * Returns 744 * RX1-27: "PRN STATUS" - creates it if necessary 745 */ 746 public ID getPRNSTATUS() { 747 ID retVal = this.getTypedField(27, 0); 748 return retVal; 749 } 750 751 /** 752 * Returns 753 * RX1-27: "PRN STATUS" - creates it if necessary 754 */ 755 public ID getRx127_PRNSTATUS() { 756 ID retVal = this.getTypedField(27, 0); 757 return retVal; 758 } 759 760 761 /** 762 * Returns all repetitions of PHARMACY INSTRUCTIONS (RX1-28). 763 */ 764 public TX[] getPHARMACYINSTRUCTIONS() { 765 TX[] retVal = this.getTypedField(28, new TX[0]); 766 return retVal; 767 } 768 769 770 /** 771 * Returns all repetitions of PHARMACY INSTRUCTIONS (RX1-28). 772 */ 773 public TX[] getRx128_PHARMACYINSTRUCTIONS() { 774 TX[] retVal = this.getTypedField(28, new TX[0]); 775 return retVal; 776 } 777 778 779 /** 780 * Returns a count of the current number of repetitions of PHARMACY INSTRUCTIONS (RX1-28). 781 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 782 * it will return zero. 783 */ 784 public int getPHARMACYINSTRUCTIONSReps() { 785 return this.getReps(28); 786 } 787 788 789 /** 790 * Returns a specific repetition of 791 * RX1-28: "PHARMACY INSTRUCTIONS" - creates it if necessary 792 * 793 * @param rep The repetition index (0-indexed) 794 */ 795 public TX getPHARMACYINSTRUCTIONS(int rep) { 796 TX retVal = this.getTypedField(28, rep); 797 return retVal; 798 } 799 800 /** 801 * Returns a specific repetition of 802 * RX1-28: "PHARMACY INSTRUCTIONS" - creates it if necessary 803 * 804 * @param rep The repetition index (0-indexed) 805 */ 806 public TX getRx128_PHARMACYINSTRUCTIONS(int rep) { 807 TX retVal = this.getTypedField(28, rep); 808 return retVal; 809 } 810 811 /** 812 * Returns a count of the current number of repetitions of PHARMACY INSTRUCTIONS (RX1-28). 813 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 814 * it will return zero. 815 */ 816 public int getRx128_PHARMACYINSTRUCTIONSReps() { 817 return this.getReps(28); 818 } 819 820 821 /** 822 * Inserts a repetition of 823 * RX1-28: "PHARMACY INSTRUCTIONS" at a specific index 824 * 825 * @param rep The repetition index (0-indexed) 826 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 827 */ 828 public TX insertPHARMACYINSTRUCTIONS(int rep) throws HL7Exception { 829 return (TX) super.insertRepetition(28, rep); 830 } 831 832 833 /** 834 * Inserts a repetition of 835 * RX1-28: "PHARMACY INSTRUCTIONS" at a specific index 836 * 837 * @param rep The repetition index (0-indexed) 838 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 839 */ 840 public TX insertRx128_PHARMACYINSTRUCTIONS(int rep) throws HL7Exception { 841 return (TX) super.insertRepetition(28, rep); 842 } 843 844 845 /** 846 * Removes a repetition of 847 * RX1-28: "PHARMACY INSTRUCTIONS" at a specific index 848 * 849 * @param rep The repetition index (0-indexed) 850 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 851 */ 852 public TX removePHARMACYINSTRUCTIONS(int rep) throws HL7Exception { 853 return (TX) super.removeRepetition(28, rep); 854 } 855 856 857 /** 858 * Removes a repetition of 859 * RX1-28: "PHARMACY INSTRUCTIONS" at a specific index 860 * 861 * @param rep The repetition index (0-indexed) 862 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 863 */ 864 public TX removeRx128_PHARMACYINSTRUCTIONS(int rep) throws HL7Exception { 865 return (TX) super.removeRepetition(28, rep); 866 } 867 868 869 870 /** 871 * Returns all repetitions of PATIENT INSTRUCTIONS (RX1-29). 872 */ 873 public TX[] getPATIENTINSTRUCTIONS() { 874 TX[] retVal = this.getTypedField(29, new TX[0]); 875 return retVal; 876 } 877 878 879 /** 880 * Returns all repetitions of PATIENT INSTRUCTIONS (RX1-29). 881 */ 882 public TX[] getRx129_PATIENTINSTRUCTIONS() { 883 TX[] retVal = this.getTypedField(29, new TX[0]); 884 return retVal; 885 } 886 887 888 /** 889 * Returns a count of the current number of repetitions of PATIENT INSTRUCTIONS (RX1-29). 890 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 891 * it will return zero. 892 */ 893 public int getPATIENTINSTRUCTIONSReps() { 894 return this.getReps(29); 895 } 896 897 898 /** 899 * Returns a specific repetition of 900 * RX1-29: "PATIENT INSTRUCTIONS" - creates it if necessary 901 * 902 * @param rep The repetition index (0-indexed) 903 */ 904 public TX getPATIENTINSTRUCTIONS(int rep) { 905 TX retVal = this.getTypedField(29, rep); 906 return retVal; 907 } 908 909 /** 910 * Returns a specific repetition of 911 * RX1-29: "PATIENT INSTRUCTIONS" - creates it if necessary 912 * 913 * @param rep The repetition index (0-indexed) 914 */ 915 public TX getRx129_PATIENTINSTRUCTIONS(int rep) { 916 TX retVal = this.getTypedField(29, rep); 917 return retVal; 918 } 919 920 /** 921 * Returns a count of the current number of repetitions of PATIENT INSTRUCTIONS (RX1-29). 922 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 923 * it will return zero. 924 */ 925 public int getRx129_PATIENTINSTRUCTIONSReps() { 926 return this.getReps(29); 927 } 928 929 930 /** 931 * Inserts a repetition of 932 * RX1-29: "PATIENT INSTRUCTIONS" at a specific index 933 * 934 * @param rep The repetition index (0-indexed) 935 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 936 */ 937 public TX insertPATIENTINSTRUCTIONS(int rep) throws HL7Exception { 938 return (TX) super.insertRepetition(29, rep); 939 } 940 941 942 /** 943 * Inserts a repetition of 944 * RX1-29: "PATIENT INSTRUCTIONS" at a specific index 945 * 946 * @param rep The repetition index (0-indexed) 947 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 948 */ 949 public TX insertRx129_PATIENTINSTRUCTIONS(int rep) throws HL7Exception { 950 return (TX) super.insertRepetition(29, rep); 951 } 952 953 954 /** 955 * Removes a repetition of 956 * RX1-29: "PATIENT INSTRUCTIONS" at a specific index 957 * 958 * @param rep The repetition index (0-indexed) 959 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 960 */ 961 public TX removePATIENTINSTRUCTIONS(int rep) throws HL7Exception { 962 return (TX) super.removeRepetition(29, rep); 963 } 964 965 966 /** 967 * Removes a repetition of 968 * RX1-29: "PATIENT INSTRUCTIONS" at a specific index 969 * 970 * @param rep The repetition index (0-indexed) 971 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 972 */ 973 public TX removeRx129_PATIENTINSTRUCTIONS(int rep) throws HL7Exception { 974 return (TX) super.removeRepetition(29, rep); 975 } 976 977 978 979 /** 980 * Returns all repetitions of INSTRUCTIONS (SIG) (RX1-30). 981 */ 982 public TX[] getINSTRUCTIONS() { 983 TX[] retVal = this.getTypedField(30, new TX[0]); 984 return retVal; 985 } 986 987 988 /** 989 * Returns all repetitions of INSTRUCTIONS (SIG) (RX1-30). 990 */ 991 public TX[] getRx130_INSTRUCTIONS() { 992 TX[] retVal = this.getTypedField(30, new TX[0]); 993 return retVal; 994 } 995 996 997 /** 998 * Returns a count of the current number of repetitions of INSTRUCTIONS (SIG) (RX1-30). 999 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1000 * it will return zero. 1001 */ 1002 public int getINSTRUCTIONSReps() { 1003 return this.getReps(30); 1004 } 1005 1006 1007 /** 1008 * Returns a specific repetition of 1009 * RX1-30: "INSTRUCTIONS (SIG)" - creates it if necessary 1010 * 1011 * @param rep The repetition index (0-indexed) 1012 */ 1013 public TX getINSTRUCTIONS(int rep) { 1014 TX retVal = this.getTypedField(30, rep); 1015 return retVal; 1016 } 1017 1018 /** 1019 * Returns a specific repetition of 1020 * RX1-30: "INSTRUCTIONS (SIG)" - creates it if necessary 1021 * 1022 * @param rep The repetition index (0-indexed) 1023 */ 1024 public TX getRx130_INSTRUCTIONS(int rep) { 1025 TX retVal = this.getTypedField(30, rep); 1026 return retVal; 1027 } 1028 1029 /** 1030 * Returns a count of the current number of repetitions of INSTRUCTIONS (SIG) (RX1-30). 1031 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1032 * it will return zero. 1033 */ 1034 public int getRx130_INSTRUCTIONSReps() { 1035 return this.getReps(30); 1036 } 1037 1038 1039 /** 1040 * Inserts a repetition of 1041 * RX1-30: "INSTRUCTIONS (SIG)" at a specific index 1042 * 1043 * @param rep The repetition index (0-indexed) 1044 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1045 */ 1046 public TX insertINSTRUCTIONS(int rep) throws HL7Exception { 1047 return (TX) super.insertRepetition(30, rep); 1048 } 1049 1050 1051 /** 1052 * Inserts a repetition of 1053 * RX1-30: "INSTRUCTIONS (SIG)" at a specific index 1054 * 1055 * @param rep The repetition index (0-indexed) 1056 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1057 */ 1058 public TX insertRx130_INSTRUCTIONS(int rep) throws HL7Exception { 1059 return (TX) super.insertRepetition(30, rep); 1060 } 1061 1062 1063 /** 1064 * Removes a repetition of 1065 * RX1-30: "INSTRUCTIONS (SIG)" at a specific index 1066 * 1067 * @param rep The repetition index (0-indexed) 1068 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1069 */ 1070 public TX removeINSTRUCTIONS(int rep) throws HL7Exception { 1071 return (TX) super.removeRepetition(30, rep); 1072 } 1073 1074 1075 /** 1076 * Removes a repetition of 1077 * RX1-30: "INSTRUCTIONS (SIG)" at a specific index 1078 * 1079 * @param rep The repetition index (0-indexed) 1080 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1081 */ 1082 public TX removeRx130_INSTRUCTIONS(int rep) throws HL7Exception { 1083 return (TX) super.removeRepetition(30, rep); 1084 } 1085 1086 1087 1088 1089 1090 1091 /** {@inheritDoc} */ 1092 protected Type createNewTypeWithoutReflection(int field) { 1093 switch (field) { 1094 case 0: return new ST(getMessage()); 1095 case 1: return new ST(getMessage()); 1096 case 2: return new ST(getMessage()); 1097 case 3: return new ST(getMessage()); 1098 case 4: return new CQ(getMessage()); 1099 case 5: return new CQ(getMessage()); 1100 case 6: return new NM(getMessage()); 1101 case 7: return new NM(getMessage()); 1102 case 8: return new CM(getMessage()); 1103 case 9: return new ID(getMessage(), new Integer( 0 )); 1104 case 10: return new NM(getMessage()); 1105 case 11: return new CQ(getMessage()); 1106 case 12: return new ST(getMessage()); 1107 case 13: return new CE(getMessage()); 1108 case 14: return new ID(getMessage(), new Integer( 0 )); 1109 case 15: return new ID(getMessage(), new Integer( 0 )); 1110 case 16: return new ID(getMessage(), new Integer( 0 )); 1111 case 17: return new ID(getMessage(), new Integer( 38 )); 1112 case 18: return new NM(getMessage()); 1113 case 19: return new ST(getMessage()); 1114 case 20: return new NM(getMessage()); 1115 case 21: return new ID(getMessage(), new Integer( 0 )); 1116 case 22: return new NM(getMessage()); 1117 case 23: return new ST(getMessage()); 1118 case 24: return new TS(getMessage()); 1119 case 25: return new ST(getMessage()); 1120 case 26: return new ID(getMessage(), new Integer( 0 )); 1121 case 27: return new TX(getMessage()); 1122 case 28: return new TX(getMessage()); 1123 case 29: return new TX(getMessage()); 1124 default: return null; 1125 } 1126 } 1127 1128 1129} 1130