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.v26.group;
035
036import ca.uhn.hl7v2.model.v26.segment.*;
037
038import java.util.List;
039
040import ca.uhn.hl7v2.HL7Exception;
041import ca.uhn.hl7v2.parser.ModelClassFactory;
042import ca.uhn.hl7v2.model.*;
043
044/**
045 * <p>Represents a RSP_K25_STAFF group structure (a Group object).
046 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
047 * This Group contains the following elements:  
048 * </p>
049 * <ul>
050                 * <li>1: STF (Staff Identification) <b> </b></li>
051                 * <li>2: PRA (Practitioner Detail) <b>optional repeating</b></li>
052                 * <li>3: ORG (Practitioner Organization Unit) <b>optional repeating</b></li>
053                 * <li>4: AFF (Professional Affiliation) <b>optional repeating</b></li>
054                 * <li>5: LAN (Language Detail) <b>optional repeating</b></li>
055                 * <li>6: EDU (Educational Detail) <b>optional repeating</b></li>
056                 * <li>7: CER (Certificate Detail) <b>optional repeating</b></li>
057 * </ul>
058 */
059@SuppressWarnings("unused")
060public class RSP_K25_STAFF extends AbstractGroup {
061
062    /** 
063     * Creates a new RSP_K25_STAFF group
064     */
065    public RSP_K25_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(STF.class, true, false);
073                          this.add(PRA.class, false, true);
074                          this.add(ORG.class, false, true);
075                          this.add(AFF.class, false, true);
076                          this.add(LAN.class, false, true);
077                          this.add(EDU.class, false, true);
078                          this.add(CER.class, false, true);
079       } catch(HL7Exception e) {
080          log.error("Unexpected error creating RSP_K25_STAFF - this is probably a bug in the source code generator.", e);
081       }
082    }
083
084    /** 
085     * Returns "2.6"
086     */
087    public String getVersion() {
088       return "2.6";
089    }
090
091
092
093    /**
094     * Returns
095     * STF (Staff Identification) - creates it if necessary
096     */
097    public STF getSTF() { 
098       STF retVal = getTyped("STF", STF.class);
099       return retVal;
100    }
101
102
103
104
105    /**
106     * Returns
107     * the first repetition of 
108     * PRA (Practitioner Detail) - creates it if necessary
109     */
110    public PRA getPRA() { 
111       PRA retVal = getTyped("PRA", PRA.class);
112       return retVal;
113    }
114
115
116    /**
117     * Returns a specific repetition of
118     * PRA (Practitioner Detail) - creates it if necessary
119     *
120     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
121     * @throws HL7Exception if the repetition requested is more than one 
122     *     greater than the number of existing repetitions.
123     */
124    public PRA getPRA(int rep) { 
125       PRA retVal = getTyped("PRA", rep, PRA.class);
126       return retVal;
127    }
128
129    /** 
130     * Returns the number of existing repetitions of PRA 
131     */ 
132    public int getPRAReps() {  
133        return getReps("PRA");
134    } 
135
136    /** 
137     * <p>
138     * Returns a non-modifiable List containing all current existing repetitions of PRA.
139     * <p>
140     * <p>
141     * Note that unlike {@link #getPRA()}, this method will not create any reps
142     * if none are already present, so an empty list may be returned.
143     * </p>
144     */ 
145    public List<PRA> getPRAAll() throws HL7Exception {
146        return getAllAsList("PRA", PRA.class);
147    } 
148
149    /**
150     * Inserts a specific repetition of PRA (Practitioner Detail)
151     * @see AbstractGroup#insertRepetition(Structure, int) 
152     */
153    public void insertPRA(PRA structure, int rep) throws HL7Exception { 
154       super.insertRepetition("PRA", structure, rep);
155    }
156
157
158    /**
159     * Inserts a specific repetition of PRA (Practitioner Detail)
160     * @see AbstractGroup#insertRepetition(Structure, int) 
161     */
162    public PRA insertPRA(int rep) throws HL7Exception { 
163       return (PRA)super.insertRepetition("PRA", rep);
164    }
165
166
167    /**
168     * Removes a specific repetition of PRA (Practitioner Detail)
169     * @see AbstractGroup#removeRepetition(String, int) 
170     */
171    public PRA removePRA(int rep) throws HL7Exception { 
172       return (PRA)super.removeRepetition("PRA", rep);
173    }
174
175
176
177    /**
178     * Returns
179     * the first repetition of 
180     * ORG (Practitioner Organization Unit) - creates it if necessary
181     */
182    public ORG getORG() { 
183       ORG retVal = getTyped("ORG", ORG.class);
184       return retVal;
185    }
186
187
188    /**
189     * Returns a specific repetition of
190     * ORG (Practitioner Organization Unit) - creates it if necessary
191     *
192     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
193     * @throws HL7Exception if the repetition requested is more than one 
194     *     greater than the number of existing repetitions.
195     */
196    public ORG getORG(int rep) { 
197       ORG retVal = getTyped("ORG", rep, ORG.class);
198       return retVal;
199    }
200
201    /** 
202     * Returns the number of existing repetitions of ORG 
203     */ 
204    public int getORGReps() {  
205        return getReps("ORG");
206    } 
207
208    /** 
209     * <p>
210     * Returns a non-modifiable List containing all current existing repetitions of ORG.
211     * <p>
212     * <p>
213     * Note that unlike {@link #getORG()}, this method will not create any reps
214     * if none are already present, so an empty list may be returned.
215     * </p>
216     */ 
217    public List<ORG> getORGAll() throws HL7Exception {
218        return getAllAsList("ORG", ORG.class);
219    } 
220
221    /**
222     * Inserts a specific repetition of ORG (Practitioner Organization Unit)
223     * @see AbstractGroup#insertRepetition(Structure, int) 
224     */
225    public void insertORG(ORG structure, int rep) throws HL7Exception { 
226       super.insertRepetition("ORG", structure, rep);
227    }
228
229
230    /**
231     * Inserts a specific repetition of ORG (Practitioner Organization Unit)
232     * @see AbstractGroup#insertRepetition(Structure, int) 
233     */
234    public ORG insertORG(int rep) throws HL7Exception { 
235       return (ORG)super.insertRepetition("ORG", rep);
236    }
237
238
239    /**
240     * Removes a specific repetition of ORG (Practitioner Organization Unit)
241     * @see AbstractGroup#removeRepetition(String, int) 
242     */
243    public ORG removeORG(int rep) throws HL7Exception { 
244       return (ORG)super.removeRepetition("ORG", rep);
245    }
246
247
248
249    /**
250     * Returns
251     * the first repetition of 
252     * AFF (Professional Affiliation) - creates it if necessary
253     */
254    public AFF getAFF() { 
255       AFF retVal = getTyped("AFF", AFF.class);
256       return retVal;
257    }
258
259
260    /**
261     * Returns a specific repetition of
262     * AFF (Professional Affiliation) - creates it if necessary
263     *
264     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
265     * @throws HL7Exception if the repetition requested is more than one 
266     *     greater than the number of existing repetitions.
267     */
268    public AFF getAFF(int rep) { 
269       AFF retVal = getTyped("AFF", rep, AFF.class);
270       return retVal;
271    }
272
273    /** 
274     * Returns the number of existing repetitions of AFF 
275     */ 
276    public int getAFFReps() {  
277        return getReps("AFF");
278    } 
279
280    /** 
281     * <p>
282     * Returns a non-modifiable List containing all current existing repetitions of AFF.
283     * <p>
284     * <p>
285     * Note that unlike {@link #getAFF()}, this method will not create any reps
286     * if none are already present, so an empty list may be returned.
287     * </p>
288     */ 
289    public List<AFF> getAFFAll() throws HL7Exception {
290        return getAllAsList("AFF", AFF.class);
291    } 
292
293    /**
294     * Inserts a specific repetition of AFF (Professional Affiliation)
295     * @see AbstractGroup#insertRepetition(Structure, int) 
296     */
297    public void insertAFF(AFF structure, int rep) throws HL7Exception { 
298       super.insertRepetition("AFF", structure, rep);
299    }
300
301
302    /**
303     * Inserts a specific repetition of AFF (Professional Affiliation)
304     * @see AbstractGroup#insertRepetition(Structure, int) 
305     */
306    public AFF insertAFF(int rep) throws HL7Exception { 
307       return (AFF)super.insertRepetition("AFF", rep);
308    }
309
310
311    /**
312     * Removes a specific repetition of AFF (Professional Affiliation)
313     * @see AbstractGroup#removeRepetition(String, int) 
314     */
315    public AFF removeAFF(int rep) throws HL7Exception { 
316       return (AFF)super.removeRepetition("AFF", rep);
317    }
318
319
320
321    /**
322     * Returns
323     * the first repetition of 
324     * LAN (Language Detail) - creates it if necessary
325     */
326    public LAN getLAN() { 
327       LAN retVal = getTyped("LAN", LAN.class);
328       return retVal;
329    }
330
331
332    /**
333     * Returns a specific repetition of
334     * LAN (Language Detail) - creates it if necessary
335     *
336     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
337     * @throws HL7Exception if the repetition requested is more than one 
338     *     greater than the number of existing repetitions.
339     */
340    public LAN getLAN(int rep) { 
341       LAN retVal = getTyped("LAN", rep, LAN.class);
342       return retVal;
343    }
344
345    /** 
346     * Returns the number of existing repetitions of LAN 
347     */ 
348    public int getLANReps() {  
349        return getReps("LAN");
350    } 
351
352    /** 
353     * <p>
354     * Returns a non-modifiable List containing all current existing repetitions of LAN.
355     * <p>
356     * <p>
357     * Note that unlike {@link #getLAN()}, this method will not create any reps
358     * if none are already present, so an empty list may be returned.
359     * </p>
360     */ 
361    public List<LAN> getLANAll() throws HL7Exception {
362        return getAllAsList("LAN", LAN.class);
363    } 
364
365    /**
366     * Inserts a specific repetition of LAN (Language Detail)
367     * @see AbstractGroup#insertRepetition(Structure, int) 
368     */
369    public void insertLAN(LAN structure, int rep) throws HL7Exception { 
370       super.insertRepetition("LAN", structure, rep);
371    }
372
373
374    /**
375     * Inserts a specific repetition of LAN (Language Detail)
376     * @see AbstractGroup#insertRepetition(Structure, int) 
377     */
378    public LAN insertLAN(int rep) throws HL7Exception { 
379       return (LAN)super.insertRepetition("LAN", rep);
380    }
381
382
383    /**
384     * Removes a specific repetition of LAN (Language Detail)
385     * @see AbstractGroup#removeRepetition(String, int) 
386     */
387    public LAN removeLAN(int rep) throws HL7Exception { 
388       return (LAN)super.removeRepetition("LAN", rep);
389    }
390
391
392
393    /**
394     * Returns
395     * the first repetition of 
396     * EDU (Educational Detail) - creates it if necessary
397     */
398    public EDU getEDU() { 
399       EDU retVal = getTyped("EDU", EDU.class);
400       return retVal;
401    }
402
403
404    /**
405     * Returns a specific repetition of
406     * EDU (Educational Detail) - creates it if necessary
407     *
408     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
409     * @throws HL7Exception if the repetition requested is more than one 
410     *     greater than the number of existing repetitions.
411     */
412    public EDU getEDU(int rep) { 
413       EDU retVal = getTyped("EDU", rep, EDU.class);
414       return retVal;
415    }
416
417    /** 
418     * Returns the number of existing repetitions of EDU 
419     */ 
420    public int getEDUReps() {  
421        return getReps("EDU");
422    } 
423
424    /** 
425     * <p>
426     * Returns a non-modifiable List containing all current existing repetitions of EDU.
427     * <p>
428     * <p>
429     * Note that unlike {@link #getEDU()}, this method will not create any reps
430     * if none are already present, so an empty list may be returned.
431     * </p>
432     */ 
433    public List<EDU> getEDUAll() throws HL7Exception {
434        return getAllAsList("EDU", EDU.class);
435    } 
436
437    /**
438     * Inserts a specific repetition of EDU (Educational Detail)
439     * @see AbstractGroup#insertRepetition(Structure, int) 
440     */
441    public void insertEDU(EDU structure, int rep) throws HL7Exception { 
442       super.insertRepetition("EDU", structure, rep);
443    }
444
445
446    /**
447     * Inserts a specific repetition of EDU (Educational Detail)
448     * @see AbstractGroup#insertRepetition(Structure, int) 
449     */
450    public EDU insertEDU(int rep) throws HL7Exception { 
451       return (EDU)super.insertRepetition("EDU", rep);
452    }
453
454
455    /**
456     * Removes a specific repetition of EDU (Educational Detail)
457     * @see AbstractGroup#removeRepetition(String, int) 
458     */
459    public EDU removeEDU(int rep) throws HL7Exception { 
460       return (EDU)super.removeRepetition("EDU", rep);
461    }
462
463
464
465    /**
466     * Returns
467     * the first repetition of 
468     * CER (Certificate Detail) - creates it if necessary
469     */
470    public CER getCER() { 
471       CER retVal = getTyped("CER", CER.class);
472       return retVal;
473    }
474
475
476    /**
477     * Returns a specific repetition of
478     * CER (Certificate Detail) - creates it if necessary
479     *
480     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
481     * @throws HL7Exception if the repetition requested is more than one 
482     *     greater than the number of existing repetitions.
483     */
484    public CER getCER(int rep) { 
485       CER retVal = getTyped("CER", rep, CER.class);
486       return retVal;
487    }
488
489    /** 
490     * Returns the number of existing repetitions of CER 
491     */ 
492    public int getCERReps() {  
493        return getReps("CER");
494    } 
495
496    /** 
497     * <p>
498     * Returns a non-modifiable List containing all current existing repetitions of CER.
499     * <p>
500     * <p>
501     * Note that unlike {@link #getCER()}, this method will not create any reps
502     * if none are already present, so an empty list may be returned.
503     * </p>
504     */ 
505    public List<CER> getCERAll() throws HL7Exception {
506        return getAllAsList("CER", CER.class);
507    } 
508
509    /**
510     * Inserts a specific repetition of CER (Certificate Detail)
511     * @see AbstractGroup#insertRepetition(Structure, int) 
512     */
513    public void insertCER(CER structure, int rep) throws HL7Exception { 
514       super.insertRepetition("CER", structure, rep);
515    }
516
517
518    /**
519     * Inserts a specific repetition of CER (Certificate Detail)
520     * @see AbstractGroup#insertRepetition(Structure, int) 
521     */
522    public CER insertCER(int rep) throws HL7Exception { 
523       return (CER)super.insertRepetition("CER", rep);
524    }
525
526
527    /**
528     * Removes a specific repetition of CER (Certificate Detail)
529     * @see AbstractGroup#removeRepetition(String, int) 
530     */
531    public CER removeCER(int rep) throws HL7Exception { 
532       return (CER)super.removeRepetition("CER", rep);
533    }
534
535
536
537}
538