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