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 IN2 message segment (INSURANCE ADDITIONAL INFO). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>IN2-1: Insured's employee ID (ST) <b>optional </b>
053     * <li>IN2-2: Insured's social security number (ST) <b>optional </b>
054     * <li>IN2-3: Insured's employer name (CN) <b>optional </b>
055     * <li>IN2-4: Employer information data (ID) <b>optional </b>
056     * <li>IN2-5: Mail claim party (ID) <b>optional </b>
057     * <li>IN2-6: Medicare health insurance card number (NM) <b>optional </b>
058     * <li>IN2-7: Medicaid case name (PN) <b>optional </b>
059     * <li>IN2-8: Medicaid case number (NM) <b>optional </b>
060     * <li>IN2-9: Champus sponsor name (PN) <b>optional </b>
061     * <li>IN2-10: Champus ID number (NM) <b>optional </b>
062     * <li>IN2-11: Dependent of champus recipient (ID) <b>optional </b>
063     * <li>IN2-12: Champus organization (ST) <b>optional </b>
064     * <li>IN2-13: Champus station (ST) <b>optional </b>
065     * <li>IN2-14: Champus service (ID) <b>optional </b>
066     * <li>IN2-15: Champus rank / grade (ID) <b>optional </b>
067     * <li>IN2-16: Champus status (ID) <b>optional </b>
068     * <li>IN2-17: Champus retire date (DT) <b>optional </b>
069     * <li>IN2-18: Champus non-availability certification on file (ID) <b>optional </b>
070     * <li>IN2-19: Baby coverage (ID) <b>optional </b>
071     * <li>IN2-20: Combine baby bill (ID) <b>optional </b>
072     * <li>IN2-21: Blood deductible (NM) <b>optional </b>
073     * <li>IN2-22: Special coverage approval name (PN) <b>optional </b>
074     * <li>IN2-23: Special coverage approval title (ST) <b>optional </b>
075     * <li>IN2-24: Non-covered insurance code (ID) <b>optional repeating</b>
076     * <li>IN2-25: Payor ID (ST) <b>optional </b>
077     * <li>IN2-26: Payor subscriber ID (ST) <b>optional </b>
078     * <li>IN2-27: Eligibility source (ID) <b>optional </b>
079     * <li>IN2-28: Room coverage type / amount (CM_RMC) <b>optional repeating</b>
080     * <li>IN2-29: Policy type / amount (CM_PTA) <b>optional repeating</b>
081     * <li>IN2-30: Daily deductible (CM_DDI) <b>optional </b>
082 * </ul>
083 */
084@SuppressWarnings("unused")
085public class IN2 extends AbstractSegment {
086
087    /** 
088     * Creates a new IN2 segment
089     */
090    public IN2(Group parent, ModelClassFactory factory) {
091       super(parent, factory);
092       init(factory);
093    }
094
095    private void init(ModelClassFactory factory) {
096       try {
097                                  this.add(ST.class, false, 1, 15, new Object[]{ getMessage() }, "Insured's employee ID");
098                                  this.add(ST.class, false, 1, 9, new Object[]{ getMessage() }, "Insured's social security number");
099                                  this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Insured's employer name");
100                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(139) }, "Employer information data");
101                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(137) }, "Mail claim party");
102                                  this.add(NM.class, false, 1, 15, new Object[]{ getMessage() }, "Medicare health insurance card number");
103                                  this.add(PN.class, false, 1, 48, new Object[]{ getMessage() }, "Medicaid case name");
104                                  this.add(NM.class, false, 1, 15, new Object[]{ getMessage() }, "Medicaid case number");
105                                  this.add(PN.class, false, 1, 48, new Object[]{ getMessage() }, "Champus sponsor name");
106                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Champus ID number");
107                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "Dependent of champus recipient");
108                                  this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Champus organization");
109                                  this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Champus station");
110                                              this.add(ID.class, false, 1, 14, new Object[]{ getMessage(), new Integer(140) }, "Champus service");
111                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(141) }, "Champus rank / grade");
112                                              this.add(ID.class, false, 1, 3, new Object[]{ getMessage(), new Integer(142) }, "Champus status");
113                                  this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Champus retire date");
114                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Champus non-availability certification on file");
115                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Baby coverage");
116                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Combine baby bill");
117                                  this.add(NM.class, false, 1, 1, new Object[]{ getMessage() }, "Blood deductible");
118                                  this.add(PN.class, false, 1, 48, new Object[]{ getMessage() }, "Special coverage approval name");
119                                  this.add(ST.class, false, 1, 30, new Object[]{ getMessage() }, "Special coverage approval title");
120                                              this.add(ID.class, false, 0, 8, new Object[]{ getMessage(), new Integer(143) }, "Non-covered insurance code");
121                                  this.add(ST.class, false, 1, 6, new Object[]{ getMessage() }, "Payor ID");
122                                  this.add(ST.class, false, 1, 6, new Object[]{ getMessage() }, "Payor subscriber ID");
123                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(144) }, "Eligibility source");
124                                  this.add(CM_RMC.class, false, 0, 25, new Object[]{ getMessage() }, "Room coverage type / amount");
125                                  this.add(CM_PTA.class, false, 0, 25, new Object[]{ getMessage() }, "Policy type / amount");
126                                  this.add(CM_DDI.class, false, 1, 25, new Object[]{ getMessage() }, "Daily deductible");
127       } catch(HL7Exception e) {
128          log.error("Unexpected error creating IN2 - this is probably a bug in the source code generator.", e);
129       }
130    }
131
132
133
134    /**
135     * Returns
136     * IN2-1: "Insured's employee ID" - creates it if necessary
137     */
138    public ST getInsuredSEmployeeID() { 
139                ST retVal = this.getTypedField(1, 0);
140                return retVal;
141    }
142    
143    /**
144     * Returns
145     * IN2-1: "Insured's employee ID" - creates it if necessary
146     */
147    public ST getIn21_InsuredSEmployeeID() { 
148                ST retVal = this.getTypedField(1, 0);
149                return retVal;
150    }
151
152
153
154    /**
155     * Returns
156     * IN2-2: "Insured's social security number" - creates it if necessary
157     */
158    public ST getInsuredSSocialSecurityNumber() { 
159                ST retVal = this.getTypedField(2, 0);
160                return retVal;
161    }
162    
163    /**
164     * Returns
165     * IN2-2: "Insured's social security number" - creates it if necessary
166     */
167    public ST getIn22_InsuredSSocialSecurityNumber() { 
168                ST retVal = this.getTypedField(2, 0);
169                return retVal;
170    }
171
172
173
174    /**
175     * Returns
176     * IN2-3: "Insured's employer name" - creates it if necessary
177     */
178    public CN getInsuredSEmployerName() { 
179                CN retVal = this.getTypedField(3, 0);
180                return retVal;
181    }
182    
183    /**
184     * Returns
185     * IN2-3: "Insured's employer name" - creates it if necessary
186     */
187    public CN getIn23_InsuredSEmployerName() { 
188                CN retVal = this.getTypedField(3, 0);
189                return retVal;
190    }
191
192
193
194    /**
195     * Returns
196     * IN2-4: "Employer information data" - creates it if necessary
197     */
198    public ID getEmployerInformationData() { 
199                ID retVal = this.getTypedField(4, 0);
200                return retVal;
201    }
202    
203    /**
204     * Returns
205     * IN2-4: "Employer information data" - creates it if necessary
206     */
207    public ID getIn24_EmployerInformationData() { 
208                ID retVal = this.getTypedField(4, 0);
209                return retVal;
210    }
211
212
213
214    /**
215     * Returns
216     * IN2-5: "Mail claim party" - creates it if necessary
217     */
218    public ID getMailClaimParty() { 
219                ID retVal = this.getTypedField(5, 0);
220                return retVal;
221    }
222    
223    /**
224     * Returns
225     * IN2-5: "Mail claim party" - creates it if necessary
226     */
227    public ID getIn25_MailClaimParty() { 
228                ID retVal = this.getTypedField(5, 0);
229                return retVal;
230    }
231
232
233
234    /**
235     * Returns
236     * IN2-6: "Medicare health insurance card number" - creates it if necessary
237     */
238    public NM getMedicareHealthInsuranceCardNumber() { 
239                NM retVal = this.getTypedField(6, 0);
240                return retVal;
241    }
242    
243    /**
244     * Returns
245     * IN2-6: "Medicare health insurance card number" - creates it if necessary
246     */
247    public NM getIn26_MedicareHealthInsuranceCardNumber() { 
248                NM retVal = this.getTypedField(6, 0);
249                return retVal;
250    }
251
252
253
254    /**
255     * Returns
256     * IN2-7: "Medicaid case name" - creates it if necessary
257     */
258    public PN getMedicaidCaseName() { 
259                PN retVal = this.getTypedField(7, 0);
260                return retVal;
261    }
262    
263    /**
264     * Returns
265     * IN2-7: "Medicaid case name" - creates it if necessary
266     */
267    public PN getIn27_MedicaidCaseName() { 
268                PN retVal = this.getTypedField(7, 0);
269                return retVal;
270    }
271
272
273
274    /**
275     * Returns
276     * IN2-8: "Medicaid case number" - creates it if necessary
277     */
278    public NM getMedicaidCaseNumber() { 
279                NM retVal = this.getTypedField(8, 0);
280                return retVal;
281    }
282    
283    /**
284     * Returns
285     * IN2-8: "Medicaid case number" - creates it if necessary
286     */
287    public NM getIn28_MedicaidCaseNumber() { 
288                NM retVal = this.getTypedField(8, 0);
289                return retVal;
290    }
291
292
293
294    /**
295     * Returns
296     * IN2-9: "Champus sponsor name" - creates it if necessary
297     */
298    public PN getChampusSponsorName() { 
299                PN retVal = this.getTypedField(9, 0);
300                return retVal;
301    }
302    
303    /**
304     * Returns
305     * IN2-9: "Champus sponsor name" - creates it if necessary
306     */
307    public PN getIn29_ChampusSponsorName() { 
308                PN retVal = this.getTypedField(9, 0);
309                return retVal;
310    }
311
312
313
314    /**
315     * Returns
316     * IN2-10: "Champus ID number" - creates it if necessary
317     */
318    public NM getChampusIDNumber() { 
319                NM retVal = this.getTypedField(10, 0);
320                return retVal;
321    }
322    
323    /**
324     * Returns
325     * IN2-10: "Champus ID number" - creates it if necessary
326     */
327    public NM getIn210_ChampusIDNumber() { 
328                NM retVal = this.getTypedField(10, 0);
329                return retVal;
330    }
331
332
333
334    /**
335     * Returns
336     * IN2-11: "Dependent of champus recipient" - creates it if necessary
337     */
338    public ID getDependentOfChampusRecipient() { 
339                ID retVal = this.getTypedField(11, 0);
340                return retVal;
341    }
342    
343    /**
344     * Returns
345     * IN2-11: "Dependent of champus recipient" - creates it if necessary
346     */
347    public ID getIn211_DependentOfChampusRecipient() { 
348                ID retVal = this.getTypedField(11, 0);
349                return retVal;
350    }
351
352
353
354    /**
355     * Returns
356     * IN2-12: "Champus organization" - creates it if necessary
357     */
358    public ST getChampusOrganization() { 
359                ST retVal = this.getTypedField(12, 0);
360                return retVal;
361    }
362    
363    /**
364     * Returns
365     * IN2-12: "Champus organization" - creates it if necessary
366     */
367    public ST getIn212_ChampusOrganization() { 
368                ST retVal = this.getTypedField(12, 0);
369                return retVal;
370    }
371
372
373
374    /**
375     * Returns
376     * IN2-13: "Champus station" - creates it if necessary
377     */
378    public ST getChampusStation() { 
379                ST retVal = this.getTypedField(13, 0);
380                return retVal;
381    }
382    
383    /**
384     * Returns
385     * IN2-13: "Champus station" - creates it if necessary
386     */
387    public ST getIn213_ChampusStation() { 
388                ST retVal = this.getTypedField(13, 0);
389                return retVal;
390    }
391
392
393
394    /**
395     * Returns
396     * IN2-14: "Champus service" - creates it if necessary
397     */
398    public ID getChampusService() { 
399                ID retVal = this.getTypedField(14, 0);
400                return retVal;
401    }
402    
403    /**
404     * Returns
405     * IN2-14: "Champus service" - creates it if necessary
406     */
407    public ID getIn214_ChampusService() { 
408                ID retVal = this.getTypedField(14, 0);
409                return retVal;
410    }
411
412
413
414    /**
415     * Returns
416     * IN2-15: "Champus rank / grade" - creates it if necessary
417     */
418    public ID getChampusRankGrade() { 
419                ID retVal = this.getTypedField(15, 0);
420                return retVal;
421    }
422    
423    /**
424     * Returns
425     * IN2-15: "Champus rank / grade" - creates it if necessary
426     */
427    public ID getIn215_ChampusRankGrade() { 
428                ID retVal = this.getTypedField(15, 0);
429                return retVal;
430    }
431
432
433
434    /**
435     * Returns
436     * IN2-16: "Champus status" - creates it if necessary
437     */
438    public ID getChampusStatus() { 
439                ID retVal = this.getTypedField(16, 0);
440                return retVal;
441    }
442    
443    /**
444     * Returns
445     * IN2-16: "Champus status" - creates it if necessary
446     */
447    public ID getIn216_ChampusStatus() { 
448                ID retVal = this.getTypedField(16, 0);
449                return retVal;
450    }
451
452
453
454    /**
455     * Returns
456     * IN2-17: "Champus retire date" - creates it if necessary
457     */
458    public DT getChampusRetireDate() { 
459                DT retVal = this.getTypedField(17, 0);
460                return retVal;
461    }
462    
463    /**
464     * Returns
465     * IN2-17: "Champus retire date" - creates it if necessary
466     */
467    public DT getIn217_ChampusRetireDate() { 
468                DT retVal = this.getTypedField(17, 0);
469                return retVal;
470    }
471
472
473
474    /**
475     * Returns
476     * IN2-18: "Champus non-availability certification on file" - creates it if necessary
477     */
478    public ID getChampusNonAvailabilityCertificationOnFile() { 
479                ID retVal = this.getTypedField(18, 0);
480                return retVal;
481    }
482    
483    /**
484     * Returns
485     * IN2-18: "Champus non-availability certification on file" - creates it if necessary
486     */
487    public ID getIn218_ChampusNonAvailabilityCertificationOnFile() { 
488                ID retVal = this.getTypedField(18, 0);
489                return retVal;
490    }
491
492
493
494    /**
495     * Returns
496     * IN2-19: "Baby coverage" - creates it if necessary
497     */
498    public ID getBabyCoverage() { 
499                ID retVal = this.getTypedField(19, 0);
500                return retVal;
501    }
502    
503    /**
504     * Returns
505     * IN2-19: "Baby coverage" - creates it if necessary
506     */
507    public ID getIn219_BabyCoverage() { 
508                ID retVal = this.getTypedField(19, 0);
509                return retVal;
510    }
511
512
513
514    /**
515     * Returns
516     * IN2-20: "Combine baby bill" - creates it if necessary
517     */
518    public ID getCombineBabyBill() { 
519                ID retVal = this.getTypedField(20, 0);
520                return retVal;
521    }
522    
523    /**
524     * Returns
525     * IN2-20: "Combine baby bill" - creates it if necessary
526     */
527    public ID getIn220_CombineBabyBill() { 
528                ID retVal = this.getTypedField(20, 0);
529                return retVal;
530    }
531
532
533
534    /**
535     * Returns
536     * IN2-21: "Blood deductible" - creates it if necessary
537     */
538    public NM getBloodDeductible() { 
539                NM retVal = this.getTypedField(21, 0);
540                return retVal;
541    }
542    
543    /**
544     * Returns
545     * IN2-21: "Blood deductible" - creates it if necessary
546     */
547    public NM getIn221_BloodDeductible() { 
548                NM retVal = this.getTypedField(21, 0);
549                return retVal;
550    }
551
552
553
554    /**
555     * Returns
556     * IN2-22: "Special coverage approval name" - creates it if necessary
557     */
558    public PN getSpecialCoverageApprovalName() { 
559                PN retVal = this.getTypedField(22, 0);
560                return retVal;
561    }
562    
563    /**
564     * Returns
565     * IN2-22: "Special coverage approval name" - creates it if necessary
566     */
567    public PN getIn222_SpecialCoverageApprovalName() { 
568                PN retVal = this.getTypedField(22, 0);
569                return retVal;
570    }
571
572
573
574    /**
575     * Returns
576     * IN2-23: "Special coverage approval title" - creates it if necessary
577     */
578    public ST getSpecialCoverageApprovalTitle() { 
579                ST retVal = this.getTypedField(23, 0);
580                return retVal;
581    }
582    
583    /**
584     * Returns
585     * IN2-23: "Special coverage approval title" - creates it if necessary
586     */
587    public ST getIn223_SpecialCoverageApprovalTitle() { 
588                ST retVal = this.getTypedField(23, 0);
589                return retVal;
590    }
591
592
593    /**
594     * Returns all repetitions of Non-covered insurance code (IN2-24).
595     */
596    public ID[] getNonCoveredInsuranceCode() {
597        ID[] retVal = this.getTypedField(24, new ID[0]);
598        return retVal;
599    }
600
601
602    /**
603     * Returns all repetitions of Non-covered insurance code (IN2-24).
604     */
605    public ID[] getIn224_NonCoveredInsuranceCode() {
606        ID[] retVal = this.getTypedField(24, new ID[0]);
607        return retVal;
608    }
609
610
611    /**
612     * Returns a count of the current number of repetitions of Non-covered insurance code (IN2-24).
613     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
614     * it will return zero.
615     */
616    public int getNonCoveredInsuranceCodeReps() {
617        return this.getReps(24);
618    }
619
620
621    /**
622     * Returns a specific repetition of
623     * IN2-24: "Non-covered insurance code" - creates it if necessary
624     *
625     * @param rep The repetition index (0-indexed)
626     */
627    public ID getNonCoveredInsuranceCode(int rep) { 
628                ID retVal = this.getTypedField(24, rep);
629                return retVal;
630    }
631
632    /**
633     * Returns a specific repetition of
634     * IN2-24: "Non-covered insurance code" - creates it if necessary
635     *
636     * @param rep The repetition index (0-indexed)
637     */
638    public ID getIn224_NonCoveredInsuranceCode(int rep) { 
639                ID retVal = this.getTypedField(24, rep);
640                return retVal;
641    }
642
643    /**
644     * Returns a count of the current number of repetitions of Non-covered insurance code (IN2-24).
645     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
646     * it will return zero.
647     */
648    public int getIn224_NonCoveredInsuranceCodeReps() {
649        return this.getReps(24);
650    }
651
652
653    /**
654     * Inserts a repetition of
655     * IN2-24: "Non-covered insurance code" at a specific index
656     *
657     * @param rep The repetition index (0-indexed)
658     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
659     */
660    public ID insertNonCoveredInsuranceCode(int rep) throws HL7Exception { 
661        return (ID) super.insertRepetition(24, rep);
662    }
663
664
665    /**
666     * Inserts a repetition of
667     * IN2-24: "Non-covered insurance code" at a specific index
668     *
669     * @param rep The repetition index (0-indexed)
670     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
671     */
672    public ID insertIn224_NonCoveredInsuranceCode(int rep) throws HL7Exception { 
673        return (ID) super.insertRepetition(24, rep);
674    }
675
676
677    /**
678     * Removes a repetition of
679     * IN2-24: "Non-covered insurance code" at a specific index
680     *
681     * @param rep The repetition index (0-indexed)
682     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
683     */
684    public ID removeNonCoveredInsuranceCode(int rep) throws HL7Exception { 
685        return (ID) super.removeRepetition(24, rep);
686    }
687
688
689    /**
690     * Removes a repetition of
691     * IN2-24: "Non-covered insurance code" at a specific index
692     *
693     * @param rep The repetition index (0-indexed)
694     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
695     */
696    public ID removeIn224_NonCoveredInsuranceCode(int rep) throws HL7Exception { 
697        return (ID) super.removeRepetition(24, rep);
698    }
699
700
701
702
703    /**
704     * Returns
705     * IN2-25: "Payor ID" - creates it if necessary
706     */
707    public ST getPayorID() { 
708                ST retVal = this.getTypedField(25, 0);
709                return retVal;
710    }
711    
712    /**
713     * Returns
714     * IN2-25: "Payor ID" - creates it if necessary
715     */
716    public ST getIn225_PayorID() { 
717                ST retVal = this.getTypedField(25, 0);
718                return retVal;
719    }
720
721
722
723    /**
724     * Returns
725     * IN2-26: "Payor subscriber ID" - creates it if necessary
726     */
727    public ST getPayorSubscriberID() { 
728                ST retVal = this.getTypedField(26, 0);
729                return retVal;
730    }
731    
732    /**
733     * Returns
734     * IN2-26: "Payor subscriber ID" - creates it if necessary
735     */
736    public ST getIn226_PayorSubscriberID() { 
737                ST retVal = this.getTypedField(26, 0);
738                return retVal;
739    }
740
741
742
743    /**
744     * Returns
745     * IN2-27: "Eligibility source" - creates it if necessary
746     */
747    public ID getEligibilitySource() { 
748                ID retVal = this.getTypedField(27, 0);
749                return retVal;
750    }
751    
752    /**
753     * Returns
754     * IN2-27: "Eligibility source" - creates it if necessary
755     */
756    public ID getIn227_EligibilitySource() { 
757                ID retVal = this.getTypedField(27, 0);
758                return retVal;
759    }
760
761
762    /**
763     * Returns all repetitions of Room coverage type / amount (IN2-28).
764     */
765    public CM_RMC[] getRoomCoverageTypeAmount() {
766        CM_RMC[] retVal = this.getTypedField(28, new CM_RMC[0]);
767        return retVal;
768    }
769
770
771    /**
772     * Returns all repetitions of Room coverage type / amount (IN2-28).
773     */
774    public CM_RMC[] getIn228_RoomCoverageTypeAmount() {
775        CM_RMC[] retVal = this.getTypedField(28, new CM_RMC[0]);
776        return retVal;
777    }
778
779
780    /**
781     * Returns a count of the current number of repetitions of Room coverage type / amount (IN2-28).
782     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
783     * it will return zero.
784     */
785    public int getRoomCoverageTypeAmountReps() {
786        return this.getReps(28);
787    }
788
789
790    /**
791     * Returns a specific repetition of
792     * IN2-28: "Room coverage type / amount" - creates it if necessary
793     *
794     * @param rep The repetition index (0-indexed)
795     */
796    public CM_RMC getRoomCoverageTypeAmount(int rep) { 
797                CM_RMC retVal = this.getTypedField(28, rep);
798                return retVal;
799    }
800
801    /**
802     * Returns a specific repetition of
803     * IN2-28: "Room coverage type / amount" - creates it if necessary
804     *
805     * @param rep The repetition index (0-indexed)
806     */
807    public CM_RMC getIn228_RoomCoverageTypeAmount(int rep) { 
808                CM_RMC retVal = this.getTypedField(28, rep);
809                return retVal;
810    }
811
812    /**
813     * Returns a count of the current number of repetitions of Room coverage type / amount (IN2-28).
814     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
815     * it will return zero.
816     */
817    public int getIn228_RoomCoverageTypeAmountReps() {
818        return this.getReps(28);
819    }
820
821
822    /**
823     * Inserts a repetition of
824     * IN2-28: "Room coverage type / amount" at a specific index
825     *
826     * @param rep The repetition index (0-indexed)
827     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
828     */
829    public CM_RMC insertRoomCoverageTypeAmount(int rep) throws HL7Exception { 
830        return (CM_RMC) super.insertRepetition(28, rep);
831    }
832
833
834    /**
835     * Inserts a repetition of
836     * IN2-28: "Room coverage type / amount" at a specific index
837     *
838     * @param rep The repetition index (0-indexed)
839     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
840     */
841    public CM_RMC insertIn228_RoomCoverageTypeAmount(int rep) throws HL7Exception { 
842        return (CM_RMC) super.insertRepetition(28, rep);
843    }
844
845
846    /**
847     * Removes a repetition of
848     * IN2-28: "Room coverage type / amount" at a specific index
849     *
850     * @param rep The repetition index (0-indexed)
851     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
852     */
853    public CM_RMC removeRoomCoverageTypeAmount(int rep) throws HL7Exception { 
854        return (CM_RMC) super.removeRepetition(28, rep);
855    }
856
857
858    /**
859     * Removes a repetition of
860     * IN2-28: "Room coverage type / amount" at a specific index
861     *
862     * @param rep The repetition index (0-indexed)
863     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
864     */
865    public CM_RMC removeIn228_RoomCoverageTypeAmount(int rep) throws HL7Exception { 
866        return (CM_RMC) super.removeRepetition(28, rep);
867    }
868
869
870
871    /**
872     * Returns all repetitions of Policy type / amount (IN2-29).
873     */
874    public CM_PTA[] getPolicyTypeAmount() {
875        CM_PTA[] retVal = this.getTypedField(29, new CM_PTA[0]);
876        return retVal;
877    }
878
879
880    /**
881     * Returns all repetitions of Policy type / amount (IN2-29).
882     */
883    public CM_PTA[] getIn229_PolicyTypeAmount() {
884        CM_PTA[] retVal = this.getTypedField(29, new CM_PTA[0]);
885        return retVal;
886    }
887
888
889    /**
890     * Returns a count of the current number of repetitions of Policy type / amount (IN2-29).
891     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
892     * it will return zero.
893     */
894    public int getPolicyTypeAmountReps() {
895        return this.getReps(29);
896    }
897
898
899    /**
900     * Returns a specific repetition of
901     * IN2-29: "Policy type / amount" - creates it if necessary
902     *
903     * @param rep The repetition index (0-indexed)
904     */
905    public CM_PTA getPolicyTypeAmount(int rep) { 
906                CM_PTA retVal = this.getTypedField(29, rep);
907                return retVal;
908    }
909
910    /**
911     * Returns a specific repetition of
912     * IN2-29: "Policy type / amount" - creates it if necessary
913     *
914     * @param rep The repetition index (0-indexed)
915     */
916    public CM_PTA getIn229_PolicyTypeAmount(int rep) { 
917                CM_PTA retVal = this.getTypedField(29, rep);
918                return retVal;
919    }
920
921    /**
922     * Returns a count of the current number of repetitions of Policy type / amount (IN2-29).
923     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
924     * it will return zero.
925     */
926    public int getIn229_PolicyTypeAmountReps() {
927        return this.getReps(29);
928    }
929
930
931    /**
932     * Inserts a repetition of
933     * IN2-29: "Policy type / amount" at a specific index
934     *
935     * @param rep The repetition index (0-indexed)
936     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
937     */
938    public CM_PTA insertPolicyTypeAmount(int rep) throws HL7Exception { 
939        return (CM_PTA) super.insertRepetition(29, rep);
940    }
941
942
943    /**
944     * Inserts a repetition of
945     * IN2-29: "Policy type / amount" at a specific index
946     *
947     * @param rep The repetition index (0-indexed)
948     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
949     */
950    public CM_PTA insertIn229_PolicyTypeAmount(int rep) throws HL7Exception { 
951        return (CM_PTA) super.insertRepetition(29, rep);
952    }
953
954
955    /**
956     * Removes a repetition of
957     * IN2-29: "Policy type / amount" at a specific index
958     *
959     * @param rep The repetition index (0-indexed)
960     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
961     */
962    public CM_PTA removePolicyTypeAmount(int rep) throws HL7Exception { 
963        return (CM_PTA) super.removeRepetition(29, rep);
964    }
965
966
967    /**
968     * Removes a repetition of
969     * IN2-29: "Policy type / amount" at a specific index
970     *
971     * @param rep The repetition index (0-indexed)
972     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
973     */
974    public CM_PTA removeIn229_PolicyTypeAmount(int rep) throws HL7Exception { 
975        return (CM_PTA) super.removeRepetition(29, rep);
976    }
977
978
979
980
981    /**
982     * Returns
983     * IN2-30: "Daily deductible" - creates it if necessary
984     */
985    public CM_DDI getDailyDeductible() { 
986                CM_DDI retVal = this.getTypedField(30, 0);
987                return retVal;
988    }
989    
990    /**
991     * Returns
992     * IN2-30: "Daily deductible" - creates it if necessary
993     */
994    public CM_DDI getIn230_DailyDeductible() { 
995                CM_DDI retVal = this.getTypedField(30, 0);
996                return retVal;
997    }
998
999
1000
1001
1002
1003    /** {@inheritDoc} */   
1004    protected Type createNewTypeWithoutReflection(int field) {
1005       switch (field) {
1006          case 0: return new ST(getMessage());
1007          case 1: return new ST(getMessage());
1008          case 2: return new CN(getMessage());
1009          case 3: return new ID(getMessage(), new Integer( 139 ));
1010          case 4: return new ID(getMessage(), new Integer( 137 ));
1011          case 5: return new NM(getMessage());
1012          case 6: return new PN(getMessage());
1013          case 7: return new NM(getMessage());
1014          case 8: return new PN(getMessage());
1015          case 9: return new NM(getMessage());
1016          case 10: return new ID(getMessage(), new Integer( 0 ));
1017          case 11: return new ST(getMessage());
1018          case 12: return new ST(getMessage());
1019          case 13: return new ID(getMessage(), new Integer( 140 ));
1020          case 14: return new ID(getMessage(), new Integer( 141 ));
1021          case 15: return new ID(getMessage(), new Integer( 142 ));
1022          case 16: return new DT(getMessage());
1023          case 17: return new ID(getMessage(), new Integer( 136 ));
1024          case 18: return new ID(getMessage(), new Integer( 136 ));
1025          case 19: return new ID(getMessage(), new Integer( 136 ));
1026          case 20: return new NM(getMessage());
1027          case 21: return new PN(getMessage());
1028          case 22: return new ST(getMessage());
1029          case 23: return new ID(getMessage(), new Integer( 143 ));
1030          case 24: return new ST(getMessage());
1031          case 25: return new ST(getMessage());
1032          case 26: return new ID(getMessage(), new Integer( 144 ));
1033          case 27: return new CM_RMC(getMessage());
1034          case 28: return new CM_PTA(getMessage());
1035          case 29: return new CM_DDI(getMessage());
1036          default: return null;
1037       }
1038   }
1039
1040
1041}
1042