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    
008    package ca.uhn.hl7v2.model.v24.segment;
009    
010    // import ca.uhn.hl7v2.model.v24.group.*;
011    import ca.uhn.hl7v2.model.v24.datatype.*;
012    import ca.uhn.log.HapiLogFactory;
013    import ca.uhn.hl7v2.HL7Exception;
014    import ca.uhn.hl7v2.parser.ModelClassFactory;
015    import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
016    import ca.uhn.hl7v2.model.AbstractMessage;
017    import ca.uhn.hl7v2.model.Group;
018    import ca.uhn.hl7v2.model.Type;
019    import ca.uhn.hl7v2.model.AbstractSegment;
020    import ca.uhn.hl7v2.model.Varies;
021    
022    /**
023     *<p>Represents an HL7 IN3 message segment (Insurance Additional Information, Certification). 
024     * This segment has the following fields:</p>
025     * <ul>
026         * <li>IN3-1: Set ID - IN3 (SI) <b> </b>
027         * <li>IN3-2: Certification Number (CX) <b>optional </b>
028         * <li>IN3-3: Certified By (XCN) <b>optional repeating</b>
029         * <li>IN3-4: Certification Required (ID) <b>optional </b>
030         * <li>IN3-5: Penalty (MOP) <b>optional </b>
031         * <li>IN3-6: Certification Date/Time (TS) <b>optional </b>
032         * <li>IN3-7: Certification Modify Date/Time (TS) <b>optional </b>
033         * <li>IN3-8: Operator (XCN) <b>optional repeating</b>
034         * <li>IN3-9: Certification Begin Date (DT) <b>optional </b>
035         * <li>IN3-10: Certification End Date (DT) <b>optional </b>
036         * <li>IN3-11: Days (DTN) <b>optional </b>
037         * <li>IN3-12: Non-Concur Code/Description (CE) <b>optional </b>
038         * <li>IN3-13: Non-Concur Effective Date/Time (TS) <b>optional </b>
039         * <li>IN3-14: Physician Reviewer (XCN) <b>optional repeating</b>
040         * <li>IN3-15: Certification Contact (ST) <b>optional </b>
041         * <li>IN3-16: Certification Contact Phone Number (XTN) <b>optional repeating</b>
042         * <li>IN3-17: Appeal Reason (CE) <b>optional </b>
043         * <li>IN3-18: Certification Agency (CE) <b>optional </b>
044         * <li>IN3-19: Certification Agency Phone Number (XTN) <b>optional repeating</b>
045         * <li>IN3-20: Pre-Certification Req/Window (PCF) <b>optional repeating</b>
046         * <li>IN3-21: Case Manager (ST) <b>optional </b>
047         * <li>IN3-22: Second Opinion Date (DT) <b>optional </b>
048         * <li>IN3-23: Second Opinion Status (IS) <b>optional </b>
049         * <li>IN3-24: Second Opinion Documentation Received (IS) <b>optional repeating</b>
050         * <li>IN3-25: Second Opinion Physician (XCN) <b>optional repeating</b>
051     * </ul>
052     */
053    public class IN3 extends AbstractSegment {
054    
055        /** 
056         * Creates a new IN3 segment
057         */
058        public IN3(Group parent, ModelClassFactory factory) {
059           super(parent, factory);
060           init(factory);
061        }
062    
063        private void init(ModelClassFactory factory) {
064           try {
065                                      this.add(SI.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID - IN3");
066                                      this.add(CX.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Certification Number");
067                                      this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Certified By");
068                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Certification Required");
069                                      this.add(MOP.class, false, 1, 10, new Object[]{ getMessage(), new Integer(148) }, "Penalty");
070                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Certification Date/Time");
071                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Certification Modify Date/Time");
072                                      this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Operator");
073                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Certification Begin Date");
074                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Certification End Date");
075                                      this.add(DTN.class, false, 1, 3, new Object[]{ getMessage(), new Integer(149) }, "Days");
076                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(233) }, "Non-Concur Code/Description");
077                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Non-Concur Effective Date/Time");
078                                      this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(10) }, "Physician Reviewer");
079                                      this.add(ST.class, false, 1, 48, new Object[]{ getMessage(), new Integer(0) }, "Certification Contact");
080                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Certification Contact Phone Number");
081                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(345) }, "Appeal Reason");
082                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(346) }, "Certification Agency");
083                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Certification Agency Phone Number");
084                                      this.add(PCF.class, false, 0, 40, new Object[]{ getMessage(), new Integer(150) }, "Pre-Certification Req/Window");
085                                      this.add(ST.class, false, 1, 48, new Object[]{ getMessage(), new Integer(0) }, "Case Manager");
086                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Second Opinion Date");
087                                      this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Second Opinion Status");
088                                      this.add(IS.class, false, 0, 1, new Object[]{ getMessage() }, "Second Opinion Documentation Received");
089                                      this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(10) }, "Second Opinion Physician");
090           } catch(HL7Exception e) {
091              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating IN3 - this is probably a bug in the source code generator.", e);
092           }
093        }
094    
095    
096    
097        /**
098         * Returns
099         * IN3-1: "Set ID - IN3" - creates it if necessary
100         */
101        public SI getSetIDIN3() { 
102            SI ret = null;
103            try {
104                Type t = this.getField(1, 0);
105                ret = (SI)t;
106            } catch (ClassCastException cce) {
107                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
108                throw new RuntimeException(cce);
109            } catch (HL7Exception he) {
110                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
111                throw new RuntimeException(he);
112            }
113            return ret;
114        }
115    
116    
117        /**
118         * Returns
119         * IN3-1: "Set ID - IN3" - creates it if necessary
120         */
121        public SI getIn31_SetIDIN3() { 
122            SI ret = null;
123            try {
124                Type t = this.getField(1, 0);
125                ret = (SI)t;
126            } catch (ClassCastException cce) {
127                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
128                throw new RuntimeException(cce);
129            } catch (HL7Exception he) {
130                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
131                throw new RuntimeException(he);
132            }
133            return ret;
134        }
135    
136    
137    
138        /**
139         * Returns
140         * IN3-2: "Certification Number" - creates it if necessary
141         */
142        public CX getCertificationNumber() { 
143            CX ret = null;
144            try {
145                Type t = this.getField(2, 0);
146                ret = (CX)t;
147            } catch (ClassCastException cce) {
148                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
149                throw new RuntimeException(cce);
150            } catch (HL7Exception he) {
151                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
152                throw new RuntimeException(he);
153            }
154            return ret;
155        }
156    
157    
158        /**
159         * Returns
160         * IN3-2: "Certification Number" - creates it if necessary
161         */
162        public CX getIn32_CertificationNumber() { 
163            CX ret = null;
164            try {
165                Type t = this.getField(2, 0);
166                ret = (CX)t;
167            } catch (ClassCastException cce) {
168                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
169                throw new RuntimeException(cce);
170            } catch (HL7Exception he) {
171                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
172                throw new RuntimeException(he);
173            }
174            return ret;
175        }
176    
177    
178        /**
179         * Returns all repetitions of Certified By (IN3-3).
180         */
181        public XCN[] getCertifiedBy() {
182            XCN[] ret = null;
183            try {
184                Type[] t = this.getField(3);  
185                ret = new XCN[t.length];
186                for (int i = 0; i < ret.length; i++) {
187                    ret[i] = (XCN)t[i];
188                }
189            } catch (ClassCastException cce) {
190                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
191                throw new RuntimeException(cce);
192            } catch (HL7Exception he) {
193                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
194                throw new RuntimeException(he);
195            }
196            return ret;
197        }
198    
199    
200        /**
201         * Returns a count of the current number of repetitions of Certified By (IN3-3).
202         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
203         * it will return zero.
204         */
205        public int getCertifiedByReps() {
206            XCN[] ret = null;
207            try {
208                Type[] t = this.getField(3);
209                return t.length;  
210            } catch (ClassCastException cce) {
211                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
212                throw new RuntimeException(cce);
213            } catch (HL7Exception he) {
214                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
215                throw new RuntimeException(he);
216            }
217        }
218    
219    
220        /**
221         * Returns a specific repetition of
222         * IN3-3: "Certified By" - creates it if necessary
223         *
224         * @param rep The repetition index (0-indexed)
225         */
226        public XCN getCertifiedBy(int rep) { 
227            XCN ret = null;
228            try {
229                Type t = this.getField(3, rep);
230                ret = (XCN)t;
231            } catch (ClassCastException cce) {
232                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
233                throw new RuntimeException(cce);
234            } catch (HL7Exception he) {
235                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
236                throw new RuntimeException(he);
237            }
238            return ret;
239        }
240    
241        /**
242         * Returns a specific repetition of
243         * IN3-3: "Certified By" - creates it if necessary
244         *
245         * @param rep The repetition index (0-indexed)
246         */
247        public XCN getIn33_CertifiedBy(int rep) { 
248            XCN ret = null;
249            try {
250                Type t = this.getField(3, rep);
251                ret = (XCN)t;
252            } catch (ClassCastException cce) {
253                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
254                throw new RuntimeException(cce);
255            } catch (HL7Exception he) {
256                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
257                throw new RuntimeException(he);
258            }
259            return ret;
260        }
261    
262    
263        /**
264         * Returns a count of the current number of repetitions of Certified By (IN3-3).
265         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
266         * it will return zero.
267         */
268        public int getIn33_CertifiedByReps() {
269            XCN[] ret = null;
270            try {
271                Type[] t = this.getField(3);
272                return t.length;  
273            } catch (ClassCastException cce) {
274                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
275                throw new RuntimeException(cce);
276            } catch (HL7Exception he) {
277                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
278                throw new RuntimeException(he);
279            }
280        }
281    
282    
283    
284        /**
285         * Inserts a repetition of
286         * IN3-3: "Certified By" at a specific index
287         *
288         * @param rep The repetition index (0-indexed)
289         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
290         */
291        public XCN insertCertifiedBy(int rep) throws HL7Exception { 
292            return (XCN) super.insertRepetition(3, rep);
293        }
294    
295    
296    
297        /**
298         * Inserts a repetition of
299         * IN3-3: "Certified By" at a specific index
300         *
301         * @param rep The repetition index (0-indexed)
302         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
303         */
304        public XCN insertIn33_CertifiedBy(int rep) throws HL7Exception { 
305            return (XCN) super.insertRepetition(3, rep);
306        }
307    
308    
309        /**
310         * Removes a repetition of
311         * IN3-3: "Certified By" at a specific index
312         *
313         * @param rep The repetition index (0-indexed)
314         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
315         */
316        public XCN removeCertifiedBy(int rep) throws HL7Exception { 
317            return (XCN) super.removeRepetition(3, rep);
318        }
319    
320    
321        /**
322         * Removes a repetition of
323         * IN3-3: "Certified By" at a specific index
324         *
325         * @param rep The repetition index (0-indexed)
326         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
327         */
328        public XCN removeIn33_CertifiedBy(int rep) throws HL7Exception { 
329            return (XCN) super.removeRepetition(3, rep);
330        }
331    
332    
333    
334    
335        /**
336         * Returns
337         * IN3-4: "Certification Required" - creates it if necessary
338         */
339        public ID getCertificationRequired() { 
340            ID ret = null;
341            try {
342                Type t = this.getField(4, 0);
343                ret = (ID)t;
344            } catch (ClassCastException cce) {
345                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
346                throw new RuntimeException(cce);
347            } catch (HL7Exception he) {
348                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
349                throw new RuntimeException(he);
350            }
351            return ret;
352        }
353    
354    
355        /**
356         * Returns
357         * IN3-4: "Certification Required" - creates it if necessary
358         */
359        public ID getIn34_CertificationRequired() { 
360            ID ret = null;
361            try {
362                Type t = this.getField(4, 0);
363                ret = (ID)t;
364            } catch (ClassCastException cce) {
365                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
366                throw new RuntimeException(cce);
367            } catch (HL7Exception he) {
368                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
369                throw new RuntimeException(he);
370            }
371            return ret;
372        }
373    
374    
375    
376        /**
377         * Returns
378         * IN3-5: "Penalty" - creates it if necessary
379         */
380        public MOP getPenalty() { 
381            MOP ret = null;
382            try {
383                Type t = this.getField(5, 0);
384                ret = (MOP)t;
385            } catch (ClassCastException cce) {
386                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
387                throw new RuntimeException(cce);
388            } catch (HL7Exception he) {
389                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
390                throw new RuntimeException(he);
391            }
392            return ret;
393        }
394    
395    
396        /**
397         * Returns
398         * IN3-5: "Penalty" - creates it if necessary
399         */
400        public MOP getIn35_Penalty() { 
401            MOP ret = null;
402            try {
403                Type t = this.getField(5, 0);
404                ret = (MOP)t;
405            } catch (ClassCastException cce) {
406                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
407                throw new RuntimeException(cce);
408            } catch (HL7Exception he) {
409                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
410                throw new RuntimeException(he);
411            }
412            return ret;
413        }
414    
415    
416    
417        /**
418         * Returns
419         * IN3-6: "Certification Date/Time" - creates it if necessary
420         */
421        public TS getCertificationDateTime() { 
422            TS ret = null;
423            try {
424                Type t = this.getField(6, 0);
425                ret = (TS)t;
426            } catch (ClassCastException cce) {
427                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
428                throw new RuntimeException(cce);
429            } catch (HL7Exception he) {
430                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
431                throw new RuntimeException(he);
432            }
433            return ret;
434        }
435    
436    
437        /**
438         * Returns
439         * IN3-6: "Certification Date/Time" - creates it if necessary
440         */
441        public TS getIn36_CertificationDateTime() { 
442            TS ret = null;
443            try {
444                Type t = this.getField(6, 0);
445                ret = (TS)t;
446            } catch (ClassCastException cce) {
447                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
448                throw new RuntimeException(cce);
449            } catch (HL7Exception he) {
450                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
451                throw new RuntimeException(he);
452            }
453            return ret;
454        }
455    
456    
457    
458        /**
459         * Returns
460         * IN3-7: "Certification Modify Date/Time" - creates it if necessary
461         */
462        public TS getCertificationModifyDateTime() { 
463            TS ret = null;
464            try {
465                Type t = this.getField(7, 0);
466                ret = (TS)t;
467            } catch (ClassCastException cce) {
468                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
469                throw new RuntimeException(cce);
470            } catch (HL7Exception he) {
471                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
472                throw new RuntimeException(he);
473            }
474            return ret;
475        }
476    
477    
478        /**
479         * Returns
480         * IN3-7: "Certification Modify Date/Time" - creates it if necessary
481         */
482        public TS getIn37_CertificationModifyDateTime() { 
483            TS ret = null;
484            try {
485                Type t = this.getField(7, 0);
486                ret = (TS)t;
487            } catch (ClassCastException cce) {
488                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
489                throw new RuntimeException(cce);
490            } catch (HL7Exception he) {
491                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
492                throw new RuntimeException(he);
493            }
494            return ret;
495        }
496    
497    
498        /**
499         * Returns all repetitions of Operator (IN3-8).
500         */
501        public XCN[] getOperator() {
502            XCN[] ret = null;
503            try {
504                Type[] t = this.getField(8);  
505                ret = new XCN[t.length];
506                for (int i = 0; i < ret.length; i++) {
507                    ret[i] = (XCN)t[i];
508                }
509            } catch (ClassCastException cce) {
510                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
511                throw new RuntimeException(cce);
512            } catch (HL7Exception he) {
513                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
514                throw new RuntimeException(he);
515            }
516            return ret;
517        }
518    
519    
520        /**
521         * Returns a count of the current number of repetitions of Operator (IN3-8).
522         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
523         * it will return zero.
524         */
525        public int getOperatorReps() {
526            XCN[] ret = null;
527            try {
528                Type[] t = this.getField(8);
529                return t.length;  
530            } catch (ClassCastException cce) {
531                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
532                throw new RuntimeException(cce);
533            } catch (HL7Exception he) {
534                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
535                throw new RuntimeException(he);
536            }
537        }
538    
539    
540        /**
541         * Returns a specific repetition of
542         * IN3-8: "Operator" - creates it if necessary
543         *
544         * @param rep The repetition index (0-indexed)
545         */
546        public XCN getOperator(int rep) { 
547            XCN ret = null;
548            try {
549                Type t = this.getField(8, rep);
550                ret = (XCN)t;
551            } catch (ClassCastException cce) {
552                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
553                throw new RuntimeException(cce);
554            } catch (HL7Exception he) {
555                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
556                throw new RuntimeException(he);
557            }
558            return ret;
559        }
560    
561        /**
562         * Returns a specific repetition of
563         * IN3-8: "Operator" - creates it if necessary
564         *
565         * @param rep The repetition index (0-indexed)
566         */
567        public XCN getIn38_Operator(int rep) { 
568            XCN ret = null;
569            try {
570                Type t = this.getField(8, rep);
571                ret = (XCN)t;
572            } catch (ClassCastException cce) {
573                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
574                throw new RuntimeException(cce);
575            } catch (HL7Exception he) {
576                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
577                throw new RuntimeException(he);
578            }
579            return ret;
580        }
581    
582    
583        /**
584         * Returns a count of the current number of repetitions of Operator (IN3-8).
585         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
586         * it will return zero.
587         */
588        public int getIn38_OperatorReps() {
589            XCN[] ret = null;
590            try {
591                Type[] t = this.getField(8);
592                return t.length;  
593            } catch (ClassCastException cce) {
594                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
595                throw new RuntimeException(cce);
596            } catch (HL7Exception he) {
597                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
598                throw new RuntimeException(he);
599            }
600        }
601    
602    
603    
604        /**
605         * Inserts a repetition of
606         * IN3-8: "Operator" at a specific index
607         *
608         * @param rep The repetition index (0-indexed)
609         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
610         */
611        public XCN insertOperator(int rep) throws HL7Exception { 
612            return (XCN) super.insertRepetition(8, rep);
613        }
614    
615    
616    
617        /**
618         * Inserts a repetition of
619         * IN3-8: "Operator" at a specific index
620         *
621         * @param rep The repetition index (0-indexed)
622         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
623         */
624        public XCN insertIn38_Operator(int rep) throws HL7Exception { 
625            return (XCN) super.insertRepetition(8, rep);
626        }
627    
628    
629        /**
630         * Removes a repetition of
631         * IN3-8: "Operator" at a specific index
632         *
633         * @param rep The repetition index (0-indexed)
634         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
635         */
636        public XCN removeOperator(int rep) throws HL7Exception { 
637            return (XCN) super.removeRepetition(8, rep);
638        }
639    
640    
641        /**
642         * Removes a repetition of
643         * IN3-8: "Operator" at a specific index
644         *
645         * @param rep The repetition index (0-indexed)
646         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
647         */
648        public XCN removeIn38_Operator(int rep) throws HL7Exception { 
649            return (XCN) super.removeRepetition(8, rep);
650        }
651    
652    
653    
654    
655        /**
656         * Returns
657         * IN3-9: "Certification Begin Date" - creates it if necessary
658         */
659        public DT getCertificationBeginDate() { 
660            DT ret = null;
661            try {
662                Type t = this.getField(9, 0);
663                ret = (DT)t;
664            } catch (ClassCastException cce) {
665                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
666                throw new RuntimeException(cce);
667            } catch (HL7Exception he) {
668                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
669                throw new RuntimeException(he);
670            }
671            return ret;
672        }
673    
674    
675        /**
676         * Returns
677         * IN3-9: "Certification Begin Date" - creates it if necessary
678         */
679        public DT getIn39_CertificationBeginDate() { 
680            DT ret = null;
681            try {
682                Type t = this.getField(9, 0);
683                ret = (DT)t;
684            } catch (ClassCastException cce) {
685                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
686                throw new RuntimeException(cce);
687            } catch (HL7Exception he) {
688                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
689                throw new RuntimeException(he);
690            }
691            return ret;
692        }
693    
694    
695    
696        /**
697         * Returns
698         * IN3-10: "Certification End Date" - creates it if necessary
699         */
700        public DT getCertificationEndDate() { 
701            DT ret = null;
702            try {
703                Type t = this.getField(10, 0);
704                ret = (DT)t;
705            } catch (ClassCastException cce) {
706                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
707                throw new RuntimeException(cce);
708            } catch (HL7Exception he) {
709                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
710                throw new RuntimeException(he);
711            }
712            return ret;
713        }
714    
715    
716        /**
717         * Returns
718         * IN3-10: "Certification End Date" - creates it if necessary
719         */
720        public DT getIn310_CertificationEndDate() { 
721            DT ret = null;
722            try {
723                Type t = this.getField(10, 0);
724                ret = (DT)t;
725            } catch (ClassCastException cce) {
726                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
727                throw new RuntimeException(cce);
728            } catch (HL7Exception he) {
729                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
730                throw new RuntimeException(he);
731            }
732            return ret;
733        }
734    
735    
736    
737        /**
738         * Returns
739         * IN3-11: "Days" - creates it if necessary
740         */
741        public DTN getDays() { 
742            DTN ret = null;
743            try {
744                Type t = this.getField(11, 0);
745                ret = (DTN)t;
746            } catch (ClassCastException cce) {
747                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
748                throw new RuntimeException(cce);
749            } catch (HL7Exception he) {
750                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
751                throw new RuntimeException(he);
752            }
753            return ret;
754        }
755    
756    
757        /**
758         * Returns
759         * IN3-11: "Days" - creates it if necessary
760         */
761        public DTN getIn311_Days() { 
762            DTN ret = null;
763            try {
764                Type t = this.getField(11, 0);
765                ret = (DTN)t;
766            } catch (ClassCastException cce) {
767                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
768                throw new RuntimeException(cce);
769            } catch (HL7Exception he) {
770                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
771                throw new RuntimeException(he);
772            }
773            return ret;
774        }
775    
776    
777    
778        /**
779         * Returns
780         * IN3-12: "Non-Concur Code/Description" - creates it if necessary
781         */
782        public CE getNonConcurCodeDescription() { 
783            CE ret = null;
784            try {
785                Type t = this.getField(12, 0);
786                ret = (CE)t;
787            } catch (ClassCastException cce) {
788                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
789                throw new RuntimeException(cce);
790            } catch (HL7Exception he) {
791                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
792                throw new RuntimeException(he);
793            }
794            return ret;
795        }
796    
797    
798        /**
799         * Returns
800         * IN3-12: "Non-Concur Code/Description" - creates it if necessary
801         */
802        public CE getIn312_NonConcurCodeDescription() { 
803            CE ret = null;
804            try {
805                Type t = this.getField(12, 0);
806                ret = (CE)t;
807            } catch (ClassCastException cce) {
808                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
809                throw new RuntimeException(cce);
810            } catch (HL7Exception he) {
811                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
812                throw new RuntimeException(he);
813            }
814            return ret;
815        }
816    
817    
818    
819        /**
820         * Returns
821         * IN3-13: "Non-Concur Effective Date/Time" - creates it if necessary
822         */
823        public TS getNonConcurEffectiveDateTime() { 
824            TS ret = null;
825            try {
826                Type t = this.getField(13, 0);
827                ret = (TS)t;
828            } catch (ClassCastException cce) {
829                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
830                throw new RuntimeException(cce);
831            } catch (HL7Exception he) {
832                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
833                throw new RuntimeException(he);
834            }
835            return ret;
836        }
837    
838    
839        /**
840         * Returns
841         * IN3-13: "Non-Concur Effective Date/Time" - creates it if necessary
842         */
843        public TS getIn313_NonConcurEffectiveDateTime() { 
844            TS ret = null;
845            try {
846                Type t = this.getField(13, 0);
847                ret = (TS)t;
848            } catch (ClassCastException cce) {
849                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
850                throw new RuntimeException(cce);
851            } catch (HL7Exception he) {
852                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
853                throw new RuntimeException(he);
854            }
855            return ret;
856        }
857    
858    
859        /**
860         * Returns all repetitions of Physician Reviewer (IN3-14).
861         */
862        public XCN[] getPhysicianReviewer() {
863            XCN[] ret = null;
864            try {
865                Type[] t = this.getField(14);  
866                ret = new XCN[t.length];
867                for (int i = 0; i < ret.length; i++) {
868                    ret[i] = (XCN)t[i];
869                }
870            } catch (ClassCastException cce) {
871                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
872                throw new RuntimeException(cce);
873            } catch (HL7Exception he) {
874                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
875                throw new RuntimeException(he);
876            }
877            return ret;
878        }
879    
880    
881        /**
882         * Returns a count of the current number of repetitions of Physician Reviewer (IN3-14).
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 getPhysicianReviewerReps() {
887            XCN[] ret = null;
888            try {
889                Type[] t = this.getField(14);
890                return t.length;  
891            } catch (ClassCastException cce) {
892                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
893                throw new RuntimeException(cce);
894            } catch (HL7Exception he) {
895                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
896                throw new RuntimeException(he);
897            }
898        }
899    
900    
901        /**
902         * Returns a specific repetition of
903         * IN3-14: "Physician Reviewer" - creates it if necessary
904         *
905         * @param rep The repetition index (0-indexed)
906         */
907        public XCN getPhysicianReviewer(int rep) { 
908            XCN ret = null;
909            try {
910                Type t = this.getField(14, rep);
911                ret = (XCN)t;
912            } catch (ClassCastException cce) {
913                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
914                throw new RuntimeException(cce);
915            } catch (HL7Exception he) {
916                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
917                throw new RuntimeException(he);
918            }
919            return ret;
920        }
921    
922        /**
923         * Returns a specific repetition of
924         * IN3-14: "Physician Reviewer" - creates it if necessary
925         *
926         * @param rep The repetition index (0-indexed)
927         */
928        public XCN getIn314_PhysicianReviewer(int rep) { 
929            XCN ret = null;
930            try {
931                Type t = this.getField(14, rep);
932                ret = (XCN)t;
933            } catch (ClassCastException cce) {
934                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
935                throw new RuntimeException(cce);
936            } catch (HL7Exception he) {
937                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
938                throw new RuntimeException(he);
939            }
940            return ret;
941        }
942    
943    
944        /**
945         * Returns a count of the current number of repetitions of Physician Reviewer (IN3-14).
946         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
947         * it will return zero.
948         */
949        public int getIn314_PhysicianReviewerReps() {
950            XCN[] ret = null;
951            try {
952                Type[] t = this.getField(14);
953                return t.length;  
954            } catch (ClassCastException cce) {
955                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
956                throw new RuntimeException(cce);
957            } catch (HL7Exception he) {
958                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
959                throw new RuntimeException(he);
960            }
961        }
962    
963    
964    
965        /**
966         * Inserts a repetition of
967         * IN3-14: "Physician Reviewer" at a specific index
968         *
969         * @param rep The repetition index (0-indexed)
970         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
971         */
972        public XCN insertPhysicianReviewer(int rep) throws HL7Exception { 
973            return (XCN) super.insertRepetition(14, rep);
974        }
975    
976    
977    
978        /**
979         * Inserts a repetition of
980         * IN3-14: "Physician Reviewer" at a specific index
981         *
982         * @param rep The repetition index (0-indexed)
983         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
984         */
985        public XCN insertIn314_PhysicianReviewer(int rep) throws HL7Exception { 
986            return (XCN) super.insertRepetition(14, rep);
987        }
988    
989    
990        /**
991         * Removes a repetition of
992         * IN3-14: "Physician Reviewer" at a specific index
993         *
994         * @param rep The repetition index (0-indexed)
995         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
996         */
997        public XCN removePhysicianReviewer(int rep) throws HL7Exception { 
998            return (XCN) super.removeRepetition(14, rep);
999        }
1000    
1001    
1002        /**
1003         * Removes a repetition of
1004         * IN3-14: "Physician Reviewer" at a specific index
1005         *
1006         * @param rep The repetition index (0-indexed)
1007         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1008         */
1009        public XCN removeIn314_PhysicianReviewer(int rep) throws HL7Exception { 
1010            return (XCN) super.removeRepetition(14, rep);
1011        }
1012    
1013    
1014    
1015    
1016        /**
1017         * Returns
1018         * IN3-15: "Certification Contact" - creates it if necessary
1019         */
1020        public ST getCertificationContact() { 
1021            ST ret = null;
1022            try {
1023                Type t = this.getField(15, 0);
1024                ret = (ST)t;
1025            } catch (ClassCastException cce) {
1026                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1027                throw new RuntimeException(cce);
1028            } catch (HL7Exception he) {
1029                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1030                throw new RuntimeException(he);
1031            }
1032            return ret;
1033        }
1034    
1035    
1036        /**
1037         * Returns
1038         * IN3-15: "Certification Contact" - creates it if necessary
1039         */
1040        public ST getIn315_CertificationContact() { 
1041            ST ret = null;
1042            try {
1043                Type t = this.getField(15, 0);
1044                ret = (ST)t;
1045            } catch (ClassCastException cce) {
1046                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1047                throw new RuntimeException(cce);
1048            } catch (HL7Exception he) {
1049                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1050                throw new RuntimeException(he);
1051            }
1052            return ret;
1053        }
1054    
1055    
1056        /**
1057         * Returns all repetitions of Certification Contact Phone Number (IN3-16).
1058         */
1059        public XTN[] getCertificationContactPhoneNumber() {
1060            XTN[] ret = null;
1061            try {
1062                Type[] t = this.getField(16);  
1063                ret = new XTN[t.length];
1064                for (int i = 0; i < ret.length; i++) {
1065                    ret[i] = (XTN)t[i];
1066                }
1067            } catch (ClassCastException cce) {
1068                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1069                throw new RuntimeException(cce);
1070            } catch (HL7Exception he) {
1071                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1072                throw new RuntimeException(he);
1073            }
1074            return ret;
1075        }
1076    
1077    
1078        /**
1079         * Returns a count of the current number of repetitions of Certification Contact Phone Number (IN3-16).
1080         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1081         * it will return zero.
1082         */
1083        public int getCertificationContactPhoneNumberReps() {
1084            XTN[] ret = null;
1085            try {
1086                Type[] t = this.getField(16);
1087                return t.length;  
1088            } catch (ClassCastException cce) {
1089                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1090                throw new RuntimeException(cce);
1091            } catch (HL7Exception he) {
1092                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1093                throw new RuntimeException(he);
1094            }
1095        }
1096    
1097    
1098        /**
1099         * Returns a specific repetition of
1100         * IN3-16: "Certification Contact Phone Number" - creates it if necessary
1101         *
1102         * @param rep The repetition index (0-indexed)
1103         */
1104        public XTN getCertificationContactPhoneNumber(int rep) { 
1105            XTN ret = null;
1106            try {
1107                Type t = this.getField(16, rep);
1108                ret = (XTN)t;
1109            } catch (ClassCastException cce) {
1110                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1111                throw new RuntimeException(cce);
1112            } catch (HL7Exception he) {
1113                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1114                throw new RuntimeException(he);
1115            }
1116            return ret;
1117        }
1118    
1119        /**
1120         * Returns a specific repetition of
1121         * IN3-16: "Certification Contact Phone Number" - creates it if necessary
1122         *
1123         * @param rep The repetition index (0-indexed)
1124         */
1125        public XTN getIn316_CertificationContactPhoneNumber(int rep) { 
1126            XTN ret = null;
1127            try {
1128                Type t = this.getField(16, rep);
1129                ret = (XTN)t;
1130            } catch (ClassCastException cce) {
1131                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1132                throw new RuntimeException(cce);
1133            } catch (HL7Exception he) {
1134                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1135                throw new RuntimeException(he);
1136            }
1137            return ret;
1138        }
1139    
1140    
1141        /**
1142         * Returns a count of the current number of repetitions of Certification Contact Phone Number (IN3-16).
1143         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1144         * it will return zero.
1145         */
1146        public int getIn316_CertificationContactPhoneNumberReps() {
1147            XTN[] ret = null;
1148            try {
1149                Type[] t = this.getField(16);
1150                return t.length;  
1151            } catch (ClassCastException cce) {
1152                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1153                throw new RuntimeException(cce);
1154            } catch (HL7Exception he) {
1155                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1156                throw new RuntimeException(he);
1157            }
1158        }
1159    
1160    
1161    
1162        /**
1163         * Inserts a repetition of
1164         * IN3-16: "Certification Contact Phone Number" at a specific index
1165         *
1166         * @param rep The repetition index (0-indexed)
1167         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1168         */
1169        public XTN insertCertificationContactPhoneNumber(int rep) throws HL7Exception { 
1170            return (XTN) super.insertRepetition(16, rep);
1171        }
1172    
1173    
1174    
1175        /**
1176         * Inserts a repetition of
1177         * IN3-16: "Certification Contact Phone Number" at a specific index
1178         *
1179         * @param rep The repetition index (0-indexed)
1180         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1181         */
1182        public XTN insertIn316_CertificationContactPhoneNumber(int rep) throws HL7Exception { 
1183            return (XTN) super.insertRepetition(16, rep);
1184        }
1185    
1186    
1187        /**
1188         * Removes a repetition of
1189         * IN3-16: "Certification Contact Phone Number" at a specific index
1190         *
1191         * @param rep The repetition index (0-indexed)
1192         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1193         */
1194        public XTN removeCertificationContactPhoneNumber(int rep) throws HL7Exception { 
1195            return (XTN) super.removeRepetition(16, rep);
1196        }
1197    
1198    
1199        /**
1200         * Removes a repetition of
1201         * IN3-16: "Certification Contact Phone Number" at a specific index
1202         *
1203         * @param rep The repetition index (0-indexed)
1204         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1205         */
1206        public XTN removeIn316_CertificationContactPhoneNumber(int rep) throws HL7Exception { 
1207            return (XTN) super.removeRepetition(16, rep);
1208        }
1209    
1210    
1211    
1212    
1213        /**
1214         * Returns
1215         * IN3-17: "Appeal Reason" - creates it if necessary
1216         */
1217        public CE getAppealReason() { 
1218            CE ret = null;
1219            try {
1220                Type t = this.getField(17, 0);
1221                ret = (CE)t;
1222            } catch (ClassCastException cce) {
1223                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1224                throw new RuntimeException(cce);
1225            } catch (HL7Exception he) {
1226                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1227                throw new RuntimeException(he);
1228            }
1229            return ret;
1230        }
1231    
1232    
1233        /**
1234         * Returns
1235         * IN3-17: "Appeal Reason" - creates it if necessary
1236         */
1237        public CE getIn317_AppealReason() { 
1238            CE ret = null;
1239            try {
1240                Type t = this.getField(17, 0);
1241                ret = (CE)t;
1242            } catch (ClassCastException cce) {
1243                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1244                throw new RuntimeException(cce);
1245            } catch (HL7Exception he) {
1246                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1247                throw new RuntimeException(he);
1248            }
1249            return ret;
1250        }
1251    
1252    
1253    
1254        /**
1255         * Returns
1256         * IN3-18: "Certification Agency" - creates it if necessary
1257         */
1258        public CE getCertificationAgency() { 
1259            CE ret = null;
1260            try {
1261                Type t = this.getField(18, 0);
1262                ret = (CE)t;
1263            } catch (ClassCastException cce) {
1264                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1265                throw new RuntimeException(cce);
1266            } catch (HL7Exception he) {
1267                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1268                throw new RuntimeException(he);
1269            }
1270            return ret;
1271        }
1272    
1273    
1274        /**
1275         * Returns
1276         * IN3-18: "Certification Agency" - creates it if necessary
1277         */
1278        public CE getIn318_CertificationAgency() { 
1279            CE ret = null;
1280            try {
1281                Type t = this.getField(18, 0);
1282                ret = (CE)t;
1283            } catch (ClassCastException cce) {
1284                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1285                throw new RuntimeException(cce);
1286            } catch (HL7Exception he) {
1287                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1288                throw new RuntimeException(he);
1289            }
1290            return ret;
1291        }
1292    
1293    
1294        /**
1295         * Returns all repetitions of Certification Agency Phone Number (IN3-19).
1296         */
1297        public XTN[] getCertificationAgencyPhoneNumber() {
1298            XTN[] ret = null;
1299            try {
1300                Type[] t = this.getField(19);  
1301                ret = new XTN[t.length];
1302                for (int i = 0; i < ret.length; i++) {
1303                    ret[i] = (XTN)t[i];
1304                }
1305            } catch (ClassCastException cce) {
1306                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1307                throw new RuntimeException(cce);
1308            } catch (HL7Exception he) {
1309                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1310                throw new RuntimeException(he);
1311            }
1312            return ret;
1313        }
1314    
1315    
1316        /**
1317         * Returns a count of the current number of repetitions of Certification Agency Phone Number (IN3-19).
1318         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1319         * it will return zero.
1320         */
1321        public int getCertificationAgencyPhoneNumberReps() {
1322            XTN[] ret = null;
1323            try {
1324                Type[] t = this.getField(19);
1325                return t.length;  
1326            } catch (ClassCastException cce) {
1327                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1328                throw new RuntimeException(cce);
1329            } catch (HL7Exception he) {
1330                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1331                throw new RuntimeException(he);
1332            }
1333        }
1334    
1335    
1336        /**
1337         * Returns a specific repetition of
1338         * IN3-19: "Certification Agency Phone Number" - creates it if necessary
1339         *
1340         * @param rep The repetition index (0-indexed)
1341         */
1342        public XTN getCertificationAgencyPhoneNumber(int rep) { 
1343            XTN ret = null;
1344            try {
1345                Type t = this.getField(19, rep);
1346                ret = (XTN)t;
1347            } catch (ClassCastException cce) {
1348                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1349                throw new RuntimeException(cce);
1350            } catch (HL7Exception he) {
1351                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1352                throw new RuntimeException(he);
1353            }
1354            return ret;
1355        }
1356    
1357        /**
1358         * Returns a specific repetition of
1359         * IN3-19: "Certification Agency Phone Number" - creates it if necessary
1360         *
1361         * @param rep The repetition index (0-indexed)
1362         */
1363        public XTN getIn319_CertificationAgencyPhoneNumber(int rep) { 
1364            XTN ret = null;
1365            try {
1366                Type t = this.getField(19, rep);
1367                ret = (XTN)t;
1368            } catch (ClassCastException cce) {
1369                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1370                throw new RuntimeException(cce);
1371            } catch (HL7Exception he) {
1372                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1373                throw new RuntimeException(he);
1374            }
1375            return ret;
1376        }
1377    
1378    
1379        /**
1380         * Returns a count of the current number of repetitions of Certification Agency Phone Number (IN3-19).
1381         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1382         * it will return zero.
1383         */
1384        public int getIn319_CertificationAgencyPhoneNumberReps() {
1385            XTN[] ret = null;
1386            try {
1387                Type[] t = this.getField(19);
1388                return t.length;  
1389            } catch (ClassCastException cce) {
1390                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1391                throw new RuntimeException(cce);
1392            } catch (HL7Exception he) {
1393                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1394                throw new RuntimeException(he);
1395            }
1396        }
1397    
1398    
1399    
1400        /**
1401         * Inserts a repetition of
1402         * IN3-19: "Certification Agency Phone Number" at a specific index
1403         *
1404         * @param rep The repetition index (0-indexed)
1405         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1406         */
1407        public XTN insertCertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
1408            return (XTN) super.insertRepetition(19, rep);
1409        }
1410    
1411    
1412    
1413        /**
1414         * Inserts a repetition of
1415         * IN3-19: "Certification Agency Phone Number" at a specific index
1416         *
1417         * @param rep The repetition index (0-indexed)
1418         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1419         */
1420        public XTN insertIn319_CertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
1421            return (XTN) super.insertRepetition(19, rep);
1422        }
1423    
1424    
1425        /**
1426         * Removes a repetition of
1427         * IN3-19: "Certification Agency Phone Number" at a specific index
1428         *
1429         * @param rep The repetition index (0-indexed)
1430         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1431         */
1432        public XTN removeCertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
1433            return (XTN) super.removeRepetition(19, rep);
1434        }
1435    
1436    
1437        /**
1438         * Removes a repetition of
1439         * IN3-19: "Certification Agency Phone Number" at a specific index
1440         *
1441         * @param rep The repetition index (0-indexed)
1442         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1443         */
1444        public XTN removeIn319_CertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
1445            return (XTN) super.removeRepetition(19, rep);
1446        }
1447    
1448    
1449    
1450        /**
1451         * Returns all repetitions of Pre-Certification Req/Window (IN3-20).
1452         */
1453        public PCF[] getPreCertificationReqWindow() {
1454            PCF[] ret = null;
1455            try {
1456                Type[] t = this.getField(20);  
1457                ret = new PCF[t.length];
1458                for (int i = 0; i < ret.length; i++) {
1459                    ret[i] = (PCF)t[i];
1460                }
1461            } catch (ClassCastException cce) {
1462                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1463                throw new RuntimeException(cce);
1464            } catch (HL7Exception he) {
1465                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1466                throw new RuntimeException(he);
1467            }
1468            return ret;
1469        }
1470    
1471    
1472        /**
1473         * Returns a count of the current number of repetitions of Pre-Certification Req/Window (IN3-20).
1474         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1475         * it will return zero.
1476         */
1477        public int getPreCertificationReqWindowReps() {
1478            PCF[] ret = null;
1479            try {
1480                Type[] t = this.getField(20);
1481                return t.length;  
1482            } catch (ClassCastException cce) {
1483                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1484                throw new RuntimeException(cce);
1485            } catch (HL7Exception he) {
1486                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1487                throw new RuntimeException(he);
1488            }
1489        }
1490    
1491    
1492        /**
1493         * Returns a specific repetition of
1494         * IN3-20: "Pre-Certification Req/Window" - creates it if necessary
1495         *
1496         * @param rep The repetition index (0-indexed)
1497         */
1498        public PCF getPreCertificationReqWindow(int rep) { 
1499            PCF ret = null;
1500            try {
1501                Type t = this.getField(20, rep);
1502                ret = (PCF)t;
1503            } catch (ClassCastException cce) {
1504                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1505                throw new RuntimeException(cce);
1506            } catch (HL7Exception he) {
1507                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1508                throw new RuntimeException(he);
1509            }
1510            return ret;
1511        }
1512    
1513        /**
1514         * Returns a specific repetition of
1515         * IN3-20: "Pre-Certification Req/Window" - creates it if necessary
1516         *
1517         * @param rep The repetition index (0-indexed)
1518         */
1519        public PCF getIn320_PreCertificationReqWindow(int rep) { 
1520            PCF ret = null;
1521            try {
1522                Type t = this.getField(20, rep);
1523                ret = (PCF)t;
1524            } catch (ClassCastException cce) {
1525                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1526                throw new RuntimeException(cce);
1527            } catch (HL7Exception he) {
1528                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1529                throw new RuntimeException(he);
1530            }
1531            return ret;
1532        }
1533    
1534    
1535        /**
1536         * Returns a count of the current number of repetitions of Pre-Certification Req/Window (IN3-20).
1537         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1538         * it will return zero.
1539         */
1540        public int getIn320_PreCertificationReqWindowReps() {
1541            PCF[] ret = null;
1542            try {
1543                Type[] t = this.getField(20);
1544                return t.length;  
1545            } catch (ClassCastException cce) {
1546                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1547                throw new RuntimeException(cce);
1548            } catch (HL7Exception he) {
1549                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1550                throw new RuntimeException(he);
1551            }
1552        }
1553    
1554    
1555    
1556        /**
1557         * Inserts a repetition of
1558         * IN3-20: "Pre-Certification Req/Window" at a specific index
1559         *
1560         * @param rep The repetition index (0-indexed)
1561         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1562         */
1563        public PCF insertPreCertificationReqWindow(int rep) throws HL7Exception { 
1564            return (PCF) super.insertRepetition(20, rep);
1565        }
1566    
1567    
1568    
1569        /**
1570         * Inserts a repetition of
1571         * IN3-20: "Pre-Certification Req/Window" at a specific index
1572         *
1573         * @param rep The repetition index (0-indexed)
1574         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1575         */
1576        public PCF insertIn320_PreCertificationReqWindow(int rep) throws HL7Exception { 
1577            return (PCF) super.insertRepetition(20, rep);
1578        }
1579    
1580    
1581        /**
1582         * Removes a repetition of
1583         * IN3-20: "Pre-Certification Req/Window" at a specific index
1584         *
1585         * @param rep The repetition index (0-indexed)
1586         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1587         */
1588        public PCF removePreCertificationReqWindow(int rep) throws HL7Exception { 
1589            return (PCF) super.removeRepetition(20, rep);
1590        }
1591    
1592    
1593        /**
1594         * Removes a repetition of
1595         * IN3-20: "Pre-Certification Req/Window" at a specific index
1596         *
1597         * @param rep The repetition index (0-indexed)
1598         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1599         */
1600        public PCF removeIn320_PreCertificationReqWindow(int rep) throws HL7Exception { 
1601            return (PCF) super.removeRepetition(20, rep);
1602        }
1603    
1604    
1605    
1606    
1607        /**
1608         * Returns
1609         * IN3-21: "Case Manager" - creates it if necessary
1610         */
1611        public ST getCaseManager() { 
1612            ST ret = null;
1613            try {
1614                Type t = this.getField(21, 0);
1615                ret = (ST)t;
1616            } catch (ClassCastException cce) {
1617                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1618                throw new RuntimeException(cce);
1619            } catch (HL7Exception he) {
1620                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1621                throw new RuntimeException(he);
1622            }
1623            return ret;
1624        }
1625    
1626    
1627        /**
1628         * Returns
1629         * IN3-21: "Case Manager" - creates it if necessary
1630         */
1631        public ST getIn321_CaseManager() { 
1632            ST ret = null;
1633            try {
1634                Type t = this.getField(21, 0);
1635                ret = (ST)t;
1636            } catch (ClassCastException cce) {
1637                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1638                throw new RuntimeException(cce);
1639            } catch (HL7Exception he) {
1640                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1641                throw new RuntimeException(he);
1642            }
1643            return ret;
1644        }
1645    
1646    
1647    
1648        /**
1649         * Returns
1650         * IN3-22: "Second Opinion Date" - creates it if necessary
1651         */
1652        public DT getSecondOpinionDate() { 
1653            DT ret = null;
1654            try {
1655                Type t = this.getField(22, 0);
1656                ret = (DT)t;
1657            } catch (ClassCastException cce) {
1658                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1659                throw new RuntimeException(cce);
1660            } catch (HL7Exception he) {
1661                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1662                throw new RuntimeException(he);
1663            }
1664            return ret;
1665        }
1666    
1667    
1668        /**
1669         * Returns
1670         * IN3-22: "Second Opinion Date" - creates it if necessary
1671         */
1672        public DT getIn322_SecondOpinionDate() { 
1673            DT ret = null;
1674            try {
1675                Type t = this.getField(22, 0);
1676                ret = (DT)t;
1677            } catch (ClassCastException cce) {
1678                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1679                throw new RuntimeException(cce);
1680            } catch (HL7Exception he) {
1681                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1682                throw new RuntimeException(he);
1683            }
1684            return ret;
1685        }
1686    
1687    
1688    
1689        /**
1690         * Returns
1691         * IN3-23: "Second Opinion Status" - creates it if necessary
1692         */
1693        public IS getSecondOpinionStatus() { 
1694            IS ret = null;
1695            try {
1696                Type t = this.getField(23, 0);
1697                ret = (IS)t;
1698            } catch (ClassCastException cce) {
1699                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1700                throw new RuntimeException(cce);
1701            } catch (HL7Exception he) {
1702                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1703                throw new RuntimeException(he);
1704            }
1705            return ret;
1706        }
1707    
1708    
1709        /**
1710         * Returns
1711         * IN3-23: "Second Opinion Status" - creates it if necessary
1712         */
1713        public IS getIn323_SecondOpinionStatus() { 
1714            IS ret = null;
1715            try {
1716                Type t = this.getField(23, 0);
1717                ret = (IS)t;
1718            } catch (ClassCastException cce) {
1719                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1720                throw new RuntimeException(cce);
1721            } catch (HL7Exception he) {
1722                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1723                throw new RuntimeException(he);
1724            }
1725            return ret;
1726        }
1727    
1728    
1729        /**
1730         * Returns all repetitions of Second Opinion Documentation Received (IN3-24).
1731         */
1732        public IS[] getSecondOpinionDocumentationReceived() {
1733            IS[] ret = null;
1734            try {
1735                Type[] t = this.getField(24);  
1736                ret = new IS[t.length];
1737                for (int i = 0; i < ret.length; i++) {
1738                    ret[i] = (IS)t[i];
1739                }
1740            } catch (ClassCastException cce) {
1741                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1742                throw new RuntimeException(cce);
1743            } catch (HL7Exception he) {
1744                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1745                throw new RuntimeException(he);
1746            }
1747            return ret;
1748        }
1749    
1750    
1751        /**
1752         * Returns a count of the current number of repetitions of Second Opinion Documentation Received (IN3-24).
1753         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1754         * it will return zero.
1755         */
1756        public int getSecondOpinionDocumentationReceivedReps() {
1757            IS[] ret = null;
1758            try {
1759                Type[] t = this.getField(24);
1760                return t.length;  
1761            } catch (ClassCastException cce) {
1762                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1763                throw new RuntimeException(cce);
1764            } catch (HL7Exception he) {
1765                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1766                throw new RuntimeException(he);
1767            }
1768        }
1769    
1770    
1771        /**
1772         * Returns a specific repetition of
1773         * IN3-24: "Second Opinion Documentation Received" - creates it if necessary
1774         *
1775         * @param rep The repetition index (0-indexed)
1776         */
1777        public IS getSecondOpinionDocumentationReceived(int rep) { 
1778            IS ret = null;
1779            try {
1780                Type t = this.getField(24, rep);
1781                ret = (IS)t;
1782            } catch (ClassCastException cce) {
1783                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1784                throw new RuntimeException(cce);
1785            } catch (HL7Exception he) {
1786                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1787                throw new RuntimeException(he);
1788            }
1789            return ret;
1790        }
1791    
1792        /**
1793         * Returns a specific repetition of
1794         * IN3-24: "Second Opinion Documentation Received" - creates it if necessary
1795         *
1796         * @param rep The repetition index (0-indexed)
1797         */
1798        public IS getIn324_SecondOpinionDocumentationReceived(int rep) { 
1799            IS ret = null;
1800            try {
1801                Type t = this.getField(24, rep);
1802                ret = (IS)t;
1803            } catch (ClassCastException cce) {
1804                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1805                throw new RuntimeException(cce);
1806            } catch (HL7Exception he) {
1807                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1808                throw new RuntimeException(he);
1809            }
1810            return ret;
1811        }
1812    
1813    
1814        /**
1815         * Returns a count of the current number of repetitions of Second Opinion Documentation Received (IN3-24).
1816         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1817         * it will return zero.
1818         */
1819        public int getIn324_SecondOpinionDocumentationReceivedReps() {
1820            IS[] ret = null;
1821            try {
1822                Type[] t = this.getField(24);
1823                return t.length;  
1824            } catch (ClassCastException cce) {
1825                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1826                throw new RuntimeException(cce);
1827            } catch (HL7Exception he) {
1828                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1829                throw new RuntimeException(he);
1830            }
1831        }
1832    
1833    
1834    
1835        /**
1836         * Inserts a repetition of
1837         * IN3-24: "Second Opinion Documentation Received" at a specific index
1838         *
1839         * @param rep The repetition index (0-indexed)
1840         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1841         */
1842        public IS insertSecondOpinionDocumentationReceived(int rep) throws HL7Exception { 
1843            return (IS) super.insertRepetition(24, rep);
1844        }
1845    
1846    
1847    
1848        /**
1849         * Inserts a repetition of
1850         * IN3-24: "Second Opinion Documentation Received" at a specific index
1851         *
1852         * @param rep The repetition index (0-indexed)
1853         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1854         */
1855        public IS insertIn324_SecondOpinionDocumentationReceived(int rep) throws HL7Exception { 
1856            return (IS) super.insertRepetition(24, rep);
1857        }
1858    
1859    
1860        /**
1861         * Removes a repetition of
1862         * IN3-24: "Second Opinion Documentation Received" at a specific index
1863         *
1864         * @param rep The repetition index (0-indexed)
1865         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1866         */
1867        public IS removeSecondOpinionDocumentationReceived(int rep) throws HL7Exception { 
1868            return (IS) super.removeRepetition(24, rep);
1869        }
1870    
1871    
1872        /**
1873         * Removes a repetition of
1874         * IN3-24: "Second Opinion Documentation Received" at a specific index
1875         *
1876         * @param rep The repetition index (0-indexed)
1877         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1878         */
1879        public IS removeIn324_SecondOpinionDocumentationReceived(int rep) throws HL7Exception { 
1880            return (IS) super.removeRepetition(24, rep);
1881        }
1882    
1883    
1884    
1885        /**
1886         * Returns all repetitions of Second Opinion Physician (IN3-25).
1887         */
1888        public XCN[] getSecondOpinionPhysician() {
1889            XCN[] ret = null;
1890            try {
1891                Type[] t = this.getField(25);  
1892                ret = new XCN[t.length];
1893                for (int i = 0; i < ret.length; i++) {
1894                    ret[i] = (XCN)t[i];
1895                }
1896            } catch (ClassCastException cce) {
1897                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1898                throw new RuntimeException(cce);
1899            } catch (HL7Exception he) {
1900                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1901                throw new RuntimeException(he);
1902            }
1903            return ret;
1904        }
1905    
1906    
1907        /**
1908         * Returns a count of the current number of repetitions of Second Opinion Physician (IN3-25).
1909         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1910         * it will return zero.
1911         */
1912        public int getSecondOpinionPhysicianReps() {
1913            XCN[] ret = null;
1914            try {
1915                Type[] t = this.getField(25);
1916                return t.length;  
1917            } catch (ClassCastException cce) {
1918                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1919                throw new RuntimeException(cce);
1920            } catch (HL7Exception he) {
1921                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1922                throw new RuntimeException(he);
1923            }
1924        }
1925    
1926    
1927        /**
1928         * Returns a specific repetition of
1929         * IN3-25: "Second Opinion Physician" - creates it if necessary
1930         *
1931         * @param rep The repetition index (0-indexed)
1932         */
1933        public XCN getSecondOpinionPhysician(int rep) { 
1934            XCN ret = null;
1935            try {
1936                Type t = this.getField(25, rep);
1937                ret = (XCN)t;
1938            } catch (ClassCastException cce) {
1939                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1940                throw new RuntimeException(cce);
1941            } catch (HL7Exception he) {
1942                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1943                throw new RuntimeException(he);
1944            }
1945            return ret;
1946        }
1947    
1948        /**
1949         * Returns a specific repetition of
1950         * IN3-25: "Second Opinion Physician" - creates it if necessary
1951         *
1952         * @param rep The repetition index (0-indexed)
1953         */
1954        public XCN getIn325_SecondOpinionPhysician(int rep) { 
1955            XCN ret = null;
1956            try {
1957                Type t = this.getField(25, rep);
1958                ret = (XCN)t;
1959            } catch (ClassCastException cce) {
1960                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1961                throw new RuntimeException(cce);
1962            } catch (HL7Exception he) {
1963                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1964                throw new RuntimeException(he);
1965            }
1966            return ret;
1967        }
1968    
1969    
1970        /**
1971         * Returns a count of the current number of repetitions of Second Opinion Physician (IN3-25).
1972         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1973         * it will return zero.
1974         */
1975        public int getIn325_SecondOpinionPhysicianReps() {
1976            XCN[] ret = null;
1977            try {
1978                Type[] t = this.getField(25);
1979                return t.length;  
1980            } catch (ClassCastException cce) {
1981                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1982                throw new RuntimeException(cce);
1983            } catch (HL7Exception he) {
1984                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1985                throw new RuntimeException(he);
1986            }
1987        }
1988    
1989    
1990    
1991        /**
1992         * Inserts a repetition of
1993         * IN3-25: "Second Opinion Physician" at a specific index
1994         *
1995         * @param rep The repetition index (0-indexed)
1996         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1997         */
1998        public XCN insertSecondOpinionPhysician(int rep) throws HL7Exception { 
1999            return (XCN) super.insertRepetition(25, rep);
2000        }
2001    
2002    
2003    
2004        /**
2005         * Inserts a repetition of
2006         * IN3-25: "Second Opinion Physician" at a specific index
2007         *
2008         * @param rep The repetition index (0-indexed)
2009         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2010         */
2011        public XCN insertIn325_SecondOpinionPhysician(int rep) throws HL7Exception { 
2012            return (XCN) super.insertRepetition(25, rep);
2013        }
2014    
2015    
2016        /**
2017         * Removes a repetition of
2018         * IN3-25: "Second Opinion Physician" at a specific index
2019         *
2020         * @param rep The repetition index (0-indexed)
2021         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2022         */
2023        public XCN removeSecondOpinionPhysician(int rep) throws HL7Exception { 
2024            return (XCN) super.removeRepetition(25, rep);
2025        }
2026    
2027    
2028        /**
2029         * Removes a repetition of
2030         * IN3-25: "Second Opinion Physician" at a specific index
2031         *
2032         * @param rep The repetition index (0-indexed)
2033         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2034         */
2035        public XCN removeIn325_SecondOpinionPhysician(int rep) throws HL7Exception { 
2036            return (XCN) super.removeRepetition(25, rep);
2037        }
2038    
2039    
2040    
2041    
2042    
2043    
2044        /** {@inheritDoc} */   
2045        protected Type createNewTypeWithoutReflection(int field) {
2046           switch (field) {
2047              case 0: return new SI(getMessage());
2048              case 1: return new CX(getMessage());
2049              case 2: return new XCN(getMessage());
2050              case 3: return new ID(getMessage(), new Integer( 136 ));
2051              case 4: return new MOP(getMessage());
2052              case 5: return new TS(getMessage());
2053              case 6: return new TS(getMessage());
2054              case 7: return new XCN(getMessage());
2055              case 8: return new DT(getMessage());
2056              case 9: return new DT(getMessage());
2057              case 10: return new DTN(getMessage());
2058              case 11: return new CE(getMessage());
2059              case 12: return new TS(getMessage());
2060              case 13: return new XCN(getMessage());
2061              case 14: return new ST(getMessage());
2062              case 15: return new XTN(getMessage());
2063              case 16: return new CE(getMessage());
2064              case 17: return new CE(getMessage());
2065              case 18: return new XTN(getMessage());
2066              case 19: return new PCF(getMessage());
2067              case 20: return new ST(getMessage());
2068              case 21: return new DT(getMessage());
2069              case 22: return new IS(getMessage(), new Integer( 151 ));
2070              case 23: return new IS(getMessage(), new Integer( 152 ));
2071              case 24: return new XCN(getMessage());
2072              default: return null;
2073           }
2074       }
2075    
2076    
2077    }
2078