001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v27.group;
035
036import ca.uhn.hl7v2.model.v27.segment.*;
037
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.model.*;
041
042/**
043 * <p>Represents a MFN_M02_MF_STAFF group structure (a Group object).
044 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
045 * This Group contains the following elements:  
046 * </p>
047 * <ul>
048                         * <li>1: MFE (Master File Entry) <b>  </b></li>
049                         * <li>2: STF (Staff Identification) <b>  </b></li>
050                         * <li>3: PRA (Practitioner Detail) <b>optional repeating </b></li>
051                         * <li>4: ORG (Practitioner Organization Unit s) <b>optional repeating </b></li>
052                         * <li>5: AFF (Professional Affiliation) <b>optional repeating </b></li>
053                         * <li>6: LAN (Language Detail) <b>optional repeating </b></li>
054                         * <li>7: EDU (Educational Detail) <b>optional repeating </b></li>
055                         * <li>8: CER (Certificate Detail) <b>optional repeating </b></li>
056                         * <li>9: NTE (Notes and Comments) <b>optional repeating </b></li>
057 * </ul>
058 */
059//@SuppressWarnings("unused")
060public class MFN_M02_MF_STAFF extends AbstractGroup {
061
062    /** 
063     * Creates a new MFN_M02_MF_STAFF group
064     */
065    public MFN_M02_MF_STAFF(Group parent, ModelClassFactory factory) {
066       super(parent, factory);
067       init(factory);
068    }
069
070    private void init(ModelClassFactory factory) {
071       try {
072                                  this.add(MFE.class, true, false, false);
073                                  this.add(STF.class, true, false, false);
074                                  this.add(PRA.class, false, true, false);
075                                  this.add(ORG.class, false, true, false);
076                                  this.add(AFF.class, false, true, false);
077                                  this.add(LAN.class, false, true, false);
078                                  this.add(EDU.class, false, true, false);
079                                  this.add(CER.class, false, true, false);
080                                  this.add(NTE.class, false, true, false);
081       } catch(HL7Exception e) {
082          log.error("Unexpected error creating MFN_M02_MF_STAFF - this is probably a bug in the source code generator.", e);
083       }
084    }
085
086    /** 
087     * Returns "2.7"
088     */
089    public String getVersion() {
090       return "2.7";
091    }
092
093
094
095    /**
096     * Returns
097     * MFE (Master File Entry) - creates it if necessary
098     */
099    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 s) - 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 s) - 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 s)
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 s)
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 s)
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