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    
008    package ca.uhn.hl7v2.model.v24.segment;
009    
010    // import ca.uhn.hl7v2.model.v24.group.*;
011    import ca.uhn.hl7v2.model.v24.datatype.*;
012    import ca.uhn.log.HapiLogFactory;
013    import ca.uhn.hl7v2.HL7Exception;
014    import ca.uhn.hl7v2.parser.ModelClassFactory;
015    import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
016    import ca.uhn.hl7v2.model.AbstractMessage;
017    import ca.uhn.hl7v2.model.Group;
018    import ca.uhn.hl7v2.model.Type;
019    import ca.uhn.hl7v2.model.AbstractSegment;
020    import ca.uhn.hl7v2.model.Varies;
021    
022    /**
023     *<p>Represents an HL7 IN2 message segment (Insurance Additional Information). 
024     * This segment has the following fields:</p>
025     * <ul>
026         * <li>IN2-1: Insured's Employee ID (CX) <b>optional repeating</b>
027         * <li>IN2-2: Insured's Social Security Number (ST) <b>optional </b>
028         * <li>IN2-3: Insured's Employer's Name and ID (XCN) <b>optional repeating</b>
029         * <li>IN2-4: Employer Information Data (IS) <b>optional </b>
030         * <li>IN2-5: Mail Claim Party (IS) <b>optional repeating</b>
031         * <li>IN2-6: Medicare Health Ins Card Number (ST) <b>optional </b>
032         * <li>IN2-7: Medicaid Case Name (XPN) <b>optional repeating</b>
033         * <li>IN2-8: Medicaid Case Number (ST) <b>optional </b>
034         * <li>IN2-9: Military Sponsor Name (XPN) <b>optional repeating</b>
035         * <li>IN2-10: Military ID Number (ST) <b>optional </b>
036         * <li>IN2-11: Dependent Of Military Recipient (CE) <b>optional </b>
037         * <li>IN2-12: Military Organization (ST) <b>optional </b>
038         * <li>IN2-13: Military Station (ST) <b>optional </b>
039         * <li>IN2-14: Military Service (IS) <b>optional </b>
040         * <li>IN2-15: Military Rank/Grade (IS) <b>optional </b>
041         * <li>IN2-16: Military Status (IS) <b>optional </b>
042         * <li>IN2-17: Military Retire Date (DT) <b>optional </b>
043         * <li>IN2-18: Military Non-Avail Cert On File (ID) <b>optional </b>
044         * <li>IN2-19: Baby Coverage (ID) <b>optional </b>
045         * <li>IN2-20: Combine Baby Bill (ID) <b>optional </b>
046         * <li>IN2-21: Blood Deductible (ST) <b>optional </b>
047         * <li>IN2-22: Special Coverage Approval Name (XPN) <b>optional repeating</b>
048         * <li>IN2-23: Special Coverage Approval Title (ST) <b>optional </b>
049         * <li>IN2-24: Non-Covered Insurance Code (IS) <b>optional repeating</b>
050         * <li>IN2-25: Payor ID (CX) <b>optional repeating</b>
051         * <li>IN2-26: Payor Subscriber ID (CX) <b>optional repeating</b>
052         * <li>IN2-27: Eligibility Source (IS) <b>optional </b>
053         * <li>IN2-28: Room Coverage Type/Amount (RMC) <b>optional repeating</b>
054         * <li>IN2-29: Policy Type/Amount (PTA) <b>optional repeating</b>
055         * <li>IN2-30: Daily Deductible (DDI) <b>optional </b>
056         * <li>IN2-31: Living Dependency (IS) <b>optional </b>
057         * <li>IN2-32: Ambulatory Status (IS) <b>optional repeating</b>
058         * <li>IN2-33: Citizenship (CE) <b>optional repeating</b>
059         * <li>IN2-34: Primary Language (CE) <b>optional </b>
060         * <li>IN2-35: Living Arrangement (IS) <b>optional </b>
061         * <li>IN2-36: Publicity Code (CE) <b>optional </b>
062         * <li>IN2-37: Protection Indicator (ID) <b>optional </b>
063         * <li>IN2-38: Student Indicator (IS) <b>optional </b>
064         * <li>IN2-39: Religion (CE) <b>optional </b>
065         * <li>IN2-40: Mother's Maiden Name (XPN) <b>optional repeating</b>
066         * <li>IN2-41: Nationality (CE) <b>optional </b>
067         * <li>IN2-42: Ethnic Group (CE) <b>optional repeating</b>
068         * <li>IN2-43: Marital Status (CE) <b>optional repeating</b>
069         * <li>IN2-44: Insured's Employment Start Date (DT) <b>optional </b>
070         * <li>IN2-45: Employment Stop Date (DT) <b>optional </b>
071         * <li>IN2-46: Job Title (ST) <b>optional </b>
072         * <li>IN2-47: Job Code/Class (JCC) <b>optional </b>
073         * <li>IN2-48: Job Status (IS) <b>optional </b>
074         * <li>IN2-49: Employer Contact Person Name (XPN) <b>optional repeating</b>
075         * <li>IN2-50: Employer Contact Person Phone Number (XTN) <b>optional repeating</b>
076         * <li>IN2-51: Employer Contact Reason (IS) <b>optional </b>
077         * <li>IN2-52: Insured's Contact Person's Name (XPN) <b>optional repeating</b>
078         * <li>IN2-53: Insured's Contact Person Phone Number (XTN) <b>optional repeating</b>
079         * <li>IN2-54: Insured's Contact Person Reason (IS) <b>optional repeating</b>
080         * <li>IN2-55: Relationship To The Patient Start Date (DT) <b>optional </b>
081         * <li>IN2-56: Relationship To The Patient Stop Date (DT) <b>optional repeating</b>
082         * <li>IN2-57: Insurance Co. Contact Reason (IS) <b>optional </b>
083         * <li>IN2-58: Insurance Co Contact Phone Number (XTN) <b>optional </b>
084         * <li>IN2-59: Policy Scope (IS) <b>optional </b>
085         * <li>IN2-60: Policy Source (IS) <b>optional </b>
086         * <li>IN2-61: Patient Member Number (CX) <b>optional </b>
087         * <li>IN2-62: Guarantor's Relationship To Insured (CE) <b>optional </b>
088         * <li>IN2-63: Insured's Phone Number - Home (XTN) <b>optional repeating</b>
089         * <li>IN2-64: Insured's Employer Phone Number (XTN) <b>optional repeating</b>
090         * <li>IN2-65: Military Handicapped Program (CE) <b>optional </b>
091         * <li>IN2-66: Suspend Flag (ID) <b>optional </b>
092         * <li>IN2-67: Copay Limit Flag (ID) <b>optional </b>
093         * <li>IN2-68: Stoploss Limit Flag (ID) <b>optional </b>
094         * <li>IN2-69: Insured Organization Name And ID (XON) <b>optional repeating</b>
095         * <li>IN2-70: Insured Employer Organization Name And ID (XON) <b>optional repeating</b>
096         * <li>IN2-71: Race (CE) <b>optional repeating</b>
097         * <li>IN2-72: HCFA Patient's Relationship to Insured (CE) <b>optional </b>
098     * </ul>
099     */
100    public class IN2 extends AbstractSegment {
101    
102        /** 
103         * Creates a new IN2 segment
104         */
105        public IN2(Group parent, ModelClassFactory factory) {
106           super(parent, factory);
107           init(factory);
108        }
109    
110        private void init(ModelClassFactory factory) {
111           try {
112                                      this.add(CX.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Insured's Employee ID");
113                                      this.add(ST.class, false, 1, 11, new Object[]{ getMessage(), new Integer(0) }, "Insured's Social Security Number");
114                                      this.add(XCN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Insured's Employer's Name and ID");
115                                      this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Employer Information Data");
116                                      this.add(IS.class, false, 0, 1, new Object[]{ getMessage() }, "Mail Claim Party");
117                                      this.add(ST.class, false, 1, 15, new Object[]{ getMessage(), new Integer(0) }, "Medicare Health Ins Card Number");
118                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Medicaid Case Name");
119                                      this.add(ST.class, false, 1, 15, new Object[]{ getMessage(), new Integer(0) }, "Medicaid Case Number");
120                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Military Sponsor Name");
121                                      this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Military ID Number");
122                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(342) }, "Dependent Of Military Recipient");
123                                      this.add(ST.class, false, 1, 25, new Object[]{ getMessage(), new Integer(0) }, "Military Organization");
124                                      this.add(ST.class, false, 1, 25, new Object[]{ getMessage(), new Integer(0) }, "Military Station");
125                                      this.add(IS.class, false, 1, 14, new Object[]{ getMessage() }, "Military Service");
126                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Military Rank/Grade");
127                                      this.add(IS.class, false, 1, 3, new Object[]{ getMessage() }, "Military Status");
128                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Military Retire Date");
129                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Military Non-Avail Cert On File");
130                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Baby Coverage");
131                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Combine Baby Bill");
132                                      this.add(ST.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "Blood Deductible");
133                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Special Coverage Approval Name");
134                                      this.add(ST.class, false, 1, 30, new Object[]{ getMessage(), new Integer(0) }, "Special Coverage Approval Title");
135                                      this.add(IS.class, false, 0, 8, new Object[]{ getMessage() }, "Non-Covered Insurance Code");
136                                      this.add(CX.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Payor ID");
137                                      this.add(CX.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Payor Subscriber ID");
138                                      this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Eligibility Source");
139                                      this.add(RMC.class, false, 0, 250, new Object[]{ getMessage(), new Integer(145) }, "Room Coverage Type/Amount");
140                                      this.add(PTA.class, false, 0, 250, new Object[]{ getMessage(), new Integer(147) }, "Policy Type/Amount");
141                                      this.add(DDI.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Daily Deductible");
142                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Living Dependency");
143                                      this.add(IS.class, false, 0, 2, new Object[]{ getMessage() }, "Ambulatory Status");
144                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(171) }, "Citizenship");
145                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(296) }, "Primary Language");
146                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Living Arrangement");
147                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(215) }, "Publicity Code");
148                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Protection Indicator");
149                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Student Indicator");
150                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(6) }, "Religion");
151                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Mother's Maiden Name");
152                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(212) }, "Nationality");
153                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(189) }, "Ethnic Group");
154                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(2) }, "Marital Status");
155                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Insured's Employment Start Date");
156                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Employment Stop Date");
157                                      this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Job Title");
158                                      this.add(JCC.class, false, 1, 20, new Object[]{ getMessage(), new Integer(327) }, "Job Code/Class");
159                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Job Status");
160                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Employer Contact Person Name");
161                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Employer Contact Person Phone Number");
162                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Employer Contact Reason");
163                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Insured's Contact Person's Name");
164                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Insured's Contact Person Phone Number");
165                                      this.add(IS.class, false, 0, 2, new Object[]{ getMessage() }, "Insured's Contact Person Reason");
166                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Relationship To The Patient Start Date");
167                                      this.add(DT.class, false, 0, 8, new Object[]{ getMessage(), new Integer(0) }, "Relationship To The Patient Stop Date");
168                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Insurance Co. Contact Reason");
169                                      this.add(XTN.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Insurance Co Contact Phone Number");
170                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Policy Scope");
171                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Policy Source");
172                                      this.add(CX.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Patient Member Number");
173                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(63) }, "Guarantor's Relationship To Insured");
174                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Insured's Phone Number - Home");
175                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Insured's Employer Phone Number");
176                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(343) }, "Military Handicapped Program");
177                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Suspend Flag");
178                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Copay Limit Flag");
179                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Stoploss Limit Flag");
180                                      this.add(XON.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Insured Organization Name And ID");
181                                      this.add(XON.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Insured Employer Organization Name And ID");
182                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(5) }, "Race");
183                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(344) }, "HCFA Patient's Relationship to Insured");
184           } catch(HL7Exception e) {
185              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating IN2 - this is probably a bug in the source code generator.", e);
186           }
187        }
188    
189    
190        /**
191         * Returns all repetitions of Insured's Employee ID (IN2-1).
192         */
193        public CX[] getInsuredSEmployeeID() {
194            CX[] ret = null;
195            try {
196                Type[] t = this.getField(1);  
197                ret = new CX[t.length];
198                for (int i = 0; i < ret.length; i++) {
199                    ret[i] = (CX)t[i];
200                }
201            } catch (ClassCastException cce) {
202                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
203                throw new RuntimeException(cce);
204            } catch (HL7Exception he) {
205                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
206                throw new RuntimeException(he);
207            }
208            return ret;
209        }
210    
211    
212        /**
213         * Returns a count of the current number of repetitions of Insured's Employee ID (IN2-1).
214         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
215         * it will return zero.
216         */
217        public int getInsuredSEmployeeIDReps() {
218            CX[] ret = null;
219            try {
220                Type[] t = this.getField(1);
221                return t.length;  
222            } catch (ClassCastException cce) {
223                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
224                throw new RuntimeException(cce);
225            } catch (HL7Exception he) {
226                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
227                throw new RuntimeException(he);
228            }
229        }
230    
231    
232        /**
233         * Returns a specific repetition of
234         * IN2-1: "Insured's Employee ID" - creates it if necessary
235         *
236         * @param rep The repetition index (0-indexed)
237         */
238        public CX getInsuredSEmployeeID(int rep) { 
239            CX ret = null;
240            try {
241                Type t = this.getField(1, rep);
242                ret = (CX)t;
243            } catch (ClassCastException cce) {
244                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
245                throw new RuntimeException(cce);
246            } catch (HL7Exception he) {
247                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
248                throw new RuntimeException(he);
249            }
250            return ret;
251        }
252    
253        /**
254         * Returns a specific repetition of
255         * IN2-1: "Insured's Employee ID" - creates it if necessary
256         *
257         * @param rep The repetition index (0-indexed)
258         */
259        public CX getIn21_InsuredSEmployeeID(int rep) { 
260            CX ret = null;
261            try {
262                Type t = this.getField(1, rep);
263                ret = (CX)t;
264            } catch (ClassCastException cce) {
265                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
266                throw new RuntimeException(cce);
267            } catch (HL7Exception he) {
268                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
269                throw new RuntimeException(he);
270            }
271            return ret;
272        }
273    
274    
275        /**
276         * Returns a count of the current number of repetitions of Insured's Employee ID (IN2-1).
277         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
278         * it will return zero.
279         */
280        public int getIn21_InsuredSEmployeeIDReps() {
281            CX[] ret = null;
282            try {
283                Type[] t = this.getField(1);
284                return t.length;  
285            } catch (ClassCastException cce) {
286                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
287                throw new RuntimeException(cce);
288            } catch (HL7Exception he) {
289                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
290                throw new RuntimeException(he);
291            }
292        }
293    
294    
295    
296        /**
297         * Inserts a repetition of
298         * IN2-1: "Insured's Employee ID" at a specific index
299         *
300         * @param rep The repetition index (0-indexed)
301         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
302         */
303        public CX insertInsuredSEmployeeID(int rep) throws HL7Exception { 
304            return (CX) super.insertRepetition(1, rep);
305        }
306    
307    
308    
309        /**
310         * Inserts a repetition of
311         * IN2-1: "Insured's Employee ID" at a specific index
312         *
313         * @param rep The repetition index (0-indexed)
314         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
315         */
316        public CX insertIn21_InsuredSEmployeeID(int rep) throws HL7Exception { 
317            return (CX) super.insertRepetition(1, rep);
318        }
319    
320    
321        /**
322         * Removes a repetition of
323         * IN2-1: "Insured's Employee ID" at a specific index
324         *
325         * @param rep The repetition index (0-indexed)
326         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
327         */
328        public CX removeInsuredSEmployeeID(int rep) throws HL7Exception { 
329            return (CX) super.removeRepetition(1, rep);
330        }
331    
332    
333        /**
334         * Removes a repetition of
335         * IN2-1: "Insured's Employee ID" at a specific index
336         *
337         * @param rep The repetition index (0-indexed)
338         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
339         */
340        public CX removeIn21_InsuredSEmployeeID(int rep) throws HL7Exception { 
341            return (CX) super.removeRepetition(1, rep);
342        }
343    
344    
345    
346    
347        /**
348         * Returns
349         * IN2-2: "Insured's Social Security Number" - creates it if necessary
350         */
351        public ST getInsuredSSocialSecurityNumber() { 
352            ST ret = null;
353            try {
354                Type t = this.getField(2, 0);
355                ret = (ST)t;
356            } catch (ClassCastException cce) {
357                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
358                throw new RuntimeException(cce);
359            } catch (HL7Exception he) {
360                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
361                throw new RuntimeException(he);
362            }
363            return ret;
364        }
365    
366    
367        /**
368         * Returns
369         * IN2-2: "Insured's Social Security Number" - creates it if necessary
370         */
371        public ST getIn22_InsuredSSocialSecurityNumber() { 
372            ST ret = null;
373            try {
374                Type t = this.getField(2, 0);
375                ret = (ST)t;
376            } catch (ClassCastException cce) {
377                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
378                throw new RuntimeException(cce);
379            } catch (HL7Exception he) {
380                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
381                throw new RuntimeException(he);
382            }
383            return ret;
384        }
385    
386    
387        /**
388         * Returns all repetitions of Insured's Employer's Name and ID (IN2-3).
389         */
390        public XCN[] getInsuredSEmployerSNameAndID() {
391            XCN[] ret = null;
392            try {
393                Type[] t = this.getField(3);  
394                ret = new XCN[t.length];
395                for (int i = 0; i < ret.length; i++) {
396                    ret[i] = (XCN)t[i];
397                }
398            } catch (ClassCastException cce) {
399                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
400                throw new RuntimeException(cce);
401            } catch (HL7Exception he) {
402                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
403                throw new RuntimeException(he);
404            }
405            return ret;
406        }
407    
408    
409        /**
410         * Returns a count of the current number of repetitions of Insured's Employer's Name and ID (IN2-3).
411         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
412         * it will return zero.
413         */
414        public int getInsuredSEmployerSNameAndIDReps() {
415            XCN[] ret = null;
416            try {
417                Type[] t = this.getField(3);
418                return t.length;  
419            } catch (ClassCastException cce) {
420                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
421                throw new RuntimeException(cce);
422            } catch (HL7Exception he) {
423                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
424                throw new RuntimeException(he);
425            }
426        }
427    
428    
429        /**
430         * Returns a specific repetition of
431         * IN2-3: "Insured's Employer's Name and ID" - creates it if necessary
432         *
433         * @param rep The repetition index (0-indexed)
434         */
435        public XCN getInsuredSEmployerSNameAndID(int rep) { 
436            XCN ret = null;
437            try {
438                Type t = this.getField(3, rep);
439                ret = (XCN)t;
440            } catch (ClassCastException cce) {
441                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
442                throw new RuntimeException(cce);
443            } catch (HL7Exception he) {
444                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
445                throw new RuntimeException(he);
446            }
447            return ret;
448        }
449    
450        /**
451         * Returns a specific repetition of
452         * IN2-3: "Insured's Employer's Name and ID" - creates it if necessary
453         *
454         * @param rep The repetition index (0-indexed)
455         */
456        public XCN getIn23_InsuredSEmployerSNameAndID(int rep) { 
457            XCN ret = null;
458            try {
459                Type t = this.getField(3, rep);
460                ret = (XCN)t;
461            } catch (ClassCastException cce) {
462                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
463                throw new RuntimeException(cce);
464            } catch (HL7Exception he) {
465                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
466                throw new RuntimeException(he);
467            }
468            return ret;
469        }
470    
471    
472        /**
473         * Returns a count of the current number of repetitions of Insured's Employer's Name and ID (IN2-3).
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 getIn23_InsuredSEmployerSNameAndIDReps() {
478            XCN[] ret = null;
479            try {
480                Type[] t = this.getField(3);
481                return t.length;  
482            } catch (ClassCastException cce) {
483                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
484                throw new RuntimeException(cce);
485            } catch (HL7Exception he) {
486                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
487                throw new RuntimeException(he);
488            }
489        }
490    
491    
492    
493        /**
494         * Inserts a repetition of
495         * IN2-3: "Insured's Employer's Name and ID" at a specific index
496         *
497         * @param rep The repetition index (0-indexed)
498         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
499         */
500        public XCN insertInsuredSEmployerSNameAndID(int rep) throws HL7Exception { 
501            return (XCN) super.insertRepetition(3, rep);
502        }
503    
504    
505    
506        /**
507         * Inserts a repetition of
508         * IN2-3: "Insured's Employer's Name and ID" 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 XCN insertIn23_InsuredSEmployerSNameAndID(int rep) throws HL7Exception { 
514            return (XCN) super.insertRepetition(3, rep);
515        }
516    
517    
518        /**
519         * Removes a repetition of
520         * IN2-3: "Insured's Employer's Name and ID" 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 XCN removeInsuredSEmployerSNameAndID(int rep) throws HL7Exception { 
526            return (XCN) super.removeRepetition(3, rep);
527        }
528    
529    
530        /**
531         * Removes a repetition of
532         * IN2-3: "Insured's Employer's Name and ID" at a specific index
533         *
534         * @param rep The repetition index (0-indexed)
535         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
536         */
537        public XCN removeIn23_InsuredSEmployerSNameAndID(int rep) throws HL7Exception { 
538            return (XCN) super.removeRepetition(3, rep);
539        }
540    
541    
542    
543    
544        /**
545         * Returns
546         * IN2-4: "Employer Information Data" - creates it if necessary
547         */
548        public IS getEmployerInformationData() { 
549            IS ret = null;
550            try {
551                Type t = this.getField(4, 0);
552                ret = (IS)t;
553            } catch (ClassCastException cce) {
554                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
555                throw new RuntimeException(cce);
556            } catch (HL7Exception he) {
557                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
558                throw new RuntimeException(he);
559            }
560            return ret;
561        }
562    
563    
564        /**
565         * Returns
566         * IN2-4: "Employer Information Data" - creates it if necessary
567         */
568        public IS getIn24_EmployerInformationData() { 
569            IS ret = null;
570            try {
571                Type t = this.getField(4, 0);
572                ret = (IS)t;
573            } catch (ClassCastException cce) {
574                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
575                throw new RuntimeException(cce);
576            } catch (HL7Exception he) {
577                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
578                throw new RuntimeException(he);
579            }
580            return ret;
581        }
582    
583    
584        /**
585         * Returns all repetitions of Mail Claim Party (IN2-5).
586         */
587        public IS[] getMailClaimParty() {
588            IS[] ret = null;
589            try {
590                Type[] t = this.getField(5);  
591                ret = new IS[t.length];
592                for (int i = 0; i < ret.length; i++) {
593                    ret[i] = (IS)t[i];
594                }
595            } catch (ClassCastException cce) {
596                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
597                throw new RuntimeException(cce);
598            } catch (HL7Exception he) {
599                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
600                throw new RuntimeException(he);
601            }
602            return ret;
603        }
604    
605    
606        /**
607         * Returns a count of the current number of repetitions of Mail Claim Party (IN2-5).
608         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
609         * it will return zero.
610         */
611        public int getMailClaimPartyReps() {
612            IS[] ret = null;
613            try {
614                Type[] t = this.getField(5);
615                return t.length;  
616            } catch (ClassCastException cce) {
617                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
618                throw new RuntimeException(cce);
619            } catch (HL7Exception he) {
620                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
621                throw new RuntimeException(he);
622            }
623        }
624    
625    
626        /**
627         * Returns a specific repetition of
628         * IN2-5: "Mail Claim Party" - creates it if necessary
629         *
630         * @param rep The repetition index (0-indexed)
631         */
632        public IS getMailClaimParty(int rep) { 
633            IS ret = null;
634            try {
635                Type t = this.getField(5, rep);
636                ret = (IS)t;
637            } catch (ClassCastException cce) {
638                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
639                throw new RuntimeException(cce);
640            } catch (HL7Exception he) {
641                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
642                throw new RuntimeException(he);
643            }
644            return ret;
645        }
646    
647        /**
648         * Returns a specific repetition of
649         * IN2-5: "Mail Claim Party" - creates it if necessary
650         *
651         * @param rep The repetition index (0-indexed)
652         */
653        public IS getIn25_MailClaimParty(int rep) { 
654            IS ret = null;
655            try {
656                Type t = this.getField(5, rep);
657                ret = (IS)t;
658            } catch (ClassCastException cce) {
659                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
660                throw new RuntimeException(cce);
661            } catch (HL7Exception he) {
662                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
663                throw new RuntimeException(he);
664            }
665            return ret;
666        }
667    
668    
669        /**
670         * Returns a count of the current number of repetitions of Mail Claim Party (IN2-5).
671         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
672         * it will return zero.
673         */
674        public int getIn25_MailClaimPartyReps() {
675            IS[] ret = null;
676            try {
677                Type[] t = this.getField(5);
678                return t.length;  
679            } catch (ClassCastException cce) {
680                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
681                throw new RuntimeException(cce);
682            } catch (HL7Exception he) {
683                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
684                throw new RuntimeException(he);
685            }
686        }
687    
688    
689    
690        /**
691         * Inserts a repetition of
692         * IN2-5: "Mail Claim Party" at a specific index
693         *
694         * @param rep The repetition index (0-indexed)
695         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
696         */
697        public IS insertMailClaimParty(int rep) throws HL7Exception { 
698            return (IS) super.insertRepetition(5, rep);
699        }
700    
701    
702    
703        /**
704         * Inserts a repetition of
705         * IN2-5: "Mail Claim Party" at a specific index
706         *
707         * @param rep The repetition index (0-indexed)
708         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
709         */
710        public IS insertIn25_MailClaimParty(int rep) throws HL7Exception { 
711            return (IS) super.insertRepetition(5, rep);
712        }
713    
714    
715        /**
716         * Removes a repetition of
717         * IN2-5: "Mail Claim Party" at a specific index
718         *
719         * @param rep The repetition index (0-indexed)
720         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
721         */
722        public IS removeMailClaimParty(int rep) throws HL7Exception { 
723            return (IS) super.removeRepetition(5, rep);
724        }
725    
726    
727        /**
728         * Removes a repetition of
729         * IN2-5: "Mail Claim Party" at a specific index
730         *
731         * @param rep The repetition index (0-indexed)
732         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
733         */
734        public IS removeIn25_MailClaimParty(int rep) throws HL7Exception { 
735            return (IS) super.removeRepetition(5, rep);
736        }
737    
738    
739    
740    
741        /**
742         * Returns
743         * IN2-6: "Medicare Health Ins Card Number" - creates it if necessary
744         */
745        public ST getMedicareHealthInsCardNumber() { 
746            ST ret = null;
747            try {
748                Type t = this.getField(6, 0);
749                ret = (ST)t;
750            } catch (ClassCastException cce) {
751                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
752                throw new RuntimeException(cce);
753            } catch (HL7Exception he) {
754                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
755                throw new RuntimeException(he);
756            }
757            return ret;
758        }
759    
760    
761        /**
762         * Returns
763         * IN2-6: "Medicare Health Ins Card Number" - creates it if necessary
764         */
765        public ST getIn26_MedicareHealthInsCardNumber() { 
766            ST ret = null;
767            try {
768                Type t = this.getField(6, 0);
769                ret = (ST)t;
770            } catch (ClassCastException cce) {
771                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
772                throw new RuntimeException(cce);
773            } catch (HL7Exception he) {
774                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
775                throw new RuntimeException(he);
776            }
777            return ret;
778        }
779    
780    
781        /**
782         * Returns all repetitions of Medicaid Case Name (IN2-7).
783         */
784        public XPN[] getMedicaidCaseName() {
785            XPN[] ret = null;
786            try {
787                Type[] t = this.getField(7);  
788                ret = new XPN[t.length];
789                for (int i = 0; i < ret.length; i++) {
790                    ret[i] = (XPN)t[i];
791                }
792            } catch (ClassCastException cce) {
793                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
794                throw new RuntimeException(cce);
795            } catch (HL7Exception he) {
796                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
797                throw new RuntimeException(he);
798            }
799            return ret;
800        }
801    
802    
803        /**
804         * Returns a count of the current number of repetitions of Medicaid Case Name (IN2-7).
805         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
806         * it will return zero.
807         */
808        public int getMedicaidCaseNameReps() {
809            XPN[] ret = null;
810            try {
811                Type[] t = this.getField(7);
812                return t.length;  
813            } catch (ClassCastException cce) {
814                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
815                throw new RuntimeException(cce);
816            } catch (HL7Exception he) {
817                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
818                throw new RuntimeException(he);
819            }
820        }
821    
822    
823        /**
824         * Returns a specific repetition of
825         * IN2-7: "Medicaid Case Name" - creates it if necessary
826         *
827         * @param rep The repetition index (0-indexed)
828         */
829        public XPN getMedicaidCaseName(int rep) { 
830            XPN ret = null;
831            try {
832                Type t = this.getField(7, rep);
833                ret = (XPN)t;
834            } catch (ClassCastException cce) {
835                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
836                throw new RuntimeException(cce);
837            } catch (HL7Exception he) {
838                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
839                throw new RuntimeException(he);
840            }
841            return ret;
842        }
843    
844        /**
845         * Returns a specific repetition of
846         * IN2-7: "Medicaid Case Name" - creates it if necessary
847         *
848         * @param rep The repetition index (0-indexed)
849         */
850        public XPN getIn27_MedicaidCaseName(int rep) { 
851            XPN ret = null;
852            try {
853                Type t = this.getField(7, rep);
854                ret = (XPN)t;
855            } catch (ClassCastException cce) {
856                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
857                throw new RuntimeException(cce);
858            } catch (HL7Exception he) {
859                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
860                throw new RuntimeException(he);
861            }
862            return ret;
863        }
864    
865    
866        /**
867         * Returns a count of the current number of repetitions of Medicaid Case Name (IN2-7).
868         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
869         * it will return zero.
870         */
871        public int getIn27_MedicaidCaseNameReps() {
872            XPN[] ret = null;
873            try {
874                Type[] t = this.getField(7);
875                return t.length;  
876            } catch (ClassCastException cce) {
877                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
878                throw new RuntimeException(cce);
879            } catch (HL7Exception he) {
880                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
881                throw new RuntimeException(he);
882            }
883        }
884    
885    
886    
887        /**
888         * Inserts a repetition of
889         * IN2-7: "Medicaid Case Name" at a specific index
890         *
891         * @param rep The repetition index (0-indexed)
892         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
893         */
894        public XPN insertMedicaidCaseName(int rep) throws HL7Exception { 
895            return (XPN) super.insertRepetition(7, rep);
896        }
897    
898    
899    
900        /**
901         * Inserts a repetition of
902         * IN2-7: "Medicaid Case Name" at a specific index
903         *
904         * @param rep The repetition index (0-indexed)
905         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
906         */
907        public XPN insertIn27_MedicaidCaseName(int rep) throws HL7Exception { 
908            return (XPN) super.insertRepetition(7, rep);
909        }
910    
911    
912        /**
913         * Removes a repetition of
914         * IN2-7: "Medicaid Case Name" at a specific index
915         *
916         * @param rep The repetition index (0-indexed)
917         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
918         */
919        public XPN removeMedicaidCaseName(int rep) throws HL7Exception { 
920            return (XPN) super.removeRepetition(7, rep);
921        }
922    
923    
924        /**
925         * Removes a repetition of
926         * IN2-7: "Medicaid Case Name" at a specific index
927         *
928         * @param rep The repetition index (0-indexed)
929         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
930         */
931        public XPN removeIn27_MedicaidCaseName(int rep) throws HL7Exception { 
932            return (XPN) super.removeRepetition(7, rep);
933        }
934    
935    
936    
937    
938        /**
939         * Returns
940         * IN2-8: "Medicaid Case Number" - creates it if necessary
941         */
942        public ST getMedicaidCaseNumber() { 
943            ST ret = null;
944            try {
945                Type t = this.getField(8, 0);
946                ret = (ST)t;
947            } catch (ClassCastException cce) {
948                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
949                throw new RuntimeException(cce);
950            } catch (HL7Exception he) {
951                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
952                throw new RuntimeException(he);
953            }
954            return ret;
955        }
956    
957    
958        /**
959         * Returns
960         * IN2-8: "Medicaid Case Number" - creates it if necessary
961         */
962        public ST getIn28_MedicaidCaseNumber() { 
963            ST ret = null;
964            try {
965                Type t = this.getField(8, 0);
966                ret = (ST)t;
967            } catch (ClassCastException cce) {
968                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
969                throw new RuntimeException(cce);
970            } catch (HL7Exception he) {
971                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
972                throw new RuntimeException(he);
973            }
974            return ret;
975        }
976    
977    
978        /**
979         * Returns all repetitions of Military Sponsor Name (IN2-9).
980         */
981        public XPN[] getMilitarySponsorName() {
982            XPN[] ret = null;
983            try {
984                Type[] t = this.getField(9);  
985                ret = new XPN[t.length];
986                for (int i = 0; i < ret.length; i++) {
987                    ret[i] = (XPN)t[i];
988                }
989            } catch (ClassCastException cce) {
990                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
991                throw new RuntimeException(cce);
992            } catch (HL7Exception he) {
993                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
994                throw new RuntimeException(he);
995            }
996            return ret;
997        }
998    
999    
1000        /**
1001         * Returns a count of the current number of repetitions of Military Sponsor Name (IN2-9).
1002         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1003         * it will return zero.
1004         */
1005        public int getMilitarySponsorNameReps() {
1006            XPN[] ret = null;
1007            try {
1008                Type[] t = this.getField(9);
1009                return t.length;  
1010            } catch (ClassCastException cce) {
1011                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1012                throw new RuntimeException(cce);
1013            } catch (HL7Exception he) {
1014                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1015                throw new RuntimeException(he);
1016            }
1017        }
1018    
1019    
1020        /**
1021         * Returns a specific repetition of
1022         * IN2-9: "Military Sponsor Name" - creates it if necessary
1023         *
1024         * @param rep The repetition index (0-indexed)
1025         */
1026        public XPN getMilitarySponsorName(int rep) { 
1027            XPN ret = null;
1028            try {
1029                Type t = this.getField(9, rep);
1030                ret = (XPN)t;
1031            } catch (ClassCastException cce) {
1032                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1033                throw new RuntimeException(cce);
1034            } catch (HL7Exception he) {
1035                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1036                throw new RuntimeException(he);
1037            }
1038            return ret;
1039        }
1040    
1041        /**
1042         * Returns a specific repetition of
1043         * IN2-9: "Military Sponsor Name" - creates it if necessary
1044         *
1045         * @param rep The repetition index (0-indexed)
1046         */
1047        public XPN getIn29_MilitarySponsorName(int rep) { 
1048            XPN ret = null;
1049            try {
1050                Type t = this.getField(9, rep);
1051                ret = (XPN)t;
1052            } catch (ClassCastException cce) {
1053                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1054                throw new RuntimeException(cce);
1055            } catch (HL7Exception he) {
1056                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1057                throw new RuntimeException(he);
1058            }
1059            return ret;
1060        }
1061    
1062    
1063        /**
1064         * Returns a count of the current number of repetitions of Military Sponsor Name (IN2-9).
1065         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1066         * it will return zero.
1067         */
1068        public int getIn29_MilitarySponsorNameReps() {
1069            XPN[] ret = null;
1070            try {
1071                Type[] t = this.getField(9);
1072                return t.length;  
1073            } catch (ClassCastException cce) {
1074                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1075                throw new RuntimeException(cce);
1076            } catch (HL7Exception he) {
1077                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1078                throw new RuntimeException(he);
1079            }
1080        }
1081    
1082    
1083    
1084        /**
1085         * Inserts a repetition of
1086         * IN2-9: "Military Sponsor Name" at a specific index
1087         *
1088         * @param rep The repetition index (0-indexed)
1089         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1090         */
1091        public XPN insertMilitarySponsorName(int rep) throws HL7Exception { 
1092            return (XPN) super.insertRepetition(9, rep);
1093        }
1094    
1095    
1096    
1097        /**
1098         * Inserts a repetition of
1099         * IN2-9: "Military Sponsor Name" at a specific index
1100         *
1101         * @param rep The repetition index (0-indexed)
1102         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1103         */
1104        public XPN insertIn29_MilitarySponsorName(int rep) throws HL7Exception { 
1105            return (XPN) super.insertRepetition(9, rep);
1106        }
1107    
1108    
1109        /**
1110         * Removes a repetition of
1111         * IN2-9: "Military Sponsor Name" at a specific index
1112         *
1113         * @param rep The repetition index (0-indexed)
1114         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1115         */
1116        public XPN removeMilitarySponsorName(int rep) throws HL7Exception { 
1117            return (XPN) super.removeRepetition(9, rep);
1118        }
1119    
1120    
1121        /**
1122         * Removes a repetition of
1123         * IN2-9: "Military Sponsor Name" at a specific index
1124         *
1125         * @param rep The repetition index (0-indexed)
1126         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1127         */
1128        public XPN removeIn29_MilitarySponsorName(int rep) throws HL7Exception { 
1129            return (XPN) super.removeRepetition(9, rep);
1130        }
1131    
1132    
1133    
1134    
1135        /**
1136         * Returns
1137         * IN2-10: "Military ID Number" - creates it if necessary
1138         */
1139        public ST getMilitaryIDNumber() { 
1140            ST ret = null;
1141            try {
1142                Type t = this.getField(10, 0);
1143                ret = (ST)t;
1144            } catch (ClassCastException cce) {
1145                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1146                throw new RuntimeException(cce);
1147            } catch (HL7Exception he) {
1148                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1149                throw new RuntimeException(he);
1150            }
1151            return ret;
1152        }
1153    
1154    
1155        /**
1156         * Returns
1157         * IN2-10: "Military ID Number" - creates it if necessary
1158         */
1159        public ST getIn210_MilitaryIDNumber() { 
1160            ST ret = null;
1161            try {
1162                Type t = this.getField(10, 0);
1163                ret = (ST)t;
1164            } catch (ClassCastException cce) {
1165                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1166                throw new RuntimeException(cce);
1167            } catch (HL7Exception he) {
1168                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1169                throw new RuntimeException(he);
1170            }
1171            return ret;
1172        }
1173    
1174    
1175    
1176        /**
1177         * Returns
1178         * IN2-11: "Dependent Of Military Recipient" - creates it if necessary
1179         */
1180        public CE getDependentOfMilitaryRecipient() { 
1181            CE ret = null;
1182            try {
1183                Type t = this.getField(11, 0);
1184                ret = (CE)t;
1185            } catch (ClassCastException cce) {
1186                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1187                throw new RuntimeException(cce);
1188            } catch (HL7Exception he) {
1189                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1190                throw new RuntimeException(he);
1191            }
1192            return ret;
1193        }
1194    
1195    
1196        /**
1197         * Returns
1198         * IN2-11: "Dependent Of Military Recipient" - creates it if necessary
1199         */
1200        public CE getIn211_DependentOfMilitaryRecipient() { 
1201            CE ret = null;
1202            try {
1203                Type t = this.getField(11, 0);
1204                ret = (CE)t;
1205            } catch (ClassCastException cce) {
1206                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1207                throw new RuntimeException(cce);
1208            } catch (HL7Exception he) {
1209                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1210                throw new RuntimeException(he);
1211            }
1212            return ret;
1213        }
1214    
1215    
1216    
1217        /**
1218         * Returns
1219         * IN2-12: "Military Organization" - creates it if necessary
1220         */
1221        public ST getMilitaryOrganization() { 
1222            ST ret = null;
1223            try {
1224                Type t = this.getField(12, 0);
1225                ret = (ST)t;
1226            } catch (ClassCastException cce) {
1227                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1228                throw new RuntimeException(cce);
1229            } catch (HL7Exception he) {
1230                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1231                throw new RuntimeException(he);
1232            }
1233            return ret;
1234        }
1235    
1236    
1237        /**
1238         * Returns
1239         * IN2-12: "Military Organization" - creates it if necessary
1240         */
1241        public ST getIn212_MilitaryOrganization() { 
1242            ST ret = null;
1243            try {
1244                Type t = this.getField(12, 0);
1245                ret = (ST)t;
1246            } catch (ClassCastException cce) {
1247                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1248                throw new RuntimeException(cce);
1249            } catch (HL7Exception he) {
1250                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1251                throw new RuntimeException(he);
1252            }
1253            return ret;
1254        }
1255    
1256    
1257    
1258        /**
1259         * Returns
1260         * IN2-13: "Military Station" - creates it if necessary
1261         */
1262        public ST getMilitaryStation() { 
1263            ST ret = null;
1264            try {
1265                Type t = this.getField(13, 0);
1266                ret = (ST)t;
1267            } catch (ClassCastException cce) {
1268                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1269                throw new RuntimeException(cce);
1270            } catch (HL7Exception he) {
1271                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1272                throw new RuntimeException(he);
1273            }
1274            return ret;
1275        }
1276    
1277    
1278        /**
1279         * Returns
1280         * IN2-13: "Military Station" - creates it if necessary
1281         */
1282        public ST getIn213_MilitaryStation() { 
1283            ST ret = null;
1284            try {
1285                Type t = this.getField(13, 0);
1286                ret = (ST)t;
1287            } catch (ClassCastException cce) {
1288                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1289                throw new RuntimeException(cce);
1290            } catch (HL7Exception he) {
1291                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1292                throw new RuntimeException(he);
1293            }
1294            return ret;
1295        }
1296    
1297    
1298    
1299        /**
1300         * Returns
1301         * IN2-14: "Military Service" - creates it if necessary
1302         */
1303        public IS getMilitaryService() { 
1304            IS ret = null;
1305            try {
1306                Type t = this.getField(14, 0);
1307                ret = (IS)t;
1308            } catch (ClassCastException cce) {
1309                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1310                throw new RuntimeException(cce);
1311            } catch (HL7Exception he) {
1312                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1313                throw new RuntimeException(he);
1314            }
1315            return ret;
1316        }
1317    
1318    
1319        /**
1320         * Returns
1321         * IN2-14: "Military Service" - creates it if necessary
1322         */
1323        public IS getIn214_MilitaryService() { 
1324            IS ret = null;
1325            try {
1326                Type t = this.getField(14, 0);
1327                ret = (IS)t;
1328            } catch (ClassCastException cce) {
1329                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1330                throw new RuntimeException(cce);
1331            } catch (HL7Exception he) {
1332                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1333                throw new RuntimeException(he);
1334            }
1335            return ret;
1336        }
1337    
1338    
1339    
1340        /**
1341         * Returns
1342         * IN2-15: "Military Rank/Grade" - creates it if necessary
1343         */
1344        public IS getMilitaryRankGrade() { 
1345            IS ret = null;
1346            try {
1347                Type t = this.getField(15, 0);
1348                ret = (IS)t;
1349            } catch (ClassCastException cce) {
1350                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1351                throw new RuntimeException(cce);
1352            } catch (HL7Exception he) {
1353                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1354                throw new RuntimeException(he);
1355            }
1356            return ret;
1357        }
1358    
1359    
1360        /**
1361         * Returns
1362         * IN2-15: "Military Rank/Grade" - creates it if necessary
1363         */
1364        public IS getIn215_MilitaryRankGrade() { 
1365            IS ret = null;
1366            try {
1367                Type t = this.getField(15, 0);
1368                ret = (IS)t;
1369            } catch (ClassCastException cce) {
1370                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1371                throw new RuntimeException(cce);
1372            } catch (HL7Exception he) {
1373                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1374                throw new RuntimeException(he);
1375            }
1376            return ret;
1377        }
1378    
1379    
1380    
1381        /**
1382         * Returns
1383         * IN2-16: "Military Status" - creates it if necessary
1384         */
1385        public IS getMilitaryStatus() { 
1386            IS ret = null;
1387            try {
1388                Type t = this.getField(16, 0);
1389                ret = (IS)t;
1390            } catch (ClassCastException cce) {
1391                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1392                throw new RuntimeException(cce);
1393            } catch (HL7Exception he) {
1394                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1395                throw new RuntimeException(he);
1396            }
1397            return ret;
1398        }
1399    
1400    
1401        /**
1402         * Returns
1403         * IN2-16: "Military Status" - creates it if necessary
1404         */
1405        public IS getIn216_MilitaryStatus() { 
1406            IS ret = null;
1407            try {
1408                Type t = this.getField(16, 0);
1409                ret = (IS)t;
1410            } catch (ClassCastException cce) {
1411                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1412                throw new RuntimeException(cce);
1413            } catch (HL7Exception he) {
1414                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1415                throw new RuntimeException(he);
1416            }
1417            return ret;
1418        }
1419    
1420    
1421    
1422        /**
1423         * Returns
1424         * IN2-17: "Military Retire Date" - creates it if necessary
1425         */
1426        public DT getMilitaryRetireDate() { 
1427            DT ret = null;
1428            try {
1429                Type t = this.getField(17, 0);
1430                ret = (DT)t;
1431            } catch (ClassCastException cce) {
1432                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1433                throw new RuntimeException(cce);
1434            } catch (HL7Exception he) {
1435                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1436                throw new RuntimeException(he);
1437            }
1438            return ret;
1439        }
1440    
1441    
1442        /**
1443         * Returns
1444         * IN2-17: "Military Retire Date" - creates it if necessary
1445         */
1446        public DT getIn217_MilitaryRetireDate() { 
1447            DT ret = null;
1448            try {
1449                Type t = this.getField(17, 0);
1450                ret = (DT)t;
1451            } catch (ClassCastException cce) {
1452                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1453                throw new RuntimeException(cce);
1454            } catch (HL7Exception he) {
1455                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1456                throw new RuntimeException(he);
1457            }
1458            return ret;
1459        }
1460    
1461    
1462    
1463        /**
1464         * Returns
1465         * IN2-18: "Military Non-Avail Cert On File" - creates it if necessary
1466         */
1467        public ID getMilitaryNonAvailCertOnFile() { 
1468            ID ret = null;
1469            try {
1470                Type t = this.getField(18, 0);
1471                ret = (ID)t;
1472            } catch (ClassCastException cce) {
1473                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1474                throw new RuntimeException(cce);
1475            } catch (HL7Exception he) {
1476                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1477                throw new RuntimeException(he);
1478            }
1479            return ret;
1480        }
1481    
1482    
1483        /**
1484         * Returns
1485         * IN2-18: "Military Non-Avail Cert On File" - creates it if necessary
1486         */
1487        public ID getIn218_MilitaryNonAvailCertOnFile() { 
1488            ID ret = null;
1489            try {
1490                Type t = this.getField(18, 0);
1491                ret = (ID)t;
1492            } catch (ClassCastException cce) {
1493                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1494                throw new RuntimeException(cce);
1495            } catch (HL7Exception he) {
1496                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1497                throw new RuntimeException(he);
1498            }
1499            return ret;
1500        }
1501    
1502    
1503    
1504        /**
1505         * Returns
1506         * IN2-19: "Baby Coverage" - creates it if necessary
1507         */
1508        public ID getBabyCoverage() { 
1509            ID ret = null;
1510            try {
1511                Type t = this.getField(19, 0);
1512                ret = (ID)t;
1513            } catch (ClassCastException cce) {
1514                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1515                throw new RuntimeException(cce);
1516            } catch (HL7Exception he) {
1517                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1518                throw new RuntimeException(he);
1519            }
1520            return ret;
1521        }
1522    
1523    
1524        /**
1525         * Returns
1526         * IN2-19: "Baby Coverage" - creates it if necessary
1527         */
1528        public ID getIn219_BabyCoverage() { 
1529            ID ret = null;
1530            try {
1531                Type t = this.getField(19, 0);
1532                ret = (ID)t;
1533            } catch (ClassCastException cce) {
1534                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1535                throw new RuntimeException(cce);
1536            } catch (HL7Exception he) {
1537                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1538                throw new RuntimeException(he);
1539            }
1540            return ret;
1541        }
1542    
1543    
1544    
1545        /**
1546         * Returns
1547         * IN2-20: "Combine Baby Bill" - creates it if necessary
1548         */
1549        public ID getCombineBabyBill() { 
1550            ID ret = null;
1551            try {
1552                Type t = this.getField(20, 0);
1553                ret = (ID)t;
1554            } catch (ClassCastException cce) {
1555                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1556                throw new RuntimeException(cce);
1557            } catch (HL7Exception he) {
1558                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1559                throw new RuntimeException(he);
1560            }
1561            return ret;
1562        }
1563    
1564    
1565        /**
1566         * Returns
1567         * IN2-20: "Combine Baby Bill" - creates it if necessary
1568         */
1569        public ID getIn220_CombineBabyBill() { 
1570            ID ret = null;
1571            try {
1572                Type t = this.getField(20, 0);
1573                ret = (ID)t;
1574            } catch (ClassCastException cce) {
1575                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1576                throw new RuntimeException(cce);
1577            } catch (HL7Exception he) {
1578                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1579                throw new RuntimeException(he);
1580            }
1581            return ret;
1582        }
1583    
1584    
1585    
1586        /**
1587         * Returns
1588         * IN2-21: "Blood Deductible" - creates it if necessary
1589         */
1590        public ST getBloodDeductible() { 
1591            ST ret = null;
1592            try {
1593                Type t = this.getField(21, 0);
1594                ret = (ST)t;
1595            } catch (ClassCastException cce) {
1596                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1597                throw new RuntimeException(cce);
1598            } catch (HL7Exception he) {
1599                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1600                throw new RuntimeException(he);
1601            }
1602            return ret;
1603        }
1604    
1605    
1606        /**
1607         * Returns
1608         * IN2-21: "Blood Deductible" - creates it if necessary
1609         */
1610        public ST getIn221_BloodDeductible() { 
1611            ST ret = null;
1612            try {
1613                Type t = this.getField(21, 0);
1614                ret = (ST)t;
1615            } catch (ClassCastException cce) {
1616                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1617                throw new RuntimeException(cce);
1618            } catch (HL7Exception he) {
1619                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1620                throw new RuntimeException(he);
1621            }
1622            return ret;
1623        }
1624    
1625    
1626        /**
1627         * Returns all repetitions of Special Coverage Approval Name (IN2-22).
1628         */
1629        public XPN[] getSpecialCoverageApprovalName() {
1630            XPN[] ret = null;
1631            try {
1632                Type[] t = this.getField(22);  
1633                ret = new XPN[t.length];
1634                for (int i = 0; i < ret.length; i++) {
1635                    ret[i] = (XPN)t[i];
1636                }
1637            } catch (ClassCastException cce) {
1638                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1639                throw new RuntimeException(cce);
1640            } catch (HL7Exception he) {
1641                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1642                throw new RuntimeException(he);
1643            }
1644            return ret;
1645        }
1646    
1647    
1648        /**
1649         * Returns a count of the current number of repetitions of Special Coverage Approval Name (IN2-22).
1650         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1651         * it will return zero.
1652         */
1653        public int getSpecialCoverageApprovalNameReps() {
1654            XPN[] ret = null;
1655            try {
1656                Type[] t = this.getField(22);
1657                return t.length;  
1658            } catch (ClassCastException cce) {
1659                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1660                throw new RuntimeException(cce);
1661            } catch (HL7Exception he) {
1662                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1663                throw new RuntimeException(he);
1664            }
1665        }
1666    
1667    
1668        /**
1669         * Returns a specific repetition of
1670         * IN2-22: "Special Coverage Approval Name" - creates it if necessary
1671         *
1672         * @param rep The repetition index (0-indexed)
1673         */
1674        public XPN getSpecialCoverageApprovalName(int rep) { 
1675            XPN ret = null;
1676            try {
1677                Type t = this.getField(22, rep);
1678                ret = (XPN)t;
1679            } catch (ClassCastException cce) {
1680                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1681                throw new RuntimeException(cce);
1682            } catch (HL7Exception he) {
1683                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1684                throw new RuntimeException(he);
1685            }
1686            return ret;
1687        }
1688    
1689        /**
1690         * Returns a specific repetition of
1691         * IN2-22: "Special Coverage Approval Name" - creates it if necessary
1692         *
1693         * @param rep The repetition index (0-indexed)
1694         */
1695        public XPN getIn222_SpecialCoverageApprovalName(int rep) { 
1696            XPN ret = null;
1697            try {
1698                Type t = this.getField(22, rep);
1699                ret = (XPN)t;
1700            } catch (ClassCastException cce) {
1701                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1702                throw new RuntimeException(cce);
1703            } catch (HL7Exception he) {
1704                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1705                throw new RuntimeException(he);
1706            }
1707            return ret;
1708        }
1709    
1710    
1711        /**
1712         * Returns a count of the current number of repetitions of Special Coverage Approval Name (IN2-22).
1713         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1714         * it will return zero.
1715         */
1716        public int getIn222_SpecialCoverageApprovalNameReps() {
1717            XPN[] ret = null;
1718            try {
1719                Type[] t = this.getField(22);
1720                return t.length;  
1721            } catch (ClassCastException cce) {
1722                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1723                throw new RuntimeException(cce);
1724            } catch (HL7Exception he) {
1725                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1726                throw new RuntimeException(he);
1727            }
1728        }
1729    
1730    
1731    
1732        /**
1733         * Inserts a repetition of
1734         * IN2-22: "Special Coverage Approval Name" at a specific index
1735         *
1736         * @param rep The repetition index (0-indexed)
1737         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1738         */
1739        public XPN insertSpecialCoverageApprovalName(int rep) throws HL7Exception { 
1740            return (XPN) super.insertRepetition(22, rep);
1741        }
1742    
1743    
1744    
1745        /**
1746         * Inserts a repetition of
1747         * IN2-22: "Special Coverage Approval Name" at a specific index
1748         *
1749         * @param rep The repetition index (0-indexed)
1750         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1751         */
1752        public XPN insertIn222_SpecialCoverageApprovalName(int rep) throws HL7Exception { 
1753            return (XPN) super.insertRepetition(22, rep);
1754        }
1755    
1756    
1757        /**
1758         * Removes a repetition of
1759         * IN2-22: "Special Coverage Approval Name" at a specific index
1760         *
1761         * @param rep The repetition index (0-indexed)
1762         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1763         */
1764        public XPN removeSpecialCoverageApprovalName(int rep) throws HL7Exception { 
1765            return (XPN) super.removeRepetition(22, rep);
1766        }
1767    
1768    
1769        /**
1770         * Removes a repetition of
1771         * IN2-22: "Special Coverage Approval Name" at a specific index
1772         *
1773         * @param rep The repetition index (0-indexed)
1774         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1775         */
1776        public XPN removeIn222_SpecialCoverageApprovalName(int rep) throws HL7Exception { 
1777            return (XPN) super.removeRepetition(22, rep);
1778        }
1779    
1780    
1781    
1782    
1783        /**
1784         * Returns
1785         * IN2-23: "Special Coverage Approval Title" - creates it if necessary
1786         */
1787        public ST getSpecialCoverageApprovalTitle() { 
1788            ST ret = null;
1789            try {
1790                Type t = this.getField(23, 0);
1791                ret = (ST)t;
1792            } catch (ClassCastException cce) {
1793                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1794                throw new RuntimeException(cce);
1795            } catch (HL7Exception he) {
1796                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1797                throw new RuntimeException(he);
1798            }
1799            return ret;
1800        }
1801    
1802    
1803        /**
1804         * Returns
1805         * IN2-23: "Special Coverage Approval Title" - creates it if necessary
1806         */
1807        public ST getIn223_SpecialCoverageApprovalTitle() { 
1808            ST ret = null;
1809            try {
1810                Type t = this.getField(23, 0);
1811                ret = (ST)t;
1812            } catch (ClassCastException cce) {
1813                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1814                throw new RuntimeException(cce);
1815            } catch (HL7Exception he) {
1816                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1817                throw new RuntimeException(he);
1818            }
1819            return ret;
1820        }
1821    
1822    
1823        /**
1824         * Returns all repetitions of Non-Covered Insurance Code (IN2-24).
1825         */
1826        public IS[] getNonCoveredInsuranceCode() {
1827            IS[] ret = null;
1828            try {
1829                Type[] t = this.getField(24);  
1830                ret = new IS[t.length];
1831                for (int i = 0; i < ret.length; i++) {
1832                    ret[i] = (IS)t[i];
1833                }
1834            } catch (ClassCastException cce) {
1835                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1836                throw new RuntimeException(cce);
1837            } catch (HL7Exception he) {
1838                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1839                throw new RuntimeException(he);
1840            }
1841            return ret;
1842        }
1843    
1844    
1845        /**
1846         * Returns a count of the current number of repetitions of Non-Covered Insurance Code (IN2-24).
1847         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1848         * it will return zero.
1849         */
1850        public int getNonCoveredInsuranceCodeReps() {
1851            IS[] ret = null;
1852            try {
1853                Type[] t = this.getField(24);
1854                return t.length;  
1855            } catch (ClassCastException cce) {
1856                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1857                throw new RuntimeException(cce);
1858            } catch (HL7Exception he) {
1859                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1860                throw new RuntimeException(he);
1861            }
1862        }
1863    
1864    
1865        /**
1866         * Returns a specific repetition of
1867         * IN2-24: "Non-Covered Insurance Code" - creates it if necessary
1868         *
1869         * @param rep The repetition index (0-indexed)
1870         */
1871        public IS getNonCoveredInsuranceCode(int rep) { 
1872            IS ret = null;
1873            try {
1874                Type t = this.getField(24, rep);
1875                ret = (IS)t;
1876            } catch (ClassCastException cce) {
1877                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1878                throw new RuntimeException(cce);
1879            } catch (HL7Exception he) {
1880                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1881                throw new RuntimeException(he);
1882            }
1883            return ret;
1884        }
1885    
1886        /**
1887         * Returns a specific repetition of
1888         * IN2-24: "Non-Covered Insurance Code" - creates it if necessary
1889         *
1890         * @param rep The repetition index (0-indexed)
1891         */
1892        public IS getIn224_NonCoveredInsuranceCode(int rep) { 
1893            IS ret = null;
1894            try {
1895                Type t = this.getField(24, rep);
1896                ret = (IS)t;
1897            } catch (ClassCastException cce) {
1898                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1899                throw new RuntimeException(cce);
1900            } catch (HL7Exception he) {
1901                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1902                throw new RuntimeException(he);
1903            }
1904            return ret;
1905        }
1906    
1907    
1908        /**
1909         * Returns a count of the current number of repetitions of Non-Covered Insurance Code (IN2-24).
1910         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1911         * it will return zero.
1912         */
1913        public int getIn224_NonCoveredInsuranceCodeReps() {
1914            IS[] ret = null;
1915            try {
1916                Type[] t = this.getField(24);
1917                return t.length;  
1918            } catch (ClassCastException cce) {
1919                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1920                throw new RuntimeException(cce);
1921            } catch (HL7Exception he) {
1922                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1923                throw new RuntimeException(he);
1924            }
1925        }
1926    
1927    
1928    
1929        /**
1930         * Inserts a repetition of
1931         * IN2-24: "Non-Covered Insurance Code" at a specific index
1932         *
1933         * @param rep The repetition index (0-indexed)
1934         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1935         */
1936        public IS insertNonCoveredInsuranceCode(int rep) throws HL7Exception { 
1937            return (IS) super.insertRepetition(24, rep);
1938        }
1939    
1940    
1941    
1942        /**
1943         * Inserts a repetition of
1944         * IN2-24: "Non-Covered Insurance Code" at a specific index
1945         *
1946         * @param rep The repetition index (0-indexed)
1947         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1948         */
1949        public IS insertIn224_NonCoveredInsuranceCode(int rep) throws HL7Exception { 
1950            return (IS) super.insertRepetition(24, rep);
1951        }
1952    
1953    
1954        /**
1955         * Removes a repetition of
1956         * IN2-24: "Non-Covered Insurance Code" at a specific index
1957         *
1958         * @param rep The repetition index (0-indexed)
1959         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1960         */
1961        public IS removeNonCoveredInsuranceCode(int rep) throws HL7Exception { 
1962            return (IS) super.removeRepetition(24, rep);
1963        }
1964    
1965    
1966        /**
1967         * Removes a repetition of
1968         * IN2-24: "Non-Covered Insurance Code" at a specific index
1969         *
1970         * @param rep The repetition index (0-indexed)
1971         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1972         */
1973        public IS removeIn224_NonCoveredInsuranceCode(int rep) throws HL7Exception { 
1974            return (IS) super.removeRepetition(24, rep);
1975        }
1976    
1977    
1978    
1979        /**
1980         * Returns all repetitions of Payor ID (IN2-25).
1981         */
1982        public CX[] getPayorID() {
1983            CX[] ret = null;
1984            try {
1985                Type[] t = this.getField(25);  
1986                ret = new CX[t.length];
1987                for (int i = 0; i < ret.length; i++) {
1988                    ret[i] = (CX)t[i];
1989                }
1990            } catch (ClassCastException cce) {
1991                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1992                throw new RuntimeException(cce);
1993            } catch (HL7Exception he) {
1994                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1995                throw new RuntimeException(he);
1996            }
1997            return ret;
1998        }
1999    
2000    
2001        /**
2002         * Returns a count of the current number of repetitions of Payor ID (IN2-25).
2003         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2004         * it will return zero.
2005         */
2006        public int getPayorIDReps() {
2007            CX[] ret = null;
2008            try {
2009                Type[] t = this.getField(25);
2010                return t.length;  
2011            } catch (ClassCastException cce) {
2012                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2013                throw new RuntimeException(cce);
2014            } catch (HL7Exception he) {
2015                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2016                throw new RuntimeException(he);
2017            }
2018        }
2019    
2020    
2021        /**
2022         * Returns a specific repetition of
2023         * IN2-25: "Payor ID" - creates it if necessary
2024         *
2025         * @param rep The repetition index (0-indexed)
2026         */
2027        public CX getPayorID(int rep) { 
2028            CX ret = null;
2029            try {
2030                Type t = this.getField(25, rep);
2031                ret = (CX)t;
2032            } catch (ClassCastException cce) {
2033                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2034                throw new RuntimeException(cce);
2035            } catch (HL7Exception he) {
2036                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2037                throw new RuntimeException(he);
2038            }
2039            return ret;
2040        }
2041    
2042        /**
2043         * Returns a specific repetition of
2044         * IN2-25: "Payor ID" - creates it if necessary
2045         *
2046         * @param rep The repetition index (0-indexed)
2047         */
2048        public CX getIn225_PayorID(int rep) { 
2049            CX ret = null;
2050            try {
2051                Type t = this.getField(25, rep);
2052                ret = (CX)t;
2053            } catch (ClassCastException cce) {
2054                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2055                throw new RuntimeException(cce);
2056            } catch (HL7Exception he) {
2057                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2058                throw new RuntimeException(he);
2059            }
2060            return ret;
2061        }
2062    
2063    
2064        /**
2065         * Returns a count of the current number of repetitions of Payor ID (IN2-25).
2066         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2067         * it will return zero.
2068         */
2069        public int getIn225_PayorIDReps() {
2070            CX[] ret = null;
2071            try {
2072                Type[] t = this.getField(25);
2073                return t.length;  
2074            } catch (ClassCastException cce) {
2075                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2076                throw new RuntimeException(cce);
2077            } catch (HL7Exception he) {
2078                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2079                throw new RuntimeException(he);
2080            }
2081        }
2082    
2083    
2084    
2085        /**
2086         * Inserts a repetition of
2087         * IN2-25: "Payor ID" at a specific index
2088         *
2089         * @param rep The repetition index (0-indexed)
2090         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2091         */
2092        public CX insertPayorID(int rep) throws HL7Exception { 
2093            return (CX) super.insertRepetition(25, rep);
2094        }
2095    
2096    
2097    
2098        /**
2099         * Inserts a repetition of
2100         * IN2-25: "Payor ID" at a specific index
2101         *
2102         * @param rep The repetition index (0-indexed)
2103         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2104         */
2105        public CX insertIn225_PayorID(int rep) throws HL7Exception { 
2106            return (CX) super.insertRepetition(25, rep);
2107        }
2108    
2109    
2110        /**
2111         * Removes a repetition of
2112         * IN2-25: "Payor ID" at a specific index
2113         *
2114         * @param rep The repetition index (0-indexed)
2115         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2116         */
2117        public CX removePayorID(int rep) throws HL7Exception { 
2118            return (CX) super.removeRepetition(25, rep);
2119        }
2120    
2121    
2122        /**
2123         * Removes a repetition of
2124         * IN2-25: "Payor ID" at a specific index
2125         *
2126         * @param rep The repetition index (0-indexed)
2127         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2128         */
2129        public CX removeIn225_PayorID(int rep) throws HL7Exception { 
2130            return (CX) super.removeRepetition(25, rep);
2131        }
2132    
2133    
2134    
2135        /**
2136         * Returns all repetitions of Payor Subscriber ID (IN2-26).
2137         */
2138        public CX[] getPayorSubscriberID() {
2139            CX[] ret = null;
2140            try {
2141                Type[] t = this.getField(26);  
2142                ret = new CX[t.length];
2143                for (int i = 0; i < ret.length; i++) {
2144                    ret[i] = (CX)t[i];
2145                }
2146            } catch (ClassCastException cce) {
2147                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2148                throw new RuntimeException(cce);
2149            } catch (HL7Exception he) {
2150                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2151                throw new RuntimeException(he);
2152            }
2153            return ret;
2154        }
2155    
2156    
2157        /**
2158         * Returns a count of the current number of repetitions of Payor Subscriber ID (IN2-26).
2159         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2160         * it will return zero.
2161         */
2162        public int getPayorSubscriberIDReps() {
2163            CX[] ret = null;
2164            try {
2165                Type[] t = this.getField(26);
2166                return t.length;  
2167            } catch (ClassCastException cce) {
2168                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2169                throw new RuntimeException(cce);
2170            } catch (HL7Exception he) {
2171                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2172                throw new RuntimeException(he);
2173            }
2174        }
2175    
2176    
2177        /**
2178         * Returns a specific repetition of
2179         * IN2-26: "Payor Subscriber ID" - creates it if necessary
2180         *
2181         * @param rep The repetition index (0-indexed)
2182         */
2183        public CX getPayorSubscriberID(int rep) { 
2184            CX ret = null;
2185            try {
2186                Type t = this.getField(26, rep);
2187                ret = (CX)t;
2188            } catch (ClassCastException cce) {
2189                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2190                throw new RuntimeException(cce);
2191            } catch (HL7Exception he) {
2192                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2193                throw new RuntimeException(he);
2194            }
2195            return ret;
2196        }
2197    
2198        /**
2199         * Returns a specific repetition of
2200         * IN2-26: "Payor Subscriber ID" - creates it if necessary
2201         *
2202         * @param rep The repetition index (0-indexed)
2203         */
2204        public CX getIn226_PayorSubscriberID(int rep) { 
2205            CX ret = null;
2206            try {
2207                Type t = this.getField(26, rep);
2208                ret = (CX)t;
2209            } catch (ClassCastException cce) {
2210                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2211                throw new RuntimeException(cce);
2212            } catch (HL7Exception he) {
2213                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2214                throw new RuntimeException(he);
2215            }
2216            return ret;
2217        }
2218    
2219    
2220        /**
2221         * Returns a count of the current number of repetitions of Payor Subscriber ID (IN2-26).
2222         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2223         * it will return zero.
2224         */
2225        public int getIn226_PayorSubscriberIDReps() {
2226            CX[] ret = null;
2227            try {
2228                Type[] t = this.getField(26);
2229                return t.length;  
2230            } catch (ClassCastException cce) {
2231                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2232                throw new RuntimeException(cce);
2233            } catch (HL7Exception he) {
2234                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2235                throw new RuntimeException(he);
2236            }
2237        }
2238    
2239    
2240    
2241        /**
2242         * Inserts a repetition of
2243         * IN2-26: "Payor Subscriber ID" at a specific index
2244         *
2245         * @param rep The repetition index (0-indexed)
2246         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2247         */
2248        public CX insertPayorSubscriberID(int rep) throws HL7Exception { 
2249            return (CX) super.insertRepetition(26, rep);
2250        }
2251    
2252    
2253    
2254        /**
2255         * Inserts a repetition of
2256         * IN2-26: "Payor Subscriber ID" at a specific index
2257         *
2258         * @param rep The repetition index (0-indexed)
2259         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2260         */
2261        public CX insertIn226_PayorSubscriberID(int rep) throws HL7Exception { 
2262            return (CX) super.insertRepetition(26, rep);
2263        }
2264    
2265    
2266        /**
2267         * Removes a repetition of
2268         * IN2-26: "Payor Subscriber ID" at a specific index
2269         *
2270         * @param rep The repetition index (0-indexed)
2271         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2272         */
2273        public CX removePayorSubscriberID(int rep) throws HL7Exception { 
2274            return (CX) super.removeRepetition(26, rep);
2275        }
2276    
2277    
2278        /**
2279         * Removes a repetition of
2280         * IN2-26: "Payor Subscriber ID" at a specific index
2281         *
2282         * @param rep The repetition index (0-indexed)
2283         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2284         */
2285        public CX removeIn226_PayorSubscriberID(int rep) throws HL7Exception { 
2286            return (CX) super.removeRepetition(26, rep);
2287        }
2288    
2289    
2290    
2291    
2292        /**
2293         * Returns
2294         * IN2-27: "Eligibility Source" - creates it if necessary
2295         */
2296        public IS getEligibilitySource() { 
2297            IS ret = null;
2298            try {
2299                Type t = this.getField(27, 0);
2300                ret = (IS)t;
2301            } catch (ClassCastException cce) {
2302                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2303                throw new RuntimeException(cce);
2304            } catch (HL7Exception he) {
2305                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2306                throw new RuntimeException(he);
2307            }
2308            return ret;
2309        }
2310    
2311    
2312        /**
2313         * Returns
2314         * IN2-27: "Eligibility Source" - creates it if necessary
2315         */
2316        public IS getIn227_EligibilitySource() { 
2317            IS ret = null;
2318            try {
2319                Type t = this.getField(27, 0);
2320                ret = (IS)t;
2321            } catch (ClassCastException cce) {
2322                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2323                throw new RuntimeException(cce);
2324            } catch (HL7Exception he) {
2325                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2326                throw new RuntimeException(he);
2327            }
2328            return ret;
2329        }
2330    
2331    
2332        /**
2333         * Returns all repetitions of Room Coverage Type/Amount (IN2-28).
2334         */
2335        public RMC[] getRoomCoverageTypeAmount() {
2336            RMC[] ret = null;
2337            try {
2338                Type[] t = this.getField(28);  
2339                ret = new RMC[t.length];
2340                for (int i = 0; i < ret.length; i++) {
2341                    ret[i] = (RMC)t[i];
2342                }
2343            } catch (ClassCastException cce) {
2344                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2345                throw new RuntimeException(cce);
2346            } catch (HL7Exception he) {
2347                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2348                throw new RuntimeException(he);
2349            }
2350            return ret;
2351        }
2352    
2353    
2354        /**
2355         * Returns a count of the current number of repetitions of Room Coverage Type/Amount (IN2-28).
2356         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2357         * it will return zero.
2358         */
2359        public int getRoomCoverageTypeAmountReps() {
2360            RMC[] ret = null;
2361            try {
2362                Type[] t = this.getField(28);
2363                return t.length;  
2364            } catch (ClassCastException cce) {
2365                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2366                throw new RuntimeException(cce);
2367            } catch (HL7Exception he) {
2368                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2369                throw new RuntimeException(he);
2370            }
2371        }
2372    
2373    
2374        /**
2375         * Returns a specific repetition of
2376         * IN2-28: "Room Coverage Type/Amount" - creates it if necessary
2377         *
2378         * @param rep The repetition index (0-indexed)
2379         */
2380        public RMC getRoomCoverageTypeAmount(int rep) { 
2381            RMC ret = null;
2382            try {
2383                Type t = this.getField(28, rep);
2384                ret = (RMC)t;
2385            } catch (ClassCastException cce) {
2386                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2387                throw new RuntimeException(cce);
2388            } catch (HL7Exception he) {
2389                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2390                throw new RuntimeException(he);
2391            }
2392            return ret;
2393        }
2394    
2395        /**
2396         * Returns a specific repetition of
2397         * IN2-28: "Room Coverage Type/Amount" - creates it if necessary
2398         *
2399         * @param rep The repetition index (0-indexed)
2400         */
2401        public RMC getIn228_RoomCoverageTypeAmount(int rep) { 
2402            RMC ret = null;
2403            try {
2404                Type t = this.getField(28, rep);
2405                ret = (RMC)t;
2406            } catch (ClassCastException cce) {
2407                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2408                throw new RuntimeException(cce);
2409            } catch (HL7Exception he) {
2410                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2411                throw new RuntimeException(he);
2412            }
2413            return ret;
2414        }
2415    
2416    
2417        /**
2418         * Returns a count of the current number of repetitions of Room Coverage Type/Amount (IN2-28).
2419         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2420         * it will return zero.
2421         */
2422        public int getIn228_RoomCoverageTypeAmountReps() {
2423            RMC[] ret = null;
2424            try {
2425                Type[] t = this.getField(28);
2426                return t.length;  
2427            } catch (ClassCastException cce) {
2428                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2429                throw new RuntimeException(cce);
2430            } catch (HL7Exception he) {
2431                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2432                throw new RuntimeException(he);
2433            }
2434        }
2435    
2436    
2437    
2438        /**
2439         * Inserts a repetition of
2440         * IN2-28: "Room Coverage Type/Amount" at a specific index
2441         *
2442         * @param rep The repetition index (0-indexed)
2443         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2444         */
2445        public RMC insertRoomCoverageTypeAmount(int rep) throws HL7Exception { 
2446            return (RMC) super.insertRepetition(28, rep);
2447        }
2448    
2449    
2450    
2451        /**
2452         * Inserts a repetition of
2453         * IN2-28: "Room Coverage Type/Amount" at a specific index
2454         *
2455         * @param rep The repetition index (0-indexed)
2456         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2457         */
2458        public RMC insertIn228_RoomCoverageTypeAmount(int rep) throws HL7Exception { 
2459            return (RMC) super.insertRepetition(28, rep);
2460        }
2461    
2462    
2463        /**
2464         * Removes a repetition of
2465         * IN2-28: "Room Coverage Type/Amount" at a specific index
2466         *
2467         * @param rep The repetition index (0-indexed)
2468         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2469         */
2470        public RMC removeRoomCoverageTypeAmount(int rep) throws HL7Exception { 
2471            return (RMC) super.removeRepetition(28, rep);
2472        }
2473    
2474    
2475        /**
2476         * Removes a repetition of
2477         * IN2-28: "Room Coverage Type/Amount" at a specific index
2478         *
2479         * @param rep The repetition index (0-indexed)
2480         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2481         */
2482        public RMC removeIn228_RoomCoverageTypeAmount(int rep) throws HL7Exception { 
2483            return (RMC) super.removeRepetition(28, rep);
2484        }
2485    
2486    
2487    
2488        /**
2489         * Returns all repetitions of Policy Type/Amount (IN2-29).
2490         */
2491        public PTA[] getPolicyTypeAmount() {
2492            PTA[] ret = null;
2493            try {
2494                Type[] t = this.getField(29);  
2495                ret = new PTA[t.length];
2496                for (int i = 0; i < ret.length; i++) {
2497                    ret[i] = (PTA)t[i];
2498                }
2499            } catch (ClassCastException cce) {
2500                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2501                throw new RuntimeException(cce);
2502            } catch (HL7Exception he) {
2503                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2504                throw new RuntimeException(he);
2505            }
2506            return ret;
2507        }
2508    
2509    
2510        /**
2511         * Returns a count of the current number of repetitions of Policy Type/Amount (IN2-29).
2512         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2513         * it will return zero.
2514         */
2515        public int getPolicyTypeAmountReps() {
2516            PTA[] ret = null;
2517            try {
2518                Type[] t = this.getField(29);
2519                return t.length;  
2520            } catch (ClassCastException cce) {
2521                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2522                throw new RuntimeException(cce);
2523            } catch (HL7Exception he) {
2524                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2525                throw new RuntimeException(he);
2526            }
2527        }
2528    
2529    
2530        /**
2531         * Returns a specific repetition of
2532         * IN2-29: "Policy Type/Amount" - creates it if necessary
2533         *
2534         * @param rep The repetition index (0-indexed)
2535         */
2536        public PTA getPolicyTypeAmount(int rep) { 
2537            PTA ret = null;
2538            try {
2539                Type t = this.getField(29, rep);
2540                ret = (PTA)t;
2541            } catch (ClassCastException cce) {
2542                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2543                throw new RuntimeException(cce);
2544            } catch (HL7Exception he) {
2545                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2546                throw new RuntimeException(he);
2547            }
2548            return ret;
2549        }
2550    
2551        /**
2552         * Returns a specific repetition of
2553         * IN2-29: "Policy Type/Amount" - creates it if necessary
2554         *
2555         * @param rep The repetition index (0-indexed)
2556         */
2557        public PTA getIn229_PolicyTypeAmount(int rep) { 
2558            PTA ret = null;
2559            try {
2560                Type t = this.getField(29, rep);
2561                ret = (PTA)t;
2562            } catch (ClassCastException cce) {
2563                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2564                throw new RuntimeException(cce);
2565            } catch (HL7Exception he) {
2566                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2567                throw new RuntimeException(he);
2568            }
2569            return ret;
2570        }
2571    
2572    
2573        /**
2574         * Returns a count of the current number of repetitions of Policy Type/Amount (IN2-29).
2575         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2576         * it will return zero.
2577         */
2578        public int getIn229_PolicyTypeAmountReps() {
2579            PTA[] ret = null;
2580            try {
2581                Type[] t = this.getField(29);
2582                return t.length;  
2583            } catch (ClassCastException cce) {
2584                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2585                throw new RuntimeException(cce);
2586            } catch (HL7Exception he) {
2587                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2588                throw new RuntimeException(he);
2589            }
2590        }
2591    
2592    
2593    
2594        /**
2595         * Inserts a repetition of
2596         * IN2-29: "Policy Type/Amount" at a specific index
2597         *
2598         * @param rep The repetition index (0-indexed)
2599         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2600         */
2601        public PTA insertPolicyTypeAmount(int rep) throws HL7Exception { 
2602            return (PTA) super.insertRepetition(29, rep);
2603        }
2604    
2605    
2606    
2607        /**
2608         * Inserts a repetition of
2609         * IN2-29: "Policy Type/Amount" at a specific index
2610         *
2611         * @param rep The repetition index (0-indexed)
2612         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2613         */
2614        public PTA insertIn229_PolicyTypeAmount(int rep) throws HL7Exception { 
2615            return (PTA) super.insertRepetition(29, rep);
2616        }
2617    
2618    
2619        /**
2620         * Removes a repetition of
2621         * IN2-29: "Policy Type/Amount" at a specific index
2622         *
2623         * @param rep The repetition index (0-indexed)
2624         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2625         */
2626        public PTA removePolicyTypeAmount(int rep) throws HL7Exception { 
2627            return (PTA) super.removeRepetition(29, rep);
2628        }
2629    
2630    
2631        /**
2632         * Removes a repetition of
2633         * IN2-29: "Policy Type/Amount" at a specific index
2634         *
2635         * @param rep The repetition index (0-indexed)
2636         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2637         */
2638        public PTA removeIn229_PolicyTypeAmount(int rep) throws HL7Exception { 
2639            return (PTA) super.removeRepetition(29, rep);
2640        }
2641    
2642    
2643    
2644    
2645        /**
2646         * Returns
2647         * IN2-30: "Daily Deductible" - creates it if necessary
2648         */
2649        public DDI getDailyDeductible() { 
2650            DDI ret = null;
2651            try {
2652                Type t = this.getField(30, 0);
2653                ret = (DDI)t;
2654            } catch (ClassCastException cce) {
2655                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2656                throw new RuntimeException(cce);
2657            } catch (HL7Exception he) {
2658                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2659                throw new RuntimeException(he);
2660            }
2661            return ret;
2662        }
2663    
2664    
2665        /**
2666         * Returns
2667         * IN2-30: "Daily Deductible" - creates it if necessary
2668         */
2669        public DDI getIn230_DailyDeductible() { 
2670            DDI ret = null;
2671            try {
2672                Type t = this.getField(30, 0);
2673                ret = (DDI)t;
2674            } catch (ClassCastException cce) {
2675                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2676                throw new RuntimeException(cce);
2677            } catch (HL7Exception he) {
2678                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2679                throw new RuntimeException(he);
2680            }
2681            return ret;
2682        }
2683    
2684    
2685    
2686        /**
2687         * Returns
2688         * IN2-31: "Living Dependency" - creates it if necessary
2689         */
2690        public IS getLivingDependency() { 
2691            IS ret = null;
2692            try {
2693                Type t = this.getField(31, 0);
2694                ret = (IS)t;
2695            } catch (ClassCastException cce) {
2696                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2697                throw new RuntimeException(cce);
2698            } catch (HL7Exception he) {
2699                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2700                throw new RuntimeException(he);
2701            }
2702            return ret;
2703        }
2704    
2705    
2706        /**
2707         * Returns
2708         * IN2-31: "Living Dependency" - creates it if necessary
2709         */
2710        public IS getIn231_LivingDependency() { 
2711            IS ret = null;
2712            try {
2713                Type t = this.getField(31, 0);
2714                ret = (IS)t;
2715            } catch (ClassCastException cce) {
2716                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2717                throw new RuntimeException(cce);
2718            } catch (HL7Exception he) {
2719                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2720                throw new RuntimeException(he);
2721            }
2722            return ret;
2723        }
2724    
2725    
2726        /**
2727         * Returns all repetitions of Ambulatory Status (IN2-32).
2728         */
2729        public IS[] getAmbulatoryStatus() {
2730            IS[] ret = null;
2731            try {
2732                Type[] t = this.getField(32);  
2733                ret = new IS[t.length];
2734                for (int i = 0; i < ret.length; i++) {
2735                    ret[i] = (IS)t[i];
2736                }
2737            } catch (ClassCastException cce) {
2738                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2739                throw new RuntimeException(cce);
2740            } catch (HL7Exception he) {
2741                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2742                throw new RuntimeException(he);
2743            }
2744            return ret;
2745        }
2746    
2747    
2748        /**
2749         * Returns a count of the current number of repetitions of Ambulatory Status (IN2-32).
2750         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2751         * it will return zero.
2752         */
2753        public int getAmbulatoryStatusReps() {
2754            IS[] ret = null;
2755            try {
2756                Type[] t = this.getField(32);
2757                return t.length;  
2758            } catch (ClassCastException cce) {
2759                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2760                throw new RuntimeException(cce);
2761            } catch (HL7Exception he) {
2762                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2763                throw new RuntimeException(he);
2764            }
2765        }
2766    
2767    
2768        /**
2769         * Returns a specific repetition of
2770         * IN2-32: "Ambulatory Status" - creates it if necessary
2771         *
2772         * @param rep The repetition index (0-indexed)
2773         */
2774        public IS getAmbulatoryStatus(int rep) { 
2775            IS ret = null;
2776            try {
2777                Type t = this.getField(32, rep);
2778                ret = (IS)t;
2779            } catch (ClassCastException cce) {
2780                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2781                throw new RuntimeException(cce);
2782            } catch (HL7Exception he) {
2783                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2784                throw new RuntimeException(he);
2785            }
2786            return ret;
2787        }
2788    
2789        /**
2790         * Returns a specific repetition of
2791         * IN2-32: "Ambulatory Status" - creates it if necessary
2792         *
2793         * @param rep The repetition index (0-indexed)
2794         */
2795        public IS getIn232_AmbulatoryStatus(int rep) { 
2796            IS ret = null;
2797            try {
2798                Type t = this.getField(32, rep);
2799                ret = (IS)t;
2800            } catch (ClassCastException cce) {
2801                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2802                throw new RuntimeException(cce);
2803            } catch (HL7Exception he) {
2804                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2805                throw new RuntimeException(he);
2806            }
2807            return ret;
2808        }
2809    
2810    
2811        /**
2812         * Returns a count of the current number of repetitions of Ambulatory Status (IN2-32).
2813         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2814         * it will return zero.
2815         */
2816        public int getIn232_AmbulatoryStatusReps() {
2817            IS[] ret = null;
2818            try {
2819                Type[] t = this.getField(32);
2820                return t.length;  
2821            } catch (ClassCastException cce) {
2822                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2823                throw new RuntimeException(cce);
2824            } catch (HL7Exception he) {
2825                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2826                throw new RuntimeException(he);
2827            }
2828        }
2829    
2830    
2831    
2832        /**
2833         * Inserts a repetition of
2834         * IN2-32: "Ambulatory Status" at a specific index
2835         *
2836         * @param rep The repetition index (0-indexed)
2837         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2838         */
2839        public IS insertAmbulatoryStatus(int rep) throws HL7Exception { 
2840            return (IS) super.insertRepetition(32, rep);
2841        }
2842    
2843    
2844    
2845        /**
2846         * Inserts a repetition of
2847         * IN2-32: "Ambulatory Status" at a specific index
2848         *
2849         * @param rep The repetition index (0-indexed)
2850         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2851         */
2852        public IS insertIn232_AmbulatoryStatus(int rep) throws HL7Exception { 
2853            return (IS) super.insertRepetition(32, rep);
2854        }
2855    
2856    
2857        /**
2858         * Removes a repetition of
2859         * IN2-32: "Ambulatory Status" at a specific index
2860         *
2861         * @param rep The repetition index (0-indexed)
2862         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2863         */
2864        public IS removeAmbulatoryStatus(int rep) throws HL7Exception { 
2865            return (IS) super.removeRepetition(32, rep);
2866        }
2867    
2868    
2869        /**
2870         * Removes a repetition of
2871         * IN2-32: "Ambulatory Status" at a specific index
2872         *
2873         * @param rep The repetition index (0-indexed)
2874         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2875         */
2876        public IS removeIn232_AmbulatoryStatus(int rep) throws HL7Exception { 
2877            return (IS) super.removeRepetition(32, rep);
2878        }
2879    
2880    
2881    
2882        /**
2883         * Returns all repetitions of Citizenship (IN2-33).
2884         */
2885        public CE[] getCitizenship() {
2886            CE[] ret = null;
2887            try {
2888                Type[] t = this.getField(33);  
2889                ret = new CE[t.length];
2890                for (int i = 0; i < ret.length; i++) {
2891                    ret[i] = (CE)t[i];
2892                }
2893            } catch (ClassCastException cce) {
2894                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2895                throw new RuntimeException(cce);
2896            } catch (HL7Exception he) {
2897                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2898                throw new RuntimeException(he);
2899            }
2900            return ret;
2901        }
2902    
2903    
2904        /**
2905         * Returns a count of the current number of repetitions of Citizenship (IN2-33).
2906         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2907         * it will return zero.
2908         */
2909        public int getCitizenshipReps() {
2910            CE[] ret = null;
2911            try {
2912                Type[] t = this.getField(33);
2913                return t.length;  
2914            } catch (ClassCastException cce) {
2915                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2916                throw new RuntimeException(cce);
2917            } catch (HL7Exception he) {
2918                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2919                throw new RuntimeException(he);
2920            }
2921        }
2922    
2923    
2924        /**
2925         * Returns a specific repetition of
2926         * IN2-33: "Citizenship" - creates it if necessary
2927         *
2928         * @param rep The repetition index (0-indexed)
2929         */
2930        public CE getCitizenship(int rep) { 
2931            CE ret = null;
2932            try {
2933                Type t = this.getField(33, rep);
2934                ret = (CE)t;
2935            } catch (ClassCastException cce) {
2936                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2937                throw new RuntimeException(cce);
2938            } catch (HL7Exception he) {
2939                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2940                throw new RuntimeException(he);
2941            }
2942            return ret;
2943        }
2944    
2945        /**
2946         * Returns a specific repetition of
2947         * IN2-33: "Citizenship" - creates it if necessary
2948         *
2949         * @param rep The repetition index (0-indexed)
2950         */
2951        public CE getIn233_Citizenship(int rep) { 
2952            CE ret = null;
2953            try {
2954                Type t = this.getField(33, rep);
2955                ret = (CE)t;
2956            } catch (ClassCastException cce) {
2957                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2958                throw new RuntimeException(cce);
2959            } catch (HL7Exception he) {
2960                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2961                throw new RuntimeException(he);
2962            }
2963            return ret;
2964        }
2965    
2966    
2967        /**
2968         * Returns a count of the current number of repetitions of Citizenship (IN2-33).
2969         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2970         * it will return zero.
2971         */
2972        public int getIn233_CitizenshipReps() {
2973            CE[] ret = null;
2974            try {
2975                Type[] t = this.getField(33);
2976                return t.length;  
2977            } catch (ClassCastException cce) {
2978                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2979                throw new RuntimeException(cce);
2980            } catch (HL7Exception he) {
2981                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2982                throw new RuntimeException(he);
2983            }
2984        }
2985    
2986    
2987    
2988        /**
2989         * Inserts a repetition of
2990         * IN2-33: "Citizenship" at a specific index
2991         *
2992         * @param rep The repetition index (0-indexed)
2993         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2994         */
2995        public CE insertCitizenship(int rep) throws HL7Exception { 
2996            return (CE) super.insertRepetition(33, rep);
2997        }
2998    
2999    
3000    
3001        /**
3002         * Inserts a repetition of
3003         * IN2-33: "Citizenship" at a specific index
3004         *
3005         * @param rep The repetition index (0-indexed)
3006         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3007         */
3008        public CE insertIn233_Citizenship(int rep) throws HL7Exception { 
3009            return (CE) super.insertRepetition(33, rep);
3010        }
3011    
3012    
3013        /**
3014         * Removes a repetition of
3015         * IN2-33: "Citizenship" at a specific index
3016         *
3017         * @param rep The repetition index (0-indexed)
3018         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3019         */
3020        public CE removeCitizenship(int rep) throws HL7Exception { 
3021            return (CE) super.removeRepetition(33, rep);
3022        }
3023    
3024    
3025        /**
3026         * Removes a repetition of
3027         * IN2-33: "Citizenship" at a specific index
3028         *
3029         * @param rep The repetition index (0-indexed)
3030         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3031         */
3032        public CE removeIn233_Citizenship(int rep) throws HL7Exception { 
3033            return (CE) super.removeRepetition(33, rep);
3034        }
3035    
3036    
3037    
3038    
3039        /**
3040         * Returns
3041         * IN2-34: "Primary Language" - creates it if necessary
3042         */
3043        public CE getPrimaryLanguage() { 
3044            CE ret = null;
3045            try {
3046                Type t = this.getField(34, 0);
3047                ret = (CE)t;
3048            } catch (ClassCastException cce) {
3049                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3050                throw new RuntimeException(cce);
3051            } catch (HL7Exception he) {
3052                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3053                throw new RuntimeException(he);
3054            }
3055            return ret;
3056        }
3057    
3058    
3059        /**
3060         * Returns
3061         * IN2-34: "Primary Language" - creates it if necessary
3062         */
3063        public CE getIn234_PrimaryLanguage() { 
3064            CE ret = null;
3065            try {
3066                Type t = this.getField(34, 0);
3067                ret = (CE)t;
3068            } catch (ClassCastException cce) {
3069                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3070                throw new RuntimeException(cce);
3071            } catch (HL7Exception he) {
3072                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3073                throw new RuntimeException(he);
3074            }
3075            return ret;
3076        }
3077    
3078    
3079    
3080        /**
3081         * Returns
3082         * IN2-35: "Living Arrangement" - creates it if necessary
3083         */
3084        public IS getLivingArrangement() { 
3085            IS ret = null;
3086            try {
3087                Type t = this.getField(35, 0);
3088                ret = (IS)t;
3089            } catch (ClassCastException cce) {
3090                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3091                throw new RuntimeException(cce);
3092            } catch (HL7Exception he) {
3093                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3094                throw new RuntimeException(he);
3095            }
3096            return ret;
3097        }
3098    
3099    
3100        /**
3101         * Returns
3102         * IN2-35: "Living Arrangement" - creates it if necessary
3103         */
3104        public IS getIn235_LivingArrangement() { 
3105            IS ret = null;
3106            try {
3107                Type t = this.getField(35, 0);
3108                ret = (IS)t;
3109            } catch (ClassCastException cce) {
3110                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3111                throw new RuntimeException(cce);
3112            } catch (HL7Exception he) {
3113                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3114                throw new RuntimeException(he);
3115            }
3116            return ret;
3117        }
3118    
3119    
3120    
3121        /**
3122         * Returns
3123         * IN2-36: "Publicity Code" - creates it if necessary
3124         */
3125        public CE getPublicityCode() { 
3126            CE ret = null;
3127            try {
3128                Type t = this.getField(36, 0);
3129                ret = (CE)t;
3130            } catch (ClassCastException cce) {
3131                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3132                throw new RuntimeException(cce);
3133            } catch (HL7Exception he) {
3134                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3135                throw new RuntimeException(he);
3136            }
3137            return ret;
3138        }
3139    
3140    
3141        /**
3142         * Returns
3143         * IN2-36: "Publicity Code" - creates it if necessary
3144         */
3145        public CE getIn236_PublicityCode() { 
3146            CE ret = null;
3147            try {
3148                Type t = this.getField(36, 0);
3149                ret = (CE)t;
3150            } catch (ClassCastException cce) {
3151                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3152                throw new RuntimeException(cce);
3153            } catch (HL7Exception he) {
3154                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3155                throw new RuntimeException(he);
3156            }
3157            return ret;
3158        }
3159    
3160    
3161    
3162        /**
3163         * Returns
3164         * IN2-37: "Protection Indicator" - creates it if necessary
3165         */
3166        public ID getProtectionIndicator() { 
3167            ID ret = null;
3168            try {
3169                Type t = this.getField(37, 0);
3170                ret = (ID)t;
3171            } catch (ClassCastException cce) {
3172                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3173                throw new RuntimeException(cce);
3174            } catch (HL7Exception he) {
3175                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3176                throw new RuntimeException(he);
3177            }
3178            return ret;
3179        }
3180    
3181    
3182        /**
3183         * Returns
3184         * IN2-37: "Protection Indicator" - creates it if necessary
3185         */
3186        public ID getIn237_ProtectionIndicator() { 
3187            ID ret = null;
3188            try {
3189                Type t = this.getField(37, 0);
3190                ret = (ID)t;
3191            } catch (ClassCastException cce) {
3192                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3193                throw new RuntimeException(cce);
3194            } catch (HL7Exception he) {
3195                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3196                throw new RuntimeException(he);
3197            }
3198            return ret;
3199        }
3200    
3201    
3202    
3203        /**
3204         * Returns
3205         * IN2-38: "Student Indicator" - creates it if necessary
3206         */
3207        public IS getStudentIndicator() { 
3208            IS ret = null;
3209            try {
3210                Type t = this.getField(38, 0);
3211                ret = (IS)t;
3212            } catch (ClassCastException cce) {
3213                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3214                throw new RuntimeException(cce);
3215            } catch (HL7Exception he) {
3216                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3217                throw new RuntimeException(he);
3218            }
3219            return ret;
3220        }
3221    
3222    
3223        /**
3224         * Returns
3225         * IN2-38: "Student Indicator" - creates it if necessary
3226         */
3227        public IS getIn238_StudentIndicator() { 
3228            IS ret = null;
3229            try {
3230                Type t = this.getField(38, 0);
3231                ret = (IS)t;
3232            } catch (ClassCastException cce) {
3233                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3234                throw new RuntimeException(cce);
3235            } catch (HL7Exception he) {
3236                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3237                throw new RuntimeException(he);
3238            }
3239            return ret;
3240        }
3241    
3242    
3243    
3244        /**
3245         * Returns
3246         * IN2-39: "Religion" - creates it if necessary
3247         */
3248        public CE getReligion() { 
3249            CE ret = null;
3250            try {
3251                Type t = this.getField(39, 0);
3252                ret = (CE)t;
3253            } catch (ClassCastException cce) {
3254                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3255                throw new RuntimeException(cce);
3256            } catch (HL7Exception he) {
3257                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3258                throw new RuntimeException(he);
3259            }
3260            return ret;
3261        }
3262    
3263    
3264        /**
3265         * Returns
3266         * IN2-39: "Religion" - creates it if necessary
3267         */
3268        public CE getIn239_Religion() { 
3269            CE ret = null;
3270            try {
3271                Type t = this.getField(39, 0);
3272                ret = (CE)t;
3273            } catch (ClassCastException cce) {
3274                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3275                throw new RuntimeException(cce);
3276            } catch (HL7Exception he) {
3277                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3278                throw new RuntimeException(he);
3279            }
3280            return ret;
3281        }
3282    
3283    
3284        /**
3285         * Returns all repetitions of Mother's Maiden Name (IN2-40).
3286         */
3287        public XPN[] getMotherSMaidenName() {
3288            XPN[] ret = null;
3289            try {
3290                Type[] t = this.getField(40);  
3291                ret = new XPN[t.length];
3292                for (int i = 0; i < ret.length; i++) {
3293                    ret[i] = (XPN)t[i];
3294                }
3295            } catch (ClassCastException cce) {
3296                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3297                throw new RuntimeException(cce);
3298            } catch (HL7Exception he) {
3299                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3300                throw new RuntimeException(he);
3301            }
3302            return ret;
3303        }
3304    
3305    
3306        /**
3307         * Returns a count of the current number of repetitions of Mother's Maiden Name (IN2-40).
3308         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3309         * it will return zero.
3310         */
3311        public int getMotherSMaidenNameReps() {
3312            XPN[] ret = null;
3313            try {
3314                Type[] t = this.getField(40);
3315                return t.length;  
3316            } catch (ClassCastException cce) {
3317                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3318                throw new RuntimeException(cce);
3319            } catch (HL7Exception he) {
3320                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3321                throw new RuntimeException(he);
3322            }
3323        }
3324    
3325    
3326        /**
3327         * Returns a specific repetition of
3328         * IN2-40: "Mother's Maiden Name" - creates it if necessary
3329         *
3330         * @param rep The repetition index (0-indexed)
3331         */
3332        public XPN getMotherSMaidenName(int rep) { 
3333            XPN ret = null;
3334            try {
3335                Type t = this.getField(40, rep);
3336                ret = (XPN)t;
3337            } catch (ClassCastException cce) {
3338                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3339                throw new RuntimeException(cce);
3340            } catch (HL7Exception he) {
3341                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3342                throw new RuntimeException(he);
3343            }
3344            return ret;
3345        }
3346    
3347        /**
3348         * Returns a specific repetition of
3349         * IN2-40: "Mother's Maiden Name" - creates it if necessary
3350         *
3351         * @param rep The repetition index (0-indexed)
3352         */
3353        public XPN getIn240_MotherSMaidenName(int rep) { 
3354            XPN ret = null;
3355            try {
3356                Type t = this.getField(40, rep);
3357                ret = (XPN)t;
3358            } catch (ClassCastException cce) {
3359                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3360                throw new RuntimeException(cce);
3361            } catch (HL7Exception he) {
3362                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3363                throw new RuntimeException(he);
3364            }
3365            return ret;
3366        }
3367    
3368    
3369        /**
3370         * Returns a count of the current number of repetitions of Mother's Maiden Name (IN2-40).
3371         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3372         * it will return zero.
3373         */
3374        public int getIn240_MotherSMaidenNameReps() {
3375            XPN[] ret = null;
3376            try {
3377                Type[] t = this.getField(40);
3378                return t.length;  
3379            } catch (ClassCastException cce) {
3380                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3381                throw new RuntimeException(cce);
3382            } catch (HL7Exception he) {
3383                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3384                throw new RuntimeException(he);
3385            }
3386        }
3387    
3388    
3389    
3390        /**
3391         * Inserts a repetition of
3392         * IN2-40: "Mother's Maiden Name" at a specific index
3393         *
3394         * @param rep The repetition index (0-indexed)
3395         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3396         */
3397        public XPN insertMotherSMaidenName(int rep) throws HL7Exception { 
3398            return (XPN) super.insertRepetition(40, rep);
3399        }
3400    
3401    
3402    
3403        /**
3404         * Inserts a repetition of
3405         * IN2-40: "Mother's Maiden Name" at a specific index
3406         *
3407         * @param rep The repetition index (0-indexed)
3408         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3409         */
3410        public XPN insertIn240_MotherSMaidenName(int rep) throws HL7Exception { 
3411            return (XPN) super.insertRepetition(40, rep);
3412        }
3413    
3414    
3415        /**
3416         * Removes a repetition of
3417         * IN2-40: "Mother's Maiden Name" at a specific index
3418         *
3419         * @param rep The repetition index (0-indexed)
3420         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3421         */
3422        public XPN removeMotherSMaidenName(int rep) throws HL7Exception { 
3423            return (XPN) super.removeRepetition(40, rep);
3424        }
3425    
3426    
3427        /**
3428         * Removes a repetition of
3429         * IN2-40: "Mother's Maiden Name" at a specific index
3430         *
3431         * @param rep The repetition index (0-indexed)
3432         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3433         */
3434        public XPN removeIn240_MotherSMaidenName(int rep) throws HL7Exception { 
3435            return (XPN) super.removeRepetition(40, rep);
3436        }
3437    
3438    
3439    
3440    
3441        /**
3442         * Returns
3443         * IN2-41: "Nationality" - creates it if necessary
3444         */
3445        public CE getNationality() { 
3446            CE ret = null;
3447            try {
3448                Type t = this.getField(41, 0);
3449                ret = (CE)t;
3450            } catch (ClassCastException cce) {
3451                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3452                throw new RuntimeException(cce);
3453            } catch (HL7Exception he) {
3454                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3455                throw new RuntimeException(he);
3456            }
3457            return ret;
3458        }
3459    
3460    
3461        /**
3462         * Returns
3463         * IN2-41: "Nationality" - creates it if necessary
3464         */
3465        public CE getIn241_Nationality() { 
3466            CE ret = null;
3467            try {
3468                Type t = this.getField(41, 0);
3469                ret = (CE)t;
3470            } catch (ClassCastException cce) {
3471                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3472                throw new RuntimeException(cce);
3473            } catch (HL7Exception he) {
3474                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3475                throw new RuntimeException(he);
3476            }
3477            return ret;
3478        }
3479    
3480    
3481        /**
3482         * Returns all repetitions of Ethnic Group (IN2-42).
3483         */
3484        public CE[] getEthnicGroup() {
3485            CE[] ret = null;
3486            try {
3487                Type[] t = this.getField(42);  
3488                ret = new CE[t.length];
3489                for (int i = 0; i < ret.length; i++) {
3490                    ret[i] = (CE)t[i];
3491                }
3492            } catch (ClassCastException cce) {
3493                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3494                throw new RuntimeException(cce);
3495            } catch (HL7Exception he) {
3496                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3497                throw new RuntimeException(he);
3498            }
3499            return ret;
3500        }
3501    
3502    
3503        /**
3504         * Returns a count of the current number of repetitions of Ethnic Group (IN2-42).
3505         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3506         * it will return zero.
3507         */
3508        public int getEthnicGroupReps() {
3509            CE[] ret = null;
3510            try {
3511                Type[] t = this.getField(42);
3512                return t.length;  
3513            } catch (ClassCastException cce) {
3514                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3515                throw new RuntimeException(cce);
3516            } catch (HL7Exception he) {
3517                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3518                throw new RuntimeException(he);
3519            }
3520        }
3521    
3522    
3523        /**
3524         * Returns a specific repetition of
3525         * IN2-42: "Ethnic Group" - creates it if necessary
3526         *
3527         * @param rep The repetition index (0-indexed)
3528         */
3529        public CE getEthnicGroup(int rep) { 
3530            CE ret = null;
3531            try {
3532                Type t = this.getField(42, rep);
3533                ret = (CE)t;
3534            } catch (ClassCastException cce) {
3535                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3536                throw new RuntimeException(cce);
3537            } catch (HL7Exception he) {
3538                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3539                throw new RuntimeException(he);
3540            }
3541            return ret;
3542        }
3543    
3544        /**
3545         * Returns a specific repetition of
3546         * IN2-42: "Ethnic Group" - creates it if necessary
3547         *
3548         * @param rep The repetition index (0-indexed)
3549         */
3550        public CE getIn242_EthnicGroup(int rep) { 
3551            CE ret = null;
3552            try {
3553                Type t = this.getField(42, rep);
3554                ret = (CE)t;
3555            } catch (ClassCastException cce) {
3556                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3557                throw new RuntimeException(cce);
3558            } catch (HL7Exception he) {
3559                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3560                throw new RuntimeException(he);
3561            }
3562            return ret;
3563        }
3564    
3565    
3566        /**
3567         * Returns a count of the current number of repetitions of Ethnic Group (IN2-42).
3568         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3569         * it will return zero.
3570         */
3571        public int getIn242_EthnicGroupReps() {
3572            CE[] ret = null;
3573            try {
3574                Type[] t = this.getField(42);
3575                return t.length;  
3576            } catch (ClassCastException cce) {
3577                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3578                throw new RuntimeException(cce);
3579            } catch (HL7Exception he) {
3580                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3581                throw new RuntimeException(he);
3582            }
3583        }
3584    
3585    
3586    
3587        /**
3588         * Inserts a repetition of
3589         * IN2-42: "Ethnic Group" at a specific index
3590         *
3591         * @param rep The repetition index (0-indexed)
3592         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3593         */
3594        public CE insertEthnicGroup(int rep) throws HL7Exception { 
3595            return (CE) super.insertRepetition(42, rep);
3596        }
3597    
3598    
3599    
3600        /**
3601         * Inserts a repetition of
3602         * IN2-42: "Ethnic Group" at a specific index
3603         *
3604         * @param rep The repetition index (0-indexed)
3605         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3606         */
3607        public CE insertIn242_EthnicGroup(int rep) throws HL7Exception { 
3608            return (CE) super.insertRepetition(42, rep);
3609        }
3610    
3611    
3612        /**
3613         * Removes a repetition of
3614         * IN2-42: "Ethnic Group" at a specific index
3615         *
3616         * @param rep The repetition index (0-indexed)
3617         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3618         */
3619        public CE removeEthnicGroup(int rep) throws HL7Exception { 
3620            return (CE) super.removeRepetition(42, rep);
3621        }
3622    
3623    
3624        /**
3625         * Removes a repetition of
3626         * IN2-42: "Ethnic Group" at a specific index
3627         *
3628         * @param rep The repetition index (0-indexed)
3629         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3630         */
3631        public CE removeIn242_EthnicGroup(int rep) throws HL7Exception { 
3632            return (CE) super.removeRepetition(42, rep);
3633        }
3634    
3635    
3636    
3637        /**
3638         * Returns all repetitions of Marital Status (IN2-43).
3639         */
3640        public CE[] getMaritalStatus() {
3641            CE[] ret = null;
3642            try {
3643                Type[] t = this.getField(43);  
3644                ret = new CE[t.length];
3645                for (int i = 0; i < ret.length; i++) {
3646                    ret[i] = (CE)t[i];
3647                }
3648            } catch (ClassCastException cce) {
3649                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3650                throw new RuntimeException(cce);
3651            } catch (HL7Exception he) {
3652                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3653                throw new RuntimeException(he);
3654            }
3655            return ret;
3656        }
3657    
3658    
3659        /**
3660         * Returns a count of the current number of repetitions of Marital Status (IN2-43).
3661         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3662         * it will return zero.
3663         */
3664        public int getMaritalStatusReps() {
3665            CE[] ret = null;
3666            try {
3667                Type[] t = this.getField(43);
3668                return t.length;  
3669            } catch (ClassCastException cce) {
3670                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3671                throw new RuntimeException(cce);
3672            } catch (HL7Exception he) {
3673                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3674                throw new RuntimeException(he);
3675            }
3676        }
3677    
3678    
3679        /**
3680         * Returns a specific repetition of
3681         * IN2-43: "Marital Status" - creates it if necessary
3682         *
3683         * @param rep The repetition index (0-indexed)
3684         */
3685        public CE getMaritalStatus(int rep) { 
3686            CE ret = null;
3687            try {
3688                Type t = this.getField(43, rep);
3689                ret = (CE)t;
3690            } catch (ClassCastException cce) {
3691                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3692                throw new RuntimeException(cce);
3693            } catch (HL7Exception he) {
3694                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3695                throw new RuntimeException(he);
3696            }
3697            return ret;
3698        }
3699    
3700        /**
3701         * Returns a specific repetition of
3702         * IN2-43: "Marital Status" - creates it if necessary
3703         *
3704         * @param rep The repetition index (0-indexed)
3705         */
3706        public CE getIn243_MaritalStatus(int rep) { 
3707            CE ret = null;
3708            try {
3709                Type t = this.getField(43, rep);
3710                ret = (CE)t;
3711            } catch (ClassCastException cce) {
3712                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3713                throw new RuntimeException(cce);
3714            } catch (HL7Exception he) {
3715                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3716                throw new RuntimeException(he);
3717            }
3718            return ret;
3719        }
3720    
3721    
3722        /**
3723         * Returns a count of the current number of repetitions of Marital Status (IN2-43).
3724         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3725         * it will return zero.
3726         */
3727        public int getIn243_MaritalStatusReps() {
3728            CE[] ret = null;
3729            try {
3730                Type[] t = this.getField(43);
3731                return t.length;  
3732            } catch (ClassCastException cce) {
3733                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3734                throw new RuntimeException(cce);
3735            } catch (HL7Exception he) {
3736                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3737                throw new RuntimeException(he);
3738            }
3739        }
3740    
3741    
3742    
3743        /**
3744         * Inserts a repetition of
3745         * IN2-43: "Marital Status" at a specific index
3746         *
3747         * @param rep The repetition index (0-indexed)
3748         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3749         */
3750        public CE insertMaritalStatus(int rep) throws HL7Exception { 
3751            return (CE) super.insertRepetition(43, rep);
3752        }
3753    
3754    
3755    
3756        /**
3757         * Inserts a repetition of
3758         * IN2-43: "Marital Status" at a specific index
3759         *
3760         * @param rep The repetition index (0-indexed)
3761         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3762         */
3763        public CE insertIn243_MaritalStatus(int rep) throws HL7Exception { 
3764            return (CE) super.insertRepetition(43, rep);
3765        }
3766    
3767    
3768        /**
3769         * Removes a repetition of
3770         * IN2-43: "Marital Status" at a specific index
3771         *
3772         * @param rep The repetition index (0-indexed)
3773         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3774         */
3775        public CE removeMaritalStatus(int rep) throws HL7Exception { 
3776            return (CE) super.removeRepetition(43, rep);
3777        }
3778    
3779    
3780        /**
3781         * Removes a repetition of
3782         * IN2-43: "Marital Status" at a specific index
3783         *
3784         * @param rep The repetition index (0-indexed)
3785         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3786         */
3787        public CE removeIn243_MaritalStatus(int rep) throws HL7Exception { 
3788            return (CE) super.removeRepetition(43, rep);
3789        }
3790    
3791    
3792    
3793    
3794        /**
3795         * Returns
3796         * IN2-44: "Insured's Employment Start Date" - creates it if necessary
3797         */
3798        public DT getInsuredSEmploymentStartDate() { 
3799            DT ret = null;
3800            try {
3801                Type t = this.getField(44, 0);
3802                ret = (DT)t;
3803            } catch (ClassCastException cce) {
3804                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3805                throw new RuntimeException(cce);
3806            } catch (HL7Exception he) {
3807                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3808                throw new RuntimeException(he);
3809            }
3810            return ret;
3811        }
3812    
3813    
3814        /**
3815         * Returns
3816         * IN2-44: "Insured's Employment Start Date" - creates it if necessary
3817         */
3818        public DT getIn244_InsuredSEmploymentStartDate() { 
3819            DT ret = null;
3820            try {
3821                Type t = this.getField(44, 0);
3822                ret = (DT)t;
3823            } catch (ClassCastException cce) {
3824                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3825                throw new RuntimeException(cce);
3826            } catch (HL7Exception he) {
3827                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3828                throw new RuntimeException(he);
3829            }
3830            return ret;
3831        }
3832    
3833    
3834    
3835        /**
3836         * Returns
3837         * IN2-45: "Employment Stop Date" - creates it if necessary
3838         */
3839        public DT getEmploymentStopDate() { 
3840            DT ret = null;
3841            try {
3842                Type t = this.getField(45, 0);
3843                ret = (DT)t;
3844            } catch (ClassCastException cce) {
3845                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3846                throw new RuntimeException(cce);
3847            } catch (HL7Exception he) {
3848                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3849                throw new RuntimeException(he);
3850            }
3851            return ret;
3852        }
3853    
3854    
3855        /**
3856         * Returns
3857         * IN2-45: "Employment Stop Date" - creates it if necessary
3858         */
3859        public DT getIn245_EmploymentStopDate() { 
3860            DT ret = null;
3861            try {
3862                Type t = this.getField(45, 0);
3863                ret = (DT)t;
3864            } catch (ClassCastException cce) {
3865                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3866                throw new RuntimeException(cce);
3867            } catch (HL7Exception he) {
3868                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3869                throw new RuntimeException(he);
3870            }
3871            return ret;
3872        }
3873    
3874    
3875    
3876        /**
3877         * Returns
3878         * IN2-46: "Job Title" - creates it if necessary
3879         */
3880        public ST getJobTitle() { 
3881            ST ret = null;
3882            try {
3883                Type t = this.getField(46, 0);
3884                ret = (ST)t;
3885            } catch (ClassCastException cce) {
3886                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3887                throw new RuntimeException(cce);
3888            } catch (HL7Exception he) {
3889                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3890                throw new RuntimeException(he);
3891            }
3892            return ret;
3893        }
3894    
3895    
3896        /**
3897         * Returns
3898         * IN2-46: "Job Title" - creates it if necessary
3899         */
3900        public ST getIn246_JobTitle() { 
3901            ST ret = null;
3902            try {
3903                Type t = this.getField(46, 0);
3904                ret = (ST)t;
3905            } catch (ClassCastException cce) {
3906                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3907                throw new RuntimeException(cce);
3908            } catch (HL7Exception he) {
3909                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3910                throw new RuntimeException(he);
3911            }
3912            return ret;
3913        }
3914    
3915    
3916    
3917        /**
3918         * Returns
3919         * IN2-47: "Job Code/Class" - creates it if necessary
3920         */
3921        public JCC getJobCodeClass() { 
3922            JCC ret = null;
3923            try {
3924                Type t = this.getField(47, 0);
3925                ret = (JCC)t;
3926            } catch (ClassCastException cce) {
3927                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3928                throw new RuntimeException(cce);
3929            } catch (HL7Exception he) {
3930                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3931                throw new RuntimeException(he);
3932            }
3933            return ret;
3934        }
3935    
3936    
3937        /**
3938         * Returns
3939         * IN2-47: "Job Code/Class" - creates it if necessary
3940         */
3941        public JCC getIn247_JobCodeClass() { 
3942            JCC ret = null;
3943            try {
3944                Type t = this.getField(47, 0);
3945                ret = (JCC)t;
3946            } catch (ClassCastException cce) {
3947                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3948                throw new RuntimeException(cce);
3949            } catch (HL7Exception he) {
3950                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3951                throw new RuntimeException(he);
3952            }
3953            return ret;
3954        }
3955    
3956    
3957    
3958        /**
3959         * Returns
3960         * IN2-48: "Job Status" - creates it if necessary
3961         */
3962        public IS getJobStatus() { 
3963            IS ret = null;
3964            try {
3965                Type t = this.getField(48, 0);
3966                ret = (IS)t;
3967            } catch (ClassCastException cce) {
3968                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3969                throw new RuntimeException(cce);
3970            } catch (HL7Exception he) {
3971                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3972                throw new RuntimeException(he);
3973            }
3974            return ret;
3975        }
3976    
3977    
3978        /**
3979         * Returns
3980         * IN2-48: "Job Status" - creates it if necessary
3981         */
3982        public IS getIn248_JobStatus() { 
3983            IS ret = null;
3984            try {
3985                Type t = this.getField(48, 0);
3986                ret = (IS)t;
3987            } catch (ClassCastException cce) {
3988                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3989                throw new RuntimeException(cce);
3990            } catch (HL7Exception he) {
3991                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3992                throw new RuntimeException(he);
3993            }
3994            return ret;
3995        }
3996    
3997    
3998        /**
3999         * Returns all repetitions of Employer Contact Person Name (IN2-49).
4000         */
4001        public XPN[] getEmployerContactPersonName() {
4002            XPN[] ret = null;
4003            try {
4004                Type[] t = this.getField(49);  
4005                ret = new XPN[t.length];
4006                for (int i = 0; i < ret.length; i++) {
4007                    ret[i] = (XPN)t[i];
4008                }
4009            } catch (ClassCastException cce) {
4010                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4011                throw new RuntimeException(cce);
4012            } catch (HL7Exception he) {
4013                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4014                throw new RuntimeException(he);
4015            }
4016            return ret;
4017        }
4018    
4019    
4020        /**
4021         * Returns a count of the current number of repetitions of Employer Contact Person Name (IN2-49).
4022         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4023         * it will return zero.
4024         */
4025        public int getEmployerContactPersonNameReps() {
4026            XPN[] ret = null;
4027            try {
4028                Type[] t = this.getField(49);
4029                return t.length;  
4030            } catch (ClassCastException cce) {
4031                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4032                throw new RuntimeException(cce);
4033            } catch (HL7Exception he) {
4034                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4035                throw new RuntimeException(he);
4036            }
4037        }
4038    
4039    
4040        /**
4041         * Returns a specific repetition of
4042         * IN2-49: "Employer Contact Person Name" - creates it if necessary
4043         *
4044         * @param rep The repetition index (0-indexed)
4045         */
4046        public XPN getEmployerContactPersonName(int rep) { 
4047            XPN ret = null;
4048            try {
4049                Type t = this.getField(49, rep);
4050                ret = (XPN)t;
4051            } catch (ClassCastException cce) {
4052                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4053                throw new RuntimeException(cce);
4054            } catch (HL7Exception he) {
4055                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4056                throw new RuntimeException(he);
4057            }
4058            return ret;
4059        }
4060    
4061        /**
4062         * Returns a specific repetition of
4063         * IN2-49: "Employer Contact Person Name" - creates it if necessary
4064         *
4065         * @param rep The repetition index (0-indexed)
4066         */
4067        public XPN getIn249_EmployerContactPersonName(int rep) { 
4068            XPN ret = null;
4069            try {
4070                Type t = this.getField(49, rep);
4071                ret = (XPN)t;
4072            } catch (ClassCastException cce) {
4073                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4074                throw new RuntimeException(cce);
4075            } catch (HL7Exception he) {
4076                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4077                throw new RuntimeException(he);
4078            }
4079            return ret;
4080        }
4081    
4082    
4083        /**
4084         * Returns a count of the current number of repetitions of Employer Contact Person Name (IN2-49).
4085         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4086         * it will return zero.
4087         */
4088        public int getIn249_EmployerContactPersonNameReps() {
4089            XPN[] ret = null;
4090            try {
4091                Type[] t = this.getField(49);
4092                return t.length;  
4093            } catch (ClassCastException cce) {
4094                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4095                throw new RuntimeException(cce);
4096            } catch (HL7Exception he) {
4097                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4098                throw new RuntimeException(he);
4099            }
4100        }
4101    
4102    
4103    
4104        /**
4105         * Inserts a repetition of
4106         * IN2-49: "Employer Contact Person Name" at a specific index
4107         *
4108         * @param rep The repetition index (0-indexed)
4109         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4110         */
4111        public XPN insertEmployerContactPersonName(int rep) throws HL7Exception { 
4112            return (XPN) super.insertRepetition(49, rep);
4113        }
4114    
4115    
4116    
4117        /**
4118         * Inserts a repetition of
4119         * IN2-49: "Employer Contact Person Name" at a specific index
4120         *
4121         * @param rep The repetition index (0-indexed)
4122         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4123         */
4124        public XPN insertIn249_EmployerContactPersonName(int rep) throws HL7Exception { 
4125            return (XPN) super.insertRepetition(49, rep);
4126        }
4127    
4128    
4129        /**
4130         * Removes a repetition of
4131         * IN2-49: "Employer Contact Person Name" at a specific index
4132         *
4133         * @param rep The repetition index (0-indexed)
4134         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4135         */
4136        public XPN removeEmployerContactPersonName(int rep) throws HL7Exception { 
4137            return (XPN) super.removeRepetition(49, rep);
4138        }
4139    
4140    
4141        /**
4142         * Removes a repetition of
4143         * IN2-49: "Employer Contact Person Name" at a specific index
4144         *
4145         * @param rep The repetition index (0-indexed)
4146         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4147         */
4148        public XPN removeIn249_EmployerContactPersonName(int rep) throws HL7Exception { 
4149            return (XPN) super.removeRepetition(49, rep);
4150        }
4151    
4152    
4153    
4154        /**
4155         * Returns all repetitions of Employer Contact Person Phone Number (IN2-50).
4156         */
4157        public XTN[] getEmployerContactPersonPhoneNumber() {
4158            XTN[] ret = null;
4159            try {
4160                Type[] t = this.getField(50);  
4161                ret = new XTN[t.length];
4162                for (int i = 0; i < ret.length; i++) {
4163                    ret[i] = (XTN)t[i];
4164                }
4165            } catch (ClassCastException cce) {
4166                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4167                throw new RuntimeException(cce);
4168            } catch (HL7Exception he) {
4169                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4170                throw new RuntimeException(he);
4171            }
4172            return ret;
4173        }
4174    
4175    
4176        /**
4177         * Returns a count of the current number of repetitions of Employer Contact Person Phone Number (IN2-50).
4178         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4179         * it will return zero.
4180         */
4181        public int getEmployerContactPersonPhoneNumberReps() {
4182            XTN[] ret = null;
4183            try {
4184                Type[] t = this.getField(50);
4185                return t.length;  
4186            } catch (ClassCastException cce) {
4187                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4188                throw new RuntimeException(cce);
4189            } catch (HL7Exception he) {
4190                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4191                throw new RuntimeException(he);
4192            }
4193        }
4194    
4195    
4196        /**
4197         * Returns a specific repetition of
4198         * IN2-50: "Employer Contact Person Phone Number" - creates it if necessary
4199         *
4200         * @param rep The repetition index (0-indexed)
4201         */
4202        public XTN getEmployerContactPersonPhoneNumber(int rep) { 
4203            XTN ret = null;
4204            try {
4205                Type t = this.getField(50, rep);
4206                ret = (XTN)t;
4207            } catch (ClassCastException cce) {
4208                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4209                throw new RuntimeException(cce);
4210            } catch (HL7Exception he) {
4211                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4212                throw new RuntimeException(he);
4213            }
4214            return ret;
4215        }
4216    
4217        /**
4218         * Returns a specific repetition of
4219         * IN2-50: "Employer Contact Person Phone Number" - creates it if necessary
4220         *
4221         * @param rep The repetition index (0-indexed)
4222         */
4223        public XTN getIn250_EmployerContactPersonPhoneNumber(int rep) { 
4224            XTN ret = null;
4225            try {
4226                Type t = this.getField(50, rep);
4227                ret = (XTN)t;
4228            } catch (ClassCastException cce) {
4229                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4230                throw new RuntimeException(cce);
4231            } catch (HL7Exception he) {
4232                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4233                throw new RuntimeException(he);
4234            }
4235            return ret;
4236        }
4237    
4238    
4239        /**
4240         * Returns a count of the current number of repetitions of Employer Contact Person Phone Number (IN2-50).
4241         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4242         * it will return zero.
4243         */
4244        public int getIn250_EmployerContactPersonPhoneNumberReps() {
4245            XTN[] ret = null;
4246            try {
4247                Type[] t = this.getField(50);
4248                return t.length;  
4249            } catch (ClassCastException cce) {
4250                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4251                throw new RuntimeException(cce);
4252            } catch (HL7Exception he) {
4253                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4254                throw new RuntimeException(he);
4255            }
4256        }
4257    
4258    
4259    
4260        /**
4261         * Inserts a repetition of
4262         * IN2-50: "Employer Contact Person Phone Number" at a specific index
4263         *
4264         * @param rep The repetition index (0-indexed)
4265         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4266         */
4267        public XTN insertEmployerContactPersonPhoneNumber(int rep) throws HL7Exception { 
4268            return (XTN) super.insertRepetition(50, rep);
4269        }
4270    
4271    
4272    
4273        /**
4274         * Inserts a repetition of
4275         * IN2-50: "Employer Contact Person Phone Number" at a specific index
4276         *
4277         * @param rep The repetition index (0-indexed)
4278         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4279         */
4280        public XTN insertIn250_EmployerContactPersonPhoneNumber(int rep) throws HL7Exception { 
4281            return (XTN) super.insertRepetition(50, rep);
4282        }
4283    
4284    
4285        /**
4286         * Removes a repetition of
4287         * IN2-50: "Employer Contact Person Phone Number" at a specific index
4288         *
4289         * @param rep The repetition index (0-indexed)
4290         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4291         */
4292        public XTN removeEmployerContactPersonPhoneNumber(int rep) throws HL7Exception { 
4293            return (XTN) super.removeRepetition(50, rep);
4294        }
4295    
4296    
4297        /**
4298         * Removes a repetition of
4299         * IN2-50: "Employer Contact Person Phone Number" at a specific index
4300         *
4301         * @param rep The repetition index (0-indexed)
4302         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4303         */
4304        public XTN removeIn250_EmployerContactPersonPhoneNumber(int rep) throws HL7Exception { 
4305            return (XTN) super.removeRepetition(50, rep);
4306        }
4307    
4308    
4309    
4310    
4311        /**
4312         * Returns
4313         * IN2-51: "Employer Contact Reason" - creates it if necessary
4314         */
4315        public IS getEmployerContactReason() { 
4316            IS ret = null;
4317            try {
4318                Type t = this.getField(51, 0);
4319                ret = (IS)t;
4320            } catch (ClassCastException cce) {
4321                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4322                throw new RuntimeException(cce);
4323            } catch (HL7Exception he) {
4324                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4325                throw new RuntimeException(he);
4326            }
4327            return ret;
4328        }
4329    
4330    
4331        /**
4332         * Returns
4333         * IN2-51: "Employer Contact Reason" - creates it if necessary
4334         */
4335        public IS getIn251_EmployerContactReason() { 
4336            IS ret = null;
4337            try {
4338                Type t = this.getField(51, 0);
4339                ret = (IS)t;
4340            } catch (ClassCastException cce) {
4341                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4342                throw new RuntimeException(cce);
4343            } catch (HL7Exception he) {
4344                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4345                throw new RuntimeException(he);
4346            }
4347            return ret;
4348        }
4349    
4350    
4351        /**
4352         * Returns all repetitions of Insured's Contact Person's Name (IN2-52).
4353         */
4354        public XPN[] getInsuredSContactPersonSName() {
4355            XPN[] ret = null;
4356            try {
4357                Type[] t = this.getField(52);  
4358                ret = new XPN[t.length];
4359                for (int i = 0; i < ret.length; i++) {
4360                    ret[i] = (XPN)t[i];
4361                }
4362            } catch (ClassCastException cce) {
4363                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4364                throw new RuntimeException(cce);
4365            } catch (HL7Exception he) {
4366                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4367                throw new RuntimeException(he);
4368            }
4369            return ret;
4370        }
4371    
4372    
4373        /**
4374         * Returns a count of the current number of repetitions of Insured's Contact Person's Name (IN2-52).
4375         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4376         * it will return zero.
4377         */
4378        public int getInsuredSContactPersonSNameReps() {
4379            XPN[] ret = null;
4380            try {
4381                Type[] t = this.getField(52);
4382                return t.length;  
4383            } catch (ClassCastException cce) {
4384                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4385                throw new RuntimeException(cce);
4386            } catch (HL7Exception he) {
4387                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4388                throw new RuntimeException(he);
4389            }
4390        }
4391    
4392    
4393        /**
4394         * Returns a specific repetition of
4395         * IN2-52: "Insured's Contact Person's Name" - creates it if necessary
4396         *
4397         * @param rep The repetition index (0-indexed)
4398         */
4399        public XPN getInsuredSContactPersonSName(int rep) { 
4400            XPN ret = null;
4401            try {
4402                Type t = this.getField(52, rep);
4403                ret = (XPN)t;
4404            } catch (ClassCastException cce) {
4405                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4406                throw new RuntimeException(cce);
4407            } catch (HL7Exception he) {
4408                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4409                throw new RuntimeException(he);
4410            }
4411            return ret;
4412        }
4413    
4414        /**
4415         * Returns a specific repetition of
4416         * IN2-52: "Insured's Contact Person's Name" - creates it if necessary
4417         *
4418         * @param rep The repetition index (0-indexed)
4419         */
4420        public XPN getIn252_InsuredSContactPersonSName(int rep) { 
4421            XPN ret = null;
4422            try {
4423                Type t = this.getField(52, rep);
4424                ret = (XPN)t;
4425            } catch (ClassCastException cce) {
4426                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4427                throw new RuntimeException(cce);
4428            } catch (HL7Exception he) {
4429                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4430                throw new RuntimeException(he);
4431            }
4432            return ret;
4433        }
4434    
4435    
4436        /**
4437         * Returns a count of the current number of repetitions of Insured's Contact Person's Name (IN2-52).
4438         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4439         * it will return zero.
4440         */
4441        public int getIn252_InsuredSContactPersonSNameReps() {
4442            XPN[] ret = null;
4443            try {
4444                Type[] t = this.getField(52);
4445                return t.length;  
4446            } catch (ClassCastException cce) {
4447                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4448                throw new RuntimeException(cce);
4449            } catch (HL7Exception he) {
4450                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4451                throw new RuntimeException(he);
4452            }
4453        }
4454    
4455    
4456    
4457        /**
4458         * Inserts a repetition of
4459         * IN2-52: "Insured's Contact Person's Name" at a specific index
4460         *
4461         * @param rep The repetition index (0-indexed)
4462         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4463         */
4464        public XPN insertInsuredSContactPersonSName(int rep) throws HL7Exception { 
4465            return (XPN) super.insertRepetition(52, rep);
4466        }
4467    
4468    
4469    
4470        /**
4471         * Inserts a repetition of
4472         * IN2-52: "Insured's Contact Person's Name" at a specific index
4473         *
4474         * @param rep The repetition index (0-indexed)
4475         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4476         */
4477        public XPN insertIn252_InsuredSContactPersonSName(int rep) throws HL7Exception { 
4478            return (XPN) super.insertRepetition(52, rep);
4479        }
4480    
4481    
4482        /**
4483         * Removes a repetition of
4484         * IN2-52: "Insured's Contact Person's Name" at a specific index
4485         *
4486         * @param rep The repetition index (0-indexed)
4487         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4488         */
4489        public XPN removeInsuredSContactPersonSName(int rep) throws HL7Exception { 
4490            return (XPN) super.removeRepetition(52, rep);
4491        }
4492    
4493    
4494        /**
4495         * Removes a repetition of
4496         * IN2-52: "Insured's Contact Person's Name" at a specific index
4497         *
4498         * @param rep The repetition index (0-indexed)
4499         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4500         */
4501        public XPN removeIn252_InsuredSContactPersonSName(int rep) throws HL7Exception { 
4502            return (XPN) super.removeRepetition(52, rep);
4503        }
4504    
4505    
4506    
4507        /**
4508         * Returns all repetitions of Insured's Contact Person Phone Number (IN2-53).
4509         */
4510        public XTN[] getInsuredSContactPersonPhoneNumber() {
4511            XTN[] ret = null;
4512            try {
4513                Type[] t = this.getField(53);  
4514                ret = new XTN[t.length];
4515                for (int i = 0; i < ret.length; i++) {
4516                    ret[i] = (XTN)t[i];
4517                }
4518            } catch (ClassCastException cce) {
4519                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4520                throw new RuntimeException(cce);
4521            } catch (HL7Exception he) {
4522                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4523                throw new RuntimeException(he);
4524            }
4525            return ret;
4526        }
4527    
4528    
4529        /**
4530         * Returns a count of the current number of repetitions of Insured's Contact Person Phone Number (IN2-53).
4531         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4532         * it will return zero.
4533         */
4534        public int getInsuredSContactPersonPhoneNumberReps() {
4535            XTN[] ret = null;
4536            try {
4537                Type[] t = this.getField(53);
4538                return t.length;  
4539            } catch (ClassCastException cce) {
4540                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4541                throw new RuntimeException(cce);
4542            } catch (HL7Exception he) {
4543                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4544                throw new RuntimeException(he);
4545            }
4546        }
4547    
4548    
4549        /**
4550         * Returns a specific repetition of
4551         * IN2-53: "Insured's Contact Person Phone Number" - creates it if necessary
4552         *
4553         * @param rep The repetition index (0-indexed)
4554         */
4555        public XTN getInsuredSContactPersonPhoneNumber(int rep) { 
4556            XTN ret = null;
4557            try {
4558                Type t = this.getField(53, rep);
4559                ret = (XTN)t;
4560            } catch (ClassCastException cce) {
4561                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4562                throw new RuntimeException(cce);
4563            } catch (HL7Exception he) {
4564                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4565                throw new RuntimeException(he);
4566            }
4567            return ret;
4568        }
4569    
4570        /**
4571         * Returns a specific repetition of
4572         * IN2-53: "Insured's Contact Person Phone Number" - creates it if necessary
4573         *
4574         * @param rep The repetition index (0-indexed)
4575         */
4576        public XTN getIn253_InsuredSContactPersonPhoneNumber(int rep) { 
4577            XTN ret = null;
4578            try {
4579                Type t = this.getField(53, rep);
4580                ret = (XTN)t;
4581            } catch (ClassCastException cce) {
4582                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4583                throw new RuntimeException(cce);
4584            } catch (HL7Exception he) {
4585                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4586                throw new RuntimeException(he);
4587            }
4588            return ret;
4589        }
4590    
4591    
4592        /**
4593         * Returns a count of the current number of repetitions of Insured's Contact Person Phone Number (IN2-53).
4594         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4595         * it will return zero.
4596         */
4597        public int getIn253_InsuredSContactPersonPhoneNumberReps() {
4598            XTN[] ret = null;
4599            try {
4600                Type[] t = this.getField(53);
4601                return t.length;  
4602            } catch (ClassCastException cce) {
4603                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4604                throw new RuntimeException(cce);
4605            } catch (HL7Exception he) {
4606                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4607                throw new RuntimeException(he);
4608            }
4609        }
4610    
4611    
4612    
4613        /**
4614         * Inserts a repetition of
4615         * IN2-53: "Insured's Contact Person Phone Number" at a specific index
4616         *
4617         * @param rep The repetition index (0-indexed)
4618         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4619         */
4620        public XTN insertInsuredSContactPersonPhoneNumber(int rep) throws HL7Exception { 
4621            return (XTN) super.insertRepetition(53, rep);
4622        }
4623    
4624    
4625    
4626        /**
4627         * Inserts a repetition of
4628         * IN2-53: "Insured's Contact Person Phone Number" at a specific index
4629         *
4630         * @param rep The repetition index (0-indexed)
4631         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4632         */
4633        public XTN insertIn253_InsuredSContactPersonPhoneNumber(int rep) throws HL7Exception { 
4634            return (XTN) super.insertRepetition(53, rep);
4635        }
4636    
4637    
4638        /**
4639         * Removes a repetition of
4640         * IN2-53: "Insured's Contact Person Phone Number" at a specific index
4641         *
4642         * @param rep The repetition index (0-indexed)
4643         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4644         */
4645        public XTN removeInsuredSContactPersonPhoneNumber(int rep) throws HL7Exception { 
4646            return (XTN) super.removeRepetition(53, rep);
4647        }
4648    
4649    
4650        /**
4651         * Removes a repetition of
4652         * IN2-53: "Insured's Contact Person Phone Number" at a specific index
4653         *
4654         * @param rep The repetition index (0-indexed)
4655         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4656         */
4657        public XTN removeIn253_InsuredSContactPersonPhoneNumber(int rep) throws HL7Exception { 
4658            return (XTN) super.removeRepetition(53, rep);
4659        }
4660    
4661    
4662    
4663        /**
4664         * Returns all repetitions of Insured's Contact Person Reason (IN2-54).
4665         */
4666        public IS[] getInsuredSContactPersonReason() {
4667            IS[] ret = null;
4668            try {
4669                Type[] t = this.getField(54);  
4670                ret = new IS[t.length];
4671                for (int i = 0; i < ret.length; i++) {
4672                    ret[i] = (IS)t[i];
4673                }
4674            } catch (ClassCastException cce) {
4675                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4676                throw new RuntimeException(cce);
4677            } catch (HL7Exception he) {
4678                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4679                throw new RuntimeException(he);
4680            }
4681            return ret;
4682        }
4683    
4684    
4685        /**
4686         * Returns a count of the current number of repetitions of Insured's Contact Person Reason (IN2-54).
4687         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4688         * it will return zero.
4689         */
4690        public int getInsuredSContactPersonReasonReps() {
4691            IS[] ret = null;
4692            try {
4693                Type[] t = this.getField(54);
4694                return t.length;  
4695            } catch (ClassCastException cce) {
4696                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4697                throw new RuntimeException(cce);
4698            } catch (HL7Exception he) {
4699                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4700                throw new RuntimeException(he);
4701            }
4702        }
4703    
4704    
4705        /**
4706         * Returns a specific repetition of
4707         * IN2-54: "Insured's Contact Person Reason" - creates it if necessary
4708         *
4709         * @param rep The repetition index (0-indexed)
4710         */
4711        public IS getInsuredSContactPersonReason(int rep) { 
4712            IS ret = null;
4713            try {
4714                Type t = this.getField(54, rep);
4715                ret = (IS)t;
4716            } catch (ClassCastException cce) {
4717                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4718                throw new RuntimeException(cce);
4719            } catch (HL7Exception he) {
4720                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4721                throw new RuntimeException(he);
4722            }
4723            return ret;
4724        }
4725    
4726        /**
4727         * Returns a specific repetition of
4728         * IN2-54: "Insured's Contact Person Reason" - creates it if necessary
4729         *
4730         * @param rep The repetition index (0-indexed)
4731         */
4732        public IS getIn254_InsuredSContactPersonReason(int rep) { 
4733            IS ret = null;
4734            try {
4735                Type t = this.getField(54, rep);
4736                ret = (IS)t;
4737            } catch (ClassCastException cce) {
4738                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4739                throw new RuntimeException(cce);
4740            } catch (HL7Exception he) {
4741                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4742                throw new RuntimeException(he);
4743            }
4744            return ret;
4745        }
4746    
4747    
4748        /**
4749         * Returns a count of the current number of repetitions of Insured's Contact Person Reason (IN2-54).
4750         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4751         * it will return zero.
4752         */
4753        public int getIn254_InsuredSContactPersonReasonReps() {
4754            IS[] ret = null;
4755            try {
4756                Type[] t = this.getField(54);
4757                return t.length;  
4758            } catch (ClassCastException cce) {
4759                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4760                throw new RuntimeException(cce);
4761            } catch (HL7Exception he) {
4762                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4763                throw new RuntimeException(he);
4764            }
4765        }
4766    
4767    
4768    
4769        /**
4770         * Inserts a repetition of
4771         * IN2-54: "Insured's Contact Person Reason" at a specific index
4772         *
4773         * @param rep The repetition index (0-indexed)
4774         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4775         */
4776        public IS insertInsuredSContactPersonReason(int rep) throws HL7Exception { 
4777            return (IS) super.insertRepetition(54, rep);
4778        }
4779    
4780    
4781    
4782        /**
4783         * Inserts a repetition of
4784         * IN2-54: "Insured's Contact Person Reason" at a specific index
4785         *
4786         * @param rep The repetition index (0-indexed)
4787         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4788         */
4789        public IS insertIn254_InsuredSContactPersonReason(int rep) throws HL7Exception { 
4790            return (IS) super.insertRepetition(54, rep);
4791        }
4792    
4793    
4794        /**
4795         * Removes a repetition of
4796         * IN2-54: "Insured's Contact Person Reason" at a specific index
4797         *
4798         * @param rep The repetition index (0-indexed)
4799         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4800         */
4801        public IS removeInsuredSContactPersonReason(int rep) throws HL7Exception { 
4802            return (IS) super.removeRepetition(54, rep);
4803        }
4804    
4805    
4806        /**
4807         * Removes a repetition of
4808         * IN2-54: "Insured's Contact Person Reason" at a specific index
4809         *
4810         * @param rep The repetition index (0-indexed)
4811         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4812         */
4813        public IS removeIn254_InsuredSContactPersonReason(int rep) throws HL7Exception { 
4814            return (IS) super.removeRepetition(54, rep);
4815        }
4816    
4817    
4818    
4819    
4820        /**
4821         * Returns
4822         * IN2-55: "Relationship To The Patient Start Date" - creates it if necessary
4823         */
4824        public DT getRelationshipToThePatientStartDate() { 
4825            DT ret = null;
4826            try {
4827                Type t = this.getField(55, 0);
4828                ret = (DT)t;
4829            } catch (ClassCastException cce) {
4830                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4831                throw new RuntimeException(cce);
4832            } catch (HL7Exception he) {
4833                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4834                throw new RuntimeException(he);
4835            }
4836            return ret;
4837        }
4838    
4839    
4840        /**
4841         * Returns
4842         * IN2-55: "Relationship To The Patient Start Date" - creates it if necessary
4843         */
4844        public DT getIn255_RelationshipToThePatientStartDate() { 
4845            DT ret = null;
4846            try {
4847                Type t = this.getField(55, 0);
4848                ret = (DT)t;
4849            } catch (ClassCastException cce) {
4850                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4851                throw new RuntimeException(cce);
4852            } catch (HL7Exception he) {
4853                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4854                throw new RuntimeException(he);
4855            }
4856            return ret;
4857        }
4858    
4859    
4860        /**
4861         * Returns all repetitions of Relationship To The Patient Stop Date (IN2-56).
4862         */
4863        public DT[] getRelationshipToThePatientStopDate() {
4864            DT[] ret = null;
4865            try {
4866                Type[] t = this.getField(56);  
4867                ret = new DT[t.length];
4868                for (int i = 0; i < ret.length; i++) {
4869                    ret[i] = (DT)t[i];
4870                }
4871            } catch (ClassCastException cce) {
4872                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4873                throw new RuntimeException(cce);
4874            } catch (HL7Exception he) {
4875                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4876                throw new RuntimeException(he);
4877            }
4878            return ret;
4879        }
4880    
4881    
4882        /**
4883         * Returns a count of the current number of repetitions of Relationship To The Patient Stop Date (IN2-56).
4884         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4885         * it will return zero.
4886         */
4887        public int getRelationshipToThePatientStopDateReps() {
4888            DT[] ret = null;
4889            try {
4890                Type[] t = this.getField(56);
4891                return t.length;  
4892            } catch (ClassCastException cce) {
4893                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4894                throw new RuntimeException(cce);
4895            } catch (HL7Exception he) {
4896                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4897                throw new RuntimeException(he);
4898            }
4899        }
4900    
4901    
4902        /**
4903         * Returns a specific repetition of
4904         * IN2-56: "Relationship To The Patient Stop Date" - creates it if necessary
4905         *
4906         * @param rep The repetition index (0-indexed)
4907         */
4908        public DT getRelationshipToThePatientStopDate(int rep) { 
4909            DT ret = null;
4910            try {
4911                Type t = this.getField(56, rep);
4912                ret = (DT)t;
4913            } catch (ClassCastException cce) {
4914                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4915                throw new RuntimeException(cce);
4916            } catch (HL7Exception he) {
4917                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4918                throw new RuntimeException(he);
4919            }
4920            return ret;
4921        }
4922    
4923        /**
4924         * Returns a specific repetition of
4925         * IN2-56: "Relationship To The Patient Stop Date" - creates it if necessary
4926         *
4927         * @param rep The repetition index (0-indexed)
4928         */
4929        public DT getIn256_RelationshipToThePatientStopDate(int rep) { 
4930            DT ret = null;
4931            try {
4932                Type t = this.getField(56, rep);
4933                ret = (DT)t;
4934            } catch (ClassCastException cce) {
4935                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4936                throw new RuntimeException(cce);
4937            } catch (HL7Exception he) {
4938                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4939                throw new RuntimeException(he);
4940            }
4941            return ret;
4942        }
4943    
4944    
4945        /**
4946         * Returns a count of the current number of repetitions of Relationship To The Patient Stop Date (IN2-56).
4947         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4948         * it will return zero.
4949         */
4950        public int getIn256_RelationshipToThePatientStopDateReps() {
4951            DT[] ret = null;
4952            try {
4953                Type[] t = this.getField(56);
4954                return t.length;  
4955            } catch (ClassCastException cce) {
4956                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4957                throw new RuntimeException(cce);
4958            } catch (HL7Exception he) {
4959                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4960                throw new RuntimeException(he);
4961            }
4962        }
4963    
4964    
4965    
4966        /**
4967         * Inserts a repetition of
4968         * IN2-56: "Relationship To The Patient Stop Date" at a specific index
4969         *
4970         * @param rep The repetition index (0-indexed)
4971         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4972         */
4973        public DT insertRelationshipToThePatientStopDate(int rep) throws HL7Exception { 
4974            return (DT) super.insertRepetition(56, rep);
4975        }
4976    
4977    
4978    
4979        /**
4980         * Inserts a repetition of
4981         * IN2-56: "Relationship To The Patient Stop Date" at a specific index
4982         *
4983         * @param rep The repetition index (0-indexed)
4984         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4985         */
4986        public DT insertIn256_RelationshipToThePatientStopDate(int rep) throws HL7Exception { 
4987            return (DT) super.insertRepetition(56, rep);
4988        }
4989    
4990    
4991        /**
4992         * Removes a repetition of
4993         * IN2-56: "Relationship To The Patient Stop Date" at a specific index
4994         *
4995         * @param rep The repetition index (0-indexed)
4996         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4997         */
4998        public DT removeRelationshipToThePatientStopDate(int rep) throws HL7Exception { 
4999            return (DT) super.removeRepetition(56, rep);
5000        }
5001    
5002    
5003        /**
5004         * Removes a repetition of
5005         * IN2-56: "Relationship To The Patient Stop Date" at a specific index
5006         *
5007         * @param rep The repetition index (0-indexed)
5008         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5009         */
5010        public DT removeIn256_RelationshipToThePatientStopDate(int rep) throws HL7Exception { 
5011            return (DT) super.removeRepetition(56, rep);
5012        }
5013    
5014    
5015    
5016    
5017        /**
5018         * Returns
5019         * IN2-57: "Insurance Co. Contact Reason" - creates it if necessary
5020         */
5021        public IS getInsuranceCoContactReason() { 
5022            IS ret = null;
5023            try {
5024                Type t = this.getField(57, 0);
5025                ret = (IS)t;
5026            } catch (ClassCastException cce) {
5027                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5028                throw new RuntimeException(cce);
5029            } catch (HL7Exception he) {
5030                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5031                throw new RuntimeException(he);
5032            }
5033            return ret;
5034        }
5035    
5036    
5037        /**
5038         * Returns
5039         * IN2-57: "Insurance Co. Contact Reason" - creates it if necessary
5040         */
5041        public IS getIn257_InsuranceCoContactReason() { 
5042            IS ret = null;
5043            try {
5044                Type t = this.getField(57, 0);
5045                ret = (IS)t;
5046            } catch (ClassCastException cce) {
5047                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5048                throw new RuntimeException(cce);
5049            } catch (HL7Exception he) {
5050                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5051                throw new RuntimeException(he);
5052            }
5053            return ret;
5054        }
5055    
5056    
5057    
5058        /**
5059         * Returns
5060         * IN2-58: "Insurance Co Contact Phone Number" - creates it if necessary
5061         */
5062        public XTN getInsuranceCoContactPhoneNumber() { 
5063            XTN ret = null;
5064            try {
5065                Type t = this.getField(58, 0);
5066                ret = (XTN)t;
5067            } catch (ClassCastException cce) {
5068                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5069                throw new RuntimeException(cce);
5070            } catch (HL7Exception he) {
5071                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5072                throw new RuntimeException(he);
5073            }
5074            return ret;
5075        }
5076    
5077    
5078        /**
5079         * Returns
5080         * IN2-58: "Insurance Co Contact Phone Number" - creates it if necessary
5081         */
5082        public XTN getIn258_InsuranceCoContactPhoneNumber() { 
5083            XTN ret = null;
5084            try {
5085                Type t = this.getField(58, 0);
5086                ret = (XTN)t;
5087            } catch (ClassCastException cce) {
5088                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5089                throw new RuntimeException(cce);
5090            } catch (HL7Exception he) {
5091                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5092                throw new RuntimeException(he);
5093            }
5094            return ret;
5095        }
5096    
5097    
5098    
5099        /**
5100         * Returns
5101         * IN2-59: "Policy Scope" - creates it if necessary
5102         */
5103        public IS getPolicyScope() { 
5104            IS ret = null;
5105            try {
5106                Type t = this.getField(59, 0);
5107                ret = (IS)t;
5108            } catch (ClassCastException cce) {
5109                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5110                throw new RuntimeException(cce);
5111            } catch (HL7Exception he) {
5112                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5113                throw new RuntimeException(he);
5114            }
5115            return ret;
5116        }
5117    
5118    
5119        /**
5120         * Returns
5121         * IN2-59: "Policy Scope" - creates it if necessary
5122         */
5123        public IS getIn259_PolicyScope() { 
5124            IS ret = null;
5125            try {
5126                Type t = this.getField(59, 0);
5127                ret = (IS)t;
5128            } catch (ClassCastException cce) {
5129                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5130                throw new RuntimeException(cce);
5131            } catch (HL7Exception he) {
5132                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5133                throw new RuntimeException(he);
5134            }
5135            return ret;
5136        }
5137    
5138    
5139    
5140        /**
5141         * Returns
5142         * IN2-60: "Policy Source" - creates it if necessary
5143         */
5144        public IS getPolicySource() { 
5145            IS ret = null;
5146            try {
5147                Type t = this.getField(60, 0);
5148                ret = (IS)t;
5149            } catch (ClassCastException cce) {
5150                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5151                throw new RuntimeException(cce);
5152            } catch (HL7Exception he) {
5153                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5154                throw new RuntimeException(he);
5155            }
5156            return ret;
5157        }
5158    
5159    
5160        /**
5161         * Returns
5162         * IN2-60: "Policy Source" - creates it if necessary
5163         */
5164        public IS getIn260_PolicySource() { 
5165            IS ret = null;
5166            try {
5167                Type t = this.getField(60, 0);
5168                ret = (IS)t;
5169            } catch (ClassCastException cce) {
5170                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5171                throw new RuntimeException(cce);
5172            } catch (HL7Exception he) {
5173                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5174                throw new RuntimeException(he);
5175            }
5176            return ret;
5177        }
5178    
5179    
5180    
5181        /**
5182         * Returns
5183         * IN2-61: "Patient Member Number" - creates it if necessary
5184         */
5185        public CX getPatientMemberNumber() { 
5186            CX ret = null;
5187            try {
5188                Type t = this.getField(61, 0);
5189                ret = (CX)t;
5190            } catch (ClassCastException cce) {
5191                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5192                throw new RuntimeException(cce);
5193            } catch (HL7Exception he) {
5194                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5195                throw new RuntimeException(he);
5196            }
5197            return ret;
5198        }
5199    
5200    
5201        /**
5202         * Returns
5203         * IN2-61: "Patient Member Number" - creates it if necessary
5204         */
5205        public CX getIn261_PatientMemberNumber() { 
5206            CX ret = null;
5207            try {
5208                Type t = this.getField(61, 0);
5209                ret = (CX)t;
5210            } catch (ClassCastException cce) {
5211                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5212                throw new RuntimeException(cce);
5213            } catch (HL7Exception he) {
5214                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5215                throw new RuntimeException(he);
5216            }
5217            return ret;
5218        }
5219    
5220    
5221    
5222        /**
5223         * Returns
5224         * IN2-62: "Guarantor's Relationship To Insured" - creates it if necessary
5225         */
5226        public CE getGuarantorSRelationshipToInsured() { 
5227            CE ret = null;
5228            try {
5229                Type t = this.getField(62, 0);
5230                ret = (CE)t;
5231            } catch (ClassCastException cce) {
5232                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5233                throw new RuntimeException(cce);
5234            } catch (HL7Exception he) {
5235                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5236                throw new RuntimeException(he);
5237            }
5238            return ret;
5239        }
5240    
5241    
5242        /**
5243         * Returns
5244         * IN2-62: "Guarantor's Relationship To Insured" - creates it if necessary
5245         */
5246        public CE getIn262_GuarantorSRelationshipToInsured() { 
5247            CE ret = null;
5248            try {
5249                Type t = this.getField(62, 0);
5250                ret = (CE)t;
5251            } catch (ClassCastException cce) {
5252                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5253                throw new RuntimeException(cce);
5254            } catch (HL7Exception he) {
5255                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5256                throw new RuntimeException(he);
5257            }
5258            return ret;
5259        }
5260    
5261    
5262        /**
5263         * Returns all repetitions of Insured's Phone Number - Home (IN2-63).
5264         */
5265        public XTN[] getInsuredSPhoneNumberHome() {
5266            XTN[] ret = null;
5267            try {
5268                Type[] t = this.getField(63);  
5269                ret = new XTN[t.length];
5270                for (int i = 0; i < ret.length; i++) {
5271                    ret[i] = (XTN)t[i];
5272                }
5273            } catch (ClassCastException cce) {
5274                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5275                throw new RuntimeException(cce);
5276            } catch (HL7Exception he) {
5277                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5278                throw new RuntimeException(he);
5279            }
5280            return ret;
5281        }
5282    
5283    
5284        /**
5285         * Returns a count of the current number of repetitions of Insured's Phone Number - Home (IN2-63).
5286         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
5287         * it will return zero.
5288         */
5289        public int getInsuredSPhoneNumberHomeReps() {
5290            XTN[] ret = null;
5291            try {
5292                Type[] t = this.getField(63);
5293                return t.length;  
5294            } catch (ClassCastException cce) {
5295                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5296                throw new RuntimeException(cce);
5297            } catch (HL7Exception he) {
5298                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5299                throw new RuntimeException(he);
5300            }
5301        }
5302    
5303    
5304        /**
5305         * Returns a specific repetition of
5306         * IN2-63: "Insured's Phone Number - Home" - creates it if necessary
5307         *
5308         * @param rep The repetition index (0-indexed)
5309         */
5310        public XTN getInsuredSPhoneNumberHome(int rep) { 
5311            XTN ret = null;
5312            try {
5313                Type t = this.getField(63, rep);
5314                ret = (XTN)t;
5315            } catch (ClassCastException cce) {
5316                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5317                throw new RuntimeException(cce);
5318            } catch (HL7Exception he) {
5319                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5320                throw new RuntimeException(he);
5321            }
5322            return ret;
5323        }
5324    
5325        /**
5326         * Returns a specific repetition of
5327         * IN2-63: "Insured's Phone Number - Home" - creates it if necessary
5328         *
5329         * @param rep The repetition index (0-indexed)
5330         */
5331        public XTN getIn263_InsuredSPhoneNumberHome(int rep) { 
5332            XTN ret = null;
5333            try {
5334                Type t = this.getField(63, rep);
5335                ret = (XTN)t;
5336            } catch (ClassCastException cce) {
5337                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5338                throw new RuntimeException(cce);
5339            } catch (HL7Exception he) {
5340                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5341                throw new RuntimeException(he);
5342            }
5343            return ret;
5344        }
5345    
5346    
5347        /**
5348         * Returns a count of the current number of repetitions of Insured's Phone Number - Home (IN2-63).
5349         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
5350         * it will return zero.
5351         */
5352        public int getIn263_InsuredSPhoneNumberHomeReps() {
5353            XTN[] ret = null;
5354            try {
5355                Type[] t = this.getField(63);
5356                return t.length;  
5357            } catch (ClassCastException cce) {
5358                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5359                throw new RuntimeException(cce);
5360            } catch (HL7Exception he) {
5361                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5362                throw new RuntimeException(he);
5363            }
5364        }
5365    
5366    
5367    
5368        /**
5369         * Inserts a repetition of
5370         * IN2-63: "Insured's Phone Number - Home" at a specific index
5371         *
5372         * @param rep The repetition index (0-indexed)
5373         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5374         */
5375        public XTN insertInsuredSPhoneNumberHome(int rep) throws HL7Exception { 
5376            return (XTN) super.insertRepetition(63, rep);
5377        }
5378    
5379    
5380    
5381        /**
5382         * Inserts a repetition of
5383         * IN2-63: "Insured's Phone Number - Home" at a specific index
5384         *
5385         * @param rep The repetition index (0-indexed)
5386         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5387         */
5388        public XTN insertIn263_InsuredSPhoneNumberHome(int rep) throws HL7Exception { 
5389            return (XTN) super.insertRepetition(63, rep);
5390        }
5391    
5392    
5393        /**
5394         * Removes a repetition of
5395         * IN2-63: "Insured's Phone Number - Home" at a specific index
5396         *
5397         * @param rep The repetition index (0-indexed)
5398         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5399         */
5400        public XTN removeInsuredSPhoneNumberHome(int rep) throws HL7Exception { 
5401            return (XTN) super.removeRepetition(63, rep);
5402        }
5403    
5404    
5405        /**
5406         * Removes a repetition of
5407         * IN2-63: "Insured's Phone Number - Home" at a specific index
5408         *
5409         * @param rep The repetition index (0-indexed)
5410         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5411         */
5412        public XTN removeIn263_InsuredSPhoneNumberHome(int rep) throws HL7Exception { 
5413            return (XTN) super.removeRepetition(63, rep);
5414        }
5415    
5416    
5417    
5418        /**
5419         * Returns all repetitions of Insured's Employer Phone Number (IN2-64).
5420         */
5421        public XTN[] getInsuredSEmployerPhoneNumber() {
5422            XTN[] ret = null;
5423            try {
5424                Type[] t = this.getField(64);  
5425                ret = new XTN[t.length];
5426                for (int i = 0; i < ret.length; i++) {
5427                    ret[i] = (XTN)t[i];
5428                }
5429            } catch (ClassCastException cce) {
5430                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5431                throw new RuntimeException(cce);
5432            } catch (HL7Exception he) {
5433                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5434                throw new RuntimeException(he);
5435            }
5436            return ret;
5437        }
5438    
5439    
5440        /**
5441         * Returns a count of the current number of repetitions of Insured's Employer Phone Number (IN2-64).
5442         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
5443         * it will return zero.
5444         */
5445        public int getInsuredSEmployerPhoneNumberReps() {
5446            XTN[] ret = null;
5447            try {
5448                Type[] t = this.getField(64);
5449                return t.length;  
5450            } catch (ClassCastException cce) {
5451                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5452                throw new RuntimeException(cce);
5453            } catch (HL7Exception he) {
5454                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5455                throw new RuntimeException(he);
5456            }
5457        }
5458    
5459    
5460        /**
5461         * Returns a specific repetition of
5462         * IN2-64: "Insured's Employer Phone Number" - creates it if necessary
5463         *
5464         * @param rep The repetition index (0-indexed)
5465         */
5466        public XTN getInsuredSEmployerPhoneNumber(int rep) { 
5467            XTN ret = null;
5468            try {
5469                Type t = this.getField(64, rep);
5470                ret = (XTN)t;
5471            } catch (ClassCastException cce) {
5472                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5473                throw new RuntimeException(cce);
5474            } catch (HL7Exception he) {
5475                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5476                throw new RuntimeException(he);
5477            }
5478            return ret;
5479        }
5480    
5481        /**
5482         * Returns a specific repetition of
5483         * IN2-64: "Insured's Employer Phone Number" - creates it if necessary
5484         *
5485         * @param rep The repetition index (0-indexed)
5486         */
5487        public XTN getIn264_InsuredSEmployerPhoneNumber(int rep) { 
5488            XTN ret = null;
5489            try {
5490                Type t = this.getField(64, rep);
5491                ret = (XTN)t;
5492            } catch (ClassCastException cce) {
5493                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5494                throw new RuntimeException(cce);
5495            } catch (HL7Exception he) {
5496                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5497                throw new RuntimeException(he);
5498            }
5499            return ret;
5500        }
5501    
5502    
5503        /**
5504         * Returns a count of the current number of repetitions of Insured's Employer Phone Number (IN2-64).
5505         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
5506         * it will return zero.
5507         */
5508        public int getIn264_InsuredSEmployerPhoneNumberReps() {
5509            XTN[] ret = null;
5510            try {
5511                Type[] t = this.getField(64);
5512                return t.length;  
5513            } catch (ClassCastException cce) {
5514                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5515                throw new RuntimeException(cce);
5516            } catch (HL7Exception he) {
5517                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5518                throw new RuntimeException(he);
5519            }
5520        }
5521    
5522    
5523    
5524        /**
5525         * Inserts a repetition of
5526         * IN2-64: "Insured's Employer Phone Number" at a specific index
5527         *
5528         * @param rep The repetition index (0-indexed)
5529         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5530         */
5531        public XTN insertInsuredSEmployerPhoneNumber(int rep) throws HL7Exception { 
5532            return (XTN) super.insertRepetition(64, rep);
5533        }
5534    
5535    
5536    
5537        /**
5538         * Inserts a repetition of
5539         * IN2-64: "Insured's Employer Phone Number" at a specific index
5540         *
5541         * @param rep The repetition index (0-indexed)
5542         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5543         */
5544        public XTN insertIn264_InsuredSEmployerPhoneNumber(int rep) throws HL7Exception { 
5545            return (XTN) super.insertRepetition(64, rep);
5546        }
5547    
5548    
5549        /**
5550         * Removes a repetition of
5551         * IN2-64: "Insured's Employer Phone Number" at a specific index
5552         *
5553         * @param rep The repetition index (0-indexed)
5554         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5555         */
5556        public XTN removeInsuredSEmployerPhoneNumber(int rep) throws HL7Exception { 
5557            return (XTN) super.removeRepetition(64, rep);
5558        }
5559    
5560    
5561        /**
5562         * Removes a repetition of
5563         * IN2-64: "Insured's Employer Phone Number" at a specific index
5564         *
5565         * @param rep The repetition index (0-indexed)
5566         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5567         */
5568        public XTN removeIn264_InsuredSEmployerPhoneNumber(int rep) throws HL7Exception { 
5569            return (XTN) super.removeRepetition(64, rep);
5570        }
5571    
5572    
5573    
5574    
5575        /**
5576         * Returns
5577         * IN2-65: "Military Handicapped Program" - creates it if necessary
5578         */
5579        public CE getMilitaryHandicappedProgram() { 
5580            CE ret = null;
5581            try {
5582                Type t = this.getField(65, 0);
5583                ret = (CE)t;
5584            } catch (ClassCastException cce) {
5585                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5586                throw new RuntimeException(cce);
5587            } catch (HL7Exception he) {
5588                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5589                throw new RuntimeException(he);
5590            }
5591            return ret;
5592        }
5593    
5594    
5595        /**
5596         * Returns
5597         * IN2-65: "Military Handicapped Program" - creates it if necessary
5598         */
5599        public CE getIn265_MilitaryHandicappedProgram() { 
5600            CE ret = null;
5601            try {
5602                Type t = this.getField(65, 0);
5603                ret = (CE)t;
5604            } catch (ClassCastException cce) {
5605                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5606                throw new RuntimeException(cce);
5607            } catch (HL7Exception he) {
5608                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5609                throw new RuntimeException(he);
5610            }
5611            return ret;
5612        }
5613    
5614    
5615    
5616        /**
5617         * Returns
5618         * IN2-66: "Suspend Flag" - creates it if necessary
5619         */
5620        public ID getSuspendFlag() { 
5621            ID ret = null;
5622            try {
5623                Type t = this.getField(66, 0);
5624                ret = (ID)t;
5625            } catch (ClassCastException cce) {
5626                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5627                throw new RuntimeException(cce);
5628            } catch (HL7Exception he) {
5629                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5630                throw new RuntimeException(he);
5631            }
5632            return ret;
5633        }
5634    
5635    
5636        /**
5637         * Returns
5638         * IN2-66: "Suspend Flag" - creates it if necessary
5639         */
5640        public ID getIn266_SuspendFlag() { 
5641            ID ret = null;
5642            try {
5643                Type t = this.getField(66, 0);
5644                ret = (ID)t;
5645            } catch (ClassCastException cce) {
5646                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5647                throw new RuntimeException(cce);
5648            } catch (HL7Exception he) {
5649                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5650                throw new RuntimeException(he);
5651            }
5652            return ret;
5653        }
5654    
5655    
5656    
5657        /**
5658         * Returns
5659         * IN2-67: "Copay Limit Flag" - creates it if necessary
5660         */
5661        public ID getCopayLimitFlag() { 
5662            ID ret = null;
5663            try {
5664                Type t = this.getField(67, 0);
5665                ret = (ID)t;
5666            } catch (ClassCastException cce) {
5667                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5668                throw new RuntimeException(cce);
5669            } catch (HL7Exception he) {
5670                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5671                throw new RuntimeException(he);
5672            }
5673            return ret;
5674        }
5675    
5676    
5677        /**
5678         * Returns
5679         * IN2-67: "Copay Limit Flag" - creates it if necessary
5680         */
5681        public ID getIn267_CopayLimitFlag() { 
5682            ID ret = null;
5683            try {
5684                Type t = this.getField(67, 0);
5685                ret = (ID)t;
5686            } catch (ClassCastException cce) {
5687                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5688                throw new RuntimeException(cce);
5689            } catch (HL7Exception he) {
5690                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5691                throw new RuntimeException(he);
5692            }
5693            return ret;
5694        }
5695    
5696    
5697    
5698        /**
5699         * Returns
5700         * IN2-68: "Stoploss Limit Flag" - creates it if necessary
5701         */
5702        public ID getStoplossLimitFlag() { 
5703            ID ret = null;
5704            try {
5705                Type t = this.getField(68, 0);
5706                ret = (ID)t;
5707            } catch (ClassCastException cce) {
5708                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5709                throw new RuntimeException(cce);
5710            } catch (HL7Exception he) {
5711                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5712                throw new RuntimeException(he);
5713            }
5714            return ret;
5715        }
5716    
5717    
5718        /**
5719         * Returns
5720         * IN2-68: "Stoploss Limit Flag" - creates it if necessary
5721         */
5722        public ID getIn268_StoplossLimitFlag() { 
5723            ID ret = null;
5724            try {
5725                Type t = this.getField(68, 0);
5726                ret = (ID)t;
5727            } catch (ClassCastException cce) {
5728                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5729                throw new RuntimeException(cce);
5730            } catch (HL7Exception he) {
5731                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5732                throw new RuntimeException(he);
5733            }
5734            return ret;
5735        }
5736    
5737    
5738        /**
5739         * Returns all repetitions of Insured Organization Name And ID (IN2-69).
5740         */
5741        public XON[] getInsuredOrganizationNameAndID() {
5742            XON[] ret = null;
5743            try {
5744                Type[] t = this.getField(69);  
5745                ret = new XON[t.length];
5746                for (int i = 0; i < ret.length; i++) {
5747                    ret[i] = (XON)t[i];
5748                }
5749            } catch (ClassCastException cce) {
5750                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5751                throw new RuntimeException(cce);
5752            } catch (HL7Exception he) {
5753                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5754                throw new RuntimeException(he);
5755            }
5756            return ret;
5757        }
5758    
5759    
5760        /**
5761         * Returns a count of the current number of repetitions of Insured Organization Name And ID (IN2-69).
5762         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
5763         * it will return zero.
5764         */
5765        public int getInsuredOrganizationNameAndIDReps() {
5766            XON[] ret = null;
5767            try {
5768                Type[] t = this.getField(69);
5769                return t.length;  
5770            } catch (ClassCastException cce) {
5771                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5772                throw new RuntimeException(cce);
5773            } catch (HL7Exception he) {
5774                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5775                throw new RuntimeException(he);
5776            }
5777        }
5778    
5779    
5780        /**
5781         * Returns a specific repetition of
5782         * IN2-69: "Insured Organization Name And ID" - creates it if necessary
5783         *
5784         * @param rep The repetition index (0-indexed)
5785         */
5786        public XON getInsuredOrganizationNameAndID(int rep) { 
5787            XON ret = null;
5788            try {
5789                Type t = this.getField(69, rep);
5790                ret = (XON)t;
5791            } catch (ClassCastException cce) {
5792                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5793                throw new RuntimeException(cce);
5794            } catch (HL7Exception he) {
5795                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5796                throw new RuntimeException(he);
5797            }
5798            return ret;
5799        }
5800    
5801        /**
5802         * Returns a specific repetition of
5803         * IN2-69: "Insured Organization Name And ID" - creates it if necessary
5804         *
5805         * @param rep The repetition index (0-indexed)
5806         */
5807        public XON getIn269_InsuredOrganizationNameAndID(int rep) { 
5808            XON ret = null;
5809            try {
5810                Type t = this.getField(69, rep);
5811                ret = (XON)t;
5812            } catch (ClassCastException cce) {
5813                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5814                throw new RuntimeException(cce);
5815            } catch (HL7Exception he) {
5816                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5817                throw new RuntimeException(he);
5818            }
5819            return ret;
5820        }
5821    
5822    
5823        /**
5824         * Returns a count of the current number of repetitions of Insured Organization Name And ID (IN2-69).
5825         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
5826         * it will return zero.
5827         */
5828        public int getIn269_InsuredOrganizationNameAndIDReps() {
5829            XON[] ret = null;
5830            try {
5831                Type[] t = this.getField(69);
5832                return t.length;  
5833            } catch (ClassCastException cce) {
5834                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5835                throw new RuntimeException(cce);
5836            } catch (HL7Exception he) {
5837                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5838                throw new RuntimeException(he);
5839            }
5840        }
5841    
5842    
5843    
5844        /**
5845         * Inserts a repetition of
5846         * IN2-69: "Insured Organization Name And ID" at a specific index
5847         *
5848         * @param rep The repetition index (0-indexed)
5849         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5850         */
5851        public XON insertInsuredOrganizationNameAndID(int rep) throws HL7Exception { 
5852            return (XON) super.insertRepetition(69, rep);
5853        }
5854    
5855    
5856    
5857        /**
5858         * Inserts a repetition of
5859         * IN2-69: "Insured Organization Name And ID" at a specific index
5860         *
5861         * @param rep The repetition index (0-indexed)
5862         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5863         */
5864        public XON insertIn269_InsuredOrganizationNameAndID(int rep) throws HL7Exception { 
5865            return (XON) super.insertRepetition(69, rep);
5866        }
5867    
5868    
5869        /**
5870         * Removes a repetition of
5871         * IN2-69: "Insured Organization Name And ID" at a specific index
5872         *
5873         * @param rep The repetition index (0-indexed)
5874         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5875         */
5876        public XON removeInsuredOrganizationNameAndID(int rep) throws HL7Exception { 
5877            return (XON) super.removeRepetition(69, rep);
5878        }
5879    
5880    
5881        /**
5882         * Removes a repetition of
5883         * IN2-69: "Insured Organization Name And ID" at a specific index
5884         *
5885         * @param rep The repetition index (0-indexed)
5886         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
5887         */
5888        public XON removeIn269_InsuredOrganizationNameAndID(int rep) throws HL7Exception { 
5889            return (XON) super.removeRepetition(69, rep);
5890        }
5891    
5892    
5893    
5894        /**
5895         * Returns all repetitions of Insured Employer Organization Name And ID (IN2-70).
5896         */
5897        public XON[] getInsuredEmployerOrganizationNameAndID() {
5898            XON[] ret = null;
5899            try {
5900                Type[] t = this.getField(70);  
5901                ret = new XON[t.length];
5902                for (int i = 0; i < ret.length; i++) {
5903                    ret[i] = (XON)t[i];
5904                }
5905            } catch (ClassCastException cce) {
5906                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5907                throw new RuntimeException(cce);
5908            } catch (HL7Exception he) {
5909                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5910                throw new RuntimeException(he);
5911            }
5912            return ret;
5913        }
5914    
5915    
5916        /**
5917         * Returns a count of the current number of repetitions of Insured Employer Organization Name And ID (IN2-70).
5918         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
5919         * it will return zero.
5920         */
5921        public int getInsuredEmployerOrganizationNameAndIDReps() {
5922            XON[] ret = null;
5923            try {
5924                Type[] t = this.getField(70);
5925                return t.length;  
5926            } catch (ClassCastException cce) {
5927                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5928                throw new RuntimeException(cce);
5929            } catch (HL7Exception he) {
5930                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5931                throw new RuntimeException(he);
5932            }
5933        }
5934    
5935    
5936        /**
5937         * Returns a specific repetition of
5938         * IN2-70: "Insured Employer Organization Name And ID" - creates it if necessary
5939         *
5940         * @param rep The repetition index (0-indexed)
5941         */
5942        public XON getInsuredEmployerOrganizationNameAndID(int rep) { 
5943            XON ret = null;
5944            try {
5945                Type t = this.getField(70, rep);
5946                ret = (XON)t;
5947            } catch (ClassCastException cce) {
5948                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5949                throw new RuntimeException(cce);
5950            } catch (HL7Exception he) {
5951                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5952                throw new RuntimeException(he);
5953            }
5954            return ret;
5955        }
5956    
5957        /**
5958         * Returns a specific repetition of
5959         * IN2-70: "Insured Employer Organization Name And ID" - creates it if necessary
5960         *
5961         * @param rep The repetition index (0-indexed)
5962         */
5963        public XON getIn270_InsuredEmployerOrganizationNameAndID(int rep) { 
5964            XON ret = null;
5965            try {
5966                Type t = this.getField(70, rep);
5967                ret = (XON)t;
5968            } catch (ClassCastException cce) {
5969                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5970                throw new RuntimeException(cce);
5971            } catch (HL7Exception he) {
5972                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5973                throw new RuntimeException(he);
5974            }
5975            return ret;
5976        }
5977    
5978    
5979        /**
5980         * Returns a count of the current number of repetitions of Insured Employer Organization Name And ID (IN2-70).
5981         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
5982         * it will return zero.
5983         */
5984        public int getIn270_InsuredEmployerOrganizationNameAndIDReps() {
5985            XON[] ret = null;
5986            try {
5987                Type[] t = this.getField(70);
5988                return t.length;  
5989            } catch (ClassCastException cce) {
5990                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
5991                throw new RuntimeException(cce);
5992            } catch (HL7Exception he) {
5993                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
5994                throw new RuntimeException(he);
5995            }
5996        }
5997    
5998    
5999    
6000        /**
6001         * Inserts a repetition of
6002         * IN2-70: "Insured Employer Organization Name And ID" at a specific index
6003         *
6004         * @param rep The repetition index (0-indexed)
6005         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
6006         */
6007        public XON insertInsuredEmployerOrganizationNameAndID(int rep) throws HL7Exception { 
6008            return (XON) super.insertRepetition(70, rep);
6009        }
6010    
6011    
6012    
6013        /**
6014         * Inserts a repetition of
6015         * IN2-70: "Insured Employer Organization Name And ID" at a specific index
6016         *
6017         * @param rep The repetition index (0-indexed)
6018         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
6019         */
6020        public XON insertIn270_InsuredEmployerOrganizationNameAndID(int rep) throws HL7Exception { 
6021            return (XON) super.insertRepetition(70, rep);
6022        }
6023    
6024    
6025        /**
6026         * Removes a repetition of
6027         * IN2-70: "Insured Employer Organization Name And ID" at a specific index
6028         *
6029         * @param rep The repetition index (0-indexed)
6030         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
6031         */
6032        public XON removeInsuredEmployerOrganizationNameAndID(int rep) throws HL7Exception { 
6033            return (XON) super.removeRepetition(70, rep);
6034        }
6035    
6036    
6037        /**
6038         * Removes a repetition of
6039         * IN2-70: "Insured Employer Organization Name And ID" at a specific index
6040         *
6041         * @param rep The repetition index (0-indexed)
6042         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
6043         */
6044        public XON removeIn270_InsuredEmployerOrganizationNameAndID(int rep) throws HL7Exception { 
6045            return (XON) super.removeRepetition(70, rep);
6046        }
6047    
6048    
6049    
6050        /**
6051         * Returns all repetitions of Race (IN2-71).
6052         */
6053        public CE[] getRace() {
6054            CE[] ret = null;
6055            try {
6056                Type[] t = this.getField(71);  
6057                ret = new CE[t.length];
6058                for (int i = 0; i < ret.length; i++) {
6059                    ret[i] = (CE)t[i];
6060                }
6061            } catch (ClassCastException cce) {
6062                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
6063                throw new RuntimeException(cce);
6064            } catch (HL7Exception he) {
6065                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
6066                throw new RuntimeException(he);
6067            }
6068            return ret;
6069        }
6070    
6071    
6072        /**
6073         * Returns a count of the current number of repetitions of Race (IN2-71).
6074         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
6075         * it will return zero.
6076         */
6077        public int getRaceReps() {
6078            CE[] ret = null;
6079            try {
6080                Type[] t = this.getField(71);
6081                return t.length;  
6082            } catch (ClassCastException cce) {
6083                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
6084                throw new RuntimeException(cce);
6085            } catch (HL7Exception he) {
6086                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
6087                throw new RuntimeException(he);
6088            }
6089        }
6090    
6091    
6092        /**
6093         * Returns a specific repetition of
6094         * IN2-71: "Race" - creates it if necessary
6095         *
6096         * @param rep The repetition index (0-indexed)
6097         */
6098        public CE getRace(int rep) { 
6099            CE ret = null;
6100            try {
6101                Type t = this.getField(71, rep);
6102                ret = (CE)t;
6103            } catch (ClassCastException cce) {
6104                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
6105                throw new RuntimeException(cce);
6106            } catch (HL7Exception he) {
6107                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
6108                throw new RuntimeException(he);
6109            }
6110            return ret;
6111        }
6112    
6113        /**
6114         * Returns a specific repetition of
6115         * IN2-71: "Race" - creates it if necessary
6116         *
6117         * @param rep The repetition index (0-indexed)
6118         */
6119        public CE getIn271_Race(int rep) { 
6120            CE ret = null;
6121            try {
6122                Type t = this.getField(71, rep);
6123                ret = (CE)t;
6124            } catch (ClassCastException cce) {
6125                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
6126                throw new RuntimeException(cce);
6127            } catch (HL7Exception he) {
6128                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
6129                throw new RuntimeException(he);
6130            }
6131            return ret;
6132        }
6133    
6134    
6135        /**
6136         * Returns a count of the current number of repetitions of Race (IN2-71).
6137         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
6138         * it will return zero.
6139         */
6140        public int getIn271_RaceReps() {
6141            CE[] ret = null;
6142            try {
6143                Type[] t = this.getField(71);
6144                return t.length;  
6145            } catch (ClassCastException cce) {
6146                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
6147                throw new RuntimeException(cce);
6148            } catch (HL7Exception he) {
6149                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
6150                throw new RuntimeException(he);
6151            }
6152        }
6153    
6154    
6155    
6156        /**
6157         * Inserts a repetition of
6158         * IN2-71: "Race" at a specific index
6159         *
6160         * @param rep The repetition index (0-indexed)
6161         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
6162         */
6163        public CE insertRace(int rep) throws HL7Exception { 
6164            return (CE) super.insertRepetition(71, rep);
6165        }
6166    
6167    
6168    
6169        /**
6170         * Inserts a repetition of
6171         * IN2-71: "Race" at a specific index
6172         *
6173         * @param rep The repetition index (0-indexed)
6174         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
6175         */
6176        public CE insertIn271_Race(int rep) throws HL7Exception { 
6177            return (CE) super.insertRepetition(71, rep);
6178        }
6179    
6180    
6181        /**
6182         * Removes a repetition of
6183         * IN2-71: "Race" at a specific index
6184         *
6185         * @param rep The repetition index (0-indexed)
6186         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
6187         */
6188        public CE removeRace(int rep) throws HL7Exception { 
6189            return (CE) super.removeRepetition(71, rep);
6190        }
6191    
6192    
6193        /**
6194         * Removes a repetition of
6195         * IN2-71: "Race" at a specific index
6196         *
6197         * @param rep The repetition index (0-indexed)
6198         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
6199         */
6200        public CE removeIn271_Race(int rep) throws HL7Exception { 
6201            return (CE) super.removeRepetition(71, rep);
6202        }
6203    
6204    
6205    
6206    
6207        /**
6208         * Returns
6209         * IN2-72: "HCFA Patient's Relationship to Insured" - creates it if necessary
6210         */
6211        public CE getHCFAPatientSRelationshipToInsured() { 
6212            CE ret = null;
6213            try {
6214                Type t = this.getField(72, 0);
6215                ret = (CE)t;
6216            } catch (ClassCastException cce) {
6217                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
6218                throw new RuntimeException(cce);
6219            } catch (HL7Exception he) {
6220                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
6221                throw new RuntimeException(he);
6222            }
6223            return ret;
6224        }
6225    
6226    
6227        /**
6228         * Returns
6229         * IN2-72: "HCFA Patient's Relationship to Insured" - creates it if necessary
6230         */
6231        public CE getIn272_HCFAPatientSRelationshipToInsured() { 
6232            CE ret = null;
6233            try {
6234                Type t = this.getField(72, 0);
6235                ret = (CE)t;
6236            } catch (ClassCastException cce) {
6237                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
6238                throw new RuntimeException(cce);
6239            } catch (HL7Exception he) {
6240                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
6241                throw new RuntimeException(he);
6242            }
6243            return ret;
6244        }
6245    
6246    
6247    
6248    
6249    
6250        /** {@inheritDoc} */   
6251        protected Type createNewTypeWithoutReflection(int field) {
6252           switch (field) {
6253              case 0: return new CX(getMessage());
6254              case 1: return new ST(getMessage());
6255              case 2: return new XCN(getMessage());
6256              case 3: return new IS(getMessage(), new Integer( 139 ));
6257              case 4: return new IS(getMessage(), new Integer( 137 ));
6258              case 5: return new ST(getMessage());
6259              case 6: return new XPN(getMessage());
6260              case 7: return new ST(getMessage());
6261              case 8: return new XPN(getMessage());
6262              case 9: return new ST(getMessage());
6263              case 10: return new CE(getMessage());
6264              case 11: return new ST(getMessage());
6265              case 12: return new ST(getMessage());
6266              case 13: return new IS(getMessage(), new Integer( 140 ));
6267              case 14: return new IS(getMessage(), new Integer( 141 ));
6268              case 15: return new IS(getMessage(), new Integer( 142 ));
6269              case 16: return new DT(getMessage());
6270              case 17: return new ID(getMessage(), new Integer( 136 ));
6271              case 18: return new ID(getMessage(), new Integer( 136 ));
6272              case 19: return new ID(getMessage(), new Integer( 136 ));
6273              case 20: return new ST(getMessage());
6274              case 21: return new XPN(getMessage());
6275              case 22: return new ST(getMessage());
6276              case 23: return new IS(getMessage(), new Integer( 143 ));
6277              case 24: return new CX(getMessage());
6278              case 25: return new CX(getMessage());
6279              case 26: return new IS(getMessage(), new Integer( 144 ));
6280              case 27: return new RMC(getMessage());
6281              case 28: return new PTA(getMessage());
6282              case 29: return new DDI(getMessage());
6283              case 30: return new IS(getMessage(), new Integer( 223 ));
6284              case 31: return new IS(getMessage(), new Integer( 9 ));
6285              case 32: return new CE(getMessage());
6286              case 33: return new CE(getMessage());
6287              case 34: return new IS(getMessage(), new Integer( 220 ));
6288              case 35: return new CE(getMessage());
6289              case 36: return new ID(getMessage(), new Integer( 136 ));
6290              case 37: return new IS(getMessage(), new Integer( 231 ));
6291              case 38: return new CE(getMessage());
6292              case 39: return new XPN(getMessage());
6293              case 40: return new CE(getMessage());
6294              case 41: return new CE(getMessage());
6295              case 42: return new CE(getMessage());
6296              case 43: return new DT(getMessage());
6297              case 44: return new DT(getMessage());
6298              case 45: return new ST(getMessage());
6299              case 46: return new JCC(getMessage());
6300              case 47: return new IS(getMessage(), new Integer( 311 ));
6301              case 48: return new XPN(getMessage());
6302              case 49: return new XTN(getMessage());
6303              case 50: return new IS(getMessage(), new Integer( 222 ));
6304              case 51: return new XPN(getMessage());
6305              case 52: return new XTN(getMessage());
6306              case 53: return new IS(getMessage(), new Integer( 222 ));
6307              case 54: return new DT(getMessage());
6308              case 55: return new DT(getMessage());
6309              case 56: return new IS(getMessage(), new Integer( 232 ));
6310              case 57: return new XTN(getMessage());
6311              case 58: return new IS(getMessage(), new Integer( 312 ));
6312              case 59: return new IS(getMessage(), new Integer( 313 ));
6313              case 60: return new CX(getMessage());
6314              case 61: return new CE(getMessage());
6315              case 62: return new XTN(getMessage());
6316              case 63: return new XTN(getMessage());
6317              case 64: return new CE(getMessage());
6318              case 65: return new ID(getMessage(), new Integer( 136 ));
6319              case 66: return new ID(getMessage(), new Integer( 136 ));
6320              case 67: return new ID(getMessage(), new Integer( 136 ));
6321              case 68: return new XON(getMessage());
6322              case 69: return new XON(getMessage());
6323              case 70: return new CE(getMessage());
6324              case 71: return new CE(getMessage());
6325              default: return null;
6326           }
6327       }
6328    
6329    
6330    }
6331