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.message;
035
036import ca.uhn.hl7v2.model.v26.group.*;
037import ca.uhn.hl7v2.model.v26.segment.*;
038
039import ca.uhn.hl7v2.HL7Exception;
040import ca.uhn.hl7v2.parser.ModelClassFactory;
041import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
042import ca.uhn.hl7v2.model.*;
043
044
045/**
046 * <p>Represents a PMU_B01 message structure (see chapter 15.3.1). This structure contains the 
047 * following elements: </p>
048 * <ul>
049                                 * <li>1: MSH (Message Header) <b> </b> </li>
050                                 * <li>2: SFT (Software Segment) <b>optional repeating</b> </li>
051                                 * <li>3: UAC (User Authentication Credential Segment) <b>optional </b> </li>
052                                 * <li>4: EVN (Event Type) <b> </b> </li>
053                                 * <li>5: STF (Staff Identification) <b> </b> </li>
054                                 * <li>6: PRA (Practitioner Detail) <b>optional repeating</b> </li>
055                                 * <li>7: ORG (Practitioner Organization Unit) <b>optional repeating</b> </li>
056                                 * <li>8: AFF (Professional Affiliation) <b>optional repeating</b> </li>
057                                 * <li>9: LAN (Language Detail) <b>optional repeating</b> </li>
058                                 * <li>10: EDU (Educational Detail) <b>optional repeating</b> </li>
059                                 * <li>11: CER (Certificate Detail) <b>optional repeating</b> </li>
060 * </ul>
061 */
062//@SuppressWarnings("unused")
063public class PMU_B01 extends AbstractMessage  {
064
065    /**
066     * Creates a new PMU_B01 message with DefaultModelClassFactory. 
067     */ 
068    public PMU_B01() { 
069       this(new DefaultModelClassFactory());
070    }
071
072    /** 
073     * Creates a new PMU_B01 message with custom ModelClassFactory.
074     */
075    public PMU_B01(ModelClassFactory factory) {
076       super(factory);
077       init(factory);
078    }
079
080    private void init(ModelClassFactory factory) {
081       try {
082                          this.add(MSH.class, true, false);
083                                  this.add(SFT.class, false, true);
084                                  this.add(UAC.class, false, false);
085                                  this.add(EVN.class, true, false);
086                                  this.add(STF.class, true, false);
087                                  this.add(PRA.class, false, true);
088                                  this.add(ORG.class, false, true);
089                                  this.add(AFF.class, false, true);
090                                  this.add(LAN.class, false, true);
091                                  this.add(EDU.class, false, true);
092                                  this.add(CER.class, false, true);
093               } catch(HL7Exception e) {
094          log.error("Unexpected error creating PMU_B01 - this is probably a bug in the source code generator.", e);
095       }
096    }
097
098
099    /** 
100     * Returns "2.6"
101     */
102    public String getVersion() {
103       return "2.6";
104    }
105
106
107
108
109    /**
110     * <p>
111     * Returns
112     * MSH (Message Header) - creates it if necessary
113     * </p>
114     * 
115     *
116     */
117    public MSH getMSH() { 
118       return getTyped("MSH", MSH.class);
119    }
120
121
122
123
124
125    /**
126     * <p>
127     * Returns
128     * the first repetition of 
129     * SFT (Software Segment) - creates it if necessary
130     * </p>
131     * 
132     *
133     */
134    public SFT getSFT() { 
135       return getTyped("SFT", SFT.class);
136    }
137
138
139    /**
140     * <p>
141     * Returns a specific repetition of
142     * SFT (Software Segment) - creates it if necessary
143     * </p>
144     * 
145     *
146     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
147     * @throws HL7Exception if the repetition requested is more than one 
148     *     greater than the number of existing repetitions.
149     */
150    public SFT getSFT(int rep) { 
151       return getTyped("SFT", rep, SFT.class);
152    }
153
154    /** 
155     * <p>
156     * Returns the number of existing repetitions of SFT 
157     * </p>
158     * 
159     */ 
160    public int getSFTReps() { 
161        return getReps("SFT");
162    } 
163
164    /** 
165     * <p>
166     * Returns a non-modifiable List containing all current existing repetitions of SFT.
167     * <p>
168     * <p>
169     * Note that unlike {@link #getSFT()}, this method will not create any reps
170     * if none are already present, so an empty list may be returned.
171     * </p>
172     * 
173     */ 
174    public java.util.List<SFT> getSFTAll() throws HL7Exception {
175        return getAllAsList("SFT", SFT.class);
176    } 
177
178    /**
179     * <p>
180     * Inserts a specific repetition of SFT (Software Segment)
181     * </p>
182     * 
183     *
184     * @see AbstractGroup#insertRepetition(Structure, int) 
185     */
186    public void insertSFT(SFT structure, int rep) throws HL7Exception { 
187       super.insertRepetition( "SFT", structure, rep);
188    }
189
190
191    /**
192     * <p>
193     * Inserts a specific repetition of SFT (Software Segment)
194     * </p>
195     * 
196     *
197     * @see AbstractGroup#insertRepetition(Structure, int) 
198     */
199    public SFT insertSFT(int rep) throws HL7Exception { 
200       return (SFT)super.insertRepetition("SFT", rep);
201    }
202
203
204    /**
205     * <p>
206     * Removes a specific repetition of SFT (Software Segment)
207     * </p>
208     * 
209     *
210     * @see AbstractGroup#removeRepetition(String, int) 
211     */
212    public SFT removeSFT(int rep) throws HL7Exception { 
213       return (SFT)super.removeRepetition("SFT", rep);
214    }
215
216
217
218
219    /**
220     * <p>
221     * Returns
222     * UAC (User Authentication Credential Segment) - creates it if necessary
223     * </p>
224     * 
225     *
226     */
227    public UAC getUAC() { 
228       return getTyped("UAC", UAC.class);
229    }
230
231
232
233
234
235    /**
236     * <p>
237     * Returns
238     * EVN (Event Type) - creates it if necessary
239     * </p>
240     * 
241     *
242     */
243    public EVN getEVN() { 
244       return getTyped("EVN", EVN.class);
245    }
246
247
248
249
250
251    /**
252     * <p>
253     * Returns
254     * STF (Staff Identification) - creates it if necessary
255     * </p>
256     * 
257     *
258     */
259    public STF getSTF() { 
260       return getTyped("STF", STF.class);
261    }
262
263
264
265
266
267    /**
268     * <p>
269     * Returns
270     * the first repetition of 
271     * PRA (Practitioner Detail) - creates it if necessary
272     * </p>
273     * 
274     *
275     */
276    public PRA getPRA() { 
277       return getTyped("PRA", PRA.class);
278    }
279
280
281    /**
282     * <p>
283     * Returns a specific repetition of
284     * PRA (Practitioner Detail) - creates it if necessary
285     * </p>
286     * 
287     *
288     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
289     * @throws HL7Exception if the repetition requested is more than one 
290     *     greater than the number of existing repetitions.
291     */
292    public PRA getPRA(int rep) { 
293       return getTyped("PRA", rep, PRA.class);
294    }
295
296    /** 
297     * <p>
298     * Returns the number of existing repetitions of PRA 
299     * </p>
300     * 
301     */ 
302    public int getPRAReps() { 
303        return getReps("PRA");
304    } 
305
306    /** 
307     * <p>
308     * Returns a non-modifiable List containing all current existing repetitions of PRA.
309     * <p>
310     * <p>
311     * Note that unlike {@link #getPRA()}, this method will not create any reps
312     * if none are already present, so an empty list may be returned.
313     * </p>
314     * 
315     */ 
316    public java.util.List<PRA> getPRAAll() throws HL7Exception {
317        return getAllAsList("PRA", PRA.class);
318    } 
319
320    /**
321     * <p>
322     * Inserts a specific repetition of PRA (Practitioner Detail)
323     * </p>
324     * 
325     *
326     * @see AbstractGroup#insertRepetition(Structure, int) 
327     */
328    public void insertPRA(PRA structure, int rep) throws HL7Exception { 
329       super.insertRepetition( "PRA", structure, rep);
330    }
331
332
333    /**
334     * <p>
335     * Inserts a specific repetition of PRA (Practitioner Detail)
336     * </p>
337     * 
338     *
339     * @see AbstractGroup#insertRepetition(Structure, int) 
340     */
341    public PRA insertPRA(int rep) throws HL7Exception { 
342       return (PRA)super.insertRepetition("PRA", rep);
343    }
344
345
346    /**
347     * <p>
348     * Removes a specific repetition of PRA (Practitioner Detail)
349     * </p>
350     * 
351     *
352     * @see AbstractGroup#removeRepetition(String, int) 
353     */
354    public PRA removePRA(int rep) throws HL7Exception { 
355       return (PRA)super.removeRepetition("PRA", rep);
356    }
357
358
359
360
361    /**
362     * <p>
363     * Returns
364     * the first repetition of 
365     * ORG (Practitioner Organization Unit) - creates it if necessary
366     * </p>
367     * 
368     *
369     */
370    public ORG getORG() { 
371       return getTyped("ORG", ORG.class);
372    }
373
374
375    /**
376     * <p>
377     * Returns a specific repetition of
378     * ORG (Practitioner Organization Unit) - creates it if necessary
379     * </p>
380     * 
381     *
382     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
383     * @throws HL7Exception if the repetition requested is more than one 
384     *     greater than the number of existing repetitions.
385     */
386    public ORG getORG(int rep) { 
387       return getTyped("ORG", rep, ORG.class);
388    }
389
390    /** 
391     * <p>
392     * Returns the number of existing repetitions of ORG 
393     * </p>
394     * 
395     */ 
396    public int getORGReps() { 
397        return getReps("ORG");
398    } 
399
400    /** 
401     * <p>
402     * Returns a non-modifiable List containing all current existing repetitions of ORG.
403     * <p>
404     * <p>
405     * Note that unlike {@link #getORG()}, this method will not create any reps
406     * if none are already present, so an empty list may be returned.
407     * </p>
408     * 
409     */ 
410    public java.util.List<ORG> getORGAll() throws HL7Exception {
411        return getAllAsList("ORG", ORG.class);
412    } 
413
414    /**
415     * <p>
416     * Inserts a specific repetition of ORG (Practitioner Organization Unit)
417     * </p>
418     * 
419     *
420     * @see AbstractGroup#insertRepetition(Structure, int) 
421     */
422    public void insertORG(ORG structure, int rep) throws HL7Exception { 
423       super.insertRepetition( "ORG", structure, rep);
424    }
425
426
427    /**
428     * <p>
429     * Inserts a specific repetition of ORG (Practitioner Organization Unit)
430     * </p>
431     * 
432     *
433     * @see AbstractGroup#insertRepetition(Structure, int) 
434     */
435    public ORG insertORG(int rep) throws HL7Exception { 
436       return (ORG)super.insertRepetition("ORG", rep);
437    }
438
439
440    /**
441     * <p>
442     * Removes a specific repetition of ORG (Practitioner Organization Unit)
443     * </p>
444     * 
445     *
446     * @see AbstractGroup#removeRepetition(String, int) 
447     */
448    public ORG removeORG(int rep) throws HL7Exception { 
449       return (ORG)super.removeRepetition("ORG", rep);
450    }
451
452
453
454
455    /**
456     * <p>
457     * Returns
458     * the first repetition of 
459     * AFF (Professional Affiliation) - creates it if necessary
460     * </p>
461     * 
462     *
463     */
464    public AFF getAFF() { 
465       return getTyped("AFF", AFF.class);
466    }
467
468
469    /**
470     * <p>
471     * Returns a specific repetition of
472     * AFF (Professional Affiliation) - creates it if necessary
473     * </p>
474     * 
475     *
476     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
477     * @throws HL7Exception if the repetition requested is more than one 
478     *     greater than the number of existing repetitions.
479     */
480    public AFF getAFF(int rep) { 
481       return getTyped("AFF", rep, AFF.class);
482    }
483
484    /** 
485     * <p>
486     * Returns the number of existing repetitions of AFF 
487     * </p>
488     * 
489     */ 
490    public int getAFFReps() { 
491        return getReps("AFF");
492    } 
493
494    /** 
495     * <p>
496     * Returns a non-modifiable List containing all current existing repetitions of AFF.
497     * <p>
498     * <p>
499     * Note that unlike {@link #getAFF()}, this method will not create any reps
500     * if none are already present, so an empty list may be returned.
501     * </p>
502     * 
503     */ 
504    public java.util.List<AFF> getAFFAll() throws HL7Exception {
505        return getAllAsList("AFF", AFF.class);
506    } 
507
508    /**
509     * <p>
510     * Inserts a specific repetition of AFF (Professional Affiliation)
511     * </p>
512     * 
513     *
514     * @see AbstractGroup#insertRepetition(Structure, int) 
515     */
516    public void insertAFF(AFF structure, int rep) throws HL7Exception { 
517       super.insertRepetition( "AFF", structure, rep);
518    }
519
520
521    /**
522     * <p>
523     * Inserts a specific repetition of AFF (Professional Affiliation)
524     * </p>
525     * 
526     *
527     * @see AbstractGroup#insertRepetition(Structure, int) 
528     */
529    public AFF insertAFF(int rep) throws HL7Exception { 
530       return (AFF)super.insertRepetition("AFF", rep);
531    }
532
533
534    /**
535     * <p>
536     * Removes a specific repetition of AFF (Professional Affiliation)
537     * </p>
538     * 
539     *
540     * @see AbstractGroup#removeRepetition(String, int) 
541     */
542    public AFF removeAFF(int rep) throws HL7Exception { 
543       return (AFF)super.removeRepetition("AFF", rep);
544    }
545
546
547
548
549    /**
550     * <p>
551     * Returns
552     * the first repetition of 
553     * LAN (Language Detail) - creates it if necessary
554     * </p>
555     * 
556     *
557     */
558    public LAN getLAN() { 
559       return getTyped("LAN", LAN.class);
560    }
561
562
563    /**
564     * <p>
565     * Returns a specific repetition of
566     * LAN (Language Detail) - creates it if necessary
567     * </p>
568     * 
569     *
570     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
571     * @throws HL7Exception if the repetition requested is more than one 
572     *     greater than the number of existing repetitions.
573     */
574    public LAN getLAN(int rep) { 
575       return getTyped("LAN", rep, LAN.class);
576    }
577
578    /** 
579     * <p>
580     * Returns the number of existing repetitions of LAN 
581     * </p>
582     * 
583     */ 
584    public int getLANReps() { 
585        return getReps("LAN");
586    } 
587
588    /** 
589     * <p>
590     * Returns a non-modifiable List containing all current existing repetitions of LAN.
591     * <p>
592     * <p>
593     * Note that unlike {@link #getLAN()}, this method will not create any reps
594     * if none are already present, so an empty list may be returned.
595     * </p>
596     * 
597     */ 
598    public java.util.List<LAN> getLANAll() throws HL7Exception {
599        return getAllAsList("LAN", LAN.class);
600    } 
601
602    /**
603     * <p>
604     * Inserts a specific repetition of LAN (Language Detail)
605     * </p>
606     * 
607     *
608     * @see AbstractGroup#insertRepetition(Structure, int) 
609     */
610    public void insertLAN(LAN structure, int rep) throws HL7Exception { 
611       super.insertRepetition( "LAN", structure, rep);
612    }
613
614
615    /**
616     * <p>
617     * Inserts a specific repetition of LAN (Language Detail)
618     * </p>
619     * 
620     *
621     * @see AbstractGroup#insertRepetition(Structure, int) 
622     */
623    public LAN insertLAN(int rep) throws HL7Exception { 
624       return (LAN)super.insertRepetition("LAN", rep);
625    }
626
627
628    /**
629     * <p>
630     * Removes a specific repetition of LAN (Language Detail)
631     * </p>
632     * 
633     *
634     * @see AbstractGroup#removeRepetition(String, int) 
635     */
636    public LAN removeLAN(int rep) throws HL7Exception { 
637       return (LAN)super.removeRepetition("LAN", rep);
638    }
639
640
641
642
643    /**
644     * <p>
645     * Returns
646     * the first repetition of 
647     * EDU (Educational Detail) - creates it if necessary
648     * </p>
649     * 
650     *
651     */
652    public EDU getEDU() { 
653       return getTyped("EDU", EDU.class);
654    }
655
656
657    /**
658     * <p>
659     * Returns a specific repetition of
660     * EDU (Educational Detail) - creates it if necessary
661     * </p>
662     * 
663     *
664     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
665     * @throws HL7Exception if the repetition requested is more than one 
666     *     greater than the number of existing repetitions.
667     */
668    public EDU getEDU(int rep) { 
669       return getTyped("EDU", rep, EDU.class);
670    }
671
672    /** 
673     * <p>
674     * Returns the number of existing repetitions of EDU 
675     * </p>
676     * 
677     */ 
678    public int getEDUReps() { 
679        return getReps("EDU");
680    } 
681
682    /** 
683     * <p>
684     * Returns a non-modifiable List containing all current existing repetitions of EDU.
685     * <p>
686     * <p>
687     * Note that unlike {@link #getEDU()}, this method will not create any reps
688     * if none are already present, so an empty list may be returned.
689     * </p>
690     * 
691     */ 
692    public java.util.List<EDU> getEDUAll() throws HL7Exception {
693        return getAllAsList("EDU", EDU.class);
694    } 
695
696    /**
697     * <p>
698     * Inserts a specific repetition of EDU (Educational Detail)
699     * </p>
700     * 
701     *
702     * @see AbstractGroup#insertRepetition(Structure, int) 
703     */
704    public void insertEDU(EDU structure, int rep) throws HL7Exception { 
705       super.insertRepetition( "EDU", structure, rep);
706    }
707
708
709    /**
710     * <p>
711     * Inserts a specific repetition of EDU (Educational Detail)
712     * </p>
713     * 
714     *
715     * @see AbstractGroup#insertRepetition(Structure, int) 
716     */
717    public EDU insertEDU(int rep) throws HL7Exception { 
718       return (EDU)super.insertRepetition("EDU", rep);
719    }
720
721
722    /**
723     * <p>
724     * Removes a specific repetition of EDU (Educational Detail)
725     * </p>
726     * 
727     *
728     * @see AbstractGroup#removeRepetition(String, int) 
729     */
730    public EDU removeEDU(int rep) throws HL7Exception { 
731       return (EDU)super.removeRepetition("EDU", rep);
732    }
733
734
735
736
737    /**
738     * <p>
739     * Returns
740     * the first repetition of 
741     * CER (Certificate Detail) - creates it if necessary
742     * </p>
743     * 
744     *
745     */
746    public CER getCER() { 
747       return getTyped("CER", CER.class);
748    }
749
750
751    /**
752     * <p>
753     * Returns a specific repetition of
754     * CER (Certificate Detail) - creates it if necessary
755     * </p>
756     * 
757     *
758     * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0)
759     * @throws HL7Exception if the repetition requested is more than one 
760     *     greater than the number of existing repetitions.
761     */
762    public CER getCER(int rep) { 
763       return getTyped("CER", rep, CER.class);
764    }
765
766    /** 
767     * <p>
768     * Returns the number of existing repetitions of CER 
769     * </p>
770     * 
771     */ 
772    public int getCERReps() { 
773        return getReps("CER");
774    } 
775
776    /** 
777     * <p>
778     * Returns a non-modifiable List containing all current existing repetitions of CER.
779     * <p>
780     * <p>
781     * Note that unlike {@link #getCER()}, this method will not create any reps
782     * if none are already present, so an empty list may be returned.
783     * </p>
784     * 
785     */ 
786    public java.util.List<CER> getCERAll() throws HL7Exception {
787        return getAllAsList("CER", CER.class);
788    } 
789
790    /**
791     * <p>
792     * Inserts a specific repetition of CER (Certificate Detail)
793     * </p>
794     * 
795     *
796     * @see AbstractGroup#insertRepetition(Structure, int) 
797     */
798    public void insertCER(CER structure, int rep) throws HL7Exception { 
799       super.insertRepetition( "CER", structure, rep);
800    }
801
802
803    /**
804     * <p>
805     * Inserts a specific repetition of CER (Certificate Detail)
806     * </p>
807     * 
808     *
809     * @see AbstractGroup#insertRepetition(Structure, int) 
810     */
811    public CER insertCER(int rep) throws HL7Exception { 
812       return (CER)super.insertRepetition("CER", rep);
813    }
814
815
816    /**
817     * <p>
818     * Removes a specific repetition of CER (Certificate Detail)
819     * </p>
820     * 
821     *
822     * @see AbstractGroup#removeRepetition(String, int) 
823     */
824    public CER removeCER(int rep) throws HL7Exception { 
825       return (CER)super.removeRepetition("CER", rep);
826    }
827
828
829
830}
831