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.v24.segment; 035 036// import ca.uhn.hl7v2.model.v24.group.*; 037import ca.uhn.hl7v2.model.v24.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 RXD message segment (Pharmacy/Treatment Dispense). 050 * This segment has the following fields:</p> 051 * <ul> 052 * <li>RXD-1: Dispense Sub-ID Counter (NM) <b> </b> 053 * <li>RXD-2: Dispense/Give Code (CE) <b> </b> 054 * <li>RXD-3: Date/Time Dispensed (TS) <b> </b> 055 * <li>RXD-4: Actual Dispense Amount (NM) <b> </b> 056 * <li>RXD-5: Actual Dispense Units (CE) <b>optional </b> 057 * <li>RXD-6: Actual Dosage Form (CE) <b>optional </b> 058 * <li>RXD-7: Prescription Number (ST) <b> </b> 059 * <li>RXD-8: Number of Refills Remaining (NM) <b>optional </b> 060 * <li>RXD-9: Dispense Notes (ST) <b>optional repeating</b> 061 * <li>RXD-10: Dispensing Provider (XCN) <b>optional repeating</b> 062 * <li>RXD-11: Substitution Status (ID) <b>optional </b> 063 * <li>RXD-12: Total Daily Dose (CQ) <b>optional </b> 064 * <li>RXD-13: Dispense-To Location (LA2) <b>optional </b> 065 * <li>RXD-14: Needs Human Review (ID) <b>optional </b> 066 * <li>RXD-15: Pharmacy/Treatment Supplier's Special Dispensing Instructions (CE) <b>optional repeating</b> 067 * <li>RXD-16: Actual Strength (NM) <b>optional </b> 068 * <li>RXD-17: Actual Strength Unit (CE) <b>optional </b> 069 * <li>RXD-18: Substance Lot Number (ST) <b>optional repeating</b> 070 * <li>RXD-19: Substance Expiration Date (TS) <b>optional repeating</b> 071 * <li>RXD-20: Substance Manufacturer Name (CE) <b>optional repeating</b> 072 * <li>RXD-21: Indication (CE) <b>optional repeating</b> 073 * <li>RXD-22: Dispense Package Size (NM) <b>optional </b> 074 * <li>RXD-23: Dispense Package Size Unit (CE) <b>optional </b> 075 * <li>RXD-24: Dispense Package Method (ID) <b>optional </b> 076 * <li>RXD-25: Supplementary Code (CE) <b>optional repeating</b> 077 * <li>RXD-26: Initiating Location (CE) <b>optional </b> 078 * <li>RXD-27: Packaging/Assembly Location (CE) <b>optional </b> 079 * </ul> 080 */ 081@SuppressWarnings("unused") 082public class RXD extends AbstractSegment { 083 084 /** 085 * Creates a new RXD segment 086 */ 087 public RXD(Group parent, ModelClassFactory factory) { 088 super(parent, factory); 089 init(factory); 090 } 091 092 private void init(ModelClassFactory factory) { 093 try { 094 this.add(NM.class, true, 1, 4, new Object[]{ getMessage() }, "Dispense Sub-ID Counter"); 095 this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Dispense/Give Code"); 096 this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Date/Time Dispensed"); 097 this.add(NM.class, true, 1, 20, new Object[]{ getMessage() }, "Actual Dispense Amount"); 098 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Actual Dispense Units"); 099 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Actual Dosage Form"); 100 this.add(ST.class, true, 1, 20, new Object[]{ getMessage() }, "Prescription Number"); 101 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Number of Refills Remaining"); 102 this.add(ST.class, false, 0, 200, new Object[]{ getMessage() }, "Dispense Notes"); 103 this.add(XCN.class, false, 0, 200, new Object[]{ getMessage() }, "Dispensing Provider"); 104 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(167) }, "Substitution Status"); 105 this.add(CQ.class, false, 1, 10, new Object[]{ getMessage() }, "Total Daily Dose"); 106 this.add(LA2.class, false, 1, 200, new Object[]{ getMessage() }, "Dispense-To Location"); 107 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Needs Human Review"); 108 this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Pharmacy/Treatment Supplier's Special Dispensing Instructions"); 109 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Actual Strength"); 110 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Actual Strength Unit"); 111 this.add(ST.class, false, 0, 20, new Object[]{ getMessage() }, "Substance Lot Number"); 112 this.add(TS.class, false, 0, 26, new Object[]{ getMessage() }, "Substance Expiration Date"); 113 this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Substance Manufacturer Name"); 114 this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Indication"); 115 this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Dispense Package Size"); 116 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Dispense Package Size Unit"); 117 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(321) }, "Dispense Package Method"); 118 this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Supplementary Code"); 119 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Initiating Location"); 120 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Packaging/Assembly Location"); 121 } catch(HL7Exception e) { 122 log.error("Unexpected error creating RXD - this is probably a bug in the source code generator.", e); 123 } 124 } 125 126 127 128 /** 129 * Returns 130 * RXD-1: "Dispense Sub-ID Counter" - creates it if necessary 131 */ 132 public NM getDispenseSubIDCounter() { 133 NM retVal = this.getTypedField(1, 0); 134 return retVal; 135 } 136 137 /** 138 * Returns 139 * RXD-1: "Dispense Sub-ID Counter" - creates it if necessary 140 */ 141 public NM getRxd1_DispenseSubIDCounter() { 142 NM retVal = this.getTypedField(1, 0); 143 return retVal; 144 } 145 146 147 148 /** 149 * Returns 150 * RXD-2: "Dispense/Give Code" - creates it if necessary 151 */ 152 public CE getDispenseGiveCode() { 153 CE retVal = this.getTypedField(2, 0); 154 return retVal; 155 } 156 157 /** 158 * Returns 159 * RXD-2: "Dispense/Give Code" - creates it if necessary 160 */ 161 public CE getRxd2_DispenseGiveCode() { 162 CE retVal = this.getTypedField(2, 0); 163 return retVal; 164 } 165 166 167 168 /** 169 * Returns 170 * RXD-3: "Date/Time Dispensed" - creates it if necessary 171 */ 172 public TS getDateTimeDispensed() { 173 TS retVal = this.getTypedField(3, 0); 174 return retVal; 175 } 176 177 /** 178 * Returns 179 * RXD-3: "Date/Time Dispensed" - creates it if necessary 180 */ 181 public TS getRxd3_DateTimeDispensed() { 182 TS retVal = this.getTypedField(3, 0); 183 return retVal; 184 } 185 186 187 188 /** 189 * Returns 190 * RXD-4: "Actual Dispense Amount" - creates it if necessary 191 */ 192 public NM getActualDispenseAmount() { 193 NM retVal = this.getTypedField(4, 0); 194 return retVal; 195 } 196 197 /** 198 * Returns 199 * RXD-4: "Actual Dispense Amount" - creates it if necessary 200 */ 201 public NM getRxd4_ActualDispenseAmount() { 202 NM retVal = this.getTypedField(4, 0); 203 return retVal; 204 } 205 206 207 208 /** 209 * Returns 210 * RXD-5: "Actual Dispense Units" - creates it if necessary 211 */ 212 public CE getActualDispenseUnits() { 213 CE retVal = this.getTypedField(5, 0); 214 return retVal; 215 } 216 217 /** 218 * Returns 219 * RXD-5: "Actual Dispense Units" - creates it if necessary 220 */ 221 public CE getRxd5_ActualDispenseUnits() { 222 CE retVal = this.getTypedField(5, 0); 223 return retVal; 224 } 225 226 227 228 /** 229 * Returns 230 * RXD-6: "Actual Dosage Form" - creates it if necessary 231 */ 232 public CE getActualDosageForm() { 233 CE retVal = this.getTypedField(6, 0); 234 return retVal; 235 } 236 237 /** 238 * Returns 239 * RXD-6: "Actual Dosage Form" - creates it if necessary 240 */ 241 public CE getRxd6_ActualDosageForm() { 242 CE retVal = this.getTypedField(6, 0); 243 return retVal; 244 } 245 246 247 248 /** 249 * Returns 250 * RXD-7: "Prescription Number" - creates it if necessary 251 */ 252 public ST getPrescriptionNumber() { 253 ST retVal = this.getTypedField(7, 0); 254 return retVal; 255 } 256 257 /** 258 * Returns 259 * RXD-7: "Prescription Number" - creates it if necessary 260 */ 261 public ST getRxd7_PrescriptionNumber() { 262 ST retVal = this.getTypedField(7, 0); 263 return retVal; 264 } 265 266 267 268 /** 269 * Returns 270 * RXD-8: "Number of Refills Remaining" - creates it if necessary 271 */ 272 public NM getNumberOfRefillsRemaining() { 273 NM retVal = this.getTypedField(8, 0); 274 return retVal; 275 } 276 277 /** 278 * Returns 279 * RXD-8: "Number of Refills Remaining" - creates it if necessary 280 */ 281 public NM getRxd8_NumberOfRefillsRemaining() { 282 NM retVal = this.getTypedField(8, 0); 283 return retVal; 284 } 285 286 287 /** 288 * Returns all repetitions of Dispense Notes (RXD-9). 289 */ 290 public ST[] getDispenseNotes() { 291 ST[] retVal = this.getTypedField(9, new ST[0]); 292 return retVal; 293 } 294 295 296 /** 297 * Returns all repetitions of Dispense Notes (RXD-9). 298 */ 299 public ST[] getRxd9_DispenseNotes() { 300 ST[] retVal = this.getTypedField(9, new ST[0]); 301 return retVal; 302 } 303 304 305 /** 306 * Returns a count of the current number of repetitions of Dispense Notes (RXD-9). 307 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 308 * it will return zero. 309 */ 310 public int getDispenseNotesReps() { 311 return this.getReps(9); 312 } 313 314 315 /** 316 * Returns a specific repetition of 317 * RXD-9: "Dispense Notes" - creates it if necessary 318 * 319 * @param rep The repetition index (0-indexed) 320 */ 321 public ST getDispenseNotes(int rep) { 322 ST retVal = this.getTypedField(9, rep); 323 return retVal; 324 } 325 326 /** 327 * Returns a specific repetition of 328 * RXD-9: "Dispense Notes" - creates it if necessary 329 * 330 * @param rep The repetition index (0-indexed) 331 */ 332 public ST getRxd9_DispenseNotes(int rep) { 333 ST retVal = this.getTypedField(9, rep); 334 return retVal; 335 } 336 337 /** 338 * Returns a count of the current number of repetitions of Dispense Notes (RXD-9). 339 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 340 * it will return zero. 341 */ 342 public int getRxd9_DispenseNotesReps() { 343 return this.getReps(9); 344 } 345 346 347 /** 348 * Inserts a repetition of 349 * RXD-9: "Dispense Notes" at a specific index 350 * 351 * @param rep The repetition index (0-indexed) 352 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 353 */ 354 public ST insertDispenseNotes(int rep) throws HL7Exception { 355 return (ST) super.insertRepetition(9, rep); 356 } 357 358 359 /** 360 * Inserts a repetition of 361 * RXD-9: "Dispense Notes" at a specific index 362 * 363 * @param rep The repetition index (0-indexed) 364 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 365 */ 366 public ST insertRxd9_DispenseNotes(int rep) throws HL7Exception { 367 return (ST) super.insertRepetition(9, rep); 368 } 369 370 371 /** 372 * Removes a repetition of 373 * RXD-9: "Dispense Notes" at a specific index 374 * 375 * @param rep The repetition index (0-indexed) 376 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 377 */ 378 public ST removeDispenseNotes(int rep) throws HL7Exception { 379 return (ST) super.removeRepetition(9, rep); 380 } 381 382 383 /** 384 * Removes a repetition of 385 * RXD-9: "Dispense Notes" at a specific index 386 * 387 * @param rep The repetition index (0-indexed) 388 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 389 */ 390 public ST removeRxd9_DispenseNotes(int rep) throws HL7Exception { 391 return (ST) super.removeRepetition(9, rep); 392 } 393 394 395 396 /** 397 * Returns all repetitions of Dispensing Provider (RXD-10). 398 */ 399 public XCN[] getDispensingProvider() { 400 XCN[] retVal = this.getTypedField(10, new XCN[0]); 401 return retVal; 402 } 403 404 405 /** 406 * Returns all repetitions of Dispensing Provider (RXD-10). 407 */ 408 public XCN[] getRxd10_DispensingProvider() { 409 XCN[] retVal = this.getTypedField(10, new XCN[0]); 410 return retVal; 411 } 412 413 414 /** 415 * Returns a count of the current number of repetitions of Dispensing Provider (RXD-10). 416 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 417 * it will return zero. 418 */ 419 public int getDispensingProviderReps() { 420 return this.getReps(10); 421 } 422 423 424 /** 425 * Returns a specific repetition of 426 * RXD-10: "Dispensing Provider" - creates it if necessary 427 * 428 * @param rep The repetition index (0-indexed) 429 */ 430 public XCN getDispensingProvider(int rep) { 431 XCN retVal = this.getTypedField(10, rep); 432 return retVal; 433 } 434 435 /** 436 * Returns a specific repetition of 437 * RXD-10: "Dispensing Provider" - creates it if necessary 438 * 439 * @param rep The repetition index (0-indexed) 440 */ 441 public XCN getRxd10_DispensingProvider(int rep) { 442 XCN retVal = this.getTypedField(10, rep); 443 return retVal; 444 } 445 446 /** 447 * Returns a count of the current number of repetitions of Dispensing Provider (RXD-10). 448 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 449 * it will return zero. 450 */ 451 public int getRxd10_DispensingProviderReps() { 452 return this.getReps(10); 453 } 454 455 456 /** 457 * Inserts a repetition of 458 * RXD-10: "Dispensing Provider" at a specific index 459 * 460 * @param rep The repetition index (0-indexed) 461 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 462 */ 463 public XCN insertDispensingProvider(int rep) throws HL7Exception { 464 return (XCN) super.insertRepetition(10, rep); 465 } 466 467 468 /** 469 * Inserts a repetition of 470 * RXD-10: "Dispensing Provider" at a specific index 471 * 472 * @param rep The repetition index (0-indexed) 473 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 474 */ 475 public XCN insertRxd10_DispensingProvider(int rep) throws HL7Exception { 476 return (XCN) super.insertRepetition(10, rep); 477 } 478 479 480 /** 481 * Removes a repetition of 482 * RXD-10: "Dispensing Provider" at a specific index 483 * 484 * @param rep The repetition index (0-indexed) 485 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 486 */ 487 public XCN removeDispensingProvider(int rep) throws HL7Exception { 488 return (XCN) super.removeRepetition(10, rep); 489 } 490 491 492 /** 493 * Removes a repetition of 494 * RXD-10: "Dispensing Provider" at a specific index 495 * 496 * @param rep The repetition index (0-indexed) 497 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 498 */ 499 public XCN removeRxd10_DispensingProvider(int rep) throws HL7Exception { 500 return (XCN) super.removeRepetition(10, rep); 501 } 502 503 504 505 506 /** 507 * Returns 508 * RXD-11: "Substitution Status" - creates it if necessary 509 */ 510 public ID getSubstitutionStatus() { 511 ID retVal = this.getTypedField(11, 0); 512 return retVal; 513 } 514 515 /** 516 * Returns 517 * RXD-11: "Substitution Status" - creates it if necessary 518 */ 519 public ID getRxd11_SubstitutionStatus() { 520 ID retVal = this.getTypedField(11, 0); 521 return retVal; 522 } 523 524 525 526 /** 527 * Returns 528 * RXD-12: "Total Daily Dose" - creates it if necessary 529 */ 530 public CQ getTotalDailyDose() { 531 CQ retVal = this.getTypedField(12, 0); 532 return retVal; 533 } 534 535 /** 536 * Returns 537 * RXD-12: "Total Daily Dose" - creates it if necessary 538 */ 539 public CQ getRxd12_TotalDailyDose() { 540 CQ retVal = this.getTypedField(12, 0); 541 return retVal; 542 } 543 544 545 546 /** 547 * Returns 548 * RXD-13: "Dispense-To Location" - creates it if necessary 549 */ 550 public LA2 getDispenseToLocation() { 551 LA2 retVal = this.getTypedField(13, 0); 552 return retVal; 553 } 554 555 /** 556 * Returns 557 * RXD-13: "Dispense-To Location" - creates it if necessary 558 */ 559 public LA2 getRxd13_DispenseToLocation() { 560 LA2 retVal = this.getTypedField(13, 0); 561 return retVal; 562 } 563 564 565 566 /** 567 * Returns 568 * RXD-14: "Needs Human Review" - creates it if necessary 569 */ 570 public ID getNeedsHumanReview() { 571 ID retVal = this.getTypedField(14, 0); 572 return retVal; 573 } 574 575 /** 576 * Returns 577 * RXD-14: "Needs Human Review" - creates it if necessary 578 */ 579 public ID getRxd14_NeedsHumanReview() { 580 ID retVal = this.getTypedField(14, 0); 581 return retVal; 582 } 583 584 585 /** 586 * Returns all repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15). 587 */ 588 public CE[] getPharmacyTreatmentSupplierSSpecialDispensingInstructions() { 589 CE[] retVal = this.getTypedField(15, new CE[0]); 590 return retVal; 591 } 592 593 594 /** 595 * Returns all repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15). 596 */ 597 public CE[] getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions() { 598 CE[] retVal = this.getTypedField(15, new CE[0]); 599 return retVal; 600 } 601 602 603 /** 604 * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15). 605 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 606 * it will return zero. 607 */ 608 public int getPharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() { 609 return this.getReps(15); 610 } 611 612 613 /** 614 * Returns a specific repetition of 615 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary 616 * 617 * @param rep The repetition index (0-indexed) 618 */ 619 public CE getPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) { 620 CE retVal = this.getTypedField(15, rep); 621 return retVal; 622 } 623 624 /** 625 * Returns a specific repetition of 626 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary 627 * 628 * @param rep The repetition index (0-indexed) 629 */ 630 public CE getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) { 631 CE retVal = this.getTypedField(15, rep); 632 return retVal; 633 } 634 635 /** 636 * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15). 637 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 638 * it will return zero. 639 */ 640 public int getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() { 641 return this.getReps(15); 642 } 643 644 645 /** 646 * Inserts a repetition of 647 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index 648 * 649 * @param rep The repetition index (0-indexed) 650 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 651 */ 652 public CE insertPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 653 return (CE) super.insertRepetition(15, rep); 654 } 655 656 657 /** 658 * Inserts a repetition of 659 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index 660 * 661 * @param rep The repetition index (0-indexed) 662 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 663 */ 664 public CE insertRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 665 return (CE) super.insertRepetition(15, rep); 666 } 667 668 669 /** 670 * Removes a repetition of 671 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index 672 * 673 * @param rep The repetition index (0-indexed) 674 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 675 */ 676 public CE removePharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 677 return (CE) super.removeRepetition(15, rep); 678 } 679 680 681 /** 682 * Removes a repetition of 683 * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index 684 * 685 * @param rep The repetition index (0-indexed) 686 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 687 */ 688 public CE removeRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 689 return (CE) super.removeRepetition(15, rep); 690 } 691 692 693 694 695 /** 696 * Returns 697 * RXD-16: "Actual Strength" - creates it if necessary 698 */ 699 public NM getActualStrength() { 700 NM retVal = this.getTypedField(16, 0); 701 return retVal; 702 } 703 704 /** 705 * Returns 706 * RXD-16: "Actual Strength" - creates it if necessary 707 */ 708 public NM getRxd16_ActualStrength() { 709 NM retVal = this.getTypedField(16, 0); 710 return retVal; 711 } 712 713 714 715 /** 716 * Returns 717 * RXD-17: "Actual Strength Unit" - creates it if necessary 718 */ 719 public CE getActualStrengthUnit() { 720 CE retVal = this.getTypedField(17, 0); 721 return retVal; 722 } 723 724 /** 725 * Returns 726 * RXD-17: "Actual Strength Unit" - creates it if necessary 727 */ 728 public CE getRxd17_ActualStrengthUnit() { 729 CE retVal = this.getTypedField(17, 0); 730 return retVal; 731 } 732 733 734 /** 735 * Returns all repetitions of Substance Lot Number (RXD-18). 736 */ 737 public ST[] getSubstanceLotNumber() { 738 ST[] retVal = this.getTypedField(18, new ST[0]); 739 return retVal; 740 } 741 742 743 /** 744 * Returns all repetitions of Substance Lot Number (RXD-18). 745 */ 746 public ST[] getRxd18_SubstanceLotNumber() { 747 ST[] retVal = this.getTypedField(18, new ST[0]); 748 return retVal; 749 } 750 751 752 /** 753 * Returns a count of the current number of repetitions of Substance Lot Number (RXD-18). 754 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 755 * it will return zero. 756 */ 757 public int getSubstanceLotNumberReps() { 758 return this.getReps(18); 759 } 760 761 762 /** 763 * Returns a specific repetition of 764 * RXD-18: "Substance Lot Number" - creates it if necessary 765 * 766 * @param rep The repetition index (0-indexed) 767 */ 768 public ST getSubstanceLotNumber(int rep) { 769 ST retVal = this.getTypedField(18, rep); 770 return retVal; 771 } 772 773 /** 774 * Returns a specific repetition of 775 * RXD-18: "Substance Lot Number" - creates it if necessary 776 * 777 * @param rep The repetition index (0-indexed) 778 */ 779 public ST getRxd18_SubstanceLotNumber(int rep) { 780 ST retVal = this.getTypedField(18, rep); 781 return retVal; 782 } 783 784 /** 785 * Returns a count of the current number of repetitions of Substance Lot Number (RXD-18). 786 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 787 * it will return zero. 788 */ 789 public int getRxd18_SubstanceLotNumberReps() { 790 return this.getReps(18); 791 } 792 793 794 /** 795 * Inserts a repetition of 796 * RXD-18: "Substance Lot Number" at a specific index 797 * 798 * @param rep The repetition index (0-indexed) 799 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 800 */ 801 public ST insertSubstanceLotNumber(int rep) throws HL7Exception { 802 return (ST) super.insertRepetition(18, rep); 803 } 804 805 806 /** 807 * Inserts a repetition of 808 * RXD-18: "Substance Lot Number" at a specific index 809 * 810 * @param rep The repetition index (0-indexed) 811 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 812 */ 813 public ST insertRxd18_SubstanceLotNumber(int rep) throws HL7Exception { 814 return (ST) super.insertRepetition(18, rep); 815 } 816 817 818 /** 819 * Removes a repetition of 820 * RXD-18: "Substance Lot Number" at a specific index 821 * 822 * @param rep The repetition index (0-indexed) 823 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 824 */ 825 public ST removeSubstanceLotNumber(int rep) throws HL7Exception { 826 return (ST) super.removeRepetition(18, rep); 827 } 828 829 830 /** 831 * Removes a repetition of 832 * RXD-18: "Substance Lot Number" at a specific index 833 * 834 * @param rep The repetition index (0-indexed) 835 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 836 */ 837 public ST removeRxd18_SubstanceLotNumber(int rep) throws HL7Exception { 838 return (ST) super.removeRepetition(18, rep); 839 } 840 841 842 843 /** 844 * Returns all repetitions of Substance Expiration Date (RXD-19). 845 */ 846 public TS[] getSubstanceExpirationDate() { 847 TS[] retVal = this.getTypedField(19, new TS[0]); 848 return retVal; 849 } 850 851 852 /** 853 * Returns all repetitions of Substance Expiration Date (RXD-19). 854 */ 855 public TS[] getRxd19_SubstanceExpirationDate() { 856 TS[] retVal = this.getTypedField(19, new TS[0]); 857 return retVal; 858 } 859 860 861 /** 862 * Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19). 863 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 864 * it will return zero. 865 */ 866 public int getSubstanceExpirationDateReps() { 867 return this.getReps(19); 868 } 869 870 871 /** 872 * Returns a specific repetition of 873 * RXD-19: "Substance Expiration Date" - creates it if necessary 874 * 875 * @param rep The repetition index (0-indexed) 876 */ 877 public TS getSubstanceExpirationDate(int rep) { 878 TS retVal = this.getTypedField(19, rep); 879 return retVal; 880 } 881 882 /** 883 * Returns a specific repetition of 884 * RXD-19: "Substance Expiration Date" - creates it if necessary 885 * 886 * @param rep The repetition index (0-indexed) 887 */ 888 public TS getRxd19_SubstanceExpirationDate(int rep) { 889 TS retVal = this.getTypedField(19, rep); 890 return retVal; 891 } 892 893 /** 894 * Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19). 895 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 896 * it will return zero. 897 */ 898 public int getRxd19_SubstanceExpirationDateReps() { 899 return this.getReps(19); 900 } 901 902 903 /** 904 * Inserts a repetition of 905 * RXD-19: "Substance Expiration Date" at a specific index 906 * 907 * @param rep The repetition index (0-indexed) 908 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 909 */ 910 public TS insertSubstanceExpirationDate(int rep) throws HL7Exception { 911 return (TS) super.insertRepetition(19, rep); 912 } 913 914 915 /** 916 * Inserts a repetition of 917 * RXD-19: "Substance Expiration Date" at a specific index 918 * 919 * @param rep The repetition index (0-indexed) 920 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 921 */ 922 public TS insertRxd19_SubstanceExpirationDate(int rep) throws HL7Exception { 923 return (TS) super.insertRepetition(19, rep); 924 } 925 926 927 /** 928 * Removes a repetition of 929 * RXD-19: "Substance Expiration Date" at a specific index 930 * 931 * @param rep The repetition index (0-indexed) 932 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 933 */ 934 public TS removeSubstanceExpirationDate(int rep) throws HL7Exception { 935 return (TS) super.removeRepetition(19, rep); 936 } 937 938 939 /** 940 * Removes a repetition of 941 * RXD-19: "Substance Expiration Date" at a specific index 942 * 943 * @param rep The repetition index (0-indexed) 944 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 945 */ 946 public TS removeRxd19_SubstanceExpirationDate(int rep) throws HL7Exception { 947 return (TS) super.removeRepetition(19, rep); 948 } 949 950 951 952 /** 953 * Returns all repetitions of Substance Manufacturer Name (RXD-20). 954 */ 955 public CE[] getSubstanceManufacturerName() { 956 CE[] retVal = this.getTypedField(20, new CE[0]); 957 return retVal; 958 } 959 960 961 /** 962 * Returns all repetitions of Substance Manufacturer Name (RXD-20). 963 */ 964 public CE[] getRxd20_SubstanceManufacturerName() { 965 CE[] retVal = this.getTypedField(20, new CE[0]); 966 return retVal; 967 } 968 969 970 /** 971 * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20). 972 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 973 * it will return zero. 974 */ 975 public int getSubstanceManufacturerNameReps() { 976 return this.getReps(20); 977 } 978 979 980 /** 981 * Returns a specific repetition of 982 * RXD-20: "Substance Manufacturer Name" - creates it if necessary 983 * 984 * @param rep The repetition index (0-indexed) 985 */ 986 public CE getSubstanceManufacturerName(int rep) { 987 CE retVal = this.getTypedField(20, rep); 988 return retVal; 989 } 990 991 /** 992 * Returns a specific repetition of 993 * RXD-20: "Substance Manufacturer Name" - creates it if necessary 994 * 995 * @param rep The repetition index (0-indexed) 996 */ 997 public CE getRxd20_SubstanceManufacturerName(int rep) { 998 CE retVal = this.getTypedField(20, rep); 999 return retVal; 1000 } 1001 1002 /** 1003 * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20). 1004 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1005 * it will return zero. 1006 */ 1007 public int getRxd20_SubstanceManufacturerNameReps() { 1008 return this.getReps(20); 1009 } 1010 1011 1012 /** 1013 * Inserts a repetition of 1014 * RXD-20: "Substance Manufacturer Name" at a specific index 1015 * 1016 * @param rep The repetition index (0-indexed) 1017 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1018 */ 1019 public CE insertSubstanceManufacturerName(int rep) throws HL7Exception { 1020 return (CE) super.insertRepetition(20, rep); 1021 } 1022 1023 1024 /** 1025 * Inserts a repetition of 1026 * RXD-20: "Substance Manufacturer Name" at a specific index 1027 * 1028 * @param rep The repetition index (0-indexed) 1029 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1030 */ 1031 public CE insertRxd20_SubstanceManufacturerName(int rep) throws HL7Exception { 1032 return (CE) super.insertRepetition(20, rep); 1033 } 1034 1035 1036 /** 1037 * Removes a repetition of 1038 * RXD-20: "Substance Manufacturer Name" at a specific index 1039 * 1040 * @param rep The repetition index (0-indexed) 1041 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1042 */ 1043 public CE removeSubstanceManufacturerName(int rep) throws HL7Exception { 1044 return (CE) super.removeRepetition(20, rep); 1045 } 1046 1047 1048 /** 1049 * Removes a repetition of 1050 * RXD-20: "Substance Manufacturer Name" at a specific index 1051 * 1052 * @param rep The repetition index (0-indexed) 1053 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1054 */ 1055 public CE removeRxd20_SubstanceManufacturerName(int rep) throws HL7Exception { 1056 return (CE) super.removeRepetition(20, rep); 1057 } 1058 1059 1060 1061 /** 1062 * Returns all repetitions of Indication (RXD-21). 1063 */ 1064 public CE[] getIndication() { 1065 CE[] retVal = this.getTypedField(21, new CE[0]); 1066 return retVal; 1067 } 1068 1069 1070 /** 1071 * Returns all repetitions of Indication (RXD-21). 1072 */ 1073 public CE[] getRxd21_Indication() { 1074 CE[] retVal = this.getTypedField(21, new CE[0]); 1075 return retVal; 1076 } 1077 1078 1079 /** 1080 * Returns a count of the current number of repetitions of Indication (RXD-21). 1081 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1082 * it will return zero. 1083 */ 1084 public int getIndicationReps() { 1085 return this.getReps(21); 1086 } 1087 1088 1089 /** 1090 * Returns a specific repetition of 1091 * RXD-21: "Indication" - creates it if necessary 1092 * 1093 * @param rep The repetition index (0-indexed) 1094 */ 1095 public CE getIndication(int rep) { 1096 CE retVal = this.getTypedField(21, rep); 1097 return retVal; 1098 } 1099 1100 /** 1101 * Returns a specific repetition of 1102 * RXD-21: "Indication" - creates it if necessary 1103 * 1104 * @param rep The repetition index (0-indexed) 1105 */ 1106 public CE getRxd21_Indication(int rep) { 1107 CE retVal = this.getTypedField(21, rep); 1108 return retVal; 1109 } 1110 1111 /** 1112 * Returns a count of the current number of repetitions of Indication (RXD-21). 1113 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1114 * it will return zero. 1115 */ 1116 public int getRxd21_IndicationReps() { 1117 return this.getReps(21); 1118 } 1119 1120 1121 /** 1122 * Inserts a repetition of 1123 * RXD-21: "Indication" at a specific index 1124 * 1125 * @param rep The repetition index (0-indexed) 1126 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1127 */ 1128 public CE insertIndication(int rep) throws HL7Exception { 1129 return (CE) super.insertRepetition(21, rep); 1130 } 1131 1132 1133 /** 1134 * Inserts a repetition of 1135 * RXD-21: "Indication" at a specific index 1136 * 1137 * @param rep The repetition index (0-indexed) 1138 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1139 */ 1140 public CE insertRxd21_Indication(int rep) throws HL7Exception { 1141 return (CE) super.insertRepetition(21, rep); 1142 } 1143 1144 1145 /** 1146 * Removes a repetition of 1147 * RXD-21: "Indication" at a specific index 1148 * 1149 * @param rep The repetition index (0-indexed) 1150 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1151 */ 1152 public CE removeIndication(int rep) throws HL7Exception { 1153 return (CE) super.removeRepetition(21, rep); 1154 } 1155 1156 1157 /** 1158 * Removes a repetition of 1159 * RXD-21: "Indication" at a specific index 1160 * 1161 * @param rep The repetition index (0-indexed) 1162 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1163 */ 1164 public CE removeRxd21_Indication(int rep) throws HL7Exception { 1165 return (CE) super.removeRepetition(21, rep); 1166 } 1167 1168 1169 1170 1171 /** 1172 * Returns 1173 * RXD-22: "Dispense Package Size" - creates it if necessary 1174 */ 1175 public NM getDispensePackageSize() { 1176 NM retVal = this.getTypedField(22, 0); 1177 return retVal; 1178 } 1179 1180 /** 1181 * Returns 1182 * RXD-22: "Dispense Package Size" - creates it if necessary 1183 */ 1184 public NM getRxd22_DispensePackageSize() { 1185 NM retVal = this.getTypedField(22, 0); 1186 return retVal; 1187 } 1188 1189 1190 1191 /** 1192 * Returns 1193 * RXD-23: "Dispense Package Size Unit" - creates it if necessary 1194 */ 1195 public CE getDispensePackageSizeUnit() { 1196 CE retVal = this.getTypedField(23, 0); 1197 return retVal; 1198 } 1199 1200 /** 1201 * Returns 1202 * RXD-23: "Dispense Package Size Unit" - creates it if necessary 1203 */ 1204 public CE getRxd23_DispensePackageSizeUnit() { 1205 CE retVal = this.getTypedField(23, 0); 1206 return retVal; 1207 } 1208 1209 1210 1211 /** 1212 * Returns 1213 * RXD-24: "Dispense Package Method" - creates it if necessary 1214 */ 1215 public ID getDispensePackageMethod() { 1216 ID retVal = this.getTypedField(24, 0); 1217 return retVal; 1218 } 1219 1220 /** 1221 * Returns 1222 * RXD-24: "Dispense Package Method" - creates it if necessary 1223 */ 1224 public ID getRxd24_DispensePackageMethod() { 1225 ID retVal = this.getTypedField(24, 0); 1226 return retVal; 1227 } 1228 1229 1230 /** 1231 * Returns all repetitions of Supplementary Code (RXD-25). 1232 */ 1233 public CE[] getSupplementaryCode() { 1234 CE[] retVal = this.getTypedField(25, new CE[0]); 1235 return retVal; 1236 } 1237 1238 1239 /** 1240 * Returns all repetitions of Supplementary Code (RXD-25). 1241 */ 1242 public CE[] getRxd25_SupplementaryCode() { 1243 CE[] retVal = this.getTypedField(25, new CE[0]); 1244 return retVal; 1245 } 1246 1247 1248 /** 1249 * Returns a count of the current number of repetitions of Supplementary Code (RXD-25). 1250 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1251 * it will return zero. 1252 */ 1253 public int getSupplementaryCodeReps() { 1254 return this.getReps(25); 1255 } 1256 1257 1258 /** 1259 * Returns a specific repetition of 1260 * RXD-25: "Supplementary Code" - creates it if necessary 1261 * 1262 * @param rep The repetition index (0-indexed) 1263 */ 1264 public CE getSupplementaryCode(int rep) { 1265 CE retVal = this.getTypedField(25, rep); 1266 return retVal; 1267 } 1268 1269 /** 1270 * Returns a specific repetition of 1271 * RXD-25: "Supplementary Code" - creates it if necessary 1272 * 1273 * @param rep The repetition index (0-indexed) 1274 */ 1275 public CE getRxd25_SupplementaryCode(int rep) { 1276 CE retVal = this.getTypedField(25, rep); 1277 return retVal; 1278 } 1279 1280 /** 1281 * Returns a count of the current number of repetitions of Supplementary Code (RXD-25). 1282 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1283 * it will return zero. 1284 */ 1285 public int getRxd25_SupplementaryCodeReps() { 1286 return this.getReps(25); 1287 } 1288 1289 1290 /** 1291 * Inserts a repetition of 1292 * RXD-25: "Supplementary Code" at a specific index 1293 * 1294 * @param rep The repetition index (0-indexed) 1295 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1296 */ 1297 public CE insertSupplementaryCode(int rep) throws HL7Exception { 1298 return (CE) super.insertRepetition(25, rep); 1299 } 1300 1301 1302 /** 1303 * Inserts a repetition of 1304 * RXD-25: "Supplementary Code" at a specific index 1305 * 1306 * @param rep The repetition index (0-indexed) 1307 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1308 */ 1309 public CE insertRxd25_SupplementaryCode(int rep) throws HL7Exception { 1310 return (CE) super.insertRepetition(25, rep); 1311 } 1312 1313 1314 /** 1315 * Removes a repetition of 1316 * RXD-25: "Supplementary Code" at a specific index 1317 * 1318 * @param rep The repetition index (0-indexed) 1319 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1320 */ 1321 public CE removeSupplementaryCode(int rep) throws HL7Exception { 1322 return (CE) super.removeRepetition(25, rep); 1323 } 1324 1325 1326 /** 1327 * Removes a repetition of 1328 * RXD-25: "Supplementary Code" at a specific index 1329 * 1330 * @param rep The repetition index (0-indexed) 1331 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1332 */ 1333 public CE removeRxd25_SupplementaryCode(int rep) throws HL7Exception { 1334 return (CE) super.removeRepetition(25, rep); 1335 } 1336 1337 1338 1339 1340 /** 1341 * Returns 1342 * RXD-26: "Initiating Location" - creates it if necessary 1343 */ 1344 public CE getInitiatingLocation() { 1345 CE retVal = this.getTypedField(26, 0); 1346 return retVal; 1347 } 1348 1349 /** 1350 * Returns 1351 * RXD-26: "Initiating Location" - creates it if necessary 1352 */ 1353 public CE getRxd26_InitiatingLocation() { 1354 CE retVal = this.getTypedField(26, 0); 1355 return retVal; 1356 } 1357 1358 1359 1360 /** 1361 * Returns 1362 * RXD-27: "Packaging/Assembly Location" - creates it if necessary 1363 */ 1364 public CE getPackagingAssemblyLocation() { 1365 CE retVal = this.getTypedField(27, 0); 1366 return retVal; 1367 } 1368 1369 /** 1370 * Returns 1371 * RXD-27: "Packaging/Assembly Location" - creates it if necessary 1372 */ 1373 public CE getRxd27_PackagingAssemblyLocation() { 1374 CE retVal = this.getTypedField(27, 0); 1375 return retVal; 1376 } 1377 1378 1379 1380 1381 1382 /** {@inheritDoc} */ 1383 protected Type createNewTypeWithoutReflection(int field) { 1384 switch (field) { 1385 case 0: return new NM(getMessage()); 1386 case 1: return new CE(getMessage()); 1387 case 2: return new TS(getMessage()); 1388 case 3: return new NM(getMessage()); 1389 case 4: return new CE(getMessage()); 1390 case 5: return new CE(getMessage()); 1391 case 6: return new ST(getMessage()); 1392 case 7: return new NM(getMessage()); 1393 case 8: return new ST(getMessage()); 1394 case 9: return new XCN(getMessage()); 1395 case 10: return new ID(getMessage(), new Integer( 167 )); 1396 case 11: return new CQ(getMessage()); 1397 case 12: return new LA2(getMessage()); 1398 case 13: return new ID(getMessage(), new Integer( 136 )); 1399 case 14: return new CE(getMessage()); 1400 case 15: return new NM(getMessage()); 1401 case 16: return new CE(getMessage()); 1402 case 17: return new ST(getMessage()); 1403 case 18: return new TS(getMessage()); 1404 case 19: return new CE(getMessage()); 1405 case 20: return new CE(getMessage()); 1406 case 21: return new NM(getMessage()); 1407 case 22: return new CE(getMessage()); 1408 case 23: return new ID(getMessage(), new Integer( 321 )); 1409 case 24: return new CE(getMessage()); 1410 case 25: return new CE(getMessage()); 1411 case 26: return new CE(getMessage()); 1412 default: return null; 1413 } 1414 } 1415 1416 1417} 1418