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