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