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.message;
35
36 import ca.uhn.hl7v2.model.v26.group.*;
37 import ca.uhn.hl7v2.model.v26.segment.*;
38
39 import ca.uhn.hl7v2.HL7Exception;
40 import ca.uhn.hl7v2.parser.ModelClassFactory;
41 import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
42 import ca.uhn.hl7v2.model.*;
43
44
45 /**
46 * <p>Represents a RCL_I06 message structure (see chapter 11.3.6). This structure contains the
47 * following elements: </p>
48 * <ul>
49 * <li>1: MSH (Message Header) <b> </b> </li>
50 * <li>2: SFT (Software Segment) <b>optional repeating</b> </li>
51 * <li>3: UAC (User Authentication Credential Segment) <b>optional </b> </li>
52 * <li>4: MSA (Message Acknowledgment) <b> </b> </li>
53 * <li>5: QRD (Original-Style Query Definition) <b> </b> </li>
54 * <li>6: QRF (Original style query filter) <b>optional </b> </li>
55 * <li>7: RCL_I06_PROVIDER (a Group object) <b> repeating</b> </li>
56 * <li>8: PID (Patient Identification) <b> </b> </li>
57 * <li>9: DG1 (Diagnosis) <b>optional repeating</b> </li>
58 * <li>10: DRG (Diagnosis Related Group) <b>optional repeating</b> </li>
59 * <li>11: AL1 (Patient Allergy Information) <b>optional repeating</b> </li>
60 * <li>12: NTE (Notes and Comments) <b>optional repeating</b> </li>
61 * <li>13: DSP (Display Data) <b>optional repeating</b> </li>
62 * <li>14: DSC (Continuation Pointer) <b>optional </b> </li>
63 * </ul>
64 */
65 //@SuppressWarnings("unused")
66 public class RCL_I06 extends AbstractMessage {
67
68 /**
69 * Creates a new RCL_I06 message with DefaultModelClassFactory.
70 */
71 public RCL_I06() {
72 this(new DefaultModelClassFactory());
73 }
74
75 /**
76 * Creates a new RCL_I06 message with custom ModelClassFactory.
77 */
78 public RCL_I06(ModelClassFactory factory) {
79 super(factory);
80 init(factory);
81 }
82
83 private void init(ModelClassFactory factory) {
84 try {
85 this.add(MSH.class, true, false);
86 this.add(SFT.class, false, true);
87 this.add(UAC.class, false, false);
88 this.add(MSA.class, true, false);
89 this.add(QRD.class, true, false);
90 this.add(QRF.class, false, false);
91 this.add(RCL_I06_PROVIDER.class, true, true);
92 this.add(PID.class, true, false);
93 this.add(DG1.class, false, true);
94 this.add(DRG.class, false, true);
95 this.add(AL1.class, false, true);
96 this.add(NTE.class, false, true);
97 this.add(DSP.class, false, true);
98 this.add(DSC.class, false, false);
99 } catch(HL7Exception e) {
100 log.error("Unexpected error creating RCL_I06 - this is probably a bug in the source code generator.", e);
101 }
102 }
103
104
105 /**
106 * Returns "2.6"
107 */
108 public String getVersion() {
109 return "2.6";
110 }
111
112
113
114
115 /**
116 * <p>
117 * Returns
118 * MSH (Message Header) - creates it if necessary
119 * </p>
120 *
121 *
122 */
123 public MSH getMSH() {
124 return getTyped("MSH", MSH.class);
125 }
126
127
128
129
130
131 /**
132 * <p>
133 * Returns
134 * the first repetition of
135 * SFT (Software Segment) - creates it if necessary
136 * </p>
137 *
138 *
139 */
140 public SFT getSFT() {
141 return getTyped("SFT", SFT.class);
142 }
143
144
145 /**
146 * <p>
147 * Returns a specific repetition of
148 * SFT (Software Segment) - creates it if necessary
149 * </p>
150 *
151 *
152 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
153 * @throws HL7Exception if the repetition requested is more than one
154 * greater than the number of existing repetitions.
155 */
156 public SFT getSFT(int rep) {
157 return getTyped("SFT", rep, SFT.class);
158 }
159
160 /**
161 * <p>
162 * Returns the number of existing repetitions of SFT
163 * </p>
164 *
165 */
166 public int getSFTReps() {
167 return getReps("SFT");
168 }
169
170 /**
171 * <p>
172 * Returns a non-modifiable List containing all current existing repetitions of SFT.
173 * <p>
174 * <p>
175 * Note that unlike {@link #getSFT()}, this method will not create any reps
176 * if none are already present, so an empty list may be returned.
177 * </p>
178 *
179 */
180 public java.util.List<SFT> getSFTAll() throws HL7Exception {
181 return getAllAsList("SFT", SFT.class);
182 }
183
184 /**
185 * <p>
186 * Inserts a specific repetition of SFT (Software Segment)
187 * </p>
188 *
189 *
190 * @see AbstractGroup#insertRepetition(Structure, int)
191 */
192 public void insertSFT(SFT structure, int rep) throws HL7Exception {
193 super.insertRepetition( "SFT", structure, rep);
194 }
195
196
197 /**
198 * <p>
199 * Inserts a specific repetition of SFT (Software Segment)
200 * </p>
201 *
202 *
203 * @see AbstractGroup#insertRepetition(Structure, int)
204 */
205 public SFT insertSFT(int rep) throws HL7Exception {
206 return (SFT)super.insertRepetition("SFT", rep);
207 }
208
209
210 /**
211 * <p>
212 * Removes a specific repetition of SFT (Software Segment)
213 * </p>
214 *
215 *
216 * @see AbstractGroup#removeRepetition(String, int)
217 */
218 public SFT removeSFT(int rep) throws HL7Exception {
219 return (SFT)super.removeRepetition("SFT", rep);
220 }
221
222
223
224
225 /**
226 * <p>
227 * Returns
228 * UAC (User Authentication Credential Segment) - creates it if necessary
229 * </p>
230 *
231 *
232 */
233 public UAC getUAC() {
234 return getTyped("UAC", UAC.class);
235 }
236
237
238
239
240
241 /**
242 * <p>
243 * Returns
244 * MSA (Message Acknowledgment) - creates it if necessary
245 * </p>
246 *
247 *
248 */
249 public MSA getMSA() {
250 return getTyped("MSA", MSA.class);
251 }
252
253
254
255
256
257 /**
258 * <p>
259 * Returns
260 * QRD (Original-Style Query Definition) - creates it if necessary
261 * </p>
262 *
263 *
264 */
265 public QRD getQRD() {
266 return getTyped("QRD", QRD.class);
267 }
268
269
270
271
272
273 /**
274 * <p>
275 * Returns
276 * QRF (Original style query filter) - creates it if necessary
277 * </p>
278 *
279 *
280 */
281 public QRF getQRF() {
282 return getTyped("QRF", QRF.class);
283 }
284
285
286
287
288
289 /**
290 * <p>
291 * Returns
292 * the first repetition of
293 * PROVIDER (a Group object) - creates it if necessary
294 * </p>
295 *
296 *
297 */
298 public RCL_I06_PROVIDER getPROVIDER() {
299 return getTyped("PROVIDER", RCL_I06_PROVIDER.class);
300 }
301
302
303 /**
304 * <p>
305 * Returns a specific repetition of
306 * PROVIDER (a Group object) - creates it if necessary
307 * </p>
308 *
309 *
310 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
311 * @throws HL7Exception if the repetition requested is more than one
312 * greater than the number of existing repetitions.
313 */
314 public RCL_I06_PROVIDER getPROVIDER(int rep) {
315 return getTyped("PROVIDER", rep, RCL_I06_PROVIDER.class);
316 }
317
318 /**
319 * <p>
320 * Returns the number of existing repetitions of PROVIDER
321 * </p>
322 *
323 */
324 public int getPROVIDERReps() {
325 return getReps("PROVIDER");
326 }
327
328 /**
329 * <p>
330 * Returns a non-modifiable List containing all current existing repetitions of PROVIDER.
331 * <p>
332 * <p>
333 * Note that unlike {@link #getPROVIDER()}, this method will not create any reps
334 * if none are already present, so an empty list may be returned.
335 * </p>
336 *
337 */
338 public java.util.List<RCL_I06_PROVIDER> getPROVIDERAll() throws HL7Exception {
339 return getAllAsList("PROVIDER", RCL_I06_PROVIDER.class);
340 }
341
342 /**
343 * <p>
344 * Inserts a specific repetition of PROVIDER (a Group object)
345 * </p>
346 *
347 *
348 * @see AbstractGroup#insertRepetition(Structure, int)
349 */
350 public void insertPROVIDER(RCL_I06_PROVIDER structure, int rep) throws HL7Exception {
351 super.insertRepetition( "PROVIDER", structure, rep);
352 }
353
354
355 /**
356 * <p>
357 * Inserts a specific repetition of PROVIDER (a Group object)
358 * </p>
359 *
360 *
361 * @see AbstractGroup#insertRepetition(Structure, int)
362 */
363 public RCL_I06_PROVIDER insertPROVIDER(int rep) throws HL7Exception {
364 return (RCL_I06_PROVIDER)super.insertRepetition("PROVIDER", rep);
365 }
366
367
368 /**
369 * <p>
370 * Removes a specific repetition of PROVIDER (a Group object)
371 * </p>
372 *
373 *
374 * @see AbstractGroup#removeRepetition(String, int)
375 */
376 public RCL_I06_PROVIDER removePROVIDER(int rep) throws HL7Exception {
377 return (RCL_I06_PROVIDER)super.removeRepetition("PROVIDER", rep);
378 }
379
380
381
382
383 /**
384 * <p>
385 * Returns
386 * PID (Patient Identification) - creates it if necessary
387 * </p>
388 *
389 *
390 */
391 public PID getPID() {
392 return getTyped("PID", PID.class);
393 }
394
395
396
397
398
399 /**
400 * <p>
401 * Returns
402 * the first repetition of
403 * DG1 (Diagnosis) - creates it if necessary
404 * </p>
405 *
406 *
407 */
408 public DG1 getDG1() {
409 return getTyped("DG1", DG1.class);
410 }
411
412
413 /**
414 * <p>
415 * Returns a specific repetition of
416 * DG1 (Diagnosis) - creates it if necessary
417 * </p>
418 *
419 *
420 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
421 * @throws HL7Exception if the repetition requested is more than one
422 * greater than the number of existing repetitions.
423 */
424 public DG1 getDG1(int rep) {
425 return getTyped("DG1", rep, DG1.class);
426 }
427
428 /**
429 * <p>
430 * Returns the number of existing repetitions of DG1
431 * </p>
432 *
433 */
434 public int getDG1Reps() {
435 return getReps("DG1");
436 }
437
438 /**
439 * <p>
440 * Returns a non-modifiable List containing all current existing repetitions of DG1.
441 * <p>
442 * <p>
443 * Note that unlike {@link #getDG1()}, this method will not create any reps
444 * if none are already present, so an empty list may be returned.
445 * </p>
446 *
447 */
448 public java.util.List<DG1> getDG1All() throws HL7Exception {
449 return getAllAsList("DG1", DG1.class);
450 }
451
452 /**
453 * <p>
454 * Inserts a specific repetition of DG1 (Diagnosis)
455 * </p>
456 *
457 *
458 * @see AbstractGroup#insertRepetition(Structure, int)
459 */
460 public void insertDG1(DG1 structure, int rep) throws HL7Exception {
461 super.insertRepetition( "DG1", structure, rep);
462 }
463
464
465 /**
466 * <p>
467 * Inserts a specific repetition of DG1 (Diagnosis)
468 * </p>
469 *
470 *
471 * @see AbstractGroup#insertRepetition(Structure, int)
472 */
473 public DG1 insertDG1(int rep) throws HL7Exception {
474 return (DG1)super.insertRepetition("DG1", rep);
475 }
476
477
478 /**
479 * <p>
480 * Removes a specific repetition of DG1 (Diagnosis)
481 * </p>
482 *
483 *
484 * @see AbstractGroup#removeRepetition(String, int)
485 */
486 public DG1 removeDG1(int rep) throws HL7Exception {
487 return (DG1)super.removeRepetition("DG1", rep);
488 }
489
490
491
492
493 /**
494 * <p>
495 * Returns
496 * the first repetition of
497 * DRG (Diagnosis Related Group) - creates it if necessary
498 * </p>
499 *
500 *
501 */
502 public DRG getDRG() {
503 return getTyped("DRG", DRG.class);
504 }
505
506
507 /**
508 * <p>
509 * Returns a specific repetition of
510 * DRG (Diagnosis Related Group) - creates it if necessary
511 * </p>
512 *
513 *
514 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
515 * @throws HL7Exception if the repetition requested is more than one
516 * greater than the number of existing repetitions.
517 */
518 public DRG getDRG(int rep) {
519 return getTyped("DRG", rep, DRG.class);
520 }
521
522 /**
523 * <p>
524 * Returns the number of existing repetitions of DRG
525 * </p>
526 *
527 */
528 public int getDRGReps() {
529 return getReps("DRG");
530 }
531
532 /**
533 * <p>
534 * Returns a non-modifiable List containing all current existing repetitions of DRG.
535 * <p>
536 * <p>
537 * Note that unlike {@link #getDRG()}, this method will not create any reps
538 * if none are already present, so an empty list may be returned.
539 * </p>
540 *
541 */
542 public java.util.List<DRG> getDRGAll() throws HL7Exception {
543 return getAllAsList("DRG", DRG.class);
544 }
545
546 /**
547 * <p>
548 * Inserts a specific repetition of DRG (Diagnosis Related Group)
549 * </p>
550 *
551 *
552 * @see AbstractGroup#insertRepetition(Structure, int)
553 */
554 public void insertDRG(DRG structure, int rep) throws HL7Exception {
555 super.insertRepetition( "DRG", structure, rep);
556 }
557
558
559 /**
560 * <p>
561 * Inserts a specific repetition of DRG (Diagnosis Related Group)
562 * </p>
563 *
564 *
565 * @see AbstractGroup#insertRepetition(Structure, int)
566 */
567 public DRG insertDRG(int rep) throws HL7Exception {
568 return (DRG)super.insertRepetition("DRG", rep);
569 }
570
571
572 /**
573 * <p>
574 * Removes a specific repetition of DRG (Diagnosis Related Group)
575 * </p>
576 *
577 *
578 * @see AbstractGroup#removeRepetition(String, int)
579 */
580 public DRG removeDRG(int rep) throws HL7Exception {
581 return (DRG)super.removeRepetition("DRG", rep);
582 }
583
584
585
586
587 /**
588 * <p>
589 * Returns
590 * the first repetition of
591 * AL1 (Patient Allergy Information) - creates it if necessary
592 * </p>
593 *
594 *
595 */
596 public AL1 getAL1() {
597 return getTyped("AL1", AL1.class);
598 }
599
600
601 /**
602 * <p>
603 * Returns a specific repetition of
604 * AL1 (Patient Allergy Information) - creates it if necessary
605 * </p>
606 *
607 *
608 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
609 * @throws HL7Exception if the repetition requested is more than one
610 * greater than the number of existing repetitions.
611 */
612 public AL1 getAL1(int rep) {
613 return getTyped("AL1", rep, AL1.class);
614 }
615
616 /**
617 * <p>
618 * Returns the number of existing repetitions of AL1
619 * </p>
620 *
621 */
622 public int getAL1Reps() {
623 return getReps("AL1");
624 }
625
626 /**
627 * <p>
628 * Returns a non-modifiable List containing all current existing repetitions of AL1.
629 * <p>
630 * <p>
631 * Note that unlike {@link #getAL1()}, this method will not create any reps
632 * if none are already present, so an empty list may be returned.
633 * </p>
634 *
635 */
636 public java.util.List<AL1> getAL1All() throws HL7Exception {
637 return getAllAsList("AL1", AL1.class);
638 }
639
640 /**
641 * <p>
642 * Inserts a specific repetition of AL1 (Patient Allergy Information)
643 * </p>
644 *
645 *
646 * @see AbstractGroup#insertRepetition(Structure, int)
647 */
648 public void insertAL1(AL1 structure, int rep) throws HL7Exception {
649 super.insertRepetition( "AL1", structure, rep);
650 }
651
652
653 /**
654 * <p>
655 * Inserts a specific repetition of AL1 (Patient Allergy Information)
656 * </p>
657 *
658 *
659 * @see AbstractGroup#insertRepetition(Structure, int)
660 */
661 public AL1 insertAL1(int rep) throws HL7Exception {
662 return (AL1)super.insertRepetition("AL1", rep);
663 }
664
665
666 /**
667 * <p>
668 * Removes a specific repetition of AL1 (Patient Allergy Information)
669 * </p>
670 *
671 *
672 * @see AbstractGroup#removeRepetition(String, int)
673 */
674 public AL1 removeAL1(int rep) throws HL7Exception {
675 return (AL1)super.removeRepetition("AL1", rep);
676 }
677
678
679
680
681 /**
682 * <p>
683 * Returns
684 * the first repetition of
685 * NTE (Notes and Comments) - creates it if necessary
686 * </p>
687 *
688 *
689 */
690 public NTE getNTE() {
691 return getTyped("NTE", NTE.class);
692 }
693
694
695 /**
696 * <p>
697 * Returns a specific repetition of
698 * NTE (Notes and Comments) - creates it if necessary
699 * </p>
700 *
701 *
702 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
703 * @throws HL7Exception if the repetition requested is more than one
704 * greater than the number of existing repetitions.
705 */
706 public NTE getNTE(int rep) {
707 return getTyped("NTE", rep, NTE.class);
708 }
709
710 /**
711 * <p>
712 * Returns the number of existing repetitions of NTE
713 * </p>
714 *
715 */
716 public int getNTEReps() {
717 return getReps("NTE");
718 }
719
720 /**
721 * <p>
722 * Returns a non-modifiable List containing all current existing repetitions of NTE.
723 * <p>
724 * <p>
725 * Note that unlike {@link #getNTE()}, this method will not create any reps
726 * if none are already present, so an empty list may be returned.
727 * </p>
728 *
729 */
730 public java.util.List<NTE> getNTEAll() throws HL7Exception {
731 return getAllAsList("NTE", NTE.class);
732 }
733
734 /**
735 * <p>
736 * Inserts a specific repetition of NTE (Notes and Comments)
737 * </p>
738 *
739 *
740 * @see AbstractGroup#insertRepetition(Structure, int)
741 */
742 public void insertNTE(NTE structure, int rep) throws HL7Exception {
743 super.insertRepetition( "NTE", structure, rep);
744 }
745
746
747 /**
748 * <p>
749 * Inserts a specific repetition of NTE (Notes and Comments)
750 * </p>
751 *
752 *
753 * @see AbstractGroup#insertRepetition(Structure, int)
754 */
755 public NTE insertNTE(int rep) throws HL7Exception {
756 return (NTE)super.insertRepetition("NTE", rep);
757 }
758
759
760 /**
761 * <p>
762 * Removes a specific repetition of NTE (Notes and Comments)
763 * </p>
764 *
765 *
766 * @see AbstractGroup#removeRepetition(String, int)
767 */
768 public NTE removeNTE(int rep) throws HL7Exception {
769 return (NTE)super.removeRepetition("NTE", rep);
770 }
771
772
773
774
775 /**
776 * <p>
777 * Returns
778 * the first repetition of
779 * DSP (Display Data) - creates it if necessary
780 * </p>
781 *
782 *
783 */
784 public DSP getDSP() {
785 return getTyped("DSP", DSP.class);
786 }
787
788
789 /**
790 * <p>
791 * Returns a specific repetition of
792 * DSP (Display Data) - creates it if necessary
793 * </p>
794 *
795 *
796 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
797 * @throws HL7Exception if the repetition requested is more than one
798 * greater than the number of existing repetitions.
799 */
800 public DSP getDSP(int rep) {
801 return getTyped("DSP", rep, DSP.class);
802 }
803
804 /**
805 * <p>
806 * Returns the number of existing repetitions of DSP
807 * </p>
808 *
809 */
810 public int getDSPReps() {
811 return getReps("DSP");
812 }
813
814 /**
815 * <p>
816 * Returns a non-modifiable List containing all current existing repetitions of DSP.
817 * <p>
818 * <p>
819 * Note that unlike {@link #getDSP()}, this method will not create any reps
820 * if none are already present, so an empty list may be returned.
821 * </p>
822 *
823 */
824 public java.util.List<DSP> getDSPAll() throws HL7Exception {
825 return getAllAsList("DSP", DSP.class);
826 }
827
828 /**
829 * <p>
830 * Inserts a specific repetition of DSP (Display Data)
831 * </p>
832 *
833 *
834 * @see AbstractGroup#insertRepetition(Structure, int)
835 */
836 public void insertDSP(DSP structure, int rep) throws HL7Exception {
837 super.insertRepetition( "DSP", structure, rep);
838 }
839
840
841 /**
842 * <p>
843 * Inserts a specific repetition of DSP (Display Data)
844 * </p>
845 *
846 *
847 * @see AbstractGroup#insertRepetition(Structure, int)
848 */
849 public DSP insertDSP(int rep) throws HL7Exception {
850 return (DSP)super.insertRepetition("DSP", rep);
851 }
852
853
854 /**
855 * <p>
856 * Removes a specific repetition of DSP (Display Data)
857 * </p>
858 *
859 *
860 * @see AbstractGroup#removeRepetition(String, int)
861 */
862 public DSP removeDSP(int rep) throws HL7Exception {
863 return (DSP)super.removeRepetition("DSP", rep);
864 }
865
866
867
868
869 /**
870 * <p>
871 * Returns
872 * DSC (Continuation Pointer) - creates it if necessary
873 * </p>
874 *
875 *
876 */
877 public DSC getDSC() {
878 return getTyped("DSC", DSC.class);
879 }
880
881
882
883
884 }
885