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.v26.group;
35  
36  import ca.uhn.hl7v2.model.v26.segment.*;
37  
38  import ca.uhn.hl7v2.HL7Exception;
39  import ca.uhn.hl7v2.parser.ModelClassFactory;
40  import ca.uhn.hl7v2.model.*;
41  
42  /**
43   * <p>Represents a MFN_M02_MF_STAFF group structure (a Group object).
44   * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
45   * This Group contains the following elements:  
46   * </p>
47   * <ul>
48                           * <li>1: MFE (Master File Entry) <b>  </b></li>
49                           * <li>2: STF (Staff Identification) <b>  </b></li>
50                           * <li>3: PRA (Practitioner Detail) <b>optional repeating </b></li>
51                           * <li>4: ORG (Practitioner Organization Unit) <b>optional repeating </b></li>
52                           * <li>5: AFF (Professional Affiliation) <b>optional repeating </b></li>
53                           * <li>6: LAN (Language Detail) <b>optional repeating </b></li>
54                           * <li>7: EDU (Educational Detail) <b>optional repeating </b></li>
55                           * <li>8: CER (Certificate Detail) <b>optional repeating </b></li>
56                           * <li>9: NTE (Notes and Comments) <b>optional repeating </b></li>
57   * </ul>
58   */
59  //@SuppressWarnings("unused")
60  public class MFN_M02_MF_STAFF extends AbstractGroup {
61  
62      /** 
63       * Creates a new MFN_M02_MF_STAFF group
64       */
65      public MFN_M02_MF_STAFF(Group parent, ModelClassFactory factory) {
66         super(parent, factory);
67         init(factory);
68      }
69  
70      private void init(ModelClassFactory factory) {
71         try {
72                                    this.add(MFE.class, true, false, false);
73                                    this.add(STF.class, true, false, false);
74                                    this.add(PRA.class, false, true, false);
75                                    this.add(ORG.class, false, true, false);
76                                    this.add(AFF.class, false, true, false);
77                                    this.add(LAN.class, false, true, false);
78                                    this.add(EDU.class, false, true, false);
79                                    this.add(CER.class, false, true, false);
80                                    this.add(NTE.class, false, true, false);
81         } catch(HL7Exception e) {
82            log.error("Unexpected error creating MFN_M02_MF_STAFF - this is probably a bug in the source code generator.", e);
83         }
84      }
85  
86      /** 
87       * Returns "2.6"
88       */
89      public String getVersion() {
90         return "2.6";
91      }
92  
93  
94  
95      /**
96       * Returns
97       * MFE (Master File Entry) - creates it if necessary
98       */
99      public MFE getMFE() { 
100        MFE retVal = getTyped("MFE", MFE.class);
101        return retVal;
102     }
103 
104 
105 
106 
107     /**
108      * Returns
109      * STF (Staff Identification) - creates it if necessary
110      */
111     public STF getSTF() { 
112        STF retVal = getTyped("STF", STF.class);
113        return retVal;
114     }
115 
116 
117 
118 
119     /**
120      * Returns
121      * the first repetition of 
122      * PRA (Practitioner Detail) - creates it if necessary
123      */
124     public PRA getPRA() { 
125        PRA retVal = getTyped("PRA", PRA.class);
126        return retVal;
127     }
128 
129 
130     /**
131      * Returns a specific repetition of
132      * PRA (Practitioner Detail) - creates it if necessary
133      *
134      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
135      * @throws HL7Exception if the repetition requested is more than one 
136      *     greater than the number of existing repetitions.
137      */
138     public PRA getPRA(int rep) { 
139        PRA retVal = getTyped("PRA", rep, PRA.class);
140        return retVal;
141     }
142 
143     /** 
144      * Returns the number of existing repetitions of PRA 
145      */ 
146     public int getPRAReps() {  
147         return getReps("PRA");
148     } 
149 
150     /** 
151      * <p>
152      * Returns a non-modifiable List containing all current existing repetitions of PRA.
153      * <p>
154      * <p>
155      * Note that unlike {@link #getPRA()}, this method will not create any reps
156      * if none are already present, so an empty list may be returned.
157      * </p>
158      */ 
159     public java.util.List<PRA> getPRAAll() throws HL7Exception {
160     	return getAllAsList("PRA", PRA.class);
161     } 
162 
163     /**
164      * Inserts a specific repetition of PRA (Practitioner Detail)
165      * @see AbstractGroup#insertRepetition(Structure, int) 
166      */
167     public void insertPRA(PRA structure, int rep) throws HL7Exception { 
168        super.insertRepetition("PRA", structure, rep);
169     }
170 
171 
172     /**
173      * Inserts a specific repetition of PRA (Practitioner Detail)
174      * @see AbstractGroup#insertRepetition(Structure, int) 
175      */
176     public PRA insertPRA(int rep) throws HL7Exception { 
177        return (PRA)super.insertRepetition("PRA", rep);
178     }
179 
180 
181     /**
182      * Removes a specific repetition of PRA (Practitioner Detail)
183      * @see AbstractGroup#removeRepetition(String, int) 
184      */
185     public PRA removePRA(int rep) throws HL7Exception { 
186        return (PRA)super.removeRepetition("PRA", rep);
187     }
188 
189 
190 
191     /**
192      * Returns
193      * the first repetition of 
194      * ORG (Practitioner Organization Unit) - creates it if necessary
195      */
196     public ORG getORG() { 
197        ORG retVal = getTyped("ORG", ORG.class);
198        return retVal;
199     }
200 
201 
202     /**
203      * Returns a specific repetition of
204      * ORG (Practitioner Organization Unit) - creates it if necessary
205      *
206      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
207      * @throws HL7Exception if the repetition requested is more than one 
208      *     greater than the number of existing repetitions.
209      */
210     public ORG getORG(int rep) { 
211        ORG retVal = getTyped("ORG", rep, ORG.class);
212        return retVal;
213     }
214 
215     /** 
216      * Returns the number of existing repetitions of ORG 
217      */ 
218     public int getORGReps() {  
219         return getReps("ORG");
220     } 
221 
222     /** 
223      * <p>
224      * Returns a non-modifiable List containing all current existing repetitions of ORG.
225      * <p>
226      * <p>
227      * Note that unlike {@link #getORG()}, this method will not create any reps
228      * if none are already present, so an empty list may be returned.
229      * </p>
230      */ 
231     public java.util.List<ORG> getORGAll() throws HL7Exception {
232     	return getAllAsList("ORG", ORG.class);
233     } 
234 
235     /**
236      * Inserts a specific repetition of ORG (Practitioner Organization Unit)
237      * @see AbstractGroup#insertRepetition(Structure, int) 
238      */
239     public void insertORG(ORG structure, int rep) throws HL7Exception { 
240        super.insertRepetition("ORG", structure, rep);
241     }
242 
243 
244     /**
245      * Inserts a specific repetition of ORG (Practitioner Organization Unit)
246      * @see AbstractGroup#insertRepetition(Structure, int) 
247      */
248     public ORG insertORG(int rep) throws HL7Exception { 
249        return (ORG)super.insertRepetition("ORG", rep);
250     }
251 
252 
253     /**
254      * Removes a specific repetition of ORG (Practitioner Organization Unit)
255      * @see AbstractGroup#removeRepetition(String, int) 
256      */
257     public ORG removeORG(int rep) throws HL7Exception { 
258        return (ORG)super.removeRepetition("ORG", rep);
259     }
260 
261 
262 
263     /**
264      * Returns
265      * the first repetition of 
266      * AFF (Professional Affiliation) - creates it if necessary
267      */
268     public AFF getAFF() { 
269        AFF retVal = getTyped("AFF", AFF.class);
270        return retVal;
271     }
272 
273 
274     /**
275      * Returns a specific repetition of
276      * AFF (Professional Affiliation) - creates it if necessary
277      *
278      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
279      * @throws HL7Exception if the repetition requested is more than one 
280      *     greater than the number of existing repetitions.
281      */
282     public AFF getAFF(int rep) { 
283        AFF retVal = getTyped("AFF", rep, AFF.class);
284        return retVal;
285     }
286 
287     /** 
288      * Returns the number of existing repetitions of AFF 
289      */ 
290     public int getAFFReps() {  
291         return getReps("AFF");
292     } 
293 
294     /** 
295      * <p>
296      * Returns a non-modifiable List containing all current existing repetitions of AFF.
297      * <p>
298      * <p>
299      * Note that unlike {@link #getAFF()}, this method will not create any reps
300      * if none are already present, so an empty list may be returned.
301      * </p>
302      */ 
303     public java.util.List<AFF> getAFFAll() throws HL7Exception {
304     	return getAllAsList("AFF", AFF.class);
305     } 
306 
307     /**
308      * Inserts a specific repetition of AFF (Professional Affiliation)
309      * @see AbstractGroup#insertRepetition(Structure, int) 
310      */
311     public void insertAFF(AFF structure, int rep) throws HL7Exception { 
312        super.insertRepetition("AFF", structure, rep);
313     }
314 
315 
316     /**
317      * Inserts a specific repetition of AFF (Professional Affiliation)
318      * @see AbstractGroup#insertRepetition(Structure, int) 
319      */
320     public AFF insertAFF(int rep) throws HL7Exception { 
321        return (AFF)super.insertRepetition("AFF", rep);
322     }
323 
324 
325     /**
326      * Removes a specific repetition of AFF (Professional Affiliation)
327      * @see AbstractGroup#removeRepetition(String, int) 
328      */
329     public AFF removeAFF(int rep) throws HL7Exception { 
330        return (AFF)super.removeRepetition("AFF", rep);
331     }
332 
333 
334 
335     /**
336      * Returns
337      * the first repetition of 
338      * LAN (Language Detail) - creates it if necessary
339      */
340     public LAN getLAN() { 
341        LAN retVal = getTyped("LAN", LAN.class);
342        return retVal;
343     }
344 
345 
346     /**
347      * Returns a specific repetition of
348      * LAN (Language Detail) - creates it if necessary
349      *
350      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
351      * @throws HL7Exception if the repetition requested is more than one 
352      *     greater than the number of existing repetitions.
353      */
354     public LAN getLAN(int rep) { 
355        LAN retVal = getTyped("LAN", rep, LAN.class);
356        return retVal;
357     }
358 
359     /** 
360      * Returns the number of existing repetitions of LAN 
361      */ 
362     public int getLANReps() {  
363         return getReps("LAN");
364     } 
365 
366     /** 
367      * <p>
368      * Returns a non-modifiable List containing all current existing repetitions of LAN.
369      * <p>
370      * <p>
371      * Note that unlike {@link #getLAN()}, this method will not create any reps
372      * if none are already present, so an empty list may be returned.
373      * </p>
374      */ 
375     public java.util.List<LAN> getLANAll() throws HL7Exception {
376     	return getAllAsList("LAN", LAN.class);
377     } 
378 
379     /**
380      * Inserts a specific repetition of LAN (Language Detail)
381      * @see AbstractGroup#insertRepetition(Structure, int) 
382      */
383     public void insertLAN(LAN structure, int rep) throws HL7Exception { 
384        super.insertRepetition("LAN", structure, rep);
385     }
386 
387 
388     /**
389      * Inserts a specific repetition of LAN (Language Detail)
390      * @see AbstractGroup#insertRepetition(Structure, int) 
391      */
392     public LAN insertLAN(int rep) throws HL7Exception { 
393        return (LAN)super.insertRepetition("LAN", rep);
394     }
395 
396 
397     /**
398      * Removes a specific repetition of LAN (Language Detail)
399      * @see AbstractGroup#removeRepetition(String, int) 
400      */
401     public LAN removeLAN(int rep) throws HL7Exception { 
402        return (LAN)super.removeRepetition("LAN", rep);
403     }
404 
405 
406 
407     /**
408      * Returns
409      * the first repetition of 
410      * EDU (Educational Detail) - creates it if necessary
411      */
412     public EDU getEDU() { 
413        EDU retVal = getTyped("EDU", EDU.class);
414        return retVal;
415     }
416 
417 
418     /**
419      * Returns a specific repetition of
420      * EDU (Educational Detail) - creates it if necessary
421      *
422      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
423      * @throws HL7Exception if the repetition requested is more than one 
424      *     greater than the number of existing repetitions.
425      */
426     public EDU getEDU(int rep) { 
427        EDU retVal = getTyped("EDU", rep, EDU.class);
428        return retVal;
429     }
430 
431     /** 
432      * Returns the number of existing repetitions of EDU 
433      */ 
434     public int getEDUReps() {  
435         return getReps("EDU");
436     } 
437 
438     /** 
439      * <p>
440      * Returns a non-modifiable List containing all current existing repetitions of EDU.
441      * <p>
442      * <p>
443      * Note that unlike {@link #getEDU()}, this method will not create any reps
444      * if none are already present, so an empty list may be returned.
445      * </p>
446      */ 
447     public java.util.List<EDU> getEDUAll() throws HL7Exception {
448     	return getAllAsList("EDU", EDU.class);
449     } 
450 
451     /**
452      * Inserts a specific repetition of EDU (Educational Detail)
453      * @see AbstractGroup#insertRepetition(Structure, int) 
454      */
455     public void insertEDU(EDU structure, int rep) throws HL7Exception { 
456        super.insertRepetition("EDU", structure, rep);
457     }
458 
459 
460     /**
461      * Inserts a specific repetition of EDU (Educational Detail)
462      * @see AbstractGroup#insertRepetition(Structure, int) 
463      */
464     public EDU insertEDU(int rep) throws HL7Exception { 
465        return (EDU)super.insertRepetition("EDU", rep);
466     }
467 
468 
469     /**
470      * Removes a specific repetition of EDU (Educational Detail)
471      * @see AbstractGroup#removeRepetition(String, int) 
472      */
473     public EDU removeEDU(int rep) throws HL7Exception { 
474        return (EDU)super.removeRepetition("EDU", rep);
475     }
476 
477 
478 
479     /**
480      * Returns
481      * the first repetition of 
482      * CER (Certificate Detail) - creates it if necessary
483      */
484     public CER getCER() { 
485        CER retVal = getTyped("CER", CER.class);
486        return retVal;
487     }
488 
489 
490     /**
491      * Returns a specific repetition of
492      * CER (Certificate Detail) - creates it if necessary
493      *
494      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
495      * @throws HL7Exception if the repetition requested is more than one 
496      *     greater than the number of existing repetitions.
497      */
498     public CER getCER(int rep) { 
499        CER retVal = getTyped("CER", rep, CER.class);
500        return retVal;
501     }
502 
503     /** 
504      * Returns the number of existing repetitions of CER 
505      */ 
506     public int getCERReps() {  
507         return getReps("CER");
508     } 
509 
510     /** 
511      * <p>
512      * Returns a non-modifiable List containing all current existing repetitions of CER.
513      * <p>
514      * <p>
515      * Note that unlike {@link #getCER()}, this method will not create any reps
516      * if none are already present, so an empty list may be returned.
517      * </p>
518      */ 
519     public java.util.List<CER> getCERAll() throws HL7Exception {
520     	return getAllAsList("CER", CER.class);
521     } 
522 
523     /**
524      * Inserts a specific repetition of CER (Certificate Detail)
525      * @see AbstractGroup#insertRepetition(Structure, int) 
526      */
527     public void insertCER(CER structure, int rep) throws HL7Exception { 
528        super.insertRepetition("CER", structure, rep);
529     }
530 
531 
532     /**
533      * Inserts a specific repetition of CER (Certificate Detail)
534      * @see AbstractGroup#insertRepetition(Structure, int) 
535      */
536     public CER insertCER(int rep) throws HL7Exception { 
537        return (CER)super.insertRepetition("CER", rep);
538     }
539 
540 
541     /**
542      * Removes a specific repetition of CER (Certificate Detail)
543      * @see AbstractGroup#removeRepetition(String, int) 
544      */
545     public CER removeCER(int rep) throws HL7Exception { 
546        return (CER)super.removeRepetition("CER", rep);
547     }
548 
549 
550 
551     /**
552      * Returns
553      * the first repetition of 
554      * NTE (Notes and Comments) - creates it if necessary
555      */
556     public NTE getNTE() { 
557        NTE retVal = getTyped("NTE", NTE.class);
558        return retVal;
559     }
560 
561 
562     /**
563      * Returns a specific repetition of
564      * NTE (Notes and Comments) - creates it if necessary
565      *
566      * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
567      * @throws HL7Exception if the repetition requested is more than one 
568      *     greater than the number of existing repetitions.
569      */
570     public NTE getNTE(int rep) { 
571        NTE retVal = getTyped("NTE", rep, NTE.class);
572        return retVal;
573     }
574 
575     /** 
576      * Returns the number of existing repetitions of NTE 
577      */ 
578     public int getNTEReps() {  
579         return getReps("NTE");
580     } 
581 
582     /** 
583      * <p>
584      * Returns a non-modifiable List containing all current existing repetitions of NTE.
585      * <p>
586      * <p>
587      * Note that unlike {@link #getNTE()}, this method will not create any reps
588      * if none are already present, so an empty list may be returned.
589      * </p>
590      */ 
591     public java.util.List<NTE> getNTEAll() throws HL7Exception {
592     	return getAllAsList("NTE", NTE.class);
593     } 
594 
595     /**
596      * Inserts a specific repetition of NTE (Notes and Comments)
597      * @see AbstractGroup#insertRepetition(Structure, int) 
598      */
599     public void insertNTE(NTE structure, int rep) throws HL7Exception { 
600        super.insertRepetition("NTE", structure, rep);
601     }
602 
603 
604     /**
605      * Inserts a specific repetition of NTE (Notes and Comments)
606      * @see AbstractGroup#insertRepetition(Structure, int) 
607      */
608     public NTE insertNTE(int rep) throws HL7Exception { 
609        return (NTE)super.insertRepetition("NTE", rep);
610     }
611 
612 
613     /**
614      * Removes a specific repetition of NTE (Notes and Comments)
615      * @see AbstractGroup#removeRepetition(String, int) 
616      */
617     public NTE removeNTE(int rep) throws HL7Exception { 
618        return (NTE)super.removeRepetition("NTE", rep);
619     }
620 
621 
622 
623 }
624