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