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