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 OMG_O19_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: OMG_O19_TIMING (a Group object) <b>optional repeating </b></li>
50 * <li>3: OBR (Observation Request) <b> </b></li>
51 * <li>4: NTE (Notes and Comments) <b>optional repeating </b></li>
52 * <li>5: CTD (Contact Data) <b>optional </b></li>
53 * <li>6: DG1 (Diagnosis) <b>optional repeating </b></li>
54 * <li>7: OMG_O19_OBSERVATION (a Group object) <b>optional repeating </b></li>
55 * <li>8: OMG_O19_SPECIMEN (a Group object) <b>optional repeating </b></li>
56 * <li>9: OMG_O19_PRIOR_RESULT (a Group object) <b>optional repeating </b></li>
57 * <li>10: FT1 (Financial Transaction) <b>optional repeating </b></li>
58 * <li>11: CTI (Clinical Trial Identification) <b>optional repeating </b></li>
59 * <li>12: BLG (Billing) <b>optional </b></li>
60 * </ul>
61 */
62 //@SuppressWarnings("unused")
63 public class OMG_O19_ORDER extends AbstractGroup {
64
65 /**
66 * Creates a new OMG_O19_ORDER group
67 */
68 public OMG_O19_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(OMG_O19_TIMING.class, false, true, false);
77 this.add(OBR.class, true, false, false);
78 this.add(NTE.class, false, true, false);
79 this.add(CTD.class, false, false, false);
80 this.add(DG1.class, false, true, false);
81 this.add(OMG_O19_OBSERVATION.class, false, true, false);
82 this.add(OMG_O19_SPECIMEN.class, false, true, false);
83 this.add(OMG_O19_PRIOR_RESULT.class, false, true, false);
84 this.add(FT1.class, false, true, false);
85 this.add(CTI.class, false, true, false);
86 this.add(BLG.class, false, false, false);
87 } catch(HL7Exception e) {
88 log.error("Unexpected error creating OMG_O19_ORDER - this is probably a bug in the source code generator.", e);
89 }
90 }
91
92 /**
93 * Returns "2.5"
94 */
95 public String getVersion() {
96 return "2.5";
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 OMG_O19_TIMING getTIMING() {
119 OMG_O19_TIMING retVal = getTyped("TIMING", OMG_O19_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 OMG_O19_TIMING getTIMING(int rep) {
133 OMG_O19_TIMING retVal = getTyped("TIMING", rep, OMG_O19_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<OMG_O19_TIMING> getTIMINGAll() throws HL7Exception {
154 return getAllAsList("TIMING", OMG_O19_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(OMG_O19_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 OMG_O19_TIMING insertTIMING(int rep) throws HL7Exception {
171 return (OMG_O19_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 OMG_O19_TIMING removeTIMING(int rep) throws HL7Exception {
180 return (OMG_O19_TIMING)super.removeRepetition("TIMING", rep);
181 }
182
183
184
185 /**
186 * Returns
187 * OBR (Observation Request) - creates it if necessary
188 */
189 public OBR getOBR() {
190 OBR retVal = getTyped("OBR", OBR.class);
191 return retVal;
192 }
193
194
195
196
197 /**
198 * Returns
199 * the first repetition of
200 * NTE (Notes and Comments) - creates it if necessary
201 */
202 public NTE getNTE() {
203 NTE retVal = getTyped("NTE", NTE.class);
204 return retVal;
205 }
206
207
208 /**
209 * Returns a specific repetition of
210 * NTE (Notes and Comments) - creates it if necessary
211 *
212 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
213 * @throws HL7Exception if the repetition requested is more than one
214 * greater than the number of existing repetitions.
215 */
216 public NTE getNTE(int rep) {
217 NTE retVal = getTyped("NTE", rep, NTE.class);
218 return retVal;
219 }
220
221 /**
222 * Returns the number of existing repetitions of NTE
223 */
224 public int getNTEReps() {
225 return getReps("NTE");
226 }
227
228 /**
229 * <p>
230 * Returns a non-modifiable List containing all current existing repetitions of NTE.
231 * <p>
232 * <p>
233 * Note that unlike {@link #getNTE()}, this method will not create any reps
234 * if none are already present, so an empty list may be returned.
235 * </p>
236 */
237 public java.util.List<NTE> getNTEAll() throws HL7Exception {
238 return getAllAsList("NTE", NTE.class);
239 }
240
241 /**
242 * Inserts a specific repetition of NTE (Notes and Comments)
243 * @see AbstractGroup#insertRepetition(Structure, int)
244 */
245 public void insertNTE(NTE structure, int rep) throws HL7Exception {
246 super.insertRepetition("NTE", structure, rep);
247 }
248
249
250 /**
251 * Inserts a specific repetition of NTE (Notes and Comments)
252 * @see AbstractGroup#insertRepetition(Structure, int)
253 */
254 public NTE insertNTE(int rep) throws HL7Exception {
255 return (NTE)super.insertRepetition("NTE", rep);
256 }
257
258
259 /**
260 * Removes a specific repetition of NTE (Notes and Comments)
261 * @see AbstractGroup#removeRepetition(String, int)
262 */
263 public NTE removeNTE(int rep) throws HL7Exception {
264 return (NTE)super.removeRepetition("NTE", rep);
265 }
266
267
268
269 /**
270 * Returns
271 * CTD (Contact Data) - creates it if necessary
272 */
273 public CTD getCTD() {
274 CTD retVal = getTyped("CTD", CTD.class);
275 return retVal;
276 }
277
278
279
280
281 /**
282 * Returns
283 * the first repetition of
284 * DG1 (Diagnosis) - creates it if necessary
285 */
286 public DG1 getDG1() {
287 DG1 retVal = getTyped("DG1", DG1.class);
288 return retVal;
289 }
290
291
292 /**
293 * Returns a specific repetition of
294 * DG1 (Diagnosis) - 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 DG1 getDG1(int rep) {
301 DG1 retVal = getTyped("DG1", rep, DG1.class);
302 return retVal;
303 }
304
305 /**
306 * Returns the number of existing repetitions of DG1
307 */
308 public int getDG1Reps() {
309 return getReps("DG1");
310 }
311
312 /**
313 * <p>
314 * Returns a non-modifiable List containing all current existing repetitions of DG1.
315 * <p>
316 * <p>
317 * Note that unlike {@link #getDG1()}, 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<DG1> getDG1All() throws HL7Exception {
322 return getAllAsList("DG1", DG1.class);
323 }
324
325 /**
326 * Inserts a specific repetition of DG1 (Diagnosis)
327 * @see AbstractGroup#insertRepetition(Structure, int)
328 */
329 public void insertDG1(DG1 structure, int rep) throws HL7Exception {
330 super.insertRepetition("DG1", structure, rep);
331 }
332
333
334 /**
335 * Inserts a specific repetition of DG1 (Diagnosis)
336 * @see AbstractGroup#insertRepetition(Structure, int)
337 */
338 public DG1 insertDG1(int rep) throws HL7Exception {
339 return (DG1)super.insertRepetition("DG1", rep);
340 }
341
342
343 /**
344 * Removes a specific repetition of DG1 (Diagnosis)
345 * @see AbstractGroup#removeRepetition(String, int)
346 */
347 public DG1 removeDG1(int rep) throws HL7Exception {
348 return (DG1)super.removeRepetition("DG1", rep);
349 }
350
351
352
353 /**
354 * Returns
355 * the first repetition of
356 * OBSERVATION (a Group object) - creates it if necessary
357 */
358 public OMG_O19_OBSERVATION getOBSERVATION() {
359 OMG_O19_OBSERVATION retVal = getTyped("OBSERVATION", OMG_O19_OBSERVATION.class);
360 return retVal;
361 }
362
363
364 /**
365 * Returns a specific repetition of
366 * OBSERVATION (a Group object) - 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 OMG_O19_OBSERVATION getOBSERVATION(int rep) {
373 OMG_O19_OBSERVATION retVal = getTyped("OBSERVATION", rep, OMG_O19_OBSERVATION.class);
374 return retVal;
375 }
376
377 /**
378 * Returns the number of existing repetitions of OBSERVATION
379 */
380 public int getOBSERVATIONReps() {
381 return getReps("OBSERVATION");
382 }
383
384 /**
385 * <p>
386 * Returns a non-modifiable List containing all current existing repetitions of OBSERVATION.
387 * <p>
388 * <p>
389 * Note that unlike {@link #getOBSERVATION()}, 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<OMG_O19_OBSERVATION> getOBSERVATIONAll() throws HL7Exception {
394 return getAllAsList("OBSERVATION", OMG_O19_OBSERVATION.class);
395 }
396
397 /**
398 * Inserts a specific repetition of OBSERVATION (a Group object)
399 * @see AbstractGroup#insertRepetition(Structure, int)
400 */
401 public void insertOBSERVATION(OMG_O19_OBSERVATION structure, int rep) throws HL7Exception {
402 super.insertRepetition("OBSERVATION", structure, rep);
403 }
404
405
406 /**
407 * Inserts a specific repetition of OBSERVATION (a Group object)
408 * @see AbstractGroup#insertRepetition(Structure, int)
409 */
410 public OMG_O19_OBSERVATION insertOBSERVATION(int rep) throws HL7Exception {
411 return (OMG_O19_OBSERVATION)super.insertRepetition("OBSERVATION", rep);
412 }
413
414
415 /**
416 * Removes a specific repetition of OBSERVATION (a Group object)
417 * @see AbstractGroup#removeRepetition(String, int)
418 */
419 public OMG_O19_OBSERVATION removeOBSERVATION(int rep) throws HL7Exception {
420 return (OMG_O19_OBSERVATION)super.removeRepetition("OBSERVATION", rep);
421 }
422
423
424
425 /**
426 * Returns
427 * the first repetition of
428 * SPECIMEN (a Group object) - creates it if necessary
429 */
430 public OMG_O19_SPECIMEN getSPECIMEN() {
431 OMG_O19_SPECIMEN retVal = getTyped("SPECIMEN", OMG_O19_SPECIMEN.class);
432 return retVal;
433 }
434
435
436 /**
437 * Returns a specific repetition of
438 * SPECIMEN (a Group object) - 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 OMG_O19_SPECIMEN getSPECIMEN(int rep) {
445 OMG_O19_SPECIMEN retVal = getTyped("SPECIMEN", rep, OMG_O19_SPECIMEN.class);
446 return retVal;
447 }
448
449 /**
450 * Returns the number of existing repetitions of SPECIMEN
451 */
452 public int getSPECIMENReps() {
453 return getReps("SPECIMEN");
454 }
455
456 /**
457 * <p>
458 * Returns a non-modifiable List containing all current existing repetitions of SPECIMEN.
459 * <p>
460 * <p>
461 * Note that unlike {@link #getSPECIMEN()}, 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<OMG_O19_SPECIMEN> getSPECIMENAll() throws HL7Exception {
466 return getAllAsList("SPECIMEN", OMG_O19_SPECIMEN.class);
467 }
468
469 /**
470 * Inserts a specific repetition of SPECIMEN (a Group object)
471 * @see AbstractGroup#insertRepetition(Structure, int)
472 */
473 public void insertSPECIMEN(OMG_O19_SPECIMEN structure, int rep) throws HL7Exception {
474 super.insertRepetition("SPECIMEN", structure, rep);
475 }
476
477
478 /**
479 * Inserts a specific repetition of SPECIMEN (a Group object)
480 * @see AbstractGroup#insertRepetition(Structure, int)
481 */
482 public OMG_O19_SPECIMEN insertSPECIMEN(int rep) throws HL7Exception {
483 return (OMG_O19_SPECIMEN)super.insertRepetition("SPECIMEN", rep);
484 }
485
486
487 /**
488 * Removes a specific repetition of SPECIMEN (a Group object)
489 * @see AbstractGroup#removeRepetition(String, int)
490 */
491 public OMG_O19_SPECIMEN removeSPECIMEN(int rep) throws HL7Exception {
492 return (OMG_O19_SPECIMEN)super.removeRepetition("SPECIMEN", rep);
493 }
494
495
496
497 /**
498 * Returns
499 * the first repetition of
500 * PRIOR_RESULT (a Group object) - creates it if necessary
501 */
502 public OMG_O19_PRIOR_RESULT getPRIOR_RESULT() {
503 OMG_O19_PRIOR_RESULT retVal = getTyped("PRIOR_RESULT", OMG_O19_PRIOR_RESULT.class);
504 return retVal;
505 }
506
507
508 /**
509 * Returns a specific repetition of
510 * PRIOR_RESULT (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 OMG_O19_PRIOR_RESULT getPRIOR_RESULT(int rep) {
517 OMG_O19_PRIOR_RESULT retVal = getTyped("PRIOR_RESULT", rep, OMG_O19_PRIOR_RESULT.class);
518 return retVal;
519 }
520
521 /**
522 * Returns the number of existing repetitions of PRIOR_RESULT
523 */
524 public int getPRIOR_RESULTReps() {
525 return getReps("PRIOR_RESULT");
526 }
527
528 /**
529 * <p>
530 * Returns a non-modifiable List containing all current existing repetitions of PRIOR_RESULT.
531 * <p>
532 * <p>
533 * Note that unlike {@link #getPRIOR_RESULT()}, 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<OMG_O19_PRIOR_RESULT> getPRIOR_RESULTAll() throws HL7Exception {
538 return getAllAsList("PRIOR_RESULT", OMG_O19_PRIOR_RESULT.class);
539 }
540
541 /**
542 * Inserts a specific repetition of PRIOR_RESULT (a Group object)
543 * @see AbstractGroup#insertRepetition(Structure, int)
544 */
545 public void insertPRIOR_RESULT(OMG_O19_PRIOR_RESULT structure, int rep) throws HL7Exception {
546 super.insertRepetition("PRIOR_RESULT", structure, rep);
547 }
548
549
550 /**
551 * Inserts a specific repetition of PRIOR_RESULT (a Group object)
552 * @see AbstractGroup#insertRepetition(Structure, int)
553 */
554 public OMG_O19_PRIOR_RESULT insertPRIOR_RESULT(int rep) throws HL7Exception {
555 return (OMG_O19_PRIOR_RESULT)super.insertRepetition("PRIOR_RESULT", rep);
556 }
557
558
559 /**
560 * Removes a specific repetition of PRIOR_RESULT (a Group object)
561 * @see AbstractGroup#removeRepetition(String, int)
562 */
563 public OMG_O19_PRIOR_RESULT removePRIOR_RESULT(int rep) throws HL7Exception {
564 return (OMG_O19_PRIOR_RESULT)super.removeRepetition("PRIOR_RESULT", 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 * the first repetition of
644 * CTI (Clinical Trial Identification) - creates it if necessary
645 */
646 public CTI getCTI() {
647 CTI retVal = getTyped("CTI", CTI.class);
648 return retVal;
649 }
650
651
652 /**
653 * Returns a specific repetition of
654 * CTI (Clinical Trial Identification) - creates it if necessary
655 *
656 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
657 * @throws HL7Exception if the repetition requested is more than one
658 * greater than the number of existing repetitions.
659 */
660 public CTI getCTI(int rep) {
661 CTI retVal = getTyped("CTI", rep, CTI.class);
662 return retVal;
663 }
664
665 /**
666 * Returns the number of existing repetitions of CTI
667 */
668 public int getCTIReps() {
669 return getReps("CTI");
670 }
671
672 /**
673 * <p>
674 * Returns a non-modifiable List containing all current existing repetitions of CTI.
675 * <p>
676 * <p>
677 * Note that unlike {@link #getCTI()}, this method will not create any reps
678 * if none are already present, so an empty list may be returned.
679 * </p>
680 */
681 public java.util.List<CTI> getCTIAll() throws HL7Exception {
682 return getAllAsList("CTI", CTI.class);
683 }
684
685 /**
686 * Inserts a specific repetition of CTI (Clinical Trial Identification)
687 * @see AbstractGroup#insertRepetition(Structure, int)
688 */
689 public void insertCTI(CTI structure, int rep) throws HL7Exception {
690 super.insertRepetition("CTI", structure, rep);
691 }
692
693
694 /**
695 * Inserts a specific repetition of CTI (Clinical Trial Identification)
696 * @see AbstractGroup#insertRepetition(Structure, int)
697 */
698 public CTI insertCTI(int rep) throws HL7Exception {
699 return (CTI)super.insertRepetition("CTI", rep);
700 }
701
702
703 /**
704 * Removes a specific repetition of CTI (Clinical Trial Identification)
705 * @see AbstractGroup#removeRepetition(String, int)
706 */
707 public CTI removeCTI(int rep) throws HL7Exception {
708 return (CTI)super.removeRepetition("CTI", rep);
709 }
710
711
712
713 /**
714 * Returns
715 * BLG (Billing) - creates it if necessary
716 */
717 public BLG getBLG() {
718 BLG retVal = getTyped("BLG", BLG.class);
719 return retVal;
720 }
721
722
723
724
725 }
726