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