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