001/* 002 * This class is an auto-generated source file for a HAPI 003 * HL7 v2.x standard structure class. 004 * 005 * For more information, visit: http://hl7api.sourceforge.net/ 006 * 007 * The contents of this file are subject to the Mozilla Public License Version 1.1 008 * (the "License"); you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 010 * Software distributed under the License is distributed on an "AS IS" basis, 011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 012 * specific language governing rights and limitations under the License. 013 * 014 * The Original Code is "[file_name]". Description: 015 * "[one_line_description]" 016 * 017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 018 * 2012. All Rights Reserved. 019 * 020 * Contributor(s): ______________________________________. 021 * 022 * Alternatively, the contents of this file may be used under the terms of the 023 * GNU General Public License (the "GPL"), in which case the provisions of the GPL are 024 * applicable instead of those above. If you wish to allow use of your version of this 025 * file only under the terms of the GPL and not to allow others to use your version 026 * of this file under the MPL, indicate your decision by deleting the provisions above 027 * and replace them with the notice and other provisions required by the GPL License. 028 * If you do not delete the provisions above, a recipient may use your version of 029 * this file under either the MPL or the GPL. 030 * 031 */ 032 033 034package ca.uhn.hl7v2.model.v251.group; 035 036import ca.uhn.hl7v2.model.v251.segment.*; 037 038import java.util.List; 039 040import ca.uhn.hl7v2.HL7Exception; 041import ca.uhn.hl7v2.parser.ModelClassFactory; 042import ca.uhn.hl7v2.model.*; 043 044/** 045 * <p>Represents a RDE_O11_ORDER group structure (a Group object). 046 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together. 047 * This Group contains the following elements: 048 * </p> 049 * <ul> 050 * <li>1: ORC (Common Order) <b> </b></li> 051 * <li>2: RDE_O11_TIMING (a Group object) <b>optional repeating</b></li> 052 * <li>3: RDE_O11_ORDER_DETAIL (a Group object) <b>optional </b></li> 053 * <li>4: RXE (Pharmacy/Treatment Encoded Order) <b> </b></li> 054 * <li>5: NTE (Notes and Comments) <b>optional repeating</b></li> 055 * <li>6: RDE_O11_TIMING_ENCODED (a Group object) <b> repeating</b></li> 056 * <li>7: RXR (Pharmacy/Treatment Route) <b> repeating</b></li> 057 * <li>8: RXC (Pharmacy/Treatment Component Order) <b>optional repeating</b></li> 058 * <li>9: RDE_O11_OBSERVATION (a Group object) <b>optional repeating</b></li> 059 * <li>10: FT1 (Financial Transaction) <b>optional repeating</b></li> 060 * <li>11: BLG (Billing) <b>optional </b></li> 061 * <li>12: CTI (Clinical Trial Identification) <b>optional repeating</b></li> 062 * </ul> 063 */ 064@SuppressWarnings("unused") 065public class RDE_O11_ORDER extends AbstractGroup { 066 067 /** 068 * Creates a new RDE_O11_ORDER group 069 */ 070 public RDE_O11_ORDER(Group parent, ModelClassFactory factory) { 071 super(parent, factory); 072 init(factory); 073 } 074 075 private void init(ModelClassFactory factory) { 076 try { 077 this.add(ORC.class, true, false); 078 this.add(RDE_O11_TIMING.class, false, true); 079 this.add(RDE_O11_ORDER_DETAIL.class, false, false); 080 this.add(RXE.class, true, false); 081 this.add(NTE.class, false, true); 082 this.add(RDE_O11_TIMING_ENCODED.class, true, true); 083 this.add(RXR.class, true, true); 084 this.add(RXC.class, false, true); 085 this.add(RDE_O11_OBSERVATION.class, false, true); 086 this.add(FT1.class, false, true); 087 this.add(BLG.class, false, false); 088 this.add(CTI.class, false, true); 089 } catch(HL7Exception e) { 090 log.error("Unexpected error creating RDE_O11_ORDER - this is probably a bug in the source code generator.", e); 091 } 092 } 093 094 /** 095 * Returns "2.5.1" 096 */ 097 public String getVersion() { 098 return "2.5.1"; 099 } 100 101 102 103 /** 104 * Returns 105 * ORC (Common Order) - creates it if necessary 106 */ 107 public ORC getORC() { 108 ORC retVal = getTyped("ORC", ORC.class); 109 return retVal; 110 } 111 112 113 114 115 /** 116 * Returns 117 * the first repetition of 118 * TIMING (a Group object) - creates it if necessary 119 */ 120 public RDE_O11_TIMING getTIMING() { 121 RDE_O11_TIMING retVal = getTyped("TIMING", RDE_O11_TIMING.class); 122 return retVal; 123 } 124 125 126 /** 127 * Returns a specific repetition of 128 * TIMING (a Group object) - creates it if necessary 129 * 130 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 131 * @throws HL7Exception if the repetition requested is more than one 132 * greater than the number of existing repetitions. 133 */ 134 public RDE_O11_TIMING getTIMING(int rep) { 135 RDE_O11_TIMING retVal = getTyped("TIMING", rep, RDE_O11_TIMING.class); 136 return retVal; 137 } 138 139 /** 140 * Returns the number of existing repetitions of TIMING 141 */ 142 public int getTIMINGReps() { 143 return getReps("TIMING"); 144 } 145 146 /** 147 * <p> 148 * Returns a non-modifiable List containing all current existing repetitions of TIMING. 149 * <p> 150 * <p> 151 * Note that unlike {@link #getTIMING()}, this method will not create any reps 152 * if none are already present, so an empty list may be returned. 153 * </p> 154 */ 155 public List<RDE_O11_TIMING> getTIMINGAll() throws HL7Exception { 156 return getAllAsList("TIMING", RDE_O11_TIMING.class); 157 } 158 159 /** 160 * Inserts a specific repetition of TIMING (a Group object) 161 * @see AbstractGroup#insertRepetition(Structure, int) 162 */ 163 public void insertTIMING(RDE_O11_TIMING structure, int rep) throws HL7Exception { 164 super.insertRepetition("TIMING", structure, rep); 165 } 166 167 168 /** 169 * Inserts a specific repetition of TIMING (a Group object) 170 * @see AbstractGroup#insertRepetition(Structure, int) 171 */ 172 public RDE_O11_TIMING insertTIMING(int rep) throws HL7Exception { 173 return (RDE_O11_TIMING)super.insertRepetition("TIMING", rep); 174 } 175 176 177 /** 178 * Removes a specific repetition of TIMING (a Group object) 179 * @see AbstractGroup#removeRepetition(String, int) 180 */ 181 public RDE_O11_TIMING removeTIMING(int rep) throws HL7Exception { 182 return (RDE_O11_TIMING)super.removeRepetition("TIMING", rep); 183 } 184 185 186 187 /** 188 * Returns 189 * ORDER_DETAIL (a Group object) - creates it if necessary 190 */ 191 public RDE_O11_ORDER_DETAIL getORDER_DETAIL() { 192 RDE_O11_ORDER_DETAIL retVal = getTyped("ORDER_DETAIL", RDE_O11_ORDER_DETAIL.class); 193 return retVal; 194 } 195 196 197 198 199 /** 200 * Returns 201 * RXE (Pharmacy/Treatment Encoded Order) - creates it if necessary 202 */ 203 public RXE getRXE() { 204 RXE retVal = getTyped("RXE", RXE.class); 205 return retVal; 206 } 207 208 209 210 211 /** 212 * Returns 213 * the first repetition of 214 * NTE (Notes and Comments) - creates it if necessary 215 */ 216 public NTE getNTE() { 217 NTE retVal = getTyped("NTE", NTE.class); 218 return retVal; 219 } 220 221 222 /** 223 * Returns a specific repetition of 224 * NTE (Notes and Comments) - creates it if necessary 225 * 226 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 227 * @throws HL7Exception if the repetition requested is more than one 228 * greater than the number of existing repetitions. 229 */ 230 public NTE getNTE(int rep) { 231 NTE retVal = getTyped("NTE", rep, NTE.class); 232 return retVal; 233 } 234 235 /** 236 * Returns the number of existing repetitions of NTE 237 */ 238 public int getNTEReps() { 239 return getReps("NTE"); 240 } 241 242 /** 243 * <p> 244 * Returns a non-modifiable List containing all current existing repetitions of NTE. 245 * <p> 246 * <p> 247 * Note that unlike {@link #getNTE()}, this method will not create any reps 248 * if none are already present, so an empty list may be returned. 249 * </p> 250 */ 251 public List<NTE> getNTEAll() throws HL7Exception { 252 return getAllAsList("NTE", NTE.class); 253 } 254 255 /** 256 * Inserts a specific repetition of NTE (Notes and Comments) 257 * @see AbstractGroup#insertRepetition(Structure, int) 258 */ 259 public void insertNTE(NTE structure, int rep) throws HL7Exception { 260 super.insertRepetition("NTE", structure, rep); 261 } 262 263 264 /** 265 * Inserts a specific repetition of NTE (Notes and Comments) 266 * @see AbstractGroup#insertRepetition(Structure, int) 267 */ 268 public NTE insertNTE(int rep) throws HL7Exception { 269 return (NTE)super.insertRepetition("NTE", rep); 270 } 271 272 273 /** 274 * Removes a specific repetition of NTE (Notes and Comments) 275 * @see AbstractGroup#removeRepetition(String, int) 276 */ 277 public NTE removeNTE(int rep) throws HL7Exception { 278 return (NTE)super.removeRepetition("NTE", rep); 279 } 280 281 282 283 /** 284 * Returns 285 * the first repetition of 286 * TIMING_ENCODED (a Group object) - creates it if necessary 287 */ 288 public RDE_O11_TIMING_ENCODED getTIMING_ENCODED() { 289 RDE_O11_TIMING_ENCODED retVal = getTyped("TIMING_ENCODED", RDE_O11_TIMING_ENCODED.class); 290 return retVal; 291 } 292 293 294 /** 295 * Returns a specific repetition of 296 * TIMING_ENCODED (a Group object) - creates it if necessary 297 * 298 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 299 * @throws HL7Exception if the repetition requested is more than one 300 * greater than the number of existing repetitions. 301 */ 302 public RDE_O11_TIMING_ENCODED getTIMING_ENCODED(int rep) { 303 RDE_O11_TIMING_ENCODED retVal = getTyped("TIMING_ENCODED", rep, RDE_O11_TIMING_ENCODED.class); 304 return retVal; 305 } 306 307 /** 308 * Returns the number of existing repetitions of TIMING_ENCODED 309 */ 310 public int getTIMING_ENCODEDReps() { 311 return getReps("TIMING_ENCODED"); 312 } 313 314 /** 315 * <p> 316 * Returns a non-modifiable List containing all current existing repetitions of TIMING_ENCODED. 317 * <p> 318 * <p> 319 * Note that unlike {@link #getTIMING_ENCODED()}, this method will not create any reps 320 * if none are already present, so an empty list may be returned. 321 * </p> 322 */ 323 public List<RDE_O11_TIMING_ENCODED> getTIMING_ENCODEDAll() throws HL7Exception { 324 return getAllAsList("TIMING_ENCODED", RDE_O11_TIMING_ENCODED.class); 325 } 326 327 /** 328 * Inserts a specific repetition of TIMING_ENCODED (a Group object) 329 * @see AbstractGroup#insertRepetition(Structure, int) 330 */ 331 public void insertTIMING_ENCODED(RDE_O11_TIMING_ENCODED structure, int rep) throws HL7Exception { 332 super.insertRepetition("TIMING_ENCODED", structure, rep); 333 } 334 335 336 /** 337 * Inserts a specific repetition of TIMING_ENCODED (a Group object) 338 * @see AbstractGroup#insertRepetition(Structure, int) 339 */ 340 public RDE_O11_TIMING_ENCODED insertTIMING_ENCODED(int rep) throws HL7Exception { 341 return (RDE_O11_TIMING_ENCODED)super.insertRepetition("TIMING_ENCODED", rep); 342 } 343 344 345 /** 346 * Removes a specific repetition of TIMING_ENCODED (a Group object) 347 * @see AbstractGroup#removeRepetition(String, int) 348 */ 349 public RDE_O11_TIMING_ENCODED removeTIMING_ENCODED(int rep) throws HL7Exception { 350 return (RDE_O11_TIMING_ENCODED)super.removeRepetition("TIMING_ENCODED", rep); 351 } 352 353 354 355 /** 356 * Returns 357 * the first repetition of 358 * RXR (Pharmacy/Treatment Route) - creates it if necessary 359 */ 360 public RXR getRXR() { 361 RXR retVal = getTyped("RXR", RXR.class); 362 return retVal; 363 } 364 365 366 /** 367 * Returns a specific repetition of 368 * RXR (Pharmacy/Treatment Route) - creates it if necessary 369 * 370 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 371 * @throws HL7Exception if the repetition requested is more than one 372 * greater than the number of existing repetitions. 373 */ 374 public RXR getRXR(int rep) { 375 RXR retVal = getTyped("RXR", rep, RXR.class); 376 return retVal; 377 } 378 379 /** 380 * Returns the number of existing repetitions of RXR 381 */ 382 public int getRXRReps() { 383 return getReps("RXR"); 384 } 385 386 /** 387 * <p> 388 * Returns a non-modifiable List containing all current existing repetitions of RXR. 389 * <p> 390 * <p> 391 * Note that unlike {@link #getRXR()}, this method will not create any reps 392 * if none are already present, so an empty list may be returned. 393 * </p> 394 */ 395 public List<RXR> getRXRAll() throws HL7Exception { 396 return getAllAsList("RXR", RXR.class); 397 } 398 399 /** 400 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route) 401 * @see AbstractGroup#insertRepetition(Structure, int) 402 */ 403 public void insertRXR(RXR structure, int rep) throws HL7Exception { 404 super.insertRepetition("RXR", structure, rep); 405 } 406 407 408 /** 409 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route) 410 * @see AbstractGroup#insertRepetition(Structure, int) 411 */ 412 public RXR insertRXR(int rep) throws HL7Exception { 413 return (RXR)super.insertRepetition("RXR", rep); 414 } 415 416 417 /** 418 * Removes a specific repetition of RXR (Pharmacy/Treatment Route) 419 * @see AbstractGroup#removeRepetition(String, int) 420 */ 421 public RXR removeRXR(int rep) throws HL7Exception { 422 return (RXR)super.removeRepetition("RXR", rep); 423 } 424 425 426 427 /** 428 * Returns 429 * the first repetition of 430 * RXC (Pharmacy/Treatment Component Order) - creates it if necessary 431 */ 432 public RXC getRXC() { 433 RXC retVal = getTyped("RXC", RXC.class); 434 return retVal; 435 } 436 437 438 /** 439 * Returns a specific repetition of 440 * RXC (Pharmacy/Treatment Component Order) - creates it if necessary 441 * 442 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 443 * @throws HL7Exception if the repetition requested is more than one 444 * greater than the number of existing repetitions. 445 */ 446 public RXC getRXC(int rep) { 447 RXC retVal = getTyped("RXC", rep, RXC.class); 448 return retVal; 449 } 450 451 /** 452 * Returns the number of existing repetitions of RXC 453 */ 454 public int getRXCReps() { 455 return getReps("RXC"); 456 } 457 458 /** 459 * <p> 460 * Returns a non-modifiable List containing all current existing repetitions of RXC. 461 * <p> 462 * <p> 463 * Note that unlike {@link #getRXC()}, this method will not create any reps 464 * if none are already present, so an empty list may be returned. 465 * </p> 466 */ 467 public List<RXC> getRXCAll() throws HL7Exception { 468 return getAllAsList("RXC", RXC.class); 469 } 470 471 /** 472 * Inserts a specific repetition of RXC (Pharmacy/Treatment Component Order) 473 * @see AbstractGroup#insertRepetition(Structure, int) 474 */ 475 public void insertRXC(RXC structure, int rep) throws HL7Exception { 476 super.insertRepetition("RXC", structure, rep); 477 } 478 479 480 /** 481 * Inserts a specific repetition of RXC (Pharmacy/Treatment Component Order) 482 * @see AbstractGroup#insertRepetition(Structure, int) 483 */ 484 public RXC insertRXC(int rep) throws HL7Exception { 485 return (RXC)super.insertRepetition("RXC", rep); 486 } 487 488 489 /** 490 * Removes a specific repetition of RXC (Pharmacy/Treatment Component Order) 491 * @see AbstractGroup#removeRepetition(String, int) 492 */ 493 public RXC removeRXC(int rep) throws HL7Exception { 494 return (RXC)super.removeRepetition("RXC", rep); 495 } 496 497 498 499 /** 500 * Returns 501 * the first repetition of 502 * OBSERVATION (a Group object) - creates it if necessary 503 */ 504 public RDE_O11_OBSERVATION getOBSERVATION() { 505 RDE_O11_OBSERVATION retVal = getTyped("OBSERVATION", RDE_O11_OBSERVATION.class); 506 return retVal; 507 } 508 509 510 /** 511 * Returns a specific repetition of 512 * OBSERVATION (a Group object) - creates it if necessary 513 * 514 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 515 * @throws HL7Exception if the repetition requested is more than one 516 * greater than the number of existing repetitions. 517 */ 518 public RDE_O11_OBSERVATION getOBSERVATION(int rep) { 519 RDE_O11_OBSERVATION retVal = getTyped("OBSERVATION", rep, RDE_O11_OBSERVATION.class); 520 return retVal; 521 } 522 523 /** 524 * Returns the number of existing repetitions of OBSERVATION 525 */ 526 public int getOBSERVATIONReps() { 527 return getReps("OBSERVATION"); 528 } 529 530 /** 531 * <p> 532 * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION. 533 * <p> 534 * <p> 535 * Note that unlike {@link #getOBSERVATION()}, this method will not create any reps 536 * if none are already present, so an empty list may be returned. 537 * </p> 538 */ 539 public List<RDE_O11_OBSERVATION> getOBSERVATIONAll() throws HL7Exception { 540 return getAllAsList("OBSERVATION", RDE_O11_OBSERVATION.class); 541 } 542 543 /** 544 * Inserts a specific repetition of OBSERVATION (a Group object) 545 * @see AbstractGroup#insertRepetition(Structure, int) 546 */ 547 public void insertOBSERVATION(RDE_O11_OBSERVATION structure, int rep) throws HL7Exception { 548 super.insertRepetition("OBSERVATION", structure, rep); 549 } 550 551 552 /** 553 * Inserts a specific repetition of OBSERVATION (a Group object) 554 * @see AbstractGroup#insertRepetition(Structure, int) 555 */ 556 public RDE_O11_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception { 557 return (RDE_O11_OBSERVATION)super.insertRepetition("OBSERVATION", rep); 558 } 559 560 561 /** 562 * Removes a specific repetition of OBSERVATION (a Group object) 563 * @see AbstractGroup#removeRepetition(String, int) 564 */ 565 public RDE_O11_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception { 566 return (RDE_O11_OBSERVATION)super.removeRepetition("OBSERVATION", rep); 567 } 568 569 570 571 /** 572 * Returns 573 * the first repetition of 574 * FT1 (Financial Transaction) - creates it if necessary 575 */ 576 public FT1 getFT1() { 577 FT1 retVal = getTyped("FT1", FT1.class); 578 return retVal; 579 } 580 581 582 /** 583 * Returns a specific repetition of 584 * FT1 (Financial Transaction) - creates it if necessary 585 * 586 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 587 * @throws HL7Exception if the repetition requested is more than one 588 * greater than the number of existing repetitions. 589 */ 590 public FT1 getFT1(int rep) { 591 FT1 retVal = getTyped("FT1", rep, FT1.class); 592 return retVal; 593 } 594 595 /** 596 * Returns the number of existing repetitions of FT1 597 */ 598 public int getFT1Reps() { 599 return getReps("FT1"); 600 } 601 602 /** 603 * <p> 604 * Returns a non-modifiable List containing all current existing repetitions of FT1. 605 * <p> 606 * <p> 607 * Note that unlike {@link #getFT1()}, this method will not create any reps 608 * if none are already present, so an empty list may be returned. 609 * </p> 610 */ 611 public List<FT1> getFT1All() throws HL7Exception { 612 return getAllAsList("FT1", FT1.class); 613 } 614 615 /** 616 * Inserts a specific repetition of FT1 (Financial Transaction) 617 * @see AbstractGroup#insertRepetition(Structure, int) 618 */ 619 public void insertFT1(FT1 structure, int rep) throws HL7Exception { 620 super.insertRepetition("FT1", structure, rep); 621 } 622 623 624 /** 625 * Inserts a specific repetition of FT1 (Financial Transaction) 626 * @see AbstractGroup#insertRepetition(Structure, int) 627 */ 628 public FT1 insertFT1(int rep) throws HL7Exception { 629 return (FT1)super.insertRepetition("FT1", rep); 630 } 631 632 633 /** 634 * Removes a specific repetition of FT1 (Financial Transaction) 635 * @see AbstractGroup#removeRepetition(String, int) 636 */ 637 public FT1 removeFT1(int rep) throws HL7Exception { 638 return (FT1)super.removeRepetition("FT1", rep); 639 } 640 641 642 643 /** 644 * Returns 645 * BLG (Billing) - creates it if necessary 646 */ 647 public BLG getBLG() { 648 BLG retVal = getTyped("BLG", BLG.class); 649 return retVal; 650 } 651 652 653 654 655 /** 656 * Returns 657 * the first repetition of 658 * CTI (Clinical Trial Identification) - creates it if necessary 659 */ 660 public CTI getCTI() { 661 CTI retVal = getTyped("CTI", CTI.class); 662 return retVal; 663 } 664 665 666 /** 667 * Returns a specific repetition of 668 * CTI (Clinical Trial Identification) - creates it if necessary 669 * 670 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 671 * @throws HL7Exception if the repetition requested is more than one 672 * greater than the number of existing repetitions. 673 */ 674 public CTI getCTI(int rep) { 675 CTI retVal = getTyped("CTI", rep, CTI.class); 676 return retVal; 677 } 678 679 /** 680 * Returns the number of existing repetitions of CTI 681 */ 682 public int getCTIReps() { 683 return getReps("CTI"); 684 } 685 686 /** 687 * <p> 688 * Returns a non-modifiable List containing all current existing repetitions of CTI. 689 * <p> 690 * <p> 691 * Note that unlike {@link #getCTI()}, this method will not create any reps 692 * if none are already present, so an empty list may be returned. 693 * </p> 694 */ 695 public List<CTI> getCTIAll() throws HL7Exception { 696 return getAllAsList("CTI", CTI.class); 697 } 698 699 /** 700 * Inserts a specific repetition of CTI (Clinical Trial Identification) 701 * @see AbstractGroup#insertRepetition(Structure, int) 702 */ 703 public void insertCTI(CTI structure, int rep) throws HL7Exception { 704 super.insertRepetition("CTI", structure, rep); 705 } 706 707 708 /** 709 * Inserts a specific repetition of CTI (Clinical Trial Identification) 710 * @see AbstractGroup#insertRepetition(Structure, int) 711 */ 712 public CTI insertCTI(int rep) throws HL7Exception { 713 return (CTI)super.insertRepetition("CTI", rep); 714 } 715 716 717 /** 718 * Removes a specific repetition of CTI (Clinical Trial Identification) 719 * @see AbstractGroup#removeRepetition(String, int) 720 */ 721 public CTI removeCTI(int rep) throws HL7Exception { 722 return (CTI)super.removeRepetition("CTI", rep); 723 } 724 725 726 727} 728