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.v24.message; 035 036import ca.uhn.hl7v2.model.v24.group.*; 037import ca.uhn.hl7v2.model.v24.segment.*; 038 039import java.util.List; 040 041import ca.uhn.hl7v2.HL7Exception; 042import ca.uhn.hl7v2.parser.ModelClassFactory; 043import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 044import ca.uhn.hl7v2.model.AbstractMessage; 045 046/** 047 * <p>Represents a DFT_P11 message structure (see chapter 6.4.3). This structure contains the 048 * following elements: </p> 049 * <ul> 050 * <li>1: MSH (Message Header) <b> </b></li> 051 * <li>2: EVN (Event Type) <b> </b></li> 052 * <li>3: PID (Patient identification) <b> </b></li> 053 * <li>4: PD1 (patient additional demographic) <b>optional </b></li> 054 * <li>5: ROL (Role) <b>optional repeating</b></li> 055 * <li>6: PV1 (Patient visit) <b>optional </b></li> 056 * <li>7: PV2 (Patient visit - additional information) <b>optional </b></li> 057 * <li>8: ROL (Role) <b>optional repeating</b></li> 058 * <li>9: DB1 (Disability) <b>optional repeating</b></li> 059 * <li>10: DFT_P11_COMMON_ORDER (a Group object) <b>optional repeating</b></li> 060 * <li>11: DG1 (Diagnosis) <b>optional repeating</b></li> 061 * <li>12: DRG (Diagnosis Related Group) <b>optional </b></li> 062 * <li>13: GT1 (Guarantor) <b>optional repeating</b></li> 063 * <li>14: DFT_P11_INSURANCE (a Group object) <b>optional repeating</b></li> 064 * <li>15: ACC (Accident) <b>optional </b></li> 065 * <li>16: DFT_P11_FINANCIAL (a Group object) <b> repeating</b></li> 066 * </ul> 067 */ 068@SuppressWarnings("unused") 069public class DFT_P11 extends AbstractMessage { 070 071 /** 072 * Creates a new DFT_P11 message with DefaultModelClassFactory. 073 */ 074 public DFT_P11() { 075 this(new DefaultModelClassFactory()); 076 } 077 078 /** 079 * Creates a new DFT_P11 message with custom ModelClassFactory. 080 */ 081 public DFT_P11(ModelClassFactory factory) { 082 super(factory); 083 init(factory); 084 } 085 086 private void init(ModelClassFactory factory) { 087 try { 088 this.add(MSH.class, true, false); 089 this.add(EVN.class, true, false); 090 this.add(PID.class, true, false); 091 this.add(PD1.class, false, false); 092 this.add(ROL.class, false, true); 093 this.add(PV1.class, false, false); 094 this.add(PV2.class, false, false); 095 this.add(ROL.class, false, true); 096 this.add(DB1.class, false, true); 097 this.add(DFT_P11_COMMON_ORDER.class, false, true); 098 this.add(DG1.class, false, true); 099 this.add(DRG.class, false, false); 100 this.add(GT1.class, false, true); 101 this.add(DFT_P11_INSURANCE.class, false, true); 102 this.add(ACC.class, false, false); 103 this.add(DFT_P11_FINANCIAL.class, true, true); 104 } catch(HL7Exception e) { 105 log.error("Unexpected error creating DFT_P11 - this is probably a bug in the source code generator.", e); 106 } 107 } 108 109 /** 110 * Returns "2.4" 111 */ 112 public String getVersion() { 113 return "2.4"; 114 } 115 116 117 118 /** 119 * Returns 120 * MSH (Message Header) - creates it if necessary 121 */ 122 public MSH getMSH() { 123 return getTyped("MSH", MSH.class); 124 } 125 126 127 128 129 /** 130 * Returns 131 * EVN (Event Type) - creates it if necessary 132 */ 133 public EVN getEVN() { 134 return getTyped("EVN", EVN.class); 135 } 136 137 138 139 140 /** 141 * Returns 142 * PID (Patient identification) - creates it if necessary 143 */ 144 public PID getPID() { 145 return getTyped("PID", PID.class); 146 } 147 148 149 150 151 /** 152 * Returns 153 * PD1 (patient additional demographic) - creates it if necessary 154 */ 155 public PD1 getPD1() { 156 return getTyped("PD1", PD1.class); 157 } 158 159 160 161 162 /** 163 * Returns 164 * the first repetition of 165 * ROL (Role) - creates it if necessary 166 */ 167 public ROL getROL() { 168 return getTyped("ROL", ROL.class); 169 } 170 171 172 /** 173 * Returns a specific repetition of 174 * ROL (Role) - creates it if necessary 175 * 176 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 177 * @throws HL7Exception if the repetition requested is more than one 178 * greater than the number of existing repetitions. 179 */ 180 public ROL getROL(int rep) { 181 return getTyped("ROL", rep, ROL.class); 182 } 183 184 /** 185 * Returns the number of existing repetitions of ROL 186 */ 187 public int getROLReps() { 188 return getReps("ROL"); 189 } 190 191 /** 192 * <p> 193 * Returns a non-modifiable List containing all current existing repetitions of ROL. 194 * <p> 195 * <p> 196 * Note that unlike {@link #getROL()}, this method will not create any reps 197 * if none are already present, so an empty list may be returned. 198 * </p> 199 */ 200 public List<ROL> getROLAll() throws HL7Exception { 201 return getAllAsList("ROL", ROL.class); 202 } 203 204 /** 205 * Inserts a specific repetition of ROL (Role) 206 * @see AbstractGroup#insertRepetition(Structure, int) 207 */ 208 public void insertROL(ROL structure, int rep) throws HL7Exception { 209 super.insertRepetition( "ROL", structure, rep); 210 } 211 212 213 /** 214 * Inserts a specific repetition of ROL (Role) 215 * @see AbstractGroup#insertRepetition(Structure, int) 216 */ 217 public ROL insertROL(int rep) throws HL7Exception { 218 return (ROL)super.insertRepetition("ROL", rep); 219 } 220 221 222 /** 223 * Removes a specific repetition of ROL (Role) 224 * @see AbstractGroup#removeRepetition(String, int) 225 */ 226 public ROL removeROL(int rep) throws HL7Exception { 227 return (ROL)super.removeRepetition("ROL", rep); 228 } 229 230 231 232 /** 233 * Returns 234 * PV1 (Patient visit) - creates it if necessary 235 */ 236 public PV1 getPV1() { 237 return getTyped("PV1", PV1.class); 238 } 239 240 241 242 243 /** 244 * Returns 245 * PV2 (Patient visit - additional information) - creates it if necessary 246 */ 247 public PV2 getPV2() { 248 return getTyped("PV2", PV2.class); 249 } 250 251 252 253 254 /** 255 * Returns 256 * the first repetition of 257 * ROL2 (Role) - creates it if necessary 258 */ 259 public ROL getROL2() { 260 return getTyped("ROL2", ROL.class); 261 } 262 263 264 /** 265 * Returns a specific repetition of 266 * ROL2 (Role) - creates it if necessary 267 * 268 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 269 * @throws HL7Exception if the repetition requested is more than one 270 * greater than the number of existing repetitions. 271 */ 272 public ROL getROL2(int rep) { 273 return getTyped("ROL2", rep, ROL.class); 274 } 275 276 /** 277 * Returns the number of existing repetitions of ROL2 278 */ 279 public int getROL2Reps() { 280 return getReps("ROL2"); 281 } 282 283 /** 284 * <p> 285 * Returns a non-modifiable List containing all current existing repetitions of ROL2. 286 * <p> 287 * <p> 288 * Note that unlike {@link #getROL2()}, this method will not create any reps 289 * if none are already present, so an empty list may be returned. 290 * </p> 291 */ 292 public List<ROL> getROL2All() throws HL7Exception { 293 return getAllAsList("ROL2", ROL.class); 294 } 295 296 /** 297 * Inserts a specific repetition of ROL2 (Role) 298 * @see AbstractGroup#insertRepetition(Structure, int) 299 */ 300 public void insertROL2(ROL structure, int rep) throws HL7Exception { 301 super.insertRepetition( "ROL2", structure, rep); 302 } 303 304 305 /** 306 * Inserts a specific repetition of ROL2 (Role) 307 * @see AbstractGroup#insertRepetition(Structure, int) 308 */ 309 public ROL insertROL2(int rep) throws HL7Exception { 310 return (ROL)super.insertRepetition("ROL2", rep); 311 } 312 313 314 /** 315 * Removes a specific repetition of ROL2 (Role) 316 * @see AbstractGroup#removeRepetition(String, int) 317 */ 318 public ROL removeROL2(int rep) throws HL7Exception { 319 return (ROL)super.removeRepetition("ROL2", rep); 320 } 321 322 323 324 /** 325 * Returns 326 * the first repetition of 327 * DB1 (Disability) - creates it if necessary 328 */ 329 public DB1 getDB1() { 330 return getTyped("DB1", DB1.class); 331 } 332 333 334 /** 335 * Returns a specific repetition of 336 * DB1 (Disability) - creates it if necessary 337 * 338 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 339 * @throws HL7Exception if the repetition requested is more than one 340 * greater than the number of existing repetitions. 341 */ 342 public DB1 getDB1(int rep) { 343 return getTyped("DB1", rep, DB1.class); 344 } 345 346 /** 347 * Returns the number of existing repetitions of DB1 348 */ 349 public int getDB1Reps() { 350 return getReps("DB1"); 351 } 352 353 /** 354 * <p> 355 * Returns a non-modifiable List containing all current existing repetitions of DB1. 356 * <p> 357 * <p> 358 * Note that unlike {@link #getDB1()}, this method will not create any reps 359 * if none are already present, so an empty list may be returned. 360 * </p> 361 */ 362 public List<DB1> getDB1All() throws HL7Exception { 363 return getAllAsList("DB1", DB1.class); 364 } 365 366 /** 367 * Inserts a specific repetition of DB1 (Disability) 368 * @see AbstractGroup#insertRepetition(Structure, int) 369 */ 370 public void insertDB1(DB1 structure, int rep) throws HL7Exception { 371 super.insertRepetition( "DB1", structure, rep); 372 } 373 374 375 /** 376 * Inserts a specific repetition of DB1 (Disability) 377 * @see AbstractGroup#insertRepetition(Structure, int) 378 */ 379 public DB1 insertDB1(int rep) throws HL7Exception { 380 return (DB1)super.insertRepetition("DB1", rep); 381 } 382 383 384 /** 385 * Removes a specific repetition of DB1 (Disability) 386 * @see AbstractGroup#removeRepetition(String, int) 387 */ 388 public DB1 removeDB1(int rep) throws HL7Exception { 389 return (DB1)super.removeRepetition("DB1", rep); 390 } 391 392 393 394 /** 395 * Returns 396 * the first repetition of 397 * COMMON_ORDER (a Group object) - creates it if necessary 398 */ 399 public DFT_P11_COMMON_ORDER getCOMMON_ORDER() { 400 return getTyped("COMMON_ORDER", DFT_P11_COMMON_ORDER.class); 401 } 402 403 404 /** 405 * Returns a specific repetition of 406 * COMMON_ORDER (a Group object) - creates it if necessary 407 * 408 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 409 * @throws HL7Exception if the repetition requested is more than one 410 * greater than the number of existing repetitions. 411 */ 412 public DFT_P11_COMMON_ORDER getCOMMON_ORDER(int rep) { 413 return getTyped("COMMON_ORDER", rep, DFT_P11_COMMON_ORDER.class); 414 } 415 416 /** 417 * Returns the number of existing repetitions of COMMON_ORDER 418 */ 419 public int getCOMMON_ORDERReps() { 420 return getReps("COMMON_ORDER"); 421 } 422 423 /** 424 * <p> 425 * Returns a non-modifiable List containing all current existing repetitions of COMMON_ORDER. 426 * <p> 427 * <p> 428 * Note that unlike {@link #getCOMMON_ORDER()}, this method will not create any reps 429 * if none are already present, so an empty list may be returned. 430 * </p> 431 */ 432 public List<DFT_P11_COMMON_ORDER> getCOMMON_ORDERAll() throws HL7Exception { 433 return getAllAsList("COMMON_ORDER", DFT_P11_COMMON_ORDER.class); 434 } 435 436 /** 437 * Inserts a specific repetition of COMMON_ORDER (a Group object) 438 * @see AbstractGroup#insertRepetition(Structure, int) 439 */ 440 public void insertCOMMON_ORDER(DFT_P11_COMMON_ORDER structure, int rep) throws HL7Exception { 441 super.insertRepetition( "COMMON_ORDER", structure, rep); 442 } 443 444 445 /** 446 * Inserts a specific repetition of COMMON_ORDER (a Group object) 447 * @see AbstractGroup#insertRepetition(Structure, int) 448 */ 449 public DFT_P11_COMMON_ORDER insertCOMMON_ORDER(int rep) throws HL7Exception { 450 return (DFT_P11_COMMON_ORDER)super.insertRepetition("COMMON_ORDER", rep); 451 } 452 453 454 /** 455 * Removes a specific repetition of COMMON_ORDER (a Group object) 456 * @see AbstractGroup#removeRepetition(String, int) 457 */ 458 public DFT_P11_COMMON_ORDER removeCOMMON_ORDER(int rep) throws HL7Exception { 459 return (DFT_P11_COMMON_ORDER)super.removeRepetition("COMMON_ORDER", rep); 460 } 461 462 463 464 /** 465 * Returns 466 * the first repetition of 467 * DG1 (Diagnosis) - creates it if necessary 468 */ 469 public DG1 getDG1() { 470 return getTyped("DG1", DG1.class); 471 } 472 473 474 /** 475 * Returns a specific repetition of 476 * DG1 (Diagnosis) - creates it if necessary 477 * 478 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 479 * @throws HL7Exception if the repetition requested is more than one 480 * greater than the number of existing repetitions. 481 */ 482 public DG1 getDG1(int rep) { 483 return getTyped("DG1", rep, DG1.class); 484 } 485 486 /** 487 * Returns the number of existing repetitions of DG1 488 */ 489 public int getDG1Reps() { 490 return getReps("DG1"); 491 } 492 493 /** 494 * <p> 495 * Returns a non-modifiable List containing all current existing repetitions of DG1. 496 * <p> 497 * <p> 498 * Note that unlike {@link #getDG1()}, this method will not create any reps 499 * if none are already present, so an empty list may be returned. 500 * </p> 501 */ 502 public List<DG1> getDG1All() throws HL7Exception { 503 return getAllAsList("DG1", DG1.class); 504 } 505 506 /** 507 * Inserts a specific repetition of DG1 (Diagnosis) 508 * @see AbstractGroup#insertRepetition(Structure, int) 509 */ 510 public void insertDG1(DG1 structure, int rep) throws HL7Exception { 511 super.insertRepetition( "DG1", structure, rep); 512 } 513 514 515 /** 516 * Inserts a specific repetition of DG1 (Diagnosis) 517 * @see AbstractGroup#insertRepetition(Structure, int) 518 */ 519 public DG1 insertDG1(int rep) throws HL7Exception { 520 return (DG1)super.insertRepetition("DG1", rep); 521 } 522 523 524 /** 525 * Removes a specific repetition of DG1 (Diagnosis) 526 * @see AbstractGroup#removeRepetition(String, int) 527 */ 528 public DG1 removeDG1(int rep) throws HL7Exception { 529 return (DG1)super.removeRepetition("DG1", rep); 530 } 531 532 533 534 /** 535 * Returns 536 * DRG (Diagnosis Related Group) - creates it if necessary 537 */ 538 public DRG getDRG() { 539 return getTyped("DRG", DRG.class); 540 } 541 542 543 544 545 /** 546 * Returns 547 * the first repetition of 548 * GT1 (Guarantor) - creates it if necessary 549 */ 550 public GT1 getGT1() { 551 return getTyped("GT1", GT1.class); 552 } 553 554 555 /** 556 * Returns a specific repetition of 557 * GT1 (Guarantor) - creates it if necessary 558 * 559 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 560 * @throws HL7Exception if the repetition requested is more than one 561 * greater than the number of existing repetitions. 562 */ 563 public GT1 getGT1(int rep) { 564 return getTyped("GT1", rep, GT1.class); 565 } 566 567 /** 568 * Returns the number of existing repetitions of GT1 569 */ 570 public int getGT1Reps() { 571 return getReps("GT1"); 572 } 573 574 /** 575 * <p> 576 * Returns a non-modifiable List containing all current existing repetitions of GT1. 577 * <p> 578 * <p> 579 * Note that unlike {@link #getGT1()}, this method will not create any reps 580 * if none are already present, so an empty list may be returned. 581 * </p> 582 */ 583 public List<GT1> getGT1All() throws HL7Exception { 584 return getAllAsList("GT1", GT1.class); 585 } 586 587 /** 588 * Inserts a specific repetition of GT1 (Guarantor) 589 * @see AbstractGroup#insertRepetition(Structure, int) 590 */ 591 public void insertGT1(GT1 structure, int rep) throws HL7Exception { 592 super.insertRepetition( "GT1", structure, rep); 593 } 594 595 596 /** 597 * Inserts a specific repetition of GT1 (Guarantor) 598 * @see AbstractGroup#insertRepetition(Structure, int) 599 */ 600 public GT1 insertGT1(int rep) throws HL7Exception { 601 return (GT1)super.insertRepetition("GT1", rep); 602 } 603 604 605 /** 606 * Removes a specific repetition of GT1 (Guarantor) 607 * @see AbstractGroup#removeRepetition(String, int) 608 */ 609 public GT1 removeGT1(int rep) throws HL7Exception { 610 return (GT1)super.removeRepetition("GT1", rep); 611 } 612 613 614 615 /** 616 * Returns 617 * the first repetition of 618 * INSURANCE (a Group object) - creates it if necessary 619 */ 620 public DFT_P11_INSURANCE getINSURANCE() { 621 return getTyped("INSURANCE", DFT_P11_INSURANCE.class); 622 } 623 624 625 /** 626 * Returns a specific repetition of 627 * INSURANCE (a Group object) - creates it if necessary 628 * 629 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 630 * @throws HL7Exception if the repetition requested is more than one 631 * greater than the number of existing repetitions. 632 */ 633 public DFT_P11_INSURANCE getINSURANCE(int rep) { 634 return getTyped("INSURANCE", rep, DFT_P11_INSURANCE.class); 635 } 636 637 /** 638 * Returns the number of existing repetitions of INSURANCE 639 */ 640 public int getINSURANCEReps() { 641 return getReps("INSURANCE"); 642 } 643 644 /** 645 * <p> 646 * Returns a non-modifiable List containing all current existing repetitions of INSURANCE. 647 * <p> 648 * <p> 649 * Note that unlike {@link #getINSURANCE()}, this method will not create any reps 650 * if none are already present, so an empty list may be returned. 651 * </p> 652 */ 653 public List<DFT_P11_INSURANCE> getINSURANCEAll() throws HL7Exception { 654 return getAllAsList("INSURANCE", DFT_P11_INSURANCE.class); 655 } 656 657 /** 658 * Inserts a specific repetition of INSURANCE (a Group object) 659 * @see AbstractGroup#insertRepetition(Structure, int) 660 */ 661 public void insertINSURANCE(DFT_P11_INSURANCE structure, int rep) throws HL7Exception { 662 super.insertRepetition( "INSURANCE", structure, rep); 663 } 664 665 666 /** 667 * Inserts a specific repetition of INSURANCE (a Group object) 668 * @see AbstractGroup#insertRepetition(Structure, int) 669 */ 670 public DFT_P11_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 671 return (DFT_P11_INSURANCE)super.insertRepetition("INSURANCE", rep); 672 } 673 674 675 /** 676 * Removes a specific repetition of INSURANCE (a Group object) 677 * @see AbstractGroup#removeRepetition(String, int) 678 */ 679 public DFT_P11_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 680 return (DFT_P11_INSURANCE)super.removeRepetition("INSURANCE", rep); 681 } 682 683 684 685 /** 686 * Returns 687 * ACC (Accident) - creates it if necessary 688 */ 689 public ACC getACC() { 690 return getTyped("ACC", ACC.class); 691 } 692 693 694 695 696 /** 697 * Returns 698 * the first repetition of 699 * FINANCIAL (a Group object) - creates it if necessary 700 */ 701 public DFT_P11_FINANCIAL getFINANCIAL() { 702 return getTyped("FINANCIAL", DFT_P11_FINANCIAL.class); 703 } 704 705 706 /** 707 * Returns a specific repetition of 708 * FINANCIAL (a Group object) - creates it if necessary 709 * 710 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 711 * @throws HL7Exception if the repetition requested is more than one 712 * greater than the number of existing repetitions. 713 */ 714 public DFT_P11_FINANCIAL getFINANCIAL(int rep) { 715 return getTyped("FINANCIAL", rep, DFT_P11_FINANCIAL.class); 716 } 717 718 /** 719 * Returns the number of existing repetitions of FINANCIAL 720 */ 721 public int getFINANCIALReps() { 722 return getReps("FINANCIAL"); 723 } 724 725 /** 726 * <p> 727 * Returns a non-modifiable List containing all current existing repetitions of FINANCIAL. 728 * <p> 729 * <p> 730 * Note that unlike {@link #getFINANCIAL()}, this method will not create any reps 731 * if none are already present, so an empty list may be returned. 732 * </p> 733 */ 734 public List<DFT_P11_FINANCIAL> getFINANCIALAll() throws HL7Exception { 735 return getAllAsList("FINANCIAL", DFT_P11_FINANCIAL.class); 736 } 737 738 /** 739 * Inserts a specific repetition of FINANCIAL (a Group object) 740 * @see AbstractGroup#insertRepetition(Structure, int) 741 */ 742 public void insertFINANCIAL(DFT_P11_FINANCIAL structure, int rep) throws HL7Exception { 743 super.insertRepetition( "FINANCIAL", structure, rep); 744 } 745 746 747 /** 748 * Inserts a specific repetition of FINANCIAL (a Group object) 749 * @see AbstractGroup#insertRepetition(Structure, int) 750 */ 751 public DFT_P11_FINANCIAL insertFINANCIAL(int rep) throws HL7Exception { 752 return (DFT_P11_FINANCIAL)super.insertRepetition("FINANCIAL", rep); 753 } 754 755 756 /** 757 * Removes a specific repetition of FINANCIAL (a Group object) 758 * @see AbstractGroup#removeRepetition(String, int) 759 */ 760 public DFT_P11_FINANCIAL removeFINANCIAL(int rep) throws HL7Exception { 761 return (DFT_P11_FINANCIAL)super.removeRepetition("FINANCIAL", rep); 762 } 763 764 765 766} 767