1 /* 2 * This class is an auto-generated source file for a HAPI 3 * HL7 v2.x standard structure class. 4 * 5 * For more information, visit: http://hl7api.sourceforge.net/ 6 * 7 * The contents of this file are subject to the Mozilla Public License Version 1.1 8 * (the "License"); you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 10 * Software distributed under the License is distributed on an "AS IS" basis, 11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 12 * specific language governing rights and limitations under the License. 13 * 14 * The Original Code is "[file_name]". Description: 15 * "[one_line_description]" 16 * 17 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 18 * 2012. All Rights Reserved. 19 * 20 * Contributor(s): ______________________________________. 21 * 22 * Alternatively, the contents of this file may be used under the terms of the 23 * GNU General Public License (the "GPL"), in which case the provisions of the GPL are 24 * applicable instead of those above. If you wish to allow use of your version of this 25 * file only under the terms of the GPL and not to allow others to use your version 26 * of this file under the MPL, indicate your decision by deleting the provisions above 27 * and replace them with the notice and other provisions required by the GPL License. 28 * If you do not delete the provisions above, a recipient may use your version of 29 * this file under either the MPL or the GPL. 30 * 31 */ 32 33 34 package ca.uhn.hl7v2.model.v28.group; 35 36 import ca.uhn.hl7v2.model.v28.segment.*; 37 38 import ca.uhn.hl7v2.HL7Exception; 39 import ca.uhn.hl7v2.parser.ModelClassFactory; 40 import ca.uhn.hl7v2.model.*; 41 42 /** 43 * <p>Represents a OMP_O09_ORDER group structure (a Group object). 44 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together. 45 * This Group contains the following elements: 46 * </p> 47 * <ul> 48 * <li>1: ORC (Common Order) <b> </b></li> 49 * <li>2: OMP_O09_TIMING (a Group object) <b>optional repeating </b></li> 50 * <li>3: RXO (Pharmacy/Treatment Order) <b> </b></li> 51 * <li>4: PRT (Participation Information) <b>optional repeating </b></li> 52 * <li>5: NTE (Notes and Comments) <b>optional repeating </b></li> 53 * <li>6: RXR (Pharmacy/Treatment Route) <b> repeating </b></li> 54 * <li>7: OMP_O09_COMPONENT (a Group object) <b>optional repeating </b></li> 55 * <li>8: CDO (Cumulative Dosage) <b>optional repeating </b></li> 56 * <li>9: OMP_O09_OBSERVATION (a Group object) <b>optional repeating </b></li> 57 * <li>10: FT1 (Financial Transaction) <b>optional repeating </b></li> 58 * <li>11: BLG (Billing) <b>optional </b></li> 59 * </ul> 60 */ 61 //@SuppressWarnings("unused") 62 public class OMP_O09_ORDER extends AbstractGroup { 63 64 /** 65 * Creates a new OMP_O09_ORDER group 66 */ 67 public OMP_O09_ORDER(Group parent, ModelClassFactory factory) { 68 super(parent, factory); 69 init(factory); 70 } 71 72 private void init(ModelClassFactory factory) { 73 try { 74 this.add(ORC.class, true, false, false); 75 this.add(OMP_O09_TIMING.class, false, true, false); 76 this.add(RXO.class, true, false, false); 77 this.add(PRT.class, false, true, false); 78 this.add(NTE.class, false, true, false); 79 this.add(RXR.class, true, true, false); 80 this.add(OMP_O09_COMPONENT.class, false, true, false); 81 this.add(CDO.class, false, true, false); 82 this.add(OMP_O09_OBSERVATION.class, false, true, false); 83 this.add(FT1.class, false, true, false); 84 this.add(BLG.class, false, false, false); 85 } catch(HL7Exception e) { 86 log.error("Unexpected error creating OMP_O09_ORDER - this is probably a bug in the source code generator.", e); 87 } 88 } 89 90 /** 91 * Returns "2.8" 92 */ 93 public String getVersion() { 94 return "2.8"; 95 } 96 97 98 99 /** 100 * Returns 101 * ORC (Common Order) - creates it if necessary 102 */ 103 public ORC getORC() { 104 ORC retVal = getTyped("ORC", ORC.class); 105 return retVal; 106 } 107 108 109 110 111 /** 112 * Returns 113 * the first repetition of 114 * TIMING (a Group object) - creates it if necessary 115 */ 116 public OMP_O09_TIMING getTIMING() { 117 OMP_O09_TIMING retVal = getTyped("TIMING", OMP_O09_TIMING.class); 118 return retVal; 119 } 120 121 122 /** 123 * Returns a specific repetition of 124 * TIMING (a Group object) - creates it if necessary 125 * 126 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 127 * @throws HL7Exception if the repetition requested is more than one 128 * greater than the number of existing repetitions. 129 */ 130 public OMP_O09_TIMING getTIMING(int rep) { 131 OMP_O09_TIMING retVal = getTyped("TIMING", rep, OMP_O09_TIMING.class); 132 return retVal; 133 } 134 135 /** 136 * Returns the number of existing repetitions of TIMING 137 */ 138 public int getTIMINGReps() { 139 return getReps("TIMING"); 140 } 141 142 /** 143 * <p> 144 * Returns a non-modifiable List containing all current existing repetitions of TIMING. 145 * <p> 146 * <p> 147 * Note that unlike {@link #getTIMING()}, this method will not create any reps 148 * if none are already present, so an empty list may be returned. 149 * </p> 150 */ 151 public java.util.List<OMP_O09_TIMING> getTIMINGAll() throws HL7Exception { 152 return getAllAsList("TIMING", OMP_O09_TIMING.class); 153 } 154 155 /** 156 * Inserts a specific repetition of TIMING (a Group object) 157 * @see AbstractGroup#insertRepetition(Structure, int) 158 */ 159 public void insertTIMING(OMP_O09_TIMING structure, int rep) throws HL7Exception { 160 super.insertRepetition("TIMING", structure, rep); 161 } 162 163 164 /** 165 * Inserts a specific repetition of TIMING (a Group object) 166 * @see AbstractGroup#insertRepetition(Structure, int) 167 */ 168 public OMP_O09_TIMING insertTIMING(int rep) throws HL7Exception { 169 return (OMP_O09_TIMING)super.insertRepetition("TIMING", rep); 170 } 171 172 173 /** 174 * Removes a specific repetition of TIMING (a Group object) 175 * @see AbstractGroup#removeRepetition(String, int) 176 */ 177 public OMP_O09_TIMING removeTIMING(int rep) throws HL7Exception { 178 return (OMP_O09_TIMING)super.removeRepetition("TIMING", rep); 179 } 180 181 182 183 /** 184 * Returns 185 * RXO (Pharmacy/Treatment Order) - creates it if necessary 186 */ 187 public RXO getRXO() { 188 RXO retVal = getTyped("RXO", RXO.class); 189 return retVal; 190 } 191 192 193 194 195 /** 196 * Returns 197 * the first repetition of 198 * PRT (Participation Information) - creates it if necessary 199 */ 200 public PRT getPRT() { 201 PRT retVal = getTyped("PRT", PRT.class); 202 return retVal; 203 } 204 205 206 /** 207 * Returns a specific repetition of 208 * PRT (Participation Information) - creates it if necessary 209 * 210 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 211 * @throws HL7Exception if the repetition requested is more than one 212 * greater than the number of existing repetitions. 213 */ 214 public PRT getPRT(int rep) { 215 PRT retVal = getTyped("PRT", rep, PRT.class); 216 return retVal; 217 } 218 219 /** 220 * Returns the number of existing repetitions of PRT 221 */ 222 public int getPRTReps() { 223 return getReps("PRT"); 224 } 225 226 /** 227 * <p> 228 * Returns a non-modifiable List containing all current existing repetitions of PRT. 229 * <p> 230 * <p> 231 * Note that unlike {@link #getPRT()}, this method will not create any reps 232 * if none are already present, so an empty list may be returned. 233 * </p> 234 */ 235 public java.util.List<PRT> getPRTAll() throws HL7Exception { 236 return getAllAsList("PRT", PRT.class); 237 } 238 239 /** 240 * Inserts a specific repetition of PRT (Participation Information) 241 * @see AbstractGroup#insertRepetition(Structure, int) 242 */ 243 public void insertPRT(PRT structure, int rep) throws HL7Exception { 244 super.insertRepetition("PRT", structure, rep); 245 } 246 247 248 /** 249 * Inserts a specific repetition of PRT (Participation Information) 250 * @see AbstractGroup#insertRepetition(Structure, int) 251 */ 252 public PRT insertPRT(int rep) throws HL7Exception { 253 return (PRT)super.insertRepetition("PRT", rep); 254 } 255 256 257 /** 258 * Removes a specific repetition of PRT (Participation Information) 259 * @see AbstractGroup#removeRepetition(String, int) 260 */ 261 public PRT removePRT(int rep) throws HL7Exception { 262 return (PRT)super.removeRepetition("PRT", rep); 263 } 264 265 266 267 /** 268 * Returns 269 * the first repetition of 270 * NTE (Notes and Comments) - creates it if necessary 271 */ 272 public NTE getNTE() { 273 NTE retVal = getTyped("NTE", NTE.class); 274 return retVal; 275 } 276 277 278 /** 279 * Returns a specific repetition of 280 * NTE (Notes and Comments) - creates it if necessary 281 * 282 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 283 * @throws HL7Exception if the repetition requested is more than one 284 * greater than the number of existing repetitions. 285 */ 286 public NTE getNTE(int rep) { 287 NTE retVal = getTyped("NTE", rep, NTE.class); 288 return retVal; 289 } 290 291 /** 292 * Returns the number of existing repetitions of NTE 293 */ 294 public int getNTEReps() { 295 return getReps("NTE"); 296 } 297 298 /** 299 * <p> 300 * Returns a non-modifiable List containing all current existing repetitions of NTE. 301 * <p> 302 * <p> 303 * Note that unlike {@link #getNTE()}, this method will not create any reps 304 * if none are already present, so an empty list may be returned. 305 * </p> 306 */ 307 public java.util.List<NTE> getNTEAll() throws HL7Exception { 308 return getAllAsList("NTE", NTE.class); 309 } 310 311 /** 312 * Inserts a specific repetition of NTE (Notes and Comments) 313 * @see AbstractGroup#insertRepetition(Structure, int) 314 */ 315 public void insertNTE(NTE structure, int rep) throws HL7Exception { 316 super.insertRepetition("NTE", structure, rep); 317 } 318 319 320 /** 321 * Inserts a specific repetition of NTE (Notes and Comments) 322 * @see AbstractGroup#insertRepetition(Structure, int) 323 */ 324 public NTE insertNTE(int rep) throws HL7Exception { 325 return (NTE)super.insertRepetition("NTE", rep); 326 } 327 328 329 /** 330 * Removes a specific repetition of NTE (Notes and Comments) 331 * @see AbstractGroup#removeRepetition(String, int) 332 */ 333 public NTE removeNTE(int rep) throws HL7Exception { 334 return (NTE)super.removeRepetition("NTE", rep); 335 } 336 337 338 339 /** 340 * Returns 341 * the first repetition of 342 * RXR (Pharmacy/Treatment Route) - creates it if necessary 343 */ 344 public RXR getRXR() { 345 RXR retVal = getTyped("RXR", RXR.class); 346 return retVal; 347 } 348 349 350 /** 351 * Returns a specific repetition of 352 * RXR (Pharmacy/Treatment Route) - creates it if necessary 353 * 354 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 355 * @throws HL7Exception if the repetition requested is more than one 356 * greater than the number of existing repetitions. 357 */ 358 public RXR getRXR(int rep) { 359 RXR retVal = getTyped("RXR", rep, RXR.class); 360 return retVal; 361 } 362 363 /** 364 * Returns the number of existing repetitions of RXR 365 */ 366 public int getRXRReps() { 367 return getReps("RXR"); 368 } 369 370 /** 371 * <p> 372 * Returns a non-modifiable List containing all current existing repetitions of RXR. 373 * <p> 374 * <p> 375 * Note that unlike {@link #getRXR()}, this method will not create any reps 376 * if none are already present, so an empty list may be returned. 377 * </p> 378 */ 379 public java.util.List<RXR> getRXRAll() throws HL7Exception { 380 return getAllAsList("RXR", RXR.class); 381 } 382 383 /** 384 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route) 385 * @see AbstractGroup#insertRepetition(Structure, int) 386 */ 387 public void insertRXR(RXR structure, int rep) throws HL7Exception { 388 super.insertRepetition("RXR", structure, rep); 389 } 390 391 392 /** 393 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route) 394 * @see AbstractGroup#insertRepetition(Structure, int) 395 */ 396 public RXR insertRXR(int rep) throws HL7Exception { 397 return (RXR)super.insertRepetition("RXR", rep); 398 } 399 400 401 /** 402 * Removes a specific repetition of RXR (Pharmacy/Treatment Route) 403 * @see AbstractGroup#removeRepetition(String, int) 404 */ 405 public RXR removeRXR(int rep) throws HL7Exception { 406 return (RXR)super.removeRepetition("RXR", rep); 407 } 408 409 410 411 /** 412 * Returns 413 * the first repetition of 414 * COMPONENT (a Group object) - creates it if necessary 415 */ 416 public OMP_O09_COMPONENT getCOMPONENT() { 417 OMP_O09_COMPONENT retVal = getTyped("COMPONENT", OMP_O09_COMPONENT.class); 418 return retVal; 419 } 420 421 422 /** 423 * Returns a specific repetition of 424 * COMPONENT (a Group object) - creates it if necessary 425 * 426 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 427 * @throws HL7Exception if the repetition requested is more than one 428 * greater than the number of existing repetitions. 429 */ 430 public OMP_O09_COMPONENT getCOMPONENT(int rep) { 431 OMP_O09_COMPONENT retVal = getTyped("COMPONENT", rep, OMP_O09_COMPONENT.class); 432 return retVal; 433 } 434 435 /** 436 * Returns the number of existing repetitions of COMPONENT 437 */ 438 public int getCOMPONENTReps() { 439 return getReps("COMPONENT"); 440 } 441 442 /** 443 * <p> 444 * Returns a non-modifiable List containing all current existing repetitions of COMPONENT. 445 * <p> 446 * <p> 447 * Note that unlike {@link #getCOMPONENT()}, this method will not create any reps 448 * if none are already present, so an empty list may be returned. 449 * </p> 450 */ 451 public java.util.List<OMP_O09_COMPONENT> getCOMPONENTAll() throws HL7Exception { 452 return getAllAsList("COMPONENT", OMP_O09_COMPONENT.class); 453 } 454 455 /** 456 * Inserts a specific repetition of COMPONENT (a Group object) 457 * @see AbstractGroup#insertRepetition(Structure, int) 458 */ 459 public void insertCOMPONENT(OMP_O09_COMPONENT structure, int rep) throws HL7Exception { 460 super.insertRepetition("COMPONENT", structure, rep); 461 } 462 463 464 /** 465 * Inserts a specific repetition of COMPONENT (a Group object) 466 * @see AbstractGroup#insertRepetition(Structure, int) 467 */ 468 public OMP_O09_COMPONENT insertCOMPONENT(int rep) throws HL7Exception { 469 return (OMP_O09_COMPONENT)super.insertRepetition("COMPONENT", rep); 470 } 471 472 473 /** 474 * Removes a specific repetition of COMPONENT (a Group object) 475 * @see AbstractGroup#removeRepetition(String, int) 476 */ 477 public OMP_O09_COMPONENT removeCOMPONENT(int rep) throws HL7Exception { 478 return (OMP_O09_COMPONENT)super.removeRepetition("COMPONENT", rep); 479 } 480 481 482 483 /** 484 * Returns 485 * the first repetition of 486 * CDO (Cumulative Dosage) - creates it if necessary 487 */ 488 public CDO getCDO() { 489 CDO retVal = getTyped("CDO", CDO.class); 490 return retVal; 491 } 492 493 494 /** 495 * Returns a specific repetition of 496 * CDO (Cumulative Dosage) - creates it if necessary 497 * 498 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 499 * @throws HL7Exception if the repetition requested is more than one 500 * greater than the number of existing repetitions. 501 */ 502 public CDO getCDO(int rep) { 503 CDO retVal = getTyped("CDO", rep, CDO.class); 504 return retVal; 505 } 506 507 /** 508 * Returns the number of existing repetitions of CDO 509 */ 510 public int getCDOReps() { 511 return getReps("CDO"); 512 } 513 514 /** 515 * <p> 516 * Returns a non-modifiable List containing all current existing repetitions of CDO. 517 * <p> 518 * <p> 519 * Note that unlike {@link #getCDO()}, this method will not create any reps 520 * if none are already present, so an empty list may be returned. 521 * </p> 522 */ 523 public java.util.List<CDO> getCDOAll() throws HL7Exception { 524 return getAllAsList("CDO", CDO.class); 525 } 526 527 /** 528 * Inserts a specific repetition of CDO (Cumulative Dosage) 529 * @see AbstractGroup#insertRepetition(Structure, int) 530 */ 531 public void insertCDO(CDO structure, int rep) throws HL7Exception { 532 super.insertRepetition("CDO", structure, rep); 533 } 534 535 536 /** 537 * Inserts a specific repetition of CDO (Cumulative Dosage) 538 * @see AbstractGroup#insertRepetition(Structure, int) 539 */ 540 public CDO insertCDO(int rep) throws HL7Exception { 541 return (CDO)super.insertRepetition("CDO", rep); 542 } 543 544 545 /** 546 * Removes a specific repetition of CDO (Cumulative Dosage) 547 * @see AbstractGroup#removeRepetition(String, int) 548 */ 549 public CDO removeCDO(int rep) throws HL7Exception { 550 return (CDO)super.removeRepetition("CDO", rep); 551 } 552 553 554 555 /** 556 * Returns 557 * the first repetition of 558 * OBSERVATION (a Group object) - creates it if necessary 559 */ 560 public OMP_O09_OBSERVATION getOBSERVATION() { 561 OMP_O09_OBSERVATION retVal = getTyped("OBSERVATION", OMP_O09_OBSERVATION.class); 562 return retVal; 563 } 564 565 566 /** 567 * Returns a specific repetition of 568 * OBSERVATION (a Group object) - creates it if necessary 569 * 570 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 571 * @throws HL7Exception if the repetition requested is more than one 572 * greater than the number of existing repetitions. 573 */ 574 public OMP_O09_OBSERVATION getOBSERVATION(int rep) { 575 OMP_O09_OBSERVATION retVal = getTyped("OBSERVATION", rep, OMP_O09_OBSERVATION.class); 576 return retVal; 577 } 578 579 /** 580 * Returns the number of existing repetitions of OBSERVATION 581 */ 582 public int getOBSERVATIONReps() { 583 return getReps("OBSERVATION"); 584 } 585 586 /** 587 * <p> 588 * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION. 589 * <p> 590 * <p> 591 * Note that unlike {@link #getOBSERVATION()}, this method will not create any reps 592 * if none are already present, so an empty list may be returned. 593 * </p> 594 */ 595 public java.util.List<OMP_O09_OBSERVATION> getOBSERVATIONAll() throws HL7Exception { 596 return getAllAsList("OBSERVATION", OMP_O09_OBSERVATION.class); 597 } 598 599 /** 600 * Inserts a specific repetition of OBSERVATION (a Group object) 601 * @see AbstractGroup#insertRepetition(Structure, int) 602 */ 603 public void insertOBSERVATION(OMP_O09_OBSERVATION structure, int rep) throws HL7Exception { 604 super.insertRepetition("OBSERVATION", structure, rep); 605 } 606 607 608 /** 609 * Inserts a specific repetition of OBSERVATION (a Group object) 610 * @see AbstractGroup#insertRepetition(Structure, int) 611 */ 612 public OMP_O09_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception { 613 return (OMP_O09_OBSERVATION)super.insertRepetition("OBSERVATION", rep); 614 } 615 616 617 /** 618 * Removes a specific repetition of OBSERVATION (a Group object) 619 * @see AbstractGroup#removeRepetition(String, int) 620 */ 621 public OMP_O09_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception { 622 return (OMP_O09_OBSERVATION)super.removeRepetition("OBSERVATION", rep); 623 } 624 625 626 627 /** 628 * Returns 629 * the first repetition of 630 * FT1 (Financial Transaction) - creates it if necessary 631 */ 632 public FT1 getFT1() { 633 FT1 retVal = getTyped("FT1", FT1.class); 634 return retVal; 635 } 636 637 638 /** 639 * Returns a specific repetition of 640 * FT1 (Financial Transaction) - creates it if necessary 641 * 642 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 643 * @throws HL7Exception if the repetition requested is more than one 644 * greater than the number of existing repetitions. 645 */ 646 public FT1 getFT1(int rep) { 647 FT1 retVal = getTyped("FT1", rep, FT1.class); 648 return retVal; 649 } 650 651 /** 652 * Returns the number of existing repetitions of FT1 653 */ 654 public int getFT1Reps() { 655 return getReps("FT1"); 656 } 657 658 /** 659 * <p> 660 * Returns a non-modifiable List containing all current existing repetitions of FT1. 661 * <p> 662 * <p> 663 * Note that unlike {@link #getFT1()}, this method will not create any reps 664 * if none are already present, so an empty list may be returned. 665 * </p> 666 */ 667 public java.util.List<FT1> getFT1All() throws HL7Exception { 668 return getAllAsList("FT1", FT1.class); 669 } 670 671 /** 672 * Inserts a specific repetition of FT1 (Financial Transaction) 673 * @see AbstractGroup#insertRepetition(Structure, int) 674 */ 675 public void insertFT1(FT1 structure, int rep) throws HL7Exception { 676 super.insertRepetition("FT1", structure, rep); 677 } 678 679 680 /** 681 * Inserts a specific repetition of FT1 (Financial Transaction) 682 * @see AbstractGroup#insertRepetition(Structure, int) 683 */ 684 public FT1 insertFT1(int rep) throws HL7Exception { 685 return (FT1)super.insertRepetition("FT1", rep); 686 } 687 688 689 /** 690 * Removes a specific repetition of FT1 (Financial Transaction) 691 * @see AbstractGroup#removeRepetition(String, int) 692 */ 693 public FT1 removeFT1(int rep) throws HL7Exception { 694 return (FT1)super.removeRepetition("FT1", rep); 695 } 696 697 698 699 /** 700 * Returns 701 * BLG (Billing) - creates it if necessary 702 */ 703 public BLG getBLG() { 704 BLG retVal = getTyped("BLG", BLG.class); 705 return retVal; 706 } 707 708 709 710 711 } 712