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.v22.segment;
035
036// import ca.uhn.hl7v2.model.v22.group.*;
037import ca.uhn.hl7v2.model.v22.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 INFO-CERTIFICATION). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>IN3-1: Set ID - insurance certification (SI) <b> </b>
053     * <li>IN3-2: Certification number (ST) <b>optional </b>
054     * <li>IN3-3: Certified by (CN) <b>optional </b>
055     * <li>IN3-4: Certification required (ID) <b>optional </b>
056     * <li>IN3-5: Penalty (CM_PEN) <b>optional </b>
057     * <li>IN3-6: Certification date / time (TS) <b>optional </b>
058     * <li>IN3-7: Certification modify date / time (TS) <b>optional </b>
059     * <li>IN3-8: Operator (CN) <b>optional </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 (CM_DTN) <b>optional </b>
063     * <li>IN3-12: Non-concur code / description (CE) <b>optional </b>
064     * <li>IN3-13: Non-concur effective date / time (TS) <b>optional </b>
065     * <li>IN3-14: Physician reviewer (CN) <b>optional </b>
066     * <li>IN3-15: Certification contact (ST) <b>optional </b>
067     * <li>IN3-16: Certification contact phone number (TN) <b>optional repeating</b>
068     * <li>IN3-17: Appeal reason (CE) <b>optional </b>
069     * <li>IN3-18: Certification agency (CE) <b>optional </b>
070     * <li>IN3-19: Certification agency phone number (TN) <b>optional repeating</b>
071     * <li>IN3-20: Pre-certification required / window (CM_PCF) <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 (ID) <b>optional </b>
075     * <li>IN3-24: Second opinion documentation received (ID) <b>optional </b>
076     * <li>IN3-25: Second opinion practitioner (CN) <b>optional </b>
077 * </ul>
078 */
079@SuppressWarnings("unused")
080public class IN3 extends AbstractSegment {
081
082    /** 
083     * Creates a new IN3 segment
084     */
085    public IN3(Group parent, ModelClassFactory factory) {
086       super(parent, factory);
087       init(factory);
088    }
089
090    private void init(ModelClassFactory factory) {
091       try {
092                                  this.add(SI.class, true, 1, 4, new Object[]{ getMessage() }, "Set ID - insurance certification");
093                                  this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Certification number");
094                                  this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Certified by");
095                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Certification required");
096                                  this.add(CM_PEN.class, false, 1, 10, new Object[]{ getMessage() }, "Penalty");
097                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Certification date / time");
098                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Certification modify date / time");
099                                  this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Operator");
100                                  this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Certification begin date");
101                                  this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Certification end date");
102                                  this.add(CM_DTN.class, false, 1, 3, new Object[]{ getMessage() }, "Days");
103                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Non-concur code / description");
104                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Non-concur effective date / time");
105                                  this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Physician reviewer");
106                                  this.add(ST.class, false, 1, 48, new Object[]{ getMessage() }, "Certification contact");
107                                  this.add(TN.class, false, 3, 40, new Object[]{ getMessage() }, "Certification contact phone number");
108                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Appeal reason");
109                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Certification agency");
110                                  this.add(TN.class, false, 3, 40, new Object[]{ getMessage() }, "Certification agency phone number");
111                                  this.add(CM_PCF.class, false, 0, 40, new Object[]{ getMessage() }, "Pre-certification required / window");
112                                  this.add(ST.class, false, 1, 48, new Object[]{ getMessage() }, "Case manager");
113                                  this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Second opinion date");
114                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(151) }, "Second opinion status");
115                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(152) }, "Second opinion documentation received");
116                                  this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Second opinion practitioner");
117       } catch(HL7Exception e) {
118          log.error("Unexpected error creating IN3 - this is probably a bug in the source code generator.", e);
119       }
120    }
121
122
123
124    /**
125     * Returns
126     * IN3-1: "Set ID - insurance certification" - creates it if necessary
127     */
128    public SI getSetIDInsuranceCertification() { 
129                SI retVal = this.getTypedField(1, 0);
130                return retVal;
131    }
132    
133    /**
134     * Returns
135     * IN3-1: "Set ID - insurance certification" - creates it if necessary
136     */
137    public SI getIn31_SetIDInsuranceCertification() { 
138                SI retVal = this.getTypedField(1, 0);
139                return retVal;
140    }
141
142
143
144    /**
145     * Returns
146     * IN3-2: "Certification number" - creates it if necessary
147     */
148    public ST getCertificationNumber() { 
149                ST retVal = this.getTypedField(2, 0);
150                return retVal;
151    }
152    
153    /**
154     * Returns
155     * IN3-2: "Certification number" - creates it if necessary
156     */
157    public ST getIn32_CertificationNumber() { 
158                ST retVal = this.getTypedField(2, 0);
159                return retVal;
160    }
161
162
163
164    /**
165     * Returns
166     * IN3-3: "Certified by" - creates it if necessary
167     */
168    public CN getCertifiedBy() { 
169                CN retVal = this.getTypedField(3, 0);
170                return retVal;
171    }
172    
173    /**
174     * Returns
175     * IN3-3: "Certified by" - creates it if necessary
176     */
177    public CN getIn33_CertifiedBy() { 
178                CN retVal = this.getTypedField(3, 0);
179                return retVal;
180    }
181
182
183
184    /**
185     * Returns
186     * IN3-4: "Certification required" - creates it if necessary
187     */
188    public ID getCertificationRequired() { 
189                ID retVal = this.getTypedField(4, 0);
190                return retVal;
191    }
192    
193    /**
194     * Returns
195     * IN3-4: "Certification required" - creates it if necessary
196     */
197    public ID getIn34_CertificationRequired() { 
198                ID retVal = this.getTypedField(4, 0);
199                return retVal;
200    }
201
202
203
204    /**
205     * Returns
206     * IN3-5: "Penalty" - creates it if necessary
207     */
208    public CM_PEN getPenalty() { 
209                CM_PEN retVal = this.getTypedField(5, 0);
210                return retVal;
211    }
212    
213    /**
214     * Returns
215     * IN3-5: "Penalty" - creates it if necessary
216     */
217    public CM_PEN getIn35_Penalty() { 
218                CM_PEN retVal = this.getTypedField(5, 0);
219                return retVal;
220    }
221
222
223
224    /**
225     * Returns
226     * IN3-6: "Certification date / time" - creates it if necessary
227     */
228    public TS getCertificationDateTime() { 
229                TS retVal = this.getTypedField(6, 0);
230                return retVal;
231    }
232    
233    /**
234     * Returns
235     * IN3-6: "Certification date / time" - creates it if necessary
236     */
237    public TS getIn36_CertificationDateTime() { 
238                TS retVal = this.getTypedField(6, 0);
239                return retVal;
240    }
241
242
243
244    /**
245     * Returns
246     * IN3-7: "Certification modify date / time" - creates it if necessary
247     */
248    public TS getCertificationModifyDateTime() { 
249                TS retVal = this.getTypedField(7, 0);
250                return retVal;
251    }
252    
253    /**
254     * Returns
255     * IN3-7: "Certification modify date / time" - creates it if necessary
256     */
257    public TS getIn37_CertificationModifyDateTime() { 
258                TS retVal = this.getTypedField(7, 0);
259                return retVal;
260    }
261
262
263
264    /**
265     * Returns
266     * IN3-8: "Operator" - creates it if necessary
267     */
268    public CN getOperator() { 
269                CN retVal = this.getTypedField(8, 0);
270                return retVal;
271    }
272    
273    /**
274     * Returns
275     * IN3-8: "Operator" - creates it if necessary
276     */
277    public CN getIn38_Operator() { 
278                CN retVal = this.getTypedField(8, 0);
279                return retVal;
280    }
281
282
283
284    /**
285     * Returns
286     * IN3-9: "Certification begin date" - creates it if necessary
287     */
288    public DT getCertificationBeginDate() { 
289                DT retVal = this.getTypedField(9, 0);
290                return retVal;
291    }
292    
293    /**
294     * Returns
295     * IN3-9: "Certification begin date" - creates it if necessary
296     */
297    public DT getIn39_CertificationBeginDate() { 
298                DT retVal = this.getTypedField(9, 0);
299                return retVal;
300    }
301
302
303
304    /**
305     * Returns
306     * IN3-10: "Certification end date" - creates it if necessary
307     */
308    public DT getCertificationEndDate() { 
309                DT retVal = this.getTypedField(10, 0);
310                return retVal;
311    }
312    
313    /**
314     * Returns
315     * IN3-10: "Certification end date" - creates it if necessary
316     */
317    public DT getIn310_CertificationEndDate() { 
318                DT retVal = this.getTypedField(10, 0);
319                return retVal;
320    }
321
322
323
324    /**
325     * Returns
326     * IN3-11: "Days" - creates it if necessary
327     */
328    public CM_DTN getDays() { 
329                CM_DTN retVal = this.getTypedField(11, 0);
330                return retVal;
331    }
332    
333    /**
334     * Returns
335     * IN3-11: "Days" - creates it if necessary
336     */
337    public CM_DTN getIn311_Days() { 
338                CM_DTN retVal = this.getTypedField(11, 0);
339                return retVal;
340    }
341
342
343
344    /**
345     * Returns
346     * IN3-12: "Non-concur code / description" - creates it if necessary
347     */
348    public CE getNonConcurCodeDescription() { 
349                CE retVal = this.getTypedField(12, 0);
350                return retVal;
351    }
352    
353    /**
354     * Returns
355     * IN3-12: "Non-concur code / description" - creates it if necessary
356     */
357    public CE getIn312_NonConcurCodeDescription() { 
358                CE retVal = this.getTypedField(12, 0);
359                return retVal;
360    }
361
362
363
364    /**
365     * Returns
366     * IN3-13: "Non-concur effective date / time" - creates it if necessary
367     */
368    public TS getNonConcurEffectiveDateTime() { 
369                TS retVal = this.getTypedField(13, 0);
370                return retVal;
371    }
372    
373    /**
374     * Returns
375     * IN3-13: "Non-concur effective date / time" - creates it if necessary
376     */
377    public TS getIn313_NonConcurEffectiveDateTime() { 
378                TS retVal = this.getTypedField(13, 0);
379                return retVal;
380    }
381
382
383
384    /**
385     * Returns
386     * IN3-14: "Physician reviewer" - creates it if necessary
387     */
388    public CN getPhysicianReviewer() { 
389                CN retVal = this.getTypedField(14, 0);
390                return retVal;
391    }
392    
393    /**
394     * Returns
395     * IN3-14: "Physician reviewer" - creates it if necessary
396     */
397    public CN getIn314_PhysicianReviewer() { 
398                CN retVal = this.getTypedField(14, 0);
399                return retVal;
400    }
401
402
403
404    /**
405     * Returns
406     * IN3-15: "Certification contact" - creates it if necessary
407     */
408    public ST getCertificationContact() { 
409                ST retVal = this.getTypedField(15, 0);
410                return retVal;
411    }
412    
413    /**
414     * Returns
415     * IN3-15: "Certification contact" - creates it if necessary
416     */
417    public ST getIn315_CertificationContact() { 
418                ST retVal = this.getTypedField(15, 0);
419                return retVal;
420    }
421
422
423    /**
424     * Returns all repetitions of Certification contact phone number (IN3-16).
425     */
426    public TN[] getCertificationContactPhoneNumber() {
427        TN[] retVal = this.getTypedField(16, new TN[0]);
428        return retVal;
429    }
430
431
432    /**
433     * Returns all repetitions of Certification contact phone number (IN3-16).
434     */
435    public TN[] getIn316_CertificationContactPhoneNumber() {
436        TN[] retVal = this.getTypedField(16, new TN[0]);
437        return retVal;
438    }
439
440
441    /**
442     * Returns a count of the current number of repetitions of Certification contact phone number (IN3-16).
443     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
444     * it will return zero.
445     */
446    public int getCertificationContactPhoneNumberReps() {
447        return this.getReps(16);
448    }
449
450
451    /**
452     * Returns a specific repetition of
453     * IN3-16: "Certification contact phone number" - creates it if necessary
454     *
455     * @param rep The repetition index (0-indexed)
456     */
457    public TN getCertificationContactPhoneNumber(int rep) { 
458                TN retVal = this.getTypedField(16, rep);
459                return retVal;
460    }
461
462    /**
463     * Returns a specific repetition of
464     * IN3-16: "Certification contact phone number" - creates it if necessary
465     *
466     * @param rep The repetition index (0-indexed)
467     */
468    public TN getIn316_CertificationContactPhoneNumber(int rep) { 
469                TN retVal = this.getTypedField(16, rep);
470                return retVal;
471    }
472
473    /**
474     * Returns a count of the current number of repetitions of Certification contact phone number (IN3-16).
475     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
476     * it will return zero.
477     */
478    public int getIn316_CertificationContactPhoneNumberReps() {
479        return this.getReps(16);
480    }
481
482
483    /**
484     * Inserts a repetition of
485     * IN3-16: "Certification contact phone number" at a specific index
486     *
487     * @param rep The repetition index (0-indexed)
488     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
489     */
490    public TN insertCertificationContactPhoneNumber(int rep) throws HL7Exception { 
491        return (TN) super.insertRepetition(16, rep);
492    }
493
494
495    /**
496     * Inserts a repetition of
497     * IN3-16: "Certification contact phone number" at a specific index
498     *
499     * @param rep The repetition index (0-indexed)
500     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
501     */
502    public TN insertIn316_CertificationContactPhoneNumber(int rep) throws HL7Exception { 
503        return (TN) super.insertRepetition(16, rep);
504    }
505
506
507    /**
508     * Removes a repetition of
509     * IN3-16: "Certification contact phone number" at a specific index
510     *
511     * @param rep The repetition index (0-indexed)
512     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
513     */
514    public TN removeCertificationContactPhoneNumber(int rep) throws HL7Exception { 
515        return (TN) super.removeRepetition(16, rep);
516    }
517
518
519    /**
520     * Removes a repetition of
521     * IN3-16: "Certification contact phone number" at a specific index
522     *
523     * @param rep The repetition index (0-indexed)
524     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
525     */
526    public TN removeIn316_CertificationContactPhoneNumber(int rep) throws HL7Exception { 
527        return (TN) super.removeRepetition(16, rep);
528    }
529
530
531
532
533    /**
534     * Returns
535     * IN3-17: "Appeal reason" - creates it if necessary
536     */
537    public CE getAppealReason() { 
538                CE retVal = this.getTypedField(17, 0);
539                return retVal;
540    }
541    
542    /**
543     * Returns
544     * IN3-17: "Appeal reason" - creates it if necessary
545     */
546    public CE getIn317_AppealReason() { 
547                CE retVal = this.getTypedField(17, 0);
548                return retVal;
549    }
550
551
552
553    /**
554     * Returns
555     * IN3-18: "Certification agency" - creates it if necessary
556     */
557    public CE getCertificationAgency() { 
558                CE retVal = this.getTypedField(18, 0);
559                return retVal;
560    }
561    
562    /**
563     * Returns
564     * IN3-18: "Certification agency" - creates it if necessary
565     */
566    public CE getIn318_CertificationAgency() { 
567                CE retVal = this.getTypedField(18, 0);
568                return retVal;
569    }
570
571
572    /**
573     * Returns all repetitions of Certification agency phone number (IN3-19).
574     */
575    public TN[] getCertificationAgencyPhoneNumber() {
576        TN[] retVal = this.getTypedField(19, new TN[0]);
577        return retVal;
578    }
579
580
581    /**
582     * Returns all repetitions of Certification agency phone number (IN3-19).
583     */
584    public TN[] getIn319_CertificationAgencyPhoneNumber() {
585        TN[] retVal = this.getTypedField(19, new TN[0]);
586        return retVal;
587    }
588
589
590    /**
591     * Returns a count of the current number of repetitions of Certification agency phone number (IN3-19).
592     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
593     * it will return zero.
594     */
595    public int getCertificationAgencyPhoneNumberReps() {
596        return this.getReps(19);
597    }
598
599
600    /**
601     * Returns a specific repetition of
602     * IN3-19: "Certification agency phone number" - creates it if necessary
603     *
604     * @param rep The repetition index (0-indexed)
605     */
606    public TN getCertificationAgencyPhoneNumber(int rep) { 
607                TN retVal = this.getTypedField(19, rep);
608                return retVal;
609    }
610
611    /**
612     * Returns a specific repetition of
613     * IN3-19: "Certification agency phone number" - creates it if necessary
614     *
615     * @param rep The repetition index (0-indexed)
616     */
617    public TN getIn319_CertificationAgencyPhoneNumber(int rep) { 
618                TN retVal = this.getTypedField(19, rep);
619                return retVal;
620    }
621
622    /**
623     * Returns a count of the current number of repetitions of Certification agency phone number (IN3-19).
624     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
625     * it will return zero.
626     */
627    public int getIn319_CertificationAgencyPhoneNumberReps() {
628        return this.getReps(19);
629    }
630
631
632    /**
633     * Inserts a repetition of
634     * IN3-19: "Certification agency phone number" 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 TN insertCertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
640        return (TN) super.insertRepetition(19, rep);
641    }
642
643
644    /**
645     * Inserts a repetition of
646     * IN3-19: "Certification agency phone number" 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 TN insertIn319_CertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
652        return (TN) super.insertRepetition(19, rep);
653    }
654
655
656    /**
657     * Removes a repetition of
658     * IN3-19: "Certification agency phone number" 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 TN removeCertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
664        return (TN) super.removeRepetition(19, rep);
665    }
666
667
668    /**
669     * Removes a repetition of
670     * IN3-19: "Certification agency phone number" at a specific index
671     *
672     * @param rep The repetition index (0-indexed)
673     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
674     */
675    public TN removeIn319_CertificationAgencyPhoneNumber(int rep) throws HL7Exception { 
676        return (TN) super.removeRepetition(19, rep);
677    }
678
679
680
681    /**
682     * Returns all repetitions of Pre-certification required / window (IN3-20).
683     */
684    public CM_PCF[] getPreCertificationRequiredWindow() {
685        CM_PCF[] retVal = this.getTypedField(20, new CM_PCF[0]);
686        return retVal;
687    }
688
689
690    /**
691     * Returns all repetitions of Pre-certification required / window (IN3-20).
692     */
693    public CM_PCF[] getIn320_PreCertificationRequiredWindow() {
694        CM_PCF[] retVal = this.getTypedField(20, new CM_PCF[0]);
695        return retVal;
696    }
697
698
699    /**
700     * Returns a count of the current number of repetitions of Pre-certification required / window (IN3-20).
701     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
702     * it will return zero.
703     */
704    public int getPreCertificationRequiredWindowReps() {
705        return this.getReps(20);
706    }
707
708
709    /**
710     * Returns a specific repetition of
711     * IN3-20: "Pre-certification required / window" - creates it if necessary
712     *
713     * @param rep The repetition index (0-indexed)
714     */
715    public CM_PCF getPreCertificationRequiredWindow(int rep) { 
716                CM_PCF retVal = this.getTypedField(20, rep);
717                return retVal;
718    }
719
720    /**
721     * Returns a specific repetition of
722     * IN3-20: "Pre-certification required / window" - creates it if necessary
723     *
724     * @param rep The repetition index (0-indexed)
725     */
726    public CM_PCF getIn320_PreCertificationRequiredWindow(int rep) { 
727                CM_PCF retVal = this.getTypedField(20, rep);
728                return retVal;
729    }
730
731    /**
732     * Returns a count of the current number of repetitions of Pre-certification required / window (IN3-20).
733     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
734     * it will return zero.
735     */
736    public int getIn320_PreCertificationRequiredWindowReps() {
737        return this.getReps(20);
738    }
739
740
741    /**
742     * Inserts a repetition of
743     * IN3-20: "Pre-certification required / window" at a specific index
744     *
745     * @param rep The repetition index (0-indexed)
746     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
747     */
748    public CM_PCF insertPreCertificationRequiredWindow(int rep) throws HL7Exception { 
749        return (CM_PCF) super.insertRepetition(20, rep);
750    }
751
752
753    /**
754     * Inserts a repetition of
755     * IN3-20: "Pre-certification required / window" at a specific index
756     *
757     * @param rep The repetition index (0-indexed)
758     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
759     */
760    public CM_PCF insertIn320_PreCertificationRequiredWindow(int rep) throws HL7Exception { 
761        return (CM_PCF) super.insertRepetition(20, rep);
762    }
763
764
765    /**
766     * Removes a repetition of
767     * IN3-20: "Pre-certification required / window" at a specific index
768     *
769     * @param rep The repetition index (0-indexed)
770     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
771     */
772    public CM_PCF removePreCertificationRequiredWindow(int rep) throws HL7Exception { 
773        return (CM_PCF) super.removeRepetition(20, rep);
774    }
775
776
777    /**
778     * Removes a repetition of
779     * IN3-20: "Pre-certification required / window" at a specific index
780     *
781     * @param rep The repetition index (0-indexed)
782     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
783     */
784    public CM_PCF removeIn320_PreCertificationRequiredWindow(int rep) throws HL7Exception { 
785        return (CM_PCF) super.removeRepetition(20, rep);
786    }
787
788
789
790
791    /**
792     * Returns
793     * IN3-21: "Case manager" - creates it if necessary
794     */
795    public ST getCaseManager() { 
796                ST retVal = this.getTypedField(21, 0);
797                return retVal;
798    }
799    
800    /**
801     * Returns
802     * IN3-21: "Case manager" - creates it if necessary
803     */
804    public ST getIn321_CaseManager() { 
805                ST retVal = this.getTypedField(21, 0);
806                return retVal;
807    }
808
809
810
811    /**
812     * Returns
813     * IN3-22: "Second opinion date" - creates it if necessary
814     */
815    public DT getSecondOpinionDate() { 
816                DT retVal = this.getTypedField(22, 0);
817                return retVal;
818    }
819    
820    /**
821     * Returns
822     * IN3-22: "Second opinion date" - creates it if necessary
823     */
824    public DT getIn322_SecondOpinionDate() { 
825                DT retVal = this.getTypedField(22, 0);
826                return retVal;
827    }
828
829
830
831    /**
832     * Returns
833     * IN3-23: "Second opinion status" - creates it if necessary
834     */
835    public ID getSecondOpinionStatus() { 
836                ID retVal = this.getTypedField(23, 0);
837                return retVal;
838    }
839    
840    /**
841     * Returns
842     * IN3-23: "Second opinion status" - creates it if necessary
843     */
844    public ID getIn323_SecondOpinionStatus() { 
845                ID retVal = this.getTypedField(23, 0);
846                return retVal;
847    }
848
849
850
851    /**
852     * Returns
853     * IN3-24: "Second opinion documentation received" - creates it if necessary
854     */
855    public ID getSecondOpinionDocumentationReceived() { 
856                ID retVal = this.getTypedField(24, 0);
857                return retVal;
858    }
859    
860    /**
861     * Returns
862     * IN3-24: "Second opinion documentation received" - creates it if necessary
863     */
864    public ID getIn324_SecondOpinionDocumentationReceived() { 
865                ID retVal = this.getTypedField(24, 0);
866                return retVal;
867    }
868
869
870
871    /**
872     * Returns
873     * IN3-25: "Second opinion practitioner" - creates it if necessary
874     */
875    public CN getSecondOpinionPractitioner() { 
876                CN retVal = this.getTypedField(25, 0);
877                return retVal;
878    }
879    
880    /**
881     * Returns
882     * IN3-25: "Second opinion practitioner" - creates it if necessary
883     */
884    public CN getIn325_SecondOpinionPractitioner() { 
885                CN retVal = this.getTypedField(25, 0);
886                return retVal;
887    }
888
889
890
891
892
893    /** {@inheritDoc} */   
894    protected Type createNewTypeWithoutReflection(int field) {
895       switch (field) {
896          case 0: return new SI(getMessage());
897          case 1: return new ST(getMessage());
898          case 2: return new CN(getMessage());
899          case 3: return new ID(getMessage(), new Integer( 136 ));
900          case 4: return new CM_PEN(getMessage());
901          case 5: return new TS(getMessage());
902          case 6: return new TS(getMessage());
903          case 7: return new CN(getMessage());
904          case 8: return new DT(getMessage());
905          case 9: return new DT(getMessage());
906          case 10: return new CM_DTN(getMessage());
907          case 11: return new CE(getMessage());
908          case 12: return new TS(getMessage());
909          case 13: return new CN(getMessage());
910          case 14: return new ST(getMessage());
911          case 15: return new TN(getMessage());
912          case 16: return new CE(getMessage());
913          case 17: return new CE(getMessage());
914          case 18: return new TN(getMessage());
915          case 19: return new CM_PCF(getMessage());
916          case 20: return new ST(getMessage());
917          case 21: return new DT(getMessage());
918          case 22: return new ID(getMessage(), new Integer( 151 ));
919          case 23: return new ID(getMessage(), new Integer( 152 ));
920          case 24: return new CN(getMessage());
921          default: return null;
922       }
923   }
924
925
926}
927