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.v23.segment; 035 036// import ca.uhn.hl7v2.model.v23.group.*; 037import ca.uhn.hl7v2.model.v23.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 RXD message segment (Pharmacy dispense segment). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>RXD-1: Dispense Sub-ID Counter (NM) <b> </b> 052 * <li>RXD-2: Dispense/Give Code (CE) <b> </b> 053 * <li>RXD-3: Date/Time Dispensed (TS) <b> </b> 054 * <li>RXD-4: Actual Dispense Amount (NM) <b> </b> 055 * <li>RXD-5: Actual Dispense Units (CE) <b>optional </b> 056 * <li>RXD-6: Actual Dosage Form (CE) <b>optional </b> 057 * <li>RXD-7: Prescription Number (ST) <b> </b> 058 * <li>RXD-8: Number of Refills Remaining (NM) <b>optional </b> 059 * <li>RXD-9: Dispense Notes (CE) <b>optional repeating</b> 060 * <li>RXD-10: Dispensing Provider (XCN) <b>optional </b> 061 * <li>RXD-11: Substitution Status (ID) <b>optional </b> 062 * <li>RXD-12: Total Daily Dose (CQ) <b>optional </b> 063 * <li>RXD-13: Dispense-To Location (CM_LA1) <b>optional </b> 064 * <li>RXD-14: Needs Human Review (ID) <b>optional </b> 065 * <li>RXD-15: Pharmacy/Treatment Supplier's Special Dispensing Instructions (CE) <b>optional repeating</b> 066 * <li>RXD-16: Actual Strength (NM) <b>optional </b> 067 * <li>RXD-17: Actual Strength Unit (CE) <b>optional </b> 068 * <li>RXD-18: Substance Lot Number (ST) <b>optional repeating</b> 069 * <li>RXD-19: Substance Expiration Date (TS) <b>optional repeating</b> 070 * <li>RXD-20: Substance Manufacturer Name (CE) <b>optional repeating</b> 071 * <li>RXD-21: Indication (CE) <b>optional </b> 072 * <li>RXD-22: Dispense Package Size (NM) <b>optional </b> 073 * <li>RXD-23: Dispense Package Size Unit (CE) <b>optional </b> 074 * <li>RXD-24: Dispense Package Method (ID) <b>optional </b> 075 * </ul> 076 */ 077@SuppressWarnings("unused") 078public class RXD extends AbstractSegment { 079 080 /** 081 * Creates a new RXD segment 082 */ 083 public RXD(Group parent, ModelClassFactory factory) { 084 super(parent, factory); 085 init(factory); 086 } 087 088 private void init(ModelClassFactory factory) { 089 try { 090 this.add(NM.class, true, 1, 4, new Object[]{ getMessage() }, "Dispense Sub-ID Counter"); 091 this.add(CE.class, true, 1, 100, new Object[]{ getMessage() }, "Dispense/Give Code"); 092 this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Date/Time Dispensed"); 093 this.add(NM.class, true, 1, 20, new Object[]{ getMessage() }, "Actual Dispense Amount"); 094 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Actual Dispense Units"); 095 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Actual Dosage Form"); 096 this.add(ST.class, true, 1, 20, new Object[]{ getMessage() }, "Prescription Number"); 097 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Number of Refills Remaining"); 098 this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Dispense Notes"); 099 this.add(XCN.class, false, 1, 200, new Object[]{ getMessage() }, "Dispensing Provider"); 100 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(167) }, "Substitution Status"); 101 this.add(CQ.class, false, 1, 10, new Object[]{ getMessage() }, "Total Daily Dose"); 102 this.add(CM_LA1.class, false, 1, 200, new Object[]{ getMessage() }, "Dispense-To Location"); 103 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Needs Human Review"); 104 this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Pharmacy/Treatment Supplier's Special Dispensing Instructions"); 105 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Actual Strength"); 106 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Actual Strength Unit"); 107 this.add(ST.class, false, 0, 20, new Object[]{ getMessage() }, "Substance Lot Number"); 108 this.add(TS.class, false, 0, 26, new Object[]{ getMessage() }, "Substance Expiration Date"); 109 this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Substance Manufacturer Name"); 110 this.add(CE.class, false, 1, 200, new Object[]{ getMessage() }, "Indication"); 111 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Dispense Package Size"); 112 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Dispense Package Size Unit"); 113 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(321) }, "Dispense Package Method"); 114 } catch(HL7Exception e) { 115 log.error("Unexpected error creating RXD - this is probably a bug in the source code generator.", e); 116 } 117 } 118 119 120 121 /** 122 * Returns 123 * RXD-1: "Dispense Sub-ID Counter" - creates it if necessary 124 */ 125 public NM getDispenseSubIDCounter() { 126 NM retVal = this.getTypedField(1, 0); 127 return retVal; 128 } 129 130 /** 131 * Returns 132 * RXD-1: "Dispense Sub-ID Counter" - creates it if necessary 133 */ 134 public NM getRxd1_DispenseSubIDCounter() { 135 NM retVal = this.getTypedField(1, 0); 136 return retVal; 137 } 138 139 140 141 /** 142 * Returns 143 * RXD-2: "Dispense/Give Code" - creates it if necessary 144 */ 145 public CE getDispenseGiveCode() { 146 CE retVal = this.getTypedField(2, 0); 147 return retVal; 148 } 149 150 /** 151 * Returns 152 * RXD-2: "Dispense/Give Code" - creates it if necessary 153 */ 154 public CE getRxd2_DispenseGiveCode() { 155 CE retVal = this.getTypedField(2, 0); 156 return retVal; 157 } 158 159 160 161 /** 162 * Returns 163 * RXD-3: "Date/Time Dispensed" - creates it if necessary 164 */ 165 public TS getDateTimeDispensed() { 166 TS retVal = this.getTypedField(3, 0); 167 return retVal; 168 } 169 170 /** 171 * Returns 172 * RXD-3: "Date/Time Dispensed" - creates it if necessary 173 */ 174 public TS getRxd3_DateTimeDispensed() { 175 TS retVal = this.getTypedField(3, 0); 176 return retVal; 177 } 178 179 180 181 /** 182 * Returns 183 * RXD-4: "Actual Dispense Amount" - creates it if necessary 184 */ 185 public NM getActualDispenseAmount() { 186 NM retVal = this.getTypedField(4, 0); 187 return retVal; 188 } 189 190 /** 191 * Returns 192 * RXD-4: "Actual Dispense Amount" - creates it if necessary 193 */ 194 public NM getRxd4_ActualDispenseAmount() { 195 NM retVal = this.getTypedField(4, 0); 196 return retVal; 197 } 198 199 200 201 /** 202 * Returns 203 * RXD-5: "Actual Dispense Units" - creates it if necessary 204 */ 205 public CE getActualDispenseUnits() { 206 CE retVal = this.getTypedField(5, 0); 207 return retVal; 208 } 209 210 /** 211 * Returns 212 * RXD-5: "Actual Dispense Units" - creates it if necessary 213 */ 214 public CE getRxd5_ActualDispenseUnits() { 215 CE retVal = this.getTypedField(5, 0); 216 return retVal; 217 } 218 219 220 221 /** 222 * Returns 223 * RXD-6: "Actual Dosage Form" - creates it if necessary 224 */ 225 public CE getActualDosageForm() { 226 CE retVal = this.getTypedField(6, 0); 227 return retVal; 228 } 229 230 /** 231 * Returns 232 * RXD-6: "Actual Dosage Form" - creates it if necessary 233 */ 234 public CE getRxd6_ActualDosageForm() { 235 CE retVal = this.getTypedField(6, 0); 236 return retVal; 237 } 238 239 240 241 /** 242 * Returns 243 * RXD-7: "Prescription Number" - creates it if necessary 244 */ 245 public ST getPrescriptionNumber() { 246 ST retVal = this.getTypedField(7, 0); 247 return retVal; 248 } 249 250 /** 251 * Returns 252 * RXD-7: "Prescription Number" - creates it if necessary 253 */ 254 public ST getRxd7_PrescriptionNumber() { 255 ST retVal = this.getTypedField(7, 0); 256 return retVal; 257 } 258 259 260 261 /** 262 * Returns 263 * RXD-8: "Number of Refills Remaining" - creates it if necessary 264 */ 265 public NM getNumberOfRefillsRemaining() { 266 NM retVal = this.getTypedField(8, 0); 267 return retVal; 268 } 269 270 /** 271 * Returns 272 * RXD-8: "Number of Refills Remaining" - creates it if necessary 273 */ 274 public NM getRxd8_NumberOfRefillsRemaining() { 275 NM retVal = this.getTypedField(8, 0); 276 return retVal; 277 } 278 279 280 /** 281 * Returns all repetitions of Dispense Notes (RXD-9). 282 */ 283 public CE[] getDispenseNotes() { 284 CE[] retVal = this.getTypedField(9, new CE[0]); 285 return retVal; 286 } 287 288 289 /** 290 * Returns all repetitions of Dispense Notes (RXD-9). 291 */ 292 public CE[] getRxd9_DispenseNotes() { 293 CE[] retVal = this.getTypedField(9, new CE[0]); 294 return retVal; 295 } 296 297 298 /** 299 * Returns a count of the current number of repetitions of Dispense Notes (RXD-9). 300 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 301 * it will return zero. 302 */ 303 public int getDispenseNotesReps() { 304 return this.getReps(9); 305 } 306 307 308 /** 309 * Returns a specific repetition of 310 * RXD-9: "Dispense Notes" - creates it if necessary 311 * 312 * @param rep The repetition index (0-indexed) 313 */ 314 public CE getDispenseNotes(int rep) { 315 CE retVal = this.getTypedField(9, rep); 316 return retVal; 317 } 318 319 /** 320 * Returns a specific repetition of 321 * RXD-9: "Dispense Notes" - creates it if necessary 322 * 323 * @param rep The repetition index (0-indexed) 324 */ 325 public CE getRxd9_DispenseNotes(int rep) { 326 CE retVal = this.getTypedField(9, rep); 327 return retVal; 328 } 329 330 /** 331 * Returns a count of the current number of repetitions of Dispense Notes (RXD-9). 332 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 333 * it will return zero. 334 */ 335 public int getRxd9_DispenseNotesReps() { 336 return this.getReps(9); 337 } 338 339 340 /** 341 * Inserts a repetition of 342 * RXD-9: "Dispense Notes" at a specific index 343 * 344 * @param rep The repetition index (0-indexed) 345 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 346 */ 347 public CE insertDispenseNotes(int rep) throws HL7Exception { 348 return (CE) super.insertRepetition(9, rep); 349 } 350 351 352 /** 353 * Inserts a repetition of 354 * RXD-9: "Dispense Notes" at a specific index 355 * 356 * @param rep The repetition index (0-indexed) 357 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 358 */ 359 public CE insertRxd9_DispenseNotes(int rep) throws HL7Exception { 360 return (CE) super.insertRepetition(9, rep); 361 } 362 363 364 /** 365 * Removes a repetition of 366 * RXD-9: "Dispense Notes" at a specific index 367 * 368 * @param rep The repetition index (0-indexed) 369 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 370 */ 371 public CE removeDispenseNotes(int rep) throws HL7Exception { 372 return (CE) super.removeRepetition(9, rep); 373 } 374 375 376 /** 377 * Removes a repetition of 378 * RXD-9: "Dispense Notes" at a specific index 379 * 380 * @param rep The repetition index (0-indexed) 381 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 382 */ 383 public CE removeRxd9_DispenseNotes(int rep) throws HL7Exception { 384 return (CE) super.removeRepetition(9, rep); 385 } 386 387 388 389 390 /** 391 * Returns 392 * RXD-10: "Dispensing Provider" - creates it if necessary 393 */ 394 public XCN getDispensingProvider() { 395 XCN retVal = this.getTypedField(10, 0); 396 return retVal; 397 } 398 399 /** 400 * Returns 401 * RXD-10: "Dispensing Provider" - creates it if necessary 402 */ 403 public XCN getRxd10_DispensingProvider() { 404 XCN retVal = this.getTypedField(10, 0); 405 return retVal; 406 } 407 408 409 410 /** 411 * Returns 412 * RXD-11: "Substitution Status" - creates it if necessary 413 */ 414 public ID getSubstitutionStatus() { 415 ID retVal = this.getTypedField(11, 0); 416 return retVal; 417 } 418 419 /** 420 * Returns 421 * RXD-11: "Substitution Status" - creates it if necessary 422 */ 423 public ID getRxd11_SubstitutionStatus() { 424 ID retVal = this.getTypedField(11, 0); 425 return retVal; 426 } 427 428 429 430 /** 431 * Returns 432 * RXD-12: "Total Daily Dose" - creates it if necessary 433 */ 434 public CQ getTotalDailyDose() { 435 CQ retVal = this.getTypedField(12, 0); 436 return retVal; 437 } 438 439 /** 440 * Returns 441 * RXD-12: "Total Daily Dose" - creates it if necessary 442 */ 443 public CQ getRxd12_TotalDailyDose() { 444 CQ retVal = this.getTypedField(12, 0); 445 return retVal; 446 } 447 448 449 450 /** 451 * Returns 452 * RXD-13: "Dispense-To Location" - creates it if necessary 453 */ 454 public CM_LA1 getDispenseToLocation() { 455 CM_LA1 retVal = this.getTypedField(13, 0); 456 return retVal; 457 } 458 459 /** 460 * Returns 461 * RXD-13: "Dispense-To Location" - creates it if necessary 462 */ 463 public CM_LA1 getRxd13_DispenseToLocation() { 464 CM_LA1 retVal = this.getTypedField(13, 0); 465 return retVal; 466 } 467 468 469 470 /** 471 * Returns 472 * RXD-14: "Needs Human Review" - creates it if necessary 473 */ 474 public ID getNeedsHumanReview() { 475 ID retVal = this.getTypedField(14, 0); 476 return retVal; 477 } 478 479 /** 480 * Returns 481 * RXD-14: "Needs Human Review" - creates it if necessary 482 */ 483 public ID getRxd14_NeedsHumanReview() { 484 ID retVal = this.getTypedField(14, 0); 485 return retVal; 486 } 487 488 489 /** 490 * Returns all repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15). 491 */ 492 public CE[] getPharmacyTreatmentSupplierSSpecialDispensingInstructions() { 493 CE[] retVal = this.getTypedField(15, new CE[0]); 494 return retVal; 495 } 496 497 498 /** 499 * Returns all repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15). 500 */ 501 public CE[] getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions() { 502 CE[] retVal = this.getTypedField(15, new CE[0]); 503 return retVal; 504 } 505 506 507 /** 508 * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15). 509 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 510 * it will return zero. 511 */ 512 public int getPharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() { 513 return this.getReps(15); 514 } 515 516 517 /** 518 * Returns a specific repetition of 519 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary 520 * 521 * @param rep The repetition index (0-indexed) 522 */ 523 public CE getPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) { 524 CE retVal = this.getTypedField(15, rep); 525 return retVal; 526 } 527 528 /** 529 * Returns a specific repetition of 530 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary 531 * 532 * @param rep The repetition index (0-indexed) 533 */ 534 public CE getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) { 535 CE retVal = this.getTypedField(15, rep); 536 return retVal; 537 } 538 539 /** 540 * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15). 541 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 542 * it will return zero. 543 */ 544 public int getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() { 545 return this.getReps(15); 546 } 547 548 549 /** 550 * Inserts a repetition of 551 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index 552 * 553 * @param rep The repetition index (0-indexed) 554 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 555 */ 556 public CE insertPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 557 return (CE) super.insertRepetition(15, rep); 558 } 559 560 561 /** 562 * Inserts a repetition of 563 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index 564 * 565 * @param rep The repetition index (0-indexed) 566 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 567 */ 568 public CE insertRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 569 return (CE) super.insertRepetition(15, rep); 570 } 571 572 573 /** 574 * Removes a repetition of 575 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index 576 * 577 * @param rep The repetition index (0-indexed) 578 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 579 */ 580 public CE removePharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 581 return (CE) super.removeRepetition(15, rep); 582 } 583 584 585 /** 586 * Removes a repetition of 587 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index 588 * 589 * @param rep The repetition index (0-indexed) 590 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 591 */ 592 public CE removeRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 593 return (CE) super.removeRepetition(15, rep); 594 } 595 596 597 598 599 /** 600 * Returns 601 * RXD-16: "Actual Strength" - creates it if necessary 602 */ 603 public NM getActualStrength() { 604 NM retVal = this.getTypedField(16, 0); 605 return retVal; 606 } 607 608 /** 609 * Returns 610 * RXD-16: "Actual Strength" - creates it if necessary 611 */ 612 public NM getRxd16_ActualStrength() { 613 NM retVal = this.getTypedField(16, 0); 614 return retVal; 615 } 616 617 618 619 /** 620 * Returns 621 * RXD-17: "Actual Strength Unit" - creates it if necessary 622 */ 623 public CE getActualStrengthUnit() { 624 CE retVal = this.getTypedField(17, 0); 625 return retVal; 626 } 627 628 /** 629 * Returns 630 * RXD-17: "Actual Strength Unit" - creates it if necessary 631 */ 632 public CE getRxd17_ActualStrengthUnit() { 633 CE retVal = this.getTypedField(17, 0); 634 return retVal; 635 } 636 637 638 /** 639 * Returns all repetitions of Substance Lot Number (RXD-18). 640 */ 641 public ST[] getSubstanceLotNumber() { 642 ST[] retVal = this.getTypedField(18, new ST[0]); 643 return retVal; 644 } 645 646 647 /** 648 * Returns all repetitions of Substance Lot Number (RXD-18). 649 */ 650 public ST[] getRxd18_SubstanceLotNumber() { 651 ST[] retVal = this.getTypedField(18, new ST[0]); 652 return retVal; 653 } 654 655 656 /** 657 * Returns a count of the current number of repetitions of Substance Lot Number (RXD-18). 658 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 659 * it will return zero. 660 */ 661 public int getSubstanceLotNumberReps() { 662 return this.getReps(18); 663 } 664 665 666 /** 667 * Returns a specific repetition of 668 * RXD-18: "Substance Lot Number" - creates it if necessary 669 * 670 * @param rep The repetition index (0-indexed) 671 */ 672 public ST getSubstanceLotNumber(int rep) { 673 ST retVal = this.getTypedField(18, rep); 674 return retVal; 675 } 676 677 /** 678 * Returns a specific repetition of 679 * RXD-18: "Substance Lot Number" - creates it if necessary 680 * 681 * @param rep The repetition index (0-indexed) 682 */ 683 public ST getRxd18_SubstanceLotNumber(int rep) { 684 ST retVal = this.getTypedField(18, rep); 685 return retVal; 686 } 687 688 /** 689 * Returns a count of the current number of repetitions of Substance Lot Number (RXD-18). 690 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 691 * it will return zero. 692 */ 693 public int getRxd18_SubstanceLotNumberReps() { 694 return this.getReps(18); 695 } 696 697 698 /** 699 * Inserts a repetition of 700 * RXD-18: "Substance Lot Number" at a specific index 701 * 702 * @param rep The repetition index (0-indexed) 703 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 704 */ 705 public ST insertSubstanceLotNumber(int rep) throws HL7Exception { 706 return (ST) super.insertRepetition(18, rep); 707 } 708 709 710 /** 711 * Inserts a repetition of 712 * RXD-18: "Substance Lot Number" at a specific index 713 * 714 * @param rep The repetition index (0-indexed) 715 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 716 */ 717 public ST insertRxd18_SubstanceLotNumber(int rep) throws HL7Exception { 718 return (ST) super.insertRepetition(18, rep); 719 } 720 721 722 /** 723 * Removes a repetition of 724 * RXD-18: "Substance Lot Number" at a specific index 725 * 726 * @param rep The repetition index (0-indexed) 727 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 728 */ 729 public ST removeSubstanceLotNumber(int rep) throws HL7Exception { 730 return (ST) super.removeRepetition(18, rep); 731 } 732 733 734 /** 735 * Removes a repetition of 736 * RXD-18: "Substance Lot Number" at a specific index 737 * 738 * @param rep The repetition index (0-indexed) 739 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 740 */ 741 public ST removeRxd18_SubstanceLotNumber(int rep) throws HL7Exception { 742 return (ST) super.removeRepetition(18, rep); 743 } 744 745 746 747 /** 748 * Returns all repetitions of Substance Expiration Date (RXD-19). 749 */ 750 public TS[] getSubstanceExpirationDate() { 751 TS[] retVal = this.getTypedField(19, new TS[0]); 752 return retVal; 753 } 754 755 756 /** 757 * Returns all repetitions of Substance Expiration Date (RXD-19). 758 */ 759 public TS[] getRxd19_SubstanceExpirationDate() { 760 TS[] retVal = this.getTypedField(19, new TS[0]); 761 return retVal; 762 } 763 764 765 /** 766 * Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19). 767 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 768 * it will return zero. 769 */ 770 public int getSubstanceExpirationDateReps() { 771 return this.getReps(19); 772 } 773 774 775 /** 776 * Returns a specific repetition of 777 * RXD-19: "Substance Expiration Date" - creates it if necessary 778 * 779 * @param rep The repetition index (0-indexed) 780 */ 781 public TS getSubstanceExpirationDate(int rep) { 782 TS retVal = this.getTypedField(19, rep); 783 return retVal; 784 } 785 786 /** 787 * Returns a specific repetition of 788 * RXD-19: "Substance Expiration Date" - creates it if necessary 789 * 790 * @param rep The repetition index (0-indexed) 791 */ 792 public TS getRxd19_SubstanceExpirationDate(int rep) { 793 TS retVal = this.getTypedField(19, rep); 794 return retVal; 795 } 796 797 /** 798 * Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19). 799 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 800 * it will return zero. 801 */ 802 public int getRxd19_SubstanceExpirationDateReps() { 803 return this.getReps(19); 804 } 805 806 807 /** 808 * Inserts a repetition of 809 * RXD-19: "Substance Expiration Date" at a specific index 810 * 811 * @param rep The repetition index (0-indexed) 812 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 813 */ 814 public TS insertSubstanceExpirationDate(int rep) throws HL7Exception { 815 return (TS) super.insertRepetition(19, rep); 816 } 817 818 819 /** 820 * Inserts a repetition of 821 * RXD-19: "Substance Expiration Date" at a specific index 822 * 823 * @param rep The repetition index (0-indexed) 824 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 825 */ 826 public TS insertRxd19_SubstanceExpirationDate(int rep) throws HL7Exception { 827 return (TS) super.insertRepetition(19, rep); 828 } 829 830 831 /** 832 * Removes a repetition of 833 * RXD-19: "Substance Expiration Date" at a specific index 834 * 835 * @param rep The repetition index (0-indexed) 836 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 837 */ 838 public TS removeSubstanceExpirationDate(int rep) throws HL7Exception { 839 return (TS) super.removeRepetition(19, rep); 840 } 841 842 843 /** 844 * Removes a repetition of 845 * RXD-19: "Substance Expiration Date" at a specific index 846 * 847 * @param rep The repetition index (0-indexed) 848 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 849 */ 850 public TS removeRxd19_SubstanceExpirationDate(int rep) throws HL7Exception { 851 return (TS) super.removeRepetition(19, rep); 852 } 853 854 855 856 /** 857 * Returns all repetitions of Substance Manufacturer Name (RXD-20). 858 */ 859 public CE[] getSubstanceManufacturerName() { 860 CE[] retVal = this.getTypedField(20, new CE[0]); 861 return retVal; 862 } 863 864 865 /** 866 * Returns all repetitions of Substance Manufacturer Name (RXD-20). 867 */ 868 public CE[] getRxd20_SubstanceManufacturerName() { 869 CE[] retVal = this.getTypedField(20, new CE[0]); 870 return retVal; 871 } 872 873 874 /** 875 * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20). 876 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 877 * it will return zero. 878 */ 879 public int getSubstanceManufacturerNameReps() { 880 return this.getReps(20); 881 } 882 883 884 /** 885 * Returns a specific repetition of 886 * RXD-20: "Substance Manufacturer Name" - creates it if necessary 887 * 888 * @param rep The repetition index (0-indexed) 889 */ 890 public CE getSubstanceManufacturerName(int rep) { 891 CE retVal = this.getTypedField(20, rep); 892 return retVal; 893 } 894 895 /** 896 * Returns a specific repetition of 897 * RXD-20: "Substance Manufacturer Name" - creates it if necessary 898 * 899 * @param rep The repetition index (0-indexed) 900 */ 901 public CE getRxd20_SubstanceManufacturerName(int rep) { 902 CE retVal = this.getTypedField(20, rep); 903 return retVal; 904 } 905 906 /** 907 * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20). 908 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 909 * it will return zero. 910 */ 911 public int getRxd20_SubstanceManufacturerNameReps() { 912 return this.getReps(20); 913 } 914 915 916 /** 917 * Inserts a repetition of 918 * RXD-20: "Substance Manufacturer Name" at a specific index 919 * 920 * @param rep The repetition index (0-indexed) 921 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 922 */ 923 public CE insertSubstanceManufacturerName(int rep) throws HL7Exception { 924 return (CE) super.insertRepetition(20, rep); 925 } 926 927 928 /** 929 * Inserts a repetition of 930 * RXD-20: "Substance Manufacturer Name" at a specific index 931 * 932 * @param rep The repetition index (0-indexed) 933 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 934 */ 935 public CE insertRxd20_SubstanceManufacturerName(int rep) throws HL7Exception { 936 return (CE) super.insertRepetition(20, rep); 937 } 938 939 940 /** 941 * Removes a repetition of 942 * RXD-20: "Substance Manufacturer Name" at a specific index 943 * 944 * @param rep The repetition index (0-indexed) 945 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 946 */ 947 public CE removeSubstanceManufacturerName(int rep) throws HL7Exception { 948 return (CE) super.removeRepetition(20, rep); 949 } 950 951 952 /** 953 * Removes a repetition of 954 * RXD-20: "Substance Manufacturer Name" at a specific index 955 * 956 * @param rep The repetition index (0-indexed) 957 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 958 */ 959 public CE removeRxd20_SubstanceManufacturerName(int rep) throws HL7Exception { 960 return (CE) super.removeRepetition(20, rep); 961 } 962 963 964 965 966 /** 967 * Returns 968 * RXD-21: "Indication" - creates it if necessary 969 */ 970 public CE getIndication() { 971 CE retVal = this.getTypedField(21, 0); 972 return retVal; 973 } 974 975 /** 976 * Returns 977 * RXD-21: "Indication" - creates it if necessary 978 */ 979 public CE getRxd21_Indication() { 980 CE retVal = this.getTypedField(21, 0); 981 return retVal; 982 } 983 984 985 986 /** 987 * Returns 988 * RXD-22: "Dispense Package Size" - creates it if necessary 989 */ 990 public NM getDispensePackageSize() { 991 NM retVal = this.getTypedField(22, 0); 992 return retVal; 993 } 994 995 /** 996 * Returns 997 * RXD-22: "Dispense Package Size" - creates it if necessary 998 */ 999 public NM getRxd22_DispensePackageSize() { 1000 NM retVal = this.getTypedField(22, 0); 1001 return retVal; 1002 } 1003 1004 1005 1006 /** 1007 * Returns 1008 * RXD-23: "Dispense Package Size Unit" - creates it if necessary 1009 */ 1010 public CE getDispensePackageSizeUnit() { 1011 CE retVal = this.getTypedField(23, 0); 1012 return retVal; 1013 } 1014 1015 /** 1016 * Returns 1017 * RXD-23: "Dispense Package Size Unit" - creates it if necessary 1018 */ 1019 public CE getRxd23_DispensePackageSizeUnit() { 1020 CE retVal = this.getTypedField(23, 0); 1021 return retVal; 1022 } 1023 1024 1025 1026 /** 1027 * Returns 1028 * RXD-24: "Dispense Package Method" - creates it if necessary 1029 */ 1030 public ID getDispensePackageMethod() { 1031 ID retVal = this.getTypedField(24, 0); 1032 return retVal; 1033 } 1034 1035 /** 1036 * Returns 1037 * RXD-24: "Dispense Package Method" - creates it if necessary 1038 */ 1039 public ID getRxd24_DispensePackageMethod() { 1040 ID retVal = this.getTypedField(24, 0); 1041 return retVal; 1042 } 1043 1044 1045 1046 1047 1048 /** {@inheritDoc} */ 1049 protected Type createNewTypeWithoutReflection(int field) { 1050 switch (field) { 1051 case 0: return new NM(getMessage()); 1052 case 1: return new CE(getMessage()); 1053 case 2: return new TS(getMessage()); 1054 case 3: return new NM(getMessage()); 1055 case 4: return new CE(getMessage()); 1056 case 5: return new CE(getMessage()); 1057 case 6: return new ST(getMessage()); 1058 case 7: return new NM(getMessage()); 1059 case 8: return new CE(getMessage()); 1060 case 9: return new XCN(getMessage()); 1061 case 10: return new ID(getMessage(), new Integer( 167 )); 1062 case 11: return new CQ(getMessage()); 1063 case 12: return new CM_LA1(getMessage()); 1064 case 13: return new ID(getMessage(), new Integer( 136 )); 1065 case 14: return new CE(getMessage()); 1066 case 15: return new NM(getMessage()); 1067 case 16: return new CE(getMessage()); 1068 case 17: return new ST(getMessage()); 1069 case 18: return new TS(getMessage()); 1070 case 19: return new CE(getMessage()); 1071 case 20: return new CE(getMessage()); 1072 case 21: return new NM(getMessage()); 1073 case 22: return new CE(getMessage()); 1074 case 23: return new ID(getMessage(), new Integer( 321 )); 1075 default: return null; 1076 } 1077 } 1078 1079 1080} 1081