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.v25.group;
35
36 import ca.uhn.hl7v2.model.v25.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 OMP_O09_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: OMP_O09_TIMING (a Group object) <b>optional repeating </b></li>
50 * <li>3: RXO (Pharmacy/Treatment Order) <b> </b></li>
51 * <li>4: NTE (Notes and Comments) <b>optional repeating </b></li>
52 * <li>5: RXR (Pharmacy/Treatment Route) <b> repeating </b></li>
53 * <li>6: OMP_O09_COMPONENT (a Group object) <b>optional repeating </b></li>
54 * <li>7: OMP_O09_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 OMP_O09_ORDER extends AbstractGroup {
61
62 /**
63 * Creates a new OMP_O09_ORDER group
64 */
65 public OMP_O09_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(OMP_O09_TIMING.class, false, true, false);
74 this.add(RXO.class, true, false, false);
75 this.add(NTE.class, false, true, false);
76 this.add(RXR.class, true, true, false);
77 this.add(OMP_O09_COMPONENT.class, false, true, false);
78 this.add(OMP_O09_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 OMP_O09_ORDER - this is probably a bug in the source code generator.", e);
83 }
84 }
85
86 /**
87 * Returns "2.5"
88 */
89 public String getVersion() {
90 return "2.5";
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 OMP_O09_TIMING getTIMING() {
113 OMP_O09_TIMING retVal = getTyped("TIMING", OMP_O09_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 OMP_O09_TIMING getTIMING(int rep) {
127 OMP_O09_TIMING retVal = getTyped("TIMING", rep, OMP_O09_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<OMP_O09_TIMING> getTIMINGAll() throws HL7Exception {
148 return getAllAsList("TIMING", OMP_O09_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(OMP_O09_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 OMP_O09_TIMING insertTIMING(int rep) throws HL7Exception {
165 return (OMP_O09_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 OMP_O09_TIMING removeTIMING(int rep) throws HL7Exception {
174 return (OMP_O09_TIMING)super.removeRepetition("TIMING", rep);
175 }
176
177
178
179 /**
180 * Returns
181 * RXO (Pharmacy/Treatment Order) - creates it if necessary
182 */
183 public RXO getRXO() {
184 RXO retVal = getTyped("RXO", RXO.class);
185 return retVal;
186 }
187
188
189
190
191 /**
192 * Returns
193 * the first repetition of
194 * NTE (Notes and Comments) - creates it if necessary
195 */
196 public NTE getNTE() {
197 NTE retVal = getTyped("NTE", NTE.class);
198 return retVal;
199 }
200
201
202 /**
203 * Returns a specific repetition of
204 * NTE (Notes and Comments) - creates it if necessary
205 *
206 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
207 * @throws HL7Exception if the repetition requested is more than one
208 * greater than the number of existing repetitions.
209 */
210 public NTE getNTE(int rep) {
211 NTE retVal = getTyped("NTE", rep, NTE.class);
212 return retVal;
213 }
214
215 /**
216 * Returns the number of existing repetitions of NTE
217 */
218 public int getNTEReps() {
219 return getReps("NTE");
220 }
221
222 /**
223 * <p>
224 * Returns a non-modifiable List containing all current existing repetitions of NTE.
225 * <p>
226 * <p>
227 * Note that unlike {@link #getNTE()}, this method will not create any reps
228 * if none are already present, so an empty list may be returned.
229 * </p>
230 */
231 public java.util.List<NTE> getNTEAll() throws HL7Exception {
232 return getAllAsList("NTE", NTE.class);
233 }
234
235 /**
236 * Inserts a specific repetition of NTE (Notes and Comments)
237 * @see AbstractGroup#insertRepetition(Structure, int)
238 */
239 public void insertNTE(NTE structure, int rep) throws HL7Exception {
240 super.insertRepetition("NTE", structure, rep);
241 }
242
243
244 /**
245 * Inserts a specific repetition of NTE (Notes and Comments)
246 * @see AbstractGroup#insertRepetition(Structure, int)
247 */
248 public NTE insertNTE(int rep) throws HL7Exception {
249 return (NTE)super.insertRepetition("NTE", rep);
250 }
251
252
253 /**
254 * Removes a specific repetition of NTE (Notes and Comments)
255 * @see AbstractGroup#removeRepetition(String, int)
256 */
257 public NTE removeNTE(int rep) throws HL7Exception {
258 return (NTE)super.removeRepetition("NTE", rep);
259 }
260
261
262
263 /**
264 * Returns
265 * the first repetition of
266 * RXR (Pharmacy/Treatment Route) - creates it if necessary
267 */
268 public RXR getRXR() {
269 RXR retVal = getTyped("RXR", RXR.class);
270 return retVal;
271 }
272
273
274 /**
275 * Returns a specific repetition of
276 * RXR (Pharmacy/Treatment Route) - creates it if necessary
277 *
278 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
279 * @throws HL7Exception if the repetition requested is more than one
280 * greater than the number of existing repetitions.
281 */
282 public RXR getRXR(int rep) {
283 RXR retVal = getTyped("RXR", rep, RXR.class);
284 return retVal;
285 }
286
287 /**
288 * Returns the number of existing repetitions of RXR
289 */
290 public int getRXRReps() {
291 return getReps("RXR");
292 }
293
294 /**
295 * <p>
296 * Returns a non-modifiable List containing all current existing repetitions of RXR.
297 * <p>
298 * <p>
299 * Note that unlike {@link #getRXR()}, this method will not create any reps
300 * if none are already present, so an empty list may be returned.
301 * </p>
302 */
303 public java.util.List<RXR> getRXRAll() throws HL7Exception {
304 return getAllAsList("RXR", RXR.class);
305 }
306
307 /**
308 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route)
309 * @see AbstractGroup#insertRepetition(Structure, int)
310 */
311 public void insertRXR(RXR structure, int rep) throws HL7Exception {
312 super.insertRepetition("RXR", structure, rep);
313 }
314
315
316 /**
317 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route)
318 * @see AbstractGroup#insertRepetition(Structure, int)
319 */
320 public RXR insertRXR(int rep) throws HL7Exception {
321 return (RXR)super.insertRepetition("RXR", rep);
322 }
323
324
325 /**
326 * Removes a specific repetition of RXR (Pharmacy/Treatment Route)
327 * @see AbstractGroup#removeRepetition(String, int)
328 */
329 public RXR removeRXR(int rep) throws HL7Exception {
330 return (RXR)super.removeRepetition("RXR", rep);
331 }
332
333
334
335 /**
336 * Returns
337 * the first repetition of
338 * COMPONENT (a Group object) - creates it if necessary
339 */
340 public OMP_O09_COMPONENT getCOMPONENT() {
341 OMP_O09_COMPONENT retVal = getTyped("COMPONENT", OMP_O09_COMPONENT.class);
342 return retVal;
343 }
344
345
346 /**
347 * Returns a specific repetition of
348 * COMPONENT (a Group object) - creates it if necessary
349 *
350 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
351 * @throws HL7Exception if the repetition requested is more than one
352 * greater than the number of existing repetitions.
353 */
354 public OMP_O09_COMPONENT getCOMPONENT(int rep) {
355 OMP_O09_COMPONENT retVal = getTyped("COMPONENT", rep, OMP_O09_COMPONENT.class);
356 return retVal;
357 }
358
359 /**
360 * Returns the number of existing repetitions of COMPONENT
361 */
362 public int getCOMPONENTReps() {
363 return getReps("COMPONENT");
364 }
365
366 /**
367 * <p>
368 * Returns a non-modifiable List containing all current existing repetitions of COMPONENT.
369 * <p>
370 * <p>
371 * Note that unlike {@link #getCOMPONENT()}, this method will not create any reps
372 * if none are already present, so an empty list may be returned.
373 * </p>
374 */
375 public java.util.List<OMP_O09_COMPONENT> getCOMPONENTAll() throws HL7Exception {
376 return getAllAsList("COMPONENT", OMP_O09_COMPONENT.class);
377 }
378
379 /**
380 * Inserts a specific repetition of COMPONENT (a Group object)
381 * @see AbstractGroup#insertRepetition(Structure, int)
382 */
383 public void insertCOMPONENT(OMP_O09_COMPONENT structure, int rep) throws HL7Exception {
384 super.insertRepetition("COMPONENT", structure, rep);
385 }
386
387
388 /**
389 * Inserts a specific repetition of COMPONENT (a Group object)
390 * @see AbstractGroup#insertRepetition(Structure, int)
391 */
392 public OMP_O09_COMPONENT insertCOMPONENT(int rep) throws HL7Exception {
393 return (OMP_O09_COMPONENT)super.insertRepetition("COMPONENT", rep);
394 }
395
396
397 /**
398 * Removes a specific repetition of COMPONENT (a Group object)
399 * @see AbstractGroup#removeRepetition(String, int)
400 */
401 public OMP_O09_COMPONENT removeCOMPONENT(int rep) throws HL7Exception {
402 return (OMP_O09_COMPONENT)super.removeRepetition("COMPONENT", rep);
403 }
404
405
406
407 /**
408 * Returns
409 * the first repetition of
410 * OBSERVATION (a Group object) - creates it if necessary
411 */
412 public OMP_O09_OBSERVATION getOBSERVATION() {
413 OMP_O09_OBSERVATION retVal = getTyped("OBSERVATION", OMP_O09_OBSERVATION.class);
414 return retVal;
415 }
416
417
418 /**
419 * Returns a specific repetition of
420 * OBSERVATION (a Group object) - creates it if necessary
421 *
422 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
423 * @throws HL7Exception if the repetition requested is more than one
424 * greater than the number of existing repetitions.
425 */
426 public OMP_O09_OBSERVATION getOBSERVATION(int rep) {
427 OMP_O09_OBSERVATION retVal = getTyped("OBSERVATION", rep, OMP_O09_OBSERVATION.class);
428 return retVal;
429 }
430
431 /**
432 * Returns the number of existing repetitions of OBSERVATION
433 */
434 public int getOBSERVATIONReps() {
435 return getReps("OBSERVATION");
436 }
437
438 /**
439 * <p>
440 * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION.
441 * <p>
442 * <p>
443 * Note that unlike {@link #getOBSERVATION()}, this method will not create any reps
444 * if none are already present, so an empty list may be returned.
445 * </p>
446 */
447 public java.util.List<OMP_O09_OBSERVATION> getOBSERVATIONAll() throws HL7Exception {
448 return getAllAsList("OBSERVATION", OMP_O09_OBSERVATION.class);
449 }
450
451 /**
452 * Inserts a specific repetition of OBSERVATION (a Group object)
453 * @see AbstractGroup#insertRepetition(Structure, int)
454 */
455 public void insertOBSERVATION(OMP_O09_OBSERVATION structure, int rep) throws HL7Exception {
456 super.insertRepetition("OBSERVATION", structure, rep);
457 }
458
459
460 /**
461 * Inserts a specific repetition of OBSERVATION (a Group object)
462 * @see AbstractGroup#insertRepetition(Structure, int)
463 */
464 public OMP_O09_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception {
465 return (OMP_O09_OBSERVATION)super.insertRepetition("OBSERVATION", rep);
466 }
467
468
469 /**
470 * Removes a specific repetition of OBSERVATION (a Group object)
471 * @see AbstractGroup#removeRepetition(String, int)
472 */
473 public OMP_O09_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception {
474 return (OMP_O09_OBSERVATION)super.removeRepetition("OBSERVATION", rep);
475 }
476
477
478
479 /**
480 * Returns
481 * the first repetition of
482 * FT1 (Financial Transaction) - creates it if necessary
483 */
484 public FT1 getFT1() {
485 FT1 retVal = getTyped("FT1", FT1.class);
486 return retVal;
487 }
488
489
490 /**
491 * Returns a specific repetition of
492 * FT1 (Financial Transaction) - creates it if necessary
493 *
494 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
495 * @throws HL7Exception if the repetition requested is more than one
496 * greater than the number of existing repetitions.
497 */
498 public FT1 getFT1(int rep) {
499 FT1 retVal = getTyped("FT1", rep, FT1.class);
500 return retVal;
501 }
502
503 /**
504 * Returns the number of existing repetitions of FT1
505 */
506 public int getFT1Reps() {
507 return getReps("FT1");
508 }
509
510 /**
511 * <p>
512 * Returns a non-modifiable List containing all current existing repetitions of FT1.
513 * <p>
514 * <p>
515 * Note that unlike {@link #getFT1()}, this method will not create any reps
516 * if none are already present, so an empty list may be returned.
517 * </p>
518 */
519 public java.util.List<FT1> getFT1All() throws HL7Exception {
520 return getAllAsList("FT1", FT1.class);
521 }
522
523 /**
524 * Inserts a specific repetition of FT1 (Financial Transaction)
525 * @see AbstractGroup#insertRepetition(Structure, int)
526 */
527 public void insertFT1(FT1 structure, int rep) throws HL7Exception {
528 super.insertRepetition("FT1", structure, rep);
529 }
530
531
532 /**
533 * Inserts a specific repetition of FT1 (Financial Transaction)
534 * @see AbstractGroup#insertRepetition(Structure, int)
535 */
536 public FT1 insertFT1(int rep) throws HL7Exception {
537 return (FT1)super.insertRepetition("FT1", rep);
538 }
539
540
541 /**
542 * Removes a specific repetition of FT1 (Financial Transaction)
543 * @see AbstractGroup#removeRepetition(String, int)
544 */
545 public FT1 removeFT1(int rep) throws HL7Exception {
546 return (FT1)super.removeRepetition("FT1", rep);
547 }
548
549
550
551 /**
552 * Returns
553 * BLG (Billing) - creates it if necessary
554 */
555 public BLG getBLG() {
556 BLG retVal = getTyped("BLG", BLG.class);
557 return retVal;
558 }
559
560
561
562
563 }
564