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.segment;
035
036// import ca.uhn.hl7v2.model.v26.group.*;
037import ca.uhn.hl7v2.model.v26.datatype.*;
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
041import ca.uhn.hl7v2.model.AbstractMessage;
042import ca.uhn.hl7v2.model.Group;
043import ca.uhn.hl7v2.model.Type;
044import ca.uhn.hl7v2.model.AbstractSegment;
045import ca.uhn.hl7v2.model.Varies;
046
047/**
048 *<p>Represents an HL7 PRD message segment (Provider Data). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>PRD-1: Provider Role (CWE) <b> repeating</b>
052     * <li>PRD-2: Provider Name (XPN) <b>optional repeating</b>
053     * <li>PRD-3: Provider Address (XAD) <b>optional repeating</b>
054     * <li>PRD-4: Provider Location (PL) <b>optional </b>
055     * <li>PRD-5: Provider Communication Information (XTN) <b>optional repeating</b>
056     * <li>PRD-6: Preferred Method of Contact (CWE) <b>optional </b>
057     * <li>PRD-7: Provider Identifiers (PLN) <b>optional repeating</b>
058     * <li>PRD-8: Effective Start Date of Provider Role (DTM) <b>optional </b>
059     * <li>PRD-9: Effective End Date of Provider Role (DTM) <b>optional repeating</b>
060     * <li>PRD-10: Provider Organization Name and Identifier (XON) <b>optional </b>
061     * <li>PRD-11: Provider Organization Address (XAD) <b>optional repeating</b>
062     * <li>PRD-12: Provider Organization Location Information (PL) <b>optional repeating</b>
063     * <li>PRD-13: Provider Organization Communication Information (XTN) <b>optional repeating</b>
064     * <li>PRD-14: Provider Organization Method of Contact (CWE) <b>optional </b>
065 * </ul>
066 */
067@SuppressWarnings("unused")
068public class PRD extends AbstractSegment {
069
070    /** 
071     * Creates a new PRD segment
072     */
073    public PRD(Group parent, ModelClassFactory factory) {
074       super(parent, factory);
075       init(factory);
076    }
077
078    private void init(ModelClassFactory factory) {
079       try {
080                                  this.add(CWE.class, true, 0, 705, new Object[]{ getMessage() }, "Provider Role");
081                                  this.add(XPN.class, false, 0, 250, new Object[]{ getMessage() }, "Provider Name");
082                                  this.add(XAD.class, false, 0, 250, new Object[]{ getMessage() }, "Provider Address");
083                                  this.add(PL.class, false, 1, 60, new Object[]{ getMessage() }, "Provider Location");
084                                  this.add(XTN.class, false, 0, 250, new Object[]{ getMessage() }, "Provider Communication Information");
085                                  this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Preferred Method of Contact");
086                                  this.add(PLN.class, false, 0, 100, new Object[]{ getMessage() }, "Provider Identifiers");
087                                  this.add(DTM.class, false, 1, 24, new Object[]{ getMessage() }, "Effective Start Date of Provider Role");
088                                  this.add(DTM.class, false, 0, 24, new Object[]{ getMessage() }, "Effective End Date of Provider Role");
089                                  this.add(XON.class, false, 1, 250, new Object[]{ getMessage() }, "Provider Organization Name and Identifier");
090                                  this.add(XAD.class, false, 0, 60, new Object[]{ getMessage() }, "Provider Organization Address");
091                                  this.add(PL.class, false, 0, 60, new Object[]{ getMessage() }, "Provider Organization Location Information");
092                                  this.add(XTN.class, false, 0, 250, new Object[]{ getMessage() }, "Provider Organization Communication Information");
093                                  this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Provider Organization Method of Contact");
094       } catch(HL7Exception e) {
095          log.error("Unexpected error creating PRD - this is probably a bug in the source code generator.", e);
096       }
097    }
098
099
100    /**
101     * Returns all repetitions of Provider Role (PRD-1).
102     */
103    public CWE[] getProviderRole() {
104        CWE[] retVal = this.getTypedField(1, new CWE[0]);
105        return retVal;
106    }
107
108
109    /**
110     * Returns all repetitions of Provider Role (PRD-1).
111     */
112    public CWE[] getPrd1_ProviderRole() {
113        CWE[] retVal = this.getTypedField(1, new CWE[0]);
114        return retVal;
115    }
116
117
118    /**
119     * Returns a count of the current number of repetitions of Provider Role (PRD-1).
120     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
121     * it will return zero.
122     */
123    public int getProviderRoleReps() {
124        return this.getReps(1);
125    }
126
127
128    /**
129     * Returns a specific repetition of
130     * PRD-1: "Provider Role" - creates it if necessary
131     *
132     * @param rep The repetition index (0-indexed)
133     */
134    public CWE getProviderRole(int rep) { 
135                CWE retVal = this.getTypedField(1, rep);
136                return retVal;
137    }
138
139    /**
140     * Returns a specific repetition of
141     * PRD-1: "Provider Role" - creates it if necessary
142     *
143     * @param rep The repetition index (0-indexed)
144     */
145    public CWE getPrd1_ProviderRole(int rep) { 
146                CWE retVal = this.getTypedField(1, rep);
147                return retVal;
148    }
149
150    /**
151     * Returns a count of the current number of repetitions of Provider Role (PRD-1).
152     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
153     * it will return zero.
154     */
155    public int getPrd1_ProviderRoleReps() {
156        return this.getReps(1);
157    }
158
159
160    /**
161     * Inserts a repetition of
162     * PRD-1: "Provider Role" at a specific index
163     *
164     * @param rep The repetition index (0-indexed)
165     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
166     */
167    public CWE insertProviderRole(int rep) throws HL7Exception { 
168        return (CWE) super.insertRepetition(1, rep);
169    }
170
171
172    /**
173     * Inserts a repetition of
174     * PRD-1: "Provider Role" at a specific index
175     *
176     * @param rep The repetition index (0-indexed)
177     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
178     */
179    public CWE insertPrd1_ProviderRole(int rep) throws HL7Exception { 
180        return (CWE) super.insertRepetition(1, rep);
181    }
182
183
184    /**
185     * Removes a repetition of
186     * PRD-1: "Provider Role" at a specific index
187     *
188     * @param rep The repetition index (0-indexed)
189     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
190     */
191    public CWE removeProviderRole(int rep) throws HL7Exception { 
192        return (CWE) super.removeRepetition(1, rep);
193    }
194
195
196    /**
197     * Removes a repetition of
198     * PRD-1: "Provider Role" at a specific index
199     *
200     * @param rep The repetition index (0-indexed)
201     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
202     */
203    public CWE removePrd1_ProviderRole(int rep) throws HL7Exception { 
204        return (CWE) super.removeRepetition(1, rep);
205    }
206
207
208
209    /**
210     * Returns all repetitions of Provider Name (PRD-2).
211     */
212    public XPN[] getProviderName() {
213        XPN[] retVal = this.getTypedField(2, new XPN[0]);
214        return retVal;
215    }
216
217
218    /**
219     * Returns all repetitions of Provider Name (PRD-2).
220     */
221    public XPN[] getPrd2_ProviderName() {
222        XPN[] retVal = this.getTypedField(2, new XPN[0]);
223        return retVal;
224    }
225
226
227    /**
228     * Returns a count of the current number of repetitions of Provider Name (PRD-2).
229     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
230     * it will return zero.
231     */
232    public int getProviderNameReps() {
233        return this.getReps(2);
234    }
235
236
237    /**
238     * Returns a specific repetition of
239     * PRD-2: "Provider Name" - creates it if necessary
240     *
241     * @param rep The repetition index (0-indexed)
242     */
243    public XPN getProviderName(int rep) { 
244                XPN retVal = this.getTypedField(2, rep);
245                return retVal;
246    }
247
248    /**
249     * Returns a specific repetition of
250     * PRD-2: "Provider Name" - creates it if necessary
251     *
252     * @param rep The repetition index (0-indexed)
253     */
254    public XPN getPrd2_ProviderName(int rep) { 
255                XPN retVal = this.getTypedField(2, rep);
256                return retVal;
257    }
258
259    /**
260     * Returns a count of the current number of repetitions of Provider Name (PRD-2).
261     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
262     * it will return zero.
263     */
264    public int getPrd2_ProviderNameReps() {
265        return this.getReps(2);
266    }
267
268
269    /**
270     * Inserts a repetition of
271     * PRD-2: "Provider Name" at a specific index
272     *
273     * @param rep The repetition index (0-indexed)
274     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
275     */
276    public XPN insertProviderName(int rep) throws HL7Exception { 
277        return (XPN) super.insertRepetition(2, rep);
278    }
279
280
281    /**
282     * Inserts a repetition of
283     * PRD-2: "Provider Name" at a specific index
284     *
285     * @param rep The repetition index (0-indexed)
286     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
287     */
288    public XPN insertPrd2_ProviderName(int rep) throws HL7Exception { 
289        return (XPN) super.insertRepetition(2, rep);
290    }
291
292
293    /**
294     * Removes a repetition of
295     * PRD-2: "Provider Name" at a specific index
296     *
297     * @param rep The repetition index (0-indexed)
298     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
299     */
300    public XPN removeProviderName(int rep) throws HL7Exception { 
301        return (XPN) super.removeRepetition(2, rep);
302    }
303
304
305    /**
306     * Removes a repetition of
307     * PRD-2: "Provider Name" at a specific index
308     *
309     * @param rep The repetition index (0-indexed)
310     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
311     */
312    public XPN removePrd2_ProviderName(int rep) throws HL7Exception { 
313        return (XPN) super.removeRepetition(2, rep);
314    }
315
316
317
318    /**
319     * Returns all repetitions of Provider Address (PRD-3).
320     */
321    public XAD[] getProviderAddress() {
322        XAD[] retVal = this.getTypedField(3, new XAD[0]);
323        return retVal;
324    }
325
326
327    /**
328     * Returns all repetitions of Provider Address (PRD-3).
329     */
330    public XAD[] getPrd3_ProviderAddress() {
331        XAD[] retVal = this.getTypedField(3, new XAD[0]);
332        return retVal;
333    }
334
335
336    /**
337     * Returns a count of the current number of repetitions of Provider Address (PRD-3).
338     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
339     * it will return zero.
340     */
341    public int getProviderAddressReps() {
342        return this.getReps(3);
343    }
344
345
346    /**
347     * Returns a specific repetition of
348     * PRD-3: "Provider Address" - creates it if necessary
349     *
350     * @param rep The repetition index (0-indexed)
351     */
352    public XAD getProviderAddress(int rep) { 
353                XAD retVal = this.getTypedField(3, rep);
354                return retVal;
355    }
356
357    /**
358     * Returns a specific repetition of
359     * PRD-3: "Provider Address" - creates it if necessary
360     *
361     * @param rep The repetition index (0-indexed)
362     */
363    public XAD getPrd3_ProviderAddress(int rep) { 
364                XAD retVal = this.getTypedField(3, rep);
365                return retVal;
366    }
367
368    /**
369     * Returns a count of the current number of repetitions of Provider Address (PRD-3).
370     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
371     * it will return zero.
372     */
373    public int getPrd3_ProviderAddressReps() {
374        return this.getReps(3);
375    }
376
377
378    /**
379     * Inserts a repetition of
380     * PRD-3: "Provider Address" at a specific index
381     *
382     * @param rep The repetition index (0-indexed)
383     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
384     */
385    public XAD insertProviderAddress(int rep) throws HL7Exception { 
386        return (XAD) super.insertRepetition(3, rep);
387    }
388
389
390    /**
391     * Inserts a repetition of
392     * PRD-3: "Provider Address" at a specific index
393     *
394     * @param rep The repetition index (0-indexed)
395     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
396     */
397    public XAD insertPrd3_ProviderAddress(int rep) throws HL7Exception { 
398        return (XAD) super.insertRepetition(3, rep);
399    }
400
401
402    /**
403     * Removes a repetition of
404     * PRD-3: "Provider Address" at a specific index
405     *
406     * @param rep The repetition index (0-indexed)
407     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
408     */
409    public XAD removeProviderAddress(int rep) throws HL7Exception { 
410        return (XAD) super.removeRepetition(3, rep);
411    }
412
413
414    /**
415     * Removes a repetition of
416     * PRD-3: "Provider Address" at a specific index
417     *
418     * @param rep The repetition index (0-indexed)
419     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
420     */
421    public XAD removePrd3_ProviderAddress(int rep) throws HL7Exception { 
422        return (XAD) super.removeRepetition(3, rep);
423    }
424
425
426
427
428    /**
429     * Returns
430     * PRD-4: "Provider Location" - creates it if necessary
431     */
432    public PL getProviderLocation() { 
433                PL retVal = this.getTypedField(4, 0);
434                return retVal;
435    }
436    
437    /**
438     * Returns
439     * PRD-4: "Provider Location" - creates it if necessary
440     */
441    public PL getPrd4_ProviderLocation() { 
442                PL retVal = this.getTypedField(4, 0);
443                return retVal;
444    }
445
446
447    /**
448     * Returns all repetitions of Provider Communication Information (PRD-5).
449     */
450    public XTN[] getProviderCommunicationInformation() {
451        XTN[] retVal = this.getTypedField(5, new XTN[0]);
452        return retVal;
453    }
454
455
456    /**
457     * Returns all repetitions of Provider Communication Information (PRD-5).
458     */
459    public XTN[] getPrd5_ProviderCommunicationInformation() {
460        XTN[] retVal = this.getTypedField(5, new XTN[0]);
461        return retVal;
462    }
463
464
465    /**
466     * Returns a count of the current number of repetitions of Provider Communication Information (PRD-5).
467     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
468     * it will return zero.
469     */
470    public int getProviderCommunicationInformationReps() {
471        return this.getReps(5);
472    }
473
474
475    /**
476     * Returns a specific repetition of
477     * PRD-5: "Provider Communication Information" - creates it if necessary
478     *
479     * @param rep The repetition index (0-indexed)
480     */
481    public XTN getProviderCommunicationInformation(int rep) { 
482                XTN retVal = this.getTypedField(5, rep);
483                return retVal;
484    }
485
486    /**
487     * Returns a specific repetition of
488     * PRD-5: "Provider Communication Information" - creates it if necessary
489     *
490     * @param rep The repetition index (0-indexed)
491     */
492    public XTN getPrd5_ProviderCommunicationInformation(int rep) { 
493                XTN retVal = this.getTypedField(5, rep);
494                return retVal;
495    }
496
497    /**
498     * Returns a count of the current number of repetitions of Provider Communication Information (PRD-5).
499     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
500     * it will return zero.
501     */
502    public int getPrd5_ProviderCommunicationInformationReps() {
503        return this.getReps(5);
504    }
505
506
507    /**
508     * Inserts a repetition of
509     * PRD-5: "Provider Communication Information" at a specific index
510     *
511     * @param rep The repetition index (0-indexed)
512     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
513     */
514    public XTN insertProviderCommunicationInformation(int rep) throws HL7Exception { 
515        return (XTN) super.insertRepetition(5, rep);
516    }
517
518
519    /**
520     * Inserts a repetition of
521     * PRD-5: "Provider Communication Information" at a specific index
522     *
523     * @param rep The repetition index (0-indexed)
524     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
525     */
526    public XTN insertPrd5_ProviderCommunicationInformation(int rep) throws HL7Exception { 
527        return (XTN) super.insertRepetition(5, rep);
528    }
529
530
531    /**
532     * Removes a repetition of
533     * PRD-5: "Provider Communication Information" at a specific index
534     *
535     * @param rep The repetition index (0-indexed)
536     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
537     */
538    public XTN removeProviderCommunicationInformation(int rep) throws HL7Exception { 
539        return (XTN) super.removeRepetition(5, rep);
540    }
541
542
543    /**
544     * Removes a repetition of
545     * PRD-5: "Provider Communication Information" at a specific index
546     *
547     * @param rep The repetition index (0-indexed)
548     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
549     */
550    public XTN removePrd5_ProviderCommunicationInformation(int rep) throws HL7Exception { 
551        return (XTN) super.removeRepetition(5, rep);
552    }
553
554
555
556
557    /**
558     * Returns
559     * PRD-6: "Preferred Method of Contact" - creates it if necessary
560     */
561    public CWE getPreferredMethodOfContact() { 
562                CWE retVal = this.getTypedField(6, 0);
563                return retVal;
564    }
565    
566    /**
567     * Returns
568     * PRD-6: "Preferred Method of Contact" - creates it if necessary
569     */
570    public CWE getPrd6_PreferredMethodOfContact() { 
571                CWE retVal = this.getTypedField(6, 0);
572                return retVal;
573    }
574
575
576    /**
577     * Returns all repetitions of Provider Identifiers (PRD-7).
578     */
579    public PLN[] getProviderIdentifiers() {
580        PLN[] retVal = this.getTypedField(7, new PLN[0]);
581        return retVal;
582    }
583
584
585    /**
586     * Returns all repetitions of Provider Identifiers (PRD-7).
587     */
588    public PLN[] getPrd7_ProviderIdentifiers() {
589        PLN[] retVal = this.getTypedField(7, new PLN[0]);
590        return retVal;
591    }
592
593
594    /**
595     * Returns a count of the current number of repetitions of Provider Identifiers (PRD-7).
596     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
597     * it will return zero.
598     */
599    public int getProviderIdentifiersReps() {
600        return this.getReps(7);
601    }
602
603
604    /**
605     * Returns a specific repetition of
606     * PRD-7: "Provider Identifiers" - creates it if necessary
607     *
608     * @param rep The repetition index (0-indexed)
609     */
610    public PLN getProviderIdentifiers(int rep) { 
611                PLN retVal = this.getTypedField(7, rep);
612                return retVal;
613    }
614
615    /**
616     * Returns a specific repetition of
617     * PRD-7: "Provider Identifiers" - creates it if necessary
618     *
619     * @param rep The repetition index (0-indexed)
620     */
621    public PLN getPrd7_ProviderIdentifiers(int rep) { 
622                PLN retVal = this.getTypedField(7, rep);
623                return retVal;
624    }
625
626    /**
627     * Returns a count of the current number of repetitions of Provider Identifiers (PRD-7).
628     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
629     * it will return zero.
630     */
631    public int getPrd7_ProviderIdentifiersReps() {
632        return this.getReps(7);
633    }
634
635
636    /**
637     * Inserts a repetition of
638     * PRD-7: "Provider Identifiers" at a specific index
639     *
640     * @param rep The repetition index (0-indexed)
641     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
642     */
643    public PLN insertProviderIdentifiers(int rep) throws HL7Exception { 
644        return (PLN) super.insertRepetition(7, rep);
645    }
646
647
648    /**
649     * Inserts a repetition of
650     * PRD-7: "Provider Identifiers" at a specific index
651     *
652     * @param rep The repetition index (0-indexed)
653     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
654     */
655    public PLN insertPrd7_ProviderIdentifiers(int rep) throws HL7Exception { 
656        return (PLN) super.insertRepetition(7, rep);
657    }
658
659
660    /**
661     * Removes a repetition of
662     * PRD-7: "Provider Identifiers" at a specific index
663     *
664     * @param rep The repetition index (0-indexed)
665     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
666     */
667    public PLN removeProviderIdentifiers(int rep) throws HL7Exception { 
668        return (PLN) super.removeRepetition(7, rep);
669    }
670
671
672    /**
673     * Removes a repetition of
674     * PRD-7: "Provider Identifiers" at a specific index
675     *
676     * @param rep The repetition index (0-indexed)
677     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
678     */
679    public PLN removePrd7_ProviderIdentifiers(int rep) throws HL7Exception { 
680        return (PLN) super.removeRepetition(7, rep);
681    }
682
683
684
685
686    /**
687     * Returns
688     * PRD-8: "Effective Start Date of Provider Role" - creates it if necessary
689     */
690    public DTM getEffectiveStartDateOfProviderRole() { 
691                DTM retVal = this.getTypedField(8, 0);
692                return retVal;
693    }
694    
695    /**
696     * Returns
697     * PRD-8: "Effective Start Date of Provider Role" - creates it if necessary
698     */
699    public DTM getPrd8_EffectiveStartDateOfProviderRole() { 
700                DTM retVal = this.getTypedField(8, 0);
701                return retVal;
702    }
703
704
705    /**
706     * Returns all repetitions of Effective End Date of Provider Role (PRD-9).
707     */
708    public DTM[] getEffectiveEndDateOfProviderRole() {
709        DTM[] retVal = this.getTypedField(9, new DTM[0]);
710        return retVal;
711    }
712
713
714    /**
715     * Returns all repetitions of Effective End Date of Provider Role (PRD-9).
716     */
717    public DTM[] getPrd9_EffectiveEndDateOfProviderRole() {
718        DTM[] retVal = this.getTypedField(9, new DTM[0]);
719        return retVal;
720    }
721
722
723    /**
724     * Returns a count of the current number of repetitions of Effective End Date of Provider Role (PRD-9).
725     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
726     * it will return zero.
727     */
728    public int getEffectiveEndDateOfProviderRoleReps() {
729        return this.getReps(9);
730    }
731
732
733    /**
734     * Returns a specific repetition of
735     * PRD-9: "Effective End Date of Provider Role" - creates it if necessary
736     *
737     * @param rep The repetition index (0-indexed)
738     */
739    public DTM getEffectiveEndDateOfProviderRole(int rep) { 
740                DTM retVal = this.getTypedField(9, rep);
741                return retVal;
742    }
743
744    /**
745     * Returns a specific repetition of
746     * PRD-9: "Effective End Date of Provider Role" - creates it if necessary
747     *
748     * @param rep The repetition index (0-indexed)
749     */
750    public DTM getPrd9_EffectiveEndDateOfProviderRole(int rep) { 
751                DTM retVal = this.getTypedField(9, rep);
752                return retVal;
753    }
754
755    /**
756     * Returns a count of the current number of repetitions of Effective End Date of Provider Role (PRD-9).
757     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
758     * it will return zero.
759     */
760    public int getPrd9_EffectiveEndDateOfProviderRoleReps() {
761        return this.getReps(9);
762    }
763
764
765    /**
766     * Inserts a repetition of
767     * PRD-9: "Effective End Date of Provider Role" at a specific index
768     *
769     * @param rep The repetition index (0-indexed)
770     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
771     */
772    public DTM insertEffectiveEndDateOfProviderRole(int rep) throws HL7Exception { 
773        return (DTM) super.insertRepetition(9, rep);
774    }
775
776
777    /**
778     * Inserts a repetition of
779     * PRD-9: "Effective End Date of Provider Role" at a specific index
780     *
781     * @param rep The repetition index (0-indexed)
782     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
783     */
784    public DTM insertPrd9_EffectiveEndDateOfProviderRole(int rep) throws HL7Exception { 
785        return (DTM) super.insertRepetition(9, rep);
786    }
787
788
789    /**
790     * Removes a repetition of
791     * PRD-9: "Effective End Date of Provider Role" at a specific index
792     *
793     * @param rep The repetition index (0-indexed)
794     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
795     */
796    public DTM removeEffectiveEndDateOfProviderRole(int rep) throws HL7Exception { 
797        return (DTM) super.removeRepetition(9, rep);
798    }
799
800
801    /**
802     * Removes a repetition of
803     * PRD-9: "Effective End Date of Provider Role" at a specific index
804     *
805     * @param rep The repetition index (0-indexed)
806     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
807     */
808    public DTM removePrd9_EffectiveEndDateOfProviderRole(int rep) throws HL7Exception { 
809        return (DTM) super.removeRepetition(9, rep);
810    }
811
812
813
814
815    /**
816     * Returns
817     * PRD-10: "Provider Organization Name and Identifier" - creates it if necessary
818     */
819    public XON getProviderOrganizationNameAndIdentifier() { 
820                XON retVal = this.getTypedField(10, 0);
821                return retVal;
822    }
823    
824    /**
825     * Returns
826     * PRD-10: "Provider Organization Name and Identifier" - creates it if necessary
827     */
828    public XON getPrd10_ProviderOrganizationNameAndIdentifier() { 
829                XON retVal = this.getTypedField(10, 0);
830                return retVal;
831    }
832
833
834    /**
835     * Returns all repetitions of Provider Organization Address (PRD-11).
836     */
837    public XAD[] getProviderOrganizationAddress() {
838        XAD[] retVal = this.getTypedField(11, new XAD[0]);
839        return retVal;
840    }
841
842
843    /**
844     * Returns all repetitions of Provider Organization Address (PRD-11).
845     */
846    public XAD[] getPrd11_ProviderOrganizationAddress() {
847        XAD[] retVal = this.getTypedField(11, new XAD[0]);
848        return retVal;
849    }
850
851
852    /**
853     * Returns a count of the current number of repetitions of Provider Organization Address (PRD-11).
854     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
855     * it will return zero.
856     */
857    public int getProviderOrganizationAddressReps() {
858        return this.getReps(11);
859    }
860
861
862    /**
863     * Returns a specific repetition of
864     * PRD-11: "Provider Organization Address" - creates it if necessary
865     *
866     * @param rep The repetition index (0-indexed)
867     */
868    public XAD getProviderOrganizationAddress(int rep) { 
869                XAD retVal = this.getTypedField(11, rep);
870                return retVal;
871    }
872
873    /**
874     * Returns a specific repetition of
875     * PRD-11: "Provider Organization Address" - creates it if necessary
876     *
877     * @param rep The repetition index (0-indexed)
878     */
879    public XAD getPrd11_ProviderOrganizationAddress(int rep) { 
880                XAD retVal = this.getTypedField(11, rep);
881                return retVal;
882    }
883
884    /**
885     * Returns a count of the current number of repetitions of Provider Organization Address (PRD-11).
886     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
887     * it will return zero.
888     */
889    public int getPrd11_ProviderOrganizationAddressReps() {
890        return this.getReps(11);
891    }
892
893
894    /**
895     * Inserts a repetition of
896     * PRD-11: "Provider Organization Address" at a specific index
897     *
898     * @param rep The repetition index (0-indexed)
899     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
900     */
901    public XAD insertProviderOrganizationAddress(int rep) throws HL7Exception { 
902        return (XAD) super.insertRepetition(11, rep);
903    }
904
905
906    /**
907     * Inserts a repetition of
908     * PRD-11: "Provider Organization Address" at a specific index
909     *
910     * @param rep The repetition index (0-indexed)
911     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
912     */
913    public XAD insertPrd11_ProviderOrganizationAddress(int rep) throws HL7Exception { 
914        return (XAD) super.insertRepetition(11, rep);
915    }
916
917
918    /**
919     * Removes a repetition of
920     * PRD-11: "Provider Organization Address" at a specific index
921     *
922     * @param rep The repetition index (0-indexed)
923     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
924     */
925    public XAD removeProviderOrganizationAddress(int rep) throws HL7Exception { 
926        return (XAD) super.removeRepetition(11, rep);
927    }
928
929
930    /**
931     * Removes a repetition of
932     * PRD-11: "Provider Organization Address" at a specific index
933     *
934     * @param rep The repetition index (0-indexed)
935     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
936     */
937    public XAD removePrd11_ProviderOrganizationAddress(int rep) throws HL7Exception { 
938        return (XAD) super.removeRepetition(11, rep);
939    }
940
941
942
943    /**
944     * Returns all repetitions of Provider Organization Location Information (PRD-12).
945     */
946    public PL[] getProviderOrganizationLocationInformation() {
947        PL[] retVal = this.getTypedField(12, new PL[0]);
948        return retVal;
949    }
950
951
952    /**
953     * Returns all repetitions of Provider Organization Location Information (PRD-12).
954     */
955    public PL[] getPrd12_ProviderOrganizationLocationInformation() {
956        PL[] retVal = this.getTypedField(12, new PL[0]);
957        return retVal;
958    }
959
960
961    /**
962     * Returns a count of the current number of repetitions of Provider Organization Location Information (PRD-12).
963     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
964     * it will return zero.
965     */
966    public int getProviderOrganizationLocationInformationReps() {
967        return this.getReps(12);
968    }
969
970
971    /**
972     * Returns a specific repetition of
973     * PRD-12: "Provider Organization Location Information" - creates it if necessary
974     *
975     * @param rep The repetition index (0-indexed)
976     */
977    public PL getProviderOrganizationLocationInformation(int rep) { 
978                PL retVal = this.getTypedField(12, rep);
979                return retVal;
980    }
981
982    /**
983     * Returns a specific repetition of
984     * PRD-12: "Provider Organization Location Information" - creates it if necessary
985     *
986     * @param rep The repetition index (0-indexed)
987     */
988    public PL getPrd12_ProviderOrganizationLocationInformation(int rep) { 
989                PL retVal = this.getTypedField(12, rep);
990                return retVal;
991    }
992
993    /**
994     * Returns a count of the current number of repetitions of Provider Organization Location Information (PRD-12).
995     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
996     * it will return zero.
997     */
998    public int getPrd12_ProviderOrganizationLocationInformationReps() {
999        return this.getReps(12);
1000    }
1001
1002
1003    /**
1004     * Inserts a repetition of
1005     * PRD-12: "Provider Organization Location Information" at a specific index
1006     *
1007     * @param rep The repetition index (0-indexed)
1008     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1009     */
1010    public PL insertProviderOrganizationLocationInformation(int rep) throws HL7Exception { 
1011        return (PL) super.insertRepetition(12, rep);
1012    }
1013
1014
1015    /**
1016     * Inserts a repetition of
1017     * PRD-12: "Provider Organization Location Information" at a specific index
1018     *
1019     * @param rep The repetition index (0-indexed)
1020     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1021     */
1022    public PL insertPrd12_ProviderOrganizationLocationInformation(int rep) throws HL7Exception { 
1023        return (PL) super.insertRepetition(12, rep);
1024    }
1025
1026
1027    /**
1028     * Removes a repetition of
1029     * PRD-12: "Provider Organization Location Information" at a specific index
1030     *
1031     * @param rep The repetition index (0-indexed)
1032     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1033     */
1034    public PL removeProviderOrganizationLocationInformation(int rep) throws HL7Exception { 
1035        return (PL) super.removeRepetition(12, rep);
1036    }
1037
1038
1039    /**
1040     * Removes a repetition of
1041     * PRD-12: "Provider Organization Location Information" at a specific index
1042     *
1043     * @param rep The repetition index (0-indexed)
1044     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1045     */
1046    public PL removePrd12_ProviderOrganizationLocationInformation(int rep) throws HL7Exception { 
1047        return (PL) super.removeRepetition(12, rep);
1048    }
1049
1050
1051
1052    /**
1053     * Returns all repetitions of Provider Organization Communication Information (PRD-13).
1054     */
1055    public XTN[] getProviderOrganizationCommunicationInformation() {
1056        XTN[] retVal = this.getTypedField(13, new XTN[0]);
1057        return retVal;
1058    }
1059
1060
1061    /**
1062     * Returns all repetitions of Provider Organization Communication Information (PRD-13).
1063     */
1064    public XTN[] getPrd13_ProviderOrganizationCommunicationInformation() {
1065        XTN[] retVal = this.getTypedField(13, new XTN[0]);
1066        return retVal;
1067    }
1068
1069
1070    /**
1071     * Returns a count of the current number of repetitions of Provider Organization Communication Information (PRD-13).
1072     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1073     * it will return zero.
1074     */
1075    public int getProviderOrganizationCommunicationInformationReps() {
1076        return this.getReps(13);
1077    }
1078
1079
1080    /**
1081     * Returns a specific repetition of
1082     * PRD-13: "Provider Organization Communication Information" - creates it if necessary
1083     *
1084     * @param rep The repetition index (0-indexed)
1085     */
1086    public XTN getProviderOrganizationCommunicationInformation(int rep) { 
1087                XTN retVal = this.getTypedField(13, rep);
1088                return retVal;
1089    }
1090
1091    /**
1092     * Returns a specific repetition of
1093     * PRD-13: "Provider Organization Communication Information" - creates it if necessary
1094     *
1095     * @param rep The repetition index (0-indexed)
1096     */
1097    public XTN getPrd13_ProviderOrganizationCommunicationInformation(int rep) { 
1098                XTN retVal = this.getTypedField(13, rep);
1099                return retVal;
1100    }
1101
1102    /**
1103     * Returns a count of the current number of repetitions of Provider Organization Communication Information (PRD-13).
1104     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1105     * it will return zero.
1106     */
1107    public int getPrd13_ProviderOrganizationCommunicationInformationReps() {
1108        return this.getReps(13);
1109    }
1110
1111
1112    /**
1113     * Inserts a repetition of
1114     * PRD-13: "Provider Organization Communication Information" at a specific index
1115     *
1116     * @param rep The repetition index (0-indexed)
1117     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1118     */
1119    public XTN insertProviderOrganizationCommunicationInformation(int rep) throws HL7Exception { 
1120        return (XTN) super.insertRepetition(13, rep);
1121    }
1122
1123
1124    /**
1125     * Inserts a repetition of
1126     * PRD-13: "Provider Organization Communication Information" at a specific index
1127     *
1128     * @param rep The repetition index (0-indexed)
1129     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1130     */
1131    public XTN insertPrd13_ProviderOrganizationCommunicationInformation(int rep) throws HL7Exception { 
1132        return (XTN) super.insertRepetition(13, rep);
1133    }
1134
1135
1136    /**
1137     * Removes a repetition of
1138     * PRD-13: "Provider Organization Communication Information" at a specific index
1139     *
1140     * @param rep The repetition index (0-indexed)
1141     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1142     */
1143    public XTN removeProviderOrganizationCommunicationInformation(int rep) throws HL7Exception { 
1144        return (XTN) super.removeRepetition(13, rep);
1145    }
1146
1147
1148    /**
1149     * Removes a repetition of
1150     * PRD-13: "Provider Organization Communication Information" at a specific index
1151     *
1152     * @param rep The repetition index (0-indexed)
1153     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1154     */
1155    public XTN removePrd13_ProviderOrganizationCommunicationInformation(int rep) throws HL7Exception { 
1156        return (XTN) super.removeRepetition(13, rep);
1157    }
1158
1159
1160
1161
1162    /**
1163     * Returns
1164     * PRD-14: "Provider Organization Method of Contact" - creates it if necessary
1165     */
1166    public CWE getProviderOrganizationMethodOfContact() { 
1167                CWE retVal = this.getTypedField(14, 0);
1168                return retVal;
1169    }
1170    
1171    /**
1172     * Returns
1173     * PRD-14: "Provider Organization Method of Contact" - creates it if necessary
1174     */
1175    public CWE getPrd14_ProviderOrganizationMethodOfContact() { 
1176                CWE retVal = this.getTypedField(14, 0);
1177                return retVal;
1178    }
1179
1180
1181
1182
1183
1184    /** {@inheritDoc} */   
1185    protected Type createNewTypeWithoutReflection(int field) {
1186       switch (field) {
1187          case 0: return new CWE(getMessage());
1188          case 1: return new XPN(getMessage());
1189          case 2: return new XAD(getMessage());
1190          case 3: return new PL(getMessage());
1191          case 4: return new XTN(getMessage());
1192          case 5: return new CWE(getMessage());
1193          case 6: return new PLN(getMessage());
1194          case 7: return new DTM(getMessage());
1195          case 8: return new DTM(getMessage());
1196          case 9: return new XON(getMessage());
1197          case 10: return new XAD(getMessage());
1198          case 11: return new PL(getMessage());
1199          case 12: return new XTN(getMessage());
1200          case 13: return new CWE(getMessage());
1201          default: return null;
1202       }
1203   }
1204
1205
1206}
1207