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