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.v22.segment; 035 036// import ca.uhn.hl7v2.model.v22.group.*; 037import ca.uhn.hl7v2.model.v22.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 UB2 message segment (UB92 DATA). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>UB2-1: Set ID - UB92 (SI) <b>optional </b> 052 * <li>UB2-2: Co-insurance days (9) (ST) <b>optional </b> 053 * <li>UB2-3: Condition code (24-30) (ID) <b>optional repeating</b> 054 * <li>UB2-4: Covered days (7) (ST) <b>optional </b> 055 * <li>UB2-5: Non-covered days (8) (ST) <b>optional </b> 056 * <li>UB2-6: Value amount and code (39-41) (CM_UVC) <b>optional repeating</b> 057 * <li>UB2-7: Occurrence code and date (32-35) (CM_OCD) <b>optional repeating</b> 058 * <li>UB2-8: Occurrence span code / dates (36) (CM_OSP) <b>optional repeating</b> 059 * <li>UB2-9: UB92 locator 2 (state) (ST) <b>optional repeating</b> 060 * <li>UB2-10: UB92 locator 11 (state) (ST) <b>optional repeating</b> 061 * <li>UB2-11: UB92 locator 31 (national) (ST) <b>optional </b> 062 * <li>UB2-12: Document control number (37) (ST) <b>optional repeating</b> 063 * <li>UB2-13: UB92 locator 49 (national) (ST) <b>optional repeating</b> 064 * <li>UB2-14: UB92 locator 56 (state) (ST) <b>optional repeating</b> 065 * <li>UB2-15: UB92 locator 57 (national) (ST) <b>optional </b> 066 * <li>UB2-16: UB92 Locator 78 (state) (ST) <b>optional repeating</b> 067 * </ul> 068 */ 069@SuppressWarnings("unused") 070public class UB2 extends AbstractSegment { 071 072 /** 073 * Creates a new UB2 segment 074 */ 075 public UB2(Group parent, ModelClassFactory factory) { 076 super(parent, factory); 077 init(factory); 078 } 079 080 private void init(ModelClassFactory factory) { 081 try { 082 this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - UB92"); 083 this.add(ST.class, false, 1, 3, new Object[]{ getMessage() }, "Co-insurance days (9)"); 084 this.add(ID.class, false, 7, 2, new Object[]{ getMessage(), new Integer(43) }, "Condition code (24-30)"); 085 this.add(ST.class, false, 1, 3, new Object[]{ getMessage() }, "Covered days (7)"); 086 this.add(ST.class, false, 1, 4, new Object[]{ getMessage() }, "Non-covered days (8)"); 087 this.add(CM_UVC.class, false, 12, 11, new Object[]{ getMessage() }, "Value amount and code (39-41)"); 088 this.add(CM_OCD.class, false, 8, 11, new Object[]{ getMessage() }, "Occurrence code and date (32-35)"); 089 this.add(CM_OSP.class, false, 2, 28, new Object[]{ getMessage() }, "Occurrence span code / dates (36)"); 090 this.add(ST.class, false, 2, 29, new Object[]{ getMessage() }, "UB92 locator 2 (state)"); 091 this.add(ST.class, false, 2, 12, new Object[]{ getMessage() }, "UB92 locator 11 (state)"); 092 this.add(ST.class, false, 1, 5, new Object[]{ getMessage() }, "UB92 locator 31 (national)"); 093 this.add(ST.class, false, 3, 23, new Object[]{ getMessage() }, "Document control number (37)"); 094 this.add(ST.class, false, 23, 4, new Object[]{ getMessage() }, "UB92 locator 49 (national)"); 095 this.add(ST.class, false, 5, 14, new Object[]{ getMessage() }, "UB92 locator 56 (state)"); 096 this.add(ST.class, false, 1, 27, new Object[]{ getMessage() }, "UB92 locator 57 (national)"); 097 this.add(ST.class, false, 2, 2, new Object[]{ getMessage() }, "UB92 Locator 78 (state)"); 098 } catch(HL7Exception e) { 099 log.error("Unexpected error creating UB2 - this is probably a bug in the source code generator.", e); 100 } 101 } 102 103 104 105 /** 106 * Returns 107 * UB2-1: "Set ID - UB92" - creates it if necessary 108 */ 109 public SI getSetIDUB92() { 110 SI retVal = this.getTypedField(1, 0); 111 return retVal; 112 } 113 114 /** 115 * Returns 116 * UB2-1: "Set ID - UB92" - creates it if necessary 117 */ 118 public SI getUb21_SetIDUB92() { 119 SI retVal = this.getTypedField(1, 0); 120 return retVal; 121 } 122 123 124 125 /** 126 * Returns 127 * UB2-2: "Co-insurance days (9)" - creates it if necessary 128 */ 129 public ST getCoInsuranceDays9() { 130 ST retVal = this.getTypedField(2, 0); 131 return retVal; 132 } 133 134 /** 135 * Returns 136 * UB2-2: "Co-insurance days (9)" - creates it if necessary 137 */ 138 public ST getUb22_CoInsuranceDays9() { 139 ST retVal = this.getTypedField(2, 0); 140 return retVal; 141 } 142 143 144 /** 145 * Returns all repetitions of Condition code (24-30) (UB2-3). 146 */ 147 public ID[] getConditionCode2430() { 148 ID[] retVal = this.getTypedField(3, new ID[0]); 149 return retVal; 150 } 151 152 153 /** 154 * Returns all repetitions of Condition code (24-30) (UB2-3). 155 */ 156 public ID[] getUb23_ConditionCode2430() { 157 ID[] retVal = this.getTypedField(3, new ID[0]); 158 return retVal; 159 } 160 161 162 /** 163 * Returns a count of the current number of repetitions of Condition code (24-30) (UB2-3). 164 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 165 * it will return zero. 166 */ 167 public int getConditionCode2430Reps() { 168 return this.getReps(3); 169 } 170 171 172 /** 173 * Returns a specific repetition of 174 * UB2-3: "Condition code (24-30)" - creates it if necessary 175 * 176 * @param rep The repetition index (0-indexed) 177 */ 178 public ID getConditionCode2430(int rep) { 179 ID retVal = this.getTypedField(3, rep); 180 return retVal; 181 } 182 183 /** 184 * Returns a specific repetition of 185 * UB2-3: "Condition code (24-30)" - creates it if necessary 186 * 187 * @param rep The repetition index (0-indexed) 188 */ 189 public ID getUb23_ConditionCode2430(int rep) { 190 ID retVal = this.getTypedField(3, rep); 191 return retVal; 192 } 193 194 /** 195 * Returns a count of the current number of repetitions of Condition code (24-30) (UB2-3). 196 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 197 * it will return zero. 198 */ 199 public int getUb23_ConditionCode2430Reps() { 200 return this.getReps(3); 201 } 202 203 204 /** 205 * Inserts a repetition of 206 * UB2-3: "Condition code (24-30)" at a specific index 207 * 208 * @param rep The repetition index (0-indexed) 209 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 210 */ 211 public ID insertConditionCode2430(int rep) throws HL7Exception { 212 return (ID) super.insertRepetition(3, rep); 213 } 214 215 216 /** 217 * Inserts a repetition of 218 * UB2-3: "Condition code (24-30)" at a specific index 219 * 220 * @param rep The repetition index (0-indexed) 221 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 222 */ 223 public ID insertUb23_ConditionCode2430(int rep) throws HL7Exception { 224 return (ID) super.insertRepetition(3, rep); 225 } 226 227 228 /** 229 * Removes a repetition of 230 * UB2-3: "Condition code (24-30)" at a specific index 231 * 232 * @param rep The repetition index (0-indexed) 233 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 234 */ 235 public ID removeConditionCode2430(int rep) throws HL7Exception { 236 return (ID) super.removeRepetition(3, rep); 237 } 238 239 240 /** 241 * Removes a repetition of 242 * UB2-3: "Condition code (24-30)" at a specific index 243 * 244 * @param rep The repetition index (0-indexed) 245 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 246 */ 247 public ID removeUb23_ConditionCode2430(int rep) throws HL7Exception { 248 return (ID) super.removeRepetition(3, rep); 249 } 250 251 252 253 254 /** 255 * Returns 256 * UB2-4: "Covered days (7)" - creates it if necessary 257 */ 258 public ST getCoveredDays7() { 259 ST retVal = this.getTypedField(4, 0); 260 return retVal; 261 } 262 263 /** 264 * Returns 265 * UB2-4: "Covered days (7)" - creates it if necessary 266 */ 267 public ST getUb24_CoveredDays7() { 268 ST retVal = this.getTypedField(4, 0); 269 return retVal; 270 } 271 272 273 274 /** 275 * Returns 276 * UB2-5: "Non-covered days (8)" - creates it if necessary 277 */ 278 public ST getNonCoveredDays8() { 279 ST retVal = this.getTypedField(5, 0); 280 return retVal; 281 } 282 283 /** 284 * Returns 285 * UB2-5: "Non-covered days (8)" - creates it if necessary 286 */ 287 public ST getUb25_NonCoveredDays8() { 288 ST retVal = this.getTypedField(5, 0); 289 return retVal; 290 } 291 292 293 /** 294 * Returns all repetitions of Value amount and code (39-41) (UB2-6). 295 */ 296 public CM_UVC[] getValueAmountAndCode3941() { 297 CM_UVC[] retVal = this.getTypedField(6, new CM_UVC[0]); 298 return retVal; 299 } 300 301 302 /** 303 * Returns all repetitions of Value amount and code (39-41) (UB2-6). 304 */ 305 public CM_UVC[] getUb26_ValueAmountAndCode3941() { 306 CM_UVC[] retVal = this.getTypedField(6, new CM_UVC[0]); 307 return retVal; 308 } 309 310 311 /** 312 * Returns a count of the current number of repetitions of Value amount and code (39-41) (UB2-6). 313 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 314 * it will return zero. 315 */ 316 public int getValueAmountAndCode3941Reps() { 317 return this.getReps(6); 318 } 319 320 321 /** 322 * Returns a specific repetition of 323 * UB2-6: "Value amount and code (39-41)" - creates it if necessary 324 * 325 * @param rep The repetition index (0-indexed) 326 */ 327 public CM_UVC getValueAmountAndCode3941(int rep) { 328 CM_UVC retVal = this.getTypedField(6, rep); 329 return retVal; 330 } 331 332 /** 333 * Returns a specific repetition of 334 * UB2-6: "Value amount and code (39-41)" - creates it if necessary 335 * 336 * @param rep The repetition index (0-indexed) 337 */ 338 public CM_UVC getUb26_ValueAmountAndCode3941(int rep) { 339 CM_UVC retVal = this.getTypedField(6, rep); 340 return retVal; 341 } 342 343 /** 344 * Returns a count of the current number of repetitions of Value amount and code (39-41) (UB2-6). 345 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 346 * it will return zero. 347 */ 348 public int getUb26_ValueAmountAndCode3941Reps() { 349 return this.getReps(6); 350 } 351 352 353 /** 354 * Inserts a repetition of 355 * UB2-6: "Value amount and code (39-41)" at a specific index 356 * 357 * @param rep The repetition index (0-indexed) 358 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 359 */ 360 public CM_UVC insertValueAmountAndCode3941(int rep) throws HL7Exception { 361 return (CM_UVC) super.insertRepetition(6, rep); 362 } 363 364 365 /** 366 * Inserts a repetition of 367 * UB2-6: "Value amount and code (39-41)" at a specific index 368 * 369 * @param rep The repetition index (0-indexed) 370 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 371 */ 372 public CM_UVC insertUb26_ValueAmountAndCode3941(int rep) throws HL7Exception { 373 return (CM_UVC) super.insertRepetition(6, rep); 374 } 375 376 377 /** 378 * Removes a repetition of 379 * UB2-6: "Value amount and code (39-41)" at a specific index 380 * 381 * @param rep The repetition index (0-indexed) 382 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 383 */ 384 public CM_UVC removeValueAmountAndCode3941(int rep) throws HL7Exception { 385 return (CM_UVC) super.removeRepetition(6, rep); 386 } 387 388 389 /** 390 * Removes a repetition of 391 * UB2-6: "Value amount and code (39-41)" at a specific index 392 * 393 * @param rep The repetition index (0-indexed) 394 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 395 */ 396 public CM_UVC removeUb26_ValueAmountAndCode3941(int rep) throws HL7Exception { 397 return (CM_UVC) super.removeRepetition(6, rep); 398 } 399 400 401 402 /** 403 * Returns all repetitions of Occurrence code and date (32-35) (UB2-7). 404 */ 405 public CM_OCD[] getOccurrenceCodeAndDate3235() { 406 CM_OCD[] retVal = this.getTypedField(7, new CM_OCD[0]); 407 return retVal; 408 } 409 410 411 /** 412 * Returns all repetitions of Occurrence code and date (32-35) (UB2-7). 413 */ 414 public CM_OCD[] getUb27_OccurrenceCodeAndDate3235() { 415 CM_OCD[] retVal = this.getTypedField(7, new CM_OCD[0]); 416 return retVal; 417 } 418 419 420 /** 421 * Returns a count of the current number of repetitions of Occurrence code and date (32-35) (UB2-7). 422 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 423 * it will return zero. 424 */ 425 public int getOccurrenceCodeAndDate3235Reps() { 426 return this.getReps(7); 427 } 428 429 430 /** 431 * Returns a specific repetition of 432 * UB2-7: "Occurrence code and date (32-35)" - creates it if necessary 433 * 434 * @param rep The repetition index (0-indexed) 435 */ 436 public CM_OCD getOccurrenceCodeAndDate3235(int rep) { 437 CM_OCD retVal = this.getTypedField(7, rep); 438 return retVal; 439 } 440 441 /** 442 * Returns a specific repetition of 443 * UB2-7: "Occurrence code and date (32-35)" - creates it if necessary 444 * 445 * @param rep The repetition index (0-indexed) 446 */ 447 public CM_OCD getUb27_OccurrenceCodeAndDate3235(int rep) { 448 CM_OCD retVal = this.getTypedField(7, rep); 449 return retVal; 450 } 451 452 /** 453 * Returns a count of the current number of repetitions of Occurrence code and date (32-35) (UB2-7). 454 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 455 * it will return zero. 456 */ 457 public int getUb27_OccurrenceCodeAndDate3235Reps() { 458 return this.getReps(7); 459 } 460 461 462 /** 463 * Inserts a repetition of 464 * UB2-7: "Occurrence code and date (32-35)" at a specific index 465 * 466 * @param rep The repetition index (0-indexed) 467 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 468 */ 469 public CM_OCD insertOccurrenceCodeAndDate3235(int rep) throws HL7Exception { 470 return (CM_OCD) super.insertRepetition(7, rep); 471 } 472 473 474 /** 475 * Inserts a repetition of 476 * UB2-7: "Occurrence code and date (32-35)" at a specific index 477 * 478 * @param rep The repetition index (0-indexed) 479 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 480 */ 481 public CM_OCD insertUb27_OccurrenceCodeAndDate3235(int rep) throws HL7Exception { 482 return (CM_OCD) super.insertRepetition(7, rep); 483 } 484 485 486 /** 487 * Removes a repetition of 488 * UB2-7: "Occurrence code and date (32-35)" at a specific index 489 * 490 * @param rep The repetition index (0-indexed) 491 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 492 */ 493 public CM_OCD removeOccurrenceCodeAndDate3235(int rep) throws HL7Exception { 494 return (CM_OCD) super.removeRepetition(7, rep); 495 } 496 497 498 /** 499 * Removes a repetition of 500 * UB2-7: "Occurrence code and date (32-35)" at a specific index 501 * 502 * @param rep The repetition index (0-indexed) 503 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 504 */ 505 public CM_OCD removeUb27_OccurrenceCodeAndDate3235(int rep) throws HL7Exception { 506 return (CM_OCD) super.removeRepetition(7, rep); 507 } 508 509 510 511 /** 512 * Returns all repetitions of Occurrence span code / dates (36) (UB2-8). 513 */ 514 public CM_OSP[] getOccurrenceSpanCodeDates() { 515 CM_OSP[] retVal = this.getTypedField(8, new CM_OSP[0]); 516 return retVal; 517 } 518 519 520 /** 521 * Returns all repetitions of Occurrence span code / dates (36) (UB2-8). 522 */ 523 public CM_OSP[] getUb28_OccurrenceSpanCodeDates() { 524 CM_OSP[] retVal = this.getTypedField(8, new CM_OSP[0]); 525 return retVal; 526 } 527 528 529 /** 530 * Returns a count of the current number of repetitions of Occurrence span code / dates (36) (UB2-8). 531 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 532 * it will return zero. 533 */ 534 public int getOccurrenceSpanCodeDatesReps() { 535 return this.getReps(8); 536 } 537 538 539 /** 540 * Returns a specific repetition of 541 * UB2-8: "Occurrence span code / dates (36)" - creates it if necessary 542 * 543 * @param rep The repetition index (0-indexed) 544 */ 545 public CM_OSP getOccurrenceSpanCodeDates(int rep) { 546 CM_OSP retVal = this.getTypedField(8, rep); 547 return retVal; 548 } 549 550 /** 551 * Returns a specific repetition of 552 * UB2-8: "Occurrence span code / dates (36)" - creates it if necessary 553 * 554 * @param rep The repetition index (0-indexed) 555 */ 556 public CM_OSP getUb28_OccurrenceSpanCodeDates(int rep) { 557 CM_OSP retVal = this.getTypedField(8, rep); 558 return retVal; 559 } 560 561 /** 562 * Returns a count of the current number of repetitions of Occurrence span code / dates (36) (UB2-8). 563 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 564 * it will return zero. 565 */ 566 public int getUb28_OccurrenceSpanCodeDatesReps() { 567 return this.getReps(8); 568 } 569 570 571 /** 572 * Inserts a repetition of 573 * UB2-8: "Occurrence span code / dates (36)" at a specific index 574 * 575 * @param rep The repetition index (0-indexed) 576 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 577 */ 578 public CM_OSP insertOccurrenceSpanCodeDates(int rep) throws HL7Exception { 579 return (CM_OSP) super.insertRepetition(8, rep); 580 } 581 582 583 /** 584 * Inserts a repetition of 585 * UB2-8: "Occurrence span code / dates (36)" at a specific index 586 * 587 * @param rep The repetition index (0-indexed) 588 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 589 */ 590 public CM_OSP insertUb28_OccurrenceSpanCodeDates(int rep) throws HL7Exception { 591 return (CM_OSP) super.insertRepetition(8, rep); 592 } 593 594 595 /** 596 * Removes a repetition of 597 * UB2-8: "Occurrence span code / dates (36)" at a specific index 598 * 599 * @param rep The repetition index (0-indexed) 600 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 601 */ 602 public CM_OSP removeOccurrenceSpanCodeDates(int rep) throws HL7Exception { 603 return (CM_OSP) super.removeRepetition(8, rep); 604 } 605 606 607 /** 608 * Removes a repetition of 609 * UB2-8: "Occurrence span code / dates (36)" at a specific index 610 * 611 * @param rep The repetition index (0-indexed) 612 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 613 */ 614 public CM_OSP removeUb28_OccurrenceSpanCodeDates(int rep) throws HL7Exception { 615 return (CM_OSP) super.removeRepetition(8, rep); 616 } 617 618 619 620 /** 621 * Returns all repetitions of UB92 locator 2 (state) (UB2-9). 622 */ 623 public ST[] getUB92Locator2State() { 624 ST[] retVal = this.getTypedField(9, new ST[0]); 625 return retVal; 626 } 627 628 629 /** 630 * Returns all repetitions of UB92 locator 2 (state) (UB2-9). 631 */ 632 public ST[] getUb29_UB92Locator2State() { 633 ST[] retVal = this.getTypedField(9, new ST[0]); 634 return retVal; 635 } 636 637 638 /** 639 * Returns a count of the current number of repetitions of UB92 locator 2 (state) (UB2-9). 640 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 641 * it will return zero. 642 */ 643 public int getUB92Locator2StateReps() { 644 return this.getReps(9); 645 } 646 647 648 /** 649 * Returns a specific repetition of 650 * UB2-9: "UB92 locator 2 (state)" - creates it if necessary 651 * 652 * @param rep The repetition index (0-indexed) 653 */ 654 public ST getUB92Locator2State(int rep) { 655 ST retVal = this.getTypedField(9, rep); 656 return retVal; 657 } 658 659 /** 660 * Returns a specific repetition of 661 * UB2-9: "UB92 locator 2 (state)" - creates it if necessary 662 * 663 * @param rep The repetition index (0-indexed) 664 */ 665 public ST getUb29_UB92Locator2State(int rep) { 666 ST retVal = this.getTypedField(9, rep); 667 return retVal; 668 } 669 670 /** 671 * Returns a count of the current number of repetitions of UB92 locator 2 (state) (UB2-9). 672 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 673 * it will return zero. 674 */ 675 public int getUb29_UB92Locator2StateReps() { 676 return this.getReps(9); 677 } 678 679 680 /** 681 * Inserts a repetition of 682 * UB2-9: "UB92 locator 2 (state)" at a specific index 683 * 684 * @param rep The repetition index (0-indexed) 685 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 686 */ 687 public ST insertUB92Locator2State(int rep) throws HL7Exception { 688 return (ST) super.insertRepetition(9, rep); 689 } 690 691 692 /** 693 * Inserts a repetition of 694 * UB2-9: "UB92 locator 2 (state)" at a specific index 695 * 696 * @param rep The repetition index (0-indexed) 697 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 698 */ 699 public ST insertUb29_UB92Locator2State(int rep) throws HL7Exception { 700 return (ST) super.insertRepetition(9, rep); 701 } 702 703 704 /** 705 * Removes a repetition of 706 * UB2-9: "UB92 locator 2 (state)" at a specific index 707 * 708 * @param rep The repetition index (0-indexed) 709 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 710 */ 711 public ST removeUB92Locator2State(int rep) throws HL7Exception { 712 return (ST) super.removeRepetition(9, rep); 713 } 714 715 716 /** 717 * Removes a repetition of 718 * UB2-9: "UB92 locator 2 (state)" at a specific index 719 * 720 * @param rep The repetition index (0-indexed) 721 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 722 */ 723 public ST removeUb29_UB92Locator2State(int rep) throws HL7Exception { 724 return (ST) super.removeRepetition(9, rep); 725 } 726 727 728 729 /** 730 * Returns all repetitions of UB92 locator 11 (state) (UB2-10). 731 */ 732 public ST[] getUB92Locator11State() { 733 ST[] retVal = this.getTypedField(10, new ST[0]); 734 return retVal; 735 } 736 737 738 /** 739 * Returns all repetitions of UB92 locator 11 (state) (UB2-10). 740 */ 741 public ST[] getUb210_UB92Locator11State() { 742 ST[] retVal = this.getTypedField(10, new ST[0]); 743 return retVal; 744 } 745 746 747 /** 748 * Returns a count of the current number of repetitions of UB92 locator 11 (state) (UB2-10). 749 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 750 * it will return zero. 751 */ 752 public int getUB92Locator11StateReps() { 753 return this.getReps(10); 754 } 755 756 757 /** 758 * Returns a specific repetition of 759 * UB2-10: "UB92 locator 11 (state)" - creates it if necessary 760 * 761 * @param rep The repetition index (0-indexed) 762 */ 763 public ST getUB92Locator11State(int rep) { 764 ST retVal = this.getTypedField(10, rep); 765 return retVal; 766 } 767 768 /** 769 * Returns a specific repetition of 770 * UB2-10: "UB92 locator 11 (state)" - creates it if necessary 771 * 772 * @param rep The repetition index (0-indexed) 773 */ 774 public ST getUb210_UB92Locator11State(int rep) { 775 ST retVal = this.getTypedField(10, rep); 776 return retVal; 777 } 778 779 /** 780 * Returns a count of the current number of repetitions of UB92 locator 11 (state) (UB2-10). 781 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 782 * it will return zero. 783 */ 784 public int getUb210_UB92Locator11StateReps() { 785 return this.getReps(10); 786 } 787 788 789 /** 790 * Inserts a repetition of 791 * UB2-10: "UB92 locator 11 (state)" at a specific index 792 * 793 * @param rep The repetition index (0-indexed) 794 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 795 */ 796 public ST insertUB92Locator11State(int rep) throws HL7Exception { 797 return (ST) super.insertRepetition(10, rep); 798 } 799 800 801 /** 802 * Inserts a repetition of 803 * UB2-10: "UB92 locator 11 (state)" at a specific index 804 * 805 * @param rep The repetition index (0-indexed) 806 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 807 */ 808 public ST insertUb210_UB92Locator11State(int rep) throws HL7Exception { 809 return (ST) super.insertRepetition(10, rep); 810 } 811 812 813 /** 814 * Removes a repetition of 815 * UB2-10: "UB92 locator 11 (state)" at a specific index 816 * 817 * @param rep The repetition index (0-indexed) 818 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 819 */ 820 public ST removeUB92Locator11State(int rep) throws HL7Exception { 821 return (ST) super.removeRepetition(10, rep); 822 } 823 824 825 /** 826 * Removes a repetition of 827 * UB2-10: "UB92 locator 11 (state)" at a specific index 828 * 829 * @param rep The repetition index (0-indexed) 830 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 831 */ 832 public ST removeUb210_UB92Locator11State(int rep) throws HL7Exception { 833 return (ST) super.removeRepetition(10, rep); 834 } 835 836 837 838 839 /** 840 * Returns 841 * UB2-11: "UB92 locator 31 (national)" - creates it if necessary 842 */ 843 public ST getUB92Locator31National() { 844 ST retVal = this.getTypedField(11, 0); 845 return retVal; 846 } 847 848 /** 849 * Returns 850 * UB2-11: "UB92 locator 31 (national)" - creates it if necessary 851 */ 852 public ST getUb211_UB92Locator31National() { 853 ST retVal = this.getTypedField(11, 0); 854 return retVal; 855 } 856 857 858 /** 859 * Returns all repetitions of Document control number (37) (UB2-12). 860 */ 861 public ST[] getDocumentControlNumber() { 862 ST[] retVal = this.getTypedField(12, new ST[0]); 863 return retVal; 864 } 865 866 867 /** 868 * Returns all repetitions of Document control number (37) (UB2-12). 869 */ 870 public ST[] getUb212_DocumentControlNumber() { 871 ST[] retVal = this.getTypedField(12, new ST[0]); 872 return retVal; 873 } 874 875 876 /** 877 * Returns a count of the current number of repetitions of Document control number (37) (UB2-12). 878 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 879 * it will return zero. 880 */ 881 public int getDocumentControlNumberReps() { 882 return this.getReps(12); 883 } 884 885 886 /** 887 * Returns a specific repetition of 888 * UB2-12: "Document control number (37)" - creates it if necessary 889 * 890 * @param rep The repetition index (0-indexed) 891 */ 892 public ST getDocumentControlNumber(int rep) { 893 ST retVal = this.getTypedField(12, rep); 894 return retVal; 895 } 896 897 /** 898 * Returns a specific repetition of 899 * UB2-12: "Document control number (37)" - creates it if necessary 900 * 901 * @param rep The repetition index (0-indexed) 902 */ 903 public ST getUb212_DocumentControlNumber(int rep) { 904 ST retVal = this.getTypedField(12, rep); 905 return retVal; 906 } 907 908 /** 909 * Returns a count of the current number of repetitions of Document control number (37) (UB2-12). 910 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 911 * it will return zero. 912 */ 913 public int getUb212_DocumentControlNumberReps() { 914 return this.getReps(12); 915 } 916 917 918 /** 919 * Inserts a repetition of 920 * UB2-12: "Document control number (37)" at a specific index 921 * 922 * @param rep The repetition index (0-indexed) 923 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 924 */ 925 public ST insertDocumentControlNumber(int rep) throws HL7Exception { 926 return (ST) super.insertRepetition(12, rep); 927 } 928 929 930 /** 931 * Inserts a repetition of 932 * UB2-12: "Document control number (37)" at a specific index 933 * 934 * @param rep The repetition index (0-indexed) 935 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 936 */ 937 public ST insertUb212_DocumentControlNumber(int rep) throws HL7Exception { 938 return (ST) super.insertRepetition(12, rep); 939 } 940 941 942 /** 943 * Removes a repetition of 944 * UB2-12: "Document control number (37)" at a specific index 945 * 946 * @param rep The repetition index (0-indexed) 947 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 948 */ 949 public ST removeDocumentControlNumber(int rep) throws HL7Exception { 950 return (ST) super.removeRepetition(12, rep); 951 } 952 953 954 /** 955 * Removes a repetition of 956 * UB2-12: "Document control number (37)" at a specific index 957 * 958 * @param rep The repetition index (0-indexed) 959 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 960 */ 961 public ST removeUb212_DocumentControlNumber(int rep) throws HL7Exception { 962 return (ST) super.removeRepetition(12, rep); 963 } 964 965 966 967 /** 968 * Returns all repetitions of UB92 locator 49 (national) (UB2-13). 969 */ 970 public ST[] getUB92Locator49National() { 971 ST[] retVal = this.getTypedField(13, new ST[0]); 972 return retVal; 973 } 974 975 976 /** 977 * Returns all repetitions of UB92 locator 49 (national) (UB2-13). 978 */ 979 public ST[] getUb213_UB92Locator49National() { 980 ST[] retVal = this.getTypedField(13, new ST[0]); 981 return retVal; 982 } 983 984 985 /** 986 * Returns a count of the current number of repetitions of UB92 locator 49 (national) (UB2-13). 987 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 988 * it will return zero. 989 */ 990 public int getUB92Locator49NationalReps() { 991 return this.getReps(13); 992 } 993 994 995 /** 996 * Returns a specific repetition of 997 * UB2-13: "UB92 locator 49 (national)" - creates it if necessary 998 * 999 * @param rep The repetition index (0-indexed) 1000 */ 1001 public ST getUB92Locator49National(int rep) { 1002 ST retVal = this.getTypedField(13, rep); 1003 return retVal; 1004 } 1005 1006 /** 1007 * Returns a specific repetition of 1008 * UB2-13: "UB92 locator 49 (national)" - creates it if necessary 1009 * 1010 * @param rep The repetition index (0-indexed) 1011 */ 1012 public ST getUb213_UB92Locator49National(int rep) { 1013 ST retVal = this.getTypedField(13, rep); 1014 return retVal; 1015 } 1016 1017 /** 1018 * Returns a count of the current number of repetitions of UB92 locator 49 (national) (UB2-13). 1019 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1020 * it will return zero. 1021 */ 1022 public int getUb213_UB92Locator49NationalReps() { 1023 return this.getReps(13); 1024 } 1025 1026 1027 /** 1028 * Inserts a repetition of 1029 * UB2-13: "UB92 locator 49 (national)" at a specific index 1030 * 1031 * @param rep The repetition index (0-indexed) 1032 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1033 */ 1034 public ST insertUB92Locator49National(int rep) throws HL7Exception { 1035 return (ST) super.insertRepetition(13, rep); 1036 } 1037 1038 1039 /** 1040 * Inserts a repetition of 1041 * UB2-13: "UB92 locator 49 (national)" at a specific index 1042 * 1043 * @param rep The repetition index (0-indexed) 1044 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1045 */ 1046 public ST insertUb213_UB92Locator49National(int rep) throws HL7Exception { 1047 return (ST) super.insertRepetition(13, rep); 1048 } 1049 1050 1051 /** 1052 * Removes a repetition of 1053 * UB2-13: "UB92 locator 49 (national)" at a specific index 1054 * 1055 * @param rep The repetition index (0-indexed) 1056 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1057 */ 1058 public ST removeUB92Locator49National(int rep) throws HL7Exception { 1059 return (ST) super.removeRepetition(13, rep); 1060 } 1061 1062 1063 /** 1064 * Removes a repetition of 1065 * UB2-13: "UB92 locator 49 (national)" at a specific index 1066 * 1067 * @param rep The repetition index (0-indexed) 1068 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1069 */ 1070 public ST removeUb213_UB92Locator49National(int rep) throws HL7Exception { 1071 return (ST) super.removeRepetition(13, rep); 1072 } 1073 1074 1075 1076 /** 1077 * Returns all repetitions of UB92 locator 56 (state) (UB2-14). 1078 */ 1079 public ST[] getUB92Locator56State() { 1080 ST[] retVal = this.getTypedField(14, new ST[0]); 1081 return retVal; 1082 } 1083 1084 1085 /** 1086 * Returns all repetitions of UB92 locator 56 (state) (UB2-14). 1087 */ 1088 public ST[] getUb214_UB92Locator56State() { 1089 ST[] retVal = this.getTypedField(14, new ST[0]); 1090 return retVal; 1091 } 1092 1093 1094 /** 1095 * Returns a count of the current number of repetitions of UB92 locator 56 (state) (UB2-14). 1096 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1097 * it will return zero. 1098 */ 1099 public int getUB92Locator56StateReps() { 1100 return this.getReps(14); 1101 } 1102 1103 1104 /** 1105 * Returns a specific repetition of 1106 * UB2-14: "UB92 locator 56 (state)" - creates it if necessary 1107 * 1108 * @param rep The repetition index (0-indexed) 1109 */ 1110 public ST getUB92Locator56State(int rep) { 1111 ST retVal = this.getTypedField(14, rep); 1112 return retVal; 1113 } 1114 1115 /** 1116 * Returns a specific repetition of 1117 * UB2-14: "UB92 locator 56 (state)" - creates it if necessary 1118 * 1119 * @param rep The repetition index (0-indexed) 1120 */ 1121 public ST getUb214_UB92Locator56State(int rep) { 1122 ST retVal = this.getTypedField(14, rep); 1123 return retVal; 1124 } 1125 1126 /** 1127 * Returns a count of the current number of repetitions of UB92 locator 56 (state) (UB2-14). 1128 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1129 * it will return zero. 1130 */ 1131 public int getUb214_UB92Locator56StateReps() { 1132 return this.getReps(14); 1133 } 1134 1135 1136 /** 1137 * Inserts a repetition of 1138 * UB2-14: "UB92 locator 56 (state)" at a specific index 1139 * 1140 * @param rep The repetition index (0-indexed) 1141 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1142 */ 1143 public ST insertUB92Locator56State(int rep) throws HL7Exception { 1144 return (ST) super.insertRepetition(14, rep); 1145 } 1146 1147 1148 /** 1149 * Inserts a repetition of 1150 * UB2-14: "UB92 locator 56 (state)" at a specific index 1151 * 1152 * @param rep The repetition index (0-indexed) 1153 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1154 */ 1155 public ST insertUb214_UB92Locator56State(int rep) throws HL7Exception { 1156 return (ST) super.insertRepetition(14, rep); 1157 } 1158 1159 1160 /** 1161 * Removes a repetition of 1162 * UB2-14: "UB92 locator 56 (state)" at a specific index 1163 * 1164 * @param rep The repetition index (0-indexed) 1165 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1166 */ 1167 public ST removeUB92Locator56State(int rep) throws HL7Exception { 1168 return (ST) super.removeRepetition(14, rep); 1169 } 1170 1171 1172 /** 1173 * Removes a repetition of 1174 * UB2-14: "UB92 locator 56 (state)" at a specific index 1175 * 1176 * @param rep The repetition index (0-indexed) 1177 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1178 */ 1179 public ST removeUb214_UB92Locator56State(int rep) throws HL7Exception { 1180 return (ST) super.removeRepetition(14, rep); 1181 } 1182 1183 1184 1185 1186 /** 1187 * Returns 1188 * UB2-15: "UB92 locator 57 (national)" - creates it if necessary 1189 */ 1190 public ST getUB92Locator57National() { 1191 ST retVal = this.getTypedField(15, 0); 1192 return retVal; 1193 } 1194 1195 /** 1196 * Returns 1197 * UB2-15: "UB92 locator 57 (national)" - creates it if necessary 1198 */ 1199 public ST getUb215_UB92Locator57National() { 1200 ST retVal = this.getTypedField(15, 0); 1201 return retVal; 1202 } 1203 1204 1205 /** 1206 * Returns all repetitions of UB92 Locator 78 (state) (UB2-16). 1207 */ 1208 public ST[] getUB92Locator78State() { 1209 ST[] retVal = this.getTypedField(16, new ST[0]); 1210 return retVal; 1211 } 1212 1213 1214 /** 1215 * Returns all repetitions of UB92 Locator 78 (state) (UB2-16). 1216 */ 1217 public ST[] getUb216_UB92Locator78State() { 1218 ST[] retVal = this.getTypedField(16, new ST[0]); 1219 return retVal; 1220 } 1221 1222 1223 /** 1224 * Returns a count of the current number of repetitions of UB92 Locator 78 (state) (UB2-16). 1225 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1226 * it will return zero. 1227 */ 1228 public int getUB92Locator78StateReps() { 1229 return this.getReps(16); 1230 } 1231 1232 1233 /** 1234 * Returns a specific repetition of 1235 * UB2-16: "UB92 Locator 78 (state)" - creates it if necessary 1236 * 1237 * @param rep The repetition index (0-indexed) 1238 */ 1239 public ST getUB92Locator78State(int rep) { 1240 ST retVal = this.getTypedField(16, rep); 1241 return retVal; 1242 } 1243 1244 /** 1245 * Returns a specific repetition of 1246 * UB2-16: "UB92 Locator 78 (state)" - creates it if necessary 1247 * 1248 * @param rep The repetition index (0-indexed) 1249 */ 1250 public ST getUb216_UB92Locator78State(int rep) { 1251 ST retVal = this.getTypedField(16, rep); 1252 return retVal; 1253 } 1254 1255 /** 1256 * Returns a count of the current number of repetitions of UB92 Locator 78 (state) (UB2-16). 1257 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1258 * it will return zero. 1259 */ 1260 public int getUb216_UB92Locator78StateReps() { 1261 return this.getReps(16); 1262 } 1263 1264 1265 /** 1266 * Inserts a repetition of 1267 * UB2-16: "UB92 Locator 78 (state)" at a specific index 1268 * 1269 * @param rep The repetition index (0-indexed) 1270 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1271 */ 1272 public ST insertUB92Locator78State(int rep) throws HL7Exception { 1273 return (ST) super.insertRepetition(16, rep); 1274 } 1275 1276 1277 /** 1278 * Inserts a repetition of 1279 * UB2-16: "UB92 Locator 78 (state)" at a specific index 1280 * 1281 * @param rep The repetition index (0-indexed) 1282 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1283 */ 1284 public ST insertUb216_UB92Locator78State(int rep) throws HL7Exception { 1285 return (ST) super.insertRepetition(16, rep); 1286 } 1287 1288 1289 /** 1290 * Removes a repetition of 1291 * UB2-16: "UB92 Locator 78 (state)" at a specific index 1292 * 1293 * @param rep The repetition index (0-indexed) 1294 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1295 */ 1296 public ST removeUB92Locator78State(int rep) throws HL7Exception { 1297 return (ST) super.removeRepetition(16, rep); 1298 } 1299 1300 1301 /** 1302 * Removes a repetition of 1303 * UB2-16: "UB92 Locator 78 (state)" at a specific index 1304 * 1305 * @param rep The repetition index (0-indexed) 1306 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1307 */ 1308 public ST removeUb216_UB92Locator78State(int rep) throws HL7Exception { 1309 return (ST) super.removeRepetition(16, rep); 1310 } 1311 1312 1313 1314 1315 1316 1317 /** {@inheritDoc} */ 1318 protected Type createNewTypeWithoutReflection(int field) { 1319 switch (field) { 1320 case 0: return new SI(getMessage()); 1321 case 1: return new ST(getMessage()); 1322 case 2: return new ID(getMessage(), new Integer( 43 )); 1323 case 3: return new ST(getMessage()); 1324 case 4: return new ST(getMessage()); 1325 case 5: return new CM_UVC(getMessage()); 1326 case 6: return new CM_OCD(getMessage()); 1327 case 7: return new CM_OSP(getMessage()); 1328 case 8: return new ST(getMessage()); 1329 case 9: return new ST(getMessage()); 1330 case 10: return new ST(getMessage()); 1331 case 11: return new ST(getMessage()); 1332 case 12: return new ST(getMessage()); 1333 case 13: return new ST(getMessage()); 1334 case 14: return new ST(getMessage()); 1335 case 15: return new ST(getMessage()); 1336 default: return null; 1337 } 1338 } 1339 1340 1341} 1342