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.v281.message;
35
36 import ca.uhn.hl7v2.model.v281.group.*;
37 import ca.uhn.hl7v2.model.v281.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 EHC_E20 message structure (see chapter 16.3.10). 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 repeating</b> </li>
52 * <li>4: IVC (Invoice Segment) <b> </b> </li>
53 * <li>5: CTD (Contact Data) <b> repeating</b> </li>
54 * <li>6: LOC (Location Identification) <b>optional repeating</b> </li>
55 * <li>7: ROL (Role) <b>optional repeating</b> </li>
56 * <li>8: EHC_E20_PAT_INFO (a Group object) <b> repeating</b> </li>
57 * <li>9: EHC_E20_PSL_ITEM_INFO (a Group object) <b> repeating</b> </li>
58 * </ul>
59 */
60 //@SuppressWarnings("unused")
61 public class EHC_E20 extends AbstractMessage {
62
63 /**
64 * Creates a new EHC_E20 message with DefaultModelClassFactory.
65 */
66 public EHC_E20() {
67 this(new DefaultModelClassFactory());
68 }
69
70 /**
71 * Creates a new EHC_E20 message with custom ModelClassFactory.
72 */
73 public EHC_E20(ModelClassFactory factory) {
74 super(factory);
75 init(factory);
76 }
77
78 private void init(ModelClassFactory factory) {
79 try {
80 this.add(MSH.class, true, false);
81 this.add(SFT.class, false, true);
82 this.add(UAC.class, false, true);
83 this.add(IVC.class, true, false);
84 this.add(CTD.class, true, true);
85 this.add(LOC.class, false, true);
86 this.add(ROL.class, false, true);
87 this.add(EHC_E20_PAT_INFO.class, true, true);
88 this.add(EHC_E20_PSL_ITEM_INFO.class, true, true);
89 } catch(HL7Exception e) {
90 log.error("Unexpected error creating EHC_E20 - this is probably a bug in the source code generator.", e);
91 }
92 }
93
94
95 /**
96 * Returns "2.8.1"
97 */
98 public String getVersion() {
99 return "2.8.1";
100 }
101
102
103
104
105 /**
106 * <p>
107 * Returns
108 * MSH (Message Header) - creates it if necessary
109 * </p>
110 *
111 *
112 */
113 public MSH getMSH() {
114 return getTyped("MSH", MSH.class);
115 }
116
117
118
119
120
121 /**
122 * <p>
123 * Returns
124 * the first repetition of
125 * SFT (Software Segment) - creates it if necessary
126 * </p>
127 *
128 *
129 */
130 public SFT getSFT() {
131 return getTyped("SFT", SFT.class);
132 }
133
134
135 /**
136 * <p>
137 * Returns a specific repetition of
138 * SFT (Software Segment) - creates it if necessary
139 * </p>
140 *
141 *
142 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
143 * @throws HL7Exception if the repetition requested is more than one
144 * greater than the number of existing repetitions.
145 */
146 public SFT getSFT(int rep) {
147 return getTyped("SFT", rep, SFT.class);
148 }
149
150 /**
151 * <p>
152 * Returns the number of existing repetitions of SFT
153 * </p>
154 *
155 */
156 public int getSFTReps() {
157 return getReps("SFT");
158 }
159
160 /**
161 * <p>
162 * Returns a non-modifiable List containing all current existing repetitions of SFT.
163 * <p>
164 * <p>
165 * Note that unlike {@link #getSFT()}, this method will not create any reps
166 * if none are already present, so an empty list may be returned.
167 * </p>
168 *
169 */
170 public java.util.List<SFT> getSFTAll() throws HL7Exception {
171 return getAllAsList("SFT", SFT.class);
172 }
173
174 /**
175 * <p>
176 * Inserts a specific repetition of SFT (Software Segment)
177 * </p>
178 *
179 *
180 * @see AbstractGroup#insertRepetition(Structure, int)
181 */
182 public void insertSFT(SFT structure, int rep) throws HL7Exception {
183 super.insertRepetition( "SFT", structure, rep);
184 }
185
186
187 /**
188 * <p>
189 * Inserts a specific repetition of SFT (Software Segment)
190 * </p>
191 *
192 *
193 * @see AbstractGroup#insertRepetition(Structure, int)
194 */
195 public SFT insertSFT(int rep) throws HL7Exception {
196 return (SFT)super.insertRepetition("SFT", rep);
197 }
198
199
200 /**
201 * <p>
202 * Removes a specific repetition of SFT (Software Segment)
203 * </p>
204 *
205 *
206 * @see AbstractGroup#removeRepetition(String, int)
207 */
208 public SFT removeSFT(int rep) throws HL7Exception {
209 return (SFT)super.removeRepetition("SFT", rep);
210 }
211
212
213
214
215 /**
216 * <p>
217 * Returns
218 * the first repetition of
219 * UAC (User Authentication Credential Segment) - creates it if necessary
220 * </p>
221 *
222 *
223 */
224 public UAC getUAC() {
225 return getTyped("UAC", UAC.class);
226 }
227
228
229 /**
230 * <p>
231 * Returns a specific repetition of
232 * UAC (User Authentication Credential Segment) - creates it if necessary
233 * </p>
234 *
235 *
236 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
237 * @throws HL7Exception if the repetition requested is more than one
238 * greater than the number of existing repetitions.
239 */
240 public UAC getUAC(int rep) {
241 return getTyped("UAC", rep, UAC.class);
242 }
243
244 /**
245 * <p>
246 * Returns the number of existing repetitions of UAC
247 * </p>
248 *
249 */
250 public int getUACReps() {
251 return getReps("UAC");
252 }
253
254 /**
255 * <p>
256 * Returns a non-modifiable List containing all current existing repetitions of UAC.
257 * <p>
258 * <p>
259 * Note that unlike {@link #getUAC()}, this method will not create any reps
260 * if none are already present, so an empty list may be returned.
261 * </p>
262 *
263 */
264 public java.util.List<UAC> getUACAll() throws HL7Exception {
265 return getAllAsList("UAC", UAC.class);
266 }
267
268 /**
269 * <p>
270 * Inserts a specific repetition of UAC (User Authentication Credential Segment)
271 * </p>
272 *
273 *
274 * @see AbstractGroup#insertRepetition(Structure, int)
275 */
276 public void insertUAC(UAC structure, int rep) throws HL7Exception {
277 super.insertRepetition( "UAC", structure, rep);
278 }
279
280
281 /**
282 * <p>
283 * Inserts a specific repetition of UAC (User Authentication Credential Segment)
284 * </p>
285 *
286 *
287 * @see AbstractGroup#insertRepetition(Structure, int)
288 */
289 public UAC insertUAC(int rep) throws HL7Exception {
290 return (UAC)super.insertRepetition("UAC", rep);
291 }
292
293
294 /**
295 * <p>
296 * Removes a specific repetition of UAC (User Authentication Credential Segment)
297 * </p>
298 *
299 *
300 * @see AbstractGroup#removeRepetition(String, int)
301 */
302 public UAC removeUAC(int rep) throws HL7Exception {
303 return (UAC)super.removeRepetition("UAC", rep);
304 }
305
306
307
308
309 /**
310 * <p>
311 * Returns
312 * IVC (Invoice Segment) - creates it if necessary
313 * </p>
314 *
315 *
316 */
317 public IVC getIVC() {
318 return getTyped("IVC", IVC.class);
319 }
320
321
322
323
324
325 /**
326 * <p>
327 * Returns
328 * the first repetition of
329 * CTD (Contact Data) - creates it if necessary
330 * </p>
331 *
332 *
333 */
334 public CTD getCTD() {
335 return getTyped("CTD", CTD.class);
336 }
337
338
339 /**
340 * <p>
341 * Returns a specific repetition of
342 * CTD (Contact Data) - creates it if necessary
343 * </p>
344 *
345 *
346 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
347 * @throws HL7Exception if the repetition requested is more than one
348 * greater than the number of existing repetitions.
349 */
350 public CTD getCTD(int rep) {
351 return getTyped("CTD", rep, CTD.class);
352 }
353
354 /**
355 * <p>
356 * Returns the number of existing repetitions of CTD
357 * </p>
358 *
359 */
360 public int getCTDReps() {
361 return getReps("CTD");
362 }
363
364 /**
365 * <p>
366 * Returns a non-modifiable List containing all current existing repetitions of CTD.
367 * <p>
368 * <p>
369 * Note that unlike {@link #getCTD()}, this method will not create any reps
370 * if none are already present, so an empty list may be returned.
371 * </p>
372 *
373 */
374 public java.util.List<CTD> getCTDAll() throws HL7Exception {
375 return getAllAsList("CTD", CTD.class);
376 }
377
378 /**
379 * <p>
380 * Inserts a specific repetition of CTD (Contact Data)
381 * </p>
382 *
383 *
384 * @see AbstractGroup#insertRepetition(Structure, int)
385 */
386 public void insertCTD(CTD structure, int rep) throws HL7Exception {
387 super.insertRepetition( "CTD", structure, rep);
388 }
389
390
391 /**
392 * <p>
393 * Inserts a specific repetition of CTD (Contact Data)
394 * </p>
395 *
396 *
397 * @see AbstractGroup#insertRepetition(Structure, int)
398 */
399 public CTD insertCTD(int rep) throws HL7Exception {
400 return (CTD)super.insertRepetition("CTD", rep);
401 }
402
403
404 /**
405 * <p>
406 * Removes a specific repetition of CTD (Contact Data)
407 * </p>
408 *
409 *
410 * @see AbstractGroup#removeRepetition(String, int)
411 */
412 public CTD removeCTD(int rep) throws HL7Exception {
413 return (CTD)super.removeRepetition("CTD", rep);
414 }
415
416
417
418
419 /**
420 * <p>
421 * Returns
422 * the first repetition of
423 * LOC (Location Identification) - creates it if necessary
424 * </p>
425 *
426 *
427 */
428 public LOC getLOC() {
429 return getTyped("LOC", LOC.class);
430 }
431
432
433 /**
434 * <p>
435 * Returns a specific repetition of
436 * LOC (Location Identification) - creates it if necessary
437 * </p>
438 *
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 LOC getLOC(int rep) {
445 return getTyped("LOC", rep, LOC.class);
446 }
447
448 /**
449 * <p>
450 * Returns the number of existing repetitions of LOC
451 * </p>
452 *
453 */
454 public int getLOCReps() {
455 return getReps("LOC");
456 }
457
458 /**
459 * <p>
460 * Returns a non-modifiable List containing all current existing repetitions of LOC.
461 * <p>
462 * <p>
463 * Note that unlike {@link #getLOC()}, this method will not create any reps
464 * if none are already present, so an empty list may be returned.
465 * </p>
466 *
467 */
468 public java.util.List<LOC> getLOCAll() throws HL7Exception {
469 return getAllAsList("LOC", LOC.class);
470 }
471
472 /**
473 * <p>
474 * Inserts a specific repetition of LOC (Location Identification)
475 * </p>
476 *
477 *
478 * @see AbstractGroup#insertRepetition(Structure, int)
479 */
480 public void insertLOC(LOC structure, int rep) throws HL7Exception {
481 super.insertRepetition( "LOC", structure, rep);
482 }
483
484
485 /**
486 * <p>
487 * Inserts a specific repetition of LOC (Location Identification)
488 * </p>
489 *
490 *
491 * @see AbstractGroup#insertRepetition(Structure, int)
492 */
493 public LOC insertLOC(int rep) throws HL7Exception {
494 return (LOC)super.insertRepetition("LOC", rep);
495 }
496
497
498 /**
499 * <p>
500 * Removes a specific repetition of LOC (Location Identification)
501 * </p>
502 *
503 *
504 * @see AbstractGroup#removeRepetition(String, int)
505 */
506 public LOC removeLOC(int rep) throws HL7Exception {
507 return (LOC)super.removeRepetition("LOC", rep);
508 }
509
510
511
512
513 /**
514 * <p>
515 * Returns
516 * the first repetition of
517 * ROL (Role) - creates it if necessary
518 * </p>
519 *
520 *
521 */
522 public ROL getROL() {
523 return getTyped("ROL", ROL.class);
524 }
525
526
527 /**
528 * <p>
529 * Returns a specific repetition of
530 * ROL (Role) - creates it if necessary
531 * </p>
532 *
533 *
534 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
535 * @throws HL7Exception if the repetition requested is more than one
536 * greater than the number of existing repetitions.
537 */
538 public ROL getROL(int rep) {
539 return getTyped("ROL", rep, ROL.class);
540 }
541
542 /**
543 * <p>
544 * Returns the number of existing repetitions of ROL
545 * </p>
546 *
547 */
548 public int getROLReps() {
549 return getReps("ROL");
550 }
551
552 /**
553 * <p>
554 * Returns a non-modifiable List containing all current existing repetitions of ROL.
555 * <p>
556 * <p>
557 * Note that unlike {@link #getROL()}, this method will not create any reps
558 * if none are already present, so an empty list may be returned.
559 * </p>
560 *
561 */
562 public java.util.List<ROL> getROLAll() throws HL7Exception {
563 return getAllAsList("ROL", ROL.class);
564 }
565
566 /**
567 * <p>
568 * Inserts a specific repetition of ROL (Role)
569 * </p>
570 *
571 *
572 * @see AbstractGroup#insertRepetition(Structure, int)
573 */
574 public void insertROL(ROL structure, int rep) throws HL7Exception {
575 super.insertRepetition( "ROL", structure, rep);
576 }
577
578
579 /**
580 * <p>
581 * Inserts a specific repetition of ROL (Role)
582 * </p>
583 *
584 *
585 * @see AbstractGroup#insertRepetition(Structure, int)
586 */
587 public ROL insertROL(int rep) throws HL7Exception {
588 return (ROL)super.insertRepetition("ROL", rep);
589 }
590
591
592 /**
593 * <p>
594 * Removes a specific repetition of ROL (Role)
595 * </p>
596 *
597 *
598 * @see AbstractGroup#removeRepetition(String, int)
599 */
600 public ROL removeROL(int rep) throws HL7Exception {
601 return (ROL)super.removeRepetition("ROL", rep);
602 }
603
604
605
606
607 /**
608 * <p>
609 * Returns
610 * the first repetition of
611 * PAT_INFO (a Group object) - creates it if necessary
612 * </p>
613 *
614 *
615 */
616 public EHC_E20_PAT_INFO getPAT_INFO() {
617 return getTyped("PAT_INFO", EHC_E20_PAT_INFO.class);
618 }
619
620
621 /**
622 * <p>
623 * Returns a specific repetition of
624 * PAT_INFO (a Group object) - creates it if necessary
625 * </p>
626 *
627 *
628 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
629 * @throws HL7Exception if the repetition requested is more than one
630 * greater than the number of existing repetitions.
631 */
632 public EHC_E20_PAT_INFO getPAT_INFO(int rep) {
633 return getTyped("PAT_INFO", rep, EHC_E20_PAT_INFO.class);
634 }
635
636 /**
637 * <p>
638 * Returns the number of existing repetitions of PAT_INFO
639 * </p>
640 *
641 */
642 public int getPAT_INFOReps() {
643 return getReps("PAT_INFO");
644 }
645
646 /**
647 * <p>
648 * Returns a non-modifiable List containing all current existing repetitions of PAT_INFO.
649 * <p>
650 * <p>
651 * Note that unlike {@link #getPAT_INFO()}, this method will not create any reps
652 * if none are already present, so an empty list may be returned.
653 * </p>
654 *
655 */
656 public java.util.List<EHC_E20_PAT_INFO> getPAT_INFOAll() throws HL7Exception {
657 return getAllAsList("PAT_INFO", EHC_E20_PAT_INFO.class);
658 }
659
660 /**
661 * <p>
662 * Inserts a specific repetition of PAT_INFO (a Group object)
663 * </p>
664 *
665 *
666 * @see AbstractGroup#insertRepetition(Structure, int)
667 */
668 public void insertPAT_INFO(EHC_E20_PAT_INFO structure, int rep) throws HL7Exception {
669 super.insertRepetition( "PAT_INFO", structure, rep);
670 }
671
672
673 /**
674 * <p>
675 * Inserts a specific repetition of PAT_INFO (a Group object)
676 * </p>
677 *
678 *
679 * @see AbstractGroup#insertRepetition(Structure, int)
680 */
681 public EHC_E20_PAT_INFO insertPAT_INFO(int rep) throws HL7Exception {
682 return (EHC_E20_PAT_INFO)super.insertRepetition("PAT_INFO", rep);
683 }
684
685
686 /**
687 * <p>
688 * Removes a specific repetition of PAT_INFO (a Group object)
689 * </p>
690 *
691 *
692 * @see AbstractGroup#removeRepetition(String, int)
693 */
694 public EHC_E20_PAT_INFO removePAT_INFO(int rep) throws HL7Exception {
695 return (EHC_E20_PAT_INFO)super.removeRepetition("PAT_INFO", rep);
696 }
697
698
699
700
701 /**
702 * <p>
703 * Returns
704 * the first repetition of
705 * PSL_ITEM_INFO (a Group object) - creates it if necessary
706 * </p>
707 *
708 *
709 */
710 public EHC_E20_PSL_ITEM_INFO getPSL_ITEM_INFO() {
711 return getTyped("PSL_ITEM_INFO", EHC_E20_PSL_ITEM_INFO.class);
712 }
713
714
715 /**
716 * <p>
717 * Returns a specific repetition of
718 * PSL_ITEM_INFO (a Group object) - creates it if necessary
719 * </p>
720 *
721 *
722 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
723 * @throws HL7Exception if the repetition requested is more than one
724 * greater than the number of existing repetitions.
725 */
726 public EHC_E20_PSL_ITEM_INFO getPSL_ITEM_INFO(int rep) {
727 return getTyped("PSL_ITEM_INFO", rep, EHC_E20_PSL_ITEM_INFO.class);
728 }
729
730 /**
731 * <p>
732 * Returns the number of existing repetitions of PSL_ITEM_INFO
733 * </p>
734 *
735 */
736 public int getPSL_ITEM_INFOReps() {
737 return getReps("PSL_ITEM_INFO");
738 }
739
740 /**
741 * <p>
742 * Returns a non-modifiable List containing all current existing repetitions of PSL_ITEM_INFO.
743 * <p>
744 * <p>
745 * Note that unlike {@link #getPSL_ITEM_INFO()}, this method will not create any reps
746 * if none are already present, so an empty list may be returned.
747 * </p>
748 *
749 */
750 public java.util.List<EHC_E20_PSL_ITEM_INFO> getPSL_ITEM_INFOAll() throws HL7Exception {
751 return getAllAsList("PSL_ITEM_INFO", EHC_E20_PSL_ITEM_INFO.class);
752 }
753
754 /**
755 * <p>
756 * Inserts a specific repetition of PSL_ITEM_INFO (a Group object)
757 * </p>
758 *
759 *
760 * @see AbstractGroup#insertRepetition(Structure, int)
761 */
762 public void insertPSL_ITEM_INFO(EHC_E20_PSL_ITEM_INFO structure, int rep) throws HL7Exception {
763 super.insertRepetition( "PSL_ITEM_INFO", structure, rep);
764 }
765
766
767 /**
768 * <p>
769 * Inserts a specific repetition of PSL_ITEM_INFO (a Group object)
770 * </p>
771 *
772 *
773 * @see AbstractGroup#insertRepetition(Structure, int)
774 */
775 public EHC_E20_PSL_ITEM_INFO insertPSL_ITEM_INFO(int rep) throws HL7Exception {
776 return (EHC_E20_PSL_ITEM_INFO)super.insertRepetition("PSL_ITEM_INFO", rep);
777 }
778
779
780 /**
781 * <p>
782 * Removes a specific repetition of PSL_ITEM_INFO (a Group object)
783 * </p>
784 *
785 *
786 * @see AbstractGroup#removeRepetition(String, int)
787 */
788 public EHC_E20_PSL_ITEM_INFO removePSL_ITEM_INFO(int rep) throws HL7Exception {
789 return (EHC_E20_PSL_ITEM_INFO)super.removeRepetition("PSL_ITEM_INFO", rep);
790 }
791
792
793
794 }
795