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.v231.segment; 035 036// import ca.uhn.hl7v2.model.v231.group.*; 037import ca.uhn.hl7v2.model.v231.datatype.*; 038import ca.uhn.hl7v2.HL7Exception; 039import ca.uhn.hl7v2.parser.ModelClassFactory; 040import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 041import ca.uhn.hl7v2.model.AbstractMessage; 042import ca.uhn.hl7v2.model.Group; 043import ca.uhn.hl7v2.model.Type; 044import ca.uhn.hl7v2.model.AbstractSegment; 045import ca.uhn.hl7v2.model.Varies; 046 047 048/** 049 *<p>Represents an HL7 OBX message segment (OBX - observation/result segment). 050 * This segment has the following fields:</p> 051 * <ul> 052 * <li>OBX-1: Set ID - OBX (SI) <b>optional </b> 053 * <li>OBX-2: Value Type (ID) <b> </b> 054 * <li>OBX-3: Observation Identifier (CE) <b> </b> 055 * <li>OBX-4: Observation Sub-ID (ST) <b> </b> 056 * <li>OBX-5: Observation Value (Varies) <b>optional repeating</b> 057 * <li>OBX-6: Units (CE) <b>optional </b> 058 * <li>OBX-7: References Range (ST) <b>optional </b> 059 * <li>OBX-8: Abnormal Flags (ID) <b>optional repeating</b> 060 * <li>OBX-9: Probability (NM) <b>optional repeating</b> 061 * <li>OBX-10: Nature of Abnormal Test (ID) <b>optional </b> 062 * <li>OBX-11: Observation Result Status (ID) <b> </b> 063 * <li>OBX-12: Date Last Obs Normal Values (TS) <b>optional </b> 064 * <li>OBX-13: User Defined Access Checks (ST) <b>optional </b> 065 * <li>OBX-14: Date/Time of the Observation (TS) <b>optional </b> 066 * <li>OBX-15: Producer's ID (CE) <b>optional </b> 067 * <li>OBX-16: Responsible Observer (XCN) <b>optional repeating</b> 068 * <li>OBX-17: Observation Method (CE) <b>optional repeating</b> 069 * </ul> 070 */ 071@SuppressWarnings("unused") 072public class OBX extends AbstractSegment { 073 074 /** 075 * Creates a new OBX segment 076 */ 077 public OBX(Group parent, ModelClassFactory factory) { 078 super(parent, factory); 079 init(factory); 080 } 081 082 private void init(ModelClassFactory factory) { 083 try { 084 this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - OBX"); 085 this.add(ID.class, true, 1, 3, new Object[]{ getMessage(), new Integer(125) }, "Value Type"); 086 this.add(CE.class, true, 1, 80, new Object[]{ getMessage() }, "Observation Identifier"); 087 this.add(ST.class, true, 1, 20, new Object[]{ getMessage() }, "Observation Sub-ID"); 088 this.add(Varies.class, false, 0, 65536, new Object[]{ getMessage() }, "Observation Value"); 089 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Units"); 090 this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "References Range"); 091 this.add(ID.class, false, 5, 5, new Object[]{ getMessage(), new Integer(78) }, "Abnormal Flags"); 092 this.add(NM.class, false, 5, 5, new Object[]{ getMessage() }, "Probability"); 093 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(80) }, "Nature of Abnormal Test"); 094 this.add(ID.class, true, 1, 1, new Object[]{ getMessage(), new Integer(85) }, "Observation Result Status"); 095 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date Last Obs Normal Values"); 096 this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "User Defined Access Checks"); 097 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time of the Observation"); 098 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Producer's ID"); 099 this.add(XCN.class, false, 0, 80, new Object[]{ getMessage() }, "Responsible Observer"); 100 this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Observation Method"); 101 } catch(HL7Exception e) { 102 log.error("Unexpected error creating OBX - this is probably a bug in the source code generator.", e); 103 } 104 } 105 106 107 108 /** 109 * Returns 110 * OBX-1: "Set ID - OBX" - creates it if necessary 111 */ 112 public SI getSetIDOBX() { 113 SI retVal = this.getTypedField(1, 0); 114 return retVal; 115 } 116 117 /** 118 * Returns 119 * OBX-1: "Set ID - OBX" - creates it if necessary 120 */ 121 public SI getObx1_SetIDOBX() { 122 SI retVal = this.getTypedField(1, 0); 123 return retVal; 124 } 125 126 127 128 /** 129 * Returns 130 * OBX-2: "Value Type" - creates it if necessary 131 */ 132 public ID getValueType() { 133 ID retVal = this.getTypedField(2, 0); 134 return retVal; 135 } 136 137 /** 138 * Returns 139 * OBX-2: "Value Type" - creates it if necessary 140 */ 141 public ID getObx2_ValueType() { 142 ID retVal = this.getTypedField(2, 0); 143 return retVal; 144 } 145 146 147 148 /** 149 * Returns 150 * OBX-3: "Observation Identifier" - creates it if necessary 151 */ 152 public CE getObservationIdentifier() { 153 CE retVal = this.getTypedField(3, 0); 154 return retVal; 155 } 156 157 /** 158 * Returns 159 * OBX-3: "Observation Identifier" - creates it if necessary 160 */ 161 public CE getObx3_ObservationIdentifier() { 162 CE retVal = this.getTypedField(3, 0); 163 return retVal; 164 } 165 166 167 168 /** 169 * Returns 170 * OBX-4: "Observation Sub-ID" - creates it if necessary 171 */ 172 public ST getObservationSubID() { 173 ST retVal = this.getTypedField(4, 0); 174 return retVal; 175 } 176 177 /** 178 * Returns 179 * OBX-4: "Observation Sub-ID" - creates it if necessary 180 */ 181 public ST getObx4_ObservationSubID() { 182 ST retVal = this.getTypedField(4, 0); 183 return retVal; 184 } 185 186 187 /** 188 * Returns all repetitions of Observation Value (OBX-5). 189 */ 190 public Varies[] getObservationValue() { 191 Varies[] retVal = this.getTypedField(5, new Varies[0]); 192 return retVal; 193 } 194 195 196 /** 197 * Returns all repetitions of Observation Value (OBX-5). 198 */ 199 public Varies[] getObx5_ObservationValue() { 200 Varies[] retVal = this.getTypedField(5, new Varies[0]); 201 return retVal; 202 } 203 204 205 /** 206 * Returns a count of the current number of repetitions of Observation Value (OBX-5). 207 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 208 * it will return zero. 209 */ 210 public int getObservationValueReps() { 211 return this.getReps(5); 212 } 213 214 215 /** 216 * Returns a specific repetition of 217 * OBX-5: "Observation Value" - creates it if necessary 218 * 219 * @param rep The repetition index (0-indexed) 220 */ 221 public Varies getObservationValue(int rep) { 222 Varies retVal = this.getTypedField(5, rep); 223 return retVal; 224 } 225 226 /** 227 * Returns a specific repetition of 228 * OBX-5: "Observation Value" - creates it if necessary 229 * 230 * @param rep The repetition index (0-indexed) 231 */ 232 public Varies getObx5_ObservationValue(int rep) { 233 Varies retVal = this.getTypedField(5, rep); 234 return retVal; 235 } 236 237 /** 238 * Returns a count of the current number of repetitions of Observation Value (OBX-5). 239 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 240 * it will return zero. 241 */ 242 public int getObx5_ObservationValueReps() { 243 return this.getReps(5); 244 } 245 246 247 /** 248 * Inserts a repetition of 249 * OBX-5: "Observation Value" at a specific index 250 * 251 * @param rep The repetition index (0-indexed) 252 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 253 */ 254 public Varies insertObservationValue(int rep) throws HL7Exception { 255 return (Varies) super.insertRepetition(5, rep); 256 } 257 258 259 /** 260 * Inserts a repetition of 261 * OBX-5: "Observation Value" at a specific index 262 * 263 * @param rep The repetition index (0-indexed) 264 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 265 */ 266 public Varies insertObx5_ObservationValue(int rep) throws HL7Exception { 267 return (Varies) super.insertRepetition(5, rep); 268 } 269 270 271 /** 272 * Removes a repetition of 273 * OBX-5: "Observation Value" at a specific index 274 * 275 * @param rep The repetition index (0-indexed) 276 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 277 */ 278 public Varies removeObservationValue(int rep) throws HL7Exception { 279 return (Varies) super.removeRepetition(5, rep); 280 } 281 282 283 /** 284 * Removes a repetition of 285 * OBX-5: "Observation Value" at a specific index 286 * 287 * @param rep The repetition index (0-indexed) 288 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 289 */ 290 public Varies removeObx5_ObservationValue(int rep) throws HL7Exception { 291 return (Varies) super.removeRepetition(5, rep); 292 } 293 294 295 296 297 /** 298 * Returns 299 * OBX-6: "Units" - creates it if necessary 300 */ 301 public CE getUnits() { 302 CE retVal = this.getTypedField(6, 0); 303 return retVal; 304 } 305 306 /** 307 * Returns 308 * OBX-6: "Units" - creates it if necessary 309 */ 310 public CE getObx6_Units() { 311 CE retVal = this.getTypedField(6, 0); 312 return retVal; 313 } 314 315 316 317 /** 318 * Returns 319 * OBX-7: "References Range" - creates it if necessary 320 */ 321 public ST getReferencesRange() { 322 ST retVal = this.getTypedField(7, 0); 323 return retVal; 324 } 325 326 /** 327 * Returns 328 * OBX-7: "References Range" - creates it if necessary 329 */ 330 public ST getObx7_ReferencesRange() { 331 ST retVal = this.getTypedField(7, 0); 332 return retVal; 333 } 334 335 336 /** 337 * Returns all repetitions of Abnormal Flags (OBX-8). 338 */ 339 public ID[] getAbnormalFlags() { 340 ID[] retVal = this.getTypedField(8, new ID[0]); 341 return retVal; 342 } 343 344 345 /** 346 * Returns all repetitions of Abnormal Flags (OBX-8). 347 */ 348 public ID[] getObx8_AbnormalFlags() { 349 ID[] retVal = this.getTypedField(8, new ID[0]); 350 return retVal; 351 } 352 353 354 /** 355 * Returns a count of the current number of repetitions of Abnormal Flags (OBX-8). 356 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 357 * it will return zero. 358 */ 359 public int getAbnormalFlagsReps() { 360 return this.getReps(8); 361 } 362 363 364 /** 365 * Returns a specific repetition of 366 * OBX-8: "Abnormal Flags" - creates it if necessary 367 * 368 * @param rep The repetition index (0-indexed) 369 */ 370 public ID getAbnormalFlags(int rep) { 371 ID retVal = this.getTypedField(8, rep); 372 return retVal; 373 } 374 375 /** 376 * Returns a specific repetition of 377 * OBX-8: "Abnormal Flags" - creates it if necessary 378 * 379 * @param rep The repetition index (0-indexed) 380 */ 381 public ID getObx8_AbnormalFlags(int rep) { 382 ID retVal = this.getTypedField(8, rep); 383 return retVal; 384 } 385 386 /** 387 * Returns a count of the current number of repetitions of Abnormal Flags (OBX-8). 388 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 389 * it will return zero. 390 */ 391 public int getObx8_AbnormalFlagsReps() { 392 return this.getReps(8); 393 } 394 395 396 /** 397 * Inserts a repetition of 398 * OBX-8: "Abnormal Flags" at a specific index 399 * 400 * @param rep The repetition index (0-indexed) 401 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 402 */ 403 public ID insertAbnormalFlags(int rep) throws HL7Exception { 404 return (ID) super.insertRepetition(8, rep); 405 } 406 407 408 /** 409 * Inserts a repetition of 410 * OBX-8: "Abnormal Flags" at a specific index 411 * 412 * @param rep The repetition index (0-indexed) 413 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 414 */ 415 public ID insertObx8_AbnormalFlags(int rep) throws HL7Exception { 416 return (ID) super.insertRepetition(8, rep); 417 } 418 419 420 /** 421 * Removes a repetition of 422 * OBX-8: "Abnormal Flags" at a specific index 423 * 424 * @param rep The repetition index (0-indexed) 425 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 426 */ 427 public ID removeAbnormalFlags(int rep) throws HL7Exception { 428 return (ID) super.removeRepetition(8, rep); 429 } 430 431 432 /** 433 * Removes a repetition of 434 * OBX-8: "Abnormal Flags" at a specific index 435 * 436 * @param rep The repetition index (0-indexed) 437 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 438 */ 439 public ID removeObx8_AbnormalFlags(int rep) throws HL7Exception { 440 return (ID) super.removeRepetition(8, rep); 441 } 442 443 444 445 /** 446 * Returns all repetitions of Probability (OBX-9). 447 */ 448 public NM[] getProbability() { 449 NM[] retVal = this.getTypedField(9, new NM[0]); 450 return retVal; 451 } 452 453 454 /** 455 * Returns all repetitions of Probability (OBX-9). 456 */ 457 public NM[] getObx9_Probability() { 458 NM[] retVal = this.getTypedField(9, new NM[0]); 459 return retVal; 460 } 461 462 463 /** 464 * Returns a count of the current number of repetitions of Probability (OBX-9). 465 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 466 * it will return zero. 467 */ 468 public int getProbabilityReps() { 469 return this.getReps(9); 470 } 471 472 473 /** 474 * Returns a specific repetition of 475 * OBX-9: "Probability" - creates it if necessary 476 * 477 * @param rep The repetition index (0-indexed) 478 */ 479 public NM getProbability(int rep) { 480 NM retVal = this.getTypedField(9, rep); 481 return retVal; 482 } 483 484 /** 485 * Returns a specific repetition of 486 * OBX-9: "Probability" - creates it if necessary 487 * 488 * @param rep The repetition index (0-indexed) 489 */ 490 public NM getObx9_Probability(int rep) { 491 NM retVal = this.getTypedField(9, rep); 492 return retVal; 493 } 494 495 /** 496 * Returns a count of the current number of repetitions of Probability (OBX-9). 497 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 498 * it will return zero. 499 */ 500 public int getObx9_ProbabilityReps() { 501 return this.getReps(9); 502 } 503 504 505 /** 506 * Inserts a repetition of 507 * OBX-9: "Probability" at a specific index 508 * 509 * @param rep The repetition index (0-indexed) 510 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 511 */ 512 public NM insertProbability(int rep) throws HL7Exception { 513 return (NM) super.insertRepetition(9, rep); 514 } 515 516 517 /** 518 * Inserts a repetition of 519 * OBX-9: "Probability" at a specific index 520 * 521 * @param rep The repetition index (0-indexed) 522 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 523 */ 524 public NM insertObx9_Probability(int rep) throws HL7Exception { 525 return (NM) super.insertRepetition(9, rep); 526 } 527 528 529 /** 530 * Removes a repetition of 531 * OBX-9: "Probability" at a specific index 532 * 533 * @param rep The repetition index (0-indexed) 534 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 535 */ 536 public NM removeProbability(int rep) throws HL7Exception { 537 return (NM) super.removeRepetition(9, rep); 538 } 539 540 541 /** 542 * Removes a repetition of 543 * OBX-9: "Probability" at a specific index 544 * 545 * @param rep The repetition index (0-indexed) 546 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 547 */ 548 public NM removeObx9_Probability(int rep) throws HL7Exception { 549 return (NM) super.removeRepetition(9, rep); 550 } 551 552 553 554 555 /** 556 * Returns 557 * OBX-10: "Nature of Abnormal Test" - creates it if necessary 558 */ 559 public ID getNatureOfAbnormalTest() { 560 ID retVal = this.getTypedField(10, 0); 561 return retVal; 562 } 563 564 /** 565 * Returns 566 * OBX-10: "Nature of Abnormal Test" - creates it if necessary 567 */ 568 public ID getObx10_NatureOfAbnormalTest() { 569 ID retVal = this.getTypedField(10, 0); 570 return retVal; 571 } 572 573 574 575 /** 576 * Returns 577 * OBX-11: "Observation Result Status" - creates it if necessary 578 */ 579 public ID getObservationResultStatus() { 580 ID retVal = this.getTypedField(11, 0); 581 return retVal; 582 } 583 584 /** 585 * Returns 586 * OBX-11: "Observation Result Status" - creates it if necessary 587 */ 588 public ID getObx11_ObservationResultStatus() { 589 ID retVal = this.getTypedField(11, 0); 590 return retVal; 591 } 592 593 594 595 /** 596 * Returns 597 * OBX-12: "Date Last Obs Normal Values" - creates it if necessary 598 */ 599 public TS getDateLastObsNormalValues() { 600 TS retVal = this.getTypedField(12, 0); 601 return retVal; 602 } 603 604 /** 605 * Returns 606 * OBX-12: "Date Last Obs Normal Values" - creates it if necessary 607 */ 608 public TS getObx12_DateLastObsNormalValues() { 609 TS retVal = this.getTypedField(12, 0); 610 return retVal; 611 } 612 613 614 615 /** 616 * Returns 617 * OBX-13: "User Defined Access Checks" - creates it if necessary 618 */ 619 public ST getUserDefinedAccessChecks() { 620 ST retVal = this.getTypedField(13, 0); 621 return retVal; 622 } 623 624 /** 625 * Returns 626 * OBX-13: "User Defined Access Checks" - creates it if necessary 627 */ 628 public ST getObx13_UserDefinedAccessChecks() { 629 ST retVal = this.getTypedField(13, 0); 630 return retVal; 631 } 632 633 634 635 /** 636 * Returns 637 * OBX-14: "Date/Time of the Observation" - creates it if necessary 638 */ 639 public TS getDateTimeOfTheObservation() { 640 TS retVal = this.getTypedField(14, 0); 641 return retVal; 642 } 643 644 /** 645 * Returns 646 * OBX-14: "Date/Time of the Observation" - creates it if necessary 647 */ 648 public TS getObx14_DateTimeOfTheObservation() { 649 TS retVal = this.getTypedField(14, 0); 650 return retVal; 651 } 652 653 654 655 /** 656 * Returns 657 * OBX-15: "Producer's ID" - creates it if necessary 658 */ 659 public CE getProducerSID() { 660 CE retVal = this.getTypedField(15, 0); 661 return retVal; 662 } 663 664 /** 665 * Returns 666 * OBX-15: "Producer's ID" - creates it if necessary 667 */ 668 public CE getObx15_ProducerSID() { 669 CE retVal = this.getTypedField(15, 0); 670 return retVal; 671 } 672 673 674 /** 675 * Returns all repetitions of Responsible Observer (OBX-16). 676 */ 677 public XCN[] getResponsibleObserver() { 678 XCN[] retVal = this.getTypedField(16, new XCN[0]); 679 return retVal; 680 } 681 682 683 /** 684 * Returns all repetitions of Responsible Observer (OBX-16). 685 */ 686 public XCN[] getObx16_ResponsibleObserver() { 687 XCN[] retVal = this.getTypedField(16, new XCN[0]); 688 return retVal; 689 } 690 691 692 /** 693 * Returns a count of the current number of repetitions of Responsible Observer (OBX-16). 694 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 695 * it will return zero. 696 */ 697 public int getResponsibleObserverReps() { 698 return this.getReps(16); 699 } 700 701 702 /** 703 * Returns a specific repetition of 704 * OBX-16: "Responsible Observer" - creates it if necessary 705 * 706 * @param rep The repetition index (0-indexed) 707 */ 708 public XCN getResponsibleObserver(int rep) { 709 XCN retVal = this.getTypedField(16, rep); 710 return retVal; 711 } 712 713 /** 714 * Returns a specific repetition of 715 * OBX-16: "Responsible Observer" - creates it if necessary 716 * 717 * @param rep The repetition index (0-indexed) 718 */ 719 public XCN getObx16_ResponsibleObserver(int rep) { 720 XCN retVal = this.getTypedField(16, rep); 721 return retVal; 722 } 723 724 /** 725 * Returns a count of the current number of repetitions of Responsible Observer (OBX-16). 726 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 727 * it will return zero. 728 */ 729 public int getObx16_ResponsibleObserverReps() { 730 return this.getReps(16); 731 } 732 733 734 /** 735 * Inserts a repetition of 736 * OBX-16: "Responsible Observer" at a specific index 737 * 738 * @param rep The repetition index (0-indexed) 739 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 740 */ 741 public XCN insertResponsibleObserver(int rep) throws HL7Exception { 742 return (XCN) super.insertRepetition(16, rep); 743 } 744 745 746 /** 747 * Inserts a repetition of 748 * OBX-16: "Responsible Observer" at a specific index 749 * 750 * @param rep The repetition index (0-indexed) 751 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 752 */ 753 public XCN insertObx16_ResponsibleObserver(int rep) throws HL7Exception { 754 return (XCN) super.insertRepetition(16, rep); 755 } 756 757 758 /** 759 * Removes a repetition of 760 * OBX-16: "Responsible Observer" at a specific index 761 * 762 * @param rep The repetition index (0-indexed) 763 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 764 */ 765 public XCN removeResponsibleObserver(int rep) throws HL7Exception { 766 return (XCN) super.removeRepetition(16, rep); 767 } 768 769 770 /** 771 * Removes a repetition of 772 * OBX-16: "Responsible Observer" at a specific index 773 * 774 * @param rep The repetition index (0-indexed) 775 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 776 */ 777 public XCN removeObx16_ResponsibleObserver(int rep) throws HL7Exception { 778 return (XCN) super.removeRepetition(16, rep); 779 } 780 781 782 783 /** 784 * Returns all repetitions of Observation Method (OBX-17). 785 */ 786 public CE[] getObservationMethod() { 787 CE[] retVal = this.getTypedField(17, new CE[0]); 788 return retVal; 789 } 790 791 792 /** 793 * Returns all repetitions of Observation Method (OBX-17). 794 */ 795 public CE[] getObx17_ObservationMethod() { 796 CE[] retVal = this.getTypedField(17, new CE[0]); 797 return retVal; 798 } 799 800 801 /** 802 * Returns a count of the current number of repetitions of Observation Method (OBX-17). 803 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 804 * it will return zero. 805 */ 806 public int getObservationMethodReps() { 807 return this.getReps(17); 808 } 809 810 811 /** 812 * Returns a specific repetition of 813 * OBX-17: "Observation Method" - creates it if necessary 814 * 815 * @param rep The repetition index (0-indexed) 816 */ 817 public CE getObservationMethod(int rep) { 818 CE retVal = this.getTypedField(17, rep); 819 return retVal; 820 } 821 822 /** 823 * Returns a specific repetition of 824 * OBX-17: "Observation Method" - creates it if necessary 825 * 826 * @param rep The repetition index (0-indexed) 827 */ 828 public CE getObx17_ObservationMethod(int rep) { 829 CE retVal = this.getTypedField(17, rep); 830 return retVal; 831 } 832 833 /** 834 * Returns a count of the current number of repetitions of Observation Method (OBX-17). 835 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 836 * it will return zero. 837 */ 838 public int getObx17_ObservationMethodReps() { 839 return this.getReps(17); 840 } 841 842 843 /** 844 * Inserts a repetition of 845 * OBX-17: "Observation Method" at a specific index 846 * 847 * @param rep The repetition index (0-indexed) 848 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 849 */ 850 public CE insertObservationMethod(int rep) throws HL7Exception { 851 return (CE) super.insertRepetition(17, rep); 852 } 853 854 855 /** 856 * Inserts a repetition of 857 * OBX-17: "Observation Method" at a specific index 858 * 859 * @param rep The repetition index (0-indexed) 860 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 861 */ 862 public CE insertObx17_ObservationMethod(int rep) throws HL7Exception { 863 return (CE) super.insertRepetition(17, rep); 864 } 865 866 867 /** 868 * Removes a repetition of 869 * OBX-17: "Observation Method" at a specific index 870 * 871 * @param rep The repetition index (0-indexed) 872 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 873 */ 874 public CE removeObservationMethod(int rep) throws HL7Exception { 875 return (CE) super.removeRepetition(17, rep); 876 } 877 878 879 /** 880 * Removes a repetition of 881 * OBX-17: "Observation Method" at a specific index 882 * 883 * @param rep The repetition index (0-indexed) 884 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 885 */ 886 public CE removeObx17_ObservationMethod(int rep) throws HL7Exception { 887 return (CE) super.removeRepetition(17, rep); 888 } 889 890 891 892 893 894 895 /** {@inheritDoc} */ 896 protected Type createNewTypeWithoutReflection(int field) { 897 switch (field) { 898 case 0: return new SI(getMessage()); 899 case 1: return new ID(getMessage(), new Integer( 125 )); 900 case 2: return new CE(getMessage()); 901 case 3: return new ST(getMessage()); 902 case 4: return new Varies(getMessage()); 903 case 5: return new CE(getMessage()); 904 case 6: return new ST(getMessage()); 905 case 7: return new ID(getMessage(), new Integer( 78 )); 906 case 8: return new NM(getMessage()); 907 case 9: return new ID(getMessage(), new Integer( 80 )); 908 case 10: return new ID(getMessage(), new Integer( 85 )); 909 case 11: return new TS(getMessage()); 910 case 12: return new ST(getMessage()); 911 case 13: return new TS(getMessage()); 912 case 14: return new CE(getMessage()); 913 case 15: return new XCN(getMessage()); 914 case 16: return new CE(getMessage()); 915 default: return null; 916 } 917 } 918 919 920} 921