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.v251.segment;
035
036// import ca.uhn.hl7v2.model.v251.group.*;
037import ca.uhn.hl7v2.model.v251.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 FAC message segment (Facility). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>FAC-1: Facility ID-FAC (EI) <b> </b>
053     * <li>FAC-2: Facility Type (ID) <b>optional </b>
054     * <li>FAC-3: Facility Address (XAD) <b> repeating</b>
055     * <li>FAC-4: Facility Telecommunication (XTN) <b> </b>
056     * <li>FAC-5: Contact Person (XCN) <b>optional repeating</b>
057     * <li>FAC-6: Contact Title (ST) <b>optional repeating</b>
058     * <li>FAC-7: Contact Address (XAD) <b>optional repeating</b>
059     * <li>FAC-8: Contact Telecommunication (XTN) <b>optional repeating</b>
060     * <li>FAC-9: Signature Authority (XCN) <b> repeating</b>
061     * <li>FAC-10: Signature Authority Title (ST) <b>optional </b>
062     * <li>FAC-11: Signature Authority Address (XAD) <b>optional repeating</b>
063     * <li>FAC-12: Signature Authority Telecommunication (XTN) <b>optional </b>
064 * </ul>
065 */
066@SuppressWarnings("unused")
067public class FAC extends AbstractSegment {
068
069    /** 
070     * Creates a new FAC segment
071     */
072    public FAC(Group parent, ModelClassFactory factory) {
073       super(parent, factory);
074       init(factory);
075    }
076
077    private void init(ModelClassFactory factory) {
078       try {
079                                  this.add(EI.class, true, 1, 20, new Object[]{ getMessage() }, "Facility ID-FAC");
080                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(331) }, "Facility Type");
081                                  this.add(XAD.class, true, 0, 250, new Object[]{ getMessage() }, "Facility Address");
082                                  this.add(XTN.class, true, 1, 250, new Object[]{ getMessage() }, "Facility Telecommunication");
083                                  this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Contact Person");
084                                  this.add(ST.class, false, 0, 60, new Object[]{ getMessage() }, "Contact Title");
085                                  this.add(XAD.class, false, 0, 250, new Object[]{ getMessage() }, "Contact Address");
086                                  this.add(XTN.class, false, 0, 250, new Object[]{ getMessage() }, "Contact Telecommunication");
087                                  this.add(XCN.class, true, 0, 250, new Object[]{ getMessage() }, "Signature Authority");
088                                  this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "Signature Authority Title");
089                                  this.add(XAD.class, false, 0, 250, new Object[]{ getMessage() }, "Signature Authority Address");
090                                  this.add(XTN.class, false, 1, 250, new Object[]{ getMessage() }, "Signature Authority Telecommunication");
091       } catch(HL7Exception e) {
092          log.error("Unexpected error creating FAC - this is probably a bug in the source code generator.", e);
093       }
094    }
095
096
097
098    /**
099     * Returns
100     * FAC-1: "Facility ID-FAC" - creates it if necessary
101     */
102    public EI getFacilityIDFAC() { 
103                EI retVal = this.getTypedField(1, 0);
104                return retVal;
105    }
106    
107    /**
108     * Returns
109     * FAC-1: "Facility ID-FAC" - creates it if necessary
110     */
111    public EI getFac1_FacilityIDFAC() { 
112                EI retVal = this.getTypedField(1, 0);
113                return retVal;
114    }
115
116
117
118    /**
119     * Returns
120     * FAC-2: "Facility Type" - creates it if necessary
121     */
122    public ID getFacilityType() { 
123                ID retVal = this.getTypedField(2, 0);
124                return retVal;
125    }
126    
127    /**
128     * Returns
129     * FAC-2: "Facility Type" - creates it if necessary
130     */
131    public ID getFac2_FacilityType() { 
132                ID retVal = this.getTypedField(2, 0);
133                return retVal;
134    }
135
136
137    /**
138     * Returns all repetitions of Facility Address (FAC-3).
139     */
140    public XAD[] getFacilityAddress() {
141        XAD[] retVal = this.getTypedField(3, new XAD[0]);
142        return retVal;
143    }
144
145
146    /**
147     * Returns all repetitions of Facility Address (FAC-3).
148     */
149    public XAD[] getFac3_FacilityAddress() {
150        XAD[] retVal = this.getTypedField(3, new XAD[0]);
151        return retVal;
152    }
153
154
155    /**
156     * Returns a count of the current number of repetitions of Facility Address (FAC-3).
157     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
158     * it will return zero.
159     */
160    public int getFacilityAddressReps() {
161        return this.getReps(3);
162    }
163
164
165    /**
166     * Returns a specific repetition of
167     * FAC-3: "Facility Address" - creates it if necessary
168     *
169     * @param rep The repetition index (0-indexed)
170     */
171    public XAD getFacilityAddress(int rep) { 
172                XAD retVal = this.getTypedField(3, rep);
173                return retVal;
174    }
175
176    /**
177     * Returns a specific repetition of
178     * FAC-3: "Facility Address" - creates it if necessary
179     *
180     * @param rep The repetition index (0-indexed)
181     */
182    public XAD getFac3_FacilityAddress(int rep) { 
183                XAD retVal = this.getTypedField(3, rep);
184                return retVal;
185    }
186
187    /**
188     * Returns a count of the current number of repetitions of Facility Address (FAC-3).
189     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
190     * it will return zero.
191     */
192    public int getFac3_FacilityAddressReps() {
193        return this.getReps(3);
194    }
195
196
197    /**
198     * Inserts a repetition of
199     * FAC-3: "Facility Address" 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 XAD insertFacilityAddress(int rep) throws HL7Exception { 
205        return (XAD) super.insertRepetition(3, rep);
206    }
207
208
209    /**
210     * Inserts a repetition of
211     * FAC-3: "Facility Address" at a specific index
212     *
213     * @param rep The repetition index (0-indexed)
214     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
215     */
216    public XAD insertFac3_FacilityAddress(int rep) throws HL7Exception { 
217        return (XAD) super.insertRepetition(3, rep);
218    }
219
220
221    /**
222     * Removes a repetition of
223     * FAC-3: "Facility Address" at a specific index
224     *
225     * @param rep The repetition index (0-indexed)
226     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
227     */
228    public XAD removeFacilityAddress(int rep) throws HL7Exception { 
229        return (XAD) super.removeRepetition(3, rep);
230    }
231
232
233    /**
234     * Removes a repetition of
235     * FAC-3: "Facility Address" at a specific index
236     *
237     * @param rep The repetition index (0-indexed)
238     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
239     */
240    public XAD removeFac3_FacilityAddress(int rep) throws HL7Exception { 
241        return (XAD) super.removeRepetition(3, rep);
242    }
243
244
245
246
247    /**
248     * Returns
249     * FAC-4: "Facility Telecommunication" - creates it if necessary
250     */
251    public XTN getFacilityTelecommunication() { 
252                XTN retVal = this.getTypedField(4, 0);
253                return retVal;
254    }
255    
256    /**
257     * Returns
258     * FAC-4: "Facility Telecommunication" - creates it if necessary
259     */
260    public XTN getFac4_FacilityTelecommunication() { 
261                XTN retVal = this.getTypedField(4, 0);
262                return retVal;
263    }
264
265
266    /**
267     * Returns all repetitions of Contact Person (FAC-5).
268     */
269    public XCN[] getContactPerson() {
270        XCN[] retVal = this.getTypedField(5, new XCN[0]);
271        return retVal;
272    }
273
274
275    /**
276     * Returns all repetitions of Contact Person (FAC-5).
277     */
278    public XCN[] getFac5_ContactPerson() {
279        XCN[] retVal = this.getTypedField(5, new XCN[0]);
280        return retVal;
281    }
282
283
284    /**
285     * Returns a count of the current number of repetitions of Contact Person (FAC-5).
286     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
287     * it will return zero.
288     */
289    public int getContactPersonReps() {
290        return this.getReps(5);
291    }
292
293
294    /**
295     * Returns a specific repetition of
296     * FAC-5: "Contact Person" - creates it if necessary
297     *
298     * @param rep The repetition index (0-indexed)
299     */
300    public XCN getContactPerson(int rep) { 
301                XCN retVal = this.getTypedField(5, rep);
302                return retVal;
303    }
304
305    /**
306     * Returns a specific repetition of
307     * FAC-5: "Contact Person" - creates it if necessary
308     *
309     * @param rep The repetition index (0-indexed)
310     */
311    public XCN getFac5_ContactPerson(int rep) { 
312                XCN retVal = this.getTypedField(5, rep);
313                return retVal;
314    }
315
316    /**
317     * Returns a count of the current number of repetitions of Contact Person (FAC-5).
318     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
319     * it will return zero.
320     */
321    public int getFac5_ContactPersonReps() {
322        return this.getReps(5);
323    }
324
325
326    /**
327     * Inserts a repetition of
328     * FAC-5: "Contact Person" at a specific index
329     *
330     * @param rep The repetition index (0-indexed)
331     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
332     */
333    public XCN insertContactPerson(int rep) throws HL7Exception { 
334        return (XCN) super.insertRepetition(5, rep);
335    }
336
337
338    /**
339     * Inserts a repetition of
340     * FAC-5: "Contact Person" at a specific index
341     *
342     * @param rep The repetition index (0-indexed)
343     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
344     */
345    public XCN insertFac5_ContactPerson(int rep) throws HL7Exception { 
346        return (XCN) super.insertRepetition(5, rep);
347    }
348
349
350    /**
351     * Removes a repetition of
352     * FAC-5: "Contact Person" at a specific index
353     *
354     * @param rep The repetition index (0-indexed)
355     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
356     */
357    public XCN removeContactPerson(int rep) throws HL7Exception { 
358        return (XCN) super.removeRepetition(5, rep);
359    }
360
361
362    /**
363     * Removes a repetition of
364     * FAC-5: "Contact Person" at a specific index
365     *
366     * @param rep The repetition index (0-indexed)
367     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
368     */
369    public XCN removeFac5_ContactPerson(int rep) throws HL7Exception { 
370        return (XCN) super.removeRepetition(5, rep);
371    }
372
373
374
375    /**
376     * Returns all repetitions of Contact Title (FAC-6).
377     */
378    public ST[] getContactTitle() {
379        ST[] retVal = this.getTypedField(6, new ST[0]);
380        return retVal;
381    }
382
383
384    /**
385     * Returns all repetitions of Contact Title (FAC-6).
386     */
387    public ST[] getFac6_ContactTitle() {
388        ST[] retVal = this.getTypedField(6, new ST[0]);
389        return retVal;
390    }
391
392
393    /**
394     * Returns a count of the current number of repetitions of Contact Title (FAC-6).
395     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
396     * it will return zero.
397     */
398    public int getContactTitleReps() {
399        return this.getReps(6);
400    }
401
402
403    /**
404     * Returns a specific repetition of
405     * FAC-6: "Contact Title" - creates it if necessary
406     *
407     * @param rep The repetition index (0-indexed)
408     */
409    public ST getContactTitle(int rep) { 
410                ST retVal = this.getTypedField(6, rep);
411                return retVal;
412    }
413
414    /**
415     * Returns a specific repetition of
416     * FAC-6: "Contact Title" - creates it if necessary
417     *
418     * @param rep The repetition index (0-indexed)
419     */
420    public ST getFac6_ContactTitle(int rep) { 
421                ST retVal = this.getTypedField(6, rep);
422                return retVal;
423    }
424
425    /**
426     * Returns a count of the current number of repetitions of Contact Title (FAC-6).
427     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
428     * it will return zero.
429     */
430    public int getFac6_ContactTitleReps() {
431        return this.getReps(6);
432    }
433
434
435    /**
436     * Inserts a repetition of
437     * FAC-6: "Contact Title" at a specific index
438     *
439     * @param rep The repetition index (0-indexed)
440     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
441     */
442    public ST insertContactTitle(int rep) throws HL7Exception { 
443        return (ST) super.insertRepetition(6, rep);
444    }
445
446
447    /**
448     * Inserts a repetition of
449     * FAC-6: "Contact Title" at a specific index
450     *
451     * @param rep The repetition index (0-indexed)
452     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
453     */
454    public ST insertFac6_ContactTitle(int rep) throws HL7Exception { 
455        return (ST) super.insertRepetition(6, rep);
456    }
457
458
459    /**
460     * Removes a repetition of
461     * FAC-6: "Contact Title" at a specific index
462     *
463     * @param rep The repetition index (0-indexed)
464     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
465     */
466    public ST removeContactTitle(int rep) throws HL7Exception { 
467        return (ST) super.removeRepetition(6, rep);
468    }
469
470
471    /**
472     * Removes a repetition of
473     * FAC-6: "Contact Title" at a specific index
474     *
475     * @param rep The repetition index (0-indexed)
476     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
477     */
478    public ST removeFac6_ContactTitle(int rep) throws HL7Exception { 
479        return (ST) super.removeRepetition(6, rep);
480    }
481
482
483
484    /**
485     * Returns all repetitions of Contact Address (FAC-7).
486     */
487    public XAD[] getContactAddress() {
488        XAD[] retVal = this.getTypedField(7, new XAD[0]);
489        return retVal;
490    }
491
492
493    /**
494     * Returns all repetitions of Contact Address (FAC-7).
495     */
496    public XAD[] getFac7_ContactAddress() {
497        XAD[] retVal = this.getTypedField(7, new XAD[0]);
498        return retVal;
499    }
500
501
502    /**
503     * Returns a count of the current number of repetitions of Contact Address (FAC-7).
504     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
505     * it will return zero.
506     */
507    public int getContactAddressReps() {
508        return this.getReps(7);
509    }
510
511
512    /**
513     * Returns a specific repetition of
514     * FAC-7: "Contact Address" - creates it if necessary
515     *
516     * @param rep The repetition index (0-indexed)
517     */
518    public XAD getContactAddress(int rep) { 
519                XAD retVal = this.getTypedField(7, rep);
520                return retVal;
521    }
522
523    /**
524     * Returns a specific repetition of
525     * FAC-7: "Contact Address" - creates it if necessary
526     *
527     * @param rep The repetition index (0-indexed)
528     */
529    public XAD getFac7_ContactAddress(int rep) { 
530                XAD retVal = this.getTypedField(7, rep);
531                return retVal;
532    }
533
534    /**
535     * Returns a count of the current number of repetitions of Contact Address (FAC-7).
536     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
537     * it will return zero.
538     */
539    public int getFac7_ContactAddressReps() {
540        return this.getReps(7);
541    }
542
543
544    /**
545     * Inserts a repetition of
546     * FAC-7: "Contact Address" 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 XAD insertContactAddress(int rep) throws HL7Exception { 
552        return (XAD) super.insertRepetition(7, rep);
553    }
554
555
556    /**
557     * Inserts a repetition of
558     * FAC-7: "Contact Address" at a specific index
559     *
560     * @param rep The repetition index (0-indexed)
561     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
562     */
563    public XAD insertFac7_ContactAddress(int rep) throws HL7Exception { 
564        return (XAD) super.insertRepetition(7, rep);
565    }
566
567
568    /**
569     * Removes a repetition of
570     * FAC-7: "Contact Address" at a specific index
571     *
572     * @param rep The repetition index (0-indexed)
573     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
574     */
575    public XAD removeContactAddress(int rep) throws HL7Exception { 
576        return (XAD) super.removeRepetition(7, rep);
577    }
578
579
580    /**
581     * Removes a repetition of
582     * FAC-7: "Contact Address" at a specific index
583     *
584     * @param rep The repetition index (0-indexed)
585     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
586     */
587    public XAD removeFac7_ContactAddress(int rep) throws HL7Exception { 
588        return (XAD) super.removeRepetition(7, rep);
589    }
590
591
592
593    /**
594     * Returns all repetitions of Contact Telecommunication (FAC-8).
595     */
596    public XTN[] getContactTelecommunication() {
597        XTN[] retVal = this.getTypedField(8, new XTN[0]);
598        return retVal;
599    }
600
601
602    /**
603     * Returns all repetitions of Contact Telecommunication (FAC-8).
604     */
605    public XTN[] getFac8_ContactTelecommunication() {
606        XTN[] retVal = this.getTypedField(8, new XTN[0]);
607        return retVal;
608    }
609
610
611    /**
612     * Returns a count of the current number of repetitions of Contact Telecommunication (FAC-8).
613     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
614     * it will return zero.
615     */
616    public int getContactTelecommunicationReps() {
617        return this.getReps(8);
618    }
619
620
621    /**
622     * Returns a specific repetition of
623     * FAC-8: "Contact Telecommunication" - creates it if necessary
624     *
625     * @param rep The repetition index (0-indexed)
626     */
627    public XTN getContactTelecommunication(int rep) { 
628                XTN retVal = this.getTypedField(8, rep);
629                return retVal;
630    }
631
632    /**
633     * Returns a specific repetition of
634     * FAC-8: "Contact Telecommunication" - creates it if necessary
635     *
636     * @param rep The repetition index (0-indexed)
637     */
638    public XTN getFac8_ContactTelecommunication(int rep) { 
639                XTN retVal = this.getTypedField(8, rep);
640                return retVal;
641    }
642
643    /**
644     * Returns a count of the current number of repetitions of Contact Telecommunication (FAC-8).
645     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
646     * it will return zero.
647     */
648    public int getFac8_ContactTelecommunicationReps() {
649        return this.getReps(8);
650    }
651
652
653    /**
654     * Inserts a repetition of
655     * FAC-8: "Contact Telecommunication" at a specific index
656     *
657     * @param rep The repetition index (0-indexed)
658     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
659     */
660    public XTN insertContactTelecommunication(int rep) throws HL7Exception { 
661        return (XTN) super.insertRepetition(8, rep);
662    }
663
664
665    /**
666     * Inserts a repetition of
667     * FAC-8: "Contact Telecommunication" at a specific index
668     *
669     * @param rep The repetition index (0-indexed)
670     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
671     */
672    public XTN insertFac8_ContactTelecommunication(int rep) throws HL7Exception { 
673        return (XTN) super.insertRepetition(8, rep);
674    }
675
676
677    /**
678     * Removes a repetition of
679     * FAC-8: "Contact Telecommunication" at a specific index
680     *
681     * @param rep The repetition index (0-indexed)
682     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
683     */
684    public XTN removeContactTelecommunication(int rep) throws HL7Exception { 
685        return (XTN) super.removeRepetition(8, rep);
686    }
687
688
689    /**
690     * Removes a repetition of
691     * FAC-8: "Contact Telecommunication" at a specific index
692     *
693     * @param rep The repetition index (0-indexed)
694     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
695     */
696    public XTN removeFac8_ContactTelecommunication(int rep) throws HL7Exception { 
697        return (XTN) super.removeRepetition(8, rep);
698    }
699
700
701
702    /**
703     * Returns all repetitions of Signature Authority (FAC-9).
704     */
705    public XCN[] getSignatureAuthority() {
706        XCN[] retVal = this.getTypedField(9, new XCN[0]);
707        return retVal;
708    }
709
710
711    /**
712     * Returns all repetitions of Signature Authority (FAC-9).
713     */
714    public XCN[] getFac9_SignatureAuthority() {
715        XCN[] retVal = this.getTypedField(9, new XCN[0]);
716        return retVal;
717    }
718
719
720    /**
721     * Returns a count of the current number of repetitions of Signature Authority (FAC-9).
722     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
723     * it will return zero.
724     */
725    public int getSignatureAuthorityReps() {
726        return this.getReps(9);
727    }
728
729
730    /**
731     * Returns a specific repetition of
732     * FAC-9: "Signature Authority" - creates it if necessary
733     *
734     * @param rep The repetition index (0-indexed)
735     */
736    public XCN getSignatureAuthority(int rep) { 
737                XCN retVal = this.getTypedField(9, rep);
738                return retVal;
739    }
740
741    /**
742     * Returns a specific repetition of
743     * FAC-9: "Signature Authority" - creates it if necessary
744     *
745     * @param rep The repetition index (0-indexed)
746     */
747    public XCN getFac9_SignatureAuthority(int rep) { 
748                XCN retVal = this.getTypedField(9, rep);
749                return retVal;
750    }
751
752    /**
753     * Returns a count of the current number of repetitions of Signature Authority (FAC-9).
754     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
755     * it will return zero.
756     */
757    public int getFac9_SignatureAuthorityReps() {
758        return this.getReps(9);
759    }
760
761
762    /**
763     * Inserts a repetition of
764     * FAC-9: "Signature Authority" at a specific index
765     *
766     * @param rep The repetition index (0-indexed)
767     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
768     */
769    public XCN insertSignatureAuthority(int rep) throws HL7Exception { 
770        return (XCN) super.insertRepetition(9, rep);
771    }
772
773
774    /**
775     * Inserts a repetition of
776     * FAC-9: "Signature Authority" at a specific index
777     *
778     * @param rep The repetition index (0-indexed)
779     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
780     */
781    public XCN insertFac9_SignatureAuthority(int rep) throws HL7Exception { 
782        return (XCN) super.insertRepetition(9, rep);
783    }
784
785
786    /**
787     * Removes a repetition of
788     * FAC-9: "Signature Authority" at a specific index
789     *
790     * @param rep The repetition index (0-indexed)
791     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
792     */
793    public XCN removeSignatureAuthority(int rep) throws HL7Exception { 
794        return (XCN) super.removeRepetition(9, rep);
795    }
796
797
798    /**
799     * Removes a repetition of
800     * FAC-9: "Signature Authority" at a specific index
801     *
802     * @param rep The repetition index (0-indexed)
803     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
804     */
805    public XCN removeFac9_SignatureAuthority(int rep) throws HL7Exception { 
806        return (XCN) super.removeRepetition(9, rep);
807    }
808
809
810
811
812    /**
813     * Returns
814     * FAC-10: "Signature Authority Title" - creates it if necessary
815     */
816    public ST getSignatureAuthorityTitle() { 
817                ST retVal = this.getTypedField(10, 0);
818                return retVal;
819    }
820    
821    /**
822     * Returns
823     * FAC-10: "Signature Authority Title" - creates it if necessary
824     */
825    public ST getFac10_SignatureAuthorityTitle() { 
826                ST retVal = this.getTypedField(10, 0);
827                return retVal;
828    }
829
830
831    /**
832     * Returns all repetitions of Signature Authority Address (FAC-11).
833     */
834    public XAD[] getSignatureAuthorityAddress() {
835        XAD[] retVal = this.getTypedField(11, new XAD[0]);
836        return retVal;
837    }
838
839
840    /**
841     * Returns all repetitions of Signature Authority Address (FAC-11).
842     */
843    public XAD[] getFac11_SignatureAuthorityAddress() {
844        XAD[] retVal = this.getTypedField(11, new XAD[0]);
845        return retVal;
846    }
847
848
849    /**
850     * Returns a count of the current number of repetitions of Signature Authority Address (FAC-11).
851     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
852     * it will return zero.
853     */
854    public int getSignatureAuthorityAddressReps() {
855        return this.getReps(11);
856    }
857
858
859    /**
860     * Returns a specific repetition of
861     * FAC-11: "Signature Authority Address" - creates it if necessary
862     *
863     * @param rep The repetition index (0-indexed)
864     */
865    public XAD getSignatureAuthorityAddress(int rep) { 
866                XAD retVal = this.getTypedField(11, rep);
867                return retVal;
868    }
869
870    /**
871     * Returns a specific repetition of
872     * FAC-11: "Signature Authority Address" - creates it if necessary
873     *
874     * @param rep The repetition index (0-indexed)
875     */
876    public XAD getFac11_SignatureAuthorityAddress(int rep) { 
877                XAD retVal = this.getTypedField(11, rep);
878                return retVal;
879    }
880
881    /**
882     * Returns a count of the current number of repetitions of Signature Authority Address (FAC-11).
883     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
884     * it will return zero.
885     */
886    public int getFac11_SignatureAuthorityAddressReps() {
887        return this.getReps(11);
888    }
889
890
891    /**
892     * Inserts a repetition of
893     * FAC-11: "Signature Authority Address" at a specific index
894     *
895     * @param rep The repetition index (0-indexed)
896     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
897     */
898    public XAD insertSignatureAuthorityAddress(int rep) throws HL7Exception { 
899        return (XAD) super.insertRepetition(11, rep);
900    }
901
902
903    /**
904     * Inserts a repetition of
905     * FAC-11: "Signature Authority Address" at a specific index
906     *
907     * @param rep The repetition index (0-indexed)
908     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
909     */
910    public XAD insertFac11_SignatureAuthorityAddress(int rep) throws HL7Exception { 
911        return (XAD) super.insertRepetition(11, rep);
912    }
913
914
915    /**
916     * Removes a repetition of
917     * FAC-11: "Signature Authority Address" at a specific index
918     *
919     * @param rep The repetition index (0-indexed)
920     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
921     */
922    public XAD removeSignatureAuthorityAddress(int rep) throws HL7Exception { 
923        return (XAD) super.removeRepetition(11, rep);
924    }
925
926
927    /**
928     * Removes a repetition of
929     * FAC-11: "Signature Authority Address" at a specific index
930     *
931     * @param rep The repetition index (0-indexed)
932     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
933     */
934    public XAD removeFac11_SignatureAuthorityAddress(int rep) throws HL7Exception { 
935        return (XAD) super.removeRepetition(11, rep);
936    }
937
938
939
940
941    /**
942     * Returns
943     * FAC-12: "Signature Authority Telecommunication" - creates it if necessary
944     */
945    public XTN getSignatureAuthorityTelecommunication() { 
946                XTN retVal = this.getTypedField(12, 0);
947                return retVal;
948    }
949    
950    /**
951     * Returns
952     * FAC-12: "Signature Authority Telecommunication" - creates it if necessary
953     */
954    public XTN getFac12_SignatureAuthorityTelecommunication() { 
955                XTN retVal = this.getTypedField(12, 0);
956                return retVal;
957    }
958
959
960
961
962
963    /** {@inheritDoc} */   
964    protected Type createNewTypeWithoutReflection(int field) {
965       switch (field) {
966          case 0: return new EI(getMessage());
967          case 1: return new ID(getMessage(), new Integer( 331 ));
968          case 2: return new XAD(getMessage());
969          case 3: return new XTN(getMessage());
970          case 4: return new XCN(getMessage());
971          case 5: return new ST(getMessage());
972          case 6: return new XAD(getMessage());
973          case 7: return new XTN(getMessage());
974          case 8: return new XCN(getMessage());
975          case 9: return new ST(getMessage());
976          case 10: return new XAD(getMessage());
977          case 11: return new XTN(getMessage());
978          default: return null;
979       }
980   }
981
982
983}
984