001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v28.segment;
035
036// import ca.uhn.hl7v2.model.v28.group.*;
037import ca.uhn.hl7v2.model.v28.datatype.*;
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
041import ca.uhn.hl7v2.model.AbstractMessage;
042import ca.uhn.hl7v2.model.Group;
043import ca.uhn.hl7v2.model.Type;
044import ca.uhn.hl7v2.model.AbstractSegment;
045import ca.uhn.hl7v2.model.Varies;
046
047
048/**
049 *<p>Represents an HL7 IN3 message segment (Insurance Additional Information, Certification). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>IN3-1: Set ID - IN3 (SI) <b> </b>
053     * <li>IN3-2: Certification Number (CX) <b>optional </b>
054     * <li>IN3-3: Certified By (XCN) <b>optional repeating</b>
055     * <li>IN3-4: Certification Required (ID) <b>optional </b>
056     * <li>IN3-5: Penalty (MOP) <b>optional </b>
057     * <li>IN3-6: Certification Date/Time (DTM) <b>optional </b>
058     * <li>IN3-7: Certification Modify Date/Time (DTM) <b>optional </b>
059     * <li>IN3-8: Operator (XCN) <b>optional repeating</b>
060     * <li>IN3-9: Certification Begin Date (DT) <b>optional </b>
061     * <li>IN3-10: Certification End Date (DT) <b>optional </b>
062     * <li>IN3-11: Days (DTN) <b>optional </b>
063     * <li>IN3-12: Non-Concur Code/Description (CWE) <b>optional </b>
064     * <li>IN3-13: Non-Concur Effective Date/Time (DTM) <b>optional </b>
065     * <li>IN3-14: Physician Reviewer (XCN) <b>optional repeating</b>
066     * <li>IN3-15: Certification Contact (ST) <b>optional </b>
067     * <li>IN3-16: Certification Contact Phone Number (XTN) <b>optional repeating</b>
068     * <li>IN3-17: Appeal Reason (CWE) <b>optional </b>
069     * <li>IN3-18: Certification Agency (CWE) <b>optional </b>
070     * <li>IN3-19: Certification Agency Phone Number (XTN) <b>optional repeating</b>
071     * <li>IN3-20: Pre-Certification Requirement (ICD) <b>optional repeating</b>
072     * <li>IN3-21: Case Manager (ST) <b>optional </b>
073     * <li>IN3-22: Second Opinion Date (DT) <b>optional </b>
074     * <li>IN3-23: Second Opinion Status (CWE) <b>optional </b>
075     * <li>IN3-24: Second Opinion Documentation Received (CWE) <b>optional repeating</b>
076     * <li>IN3-25: Second Opinion Physician (XCN) <b>optional repeating</b>
077     * <li>IN3-26: Certification Type (CWE) <b>optional </b>
078     * <li>IN3-27: Certification Category (CWE) <b>optional </b>
079 * </ul>
080 */
081@SuppressWarnings("unused")
082public class IN3 extends AbstractSegment {
083
084    /** 
085     * Creates a new IN3 segment
086     */
087    public IN3(Group parent, ModelClassFactory factory) {
088       super(parent, factory);
089       init(factory);
090    }
091
092    private void init(ModelClassFactory factory) {
093       try {
094                                  this.add(SI.class, true, 1, 4, new Object[]{ getMessage() }, "Set ID - IN3");
095                                  this.add(CX.class, false, 1, 0, new Object[]{ getMessage() }, "Certification Number");
096                                  this.add(XCN.class, false, 0, 0, new Object[]{ getMessage() }, "Certified By");
097                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Certification Required");
098                                  this.add(MOP.class, false, 1, 0, new Object[]{ getMessage() }, "Penalty");
099                                  this.add(DTM.class, false, 1, 0, new Object[]{ getMessage() }, "Certification Date/Time");
100                                  this.add(DTM.class, false, 1, 0, new Object[]{ getMessage() }, "Certification Modify Date/Time");
101                                  this.add(XCN.class, false, 0, 0, new Object[]{ getMessage() }, "Operator");
102                                  this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Certification Begin Date");
103                                  this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Certification End Date");
104                                  this.add(DTN.class, false, 1, 0, new Object[]{ getMessage() }, "Days");
105                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Non-Concur Code/Description");
106                                  this.add(DTM.class, false, 1, 0, new Object[]{ getMessage() }, "Non-Concur Effective Date/Time");
107                                  this.add(XCN.class, false, 0, 0, new Object[]{ getMessage() }, "Physician Reviewer");
108                                  this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Certification Contact");
109                                  this.add(XTN.class, false, 0, 0, new Object[]{ getMessage() }, "Certification Contact Phone Number");
110                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Appeal Reason");
111                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Certification Agency");
112                                  this.add(XTN.class, false, 0, 0, new Object[]{ getMessage() }, "Certification Agency Phone Number");
113                                  this.add(ICD.class, false, 0, 0, new Object[]{ getMessage() }, "Pre-Certification Requirement");
114                                  this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Case Manager");
115                                  this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Second Opinion Date");
116                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Second Opinion Status");
117                                  this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Second Opinion Documentation Received");
118                                  this.add(XCN.class, false, 0, 0, new Object[]{ getMessage() }, "Second Opinion Physician");
119                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Certification Type");
120                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Certification Category");
121       } catch(HL7Exception e) {
122          log.error("Unexpected error creating IN3 - this is probably a bug in the source code generator.", e);
123       }
124    }
125
126
127
128    /**
129     * Returns
130     * IN3-1: "Set ID - IN3" - creates it if necessary
131     */
132    public SI getSetIDIN3() { 
133                SI retVal = this.getTypedField(1, 0);
134                return retVal;
135    }
136    
137    /**
138     * Returns
139     * IN3-1: "Set ID - IN3" - creates it if necessary
140     */
141    public SI getIn31_SetIDIN3() { 
142                SI retVal = this.getTypedField(1, 0);
143                return retVal;
144    }
145
146
147
148    /**
149     * Returns
150     * IN3-2: "Certification Number" - creates it if necessary
151     */
152    public CX getCertificationNumber() { 
153                CX retVal = this.getTypedField(2, 0);
154                return retVal;
155    }
156    
157    /**
158     * Returns
159     * IN3-2: "Certification Number" - creates it if necessary
160     */
161    public CX getIn32_CertificationNumber() { 
162                CX retVal = this.getTypedField(2, 0);
163                return retVal;
164    }
165
166
167    /**
168     * Returns all repetitions of Certified By (IN3-3).
169     */
170    public XCN[] getCertifiedBy() {
171        XCN[] retVal = this.getTypedField(3, new XCN[0]);
172        return retVal;
173    }
174
175
176    /**
177     * Returns all repetitions of Certified By (IN3-3).
178     */
179    public XCN[] getIn33_CertifiedBy() {
180        XCN[] retVal = this.getTypedField(3, new XCN[0]);
181        return retVal;
182    }
183
184
185    /**
186     * Returns a count of the current number of repetitions of Certified By (IN3-3).
187     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
188     * it will return zero.
189     */
190    public int getCertifiedByReps() {
191        return this.getReps(3);
192    }
193
194
195    /**
196     * Returns a specific repetition of
197     * IN3-3: "Certified By" - creates it if necessary
198     *
199     * @param rep The repetition index (0-indexed)
200     */
201    public XCN getCertifiedBy(int rep) { 
202                XCN retVal = this.getTypedField(3, rep);
203                return retVal;
204    }
205
206    /**
207     * Returns a specific repetition of
208     * IN3-3: "Certified By" - creates it if necessary
209     *
210     * @param rep The repetition index (0-indexed)
211     */
212    public XCN getIn33_CertifiedBy(int rep) { 
213                XCN retVal = this.getTypedField(3, rep);
214                return retVal;
215    }
216
217    /**
218     * Returns a count of the current number of repetitions of Certified By (IN3-3).
219     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
220     * it will return zero.
221     */
222    public int getIn33_CertifiedByReps() {
223        return this.getReps(3);
224    }
225
226
227    /**
228     * Inserts a repetition of
229     * IN3-3: "Certified By" at a specific index
230     *
231     * @param rep The repetition index (0-indexed)
232     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
233     */
234    public XCN insertCertifiedBy(int rep) throws HL7Exception { 
235        return (XCN) super.insertRepetition(3, rep);
236    }
237
238
239    /**
240     * Inserts a repetition of
241     * IN3-3: "Certified By" at a specific index
242     *
243     * @param rep The repetition index (0-indexed)
244     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
245     */
246    public XCN insertIn33_CertifiedBy(int rep) throws HL7Exception { 
247        return (XCN) super.insertRepetition(3, rep);
248    }
249
250
251    /**
252     * Removes a repetition of
253     * IN3-3: "Certified By" at a specific index
254     *
255     * @param rep The repetition index (0-indexed)
256     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
257     */
258    public XCN removeCertifiedBy(int rep) throws HL7Exception { 
259        return (XCN) super.removeRepetition(3, rep);
260    }
261
262
263    /**
264     * Removes a repetition of
265     * IN3-3: "Certified By" at a specific index
266     *
267     * @param rep The repetition index (0-indexed)
268     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
269     */
270    public XCN removeIn33_CertifiedBy(int rep) throws HL7Exception { 
271        return (XCN) super.removeRepetition(3, rep);
272    }
273
274
275
276
277    /**
278     * Returns
279     * IN3-4: "Certification Required" - creates it if necessary
280     */
281    public ID getCertificationRequired() { 
282                ID retVal = this.getTypedField(4, 0);
283                return retVal;
284    }
285    
286    /**
287     * Returns
288     * IN3-4: "Certification Required" - creates it if necessary
289     */
290    public ID getIn34_CertificationRequired() { 
291                ID retVal = this.getTypedField(4, 0);
292                return retVal;
293    }
294
295
296
297    /**
298     * Returns
299     * IN3-5: "Penalty" - creates it if necessary
300     */
301    public MOP getPenalty() { 
302                MOP retVal = this.getTypedField(5, 0);
303                return retVal;
304    }
305    
306    /**
307     * Returns
308     * IN3-5: "Penalty" - creates it if necessary
309     */
310    public MOP getIn35_Penalty() { 
311                MOP retVal = this.getTypedField(5, 0);
312                return retVal;
313    }
314
315
316
317    /**
318     * Returns
319     * IN3-6: "Certification Date/Time" - creates it if necessary
320     */
321    public DTM getCertificationDateTime() { 
322                DTM retVal = this.getTypedField(6, 0);
323                return retVal;
324    }
325    
326    /**
327     * Returns
328     * IN3-6: "Certification Date/Time" - creates it if necessary
329     */
330    public DTM getIn36_CertificationDateTime() { 
331                DTM retVal = this.getTypedField(6, 0);
332                return retVal;
333    }
334
335
336
337    /**
338     * Returns
339     * IN3-7: "Certification Modify Date/Time" - creates it if necessary
340     */
341    public DTM getCertificationModifyDateTime() { 
342                DTM retVal = this.getTypedField(7, 0);
343                return retVal;
344    }
345    
346    /**
347     * Returns
348     * IN3-7: "Certification Modify Date/Time" - creates it if necessary
349     */
350    public DTM getIn37_CertificationModifyDateTime() { 
351                DTM retVal = this.getTypedField(7, 0);
352                return retVal;
353    }
354
355
356    /**
357     * Returns all repetitions of Operator (IN3-8).
358     */
359    public XCN[] getOperator() {
360        XCN[] retVal = this.getTypedField(8, new XCN[0]);
361        return retVal;
362    }
363
364
365    /**
366     * Returns all repetitions of Operator (IN3-8).
367     */
368    public XCN[] getIn38_Operator() {
369        XCN[] retVal = this.getTypedField(8, new XCN[0]);
370        return retVal;
371    }
372
373
374    /**
375     * Returns a count of the current number of repetitions of Operator (IN3-8).
376     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
377     * it will return zero.
378     */
379    public int getOperatorReps() {
380        return this.getReps(8);
381    }
382
383
384    /**
385     * Returns a specific repetition of
386     * IN3-8: "Operator" - creates it if necessary
387     *
388     * @param rep The repetition index (0-indexed)
389     */
390    public XCN getOperator(int rep) { 
391                XCN retVal = this.getTypedField(8, rep);
392                return retVal;
393    }
394
395    /**
396     * Returns a specific repetition of
397     * IN3-8: "Operator" - creates it if necessary
398     *
399     * @param rep The repetition index (0-indexed)
400     */
401    public XCN getIn38_Operator(int rep) { 
402                XCN retVal = this.getTypedField(8, rep);
403                return retVal;
404    }
405
406    /**
407     * Returns a count of the current number of repetitions of Operator (IN3-8).
408     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
409     * it will return zero.
410     */
411    public int getIn38_OperatorReps() {
412        return this.getReps(8);
413    }
414
415
416    /**
417     * Inserts a repetition of
418     * IN3-8: "Operator" at a specific index
419     *
420     * @param rep The repetition index (0-indexed)
421     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
422     */
423    public XCN insertOperator(int rep) throws HL7Exception { 
424        return (XCN) super.insertRepetition(8, rep);
425    }
426
427
428    /**
429     * Inserts a repetition of
430     * IN3-8: "Operator" at a specific index
431     *
432     * @param rep The repetition index (0-indexed)
433     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
434     */
435    public XCN insertIn38_Operator(int rep) throws HL7Exception { 
436        return (XCN) super.insertRepetition(8, rep);
437    }
438
439
440    /**
441     * Removes a repetition of
442     * IN3-8: "Operator" at a specific index
443     *
444     * @param rep The repetition index (0-indexed)
445     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
446     */
447    public XCN removeOperator(int rep) throws HL7Exception { 
448        return (XCN) super.removeRepetition(8, rep);
449    }
450
451
452    /**
453     * Removes a repetition of
454     * IN3-8: "Operator" at a specific index
455     *
456     * @param rep The repetition index (0-indexed)
457     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
458     */
459    public XCN removeIn38_Operator(int rep) throws HL7Exception { 
460        return (XCN) super.removeRepetition(8, rep);
461    }
462
463
464
465
466    /**
467     * Returns
468     * IN3-9: "Certification Begin Date" - creates it if necessary
469     */
470    public DT getCertificationBeginDate() { 
471                DT retVal = this.getTypedField(9, 0);
472                return retVal;
473    }
474    
475    /**
476     * Returns
477     * IN3-9: "Certification Begin Date" - creates it if necessary
478     */
479    public DT getIn39_CertificationBeginDate() { 
480                DT retVal = this.getTypedField(9, 0);
481                return retVal;
482    }
483
484
485
486    /**
487     * Returns
488     * IN3-10: "Certification End Date" - creates it if necessary
489     */
490    public DT getCertificationEndDate() { 
491                DT retVal = this.getTypedField(10, 0);
492                return retVal;
493    }
494    
495    /**
496     * Returns
497     * IN3-10: "Certification End Date" - creates it if necessary
498     */
499    public DT getIn310_CertificationEndDate() { 
500                DT retVal = this.getTypedField(10, 0);
501                return retVal;
502    }
503
504
505
506    /**
507     * Returns
508     * IN3-11: "Days" - creates it if necessary
509     */
510    public DTN getDays() { 
511                DTN retVal = this.getTypedField(11, 0);
512                return retVal;
513    }
514    
515    /**
516     * Returns
517     * IN3-11: "Days" - creates it if necessary
518     */
519    public DTN getIn311_Days() { 
520                DTN retVal = this.getTypedField(11, 0);
521                return retVal;
522    }
523
524
525
526    /**
527     * Returns
528     * IN3-12: "Non-Concur Code/Description" - creates it if necessary
529     */
530    public CWE getNonConcurCodeDescription() { 
531                CWE retVal = this.getTypedField(12, 0);
532                return retVal;
533    }
534    
535    /**
536     * Returns
537     * IN3-12: "Non-Concur Code/Description" - creates it if necessary
538     */
539    public CWE getIn312_NonConcurCodeDescription() { 
540                CWE retVal = this.getTypedField(12, 0);
541                return retVal;
542    }
543
544
545
546    /**
547     * Returns
548     * IN3-13: "Non-Concur Effective Date/Time" - creates it if necessary
549     */
550    public DTM getNonConcurEffectiveDateTime() { 
551                DTM retVal = this.getTypedField(13, 0);
552                return retVal;
553    }
554    
555    /**
556     * Returns
557     * IN3-13: "Non-Concur Effective Date/Time" - creates it if necessary
558     */
559    public DTM getIn313_NonConcurEffectiveDateTime() { 
560                DTM retVal = this.getTypedField(13, 0);
561                return retVal;
562    }
563
564
565    /**
566     * Returns all repetitions of Physician Reviewer (IN3-14).
567     */
568    public XCN[] getPhysicianReviewer() {
569        XCN[] retVal = this.getTypedField(14, new XCN[0]);
570        return retVal;
571    }
572
573
574    /**
575     * Returns all repetitions of Physician Reviewer (IN3-14).
576     */
577    public XCN[] getIn314_PhysicianReviewer() {
578        XCN[] retVal = this.getTypedField(14, new XCN[0]);
579        return retVal;
580    }
581
582
583    /**
584     * Returns a count of the current number of repetitions of Physician Reviewer (IN3-14).
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 getPhysicianReviewerReps() {
589        return this.getReps(14);
590    }
591
592
593    /**
594     * Returns a specific repetition of
595     * IN3-14: "Physician Reviewer" - creates it if necessary
596     *
597     * @param rep The repetition index (0-indexed)
598     */
599    public XCN getPhysicianReviewer(int rep) { 
600                XCN retVal = this.getTypedField(14, rep);
601                return retVal;
602    }
603
604    /**
605     * Returns a specific repetition of
606     * IN3-14: "Physician Reviewer" - creates it if necessary
607     *
608     * @param rep The repetition index (0-indexed)
609     */
610    public XCN getIn314_PhysicianReviewer(int rep) { 
611                XCN retVal = this.getTypedField(14, rep);
612                return retVal;
613    }
614
615    /**
616     * Returns a count of the current number of repetitions of Physician Reviewer (IN3-14).
617     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
618     * it will return zero.
619     */
620    public int getIn314_PhysicianReviewerReps() {
621        return this.getReps(14);
622    }
623
624
625    /**
626     * Inserts a repetition of
627     * IN3-14: "Physician Reviewer" at a specific index
628     *
629     * @param rep The repetition index (0-indexed)
630     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
631     */
632    public XCN insertPhysicianReviewer(int rep) throws HL7Exception { 
633        return (XCN) super.insertRepetition(14, rep);
634    }
635
636
637    /**
638     * Inserts a repetition of
639     * IN3-14: "Physician Reviewer" at a specific index
640     *
641     * @param rep The repetition index (0-indexed)
642     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
643     */
644    public XCN insertIn314_PhysicianReviewer(int rep) throws HL7Exception { 
645        return (XCN) super.insertRepetition(14, rep);
646    }
647
648
649    /**
650     * Removes a repetition of
651     * IN3-14: "Physician Reviewer" at a specific index
652     *
653     * @param rep The repetition index (0-indexed)
654     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
655     */
656    public XCN removePhysicianReviewer(int rep) throws HL7Exception { 
657        return (XCN) super.removeRepetition(14, rep);
658    }
659
660
661    /**
662     * Removes a repetition of
663     * IN3-14: "Physician Reviewer" at a specific index
664     *
665     * @param rep The repetition index (0-indexed)
666     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
667     */
668    public XCN removeIn314_PhysicianReviewer(int rep) throws HL7Exception { 
669        return (XCN) super.removeRepetition(14, rep);
670    }
671
672
673
674
675    /**
676     * Returns
677     * IN3-15: "Certification Contact" - creates it if necessary
678     */
679    public ST getCertificationContact() { 
680                ST retVal = this.getTypedField(15, 0);
681                return retVal;
682    }
683    
684    /**
685     * Returns
686     * IN3-15: "Certification Contact" - creates it if necessary
687     */
688    public ST getIn315_CertificationContact() { 
689                ST retVal = this.getTypedField(15, 0);
690                return retVal;
691    }
692
693
694    /**
695     * Returns all repetitions of Certification Contact Phone Number (IN3-16).
696     */
697    public XTN[] getCertificationContactPhoneNumber() {
698        XTN[] retVal = this.getTypedField(16, new XTN[0]);
699        return retVal;
700    }
701
702
703    /**
704     * Returns all repetitions of Certification Contact Phone Number (IN3-16).
705     */
706    public XTN[] getIn316_CertificationContactPhoneNumber() {
707        XTN[] retVal = this.getTypedField(16, new XTN[0]);
708        return retVal;
709    }
710
711
712    /**
713     * Returns a count of the current number of repetitions of Certification Contact Phone Number (IN3-16).
714     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
715     * it will return zero.
716     */
717    public int getCertificationContactPhoneNumberReps() {
718        return this.getReps(16);
719    }
720
721
722    /**
723     * Returns a specific repetition of
724     * IN3-16: "Certification Contact Phone Number" - creates it if necessary
725     *
726     * @param rep The repetition index (0-indexed)
727     */
728    public XTN getCertificationContactPhoneNumber(int rep) { 
729                XTN retVal = this.getTypedField(16, rep);
730                return retVal;
731    }
732
733    /**
734     * Returns a specific repetition of
735     * IN3-16: "Certification Contact Phone Number" - creates it if necessary
736     *
737     * @param rep The repetition index (0-indexed)
738     */
739    public XTN getIn316_CertificationContactPhoneNumber(int rep) { 
740                XTN retVal = this.getTypedField(16, rep);
741                return retVal;
742    }
743
744    /**
745     * Returns a count of the current number of repetitions of Certification Contact Phone Number (IN3-16).
746     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
747     * it will return zero.
748     */
749    public int getIn316_CertificationContactPhoneNumberReps() {
750        return this.getReps(16);
751    }
752
753
754    /**
755     * Inserts a repetition of
756     * IN3-16: "Certification Contact Phone Number" at a specific index
757     *
758     * @param rep The repetition index (0-indexed)
759     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
760     */
761    public XTN insertCertificationContactPhoneNumber(int rep) throws HL7Exception { 
762        return (XTN) super.insertRepetition(16, rep);
763    }
764
765
766    /**
767     * Inserts a repetition of
768     * IN3-16: "Certification Contact Phone Number" at a specific index
769     *
770     * @param rep The repetition index (0-indexed)
771     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
772     */
773    public XTN insertIn316_CertificationContactPhoneNumber(int rep) throws HL7Exception { 
774        return (XTN) super.insertRepetition(16, rep);
775    }
776
777
778    /**
779     * Removes a repetition of
780     * IN3-16: "Certification Contact Phone Number" at a specific index
781     *
782     * @param rep The repetition index (0-indexed)
783     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
784     */
785    public XTN removeCertificationContactPhoneNumber(int rep) throws HL7Exception { 
786        return (XTN) super.removeRepetition(16, rep);
787    }
788
789
790    /**
791     * Removes a repetition of
792     * IN3-16: "Certification Contact Phone Number" at a specific index
793     *
794     * @param rep The repetition index (0-indexed)
795     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
796     */
797    public XTN removeIn316_CertificationContactPhoneNumber(int rep) throws HL7Exception { 
798        return (XTN) super.removeRepetition(16, rep);
799    }
800
801
802
803
804    /**
805     * Returns
806     * IN3-17: "Appeal Reason" - creates it if necessary
807     */
808    public CWE getAppealReason() { 
809                CWE retVal = this.getTypedField(17, 0);
810                return retVal;
811    }
812    
813    /**
814     * Returns
815     * IN3-17: "Appeal Reason" - creates it if necessary
816     */
817    public CWE getIn317_AppealReason() { 
818                CWE retVal = this.getTypedField(17, 0);
819                return retVal;
820    }
821
822
823
824    /**
825     * Returns
826     * IN3-18: "Certification Agency" - creates it if necessary
827     */
828    public CWE getCertificationAgency() { 
829                CWE retVal = this.getTypedField(18, 0);
830                return retVal;
831    }
832    
833    /**
834     * Returns
835     * IN3-18: "Certification Agency" - creates it if necessary
836     */
837    public CWE getIn318_CertificationAgency() { 
838                CWE retVal = this.getTypedField(18, 0);
839                return retVal;
840    }
841
842
843    /**
844     * Returns all repetitions of Certification Agency Phone Number (IN3-19).
845     */
846    public XTN[] getCertificationAgencyPhoneNumber() {
847        XTN[] retVal = this.getTypedField(19, new XTN[0]);
848        return retVal;
849    }
850
851
852    /**
853     * Returns all repetitions of Certification Agency Phone Number (IN3-19).
854     */
855    public XTN[] getIn319_CertificationAgencyPhoneNumber() {
856        XTN[] retVal = this.getTypedField(19, new XTN[0]);
857        return retVal;
858    }
859
860
861    /**
862     * Returns a count of the current number of repetitions of Certification Agency Phone Number (IN3-19).
863     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
864     * it will return zero.
865     */
866    public int getCertificationAgencyPhoneNumberReps() {
867        return this.getReps(19);
868    }
869
870
871    /**
872     * Returns a specific repetition of
873     * IN3-19: "Certification Agency Phone Number" - creates it if necessary
874     *
875     * @param rep The repetition index (0-indexed)
876     */
877    public XTN getCertificationAgencyPhoneNumber(int rep) { 
878                XTN retVal = this.getTypedField(19, rep);
879                return retVal;
880    }
881
882    /**
883     * Returns a specific repetition of
884     * IN3-19: "Certification Agency Phone Number" - creates it if necessary
885     *
886     * @param rep The repetition index (0-indexed)
887     */
888    public XTN getIn319_CertificationAgencyPhoneNumber(int rep) { 
889                XTN retVal = this.getTypedField(19, rep);
890                return retVal;
891    }
892
893    /**
894     * Returns a count of the current number of repetitions of Certification Agency Phone Number (IN3-19).
895     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
896     * it will return zero.
897     */
898    public int getIn319_CertificationAgencyPhoneNumberReps() {
899        return this.getReps(19);
900    }
901
902
903    /**
904     * Inserts a repetition of
905     * IN3-19: "Certification Agency Phone Number" at a specific index
906     *
907     * @param rep The repetition index (0-indexed)
908     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
909     */
910    public XTN insertCertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
911        return (XTN) super.insertRepetition(19, rep);
912    }
913
914
915    /**
916     * Inserts a repetition of
917     * IN3-19: "Certification Agency Phone Number" at a specific index
918     *
919     * @param rep The repetition index (0-indexed)
920     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
921     */
922    public XTN insertIn319_CertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
923        return (XTN) super.insertRepetition(19, rep);
924    }
925
926
927    /**
928     * Removes a repetition of
929     * IN3-19: "Certification Agency Phone Number" at a specific index
930     *
931     * @param rep The repetition index (0-indexed)
932     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
933     */
934    public XTN removeCertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
935        return (XTN) super.removeRepetition(19, rep);
936    }
937
938
939    /**
940     * Removes a repetition of
941     * IN3-19: "Certification Agency Phone Number" at a specific index
942     *
943     * @param rep The repetition index (0-indexed)
944     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
945     */
946    public XTN removeIn319_CertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
947        return (XTN) super.removeRepetition(19, rep);
948    }
949
950
951
952    /**
953     * Returns all repetitions of Pre-Certification Requirement (IN3-20).
954     */
955    public ICD[] getPreCertificationRequirement() {
956        ICD[] retVal = this.getTypedField(20, new ICD[0]);
957        return retVal;
958    }
959
960
961    /**
962     * Returns all repetitions of Pre-Certification Requirement (IN3-20).
963     */
964    public ICD[] getIn320_PreCertificationRequirement() {
965        ICD[] retVal = this.getTypedField(20, new ICD[0]);
966        return retVal;
967    }
968
969
970    /**
971     * Returns a count of the current number of repetitions of Pre-Certification Requirement (IN3-20).
972     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
973     * it will return zero.
974     */
975    public int getPreCertificationRequirementReps() {
976        return this.getReps(20);
977    }
978
979
980    /**
981     * Returns a specific repetition of
982     * IN3-20: "Pre-Certification Requirement" - creates it if necessary
983     *
984     * @param rep The repetition index (0-indexed)
985     */
986    public ICD getPreCertificationRequirement(int rep) { 
987                ICD retVal = this.getTypedField(20, rep);
988                return retVal;
989    }
990
991    /**
992     * Returns a specific repetition of
993     * IN3-20: "Pre-Certification Requirement" - creates it if necessary
994     *
995     * @param rep The repetition index (0-indexed)
996     */
997    public ICD getIn320_PreCertificationRequirement(int rep) { 
998                ICD retVal = this.getTypedField(20, rep);
999                return retVal;
1000    }
1001
1002    /**
1003     * Returns a count of the current number of repetitions of Pre-Certification Requirement (IN3-20).
1004     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1005     * it will return zero.
1006     */
1007    public int getIn320_PreCertificationRequirementReps() {
1008        return this.getReps(20);
1009    }
1010
1011
1012    /**
1013     * Inserts a repetition of
1014     * IN3-20: "Pre-Certification Requirement" at a specific index
1015     *
1016     * @param rep The repetition index (0-indexed)
1017     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1018     */
1019    public ICD insertPreCertificationRequirement(int rep) throws HL7Exception { 
1020        return (ICD) super.insertRepetition(20, rep);
1021    }
1022
1023
1024    /**
1025     * Inserts a repetition of
1026     * IN3-20: "Pre-Certification Requirement" at a specific index
1027     *
1028     * @param rep The repetition index (0-indexed)
1029     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1030     */
1031    public ICD insertIn320_PreCertificationRequirement(int rep) throws HL7Exception { 
1032        return (ICD) super.insertRepetition(20, rep);
1033    }
1034
1035
1036    /**
1037     * Removes a repetition of
1038     * IN3-20: "Pre-Certification Requirement" at a specific index
1039     *
1040     * @param rep The repetition index (0-indexed)
1041     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1042     */
1043    public ICD removePreCertificationRequirement(int rep) throws HL7Exception { 
1044        return (ICD) super.removeRepetition(20, rep);
1045    }
1046
1047
1048    /**
1049     * Removes a repetition of
1050     * IN3-20: "Pre-Certification Requirement" at a specific index
1051     *
1052     * @param rep The repetition index (0-indexed)
1053     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1054     */
1055    public ICD removeIn320_PreCertificationRequirement(int rep) throws HL7Exception { 
1056        return (ICD) super.removeRepetition(20, rep);
1057    }
1058
1059
1060
1061
1062    /**
1063     * Returns
1064     * IN3-21: "Case Manager" - creates it if necessary
1065     */
1066    public ST getCaseManager() { 
1067                ST retVal = this.getTypedField(21, 0);
1068                return retVal;
1069    }
1070    
1071    /**
1072     * Returns
1073     * IN3-21: "Case Manager" - creates it if necessary
1074     */
1075    public ST getIn321_CaseManager() { 
1076                ST retVal = this.getTypedField(21, 0);
1077                return retVal;
1078    }
1079
1080
1081
1082    /**
1083     * Returns
1084     * IN3-22: "Second Opinion Date" - creates it if necessary
1085     */
1086    public DT getSecondOpinionDate() { 
1087                DT retVal = this.getTypedField(22, 0);
1088                return retVal;
1089    }
1090    
1091    /**
1092     * Returns
1093     * IN3-22: "Second Opinion Date" - creates it if necessary
1094     */
1095    public DT getIn322_SecondOpinionDate() { 
1096                DT retVal = this.getTypedField(22, 0);
1097                return retVal;
1098    }
1099
1100
1101
1102    /**
1103     * Returns
1104     * IN3-23: "Second Opinion Status" - creates it if necessary
1105     */
1106    public CWE getSecondOpinionStatus() { 
1107                CWE retVal = this.getTypedField(23, 0);
1108                return retVal;
1109    }
1110    
1111    /**
1112     * Returns
1113     * IN3-23: "Second Opinion Status" - creates it if necessary
1114     */
1115    public CWE getIn323_SecondOpinionStatus() { 
1116                CWE retVal = this.getTypedField(23, 0);
1117                return retVal;
1118    }
1119
1120
1121    /**
1122     * Returns all repetitions of Second Opinion Documentation Received (IN3-24).
1123     */
1124    public CWE[] getSecondOpinionDocumentationReceived() {
1125        CWE[] retVal = this.getTypedField(24, new CWE[0]);
1126        return retVal;
1127    }
1128
1129
1130    /**
1131     * Returns all repetitions of Second Opinion Documentation Received (IN3-24).
1132     */
1133    public CWE[] getIn324_SecondOpinionDocumentationReceived() {
1134        CWE[] retVal = this.getTypedField(24, new CWE[0]);
1135        return retVal;
1136    }
1137
1138
1139    /**
1140     * Returns a count of the current number of repetitions of Second Opinion Documentation Received (IN3-24).
1141     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1142     * it will return zero.
1143     */
1144    public int getSecondOpinionDocumentationReceivedReps() {
1145        return this.getReps(24);
1146    }
1147
1148
1149    /**
1150     * Returns a specific repetition of
1151     * IN3-24: "Second Opinion Documentation Received" - creates it if necessary
1152     *
1153     * @param rep The repetition index (0-indexed)
1154     */
1155    public CWE getSecondOpinionDocumentationReceived(int rep) { 
1156                CWE retVal = this.getTypedField(24, rep);
1157                return retVal;
1158    }
1159
1160    /**
1161     * Returns a specific repetition of
1162     * IN3-24: "Second Opinion Documentation Received" - creates it if necessary
1163     *
1164     * @param rep The repetition index (0-indexed)
1165     */
1166    public CWE getIn324_SecondOpinionDocumentationReceived(int rep) { 
1167                CWE retVal = this.getTypedField(24, rep);
1168                return retVal;
1169    }
1170
1171    /**
1172     * Returns a count of the current number of repetitions of Second Opinion Documentation Received (IN3-24).
1173     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1174     * it will return zero.
1175     */
1176    public int getIn324_SecondOpinionDocumentationReceivedReps() {
1177        return this.getReps(24);
1178    }
1179
1180
1181    /**
1182     * Inserts a repetition of
1183     * IN3-24: "Second Opinion Documentation Received" at a specific index
1184     *
1185     * @param rep The repetition index (0-indexed)
1186     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1187     */
1188    public CWE insertSecondOpinionDocumentationReceived(int rep) throws HL7Exception { 
1189        return (CWE) super.insertRepetition(24, rep);
1190    }
1191
1192
1193    /**
1194     * Inserts a repetition of
1195     * IN3-24: "Second Opinion Documentation Received" at a specific index
1196     *
1197     * @param rep The repetition index (0-indexed)
1198     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1199     */
1200    public CWE insertIn324_SecondOpinionDocumentationReceived(int rep) throws HL7Exception { 
1201        return (CWE) super.insertRepetition(24, rep);
1202    }
1203
1204
1205    /**
1206     * Removes a repetition of
1207     * IN3-24: "Second Opinion Documentation Received" at a specific index
1208     *
1209     * @param rep The repetition index (0-indexed)
1210     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1211     */
1212    public CWE removeSecondOpinionDocumentationReceived(int rep) throws HL7Exception { 
1213        return (CWE) super.removeRepetition(24, rep);
1214    }
1215
1216
1217    /**
1218     * Removes a repetition of
1219     * IN3-24: "Second Opinion Documentation Received" at a specific index
1220     *
1221     * @param rep The repetition index (0-indexed)
1222     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1223     */
1224    public CWE removeIn324_SecondOpinionDocumentationReceived(int rep) throws HL7Exception { 
1225        return (CWE) super.removeRepetition(24, rep);
1226    }
1227
1228
1229
1230    /**
1231     * Returns all repetitions of Second Opinion Physician (IN3-25).
1232     */
1233    public XCN[] getSecondOpinionPhysician() {
1234        XCN[] retVal = this.getTypedField(25, new XCN[0]);
1235        return retVal;
1236    }
1237
1238
1239    /**
1240     * Returns all repetitions of Second Opinion Physician (IN3-25).
1241     */
1242    public XCN[] getIn325_SecondOpinionPhysician() {
1243        XCN[] retVal = this.getTypedField(25, new XCN[0]);
1244        return retVal;
1245    }
1246
1247
1248    /**
1249     * Returns a count of the current number of repetitions of Second Opinion Physician (IN3-25).
1250     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1251     * it will return zero.
1252     */
1253    public int getSecondOpinionPhysicianReps() {
1254        return this.getReps(25);
1255    }
1256
1257
1258    /**
1259     * Returns a specific repetition of
1260     * IN3-25: "Second Opinion Physician" - creates it if necessary
1261     *
1262     * @param rep The repetition index (0-indexed)
1263     */
1264    public XCN getSecondOpinionPhysician(int rep) { 
1265                XCN retVal = this.getTypedField(25, rep);
1266                return retVal;
1267    }
1268
1269    /**
1270     * Returns a specific repetition of
1271     * IN3-25: "Second Opinion Physician" - creates it if necessary
1272     *
1273     * @param rep The repetition index (0-indexed)
1274     */
1275    public XCN getIn325_SecondOpinionPhysician(int rep) { 
1276                XCN retVal = this.getTypedField(25, rep);
1277                return retVal;
1278    }
1279
1280    /**
1281     * Returns a count of the current number of repetitions of Second Opinion Physician (IN3-25).
1282     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1283     * it will return zero.
1284     */
1285    public int getIn325_SecondOpinionPhysicianReps() {
1286        return this.getReps(25);
1287    }
1288
1289
1290    /**
1291     * Inserts a repetition of
1292     * IN3-25: "Second Opinion Physician" at a specific index
1293     *
1294     * @param rep The repetition index (0-indexed)
1295     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1296     */
1297    public XCN insertSecondOpinionPhysician(int rep) throws HL7Exception { 
1298        return (XCN) super.insertRepetition(25, rep);
1299    }
1300
1301
1302    /**
1303     * Inserts a repetition of
1304     * IN3-25: "Second Opinion Physician" at a specific index
1305     *
1306     * @param rep The repetition index (0-indexed)
1307     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1308     */
1309    public XCN insertIn325_SecondOpinionPhysician(int rep) throws HL7Exception { 
1310        return (XCN) super.insertRepetition(25, rep);
1311    }
1312
1313
1314    /**
1315     * Removes a repetition of
1316     * IN3-25: "Second Opinion Physician" at a specific index
1317     *
1318     * @param rep The repetition index (0-indexed)
1319     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1320     */
1321    public XCN removeSecondOpinionPhysician(int rep) throws HL7Exception { 
1322        return (XCN) super.removeRepetition(25, rep);
1323    }
1324
1325
1326    /**
1327     * Removes a repetition of
1328     * IN3-25: "Second Opinion Physician" at a specific index
1329     *
1330     * @param rep The repetition index (0-indexed)
1331     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1332     */
1333    public XCN removeIn325_SecondOpinionPhysician(int rep) throws HL7Exception { 
1334        return (XCN) super.removeRepetition(25, rep);
1335    }
1336
1337
1338
1339
1340    /**
1341     * Returns
1342     * IN3-26: "Certification Type" - creates it if necessary
1343     */
1344    public CWE getCertificationType() { 
1345                CWE retVal = this.getTypedField(26, 0);
1346                return retVal;
1347    }
1348    
1349    /**
1350     * Returns
1351     * IN3-26: "Certification Type" - creates it if necessary
1352     */
1353    public CWE getIn326_CertificationType() { 
1354                CWE retVal = this.getTypedField(26, 0);
1355                return retVal;
1356    }
1357
1358
1359
1360    /**
1361     * Returns
1362     * IN3-27: "Certification Category" - creates it if necessary
1363     */
1364    public CWE getCertificationCategory() { 
1365                CWE retVal = this.getTypedField(27, 0);
1366                return retVal;
1367    }
1368    
1369    /**
1370     * Returns
1371     * IN3-27: "Certification Category" - creates it if necessary
1372     */
1373    public CWE getIn327_CertificationCategory() { 
1374                CWE retVal = this.getTypedField(27, 0);
1375                return retVal;
1376    }
1377
1378
1379
1380
1381
1382    /** {@inheritDoc} */   
1383    protected Type createNewTypeWithoutReflection(int field) {
1384       switch (field) {
1385          case 0: return new SI(getMessage());
1386          case 1: return new CX(getMessage());
1387          case 2: return new XCN(getMessage());
1388          case 3: return new ID(getMessage(), new Integer( 136 ));
1389          case 4: return new MOP(getMessage());
1390          case 5: return new DTM(getMessage());
1391          case 6: return new DTM(getMessage());
1392          case 7: return new XCN(getMessage());
1393          case 8: return new DT(getMessage());
1394          case 9: return new DT(getMessage());
1395          case 10: return new DTN(getMessage());
1396          case 11: return new CWE(getMessage());
1397          case 12: return new DTM(getMessage());
1398          case 13: return new XCN(getMessage());
1399          case 14: return new ST(getMessage());
1400          case 15: return new XTN(getMessage());
1401          case 16: return new CWE(getMessage());
1402          case 17: return new CWE(getMessage());
1403          case 18: return new XTN(getMessage());
1404          case 19: return new ICD(getMessage());
1405          case 20: return new ST(getMessage());
1406          case 21: return new DT(getMessage());
1407          case 22: return new CWE(getMessage());
1408          case 23: return new CWE(getMessage());
1409          case 24: return new XCN(getMessage());
1410          case 25: return new CWE(getMessage());
1411          case 26: return new CWE(getMessage());
1412          default: return null;
1413       }
1414   }
1415
1416
1417}
1418