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