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.v231.group; 035 036import ca.uhn.hl7v2.model.v231.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_O01_ORCRXONTERXRRXCNTERXERXRRXCRXDRXRRXCOBXNTE 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 (ORC - common order segment) <b> </b></li> 051 * <li>2: RDS_O01_RXONTERXRRXCNTE (a Group object) <b>optional </b></li> 052 * <li>3: RDS_O01_RXERXRRXC (a Group object) <b>optional </b></li> 053 * <li>4: RXD (RXD - pharmacy/treatment dispense segment) <b> </b></li> 054 * <li>5: RXR (RXR - pharmacy/treatment route segment) <b> repeating</b></li> 055 * <li>6: RXC (RXC - pharmacy/treatment component order segment) <b>optional repeating</b></li> 056 * <li>7: RDS_O01_OBXNTE (a Group object) <b>optional repeating</b></li> 057 * </ul> 058 */ 059@SuppressWarnings("unused") 060public class RDS_O01_ORCRXONTERXRRXCNTERXERXRRXCRXDRXRRXCOBXNTE extends AbstractGroup { 061 062 /** 063 * Creates a new RDS_O01_ORCRXONTERXRRXCNTERXERXRRXCRXDRXRRXCOBXNTE group 064 */ 065 public RDS_O01_ORCRXONTERXRRXCNTERXERXRRXCRXDRXRRXCOBXNTE(Group parent, ModelClassFactory factory) { 066 super(parent, factory); 067 init(factory); 068 } 069 070 private void init(ModelClassFactory factory) { 071 try { 072 this.add(ORC.class, true, false); 073 this.add(RDS_O01_RXONTERXRRXCNTE.class, false, false); 074 this.add(RDS_O01_RXERXRRXC.class, false, false); 075 this.add(RXD.class, true, false); 076 this.add(RXR.class, true, true); 077 this.add(RXC.class, false, true); 078 this.add(RDS_O01_OBXNTE.class, false, true); 079 } catch(HL7Exception e) { 080 log.error("Unexpected error creating RDS_O01_ORCRXONTERXRRXCNTERXERXRRXCRXDRXRRXCOBXNTE - this is probably a bug in the source code generator.", e); 081 } 082 } 083 084 /** 085 * Returns "2.3.1" 086 */ 087 public String getVersion() { 088 return "2.3.1"; 089 } 090 091 092 093 /** 094 * Returns 095 * ORC (ORC - common order segment) - creates it if necessary 096 */ 097 public ORC getORC() { 098 ORC retVal = getTyped("ORC", ORC.class); 099 return retVal; 100 } 101 102 103 104 105 /** 106 * Returns 107 * RXONTERXRRXCNTE (a Group object) - creates it if necessary 108 */ 109 public RDS_O01_RXONTERXRRXCNTE getRXONTERXRRXCNTE() { 110 RDS_O01_RXONTERXRRXCNTE retVal = getTyped("RXONTERXRRXCNTE", RDS_O01_RXONTERXRRXCNTE.class); 111 return retVal; 112 } 113 114 115 116 117 /** 118 * Returns 119 * RXERXRRXC (a Group object) - creates it if necessary 120 */ 121 public RDS_O01_RXERXRRXC getRXERXRRXC() { 122 RDS_O01_RXERXRRXC retVal = getTyped("RXERXRRXC", RDS_O01_RXERXRRXC.class); 123 return retVal; 124 } 125 126 127 128 129 /** 130 * Returns 131 * RXD (RXD - pharmacy/treatment dispense segment) - creates it if necessary 132 */ 133 public RXD getRXD() { 134 RXD retVal = getTyped("RXD", RXD.class); 135 return retVal; 136 } 137 138 139 140 141 /** 142 * Returns 143 * the first repetition of 144 * RXR (RXR - pharmacy/treatment route segment) - creates it if necessary 145 */ 146 public RXR getRXR() { 147 RXR retVal = getTyped("RXR", RXR.class); 148 return retVal; 149 } 150 151 152 /** 153 * Returns a specific repetition of 154 * RXR (RXR - pharmacy/treatment route segment) - creates it if necessary 155 * 156 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 157 * @throws HL7Exception if the repetition requested is more than one 158 * greater than the number of existing repetitions. 159 */ 160 public RXR getRXR(int rep) { 161 RXR retVal = getTyped("RXR", rep, RXR.class); 162 return retVal; 163 } 164 165 /** 166 * Returns the number of existing repetitions of RXR 167 */ 168 public int getRXRReps() { 169 return getReps("RXR"); 170 } 171 172 /** 173 * <p> 174 * Returns a non-modifiable List containing all current existing repetitions of RXR. 175 * <p> 176 * <p> 177 * Note that unlike {@link #getRXR()}, this method will not create any reps 178 * if none are already present, so an empty list may be returned. 179 * </p> 180 */ 181 public List<RXR> getRXRAll() throws HL7Exception { 182 return getAllAsList("RXR", RXR.class); 183 } 184 185 /** 186 * Inserts a specific repetition of RXR (RXR - pharmacy/treatment route segment) 187 * @see AbstractGroup#insertRepetition(Structure, int) 188 */ 189 public void insertRXR(RXR structure, int rep) throws HL7Exception { 190 super.insertRepetition("RXR", structure, rep); 191 } 192 193 194 /** 195 * Inserts a specific repetition of RXR (RXR - pharmacy/treatment route segment) 196 * @see AbstractGroup#insertRepetition(Structure, int) 197 */ 198 public RXR insertRXR(int rep) throws HL7Exception { 199 return (RXR)super.insertRepetition("RXR", rep); 200 } 201 202 203 /** 204 * Removes a specific repetition of RXR (RXR - pharmacy/treatment route segment) 205 * @see AbstractGroup#removeRepetition(String, int) 206 */ 207 public RXR removeRXR(int rep) throws HL7Exception { 208 return (RXR)super.removeRepetition("RXR", rep); 209 } 210 211 212 213 /** 214 * Returns 215 * the first repetition of 216 * RXC (RXC - pharmacy/treatment component order segment) - creates it if necessary 217 */ 218 public RXC getRXC() { 219 RXC retVal = getTyped("RXC", RXC.class); 220 return retVal; 221 } 222 223 224 /** 225 * Returns a specific repetition of 226 * RXC (RXC - pharmacy/treatment component order segment) - creates it if necessary 227 * 228 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 229 * @throws HL7Exception if the repetition requested is more than one 230 * greater than the number of existing repetitions. 231 */ 232 public RXC getRXC(int rep) { 233 RXC retVal = getTyped("RXC", rep, RXC.class); 234 return retVal; 235 } 236 237 /** 238 * Returns the number of existing repetitions of RXC 239 */ 240 public int getRXCReps() { 241 return getReps("RXC"); 242 } 243 244 /** 245 * <p> 246 * Returns a non-modifiable List containing all current existing repetitions of RXC. 247 * <p> 248 * <p> 249 * Note that unlike {@link #getRXC()}, this method will not create any reps 250 * if none are already present, so an empty list may be returned. 251 * </p> 252 */ 253 public List<RXC> getRXCAll() throws HL7Exception { 254 return getAllAsList("RXC", RXC.class); 255 } 256 257 /** 258 * Inserts a specific repetition of RXC (RXC - pharmacy/treatment component order segment) 259 * @see AbstractGroup#insertRepetition(Structure, int) 260 */ 261 public void insertRXC(RXC structure, int rep) throws HL7Exception { 262 super.insertRepetition("RXC", structure, rep); 263 } 264 265 266 /** 267 * Inserts a specific repetition of RXC (RXC - pharmacy/treatment component order segment) 268 * @see AbstractGroup#insertRepetition(Structure, int) 269 */ 270 public RXC insertRXC(int rep) throws HL7Exception { 271 return (RXC)super.insertRepetition("RXC", rep); 272 } 273 274 275 /** 276 * Removes a specific repetition of RXC (RXC - pharmacy/treatment component order segment) 277 * @see AbstractGroup#removeRepetition(String, int) 278 */ 279 public RXC removeRXC(int rep) throws HL7Exception { 280 return (RXC)super.removeRepetition("RXC", rep); 281 } 282 283 284 285 /** 286 * Returns 287 * the first repetition of 288 * OBXNTE (a Group object) - creates it if necessary 289 */ 290 public RDS_O01_OBXNTE getOBXNTE() { 291 RDS_O01_OBXNTE retVal = getTyped("OBXNTE", RDS_O01_OBXNTE.class); 292 return retVal; 293 } 294 295 296 /** 297 * Returns a specific repetition of 298 * OBXNTE (a Group object) - creates it if necessary 299 * 300 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 301 * @throws HL7Exception if the repetition requested is more than one 302 * greater than the number of existing repetitions. 303 */ 304 public RDS_O01_OBXNTE getOBXNTE(int rep) { 305 RDS_O01_OBXNTE retVal = getTyped("OBXNTE", rep, RDS_O01_OBXNTE.class); 306 return retVal; 307 } 308 309 /** 310 * Returns the number of existing repetitions of OBXNTE 311 */ 312 public int getOBXNTEReps() { 313 return getReps("OBXNTE"); 314 } 315 316 /** 317 * <p> 318 * Returns a non-modifiable List containing all current existing repetitions of OBXNTE. 319 * <p> 320 * <p> 321 * Note that unlike {@link #getOBXNTE()}, this method will not create any reps 322 * if none are already present, so an empty list may be returned. 323 * </p> 324 */ 325 public List<RDS_O01_OBXNTE> getOBXNTEAll() throws HL7Exception { 326 return getAllAsList("OBXNTE", RDS_O01_OBXNTE.class); 327 } 328 329 /** 330 * Inserts a specific repetition of OBXNTE (a Group object) 331 * @see AbstractGroup#insertRepetition(Structure, int) 332 */ 333 public void insertOBXNTE(RDS_O01_OBXNTE structure, int rep) throws HL7Exception { 334 super.insertRepetition("OBXNTE", structure, rep); 335 } 336 337 338 /** 339 * Inserts a specific repetition of OBXNTE (a Group object) 340 * @see AbstractGroup#insertRepetition(Structure, int) 341 */ 342 public RDS_O01_OBXNTE insertOBXNTE(int rep) throws HL7Exception { 343 return (RDS_O01_OBXNTE)super.insertRepetition("OBXNTE", rep); 344 } 345 346 347 /** 348 * Removes a specific repetition of OBXNTE (a Group object) 349 * @see AbstractGroup#removeRepetition(String, int) 350 */ 351 public RDS_O01_OBXNTE removeOBXNTE(int rep) throws HL7Exception { 352 return (RDS_O01_OBXNTE)super.removeRepetition("OBXNTE", rep); 353 } 354 355 356 357} 358