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 RDS_O13_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: RDS_O13_ORDER_DETAIL (a Group object) <b>optional </b></li> 052 * <li>3: RDS_O13_ENCODING (a Group object) <b>optional </b></li> 053 * <li>4: RXD (Pharmacy/Treatment Dispense) <b> </b></li> 054 * <li>5: RXR (Pharmacy/Treatment Route) <b> repeating</b></li> 055 * <li>6: RXC (Pharmacy/Treatment Component Order) <b>optional repeating</b></li> 056 * <li>7: RDS_O13_OBSERVATION (a Group object) <b>optional repeating</b></li> 057 * <li>8: FT1 (Financial Transaction) <b>optional repeating</b></li> 058 * </ul> 059 */ 060@SuppressWarnings("unused") 061public class RDS_O13_ORDER extends AbstractGroup { 062 063 /** 064 * Creates a new RDS_O13_ORDER group 065 */ 066 public RDS_O13_ORDER(Group parent, ModelClassFactory factory) { 067 super(parent, factory); 068 init(factory); 069 } 070 071 private void init(ModelClassFactory factory) { 072 try { 073 this.add(ORC.class, true, false); 074 this.add(RDS_O13_ORDER_DETAIL.class, false, false); 075 this.add(RDS_O13_ENCODING.class, false, false); 076 this.add(RXD.class, true, false); 077 this.add(RXR.class, true, true); 078 this.add(RXC.class, false, true); 079 this.add(RDS_O13_OBSERVATION.class, false, true); 080 this.add(FT1.class, false, true); 081 } catch(HL7Exception e) { 082 log.error("Unexpected error creating RDS_O13_ORDER - this is probably a bug in the source code generator.", e); 083 } 084 } 085 086 /** 087 * Returns "2.4" 088 */ 089 public String getVersion() { 090 return "2.4"; 091 } 092 093 094 095 /** 096 * Returns 097 * ORC (Common Order) - creates it if necessary 098 */ 099 public ORC getORC() { 100 ORC retVal = getTyped("ORC", ORC.class); 101 return retVal; 102 } 103 104 105 106 107 /** 108 * Returns 109 * ORDER_DETAIL (a Group object) - creates it if necessary 110 */ 111 public RDS_O13_ORDER_DETAIL getORDER_DETAIL() { 112 RDS_O13_ORDER_DETAIL retVal = getTyped("ORDER_DETAIL", RDS_O13_ORDER_DETAIL.class); 113 return retVal; 114 } 115 116 117 118 119 /** 120 * Returns 121 * ENCODING (a Group object) - creates it if necessary 122 */ 123 public RDS_O13_ENCODING getENCODING() { 124 RDS_O13_ENCODING retVal = getTyped("ENCODING", RDS_O13_ENCODING.class); 125 return retVal; 126 } 127 128 129 130 131 /** 132 * Returns 133 * RXD (Pharmacy/Treatment Dispense) - creates it if necessary 134 */ 135 public RXD getRXD() { 136 RXD retVal = getTyped("RXD", RXD.class); 137 return retVal; 138 } 139 140 141 142 143 /** 144 * Returns 145 * the first repetition of 146 * RXR (Pharmacy/Treatment Route) - creates it if necessary 147 */ 148 public RXR getRXR() { 149 RXR retVal = getTyped("RXR", RXR.class); 150 return retVal; 151 } 152 153 154 /** 155 * Returns a specific repetition of 156 * RXR (Pharmacy/Treatment Route) - creates it if necessary 157 * 158 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 159 * @throws HL7Exception if the repetition requested is more than one 160 * greater than the number of existing repetitions. 161 */ 162 public RXR getRXR(int rep) { 163 RXR retVal = getTyped("RXR", rep, RXR.class); 164 return retVal; 165 } 166 167 /** 168 * Returns the number of existing repetitions of RXR 169 */ 170 public int getRXRReps() { 171 return getReps("RXR"); 172 } 173 174 /** 175 * <p> 176 * Returns a non-modifiable List containing all current existing repetitions of RXR. 177 * <p> 178 * <p> 179 * Note that unlike {@link #getRXR()}, this method will not create any reps 180 * if none are already present, so an empty list may be returned. 181 * </p> 182 */ 183 public List<RXR> getRXRAll() throws HL7Exception { 184 return getAllAsList("RXR", RXR.class); 185 } 186 187 /** 188 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route) 189 * @see AbstractGroup#insertRepetition(Structure, int) 190 */ 191 public void insertRXR(RXR structure, int rep) throws HL7Exception { 192 super.insertRepetition("RXR", structure, rep); 193 } 194 195 196 /** 197 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route) 198 * @see AbstractGroup#insertRepetition(Structure, int) 199 */ 200 public RXR insertRXR(int rep) throws HL7Exception { 201 return (RXR)super.insertRepetition("RXR", rep); 202 } 203 204 205 /** 206 * Removes a specific repetition of RXR (Pharmacy/Treatment Route) 207 * @see AbstractGroup#removeRepetition(String, int) 208 */ 209 public RXR removeRXR(int rep) throws HL7Exception { 210 return (RXR)super.removeRepetition("RXR", rep); 211 } 212 213 214 215 /** 216 * Returns 217 * the first repetition of 218 * RXC (Pharmacy/Treatment Component Order) - creates it if necessary 219 */ 220 public RXC getRXC() { 221 RXC retVal = getTyped("RXC", RXC.class); 222 return retVal; 223 } 224 225 226 /** 227 * Returns a specific repetition of 228 * RXC (Pharmacy/Treatment Component Order) - creates it if necessary 229 * 230 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 231 * @throws HL7Exception if the repetition requested is more than one 232 * greater than the number of existing repetitions. 233 */ 234 public RXC getRXC(int rep) { 235 RXC retVal = getTyped("RXC", rep, RXC.class); 236 return retVal; 237 } 238 239 /** 240 * Returns the number of existing repetitions of RXC 241 */ 242 public int getRXCReps() { 243 return getReps("RXC"); 244 } 245 246 /** 247 * <p> 248 * Returns a non-modifiable List containing all current existing repetitions of RXC. 249 * <p> 250 * <p> 251 * Note that unlike {@link #getRXC()}, this method will not create any reps 252 * if none are already present, so an empty list may be returned. 253 * </p> 254 */ 255 public List<RXC> getRXCAll() throws HL7Exception { 256 return getAllAsList("RXC", RXC.class); 257 } 258 259 /** 260 * Inserts a specific repetition of RXC (Pharmacy/Treatment Component Order) 261 * @see AbstractGroup#insertRepetition(Structure, int) 262 */ 263 public void insertRXC(RXC structure, int rep) throws HL7Exception { 264 super.insertRepetition("RXC", structure, rep); 265 } 266 267 268 /** 269 * Inserts a specific repetition of RXC (Pharmacy/Treatment Component Order) 270 * @see AbstractGroup#insertRepetition(Structure, int) 271 */ 272 public RXC insertRXC(int rep) throws HL7Exception { 273 return (RXC)super.insertRepetition("RXC", rep); 274 } 275 276 277 /** 278 * Removes a specific repetition of RXC (Pharmacy/Treatment Component Order) 279 * @see AbstractGroup#removeRepetition(String, int) 280 */ 281 public RXC removeRXC(int rep) throws HL7Exception { 282 return (RXC)super.removeRepetition("RXC", rep); 283 } 284 285 286 287 /** 288 * Returns 289 * the first repetition of 290 * OBSERVATION (a Group object) - creates it if necessary 291 */ 292 public RDS_O13_OBSERVATION getOBSERVATION() { 293 RDS_O13_OBSERVATION retVal = getTyped("OBSERVATION", RDS_O13_OBSERVATION.class); 294 return retVal; 295 } 296 297 298 /** 299 * Returns a specific repetition of 300 * OBSERVATION (a Group object) - creates it if necessary 301 * 302 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 303 * @throws HL7Exception if the repetition requested is more than one 304 * greater than the number of existing repetitions. 305 */ 306 public RDS_O13_OBSERVATION getOBSERVATION(int rep) { 307 RDS_O13_OBSERVATION retVal = getTyped("OBSERVATION", rep, RDS_O13_OBSERVATION.class); 308 return retVal; 309 } 310 311 /** 312 * Returns the number of existing repetitions of OBSERVATION 313 */ 314 public int getOBSERVATIONReps() { 315 return getReps("OBSERVATION"); 316 } 317 318 /** 319 * <p> 320 * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION. 321 * <p> 322 * <p> 323 * Note that unlike {@link #getOBSERVATION()}, this method will not create any reps 324 * if none are already present, so an empty list may be returned. 325 * </p> 326 */ 327 public List<RDS_O13_OBSERVATION> getOBSERVATIONAll() throws HL7Exception { 328 return getAllAsList("OBSERVATION", RDS_O13_OBSERVATION.class); 329 } 330 331 /** 332 * Inserts a specific repetition of OBSERVATION (a Group object) 333 * @see AbstractGroup#insertRepetition(Structure, int) 334 */ 335 public void insertOBSERVATION(RDS_O13_OBSERVATION structure, int rep) throws HL7Exception { 336 super.insertRepetition("OBSERVATION", structure, rep); 337 } 338 339 340 /** 341 * Inserts a specific repetition of OBSERVATION (a Group object) 342 * @see AbstractGroup#insertRepetition(Structure, int) 343 */ 344 public RDS_O13_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception { 345 return (RDS_O13_OBSERVATION)super.insertRepetition("OBSERVATION", rep); 346 } 347 348 349 /** 350 * Removes a specific repetition of OBSERVATION (a Group object) 351 * @see AbstractGroup#removeRepetition(String, int) 352 */ 353 public RDS_O13_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception { 354 return (RDS_O13_OBSERVATION)super.removeRepetition("OBSERVATION", rep); 355 } 356 357 358 359 /** 360 * Returns 361 * the first repetition of 362 * FT1 (Financial Transaction) - creates it if necessary 363 */ 364 public FT1 getFT1() { 365 FT1 retVal = getTyped("FT1", FT1.class); 366 return retVal; 367 } 368 369 370 /** 371 * Returns a specific repetition of 372 * FT1 (Financial Transaction) - creates it if necessary 373 * 374 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 375 * @throws HL7Exception if the repetition requested is more than one 376 * greater than the number of existing repetitions. 377 */ 378 public FT1 getFT1(int rep) { 379 FT1 retVal = getTyped("FT1", rep, FT1.class); 380 return retVal; 381 } 382 383 /** 384 * Returns the number of existing repetitions of FT1 385 */ 386 public int getFT1Reps() { 387 return getReps("FT1"); 388 } 389 390 /** 391 * <p> 392 * Returns a non-modifiable List containing all current existing repetitions of FT1. 393 * <p> 394 * <p> 395 * Note that unlike {@link #getFT1()}, this method will not create any reps 396 * if none are already present, so an empty list may be returned. 397 * </p> 398 */ 399 public List<FT1> getFT1All() throws HL7Exception { 400 return getAllAsList("FT1", FT1.class); 401 } 402 403 /** 404 * Inserts a specific repetition of FT1 (Financial Transaction) 405 * @see AbstractGroup#insertRepetition(Structure, int) 406 */ 407 public void insertFT1(FT1 structure, int rep) throws HL7Exception { 408 super.insertRepetition("FT1", structure, rep); 409 } 410 411 412 /** 413 * Inserts a specific repetition of FT1 (Financial Transaction) 414 * @see AbstractGroup#insertRepetition(Structure, int) 415 */ 416 public FT1 insertFT1(int rep) throws HL7Exception { 417 return (FT1)super.insertRepetition("FT1", rep); 418 } 419 420 421 /** 422 * Removes a specific repetition of FT1 (Financial Transaction) 423 * @see AbstractGroup#removeRepetition(String, int) 424 */ 425 public FT1 removeFT1(int rep) throws HL7Exception { 426 return (FT1)super.removeRepetition("FT1", rep); 427 } 428 429 430 431} 432