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