1 /* 2 * This class is an auto-generated source file for a HAPI 3 * HL7 v2.x standard structure class. 4 * 5 * For more information, visit: http://hl7api.sourceforge.net/ 6 * 7 * The contents of this file are subject to the Mozilla Public License Version 1.1 8 * (the "License"); you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 10 * Software distributed under the License is distributed on an "AS IS" basis, 11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 12 * specific language governing rights and limitations under the License. 13 * 14 * The Original Code is "[file_name]". Description: 15 * "[one_line_description]" 16 * 17 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 18 * 2012. All Rights Reserved. 19 * 20 * Contributor(s): ______________________________________. 21 * 22 * Alternatively, the contents of this file may be used under the terms of the 23 * GNU General Public License (the "GPL"), in which case the provisions of the GPL are 24 * applicable instead of those above. If you wish to allow use of your version of this 25 * file only under the terms of the GPL and not to allow others to use your version 26 * of this file under the MPL, indicate your decision by deleting the provisions above 27 * and replace them with the notice and other provisions required by the GPL License. 28 * If you do not delete the provisions above, a recipient may use your version of 29 * this file under either the MPL or the GPL. 30 * 31 */ 32 33 34 package ca.uhn.hl7v2.model.v231.segment; 35 36 // import ca.uhn.hl7v2.model.v231.group.*; 37 import ca.uhn.hl7v2.model.v231.datatype.*; 38 import ca.uhn.hl7v2.HL7Exception; 39 import ca.uhn.hl7v2.parser.ModelClassFactory; 40 import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 41 import ca.uhn.hl7v2.model.AbstractMessage; 42 import ca.uhn.hl7v2.model.Group; 43 import ca.uhn.hl7v2.model.Type; 44 import ca.uhn.hl7v2.model.AbstractSegment; 45 import ca.uhn.hl7v2.model.Varies; 46 47 48 /** 49 *<p>Represents an HL7 QRF message segment (QRF - original style query filter segment). 50 * This segment has the following fields:</p> 51 * <ul> 52 * <li>QRF-1: Where Subject Filter (ST) <b> repeating</b> 53 * <li>QRF-2: When Data Start Date/Time (TS) <b>optional </b> 54 * <li>QRF-3: When Data End Date/Time (TS) <b>optional </b> 55 * <li>QRF-4: What User Qualifier (ST) <b>optional repeating</b> 56 * <li>QRF-5: Other QRY Subject Filter (ST) <b>optional repeating</b> 57 * <li>QRF-6: Which Date/Time Qualifier (ID) <b>optional repeating</b> 58 * <li>QRF-7: Which Date/Time Status Qualifier (ID) <b>optional repeating</b> 59 * <li>QRF-8: Date/Time Selection Qualifier (ID) <b>optional repeating</b> 60 * <li>QRF-9: When Quantity/Timing Qualifier (TQ) <b>optional </b> 61 * </ul> 62 */ 63 @SuppressWarnings("unused") 64 public class QRF extends AbstractSegment { 65 66 /** 67 * Creates a new QRF segment 68 */ 69 public QRF(Group parent, ModelClassFactory factory) { 70 super(parent, factory); 71 init(factory); 72 } 73 74 private void init(ModelClassFactory factory) { 75 try { 76 this.add(ST.class, true, 0, 20, new Object[]{ getMessage() }, "Where Subject Filter"); 77 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "When Data Start Date/Time"); 78 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "When Data End Date/Time"); 79 this.add(ST.class, false, 0, 60, new Object[]{ getMessage() }, "What User Qualifier"); 80 this.add(ST.class, false, 0, 60, new Object[]{ getMessage() }, "Other QRY Subject Filter"); 81 this.add(ID.class, false, 0, 12, new Object[]{ getMessage(), new Integer(156) }, "Which Date/Time Qualifier"); 82 this.add(ID.class, false, 0, 12, new Object[]{ getMessage(), new Integer(157) }, "Which Date/Time Status Qualifier"); 83 this.add(ID.class, false, 0, 12, new Object[]{ getMessage(), new Integer(158) }, "Date/Time Selection Qualifier"); 84 this.add(TQ.class, false, 1, 60, new Object[]{ getMessage() }, "When Quantity/Timing Qualifier"); 85 } catch(HL7Exception e) { 86 log.error("Unexpected error creating QRF - this is probably a bug in the source code generator.", e); 87 } 88 } 89 90 91 /** 92 * Returns all repetitions of Where Subject Filter (QRF-1). 93 */ 94 public ST[] getWhereSubjectFilter() { 95 ST[] retVal = this.getTypedField(1, new ST[0]); 96 return retVal; 97 } 98 99 100 /** 101 * Returns all repetitions of Where Subject Filter (QRF-1). 102 */ 103 public ST[] getQrf1_WhereSubjectFilter() { 104 ST[] retVal = this.getTypedField(1, new ST[0]); 105 return retVal; 106 } 107 108 109 /** 110 * Returns a count of the current number of repetitions of Where Subject Filter (QRF-1). 111 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 112 * it will return zero. 113 */ 114 public int getWhereSubjectFilterReps() { 115 return this.getReps(1); 116 } 117 118 119 /** 120 * Returns a specific repetition of 121 * QRF-1: "Where Subject Filter" - creates it if necessary 122 * 123 * @param rep The repetition index (0-indexed) 124 */ 125 public ST getWhereSubjectFilter(int rep) { 126 ST retVal = this.getTypedField(1, rep); 127 return retVal; 128 } 129 130 /** 131 * Returns a specific repetition of 132 * QRF-1: "Where Subject Filter" - creates it if necessary 133 * 134 * @param rep The repetition index (0-indexed) 135 */ 136 public ST getQrf1_WhereSubjectFilter(int rep) { 137 ST retVal = this.getTypedField(1, rep); 138 return retVal; 139 } 140 141 /** 142 * Returns a count of the current number of repetitions of Where Subject Filter (QRF-1). 143 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 144 * it will return zero. 145 */ 146 public int getQrf1_WhereSubjectFilterReps() { 147 return this.getReps(1); 148 } 149 150 151 /** 152 * Inserts a repetition of 153 * QRF-1: "Where Subject Filter" at a specific index 154 * 155 * @param rep The repetition index (0-indexed) 156 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 157 */ 158 public ST insertWhereSubjectFilter(int rep) throws HL7Exception { 159 return (ST) super.insertRepetition(1, rep); 160 } 161 162 163 /** 164 * Inserts a repetition of 165 * QRF-1: "Where Subject Filter" at a specific index 166 * 167 * @param rep The repetition index (0-indexed) 168 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 169 */ 170 public ST insertQrf1_WhereSubjectFilter(int rep) throws HL7Exception { 171 return (ST) super.insertRepetition(1, rep); 172 } 173 174 175 /** 176 * Removes a repetition of 177 * QRF-1: "Where Subject Filter" at a specific index 178 * 179 * @param rep The repetition index (0-indexed) 180 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 181 */ 182 public ST removeWhereSubjectFilter(int rep) throws HL7Exception { 183 return (ST) super.removeRepetition(1, rep); 184 } 185 186 187 /** 188 * Removes a repetition of 189 * QRF-1: "Where Subject Filter" at a specific index 190 * 191 * @param rep The repetition index (0-indexed) 192 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 193 */ 194 public ST removeQrf1_WhereSubjectFilter(int rep) throws HL7Exception { 195 return (ST) super.removeRepetition(1, rep); 196 } 197 198 199 200 201 /** 202 * Returns 203 * QRF-2: "When Data Start Date/Time" - creates it if necessary 204 */ 205 public TS getWhenDataStartDateTime() { 206 TS retVal = this.getTypedField(2, 0); 207 return retVal; 208 } 209 210 /** 211 * Returns 212 * QRF-2: "When Data Start Date/Time" - creates it if necessary 213 */ 214 public TS getQrf2_WhenDataStartDateTime() { 215 TS retVal = this.getTypedField(2, 0); 216 return retVal; 217 } 218 219 220 221 /** 222 * Returns 223 * QRF-3: "When Data End Date/Time" - creates it if necessary 224 */ 225 public TS getWhenDataEndDateTime() { 226 TS retVal = this.getTypedField(3, 0); 227 return retVal; 228 } 229 230 /** 231 * Returns 232 * QRF-3: "When Data End Date/Time" - creates it if necessary 233 */ 234 public TS getQrf3_WhenDataEndDateTime() { 235 TS retVal = this.getTypedField(3, 0); 236 return retVal; 237 } 238 239 240 /** 241 * Returns all repetitions of What User Qualifier (QRF-4). 242 */ 243 public ST[] getWhatUserQualifier() { 244 ST[] retVal = this.getTypedField(4, new ST[0]); 245 return retVal; 246 } 247 248 249 /** 250 * Returns all repetitions of What User Qualifier (QRF-4). 251 */ 252 public ST[] getQrf4_WhatUserQualifier() { 253 ST[] retVal = this.getTypedField(4, new ST[0]); 254 return retVal; 255 } 256 257 258 /** 259 * Returns a count of the current number of repetitions of What User Qualifier (QRF-4). 260 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 261 * it will return zero. 262 */ 263 public int getWhatUserQualifierReps() { 264 return this.getReps(4); 265 } 266 267 268 /** 269 * Returns a specific repetition of 270 * QRF-4: "What User Qualifier" - creates it if necessary 271 * 272 * @param rep The repetition index (0-indexed) 273 */ 274 public ST getWhatUserQualifier(int rep) { 275 ST retVal = this.getTypedField(4, rep); 276 return retVal; 277 } 278 279 /** 280 * Returns a specific repetition of 281 * QRF-4: "What User Qualifier" - creates it if necessary 282 * 283 * @param rep The repetition index (0-indexed) 284 */ 285 public ST getQrf4_WhatUserQualifier(int rep) { 286 ST retVal = this.getTypedField(4, rep); 287 return retVal; 288 } 289 290 /** 291 * Returns a count of the current number of repetitions of What User Qualifier (QRF-4). 292 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 293 * it will return zero. 294 */ 295 public int getQrf4_WhatUserQualifierReps() { 296 return this.getReps(4); 297 } 298 299 300 /** 301 * Inserts a repetition of 302 * QRF-4: "What User Qualifier" at a specific index 303 * 304 * @param rep The repetition index (0-indexed) 305 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 306 */ 307 public ST insertWhatUserQualifier(int rep) throws HL7Exception { 308 return (ST) super.insertRepetition(4, rep); 309 } 310 311 312 /** 313 * Inserts a repetition of 314 * QRF-4: "What User Qualifier" at a specific index 315 * 316 * @param rep The repetition index (0-indexed) 317 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 318 */ 319 public ST insertQrf4_WhatUserQualifier(int rep) throws HL7Exception { 320 return (ST) super.insertRepetition(4, rep); 321 } 322 323 324 /** 325 * Removes a repetition of 326 * QRF-4: "What User Qualifier" at a specific index 327 * 328 * @param rep The repetition index (0-indexed) 329 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 330 */ 331 public ST removeWhatUserQualifier(int rep) throws HL7Exception { 332 return (ST) super.removeRepetition(4, rep); 333 } 334 335 336 /** 337 * Removes a repetition of 338 * QRF-4: "What User Qualifier" at a specific index 339 * 340 * @param rep The repetition index (0-indexed) 341 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 342 */ 343 public ST removeQrf4_WhatUserQualifier(int rep) throws HL7Exception { 344 return (ST) super.removeRepetition(4, rep); 345 } 346 347 348 349 /** 350 * Returns all repetitions of Other QRY Subject Filter (QRF-5). 351 */ 352 public ST[] getOtherQRYSubjectFilter() { 353 ST[] retVal = this.getTypedField(5, new ST[0]); 354 return retVal; 355 } 356 357 358 /** 359 * Returns all repetitions of Other QRY Subject Filter (QRF-5). 360 */ 361 public ST[] getQrf5_OtherQRYSubjectFilter() { 362 ST[] retVal = this.getTypedField(5, new ST[0]); 363 return retVal; 364 } 365 366 367 /** 368 * Returns a count of the current number of repetitions of Other QRY Subject Filter (QRF-5). 369 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 370 * it will return zero. 371 */ 372 public int getOtherQRYSubjectFilterReps() { 373 return this.getReps(5); 374 } 375 376 377 /** 378 * Returns a specific repetition of 379 * QRF-5: "Other QRY Subject Filter" - creates it if necessary 380 * 381 * @param rep The repetition index (0-indexed) 382 */ 383 public ST getOtherQRYSubjectFilter(int rep) { 384 ST retVal = this.getTypedField(5, rep); 385 return retVal; 386 } 387 388 /** 389 * Returns a specific repetition of 390 * QRF-5: "Other QRY Subject Filter" - creates it if necessary 391 * 392 * @param rep The repetition index (0-indexed) 393 */ 394 public ST getQrf5_OtherQRYSubjectFilter(int rep) { 395 ST retVal = this.getTypedField(5, rep); 396 return retVal; 397 } 398 399 /** 400 * Returns a count of the current number of repetitions of Other QRY Subject Filter (QRF-5). 401 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 402 * it will return zero. 403 */ 404 public int getQrf5_OtherQRYSubjectFilterReps() { 405 return this.getReps(5); 406 } 407 408 409 /** 410 * Inserts a repetition of 411 * QRF-5: "Other QRY Subject Filter" at a specific index 412 * 413 * @param rep The repetition index (0-indexed) 414 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 415 */ 416 public ST insertOtherQRYSubjectFilter(int rep) throws HL7Exception { 417 return (ST) super.insertRepetition(5, rep); 418 } 419 420 421 /** 422 * Inserts a repetition of 423 * QRF-5: "Other QRY Subject Filter" at a specific index 424 * 425 * @param rep The repetition index (0-indexed) 426 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 427 */ 428 public ST insertQrf5_OtherQRYSubjectFilter(int rep) throws HL7Exception { 429 return (ST) super.insertRepetition(5, rep); 430 } 431 432 433 /** 434 * Removes a repetition of 435 * QRF-5: "Other QRY Subject Filter" at a specific index 436 * 437 * @param rep The repetition index (0-indexed) 438 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 439 */ 440 public ST removeOtherQRYSubjectFilter(int rep) throws HL7Exception { 441 return (ST) super.removeRepetition(5, rep); 442 } 443 444 445 /** 446 * Removes a repetition of 447 * QRF-5: "Other QRY Subject Filter" at a specific index 448 * 449 * @param rep The repetition index (0-indexed) 450 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 451 */ 452 public ST removeQrf5_OtherQRYSubjectFilter(int rep) throws HL7Exception { 453 return (ST) super.removeRepetition(5, rep); 454 } 455 456 457 458 /** 459 * Returns all repetitions of Which Date/Time Qualifier (QRF-6). 460 */ 461 public ID[] getWhichDateTimeQualifier() { 462 ID[] retVal = this.getTypedField(6, new ID[0]); 463 return retVal; 464 } 465 466 467 /** 468 * Returns all repetitions of Which Date/Time Qualifier (QRF-6). 469 */ 470 public ID[] getQrf6_WhichDateTimeQualifier() { 471 ID[] retVal = this.getTypedField(6, new ID[0]); 472 return retVal; 473 } 474 475 476 /** 477 * Returns a count of the current number of repetitions of Which Date/Time Qualifier (QRF-6). 478 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 479 * it will return zero. 480 */ 481 public int getWhichDateTimeQualifierReps() { 482 return this.getReps(6); 483 } 484 485 486 /** 487 * Returns a specific repetition of 488 * QRF-6: "Which Date/Time Qualifier" - creates it if necessary 489 * 490 * @param rep The repetition index (0-indexed) 491 */ 492 public ID getWhichDateTimeQualifier(int rep) { 493 ID retVal = this.getTypedField(6, rep); 494 return retVal; 495 } 496 497 /** 498 * Returns a specific repetition of 499 * QRF-6: "Which Date/Time Qualifier" - creates it if necessary 500 * 501 * @param rep The repetition index (0-indexed) 502 */ 503 public ID getQrf6_WhichDateTimeQualifier(int rep) { 504 ID retVal = this.getTypedField(6, rep); 505 return retVal; 506 } 507 508 /** 509 * Returns a count of the current number of repetitions of Which Date/Time Qualifier (QRF-6). 510 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 511 * it will return zero. 512 */ 513 public int getQrf6_WhichDateTimeQualifierReps() { 514 return this.getReps(6); 515 } 516 517 518 /** 519 * Inserts a repetition of 520 * QRF-6: "Which Date/Time Qualifier" at a specific index 521 * 522 * @param rep The repetition index (0-indexed) 523 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 524 */ 525 public ID insertWhichDateTimeQualifier(int rep) throws HL7Exception { 526 return (ID) super.insertRepetition(6, rep); 527 } 528 529 530 /** 531 * Inserts a repetition of 532 * QRF-6: "Which Date/Time Qualifier" at a specific index 533 * 534 * @param rep The repetition index (0-indexed) 535 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 536 */ 537 public ID insertQrf6_WhichDateTimeQualifier(int rep) throws HL7Exception { 538 return (ID) super.insertRepetition(6, rep); 539 } 540 541 542 /** 543 * Removes a repetition of 544 * QRF-6: "Which Date/Time Qualifier" at a specific index 545 * 546 * @param rep The repetition index (0-indexed) 547 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 548 */ 549 public ID removeWhichDateTimeQualifier(int rep) throws HL7Exception { 550 return (ID) super.removeRepetition(6, rep); 551 } 552 553 554 /** 555 * Removes a repetition of 556 * QRF-6: "Which Date/Time Qualifier" at a specific index 557 * 558 * @param rep The repetition index (0-indexed) 559 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 560 */ 561 public ID removeQrf6_WhichDateTimeQualifier(int rep) throws HL7Exception { 562 return (ID) super.removeRepetition(6, rep); 563 } 564 565 566 567 /** 568 * Returns all repetitions of Which Date/Time Status Qualifier (QRF-7). 569 */ 570 public ID[] getWhichDateTimeStatusQualifier() { 571 ID[] retVal = this.getTypedField(7, new ID[0]); 572 return retVal; 573 } 574 575 576 /** 577 * Returns all repetitions of Which Date/Time Status Qualifier (QRF-7). 578 */ 579 public ID[] getQrf7_WhichDateTimeStatusQualifier() { 580 ID[] retVal = this.getTypedField(7, new ID[0]); 581 return retVal; 582 } 583 584 585 /** 586 * Returns a count of the current number of repetitions of Which Date/Time Status Qualifier (QRF-7). 587 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 588 * it will return zero. 589 */ 590 public int getWhichDateTimeStatusQualifierReps() { 591 return this.getReps(7); 592 } 593 594 595 /** 596 * Returns a specific repetition of 597 * QRF-7: "Which Date/Time Status Qualifier" - creates it if necessary 598 * 599 * @param rep The repetition index (0-indexed) 600 */ 601 public ID getWhichDateTimeStatusQualifier(int rep) { 602 ID retVal = this.getTypedField(7, rep); 603 return retVal; 604 } 605 606 /** 607 * Returns a specific repetition of 608 * QRF-7: "Which Date/Time Status Qualifier" - creates it if necessary 609 * 610 * @param rep The repetition index (0-indexed) 611 */ 612 public ID getQrf7_WhichDateTimeStatusQualifier(int rep) { 613 ID retVal = this.getTypedField(7, rep); 614 return retVal; 615 } 616 617 /** 618 * Returns a count of the current number of repetitions of Which Date/Time Status Qualifier (QRF-7). 619 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 620 * it will return zero. 621 */ 622 public int getQrf7_WhichDateTimeStatusQualifierReps() { 623 return this.getReps(7); 624 } 625 626 627 /** 628 * Inserts a repetition of 629 * QRF-7: "Which Date/Time Status Qualifier" at a specific index 630 * 631 * @param rep The repetition index (0-indexed) 632 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 633 */ 634 public ID insertWhichDateTimeStatusQualifier(int rep) throws HL7Exception { 635 return (ID) super.insertRepetition(7, rep); 636 } 637 638 639 /** 640 * Inserts a repetition of 641 * QRF-7: "Which Date/Time Status Qualifier" at a specific index 642 * 643 * @param rep The repetition index (0-indexed) 644 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 645 */ 646 public ID insertQrf7_WhichDateTimeStatusQualifier(int rep) throws HL7Exception { 647 return (ID) super.insertRepetition(7, rep); 648 } 649 650 651 /** 652 * Removes a repetition of 653 * QRF-7: "Which Date/Time Status Qualifier" at a specific index 654 * 655 * @param rep The repetition index (0-indexed) 656 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 657 */ 658 public ID removeWhichDateTimeStatusQualifier(int rep) throws HL7Exception { 659 return (ID) super.removeRepetition(7, rep); 660 } 661 662 663 /** 664 * Removes a repetition of 665 * QRF-7: "Which Date/Time Status Qualifier" at a specific index 666 * 667 * @param rep The repetition index (0-indexed) 668 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 669 */ 670 public ID removeQrf7_WhichDateTimeStatusQualifier(int rep) throws HL7Exception { 671 return (ID) super.removeRepetition(7, rep); 672 } 673 674 675 676 /** 677 * Returns all repetitions of Date/Time Selection Qualifier (QRF-8). 678 */ 679 public ID[] getDateTimeSelectionQualifier() { 680 ID[] retVal = this.getTypedField(8, new ID[0]); 681 return retVal; 682 } 683 684 685 /** 686 * Returns all repetitions of Date/Time Selection Qualifier (QRF-8). 687 */ 688 public ID[] getQrf8_DateTimeSelectionQualifier() { 689 ID[] retVal = this.getTypedField(8, new ID[0]); 690 return retVal; 691 } 692 693 694 /** 695 * Returns a count of the current number of repetitions of Date/Time Selection Qualifier (QRF-8). 696 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 697 * it will return zero. 698 */ 699 public int getDateTimeSelectionQualifierReps() { 700 return this.getReps(8); 701 } 702 703 704 /** 705 * Returns a specific repetition of 706 * QRF-8: "Date/Time Selection Qualifier" - creates it if necessary 707 * 708 * @param rep The repetition index (0-indexed) 709 */ 710 public ID getDateTimeSelectionQualifier(int rep) { 711 ID retVal = this.getTypedField(8, rep); 712 return retVal; 713 } 714 715 /** 716 * Returns a specific repetition of 717 * QRF-8: "Date/Time Selection Qualifier" - creates it if necessary 718 * 719 * @param rep The repetition index (0-indexed) 720 */ 721 public ID getQrf8_DateTimeSelectionQualifier(int rep) { 722 ID retVal = this.getTypedField(8, rep); 723 return retVal; 724 } 725 726 /** 727 * Returns a count of the current number of repetitions of Date/Time Selection Qualifier (QRF-8). 728 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 729 * it will return zero. 730 */ 731 public int getQrf8_DateTimeSelectionQualifierReps() { 732 return this.getReps(8); 733 } 734 735 736 /** 737 * Inserts a repetition of 738 * QRF-8: "Date/Time Selection Qualifier" at a specific index 739 * 740 * @param rep The repetition index (0-indexed) 741 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 742 */ 743 public ID insertDateTimeSelectionQualifier(int rep) throws HL7Exception { 744 return (ID) super.insertRepetition(8, rep); 745 } 746 747 748 /** 749 * Inserts a repetition of 750 * QRF-8: "Date/Time Selection Qualifier" at a specific index 751 * 752 * @param rep The repetition index (0-indexed) 753 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 754 */ 755 public ID insertQrf8_DateTimeSelectionQualifier(int rep) throws HL7Exception { 756 return (ID) super.insertRepetition(8, rep); 757 } 758 759 760 /** 761 * Removes a repetition of 762 * QRF-8: "Date/Time Selection Qualifier" at a specific index 763 * 764 * @param rep The repetition index (0-indexed) 765 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 766 */ 767 public ID removeDateTimeSelectionQualifier(int rep) throws HL7Exception { 768 return (ID) super.removeRepetition(8, rep); 769 } 770 771 772 /** 773 * Removes a repetition of 774 * QRF-8: "Date/Time Selection Qualifier" at a specific index 775 * 776 * @param rep The repetition index (0-indexed) 777 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 778 */ 779 public ID removeQrf8_DateTimeSelectionQualifier(int rep) throws HL7Exception { 780 return (ID) super.removeRepetition(8, rep); 781 } 782 783 784 785 786 /** 787 * Returns 788 * QRF-9: "When Quantity/Timing Qualifier" - creates it if necessary 789 */ 790 public TQ getWhenQuantityTimingQualifier() { 791 TQ retVal = this.getTypedField(9, 0); 792 return retVal; 793 } 794 795 /** 796 * Returns 797 * QRF-9: "When Quantity/Timing Qualifier" - creates it if necessary 798 */ 799 public TQ getQrf9_WhenQuantityTimingQualifier() { 800 TQ retVal = this.getTypedField(9, 0); 801 return retVal; 802 } 803 804 805 806 807 808 /** {@inheritDoc} */ 809 protected Type createNewTypeWithoutReflection(int field) { 810 switch (field) { 811 case 0: return new ST(getMessage()); 812 case 1: return new TS(getMessage()); 813 case 2: return new TS(getMessage()); 814 case 3: return new ST(getMessage()); 815 case 4: return new ST(getMessage()); 816 case 5: return new ID(getMessage(), new Integer( 156 )); 817 case 6: return new ID(getMessage(), new Integer( 157 )); 818 case 7: return new ID(getMessage(), new Integer( 158 )); 819 case 8: return new TQ(getMessage()); 820 default: return null; 821 } 822 } 823 824 825 } 826