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