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.v251.segment; 035 036// import ca.uhn.hl7v2.model.v251.group.*; 037import ca.uhn.hl7v2.model.v251.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 LOC message segment (Location Identification). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>LOC-1: Primary Key Value - LOC (PL) <b> </b> 052 * <li>LOC-2: Location Description (ST) <b>optional </b> 053 * <li>LOC-3: Location Type - LOC (IS) <b> repeating</b> 054 * <li>LOC-4: Organization Name - LOC (XON) <b>optional repeating</b> 055 * <li>LOC-5: Location Address (XAD) <b>optional repeating</b> 056 * <li>LOC-6: Location Phone (XTN) <b>optional repeating</b> 057 * <li>LOC-7: License Number (CE) <b>optional repeating</b> 058 * <li>LOC-8: Location Equipment (IS) <b>optional repeating</b> 059 * <li>LOC-9: Location Service Code (IS) <b>optional </b> 060 * </ul> 061 */ 062@SuppressWarnings("unused") 063public class LOC extends AbstractSegment { 064 065 /** 066 * Creates a new LOC segment 067 */ 068 public LOC(Group parent, ModelClassFactory factory) { 069 super(parent, factory); 070 init(factory); 071 } 072 073 private void init(ModelClassFactory factory) { 074 try { 075 this.add(PL.class, true, 1, 200, new Object[]{ getMessage() }, "Primary Key Value - LOC"); 076 this.add(ST.class, false, 1, 48, new Object[]{ getMessage() }, "Location Description"); 077 this.add(IS.class, true, 0, 2, new Object[]{ getMessage(), new Integer(260) }, "Location Type - LOC"); 078 this.add(XON.class, false, 0, 250, new Object[]{ getMessage() }, "Organization Name - LOC"); 079 this.add(XAD.class, false, 0, 250, new Object[]{ getMessage() }, "Location Address"); 080 this.add(XTN.class, false, 0, 250, new Object[]{ getMessage() }, "Location Phone"); 081 this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "License Number"); 082 this.add(IS.class, false, 0, 3, new Object[]{ getMessage(), new Integer(261) }, "Location Equipment"); 083 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(442) }, "Location Service Code"); 084 } catch(HL7Exception e) { 085 log.error("Unexpected error creating LOC - this is probably a bug in the source code generator.", e); 086 } 087 } 088 089 090 091 /** 092 * Returns 093 * LOC-1: "Primary Key Value - LOC" - creates it if necessary 094 */ 095 public PL getPrimaryKeyValueLOC() { 096 PL retVal = this.getTypedField(1, 0); 097 return retVal; 098 } 099 100 /** 101 * Returns 102 * LOC-1: "Primary Key Value - LOC" - creates it if necessary 103 */ 104 public PL getLoc1_PrimaryKeyValueLOC() { 105 PL retVal = this.getTypedField(1, 0); 106 return retVal; 107 } 108 109 110 111 /** 112 * Returns 113 * LOC-2: "Location Description" - creates it if necessary 114 */ 115 public ST getLocationDescription() { 116 ST retVal = this.getTypedField(2, 0); 117 return retVal; 118 } 119 120 /** 121 * Returns 122 * LOC-2: "Location Description" - creates it if necessary 123 */ 124 public ST getLoc2_LocationDescription() { 125 ST retVal = this.getTypedField(2, 0); 126 return retVal; 127 } 128 129 130 /** 131 * Returns all repetitions of Location Type - LOC (LOC-3). 132 */ 133 public IS[] getLocationTypeLOC() { 134 IS[] retVal = this.getTypedField(3, new IS[0]); 135 return retVal; 136 } 137 138 139 /** 140 * Returns all repetitions of Location Type - LOC (LOC-3). 141 */ 142 public IS[] getLoc3_LocationTypeLOC() { 143 IS[] retVal = this.getTypedField(3, new IS[0]); 144 return retVal; 145 } 146 147 148 /** 149 * Returns a count of the current number of repetitions of Location Type - LOC (LOC-3). 150 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 151 * it will return zero. 152 */ 153 public int getLocationTypeLOCReps() { 154 return this.getReps(3); 155 } 156 157 158 /** 159 * Returns a specific repetition of 160 * LOC-3: "Location Type - LOC" - creates it if necessary 161 * 162 * @param rep The repetition index (0-indexed) 163 */ 164 public IS getLocationTypeLOC(int rep) { 165 IS retVal = this.getTypedField(3, rep); 166 return retVal; 167 } 168 169 /** 170 * Returns a specific repetition of 171 * LOC-3: "Location Type - LOC" - creates it if necessary 172 * 173 * @param rep The repetition index (0-indexed) 174 */ 175 public IS getLoc3_LocationTypeLOC(int rep) { 176 IS retVal = this.getTypedField(3, rep); 177 return retVal; 178 } 179 180 /** 181 * Returns a count of the current number of repetitions of Location Type - LOC (LOC-3). 182 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 183 * it will return zero. 184 */ 185 public int getLoc3_LocationTypeLOCReps() { 186 return this.getReps(3); 187 } 188 189 190 /** 191 * Inserts a repetition of 192 * LOC-3: "Location Type - LOC" at a specific index 193 * 194 * @param rep The repetition index (0-indexed) 195 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 196 */ 197 public IS insertLocationTypeLOC(int rep) throws HL7Exception { 198 return (IS) super.insertRepetition(3, rep); 199 } 200 201 202 /** 203 * Inserts a repetition of 204 * LOC-3: "Location Type - LOC" at a specific index 205 * 206 * @param rep The repetition index (0-indexed) 207 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 208 */ 209 public IS insertLoc3_LocationTypeLOC(int rep) throws HL7Exception { 210 return (IS) super.insertRepetition(3, rep); 211 } 212 213 214 /** 215 * Removes a repetition of 216 * LOC-3: "Location Type - LOC" at a specific index 217 * 218 * @param rep The repetition index (0-indexed) 219 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 220 */ 221 public IS removeLocationTypeLOC(int rep) throws HL7Exception { 222 return (IS) super.removeRepetition(3, rep); 223 } 224 225 226 /** 227 * Removes a repetition of 228 * LOC-3: "Location Type - LOC" at a specific index 229 * 230 * @param rep The repetition index (0-indexed) 231 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 232 */ 233 public IS removeLoc3_LocationTypeLOC(int rep) throws HL7Exception { 234 return (IS) super.removeRepetition(3, rep); 235 } 236 237 238 239 /** 240 * Returns all repetitions of Organization Name - LOC (LOC-4). 241 */ 242 public XON[] getOrganizationNameLOC() { 243 XON[] retVal = this.getTypedField(4, new XON[0]); 244 return retVal; 245 } 246 247 248 /** 249 * Returns all repetitions of Organization Name - LOC (LOC-4). 250 */ 251 public XON[] getLoc4_OrganizationNameLOC() { 252 XON[] retVal = this.getTypedField(4, new XON[0]); 253 return retVal; 254 } 255 256 257 /** 258 * Returns a count of the current number of repetitions of Organization Name - LOC (LOC-4). 259 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 260 * it will return zero. 261 */ 262 public int getOrganizationNameLOCReps() { 263 return this.getReps(4); 264 } 265 266 267 /** 268 * Returns a specific repetition of 269 * LOC-4: "Organization Name - LOC" - creates it if necessary 270 * 271 * @param rep The repetition index (0-indexed) 272 */ 273 public XON getOrganizationNameLOC(int rep) { 274 XON retVal = this.getTypedField(4, rep); 275 return retVal; 276 } 277 278 /** 279 * Returns a specific repetition of 280 * LOC-4: "Organization Name - LOC" - creates it if necessary 281 * 282 * @param rep The repetition index (0-indexed) 283 */ 284 public XON getLoc4_OrganizationNameLOC(int rep) { 285 XON retVal = this.getTypedField(4, rep); 286 return retVal; 287 } 288 289 /** 290 * Returns a count of the current number of repetitions of Organization Name - LOC (LOC-4). 291 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 292 * it will return zero. 293 */ 294 public int getLoc4_OrganizationNameLOCReps() { 295 return this.getReps(4); 296 } 297 298 299 /** 300 * Inserts a repetition of 301 * LOC-4: "Organization Name - LOC" at a specific index 302 * 303 * @param rep The repetition index (0-indexed) 304 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 305 */ 306 public XON insertOrganizationNameLOC(int rep) throws HL7Exception { 307 return (XON) super.insertRepetition(4, rep); 308 } 309 310 311 /** 312 * Inserts a repetition of 313 * LOC-4: "Organization Name - LOC" at a specific index 314 * 315 * @param rep The repetition index (0-indexed) 316 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 317 */ 318 public XON insertLoc4_OrganizationNameLOC(int rep) throws HL7Exception { 319 return (XON) super.insertRepetition(4, rep); 320 } 321 322 323 /** 324 * Removes a repetition of 325 * LOC-4: "Organization Name - LOC" at a specific index 326 * 327 * @param rep The repetition index (0-indexed) 328 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 329 */ 330 public XON removeOrganizationNameLOC(int rep) throws HL7Exception { 331 return (XON) super.removeRepetition(4, rep); 332 } 333 334 335 /** 336 * Removes a repetition of 337 * LOC-4: "Organization Name - LOC" at a specific index 338 * 339 * @param rep The repetition index (0-indexed) 340 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 341 */ 342 public XON removeLoc4_OrganizationNameLOC(int rep) throws HL7Exception { 343 return (XON) super.removeRepetition(4, rep); 344 } 345 346 347 348 /** 349 * Returns all repetitions of Location Address (LOC-5). 350 */ 351 public XAD[] getLocationAddress() { 352 XAD[] retVal = this.getTypedField(5, new XAD[0]); 353 return retVal; 354 } 355 356 357 /** 358 * Returns all repetitions of Location Address (LOC-5). 359 */ 360 public XAD[] getLoc5_LocationAddress() { 361 XAD[] retVal = this.getTypedField(5, new XAD[0]); 362 return retVal; 363 } 364 365 366 /** 367 * Returns a count of the current number of repetitions of Location Address (LOC-5). 368 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 369 * it will return zero. 370 */ 371 public int getLocationAddressReps() { 372 return this.getReps(5); 373 } 374 375 376 /** 377 * Returns a specific repetition of 378 * LOC-5: "Location Address" - creates it if necessary 379 * 380 * @param rep The repetition index (0-indexed) 381 */ 382 public XAD getLocationAddress(int rep) { 383 XAD retVal = this.getTypedField(5, rep); 384 return retVal; 385 } 386 387 /** 388 * Returns a specific repetition of 389 * LOC-5: "Location Address" - creates it if necessary 390 * 391 * @param rep The repetition index (0-indexed) 392 */ 393 public XAD getLoc5_LocationAddress(int rep) { 394 XAD retVal = this.getTypedField(5, rep); 395 return retVal; 396 } 397 398 /** 399 * Returns a count of the current number of repetitions of Location Address (LOC-5). 400 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 401 * it will return zero. 402 */ 403 public int getLoc5_LocationAddressReps() { 404 return this.getReps(5); 405 } 406 407 408 /** 409 * Inserts a repetition of 410 * LOC-5: "Location Address" 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 XAD insertLocationAddress(int rep) throws HL7Exception { 416 return (XAD) super.insertRepetition(5, rep); 417 } 418 419 420 /** 421 * Inserts a repetition of 422 * LOC-5: "Location Address" 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 XAD insertLoc5_LocationAddress(int rep) throws HL7Exception { 428 return (XAD) super.insertRepetition(5, rep); 429 } 430 431 432 /** 433 * Removes a repetition of 434 * LOC-5: "Location Address" 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 XAD removeLocationAddress(int rep) throws HL7Exception { 440 return (XAD) super.removeRepetition(5, rep); 441 } 442 443 444 /** 445 * Removes a repetition of 446 * LOC-5: "Location Address" at a specific index 447 * 448 * @param rep The repetition index (0-indexed) 449 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 450 */ 451 public XAD removeLoc5_LocationAddress(int rep) throws HL7Exception { 452 return (XAD) super.removeRepetition(5, rep); 453 } 454 455 456 457 /** 458 * Returns all repetitions of Location Phone (LOC-6). 459 */ 460 public XTN[] getLocationPhone() { 461 XTN[] retVal = this.getTypedField(6, new XTN[0]); 462 return retVal; 463 } 464 465 466 /** 467 * Returns all repetitions of Location Phone (LOC-6). 468 */ 469 public XTN[] getLoc6_LocationPhone() { 470 XTN[] retVal = this.getTypedField(6, new XTN[0]); 471 return retVal; 472 } 473 474 475 /** 476 * Returns a count of the current number of repetitions of Location Phone (LOC-6). 477 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 478 * it will return zero. 479 */ 480 public int getLocationPhoneReps() { 481 return this.getReps(6); 482 } 483 484 485 /** 486 * Returns a specific repetition of 487 * LOC-6: "Location Phone" - creates it if necessary 488 * 489 * @param rep The repetition index (0-indexed) 490 */ 491 public XTN getLocationPhone(int rep) { 492 XTN retVal = this.getTypedField(6, rep); 493 return retVal; 494 } 495 496 /** 497 * Returns a specific repetition of 498 * LOC-6: "Location Phone" - creates it if necessary 499 * 500 * @param rep The repetition index (0-indexed) 501 */ 502 public XTN getLoc6_LocationPhone(int rep) { 503 XTN retVal = this.getTypedField(6, rep); 504 return retVal; 505 } 506 507 /** 508 * Returns a count of the current number of repetitions of Location Phone (LOC-6). 509 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 510 * it will return zero. 511 */ 512 public int getLoc6_LocationPhoneReps() { 513 return this.getReps(6); 514 } 515 516 517 /** 518 * Inserts a repetition of 519 * LOC-6: "Location Phone" 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 XTN insertLocationPhone(int rep) throws HL7Exception { 525 return (XTN) super.insertRepetition(6, rep); 526 } 527 528 529 /** 530 * Inserts a repetition of 531 * LOC-6: "Location Phone" 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 XTN insertLoc6_LocationPhone(int rep) throws HL7Exception { 537 return (XTN) super.insertRepetition(6, rep); 538 } 539 540 541 /** 542 * Removes a repetition of 543 * LOC-6: "Location Phone" 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 XTN removeLocationPhone(int rep) throws HL7Exception { 549 return (XTN) super.removeRepetition(6, rep); 550 } 551 552 553 /** 554 * Removes a repetition of 555 * LOC-6: "Location Phone" at a specific index 556 * 557 * @param rep The repetition index (0-indexed) 558 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 559 */ 560 public XTN removeLoc6_LocationPhone(int rep) throws HL7Exception { 561 return (XTN) super.removeRepetition(6, rep); 562 } 563 564 565 566 /** 567 * Returns all repetitions of License Number (LOC-7). 568 */ 569 public CE[] getLicenseNumber() { 570 CE[] retVal = this.getTypedField(7, new CE[0]); 571 return retVal; 572 } 573 574 575 /** 576 * Returns all repetitions of License Number (LOC-7). 577 */ 578 public CE[] getLoc7_LicenseNumber() { 579 CE[] retVal = this.getTypedField(7, new CE[0]); 580 return retVal; 581 } 582 583 584 /** 585 * Returns a count of the current number of repetitions of License Number (LOC-7). 586 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 587 * it will return zero. 588 */ 589 public int getLicenseNumberReps() { 590 return this.getReps(7); 591 } 592 593 594 /** 595 * Returns a specific repetition of 596 * LOC-7: "License Number" - creates it if necessary 597 * 598 * @param rep The repetition index (0-indexed) 599 */ 600 public CE getLicenseNumber(int rep) { 601 CE retVal = this.getTypedField(7, rep); 602 return retVal; 603 } 604 605 /** 606 * Returns a specific repetition of 607 * LOC-7: "License Number" - creates it if necessary 608 * 609 * @param rep The repetition index (0-indexed) 610 */ 611 public CE getLoc7_LicenseNumber(int rep) { 612 CE retVal = this.getTypedField(7, rep); 613 return retVal; 614 } 615 616 /** 617 * Returns a count of the current number of repetitions of License Number (LOC-7). 618 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 619 * it will return zero. 620 */ 621 public int getLoc7_LicenseNumberReps() { 622 return this.getReps(7); 623 } 624 625 626 /** 627 * Inserts a repetition of 628 * LOC-7: "License Number" at a specific index 629 * 630 * @param rep The repetition index (0-indexed) 631 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 632 */ 633 public CE insertLicenseNumber(int rep) throws HL7Exception { 634 return (CE) super.insertRepetition(7, rep); 635 } 636 637 638 /** 639 * Inserts a repetition of 640 * LOC-7: "License Number" at a specific index 641 * 642 * @param rep The repetition index (0-indexed) 643 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 644 */ 645 public CE insertLoc7_LicenseNumber(int rep) throws HL7Exception { 646 return (CE) super.insertRepetition(7, rep); 647 } 648 649 650 /** 651 * Removes a repetition of 652 * LOC-7: "License Number" at a specific index 653 * 654 * @param rep The repetition index (0-indexed) 655 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 656 */ 657 public CE removeLicenseNumber(int rep) throws HL7Exception { 658 return (CE) super.removeRepetition(7, rep); 659 } 660 661 662 /** 663 * Removes a repetition of 664 * LOC-7: "License Number" at a specific index 665 * 666 * @param rep The repetition index (0-indexed) 667 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 668 */ 669 public CE removeLoc7_LicenseNumber(int rep) throws HL7Exception { 670 return (CE) super.removeRepetition(7, rep); 671 } 672 673 674 675 /** 676 * Returns all repetitions of Location Equipment (LOC-8). 677 */ 678 public IS[] getLocationEquipment() { 679 IS[] retVal = this.getTypedField(8, new IS[0]); 680 return retVal; 681 } 682 683 684 /** 685 * Returns all repetitions of Location Equipment (LOC-8). 686 */ 687 public IS[] getLoc8_LocationEquipment() { 688 IS[] retVal = this.getTypedField(8, new IS[0]); 689 return retVal; 690 } 691 692 693 /** 694 * Returns a count of the current number of repetitions of Location Equipment (LOC-8). 695 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 696 * it will return zero. 697 */ 698 public int getLocationEquipmentReps() { 699 return this.getReps(8); 700 } 701 702 703 /** 704 * Returns a specific repetition of 705 * LOC-8: "Location Equipment" - creates it if necessary 706 * 707 * @param rep The repetition index (0-indexed) 708 */ 709 public IS getLocationEquipment(int rep) { 710 IS retVal = this.getTypedField(8, rep); 711 return retVal; 712 } 713 714 /** 715 * Returns a specific repetition of 716 * LOC-8: "Location Equipment" - creates it if necessary 717 * 718 * @param rep The repetition index (0-indexed) 719 */ 720 public IS getLoc8_LocationEquipment(int rep) { 721 IS retVal = this.getTypedField(8, rep); 722 return retVal; 723 } 724 725 /** 726 * Returns a count of the current number of repetitions of Location Equipment (LOC-8). 727 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 728 * it will return zero. 729 */ 730 public int getLoc8_LocationEquipmentReps() { 731 return this.getReps(8); 732 } 733 734 735 /** 736 * Inserts a repetition of 737 * LOC-8: "Location Equipment" at a specific index 738 * 739 * @param rep The repetition index (0-indexed) 740 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 741 */ 742 public IS insertLocationEquipment(int rep) throws HL7Exception { 743 return (IS) super.insertRepetition(8, rep); 744 } 745 746 747 /** 748 * Inserts a repetition of 749 * LOC-8: "Location Equipment" at a specific index 750 * 751 * @param rep The repetition index (0-indexed) 752 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 753 */ 754 public IS insertLoc8_LocationEquipment(int rep) throws HL7Exception { 755 return (IS) super.insertRepetition(8, rep); 756 } 757 758 759 /** 760 * Removes a repetition of 761 * LOC-8: "Location Equipment" at a specific index 762 * 763 * @param rep The repetition index (0-indexed) 764 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 765 */ 766 public IS removeLocationEquipment(int rep) throws HL7Exception { 767 return (IS) super.removeRepetition(8, rep); 768 } 769 770 771 /** 772 * Removes a repetition of 773 * LOC-8: "Location Equipment" at a specific index 774 * 775 * @param rep The repetition index (0-indexed) 776 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 777 */ 778 public IS removeLoc8_LocationEquipment(int rep) throws HL7Exception { 779 return (IS) super.removeRepetition(8, rep); 780 } 781 782 783 784 785 /** 786 * Returns 787 * LOC-9: "Location Service Code" - creates it if necessary 788 */ 789 public IS getLocationServiceCode() { 790 IS retVal = this.getTypedField(9, 0); 791 return retVal; 792 } 793 794 /** 795 * Returns 796 * LOC-9: "Location Service Code" - creates it if necessary 797 */ 798 public IS getLoc9_LocationServiceCode() { 799 IS retVal = this.getTypedField(9, 0); 800 return retVal; 801 } 802 803 804 805 806 807 /** {@inheritDoc} */ 808 protected Type createNewTypeWithoutReflection(int field) { 809 switch (field) { 810 case 0: return new PL(getMessage()); 811 case 1: return new ST(getMessage()); 812 case 2: return new IS(getMessage(), new Integer( 260 )); 813 case 3: return new XON(getMessage()); 814 case 4: return new XAD(getMessage()); 815 case 5: return new XTN(getMessage()); 816 case 6: return new CE(getMessage()); 817 case 7: return new IS(getMessage(), new Integer( 261 )); 818 case 8: return new IS(getMessage(), new Integer( 442 )); 819 default: return null; 820 } 821 } 822 823 824} 825