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