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.v26.group;
35
36 import ca.uhn.hl7v2.model.v26.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 RDE_O11_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: RDE_O11_TIMING (a Group object) <b>optional repeating </b></li>
50 * <li>3: RDE_O11_ORDER_DETAIL (a Group object) <b>optional </b></li>
51 * <li>4: RXE (Pharmacy/Treatment Encoded Order) <b> </b></li>
52 * <li>5: NTE (Notes and Comments) <b>optional repeating </b></li>
53 * <li>6: RDE_O11_TIMING_ENCODED (a Group object) <b> repeating </b></li>
54 * <li>7: RXR (Pharmacy/Treatment Route) <b> repeating </b></li>
55 * <li>8: RXC (Pharmacy/Treatment Component Order) <b>optional repeating </b></li>
56 * <li>9: RDE_O11_OBSERVATION (a Group object) <b>optional repeating </b></li>
57 * <li>10: FT1 (Financial Transaction) <b>optional repeating </b></li>
58 * <li>11: BLG (Billing) <b>optional </b></li>
59 * <li>12: CTI (Clinical Trial Identification) <b>optional repeating </b></li>
60 * </ul>
61 */
62 //@SuppressWarnings("unused")
63 public class RDE_O11_ORDER extends AbstractGroup {
64
65 /**
66 * Creates a new RDE_O11_ORDER group
67 */
68 public RDE_O11_ORDER(Group parent, ModelClassFactory factory) {
69 super(parent, factory);
70 init(factory);
71 }
72
73 private void init(ModelClassFactory factory) {
74 try {
75 this.add(ORC.class, true, false, false);
76 this.add(RDE_O11_TIMING.class, false, true, false);
77 this.add(RDE_O11_ORDER_DETAIL.class, false, false, false);
78 this.add(RXE.class, true, false, false);
79 this.add(NTE.class, false, true, false);
80 this.add(RDE_O11_TIMING_ENCODED.class, true, true, false);
81 this.add(RXR.class, true, true, false);
82 this.add(RXC.class, false, true, false);
83 this.add(RDE_O11_OBSERVATION.class, false, true, false);
84 this.add(FT1.class, false, true, false);
85 this.add(BLG.class, false, false, false);
86 this.add(CTI.class, false, true, false);
87 } catch(HL7Exception e) {
88 log.error("Unexpected error creating RDE_O11_ORDER - this is probably a bug in the source code generator.", e);
89 }
90 }
91
92 /**
93 * Returns "2.6"
94 */
95 public String getVersion() {
96 return "2.6";
97 }
98
99
100
101 /**
102 * Returns
103 * ORC (Common Order) - creates it if necessary
104 */
105 public ORC getORC() {
106 ORC retVal = getTyped("ORC", ORC.class);
107 return retVal;
108 }
109
110
111
112
113 /**
114 * Returns
115 * the first repetition of
116 * TIMING (a Group object) - creates it if necessary
117 */
118 public RDE_O11_TIMING getTIMING() {
119 RDE_O11_TIMING retVal = getTyped("TIMING", RDE_O11_TIMING.class);
120 return retVal;
121 }
122
123
124 /**
125 * Returns a specific repetition of
126 * TIMING (a Group object) - creates it if necessary
127 *
128 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
129 * @throws HL7Exception if the repetition requested is more than one
130 * greater than the number of existing repetitions.
131 */
132 public RDE_O11_TIMING getTIMING(int rep) {
133 RDE_O11_TIMING retVal = getTyped("TIMING", rep, RDE_O11_TIMING.class);
134 return retVal;
135 }
136
137 /**
138 * Returns the number of existing repetitions of TIMING
139 */
140 public int getTIMINGReps() {
141 return getReps("TIMING");
142 }
143
144 /**
145 * <p>
146 * Returns a non-modifiable List containing all current existing repetitions of TIMING.
147 * <p>
148 * <p>
149 * Note that unlike {@link #getTIMING()}, this method will not create any reps
150 * if none are already present, so an empty list may be returned.
151 * </p>
152 */
153 public java.util.List<RDE_O11_TIMING> getTIMINGAll() throws HL7Exception {
154 return getAllAsList("TIMING", RDE_O11_TIMING.class);
155 }
156
157 /**
158 * Inserts a specific repetition of TIMING (a Group object)
159 * @see AbstractGroup#insertRepetition(Structure, int)
160 */
161 public void insertTIMING(RDE_O11_TIMING structure, int rep) throws HL7Exception {
162 super.insertRepetition("TIMING", structure, rep);
163 }
164
165
166 /**
167 * Inserts a specific repetition of TIMING (a Group object)
168 * @see AbstractGroup#insertRepetition(Structure, int)
169 */
170 public RDE_O11_TIMING insertTIMING(int rep) throws HL7Exception {
171 return (RDE_O11_TIMING)super.insertRepetition("TIMING", rep);
172 }
173
174
175 /**
176 * Removes a specific repetition of TIMING (a Group object)
177 * @see AbstractGroup#removeRepetition(String, int)
178 */
179 public RDE_O11_TIMING removeTIMING(int rep) throws HL7Exception {
180 return (RDE_O11_TIMING)super.removeRepetition("TIMING", rep);
181 }
182
183
184
185 /**
186 * Returns
187 * ORDER_DETAIL (a Group object) - creates it if necessary
188 */
189 public RDE_O11_ORDER_DETAIL getORDER_DETAIL() {
190 RDE_O11_ORDER_DETAIL retVal = getTyped("ORDER_DETAIL", RDE_O11_ORDER_DETAIL.class);
191 return retVal;
192 }
193
194
195
196
197 /**
198 * Returns
199 * RXE (Pharmacy/Treatment Encoded Order) - creates it if necessary
200 */
201 public RXE getRXE() {
202 RXE retVal = getTyped("RXE", RXE.class);
203 return retVal;
204 }
205
206
207
208
209 /**
210 * Returns
211 * the first repetition of
212 * NTE (Notes and Comments) - creates it if necessary
213 */
214 public NTE getNTE() {
215 NTE retVal = getTyped("NTE", NTE.class);
216 return retVal;
217 }
218
219
220 /**
221 * Returns a specific repetition of
222 * NTE (Notes and Comments) - creates it if necessary
223 *
224 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
225 * @throws HL7Exception if the repetition requested is more than one
226 * greater than the number of existing repetitions.
227 */
228 public NTE getNTE(int rep) {
229 NTE retVal = getTyped("NTE", rep, NTE.class);
230 return retVal;
231 }
232
233 /**
234 * Returns the number of existing repetitions of NTE
235 */
236 public int getNTEReps() {
237 return getReps("NTE");
238 }
239
240 /**
241 * <p>
242 * Returns a non-modifiable List containing all current existing repetitions of NTE.
243 * <p>
244 * <p>
245 * Note that unlike {@link #getNTE()}, this method will not create any reps
246 * if none are already present, so an empty list may be returned.
247 * </p>
248 */
249 public java.util.List<NTE> getNTEAll() throws HL7Exception {
250 return getAllAsList("NTE", NTE.class);
251 }
252
253 /**
254 * Inserts a specific repetition of NTE (Notes and Comments)
255 * @see AbstractGroup#insertRepetition(Structure, int)
256 */
257 public void insertNTE(NTE structure, int rep) throws HL7Exception {
258 super.insertRepetition("NTE", structure, rep);
259 }
260
261
262 /**
263 * Inserts a specific repetition of NTE (Notes and Comments)
264 * @see AbstractGroup#insertRepetition(Structure, int)
265 */
266 public NTE insertNTE(int rep) throws HL7Exception {
267 return (NTE)super.insertRepetition("NTE", rep);
268 }
269
270
271 /**
272 * Removes a specific repetition of NTE (Notes and Comments)
273 * @see AbstractGroup#removeRepetition(String, int)
274 */
275 public NTE removeNTE(int rep) throws HL7Exception {
276 return (NTE)super.removeRepetition("NTE", rep);
277 }
278
279
280
281 /**
282 * Returns
283 * the first repetition of
284 * TIMING_ENCODED (a Group object) - creates it if necessary
285 */
286 public RDE_O11_TIMING_ENCODED getTIMING_ENCODED() {
287 RDE_O11_TIMING_ENCODED retVal = getTyped("TIMING_ENCODED", RDE_O11_TIMING_ENCODED.class);
288 return retVal;
289 }
290
291
292 /**
293 * Returns a specific repetition of
294 * TIMING_ENCODED (a Group object) - creates it if necessary
295 *
296 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
297 * @throws HL7Exception if the repetition requested is more than one
298 * greater than the number of existing repetitions.
299 */
300 public RDE_O11_TIMING_ENCODED getTIMING_ENCODED(int rep) {
301 RDE_O11_TIMING_ENCODED retVal = getTyped("TIMING_ENCODED", rep, RDE_O11_TIMING_ENCODED.class);
302 return retVal;
303 }
304
305 /**
306 * Returns the number of existing repetitions of TIMING_ENCODED
307 */
308 public int getTIMING_ENCODEDReps() {
309 return getReps("TIMING_ENCODED");
310 }
311
312 /**
313 * <p>
314 * Returns a non-modifiable List containing all current existing repetitions of TIMING_ENCODED.
315 * <p>
316 * <p>
317 * Note that unlike {@link #getTIMING_ENCODED()}, this method will not create any reps
318 * if none are already present, so an empty list may be returned.
319 * </p>
320 */
321 public java.util.List<RDE_O11_TIMING_ENCODED> getTIMING_ENCODEDAll() throws HL7Exception {
322 return getAllAsList("TIMING_ENCODED", RDE_O11_TIMING_ENCODED.class);
323 }
324
325 /**
326 * Inserts a specific repetition of TIMING_ENCODED (a Group object)
327 * @see AbstractGroup#insertRepetition(Structure, int)
328 */
329 public void insertTIMING_ENCODED(RDE_O11_TIMING_ENCODED structure, int rep) throws HL7Exception {
330 super.insertRepetition("TIMING_ENCODED", structure, rep);
331 }
332
333
334 /**
335 * Inserts a specific repetition of TIMING_ENCODED (a Group object)
336 * @see AbstractGroup#insertRepetition(Structure, int)
337 */
338 public RDE_O11_TIMING_ENCODED insertTIMING_ENCODED(int rep) throws HL7Exception {
339 return (RDE_O11_TIMING_ENCODED)super.insertRepetition("TIMING_ENCODED", rep);
340 }
341
342
343 /**
344 * Removes a specific repetition of TIMING_ENCODED (a Group object)
345 * @see AbstractGroup#removeRepetition(String, int)
346 */
347 public RDE_O11_TIMING_ENCODED removeTIMING_ENCODED(int rep) throws HL7Exception {
348 return (RDE_O11_TIMING_ENCODED)super.removeRepetition("TIMING_ENCODED", rep);
349 }
350
351
352
353 /**
354 * Returns
355 * the first repetition of
356 * RXR (Pharmacy/Treatment Route) - creates it if necessary
357 */
358 public RXR getRXR() {
359 RXR retVal = getTyped("RXR", RXR.class);
360 return retVal;
361 }
362
363
364 /**
365 * Returns a specific repetition of
366 * RXR (Pharmacy/Treatment Route) - creates it if necessary
367 *
368 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
369 * @throws HL7Exception if the repetition requested is more than one
370 * greater than the number of existing repetitions.
371 */
372 public RXR getRXR(int rep) {
373 RXR retVal = getTyped("RXR", rep, RXR.class);
374 return retVal;
375 }
376
377 /**
378 * Returns the number of existing repetitions of RXR
379 */
380 public int getRXRReps() {
381 return getReps("RXR");
382 }
383
384 /**
385 * <p>
386 * Returns a non-modifiable List containing all current existing repetitions of RXR.
387 * <p>
388 * <p>
389 * Note that unlike {@link #getRXR()}, this method will not create any reps
390 * if none are already present, so an empty list may be returned.
391 * </p>
392 */
393 public java.util.List<RXR> getRXRAll() throws HL7Exception {
394 return getAllAsList("RXR", RXR.class);
395 }
396
397 /**
398 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route)
399 * @see AbstractGroup#insertRepetition(Structure, int)
400 */
401 public void insertRXR(RXR structure, int rep) throws HL7Exception {
402 super.insertRepetition("RXR", structure, rep);
403 }
404
405
406 /**
407 * Inserts a specific repetition of RXR (Pharmacy/Treatment Route)
408 * @see AbstractGroup#insertRepetition(Structure, int)
409 */
410 public RXR insertRXR(int rep) throws HL7Exception {
411 return (RXR)super.insertRepetition("RXR", rep);
412 }
413
414
415 /**
416 * Removes a specific repetition of RXR (Pharmacy/Treatment Route)
417 * @see AbstractGroup#removeRepetition(String, int)
418 */
419 public RXR removeRXR(int rep) throws HL7Exception {
420 return (RXR)super.removeRepetition("RXR", rep);
421 }
422
423
424
425 /**
426 * Returns
427 * the first repetition of
428 * RXC (Pharmacy/Treatment Component Order) - creates it if necessary
429 */
430 public RXC getRXC() {
431 RXC retVal = getTyped("RXC", RXC.class);
432 return retVal;
433 }
434
435
436 /**
437 * Returns a specific repetition of
438 * RXC (Pharmacy/Treatment Component Order) - creates it if necessary
439 *
440 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
441 * @throws HL7Exception if the repetition requested is more than one
442 * greater than the number of existing repetitions.
443 */
444 public RXC getRXC(int rep) {
445 RXC retVal = getTyped("RXC", rep, RXC.class);
446 return retVal;
447 }
448
449 /**
450 * Returns the number of existing repetitions of RXC
451 */
452 public int getRXCReps() {
453 return getReps("RXC");
454 }
455
456 /**
457 * <p>
458 * Returns a non-modifiable List containing all current existing repetitions of RXC.
459 * <p>
460 * <p>
461 * Note that unlike {@link #getRXC()}, this method will not create any reps
462 * if none are already present, so an empty list may be returned.
463 * </p>
464 */
465 public java.util.List<RXC> getRXCAll() throws HL7Exception {
466 return getAllAsList("RXC", RXC.class);
467 }
468
469 /**
470 * Inserts a specific repetition of RXC (Pharmacy/Treatment Component Order)
471 * @see AbstractGroup#insertRepetition(Structure, int)
472 */
473 public void insertRXC(RXC structure, int rep) throws HL7Exception {
474 super.insertRepetition("RXC", structure, rep);
475 }
476
477
478 /**
479 * Inserts a specific repetition of RXC (Pharmacy/Treatment Component Order)
480 * @see AbstractGroup#insertRepetition(Structure, int)
481 */
482 public RXC insertRXC(int rep) throws HL7Exception {
483 return (RXC)super.insertRepetition("RXC", rep);
484 }
485
486
487 /**
488 * Removes a specific repetition of RXC (Pharmacy/Treatment Component Order)
489 * @see AbstractGroup#removeRepetition(String, int)
490 */
491 public RXC removeRXC(int rep) throws HL7Exception {
492 return (RXC)super.removeRepetition("RXC", rep);
493 }
494
495
496
497 /**
498 * Returns
499 * the first repetition of
500 * OBSERVATION (a Group object) - creates it if necessary
501 */
502 public RDE_O11_OBSERVATION getOBSERVATION() {
503 RDE_O11_OBSERVATION retVal = getTyped("OBSERVATION", RDE_O11_OBSERVATION.class);
504 return retVal;
505 }
506
507
508 /**
509 * Returns a specific repetition of
510 * OBSERVATION (a Group object) - creates it if necessary
511 *
512 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
513 * @throws HL7Exception if the repetition requested is more than one
514 * greater than the number of existing repetitions.
515 */
516 public RDE_O11_OBSERVATION getOBSERVATION(int rep) {
517 RDE_O11_OBSERVATION retVal = getTyped("OBSERVATION", rep, RDE_O11_OBSERVATION.class);
518 return retVal;
519 }
520
521 /**
522 * Returns the number of existing repetitions of OBSERVATION
523 */
524 public int getOBSERVATIONReps() {
525 return getReps("OBSERVATION");
526 }
527
528 /**
529 * <p>
530 * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION.
531 * <p>
532 * <p>
533 * Note that unlike {@link #getOBSERVATION()}, this method will not create any reps
534 * if none are already present, so an empty list may be returned.
535 * </p>
536 */
537 public java.util.List<RDE_O11_OBSERVATION> getOBSERVATIONAll() throws HL7Exception {
538 return getAllAsList("OBSERVATION", RDE_O11_OBSERVATION.class);
539 }
540
541 /**
542 * Inserts a specific repetition of OBSERVATION (a Group object)
543 * @see AbstractGroup#insertRepetition(Structure, int)
544 */
545 public void insertOBSERVATION(RDE_O11_OBSERVATION structure, int rep) throws HL7Exception {
546 super.insertRepetition("OBSERVATION", structure, rep);
547 }
548
549
550 /**
551 * Inserts a specific repetition of OBSERVATION (a Group object)
552 * @see AbstractGroup#insertRepetition(Structure, int)
553 */
554 public RDE_O11_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception {
555 return (RDE_O11_OBSERVATION)super.insertRepetition("OBSERVATION", rep);
556 }
557
558
559 /**
560 * Removes a specific repetition of OBSERVATION (a Group object)
561 * @see AbstractGroup#removeRepetition(String, int)
562 */
563 public RDE_O11_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception {
564 return (RDE_O11_OBSERVATION)super.removeRepetition("OBSERVATION", rep);
565 }
566
567
568
569 /**
570 * Returns
571 * the first repetition of
572 * FT1 (Financial Transaction) - creates it if necessary
573 */
574 public FT1 getFT1() {
575 FT1 retVal = getTyped("FT1", FT1.class);
576 return retVal;
577 }
578
579
580 /**
581 * Returns a specific repetition of
582 * FT1 (Financial Transaction) - creates it if necessary
583 *
584 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
585 * @throws HL7Exception if the repetition requested is more than one
586 * greater than the number of existing repetitions.
587 */
588 public FT1 getFT1(int rep) {
589 FT1 retVal = getTyped("FT1", rep, FT1.class);
590 return retVal;
591 }
592
593 /**
594 * Returns the number of existing repetitions of FT1
595 */
596 public int getFT1Reps() {
597 return getReps("FT1");
598 }
599
600 /**
601 * <p>
602 * Returns a non-modifiable List containing all current existing repetitions of FT1.
603 * <p>
604 * <p>
605 * Note that unlike {@link #getFT1()}, this method will not create any reps
606 * if none are already present, so an empty list may be returned.
607 * </p>
608 */
609 public java.util.List<FT1> getFT1All() throws HL7Exception {
610 return getAllAsList("FT1", FT1.class);
611 }
612
613 /**
614 * Inserts a specific repetition of FT1 (Financial Transaction)
615 * @see AbstractGroup#insertRepetition(Structure, int)
616 */
617 public void insertFT1(FT1 structure, int rep) throws HL7Exception {
618 super.insertRepetition("FT1", structure, rep);
619 }
620
621
622 /**
623 * Inserts a specific repetition of FT1 (Financial Transaction)
624 * @see AbstractGroup#insertRepetition(Structure, int)
625 */
626 public FT1 insertFT1(int rep) throws HL7Exception {
627 return (FT1)super.insertRepetition("FT1", rep);
628 }
629
630
631 /**
632 * Removes a specific repetition of FT1 (Financial Transaction)
633 * @see AbstractGroup#removeRepetition(String, int)
634 */
635 public FT1 removeFT1(int rep) throws HL7Exception {
636 return (FT1)super.removeRepetition("FT1", rep);
637 }
638
639
640
641 /**
642 * Returns
643 * BLG (Billing) - creates it if necessary
644 */
645 public BLG getBLG() {
646 BLG retVal = getTyped("BLG", BLG.class);
647 return retVal;
648 }
649
650
651
652
653 /**
654 * Returns
655 * the first repetition of
656 * CTI (Clinical Trial Identification) - creates it if necessary
657 */
658 public CTI getCTI() {
659 CTI retVal = getTyped("CTI", CTI.class);
660 return retVal;
661 }
662
663
664 /**
665 * Returns a specific repetition of
666 * CTI (Clinical Trial Identification) - creates it if necessary
667 *
668 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
669 * @throws HL7Exception if the repetition requested is more than one
670 * greater than the number of existing repetitions.
671 */
672 public CTI getCTI(int rep) {
673 CTI retVal = getTyped("CTI", rep, CTI.class);
674 return retVal;
675 }
676
677 /**
678 * Returns the number of existing repetitions of CTI
679 */
680 public int getCTIReps() {
681 return getReps("CTI");
682 }
683
684 /**
685 * <p>
686 * Returns a non-modifiable List containing all current existing repetitions of CTI.
687 * <p>
688 * <p>
689 * Note that unlike {@link #getCTI()}, this method will not create any reps
690 * if none are already present, so an empty list may be returned.
691 * </p>
692 */
693 public java.util.List<CTI> getCTIAll() throws HL7Exception {
694 return getAllAsList("CTI", CTI.class);
695 }
696
697 /**
698 * Inserts a specific repetition of CTI (Clinical Trial Identification)
699 * @see AbstractGroup#insertRepetition(Structure, int)
700 */
701 public void insertCTI(CTI structure, int rep) throws HL7Exception {
702 super.insertRepetition("CTI", structure, rep);
703 }
704
705
706 /**
707 * Inserts a specific repetition of CTI (Clinical Trial Identification)
708 * @see AbstractGroup#insertRepetition(Structure, int)
709 */
710 public CTI insertCTI(int rep) throws HL7Exception {
711 return (CTI)super.insertRepetition("CTI", rep);
712 }
713
714
715 /**
716 * Removes a specific repetition of CTI (Clinical Trial Identification)
717 * @see AbstractGroup#removeRepetition(String, int)
718 */
719 public CTI removeCTI(int rep) throws HL7Exception {
720 return (CTI)super.removeRepetition("CTI", rep);
721 }
722
723
724
725 }
726