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 ERR message segment (Error). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>ERR-1: Error Code and Location (ELD) <b>optional repeating</b>
053     * <li>ERR-2: Error Location (ERL) <b>optional repeating</b>
054     * <li>ERR-3: HL7 Error Code (CWE) <b> </b>
055     * <li>ERR-4: Severity (ID) <b> </b>
056     * <li>ERR-5: Application Error Code (CWE) <b>optional </b>
057     * <li>ERR-6: Application Error Parameter (ST) <b>optional repeating</b>
058     * <li>ERR-7: Diagnostic Information (TX) <b>optional </b>
059     * <li>ERR-8: User Message (TX) <b>optional </b>
060     * <li>ERR-9: Inform Person Indicator (IS) <b>optional repeating</b>
061     * <li>ERR-10: Override Type (CWE) <b>optional </b>
062     * <li>ERR-11: Override Reason Code (CWE) <b>optional repeating</b>
063     * <li>ERR-12: Help Desk Contact Point (XTN) <b>optional repeating</b>
064 * </ul>
065 */
066@SuppressWarnings("unused")
067public class ERR extends AbstractSegment {
068
069    /** 
070     * Creates a new ERR segment
071     */
072    public ERR(Group parent, ModelClassFactory factory) {
073       super(parent, factory);
074       init(factory);
075    }
076
077    private void init(ModelClassFactory factory) {
078       try {
079                                  this.add(ELD.class, false, 0, 493, new Object[]{ getMessage() }, "Error Code and Location");
080                                  this.add(ERL.class, false, 0, 18, new Object[]{ getMessage() }, "Error Location");
081                                  this.add(CWE.class, true, 1, 705, new Object[]{ getMessage() }, "HL7 Error Code");
082                                              this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(516) }, "Severity");
083                                  this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Application Error Code");
084                                  this.add(ST.class, false, 10, 80, new Object[]{ getMessage() }, "Application Error Parameter");
085                                  this.add(TX.class, false, 1, 2048, new Object[]{ getMessage() }, "Diagnostic Information");
086                                  this.add(TX.class, false, 1, 250, new Object[]{ getMessage() }, "User Message");
087                                              this.add(IS.class, false, 0, 20, new Object[]{ getMessage(), new Integer(517) }, "Inform Person Indicator");
088                                  this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Override Type");
089                                  this.add(CWE.class, false, 0, 705, new Object[]{ getMessage() }, "Override Reason Code");
090                                  this.add(XTN.class, false, 0, 652, new Object[]{ getMessage() }, "Help Desk Contact Point");
091       } catch(HL7Exception e) {
092          log.error("Unexpected error creating ERR - this is probably a bug in the source code generator.", e);
093       }
094    }
095
096
097    /**
098     * Returns all repetitions of Error Code and Location (ERR-1).
099     */
100    public ELD[] getErrorCodeAndLocation() {
101        ELD[] retVal = this.getTypedField(1, new ELD[0]);
102        return retVal;
103    }
104
105
106    /**
107     * Returns all repetitions of Error Code and Location (ERR-1).
108     */
109    public ELD[] getErr1_ErrorCodeAndLocation() {
110        ELD[] retVal = this.getTypedField(1, new ELD[0]);
111        return retVal;
112    }
113
114
115    /**
116     * Returns a count of the current number of repetitions of Error Code and Location (ERR-1).
117     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
118     * it will return zero.
119     */
120    public int getErrorCodeAndLocationReps() {
121        return this.getReps(1);
122    }
123
124
125    /**
126     * Returns a specific repetition of
127     * ERR-1: "Error Code and Location" - creates it if necessary
128     *
129     * @param rep The repetition index (0-indexed)
130     */
131    public ELD getErrorCodeAndLocation(int rep) { 
132                ELD retVal = this.getTypedField(1, rep);
133                return retVal;
134    }
135
136    /**
137     * Returns a specific repetition of
138     * ERR-1: "Error Code and Location" - creates it if necessary
139     *
140     * @param rep The repetition index (0-indexed)
141     */
142    public ELD getErr1_ErrorCodeAndLocation(int rep) { 
143                ELD retVal = this.getTypedField(1, rep);
144                return retVal;
145    }
146
147    /**
148     * Returns a count of the current number of repetitions of Error Code and Location (ERR-1).
149     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
150     * it will return zero.
151     */
152    public int getErr1_ErrorCodeAndLocationReps() {
153        return this.getReps(1);
154    }
155
156
157    /**
158     * Inserts a repetition of
159     * ERR-1: "Error Code and Location" at a specific index
160     *
161     * @param rep The repetition index (0-indexed)
162     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
163     */
164    public ELD insertErrorCodeAndLocation(int rep) throws HL7Exception { 
165        return (ELD) super.insertRepetition(1, rep);
166    }
167
168
169    /**
170     * Inserts a repetition of
171     * ERR-1: "Error Code and Location" at a specific index
172     *
173     * @param rep The repetition index (0-indexed)
174     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
175     */
176    public ELD insertErr1_ErrorCodeAndLocation(int rep) throws HL7Exception { 
177        return (ELD) super.insertRepetition(1, rep);
178    }
179
180
181    /**
182     * Removes a repetition of
183     * ERR-1: "Error Code and Location" at a specific index
184     *
185     * @param rep The repetition index (0-indexed)
186     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
187     */
188    public ELD removeErrorCodeAndLocation(int rep) throws HL7Exception { 
189        return (ELD) super.removeRepetition(1, rep);
190    }
191
192
193    /**
194     * Removes a repetition of
195     * ERR-1: "Error Code and Location" at a specific index
196     *
197     * @param rep The repetition index (0-indexed)
198     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
199     */
200    public ELD removeErr1_ErrorCodeAndLocation(int rep) throws HL7Exception { 
201        return (ELD) super.removeRepetition(1, rep);
202    }
203
204
205
206    /**
207     * Returns all repetitions of Error Location (ERR-2).
208     */
209    public ERL[] getErrorLocation() {
210        ERL[] retVal = this.getTypedField(2, new ERL[0]);
211        return retVal;
212    }
213
214
215    /**
216     * Returns all repetitions of Error Location (ERR-2).
217     */
218    public ERL[] getErr2_ErrorLocation() {
219        ERL[] retVal = this.getTypedField(2, new ERL[0]);
220        return retVal;
221    }
222
223
224    /**
225     * Returns a count of the current number of repetitions of Error Location (ERR-2).
226     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
227     * it will return zero.
228     */
229    public int getErrorLocationReps() {
230        return this.getReps(2);
231    }
232
233
234    /**
235     * Returns a specific repetition of
236     * ERR-2: "Error Location" - creates it if necessary
237     *
238     * @param rep The repetition index (0-indexed)
239     */
240    public ERL getErrorLocation(int rep) { 
241                ERL retVal = this.getTypedField(2, rep);
242                return retVal;
243    }
244
245    /**
246     * Returns a specific repetition of
247     * ERR-2: "Error Location" - creates it if necessary
248     *
249     * @param rep The repetition index (0-indexed)
250     */
251    public ERL getErr2_ErrorLocation(int rep) { 
252                ERL retVal = this.getTypedField(2, rep);
253                return retVal;
254    }
255
256    /**
257     * Returns a count of the current number of repetitions of Error Location (ERR-2).
258     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
259     * it will return zero.
260     */
261    public int getErr2_ErrorLocationReps() {
262        return this.getReps(2);
263    }
264
265
266    /**
267     * Inserts a repetition of
268     * ERR-2: "Error Location" at a specific index
269     *
270     * @param rep The repetition index (0-indexed)
271     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
272     */
273    public ERL insertErrorLocation(int rep) throws HL7Exception { 
274        return (ERL) super.insertRepetition(2, rep);
275    }
276
277
278    /**
279     * Inserts a repetition of
280     * ERR-2: "Error Location" at a specific index
281     *
282     * @param rep The repetition index (0-indexed)
283     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
284     */
285    public ERL insertErr2_ErrorLocation(int rep) throws HL7Exception { 
286        return (ERL) super.insertRepetition(2, rep);
287    }
288
289
290    /**
291     * Removes a repetition of
292     * ERR-2: "Error Location" at a specific index
293     *
294     * @param rep The repetition index (0-indexed)
295     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
296     */
297    public ERL removeErrorLocation(int rep) throws HL7Exception { 
298        return (ERL) super.removeRepetition(2, rep);
299    }
300
301
302    /**
303     * Removes a repetition of
304     * ERR-2: "Error Location" at a specific index
305     *
306     * @param rep The repetition index (0-indexed)
307     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
308     */
309    public ERL removeErr2_ErrorLocation(int rep) throws HL7Exception { 
310        return (ERL) super.removeRepetition(2, rep);
311    }
312
313
314
315
316    /**
317     * Returns
318     * ERR-3: "HL7 Error Code" - creates it if necessary
319     */
320    public CWE getHL7ErrorCode() { 
321                CWE retVal = this.getTypedField(3, 0);
322                return retVal;
323    }
324    
325    /**
326     * Returns
327     * ERR-3: "HL7 Error Code" - creates it if necessary
328     */
329    public CWE getErr3_HL7ErrorCode() { 
330                CWE retVal = this.getTypedField(3, 0);
331                return retVal;
332    }
333
334
335
336    /**
337     * Returns
338     * ERR-4: "Severity" - creates it if necessary
339     */
340    public ID getSeverity() { 
341                ID retVal = this.getTypedField(4, 0);
342                return retVal;
343    }
344    
345    /**
346     * Returns
347     * ERR-4: "Severity" - creates it if necessary
348     */
349    public ID getErr4_Severity() { 
350                ID retVal = this.getTypedField(4, 0);
351                return retVal;
352    }
353
354
355
356    /**
357     * Returns
358     * ERR-5: "Application Error Code" - creates it if necessary
359     */
360    public CWE getApplicationErrorCode() { 
361                CWE retVal = this.getTypedField(5, 0);
362                return retVal;
363    }
364    
365    /**
366     * Returns
367     * ERR-5: "Application Error Code" - creates it if necessary
368     */
369    public CWE getErr5_ApplicationErrorCode() { 
370                CWE retVal = this.getTypedField(5, 0);
371                return retVal;
372    }
373
374
375    /**
376     * Returns all repetitions of Application Error Parameter (ERR-6).
377     */
378    public ST[] getApplicationErrorParameter() {
379        ST[] retVal = this.getTypedField(6, new ST[0]);
380        return retVal;
381    }
382
383
384    /**
385     * Returns all repetitions of Application Error Parameter (ERR-6).
386     */
387    public ST[] getErr6_ApplicationErrorParameter() {
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 Application Error Parameter (ERR-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 getApplicationErrorParameterReps() {
399        return this.getReps(6);
400    }
401
402
403    /**
404     * Returns a specific repetition of
405     * ERR-6: "Application Error Parameter" - creates it if necessary
406     *
407     * @param rep The repetition index (0-indexed)
408     */
409    public ST getApplicationErrorParameter(int rep) { 
410                ST retVal = this.getTypedField(6, rep);
411                return retVal;
412    }
413
414    /**
415     * Returns a specific repetition of
416     * ERR-6: "Application Error Parameter" - creates it if necessary
417     *
418     * @param rep The repetition index (0-indexed)
419     */
420    public ST getErr6_ApplicationErrorParameter(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 Application Error Parameter (ERR-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 getErr6_ApplicationErrorParameterReps() {
431        return this.getReps(6);
432    }
433
434
435    /**
436     * Inserts a repetition of
437     * ERR-6: "Application Error Parameter" 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 insertApplicationErrorParameter(int rep) throws HL7Exception { 
443        return (ST) super.insertRepetition(6, rep);
444    }
445
446
447    /**
448     * Inserts a repetition of
449     * ERR-6: "Application Error Parameter" 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 insertErr6_ApplicationErrorParameter(int rep) throws HL7Exception { 
455        return (ST) super.insertRepetition(6, rep);
456    }
457
458
459    /**
460     * Removes a repetition of
461     * ERR-6: "Application Error Parameter" 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 removeApplicationErrorParameter(int rep) throws HL7Exception { 
467        return (ST) super.removeRepetition(6, rep);
468    }
469
470
471    /**
472     * Removes a repetition of
473     * ERR-6: "Application Error Parameter" 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 removeErr6_ApplicationErrorParameter(int rep) throws HL7Exception { 
479        return (ST) super.removeRepetition(6, rep);
480    }
481
482
483
484
485    /**
486     * Returns
487     * ERR-7: "Diagnostic Information" - creates it if necessary
488     */
489    public TX getDiagnosticInformation() { 
490                TX retVal = this.getTypedField(7, 0);
491                return retVal;
492    }
493    
494    /**
495     * Returns
496     * ERR-7: "Diagnostic Information" - creates it if necessary
497     */
498    public TX getErr7_DiagnosticInformation() { 
499                TX retVal = this.getTypedField(7, 0);
500                return retVal;
501    }
502
503
504
505    /**
506     * Returns
507     * ERR-8: "User Message" - creates it if necessary
508     */
509    public TX getUserMessage() { 
510                TX retVal = this.getTypedField(8, 0);
511                return retVal;
512    }
513    
514    /**
515     * Returns
516     * ERR-8: "User Message" - creates it if necessary
517     */
518    public TX getErr8_UserMessage() { 
519                TX retVal = this.getTypedField(8, 0);
520                return retVal;
521    }
522
523
524    /**
525     * Returns all repetitions of Inform Person Indicator (ERR-9).
526     */
527    public IS[] getInformPersonIndicator() {
528        IS[] retVal = this.getTypedField(9, new IS[0]);
529        return retVal;
530    }
531
532
533    /**
534     * Returns all repetitions of Inform Person Indicator (ERR-9).
535     */
536    public IS[] getErr9_InformPersonIndicator() {
537        IS[] retVal = this.getTypedField(9, new IS[0]);
538        return retVal;
539    }
540
541
542    /**
543     * Returns a count of the current number of repetitions of Inform Person Indicator (ERR-9).
544     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
545     * it will return zero.
546     */
547    public int getInformPersonIndicatorReps() {
548        return this.getReps(9);
549    }
550
551
552    /**
553     * Returns a specific repetition of
554     * ERR-9: "Inform Person Indicator" - creates it if necessary
555     *
556     * @param rep The repetition index (0-indexed)
557     */
558    public IS getInformPersonIndicator(int rep) { 
559                IS retVal = this.getTypedField(9, rep);
560                return retVal;
561    }
562
563    /**
564     * Returns a specific repetition of
565     * ERR-9: "Inform Person Indicator" - creates it if necessary
566     *
567     * @param rep The repetition index (0-indexed)
568     */
569    public IS getErr9_InformPersonIndicator(int rep) { 
570                IS retVal = this.getTypedField(9, rep);
571                return retVal;
572    }
573
574    /**
575     * Returns a count of the current number of repetitions of Inform Person Indicator (ERR-9).
576     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
577     * it will return zero.
578     */
579    public int getErr9_InformPersonIndicatorReps() {
580        return this.getReps(9);
581    }
582
583
584    /**
585     * Inserts a repetition of
586     * ERR-9: "Inform Person Indicator" at a specific index
587     *
588     * @param rep The repetition index (0-indexed)
589     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
590     */
591    public IS insertInformPersonIndicator(int rep) throws HL7Exception { 
592        return (IS) super.insertRepetition(9, rep);
593    }
594
595
596    /**
597     * Inserts a repetition of
598     * ERR-9: "Inform Person Indicator" at a specific index
599     *
600     * @param rep The repetition index (0-indexed)
601     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
602     */
603    public IS insertErr9_InformPersonIndicator(int rep) throws HL7Exception { 
604        return (IS) super.insertRepetition(9, rep);
605    }
606
607
608    /**
609     * Removes a repetition of
610     * ERR-9: "Inform Person Indicator" at a specific index
611     *
612     * @param rep The repetition index (0-indexed)
613     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
614     */
615    public IS removeInformPersonIndicator(int rep) throws HL7Exception { 
616        return (IS) super.removeRepetition(9, rep);
617    }
618
619
620    /**
621     * Removes a repetition of
622     * ERR-9: "Inform Person Indicator" at a specific index
623     *
624     * @param rep The repetition index (0-indexed)
625     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
626     */
627    public IS removeErr9_InformPersonIndicator(int rep) throws HL7Exception { 
628        return (IS) super.removeRepetition(9, rep);
629    }
630
631
632
633
634    /**
635     * Returns
636     * ERR-10: "Override Type" - creates it if necessary
637     */
638    public CWE getOverrideType() { 
639                CWE retVal = this.getTypedField(10, 0);
640                return retVal;
641    }
642    
643    /**
644     * Returns
645     * ERR-10: "Override Type" - creates it if necessary
646     */
647    public CWE getErr10_OverrideType() { 
648                CWE retVal = this.getTypedField(10, 0);
649                return retVal;
650    }
651
652
653    /**
654     * Returns all repetitions of Override Reason Code (ERR-11).
655     */
656    public CWE[] getOverrideReasonCode() {
657        CWE[] retVal = this.getTypedField(11, new CWE[0]);
658        return retVal;
659    }
660
661
662    /**
663     * Returns all repetitions of Override Reason Code (ERR-11).
664     */
665    public CWE[] getErr11_OverrideReasonCode() {
666        CWE[] retVal = this.getTypedField(11, new CWE[0]);
667        return retVal;
668    }
669
670
671    /**
672     * Returns a count of the current number of repetitions of Override Reason Code (ERR-11).
673     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
674     * it will return zero.
675     */
676    public int getOverrideReasonCodeReps() {
677        return this.getReps(11);
678    }
679
680
681    /**
682     * Returns a specific repetition of
683     * ERR-11: "Override Reason Code" - creates it if necessary
684     *
685     * @param rep The repetition index (0-indexed)
686     */
687    public CWE getOverrideReasonCode(int rep) { 
688                CWE retVal = this.getTypedField(11, rep);
689                return retVal;
690    }
691
692    /**
693     * Returns a specific repetition of
694     * ERR-11: "Override Reason Code" - creates it if necessary
695     *
696     * @param rep The repetition index (0-indexed)
697     */
698    public CWE getErr11_OverrideReasonCode(int rep) { 
699                CWE retVal = this.getTypedField(11, rep);
700                return retVal;
701    }
702
703    /**
704     * Returns a count of the current number of repetitions of Override Reason Code (ERR-11).
705     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
706     * it will return zero.
707     */
708    public int getErr11_OverrideReasonCodeReps() {
709        return this.getReps(11);
710    }
711
712
713    /**
714     * Inserts a repetition of
715     * ERR-11: "Override Reason Code" at a specific index
716     *
717     * @param rep The repetition index (0-indexed)
718     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
719     */
720    public CWE insertOverrideReasonCode(int rep) throws HL7Exception { 
721        return (CWE) super.insertRepetition(11, rep);
722    }
723
724
725    /**
726     * Inserts a repetition of
727     * ERR-11: "Override Reason Code" at a specific index
728     *
729     * @param rep The repetition index (0-indexed)
730     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
731     */
732    public CWE insertErr11_OverrideReasonCode(int rep) throws HL7Exception { 
733        return (CWE) super.insertRepetition(11, rep);
734    }
735
736
737    /**
738     * Removes a repetition of
739     * ERR-11: "Override Reason Code" at a specific index
740     *
741     * @param rep The repetition index (0-indexed)
742     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
743     */
744    public CWE removeOverrideReasonCode(int rep) throws HL7Exception { 
745        return (CWE) super.removeRepetition(11, rep);
746    }
747
748
749    /**
750     * Removes a repetition of
751     * ERR-11: "Override Reason Code" at a specific index
752     *
753     * @param rep The repetition index (0-indexed)
754     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
755     */
756    public CWE removeErr11_OverrideReasonCode(int rep) throws HL7Exception { 
757        return (CWE) super.removeRepetition(11, rep);
758    }
759
760
761
762    /**
763     * Returns all repetitions of Help Desk Contact Point (ERR-12).
764     */
765    public XTN[] getHelpDeskContactPoint() {
766        XTN[] retVal = this.getTypedField(12, new XTN[0]);
767        return retVal;
768    }
769
770
771    /**
772     * Returns all repetitions of Help Desk Contact Point (ERR-12).
773     */
774    public XTN[] getErr12_HelpDeskContactPoint() {
775        XTN[] retVal = this.getTypedField(12, new XTN[0]);
776        return retVal;
777    }
778
779
780    /**
781     * Returns a count of the current number of repetitions of Help Desk Contact Point (ERR-12).
782     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
783     * it will return zero.
784     */
785    public int getHelpDeskContactPointReps() {
786        return this.getReps(12);
787    }
788
789
790    /**
791     * Returns a specific repetition of
792     * ERR-12: "Help Desk Contact Point" - creates it if necessary
793     *
794     * @param rep The repetition index (0-indexed)
795     */
796    public XTN getHelpDeskContactPoint(int rep) { 
797                XTN retVal = this.getTypedField(12, rep);
798                return retVal;
799    }
800
801    /**
802     * Returns a specific repetition of
803     * ERR-12: "Help Desk Contact Point" - creates it if necessary
804     *
805     * @param rep The repetition index (0-indexed)
806     */
807    public XTN getErr12_HelpDeskContactPoint(int rep) { 
808                XTN retVal = this.getTypedField(12, rep);
809                return retVal;
810    }
811
812    /**
813     * Returns a count of the current number of repetitions of Help Desk Contact Point (ERR-12).
814     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
815     * it will return zero.
816     */
817    public int getErr12_HelpDeskContactPointReps() {
818        return this.getReps(12);
819    }
820
821
822    /**
823     * Inserts a repetition of
824     * ERR-12: "Help Desk Contact Point" at a specific index
825     *
826     * @param rep The repetition index (0-indexed)
827     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
828     */
829    public XTN insertHelpDeskContactPoint(int rep) throws HL7Exception { 
830        return (XTN) super.insertRepetition(12, rep);
831    }
832
833
834    /**
835     * Inserts a repetition of
836     * ERR-12: "Help Desk Contact Point" at a specific index
837     *
838     * @param rep The repetition index (0-indexed)
839     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
840     */
841    public XTN insertErr12_HelpDeskContactPoint(int rep) throws HL7Exception { 
842        return (XTN) super.insertRepetition(12, rep);
843    }
844
845
846    /**
847     * Removes a repetition of
848     * ERR-12: "Help Desk Contact Point" at a specific index
849     *
850     * @param rep The repetition index (0-indexed)
851     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
852     */
853    public XTN removeHelpDeskContactPoint(int rep) throws HL7Exception { 
854        return (XTN) super.removeRepetition(12, rep);
855    }
856
857
858    /**
859     * Removes a repetition of
860     * ERR-12: "Help Desk Contact Point" at a specific index
861     *
862     * @param rep The repetition index (0-indexed)
863     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
864     */
865    public XTN removeErr12_HelpDeskContactPoint(int rep) throws HL7Exception { 
866        return (XTN) super.removeRepetition(12, rep);
867    }
868
869
870
871
872
873
874    /** {@inheritDoc} */   
875    protected Type createNewTypeWithoutReflection(int field) {
876       switch (field) {
877          case 0: return new ELD(getMessage());
878          case 1: return new ERL(getMessage());
879          case 2: return new CWE(getMessage());
880          case 3: return new ID(getMessage(), new Integer( 516 ));
881          case 4: return new CWE(getMessage());
882          case 5: return new ST(getMessage());
883          case 6: return new TX(getMessage());
884          case 7: return new TX(getMessage());
885          case 8: return new IS(getMessage(), new Integer( 517 ));
886          case 9: return new CWE(getMessage());
887          case 10: return new CWE(getMessage());
888          case 11: return new XTN(getMessage());
889          default: return null;
890       }
891   }
892
893
894}
895