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