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.v24.group; 35 36 import ca.uhn.hl7v2.model.v24.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 OMG_O19_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: OBR (Observation Request) <b> </b></li> 50 * <li>3: NTE (Notes and Comments) <b>optional repeating </b></li> 51 * <li>4: CTD (Contact Data) <b>optional </b></li> 52 * <li>5: DG1 (Diagnosis) <b>optional repeating </b></li> 53 * <li>6: OMG_O19_OBSERVATION (a Group object) <b>optional repeating </b></li> 54 * <li>7: OMG_O19_PRIOR_RESULT (a Group object) <b>optional repeating </b></li> 55 * <li>8: FT1 (Financial Transaction) <b>optional repeating </b></li> 56 * <li>9: CTI (Clinical Trial Identification) <b>optional repeating </b></li> 57 * <li>10: BLG (Billing) <b>optional </b></li> 58 * </ul> 59 */ 60 //@SuppressWarnings("unused") 61 public class OMG_O19_ORDER extends AbstractGroup { 62 63 /** 64 * Creates a new OMG_O19_ORDER group 65 */ 66 public OMG_O19_ORDER(Group parent, ModelClassFactory factory) { 67 super(parent, factory); 68 init(factory); 69 } 70 71 private void init(ModelClassFactory factory) { 72 try { 73 this.add(ORC.class, true, false, false); 74 this.add(OBR.class, true, false, false); 75 this.add(NTE.class, false, true, false); 76 this.add(CTD.class, false, false, false); 77 this.add(DG1.class, false, true, false); 78 this.add(OMG_O19_OBSERVATION.class, false, true, false); 79 this.add(OMG_O19_PRIOR_RESULT.class, false, true, false); 80 this.add(FT1.class, false, true, false); 81 this.add(CTI.class, false, true, false); 82 this.add(BLG.class, false, false, false); 83 } catch(HL7Exception e) { 84 log.error("Unexpected error creating OMG_O19_ORDER - this is probably a bug in the source code generator.", e); 85 } 86 } 87 88 /** 89 * Returns "2.4" 90 */ 91 public String getVersion() { 92 return "2.4"; 93 } 94 95 96 97 /** 98 * Returns 99 * ORC (Common Order) - creates it if necessary 100 */ 101 public ORC getORC() { 102 ORC retVal = getTyped("ORC", ORC.class); 103 return retVal; 104 } 105 106 107 108 109 /** 110 * Returns 111 * OBR (Observation Request) - creates it if necessary 112 */ 113 public OBR getOBR() { 114 OBR retVal = getTyped("OBR", OBR.class); 115 return retVal; 116 } 117 118 119 120 121 /** 122 * Returns 123 * the first repetition of 124 * NTE (Notes and Comments) - creates it if necessary 125 */ 126 public NTE getNTE() { 127 NTE retVal = getTyped("NTE", NTE.class); 128 return retVal; 129 } 130 131 132 /** 133 * Returns a specific repetition of 134 * NTE (Notes and Comments) - creates it if necessary 135 * 136 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 137 * @throws HL7Exception if the repetition requested is more than one 138 * greater than the number of existing repetitions. 139 */ 140 public NTE getNTE(int rep) { 141 NTE retVal = getTyped("NTE", rep, NTE.class); 142 return retVal; 143 } 144 145 /** 146 * Returns the number of existing repetitions of NTE 147 */ 148 public int getNTEReps() { 149 return getReps("NTE"); 150 } 151 152 /** 153 * <p> 154 * Returns a non-modifiable List containing all current existing repetitions of NTE. 155 * <p> 156 * <p> 157 * Note that unlike {@link #getNTE()}, this method will not create any reps 158 * if none are already present, so an empty list may be returned. 159 * </p> 160 */ 161 public java.util.List<NTE> getNTEAll() throws HL7Exception { 162 return getAllAsList("NTE", NTE.class); 163 } 164 165 /** 166 * Inserts a specific repetition of NTE (Notes and Comments) 167 * @see AbstractGroup#insertRepetition(Structure, int) 168 */ 169 public void insertNTE(NTE structure, int rep) throws HL7Exception { 170 super.insertRepetition("NTE", structure, rep); 171 } 172 173 174 /** 175 * Inserts a specific repetition of NTE (Notes and Comments) 176 * @see AbstractGroup#insertRepetition(Structure, int) 177 */ 178 public NTE insertNTE(int rep) throws HL7Exception { 179 return (NTE)super.insertRepetition("NTE", rep); 180 } 181 182 183 /** 184 * Removes a specific repetition of NTE (Notes and Comments) 185 * @see AbstractGroup#removeRepetition(String, int) 186 */ 187 public NTE removeNTE(int rep) throws HL7Exception { 188 return (NTE)super.removeRepetition("NTE", rep); 189 } 190 191 192 193 /** 194 * Returns 195 * CTD (Contact Data) - creates it if necessary 196 */ 197 public CTD getCTD() { 198 CTD retVal = getTyped("CTD", CTD.class); 199 return retVal; 200 } 201 202 203 204 205 /** 206 * Returns 207 * the first repetition of 208 * DG1 (Diagnosis) - creates it if necessary 209 */ 210 public DG1 getDG1() { 211 DG1 retVal = getTyped("DG1", DG1.class); 212 return retVal; 213 } 214 215 216 /** 217 * Returns a specific repetition of 218 * DG1 (Diagnosis) - creates it if necessary 219 * 220 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 221 * @throws HL7Exception if the repetition requested is more than one 222 * greater than the number of existing repetitions. 223 */ 224 public DG1 getDG1(int rep) { 225 DG1 retVal = getTyped("DG1", rep, DG1.class); 226 return retVal; 227 } 228 229 /** 230 * Returns the number of existing repetitions of DG1 231 */ 232 public int getDG1Reps() { 233 return getReps("DG1"); 234 } 235 236 /** 237 * <p> 238 * Returns a non-modifiable List containing all current existing repetitions of DG1. 239 * <p> 240 * <p> 241 * Note that unlike {@link #getDG1()}, this method will not create any reps 242 * if none are already present, so an empty list may be returned. 243 * </p> 244 */ 245 public java.util.List<DG1> getDG1All() throws HL7Exception { 246 return getAllAsList("DG1", DG1.class); 247 } 248 249 /** 250 * Inserts a specific repetition of DG1 (Diagnosis) 251 * @see AbstractGroup#insertRepetition(Structure, int) 252 */ 253 public void insertDG1(DG1 structure, int rep) throws HL7Exception { 254 super.insertRepetition("DG1", structure, rep); 255 } 256 257 258 /** 259 * Inserts a specific repetition of DG1 (Diagnosis) 260 * @see AbstractGroup#insertRepetition(Structure, int) 261 */ 262 public DG1 insertDG1(int rep) throws HL7Exception { 263 return (DG1)super.insertRepetition("DG1", rep); 264 } 265 266 267 /** 268 * Removes a specific repetition of DG1 (Diagnosis) 269 * @see AbstractGroup#removeRepetition(String, int) 270 */ 271 public DG1 removeDG1(int rep) throws HL7Exception { 272 return (DG1)super.removeRepetition("DG1", rep); 273 } 274 275 276 277 /** 278 * Returns 279 * the first repetition of 280 * OBSERVATION (a Group object) - creates it if necessary 281 */ 282 public OMG_O19_OBSERVATION getOBSERVATION() { 283 OMG_O19_OBSERVATION retVal = getTyped("OBSERVATION", OMG_O19_OBSERVATION.class); 284 return retVal; 285 } 286 287 288 /** 289 * Returns a specific repetition of 290 * OBSERVATION (a Group object) - creates it if necessary 291 * 292 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 293 * @throws HL7Exception if the repetition requested is more than one 294 * greater than the number of existing repetitions. 295 */ 296 public OMG_O19_OBSERVATION getOBSERVATION(int rep) { 297 OMG_O19_OBSERVATION retVal = getTyped("OBSERVATION", rep, OMG_O19_OBSERVATION.class); 298 return retVal; 299 } 300 301 /** 302 * Returns the number of existing repetitions of OBSERVATION 303 */ 304 public int getOBSERVATIONReps() { 305 return getReps("OBSERVATION"); 306 } 307 308 /** 309 * <p> 310 * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION. 311 * <p> 312 * <p> 313 * Note that unlike {@link #getOBSERVATION()}, this method will not create any reps 314 * if none are already present, so an empty list may be returned. 315 * </p> 316 */ 317 public java.util.List<OMG_O19_OBSERVATION> getOBSERVATIONAll() throws HL7Exception { 318 return getAllAsList("OBSERVATION", OMG_O19_OBSERVATION.class); 319 } 320 321 /** 322 * Inserts a specific repetition of OBSERVATION (a Group object) 323 * @see AbstractGroup#insertRepetition(Structure, int) 324 */ 325 public void insertOBSERVATION(OMG_O19_OBSERVATION structure, int rep) throws HL7Exception { 326 super.insertRepetition("OBSERVATION", structure, rep); 327 } 328 329 330 /** 331 * Inserts a specific repetition of OBSERVATION (a Group object) 332 * @see AbstractGroup#insertRepetition(Structure, int) 333 */ 334 public OMG_O19_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception { 335 return (OMG_O19_OBSERVATION)super.insertRepetition("OBSERVATION", rep); 336 } 337 338 339 /** 340 * Removes a specific repetition of OBSERVATION (a Group object) 341 * @see AbstractGroup#removeRepetition(String, int) 342 */ 343 public OMG_O19_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception { 344 return (OMG_O19_OBSERVATION)super.removeRepetition("OBSERVATION", rep); 345 } 346 347 348 349 /** 350 * Returns 351 * the first repetition of 352 * PRIOR_RESULT (a Group object) - creates it if necessary 353 */ 354 public OMG_O19_PRIOR_RESULT getPRIOR_RESULT() { 355 OMG_O19_PRIOR_RESULT retVal = getTyped("PRIOR_RESULT", OMG_O19_PRIOR_RESULT.class); 356 return retVal; 357 } 358 359 360 /** 361 * Returns a specific repetition of 362 * PRIOR_RESULT (a Group object) - creates it if necessary 363 * 364 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 365 * @throws HL7Exception if the repetition requested is more than one 366 * greater than the number of existing repetitions. 367 */ 368 public OMG_O19_PRIOR_RESULT getPRIOR_RESULT(int rep) { 369 OMG_O19_PRIOR_RESULT retVal = getTyped("PRIOR_RESULT", rep, OMG_O19_PRIOR_RESULT.class); 370 return retVal; 371 } 372 373 /** 374 * Returns the number of existing repetitions of PRIOR_RESULT 375 */ 376 public int getPRIOR_RESULTReps() { 377 return getReps("PRIOR_RESULT"); 378 } 379 380 /** 381 * <p> 382 * Returns a non-modifiable List containing all current existing repetitions of PRIOR_RESULT. 383 * <p> 384 * <p> 385 * Note that unlike {@link #getPRIOR_RESULT()}, this method will not create any reps 386 * if none are already present, so an empty list may be returned. 387 * </p> 388 */ 389 public java.util.List<OMG_O19_PRIOR_RESULT> getPRIOR_RESULTAll() throws HL7Exception { 390 return getAllAsList("PRIOR_RESULT", OMG_O19_PRIOR_RESULT.class); 391 } 392 393 /** 394 * Inserts a specific repetition of PRIOR_RESULT (a Group object) 395 * @see AbstractGroup#insertRepetition(Structure, int) 396 */ 397 public void insertPRIOR_RESULT(OMG_O19_PRIOR_RESULT structure, int rep) throws HL7Exception { 398 super.insertRepetition("PRIOR_RESULT", structure, rep); 399 } 400 401 402 /** 403 * Inserts a specific repetition of PRIOR_RESULT (a Group object) 404 * @see AbstractGroup#insertRepetition(Structure, int) 405 */ 406 public OMG_O19_PRIOR_RESULT insertPRIOR_RESULT(int rep) throws HL7Exception { 407 return (OMG_O19_PRIOR_RESULT)super.insertRepetition("PRIOR_RESULT", rep); 408 } 409 410 411 /** 412 * Removes a specific repetition of PRIOR_RESULT (a Group object) 413 * @see AbstractGroup#removeRepetition(String, int) 414 */ 415 public OMG_O19_PRIOR_RESULT removePRIOR_RESULT(int rep) throws HL7Exception { 416 return (OMG_O19_PRIOR_RESULT)super.removeRepetition("PRIOR_RESULT", rep); 417 } 418 419 420 421 /** 422 * Returns 423 * the first repetition of 424 * FT1 (Financial Transaction) - creates it if necessary 425 */ 426 public FT1 getFT1() { 427 FT1 retVal = getTyped("FT1", FT1.class); 428 return retVal; 429 } 430 431 432 /** 433 * Returns a specific repetition of 434 * FT1 (Financial Transaction) - creates it if necessary 435 * 436 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 437 * @throws HL7Exception if the repetition requested is more than one 438 * greater than the number of existing repetitions. 439 */ 440 public FT1 getFT1(int rep) { 441 FT1 retVal = getTyped("FT1", rep, FT1.class); 442 return retVal; 443 } 444 445 /** 446 * Returns the number of existing repetitions of FT1 447 */ 448 public int getFT1Reps() { 449 return getReps("FT1"); 450 } 451 452 /** 453 * <p> 454 * Returns a non-modifiable List containing all current existing repetitions of FT1. 455 * <p> 456 * <p> 457 * Note that unlike {@link #getFT1()}, this method will not create any reps 458 * if none are already present, so an empty list may be returned. 459 * </p> 460 */ 461 public java.util.List<FT1> getFT1All() throws HL7Exception { 462 return getAllAsList("FT1", FT1.class); 463 } 464 465 /** 466 * Inserts a specific repetition of FT1 (Financial Transaction) 467 * @see AbstractGroup#insertRepetition(Structure, int) 468 */ 469 public void insertFT1(FT1 structure, int rep) throws HL7Exception { 470 super.insertRepetition("FT1", structure, rep); 471 } 472 473 474 /** 475 * Inserts a specific repetition of FT1 (Financial Transaction) 476 * @see AbstractGroup#insertRepetition(Structure, int) 477 */ 478 public FT1 insertFT1(int rep) throws HL7Exception { 479 return (FT1)super.insertRepetition("FT1", rep); 480 } 481 482 483 /** 484 * Removes a specific repetition of FT1 (Financial Transaction) 485 * @see AbstractGroup#removeRepetition(String, int) 486 */ 487 public FT1 removeFT1(int rep) throws HL7Exception { 488 return (FT1)super.removeRepetition("FT1", rep); 489 } 490 491 492 493 /** 494 * Returns 495 * the first repetition of 496 * CTI (Clinical Trial Identification) - creates it if necessary 497 */ 498 public CTI getCTI() { 499 CTI retVal = getTyped("CTI", CTI.class); 500 return retVal; 501 } 502 503 504 /** 505 * Returns a specific repetition of 506 * CTI (Clinical Trial Identification) - creates it if necessary 507 * 508 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 509 * @throws HL7Exception if the repetition requested is more than one 510 * greater than the number of existing repetitions. 511 */ 512 public CTI getCTI(int rep) { 513 CTI retVal = getTyped("CTI", rep, CTI.class); 514 return retVal; 515 } 516 517 /** 518 * Returns the number of existing repetitions of CTI 519 */ 520 public int getCTIReps() { 521 return getReps("CTI"); 522 } 523 524 /** 525 * <p> 526 * Returns a non-modifiable List containing all current existing repetitions of CTI. 527 * <p> 528 * <p> 529 * Note that unlike {@link #getCTI()}, this method will not create any reps 530 * if none are already present, so an empty list may be returned. 531 * </p> 532 */ 533 public java.util.List<CTI> getCTIAll() throws HL7Exception { 534 return getAllAsList("CTI", CTI.class); 535 } 536 537 /** 538 * Inserts a specific repetition of CTI (Clinical Trial Identification) 539 * @see AbstractGroup#insertRepetition(Structure, int) 540 */ 541 public void insertCTI(CTI structure, int rep) throws HL7Exception { 542 super.insertRepetition("CTI", structure, rep); 543 } 544 545 546 /** 547 * Inserts a specific repetition of CTI (Clinical Trial Identification) 548 * @see AbstractGroup#insertRepetition(Structure, int) 549 */ 550 public CTI insertCTI(int rep) throws HL7Exception { 551 return (CTI)super.insertRepetition("CTI", rep); 552 } 553 554 555 /** 556 * Removes a specific repetition of CTI (Clinical Trial Identification) 557 * @see AbstractGroup#removeRepetition(String, int) 558 */ 559 public CTI removeCTI(int rep) throws HL7Exception { 560 return (CTI)super.removeRepetition("CTI", rep); 561 } 562 563 564 565 /** 566 * Returns 567 * BLG (Billing) - creates it if necessary 568 */ 569 public BLG getBLG() { 570 BLG retVal = getTyped("BLG", BLG.class); 571 return retVal; 572 } 573 574 575 576 577 } 578