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