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