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