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