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