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 GT1 message segment (Guarantor). 
024     * This segment has the following fields:</p>
025     * <ul>
026         * <li>GT1-1: Set ID - GT1 (SI) <b> </b>
027         * <li>GT1-2: Guarantor Number (CX) <b>optional repeating</b>
028         * <li>GT1-3: Guarantor Name (XPN) <b> repeating</b>
029         * <li>GT1-4: Guarantor Spouse Name (XPN) <b>optional repeating</b>
030         * <li>GT1-5: Guarantor Address (XAD) <b>optional repeating</b>
031         * <li>GT1-6: Guarantor Ph Num - Home (XTN) <b>optional repeating</b>
032         * <li>GT1-7: Guarantor Ph Num - Business (XTN) <b>optional repeating</b>
033         * <li>GT1-8: Guarantor Date/Time Of Birth (TS) <b>optional </b>
034         * <li>GT1-9: Guarantor Administrative Sex (IS) <b>optional </b>
035         * <li>GT1-10: Guarantor Type (IS) <b>optional </b>
036         * <li>GT1-11: Guarantor Relationship (CE) <b>optional </b>
037         * <li>GT1-12: Guarantor SSN (ST) <b>optional </b>
038         * <li>GT1-13: Guarantor Date - Begin (DT) <b>optional </b>
039         * <li>GT1-14: Guarantor Date - End (DT) <b>optional </b>
040         * <li>GT1-15: Guarantor Priority (NM) <b>optional </b>
041         * <li>GT1-16: Guarantor Employer Name (XPN) <b>optional repeating</b>
042         * <li>GT1-17: Guarantor Employer Address (XAD) <b>optional repeating</b>
043         * <li>GT1-18: Guarantor Employer Phone Number (XTN) <b>optional repeating</b>
044         * <li>GT1-19: Guarantor Employee ID Number (CX) <b>optional repeating</b>
045         * <li>GT1-20: Guarantor Employment Status (IS) <b>optional </b>
046         * <li>GT1-21: Guarantor Organization Name (XON) <b>optional repeating</b>
047         * <li>GT1-22: Guarantor Billing Hold Flag (ID) <b>optional </b>
048         * <li>GT1-23: Guarantor Credit Rating Code (CE) <b>optional </b>
049         * <li>GT1-24: Guarantor Death Date And Time (TS) <b>optional </b>
050         * <li>GT1-25: Guarantor Death Flag (ID) <b>optional </b>
051         * <li>GT1-26: Guarantor Charge Adjustment Code (CE) <b>optional </b>
052         * <li>GT1-27: Guarantor Household Annual Income (CP) <b>optional </b>
053         * <li>GT1-28: Guarantor Household Size (NM) <b>optional </b>
054         * <li>GT1-29: Guarantor Employer ID Number (CX) <b>optional repeating</b>
055         * <li>GT1-30: Guarantor Marital Status Code (CE) <b>optional </b>
056         * <li>GT1-31: Guarantor Hire Effective Date (DT) <b>optional </b>
057         * <li>GT1-32: Employment Stop Date (DT) <b>optional </b>
058         * <li>GT1-33: Living Dependency (IS) <b>optional </b>
059         * <li>GT1-34: Ambulatory Status (IS) <b>optional repeating</b>
060         * <li>GT1-35: Citizenship (CE) <b>optional repeating</b>
061         * <li>GT1-36: Primary Language (CE) <b>optional </b>
062         * <li>GT1-37: Living Arrangement (IS) <b>optional </b>
063         * <li>GT1-38: Publicity Code (CE) <b>optional </b>
064         * <li>GT1-39: Protection Indicator (ID) <b>optional </b>
065         * <li>GT1-40: Student Indicator (IS) <b>optional </b>
066         * <li>GT1-41: Religion (CE) <b>optional </b>
067         * <li>GT1-42: Mother's Maiden Name (XPN) <b>optional repeating</b>
068         * <li>GT1-43: Nationality (CE) <b>optional </b>
069         * <li>GT1-44: Ethnic Group (CE) <b>optional repeating</b>
070         * <li>GT1-45: Contact Person's Name (XPN) <b>optional repeating</b>
071         * <li>GT1-46: Contact Person's Telephone Number (XTN) <b>optional repeating</b>
072         * <li>GT1-47: Contact Reason (CE) <b>optional </b>
073         * <li>GT1-48: Contact Relationship (IS) <b>optional </b>
074         * <li>GT1-49: Job Title (ST) <b>optional </b>
075         * <li>GT1-50: Job Code/Class (JCC) <b>optional </b>
076         * <li>GT1-51: Guarantor Employer's Organization Name (XON) <b>optional repeating</b>
077         * <li>GT1-52: Handicap (IS) <b>optional </b>
078         * <li>GT1-53: Job Status (IS) <b>optional </b>
079         * <li>GT1-54: Guarantor Financial Class (FC) <b>optional </b>
080         * <li>GT1-55: Guarantor Race (CE) <b>optional repeating</b>
081     * </ul>
082     */
083    public class GT1 extends AbstractSegment {
084    
085        /** 
086         * Creates a new GT1 segment
087         */
088        public GT1(Group parent, ModelClassFactory factory) {
089           super(parent, factory);
090           init(factory);
091        }
092    
093        private void init(ModelClassFactory factory) {
094           try {
095                                      this.add(SI.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID - GT1");
096                                      this.add(CX.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Number");
097                                      this.add(XPN.class, true, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Name");
098                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Spouse Name");
099                                      this.add(XAD.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Address");
100                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Ph Num - Home");
101                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Ph Num - Business");
102                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Date/Time Of Birth");
103                                      this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Guarantor Administrative Sex");
104                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Guarantor Type");
105                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(63) }, "Guarantor Relationship");
106                                      this.add(ST.class, false, 1, 11, new Object[]{ getMessage(), new Integer(0) }, "Guarantor SSN");
107                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Date - Begin");
108                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Date - End");
109                                      this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Priority");
110                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Employer Name");
111                                      this.add(XAD.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Employer Address");
112                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Employer Phone Number");
113                                      this.add(CX.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Employee ID Number");
114                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Guarantor Employment Status");
115                                      this.add(XON.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Organization Name");
116                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Guarantor Billing Hold Flag");
117                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(341) }, "Guarantor Credit Rating Code");
118                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Death Date And Time");
119                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Guarantor Death Flag");
120                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(218) }, "Guarantor Charge Adjustment Code");
121                                      this.add(CP.class, false, 1, 10, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Household Annual Income");
122                                      this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Household Size");
123                                      this.add(CX.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Employer ID Number");
124                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(2) }, "Guarantor Marital Status Code");
125                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Hire Effective Date");
126                                      this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Employment Stop Date");
127                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Living Dependency");
128                                      this.add(IS.class, false, 0, 2, new Object[]{ getMessage() }, "Ambulatory Status");
129                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(171) }, "Citizenship");
130                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(296) }, "Primary Language");
131                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Living Arrangement");
132                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(215) }, "Publicity Code");
133                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Protection Indicator");
134                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Student Indicator");
135                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(6) }, "Religion");
136                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Mother's Maiden Name");
137                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(212) }, "Nationality");
138                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(189) }, "Ethnic Group");
139                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Contact Person's Name");
140                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Contact Person's Telephone Number");
141                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(222) }, "Contact Reason");
142                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Contact Relationship");
143                                      this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Job Title");
144                                      this.add(JCC.class, false, 1, 20, new Object[]{ getMessage(), new Integer(327) }, "Job Code/Class");
145                                      this.add(XON.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Guarantor Employer's Organization Name");
146                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Handicap");
147                                      this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Job Status");
148                                      this.add(FC.class, false, 1, 50, new Object[]{ getMessage(), new Integer(64) }, "Guarantor Financial Class");
149                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(5) }, "Guarantor Race");
150           } catch(HL7Exception e) {
151              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating GT1 - this is probably a bug in the source code generator.", e);
152           }
153        }
154    
155    
156    
157        /**
158         * Returns
159         * GT1-1: "Set ID - GT1" - creates it if necessary
160         */
161        public SI getSetIDGT1() { 
162            SI ret = null;
163            try {
164                Type t = this.getField(1, 0);
165                ret = (SI)t;
166            } catch (ClassCastException cce) {
167                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
168                throw new RuntimeException(cce);
169            } catch (HL7Exception he) {
170                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
171                throw new RuntimeException(he);
172            }
173            return ret;
174        }
175    
176    
177        /**
178         * Returns
179         * GT1-1: "Set ID - GT1" - creates it if necessary
180         */
181        public SI getGt11_SetIDGT1() { 
182            SI ret = null;
183            try {
184                Type t = this.getField(1, 0);
185                ret = (SI)t;
186            } catch (ClassCastException cce) {
187                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
188                throw new RuntimeException(cce);
189            } catch (HL7Exception he) {
190                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
191                throw new RuntimeException(he);
192            }
193            return ret;
194        }
195    
196    
197        /**
198         * Returns all repetitions of Guarantor Number (GT1-2).
199         */
200        public CX[] getGuarantorNumber() {
201            CX[] ret = null;
202            try {
203                Type[] t = this.getField(2);  
204                ret = new CX[t.length];
205                for (int i = 0; i < ret.length; i++) {
206                    ret[i] = (CX)t[i];
207                }
208            } catch (ClassCastException cce) {
209                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
210                throw new RuntimeException(cce);
211            } catch (HL7Exception he) {
212                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
213                throw new RuntimeException(he);
214            }
215            return ret;
216        }
217    
218    
219        /**
220         * Returns a count of the current number of repetitions of Guarantor Number (GT1-2).
221         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
222         * it will return zero.
223         */
224        public int getGuarantorNumberReps() {
225            CX[] ret = null;
226            try {
227                Type[] t = this.getField(2);
228                return t.length;  
229            } catch (ClassCastException cce) {
230                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
231                throw new RuntimeException(cce);
232            } catch (HL7Exception he) {
233                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
234                throw new RuntimeException(he);
235            }
236        }
237    
238    
239        /**
240         * Returns a specific repetition of
241         * GT1-2: "Guarantor Number" - creates it if necessary
242         *
243         * @param rep The repetition index (0-indexed)
244         */
245        public CX getGuarantorNumber(int rep) { 
246            CX ret = null;
247            try {
248                Type t = this.getField(2, rep);
249                ret = (CX)t;
250            } catch (ClassCastException cce) {
251                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
252                throw new RuntimeException(cce);
253            } catch (HL7Exception he) {
254                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
255                throw new RuntimeException(he);
256            }
257            return ret;
258        }
259    
260        /**
261         * Returns a specific repetition of
262         * GT1-2: "Guarantor Number" - creates it if necessary
263         *
264         * @param rep The repetition index (0-indexed)
265         */
266        public CX getGt12_GuarantorNumber(int rep) { 
267            CX ret = null;
268            try {
269                Type t = this.getField(2, rep);
270                ret = (CX)t;
271            } catch (ClassCastException cce) {
272                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
273                throw new RuntimeException(cce);
274            } catch (HL7Exception he) {
275                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
276                throw new RuntimeException(he);
277            }
278            return ret;
279        }
280    
281    
282        /**
283         * Returns a count of the current number of repetitions of Guarantor Number (GT1-2).
284         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
285         * it will return zero.
286         */
287        public int getGt12_GuarantorNumberReps() {
288            CX[] ret = null;
289            try {
290                Type[] t = this.getField(2);
291                return t.length;  
292            } catch (ClassCastException cce) {
293                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
294                throw new RuntimeException(cce);
295            } catch (HL7Exception he) {
296                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
297                throw new RuntimeException(he);
298            }
299        }
300    
301    
302    
303        /**
304         * Inserts a repetition of
305         * GT1-2: "Guarantor Number" at a specific index
306         *
307         * @param rep The repetition index (0-indexed)
308         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
309         */
310        public CX insertGuarantorNumber(int rep) throws HL7Exception { 
311            return (CX) super.insertRepetition(2, rep);
312        }
313    
314    
315    
316        /**
317         * Inserts a repetition of
318         * GT1-2: "Guarantor Number" at a specific index
319         *
320         * @param rep The repetition index (0-indexed)
321         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
322         */
323        public CX insertGt12_GuarantorNumber(int rep) throws HL7Exception { 
324            return (CX) super.insertRepetition(2, rep);
325        }
326    
327    
328        /**
329         * Removes a repetition of
330         * GT1-2: "Guarantor Number" at a specific index
331         *
332         * @param rep The repetition index (0-indexed)
333         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
334         */
335        public CX removeGuarantorNumber(int rep) throws HL7Exception { 
336            return (CX) super.removeRepetition(2, rep);
337        }
338    
339    
340        /**
341         * Removes a repetition of
342         * GT1-2: "Guarantor Number" at a specific index
343         *
344         * @param rep The repetition index (0-indexed)
345         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
346         */
347        public CX removeGt12_GuarantorNumber(int rep) throws HL7Exception { 
348            return (CX) super.removeRepetition(2, rep);
349        }
350    
351    
352    
353        /**
354         * Returns all repetitions of Guarantor Name (GT1-3).
355         */
356        public XPN[] getGuarantorName() {
357            XPN[] ret = null;
358            try {
359                Type[] t = this.getField(3);  
360                ret = new XPN[t.length];
361                for (int i = 0; i < ret.length; i++) {
362                    ret[i] = (XPN)t[i];
363                }
364            } catch (ClassCastException cce) {
365                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
366                throw new RuntimeException(cce);
367            } catch (HL7Exception he) {
368                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
369                throw new RuntimeException(he);
370            }
371            return ret;
372        }
373    
374    
375        /**
376         * Returns a count of the current number of repetitions of Guarantor Name (GT1-3).
377         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
378         * it will return zero.
379         */
380        public int getGuarantorNameReps() {
381            XPN[] ret = null;
382            try {
383                Type[] t = this.getField(3);
384                return t.length;  
385            } catch (ClassCastException cce) {
386                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
387                throw new RuntimeException(cce);
388            } catch (HL7Exception he) {
389                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
390                throw new RuntimeException(he);
391            }
392        }
393    
394    
395        /**
396         * Returns a specific repetition of
397         * GT1-3: "Guarantor Name" - creates it if necessary
398         *
399         * @param rep The repetition index (0-indexed)
400         */
401        public XPN getGuarantorName(int rep) { 
402            XPN ret = null;
403            try {
404                Type t = this.getField(3, rep);
405                ret = (XPN)t;
406            } catch (ClassCastException cce) {
407                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
408                throw new RuntimeException(cce);
409            } catch (HL7Exception he) {
410                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
411                throw new RuntimeException(he);
412            }
413            return ret;
414        }
415    
416        /**
417         * Returns a specific repetition of
418         * GT1-3: "Guarantor Name" - creates it if necessary
419         *
420         * @param rep The repetition index (0-indexed)
421         */
422        public XPN getGt13_GuarantorName(int rep) { 
423            XPN ret = null;
424            try {
425                Type t = this.getField(3, rep);
426                ret = (XPN)t;
427            } catch (ClassCastException cce) {
428                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
429                throw new RuntimeException(cce);
430            } catch (HL7Exception he) {
431                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
432                throw new RuntimeException(he);
433            }
434            return ret;
435        }
436    
437    
438        /**
439         * Returns a count of the current number of repetitions of Guarantor Name (GT1-3).
440         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
441         * it will return zero.
442         */
443        public int getGt13_GuarantorNameReps() {
444            XPN[] ret = null;
445            try {
446                Type[] t = this.getField(3);
447                return t.length;  
448            } catch (ClassCastException cce) {
449                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
450                throw new RuntimeException(cce);
451            } catch (HL7Exception he) {
452                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
453                throw new RuntimeException(he);
454            }
455        }
456    
457    
458    
459        /**
460         * Inserts a repetition of
461         * GT1-3: "Guarantor Name" at a specific index
462         *
463         * @param rep The repetition index (0-indexed)
464         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
465         */
466        public XPN insertGuarantorName(int rep) throws HL7Exception { 
467            return (XPN) super.insertRepetition(3, rep);
468        }
469    
470    
471    
472        /**
473         * Inserts a repetition of
474         * GT1-3: "Guarantor Name" at a specific index
475         *
476         * @param rep The repetition index (0-indexed)
477         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
478         */
479        public XPN insertGt13_GuarantorName(int rep) throws HL7Exception { 
480            return (XPN) super.insertRepetition(3, rep);
481        }
482    
483    
484        /**
485         * Removes a repetition of
486         * GT1-3: "Guarantor Name" at a specific index
487         *
488         * @param rep The repetition index (0-indexed)
489         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
490         */
491        public XPN removeGuarantorName(int rep) throws HL7Exception { 
492            return (XPN) super.removeRepetition(3, rep);
493        }
494    
495    
496        /**
497         * Removes a repetition of
498         * GT1-3: "Guarantor Name" at a specific index
499         *
500         * @param rep The repetition index (0-indexed)
501         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
502         */
503        public XPN removeGt13_GuarantorName(int rep) throws HL7Exception { 
504            return (XPN) super.removeRepetition(3, rep);
505        }
506    
507    
508    
509        /**
510         * Returns all repetitions of Guarantor Spouse Name (GT1-4).
511         */
512        public XPN[] getGuarantorSpouseName() {
513            XPN[] ret = null;
514            try {
515                Type[] t = this.getField(4);  
516                ret = new XPN[t.length];
517                for (int i = 0; i < ret.length; i++) {
518                    ret[i] = (XPN)t[i];
519                }
520            } catch (ClassCastException cce) {
521                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
522                throw new RuntimeException(cce);
523            } catch (HL7Exception he) {
524                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
525                throw new RuntimeException(he);
526            }
527            return ret;
528        }
529    
530    
531        /**
532         * Returns a count of the current number of repetitions of Guarantor Spouse Name (GT1-4).
533         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
534         * it will return zero.
535         */
536        public int getGuarantorSpouseNameReps() {
537            XPN[] ret = null;
538            try {
539                Type[] t = this.getField(4);
540                return t.length;  
541            } catch (ClassCastException cce) {
542                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
543                throw new RuntimeException(cce);
544            } catch (HL7Exception he) {
545                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
546                throw new RuntimeException(he);
547            }
548        }
549    
550    
551        /**
552         * Returns a specific repetition of
553         * GT1-4: "Guarantor Spouse Name" - creates it if necessary
554         *
555         * @param rep The repetition index (0-indexed)
556         */
557        public XPN getGuarantorSpouseName(int rep) { 
558            XPN ret = null;
559            try {
560                Type t = this.getField(4, rep);
561                ret = (XPN)t;
562            } catch (ClassCastException cce) {
563                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
564                throw new RuntimeException(cce);
565            } catch (HL7Exception he) {
566                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
567                throw new RuntimeException(he);
568            }
569            return ret;
570        }
571    
572        /**
573         * Returns a specific repetition of
574         * GT1-4: "Guarantor Spouse Name" - creates it if necessary
575         *
576         * @param rep The repetition index (0-indexed)
577         */
578        public XPN getGt14_GuarantorSpouseName(int rep) { 
579            XPN ret = null;
580            try {
581                Type t = this.getField(4, rep);
582                ret = (XPN)t;
583            } catch (ClassCastException cce) {
584                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
585                throw new RuntimeException(cce);
586            } catch (HL7Exception he) {
587                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
588                throw new RuntimeException(he);
589            }
590            return ret;
591        }
592    
593    
594        /**
595         * Returns a count of the current number of repetitions of Guarantor Spouse Name (GT1-4).
596         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
597         * it will return zero.
598         */
599        public int getGt14_GuarantorSpouseNameReps() {
600            XPN[] ret = null;
601            try {
602                Type[] t = this.getField(4);
603                return t.length;  
604            } catch (ClassCastException cce) {
605                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
606                throw new RuntimeException(cce);
607            } catch (HL7Exception he) {
608                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
609                throw new RuntimeException(he);
610            }
611        }
612    
613    
614    
615        /**
616         * Inserts a repetition of
617         * GT1-4: "Guarantor Spouse Name" at a specific index
618         *
619         * @param rep The repetition index (0-indexed)
620         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
621         */
622        public XPN insertGuarantorSpouseName(int rep) throws HL7Exception { 
623            return (XPN) super.insertRepetition(4, rep);
624        }
625    
626    
627    
628        /**
629         * Inserts a repetition of
630         * GT1-4: "Guarantor Spouse Name" at a specific index
631         *
632         * @param rep The repetition index (0-indexed)
633         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
634         */
635        public XPN insertGt14_GuarantorSpouseName(int rep) throws HL7Exception { 
636            return (XPN) super.insertRepetition(4, rep);
637        }
638    
639    
640        /**
641         * Removes a repetition of
642         * GT1-4: "Guarantor Spouse Name" at a specific index
643         *
644         * @param rep The repetition index (0-indexed)
645         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
646         */
647        public XPN removeGuarantorSpouseName(int rep) throws HL7Exception { 
648            return (XPN) super.removeRepetition(4, rep);
649        }
650    
651    
652        /**
653         * Removes a repetition of
654         * GT1-4: "Guarantor Spouse Name" at a specific index
655         *
656         * @param rep The repetition index (0-indexed)
657         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
658         */
659        public XPN removeGt14_GuarantorSpouseName(int rep) throws HL7Exception { 
660            return (XPN) super.removeRepetition(4, rep);
661        }
662    
663    
664    
665        /**
666         * Returns all repetitions of Guarantor Address (GT1-5).
667         */
668        public XAD[] getGuarantorAddress() {
669            XAD[] ret = null;
670            try {
671                Type[] t = this.getField(5);  
672                ret = new XAD[t.length];
673                for (int i = 0; i < ret.length; i++) {
674                    ret[i] = (XAD)t[i];
675                }
676            } catch (ClassCastException cce) {
677                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
678                throw new RuntimeException(cce);
679            } catch (HL7Exception he) {
680                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
681                throw new RuntimeException(he);
682            }
683            return ret;
684        }
685    
686    
687        /**
688         * Returns a count of the current number of repetitions of Guarantor Address (GT1-5).
689         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
690         * it will return zero.
691         */
692        public int getGuarantorAddressReps() {
693            XAD[] ret = null;
694            try {
695                Type[] t = this.getField(5);
696                return t.length;  
697            } catch (ClassCastException cce) {
698                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
699                throw new RuntimeException(cce);
700            } catch (HL7Exception he) {
701                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
702                throw new RuntimeException(he);
703            }
704        }
705    
706    
707        /**
708         * Returns a specific repetition of
709         * GT1-5: "Guarantor Address" - creates it if necessary
710         *
711         * @param rep The repetition index (0-indexed)
712         */
713        public XAD getGuarantorAddress(int rep) { 
714            XAD ret = null;
715            try {
716                Type t = this.getField(5, rep);
717                ret = (XAD)t;
718            } catch (ClassCastException cce) {
719                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
720                throw new RuntimeException(cce);
721            } catch (HL7Exception he) {
722                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
723                throw new RuntimeException(he);
724            }
725            return ret;
726        }
727    
728        /**
729         * Returns a specific repetition of
730         * GT1-5: "Guarantor Address" - creates it if necessary
731         *
732         * @param rep The repetition index (0-indexed)
733         */
734        public XAD getGt15_GuarantorAddress(int rep) { 
735            XAD ret = null;
736            try {
737                Type t = this.getField(5, rep);
738                ret = (XAD)t;
739            } catch (ClassCastException cce) {
740                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
741                throw new RuntimeException(cce);
742            } catch (HL7Exception he) {
743                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
744                throw new RuntimeException(he);
745            }
746            return ret;
747        }
748    
749    
750        /**
751         * Returns a count of the current number of repetitions of Guarantor Address (GT1-5).
752         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
753         * it will return zero.
754         */
755        public int getGt15_GuarantorAddressReps() {
756            XAD[] ret = null;
757            try {
758                Type[] t = this.getField(5);
759                return t.length;  
760            } catch (ClassCastException cce) {
761                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
762                throw new RuntimeException(cce);
763            } catch (HL7Exception he) {
764                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
765                throw new RuntimeException(he);
766            }
767        }
768    
769    
770    
771        /**
772         * Inserts a repetition of
773         * GT1-5: "Guarantor Address" at a specific index
774         *
775         * @param rep The repetition index (0-indexed)
776         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
777         */
778        public XAD insertGuarantorAddress(int rep) throws HL7Exception { 
779            return (XAD) super.insertRepetition(5, rep);
780        }
781    
782    
783    
784        /**
785         * Inserts a repetition of
786         * GT1-5: "Guarantor Address" at a specific index
787         *
788         * @param rep The repetition index (0-indexed)
789         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
790         */
791        public XAD insertGt15_GuarantorAddress(int rep) throws HL7Exception { 
792            return (XAD) super.insertRepetition(5, rep);
793        }
794    
795    
796        /**
797         * Removes a repetition of
798         * GT1-5: "Guarantor Address" at a specific index
799         *
800         * @param rep The repetition index (0-indexed)
801         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
802         */
803        public XAD removeGuarantorAddress(int rep) throws HL7Exception { 
804            return (XAD) super.removeRepetition(5, rep);
805        }
806    
807    
808        /**
809         * Removes a repetition of
810         * GT1-5: "Guarantor Address" at a specific index
811         *
812         * @param rep The repetition index (0-indexed)
813         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
814         */
815        public XAD removeGt15_GuarantorAddress(int rep) throws HL7Exception { 
816            return (XAD) super.removeRepetition(5, rep);
817        }
818    
819    
820    
821        /**
822         * Returns all repetitions of Guarantor Ph Num - Home (GT1-6).
823         */
824        public XTN[] getGuarantorPhNumHome() {
825            XTN[] ret = null;
826            try {
827                Type[] t = this.getField(6);  
828                ret = new XTN[t.length];
829                for (int i = 0; i < ret.length; i++) {
830                    ret[i] = (XTN)t[i];
831                }
832            } catch (ClassCastException cce) {
833                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
834                throw new RuntimeException(cce);
835            } catch (HL7Exception he) {
836                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
837                throw new RuntimeException(he);
838            }
839            return ret;
840        }
841    
842    
843        /**
844         * Returns a count of the current number of repetitions of Guarantor Ph Num - Home (GT1-6).
845         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
846         * it will return zero.
847         */
848        public int getGuarantorPhNumHomeReps() {
849            XTN[] ret = null;
850            try {
851                Type[] t = this.getField(6);
852                return t.length;  
853            } catch (ClassCastException cce) {
854                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
855                throw new RuntimeException(cce);
856            } catch (HL7Exception he) {
857                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
858                throw new RuntimeException(he);
859            }
860        }
861    
862    
863        /**
864         * Returns a specific repetition of
865         * GT1-6: "Guarantor Ph Num - Home" - creates it if necessary
866         *
867         * @param rep The repetition index (0-indexed)
868         */
869        public XTN getGuarantorPhNumHome(int rep) { 
870            XTN ret = null;
871            try {
872                Type t = this.getField(6, rep);
873                ret = (XTN)t;
874            } catch (ClassCastException cce) {
875                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
876                throw new RuntimeException(cce);
877            } catch (HL7Exception he) {
878                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
879                throw new RuntimeException(he);
880            }
881            return ret;
882        }
883    
884        /**
885         * Returns a specific repetition of
886         * GT1-6: "Guarantor Ph Num - Home" - creates it if necessary
887         *
888         * @param rep The repetition index (0-indexed)
889         */
890        public XTN getGt16_GuarantorPhNumHome(int rep) { 
891            XTN ret = null;
892            try {
893                Type t = this.getField(6, rep);
894                ret = (XTN)t;
895            } catch (ClassCastException cce) {
896                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
897                throw new RuntimeException(cce);
898            } catch (HL7Exception he) {
899                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
900                throw new RuntimeException(he);
901            }
902            return ret;
903        }
904    
905    
906        /**
907         * Returns a count of the current number of repetitions of Guarantor Ph Num - Home (GT1-6).
908         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
909         * it will return zero.
910         */
911        public int getGt16_GuarantorPhNumHomeReps() {
912            XTN[] ret = null;
913            try {
914                Type[] t = this.getField(6);
915                return t.length;  
916            } catch (ClassCastException cce) {
917                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
918                throw new RuntimeException(cce);
919            } catch (HL7Exception he) {
920                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
921                throw new RuntimeException(he);
922            }
923        }
924    
925    
926    
927        /**
928         * Inserts a repetition of
929         * GT1-6: "Guarantor Ph Num - Home" at a specific index
930         *
931         * @param rep The repetition index (0-indexed)
932         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
933         */
934        public XTN insertGuarantorPhNumHome(int rep) throws HL7Exception { 
935            return (XTN) super.insertRepetition(6, rep);
936        }
937    
938    
939    
940        /**
941         * Inserts a repetition of
942         * GT1-6: "Guarantor Ph Num - Home" at a specific index
943         *
944         * @param rep The repetition index (0-indexed)
945         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
946         */
947        public XTN insertGt16_GuarantorPhNumHome(int rep) throws HL7Exception { 
948            return (XTN) super.insertRepetition(6, rep);
949        }
950    
951    
952        /**
953         * Removes a repetition of
954         * GT1-6: "Guarantor Ph Num - Home" at a specific index
955         *
956         * @param rep The repetition index (0-indexed)
957         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
958         */
959        public XTN removeGuarantorPhNumHome(int rep) throws HL7Exception { 
960            return (XTN) super.removeRepetition(6, rep);
961        }
962    
963    
964        /**
965         * Removes a repetition of
966         * GT1-6: "Guarantor Ph Num - Home" at a specific index
967         *
968         * @param rep The repetition index (0-indexed)
969         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
970         */
971        public XTN removeGt16_GuarantorPhNumHome(int rep) throws HL7Exception { 
972            return (XTN) super.removeRepetition(6, rep);
973        }
974    
975    
976    
977        /**
978         * Returns all repetitions of Guarantor Ph Num - Business (GT1-7).
979         */
980        public XTN[] getGuarantorPhNumBusiness() {
981            XTN[] ret = null;
982            try {
983                Type[] t = this.getField(7);  
984                ret = new XTN[t.length];
985                for (int i = 0; i < ret.length; i++) {
986                    ret[i] = (XTN)t[i];
987                }
988            } catch (ClassCastException cce) {
989                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
990                throw new RuntimeException(cce);
991            } catch (HL7Exception he) {
992                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
993                throw new RuntimeException(he);
994            }
995            return ret;
996        }
997    
998    
999        /**
1000         * Returns a count of the current number of repetitions of Guarantor Ph Num - Business (GT1-7).
1001         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1002         * it will return zero.
1003         */
1004        public int getGuarantorPhNumBusinessReps() {
1005            XTN[] ret = null;
1006            try {
1007                Type[] t = this.getField(7);
1008                return t.length;  
1009            } catch (ClassCastException cce) {
1010                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1011                throw new RuntimeException(cce);
1012            } catch (HL7Exception he) {
1013                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1014                throw new RuntimeException(he);
1015            }
1016        }
1017    
1018    
1019        /**
1020         * Returns a specific repetition of
1021         * GT1-7: "Guarantor Ph Num - Business" - creates it if necessary
1022         *
1023         * @param rep The repetition index (0-indexed)
1024         */
1025        public XTN getGuarantorPhNumBusiness(int rep) { 
1026            XTN ret = null;
1027            try {
1028                Type t = this.getField(7, rep);
1029                ret = (XTN)t;
1030            } catch (ClassCastException cce) {
1031                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1032                throw new RuntimeException(cce);
1033            } catch (HL7Exception he) {
1034                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1035                throw new RuntimeException(he);
1036            }
1037            return ret;
1038        }
1039    
1040        /**
1041         * Returns a specific repetition of
1042         * GT1-7: "Guarantor Ph Num - Business" - creates it if necessary
1043         *
1044         * @param rep The repetition index (0-indexed)
1045         */
1046        public XTN getGt17_GuarantorPhNumBusiness(int rep) { 
1047            XTN ret = null;
1048            try {
1049                Type t = this.getField(7, rep);
1050                ret = (XTN)t;
1051            } catch (ClassCastException cce) {
1052                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1053                throw new RuntimeException(cce);
1054            } catch (HL7Exception he) {
1055                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1056                throw new RuntimeException(he);
1057            }
1058            return ret;
1059        }
1060    
1061    
1062        /**
1063         * Returns a count of the current number of repetitions of Guarantor Ph Num - Business (GT1-7).
1064         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1065         * it will return zero.
1066         */
1067        public int getGt17_GuarantorPhNumBusinessReps() {
1068            XTN[] ret = null;
1069            try {
1070                Type[] t = this.getField(7);
1071                return t.length;  
1072            } catch (ClassCastException cce) {
1073                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1074                throw new RuntimeException(cce);
1075            } catch (HL7Exception he) {
1076                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1077                throw new RuntimeException(he);
1078            }
1079        }
1080    
1081    
1082    
1083        /**
1084         * Inserts a repetition of
1085         * GT1-7: "Guarantor Ph Num - Business" at a specific index
1086         *
1087         * @param rep The repetition index (0-indexed)
1088         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1089         */
1090        public XTN insertGuarantorPhNumBusiness(int rep) throws HL7Exception { 
1091            return (XTN) super.insertRepetition(7, rep);
1092        }
1093    
1094    
1095    
1096        /**
1097         * Inserts a repetition of
1098         * GT1-7: "Guarantor Ph Num - Business" at a specific index
1099         *
1100         * @param rep The repetition index (0-indexed)
1101         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1102         */
1103        public XTN insertGt17_GuarantorPhNumBusiness(int rep) throws HL7Exception { 
1104            return (XTN) super.insertRepetition(7, rep);
1105        }
1106    
1107    
1108        /**
1109         * Removes a repetition of
1110         * GT1-7: "Guarantor Ph Num - Business" at a specific index
1111         *
1112         * @param rep The repetition index (0-indexed)
1113         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1114         */
1115        public XTN removeGuarantorPhNumBusiness(int rep) throws HL7Exception { 
1116            return (XTN) super.removeRepetition(7, rep);
1117        }
1118    
1119    
1120        /**
1121         * Removes a repetition of
1122         * GT1-7: "Guarantor Ph Num - Business" at a specific index
1123         *
1124         * @param rep The repetition index (0-indexed)
1125         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1126         */
1127        public XTN removeGt17_GuarantorPhNumBusiness(int rep) throws HL7Exception { 
1128            return (XTN) super.removeRepetition(7, rep);
1129        }
1130    
1131    
1132    
1133    
1134        /**
1135         * Returns
1136         * GT1-8: "Guarantor Date/Time Of Birth" - creates it if necessary
1137         */
1138        public TS getGuarantorDateTimeOfBirth() { 
1139            TS ret = null;
1140            try {
1141                Type t = this.getField(8, 0);
1142                ret = (TS)t;
1143            } catch (ClassCastException cce) {
1144                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1145                throw new RuntimeException(cce);
1146            } catch (HL7Exception he) {
1147                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1148                throw new RuntimeException(he);
1149            }
1150            return ret;
1151        }
1152    
1153    
1154        /**
1155         * Returns
1156         * GT1-8: "Guarantor Date/Time Of Birth" - creates it if necessary
1157         */
1158        public TS getGt18_GuarantorDateTimeOfBirth() { 
1159            TS ret = null;
1160            try {
1161                Type t = this.getField(8, 0);
1162                ret = (TS)t;
1163            } catch (ClassCastException cce) {
1164                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1165                throw new RuntimeException(cce);
1166            } catch (HL7Exception he) {
1167                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1168                throw new RuntimeException(he);
1169            }
1170            return ret;
1171        }
1172    
1173    
1174    
1175        /**
1176         * Returns
1177         * GT1-9: "Guarantor Administrative Sex" - creates it if necessary
1178         */
1179        public IS getGuarantorAdministrativeSex() { 
1180            IS ret = null;
1181            try {
1182                Type t = this.getField(9, 0);
1183                ret = (IS)t;
1184            } catch (ClassCastException cce) {
1185                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1186                throw new RuntimeException(cce);
1187            } catch (HL7Exception he) {
1188                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1189                throw new RuntimeException(he);
1190            }
1191            return ret;
1192        }
1193    
1194    
1195        /**
1196         * Returns
1197         * GT1-9: "Guarantor Administrative Sex" - creates it if necessary
1198         */
1199        public IS getGt19_GuarantorAdministrativeSex() { 
1200            IS ret = null;
1201            try {
1202                Type t = this.getField(9, 0);
1203                ret = (IS)t;
1204            } catch (ClassCastException cce) {
1205                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1206                throw new RuntimeException(cce);
1207            } catch (HL7Exception he) {
1208                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1209                throw new RuntimeException(he);
1210            }
1211            return ret;
1212        }
1213    
1214    
1215    
1216        /**
1217         * Returns
1218         * GT1-10: "Guarantor Type" - creates it if necessary
1219         */
1220        public IS getGuarantorType() { 
1221            IS ret = null;
1222            try {
1223                Type t = this.getField(10, 0);
1224                ret = (IS)t;
1225            } catch (ClassCastException cce) {
1226                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1227                throw new RuntimeException(cce);
1228            } catch (HL7Exception he) {
1229                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1230                throw new RuntimeException(he);
1231            }
1232            return ret;
1233        }
1234    
1235    
1236        /**
1237         * Returns
1238         * GT1-10: "Guarantor Type" - creates it if necessary
1239         */
1240        public IS getGt110_GuarantorType() { 
1241            IS ret = null;
1242            try {
1243                Type t = this.getField(10, 0);
1244                ret = (IS)t;
1245            } catch (ClassCastException cce) {
1246                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1247                throw new RuntimeException(cce);
1248            } catch (HL7Exception he) {
1249                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1250                throw new RuntimeException(he);
1251            }
1252            return ret;
1253        }
1254    
1255    
1256    
1257        /**
1258         * Returns
1259         * GT1-11: "Guarantor Relationship" - creates it if necessary
1260         */
1261        public CE getGuarantorRelationship() { 
1262            CE ret = null;
1263            try {
1264                Type t = this.getField(11, 0);
1265                ret = (CE)t;
1266            } catch (ClassCastException cce) {
1267                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1268                throw new RuntimeException(cce);
1269            } catch (HL7Exception he) {
1270                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1271                throw new RuntimeException(he);
1272            }
1273            return ret;
1274        }
1275    
1276    
1277        /**
1278         * Returns
1279         * GT1-11: "Guarantor Relationship" - creates it if necessary
1280         */
1281        public CE getGt111_GuarantorRelationship() { 
1282            CE ret = null;
1283            try {
1284                Type t = this.getField(11, 0);
1285                ret = (CE)t;
1286            } catch (ClassCastException cce) {
1287                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1288                throw new RuntimeException(cce);
1289            } catch (HL7Exception he) {
1290                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1291                throw new RuntimeException(he);
1292            }
1293            return ret;
1294        }
1295    
1296    
1297    
1298        /**
1299         * Returns
1300         * GT1-12: "Guarantor SSN" - creates it if necessary
1301         */
1302        public ST getGuarantorSSN() { 
1303            ST ret = null;
1304            try {
1305                Type t = this.getField(12, 0);
1306                ret = (ST)t;
1307            } catch (ClassCastException cce) {
1308                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1309                throw new RuntimeException(cce);
1310            } catch (HL7Exception he) {
1311                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1312                throw new RuntimeException(he);
1313            }
1314            return ret;
1315        }
1316    
1317    
1318        /**
1319         * Returns
1320         * GT1-12: "Guarantor SSN" - creates it if necessary
1321         */
1322        public ST getGt112_GuarantorSSN() { 
1323            ST ret = null;
1324            try {
1325                Type t = this.getField(12, 0);
1326                ret = (ST)t;
1327            } catch (ClassCastException cce) {
1328                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1329                throw new RuntimeException(cce);
1330            } catch (HL7Exception he) {
1331                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1332                throw new RuntimeException(he);
1333            }
1334            return ret;
1335        }
1336    
1337    
1338    
1339        /**
1340         * Returns
1341         * GT1-13: "Guarantor Date - Begin" - creates it if necessary
1342         */
1343        public DT getGuarantorDateBegin() { 
1344            DT ret = null;
1345            try {
1346                Type t = this.getField(13, 0);
1347                ret = (DT)t;
1348            } catch (ClassCastException cce) {
1349                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1350                throw new RuntimeException(cce);
1351            } catch (HL7Exception he) {
1352                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1353                throw new RuntimeException(he);
1354            }
1355            return ret;
1356        }
1357    
1358    
1359        /**
1360         * Returns
1361         * GT1-13: "Guarantor Date - Begin" - creates it if necessary
1362         */
1363        public DT getGt113_GuarantorDateBegin() { 
1364            DT ret = null;
1365            try {
1366                Type t = this.getField(13, 0);
1367                ret = (DT)t;
1368            } catch (ClassCastException cce) {
1369                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1370                throw new RuntimeException(cce);
1371            } catch (HL7Exception he) {
1372                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1373                throw new RuntimeException(he);
1374            }
1375            return ret;
1376        }
1377    
1378    
1379    
1380        /**
1381         * Returns
1382         * GT1-14: "Guarantor Date - End" - creates it if necessary
1383         */
1384        public DT getGuarantorDateEnd() { 
1385            DT ret = null;
1386            try {
1387                Type t = this.getField(14, 0);
1388                ret = (DT)t;
1389            } catch (ClassCastException cce) {
1390                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1391                throw new RuntimeException(cce);
1392            } catch (HL7Exception he) {
1393                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1394                throw new RuntimeException(he);
1395            }
1396            return ret;
1397        }
1398    
1399    
1400        /**
1401         * Returns
1402         * GT1-14: "Guarantor Date - End" - creates it if necessary
1403         */
1404        public DT getGt114_GuarantorDateEnd() { 
1405            DT ret = null;
1406            try {
1407                Type t = this.getField(14, 0);
1408                ret = (DT)t;
1409            } catch (ClassCastException cce) {
1410                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1411                throw new RuntimeException(cce);
1412            } catch (HL7Exception he) {
1413                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1414                throw new RuntimeException(he);
1415            }
1416            return ret;
1417        }
1418    
1419    
1420    
1421        /**
1422         * Returns
1423         * GT1-15: "Guarantor Priority" - creates it if necessary
1424         */
1425        public NM getGuarantorPriority() { 
1426            NM ret = null;
1427            try {
1428                Type t = this.getField(15, 0);
1429                ret = (NM)t;
1430            } catch (ClassCastException cce) {
1431                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1432                throw new RuntimeException(cce);
1433            } catch (HL7Exception he) {
1434                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1435                throw new RuntimeException(he);
1436            }
1437            return ret;
1438        }
1439    
1440    
1441        /**
1442         * Returns
1443         * GT1-15: "Guarantor Priority" - creates it if necessary
1444         */
1445        public NM getGt115_GuarantorPriority() { 
1446            NM ret = null;
1447            try {
1448                Type t = this.getField(15, 0);
1449                ret = (NM)t;
1450            } catch (ClassCastException cce) {
1451                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1452                throw new RuntimeException(cce);
1453            } catch (HL7Exception he) {
1454                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1455                throw new RuntimeException(he);
1456            }
1457            return ret;
1458        }
1459    
1460    
1461        /**
1462         * Returns all repetitions of Guarantor Employer Name (GT1-16).
1463         */
1464        public XPN[] getGuarantorEmployerName() {
1465            XPN[] ret = null;
1466            try {
1467                Type[] t = this.getField(16);  
1468                ret = new XPN[t.length];
1469                for (int i = 0; i < ret.length; i++) {
1470                    ret[i] = (XPN)t[i];
1471                }
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 a count of the current number of repetitions of Guarantor Employer Name (GT1-16).
1485         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1486         * it will return zero.
1487         */
1488        public int getGuarantorEmployerNameReps() {
1489            XPN[] ret = null;
1490            try {
1491                Type[] t = this.getField(16);
1492                return t.length;  
1493            } catch (ClassCastException cce) {
1494                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1495                throw new RuntimeException(cce);
1496            } catch (HL7Exception he) {
1497                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1498                throw new RuntimeException(he);
1499            }
1500        }
1501    
1502    
1503        /**
1504         * Returns a specific repetition of
1505         * GT1-16: "Guarantor Employer Name" - creates it if necessary
1506         *
1507         * @param rep The repetition index (0-indexed)
1508         */
1509        public XPN getGuarantorEmployerName(int rep) { 
1510            XPN ret = null;
1511            try {
1512                Type t = this.getField(16, rep);
1513                ret = (XPN)t;
1514            } catch (ClassCastException cce) {
1515                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1516                throw new RuntimeException(cce);
1517            } catch (HL7Exception he) {
1518                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1519                throw new RuntimeException(he);
1520            }
1521            return ret;
1522        }
1523    
1524        /**
1525         * Returns a specific repetition of
1526         * GT1-16: "Guarantor Employer Name" - creates it if necessary
1527         *
1528         * @param rep The repetition index (0-indexed)
1529         */
1530        public XPN getGt116_GuarantorEmployerName(int rep) { 
1531            XPN ret = null;
1532            try {
1533                Type t = this.getField(16, rep);
1534                ret = (XPN)t;
1535            } catch (ClassCastException cce) {
1536                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1537                throw new RuntimeException(cce);
1538            } catch (HL7Exception he) {
1539                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1540                throw new RuntimeException(he);
1541            }
1542            return ret;
1543        }
1544    
1545    
1546        /**
1547         * Returns a count of the current number of repetitions of Guarantor Employer Name (GT1-16).
1548         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1549         * it will return zero.
1550         */
1551        public int getGt116_GuarantorEmployerNameReps() {
1552            XPN[] ret = null;
1553            try {
1554                Type[] t = this.getField(16);
1555                return t.length;  
1556            } catch (ClassCastException cce) {
1557                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1558                throw new RuntimeException(cce);
1559            } catch (HL7Exception he) {
1560                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1561                throw new RuntimeException(he);
1562            }
1563        }
1564    
1565    
1566    
1567        /**
1568         * Inserts a repetition of
1569         * GT1-16: "Guarantor Employer Name" at a specific index
1570         *
1571         * @param rep The repetition index (0-indexed)
1572         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1573         */
1574        public XPN insertGuarantorEmployerName(int rep) throws HL7Exception { 
1575            return (XPN) super.insertRepetition(16, rep);
1576        }
1577    
1578    
1579    
1580        /**
1581         * Inserts a repetition of
1582         * GT1-16: "Guarantor Employer Name" at a specific index
1583         *
1584         * @param rep The repetition index (0-indexed)
1585         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1586         */
1587        public XPN insertGt116_GuarantorEmployerName(int rep) throws HL7Exception { 
1588            return (XPN) super.insertRepetition(16, rep);
1589        }
1590    
1591    
1592        /**
1593         * Removes a repetition of
1594         * GT1-16: "Guarantor Employer Name" at a specific index
1595         *
1596         * @param rep The repetition index (0-indexed)
1597         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1598         */
1599        public XPN removeGuarantorEmployerName(int rep) throws HL7Exception { 
1600            return (XPN) super.removeRepetition(16, rep);
1601        }
1602    
1603    
1604        /**
1605         * Removes a repetition of
1606         * GT1-16: "Guarantor Employer Name" at a specific index
1607         *
1608         * @param rep The repetition index (0-indexed)
1609         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1610         */
1611        public XPN removeGt116_GuarantorEmployerName(int rep) throws HL7Exception { 
1612            return (XPN) super.removeRepetition(16, rep);
1613        }
1614    
1615    
1616    
1617        /**
1618         * Returns all repetitions of Guarantor Employer Address (GT1-17).
1619         */
1620        public XAD[] getGuarantorEmployerAddress() {
1621            XAD[] ret = null;
1622            try {
1623                Type[] t = this.getField(17);  
1624                ret = new XAD[t.length];
1625                for (int i = 0; i < ret.length; i++) {
1626                    ret[i] = (XAD)t[i];
1627                }
1628            } catch (ClassCastException cce) {
1629                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1630                throw new RuntimeException(cce);
1631            } catch (HL7Exception he) {
1632                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1633                throw new RuntimeException(he);
1634            }
1635            return ret;
1636        }
1637    
1638    
1639        /**
1640         * Returns a count of the current number of repetitions of Guarantor Employer Address (GT1-17).
1641         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1642         * it will return zero.
1643         */
1644        public int getGuarantorEmployerAddressReps() {
1645            XAD[] ret = null;
1646            try {
1647                Type[] t = this.getField(17);
1648                return t.length;  
1649            } catch (ClassCastException cce) {
1650                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1651                throw new RuntimeException(cce);
1652            } catch (HL7Exception he) {
1653                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1654                throw new RuntimeException(he);
1655            }
1656        }
1657    
1658    
1659        /**
1660         * Returns a specific repetition of
1661         * GT1-17: "Guarantor Employer Address" - creates it if necessary
1662         *
1663         * @param rep The repetition index (0-indexed)
1664         */
1665        public XAD getGuarantorEmployerAddress(int rep) { 
1666            XAD ret = null;
1667            try {
1668                Type t = this.getField(17, rep);
1669                ret = (XAD)t;
1670            } catch (ClassCastException cce) {
1671                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1672                throw new RuntimeException(cce);
1673            } catch (HL7Exception he) {
1674                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1675                throw new RuntimeException(he);
1676            }
1677            return ret;
1678        }
1679    
1680        /**
1681         * Returns a specific repetition of
1682         * GT1-17: "Guarantor Employer Address" - creates it if necessary
1683         *
1684         * @param rep The repetition index (0-indexed)
1685         */
1686        public XAD getGt117_GuarantorEmployerAddress(int rep) { 
1687            XAD ret = null;
1688            try {
1689                Type t = this.getField(17, rep);
1690                ret = (XAD)t;
1691            } catch (ClassCastException cce) {
1692                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1693                throw new RuntimeException(cce);
1694            } catch (HL7Exception he) {
1695                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1696                throw new RuntimeException(he);
1697            }
1698            return ret;
1699        }
1700    
1701    
1702        /**
1703         * Returns a count of the current number of repetitions of Guarantor Employer Address (GT1-17).
1704         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1705         * it will return zero.
1706         */
1707        public int getGt117_GuarantorEmployerAddressReps() {
1708            XAD[] ret = null;
1709            try {
1710                Type[] t = this.getField(17);
1711                return t.length;  
1712            } catch (ClassCastException cce) {
1713                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1714                throw new RuntimeException(cce);
1715            } catch (HL7Exception he) {
1716                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1717                throw new RuntimeException(he);
1718            }
1719        }
1720    
1721    
1722    
1723        /**
1724         * Inserts a repetition of
1725         * GT1-17: "Guarantor Employer Address" at a specific index
1726         *
1727         * @param rep The repetition index (0-indexed)
1728         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1729         */
1730        public XAD insertGuarantorEmployerAddress(int rep) throws HL7Exception { 
1731            return (XAD) super.insertRepetition(17, rep);
1732        }
1733    
1734    
1735    
1736        /**
1737         * Inserts a repetition of
1738         * GT1-17: "Guarantor Employer Address" at a specific index
1739         *
1740         * @param rep The repetition index (0-indexed)
1741         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1742         */
1743        public XAD insertGt117_GuarantorEmployerAddress(int rep) throws HL7Exception { 
1744            return (XAD) super.insertRepetition(17, rep);
1745        }
1746    
1747    
1748        /**
1749         * Removes a repetition of
1750         * GT1-17: "Guarantor Employer Address" at a specific index
1751         *
1752         * @param rep The repetition index (0-indexed)
1753         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1754         */
1755        public XAD removeGuarantorEmployerAddress(int rep) throws HL7Exception { 
1756            return (XAD) super.removeRepetition(17, rep);
1757        }
1758    
1759    
1760        /**
1761         * Removes a repetition of
1762         * GT1-17: "Guarantor Employer Address" at a specific index
1763         *
1764         * @param rep The repetition index (0-indexed)
1765         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1766         */
1767        public XAD removeGt117_GuarantorEmployerAddress(int rep) throws HL7Exception { 
1768            return (XAD) super.removeRepetition(17, rep);
1769        }
1770    
1771    
1772    
1773        /**
1774         * Returns all repetitions of Guarantor Employer Phone Number (GT1-18).
1775         */
1776        public XTN[] getGuarantorEmployerPhoneNumber() {
1777            XTN[] ret = null;
1778            try {
1779                Type[] t = this.getField(18);  
1780                ret = new XTN[t.length];
1781                for (int i = 0; i < ret.length; i++) {
1782                    ret[i] = (XTN)t[i];
1783                }
1784            } catch (ClassCastException cce) {
1785                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1786                throw new RuntimeException(cce);
1787            } catch (HL7Exception he) {
1788                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1789                throw new RuntimeException(he);
1790            }
1791            return ret;
1792        }
1793    
1794    
1795        /**
1796         * Returns a count of the current number of repetitions of Guarantor Employer Phone Number (GT1-18).
1797         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1798         * it will return zero.
1799         */
1800        public int getGuarantorEmployerPhoneNumberReps() {
1801            XTN[] ret = null;
1802            try {
1803                Type[] t = this.getField(18);
1804                return t.length;  
1805            } catch (ClassCastException cce) {
1806                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1807                throw new RuntimeException(cce);
1808            } catch (HL7Exception he) {
1809                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1810                throw new RuntimeException(he);
1811            }
1812        }
1813    
1814    
1815        /**
1816         * Returns a specific repetition of
1817         * GT1-18: "Guarantor Employer Phone Number" - creates it if necessary
1818         *
1819         * @param rep The repetition index (0-indexed)
1820         */
1821        public XTN getGuarantorEmployerPhoneNumber(int rep) { 
1822            XTN ret = null;
1823            try {
1824                Type t = this.getField(18, rep);
1825                ret = (XTN)t;
1826            } catch (ClassCastException cce) {
1827                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1828                throw new RuntimeException(cce);
1829            } catch (HL7Exception he) {
1830                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1831                throw new RuntimeException(he);
1832            }
1833            return ret;
1834        }
1835    
1836        /**
1837         * Returns a specific repetition of
1838         * GT1-18: "Guarantor Employer Phone Number" - creates it if necessary
1839         *
1840         * @param rep The repetition index (0-indexed)
1841         */
1842        public XTN getGt118_GuarantorEmployerPhoneNumber(int rep) { 
1843            XTN ret = null;
1844            try {
1845                Type t = this.getField(18, rep);
1846                ret = (XTN)t;
1847            } catch (ClassCastException cce) {
1848                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1849                throw new RuntimeException(cce);
1850            } catch (HL7Exception he) {
1851                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1852                throw new RuntimeException(he);
1853            }
1854            return ret;
1855        }
1856    
1857    
1858        /**
1859         * Returns a count of the current number of repetitions of Guarantor Employer Phone Number (GT1-18).
1860         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1861         * it will return zero.
1862         */
1863        public int getGt118_GuarantorEmployerPhoneNumberReps() {
1864            XTN[] ret = null;
1865            try {
1866                Type[] t = this.getField(18);
1867                return t.length;  
1868            } catch (ClassCastException cce) {
1869                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1870                throw new RuntimeException(cce);
1871            } catch (HL7Exception he) {
1872                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1873                throw new RuntimeException(he);
1874            }
1875        }
1876    
1877    
1878    
1879        /**
1880         * Inserts a repetition of
1881         * GT1-18: "Guarantor Employer Phone Number" at a specific index
1882         *
1883         * @param rep The repetition index (0-indexed)
1884         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1885         */
1886        public XTN insertGuarantorEmployerPhoneNumber(int rep) throws HL7Exception { 
1887            return (XTN) super.insertRepetition(18, rep);
1888        }
1889    
1890    
1891    
1892        /**
1893         * Inserts a repetition of
1894         * GT1-18: "Guarantor Employer Phone Number" at a specific index
1895         *
1896         * @param rep The repetition index (0-indexed)
1897         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1898         */
1899        public XTN insertGt118_GuarantorEmployerPhoneNumber(int rep) throws HL7Exception { 
1900            return (XTN) super.insertRepetition(18, rep);
1901        }
1902    
1903    
1904        /**
1905         * Removes a repetition of
1906         * GT1-18: "Guarantor Employer Phone Number" at a specific index
1907         *
1908         * @param rep The repetition index (0-indexed)
1909         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1910         */
1911        public XTN removeGuarantorEmployerPhoneNumber(int rep) throws HL7Exception { 
1912            return (XTN) super.removeRepetition(18, rep);
1913        }
1914    
1915    
1916        /**
1917         * Removes a repetition of
1918         * GT1-18: "Guarantor Employer Phone Number" at a specific index
1919         *
1920         * @param rep The repetition index (0-indexed)
1921         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1922         */
1923        public XTN removeGt118_GuarantorEmployerPhoneNumber(int rep) throws HL7Exception { 
1924            return (XTN) super.removeRepetition(18, rep);
1925        }
1926    
1927    
1928    
1929        /**
1930         * Returns all repetitions of Guarantor Employee ID Number (GT1-19).
1931         */
1932        public CX[] getGuarantorEmployeeIDNumber() {
1933            CX[] ret = null;
1934            try {
1935                Type[] t = this.getField(19);  
1936                ret = new CX[t.length];
1937                for (int i = 0; i < ret.length; i++) {
1938                    ret[i] = (CX)t[i];
1939                }
1940            } catch (ClassCastException cce) {
1941                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1942                throw new RuntimeException(cce);
1943            } catch (HL7Exception he) {
1944                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1945                throw new RuntimeException(he);
1946            }
1947            return ret;
1948        }
1949    
1950    
1951        /**
1952         * Returns a count of the current number of repetitions of Guarantor Employee ID Number (GT1-19).
1953         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1954         * it will return zero.
1955         */
1956        public int getGuarantorEmployeeIDNumberReps() {
1957            CX[] ret = null;
1958            try {
1959                Type[] t = this.getField(19);
1960                return t.length;  
1961            } catch (ClassCastException cce) {
1962                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1963                throw new RuntimeException(cce);
1964            } catch (HL7Exception he) {
1965                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1966                throw new RuntimeException(he);
1967            }
1968        }
1969    
1970    
1971        /**
1972         * Returns a specific repetition of
1973         * GT1-19: "Guarantor Employee ID Number" - creates it if necessary
1974         *
1975         * @param rep The repetition index (0-indexed)
1976         */
1977        public CX getGuarantorEmployeeIDNumber(int rep) { 
1978            CX ret = null;
1979            try {
1980                Type t = this.getField(19, rep);
1981                ret = (CX)t;
1982            } catch (ClassCastException cce) {
1983                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1984                throw new RuntimeException(cce);
1985            } catch (HL7Exception he) {
1986                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1987                throw new RuntimeException(he);
1988            }
1989            return ret;
1990        }
1991    
1992        /**
1993         * Returns a specific repetition of
1994         * GT1-19: "Guarantor Employee ID Number" - creates it if necessary
1995         *
1996         * @param rep The repetition index (0-indexed)
1997         */
1998        public CX getGt119_GuarantorEmployeeIDNumber(int rep) { 
1999            CX ret = null;
2000            try {
2001                Type t = this.getField(19, rep);
2002                ret = (CX)t;
2003            } catch (ClassCastException cce) {
2004                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2005                throw new RuntimeException(cce);
2006            } catch (HL7Exception he) {
2007                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2008                throw new RuntimeException(he);
2009            }
2010            return ret;
2011        }
2012    
2013    
2014        /**
2015         * Returns a count of the current number of repetitions of Guarantor Employee ID Number (GT1-19).
2016         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2017         * it will return zero.
2018         */
2019        public int getGt119_GuarantorEmployeeIDNumberReps() {
2020            CX[] ret = null;
2021            try {
2022                Type[] t = this.getField(19);
2023                return t.length;  
2024            } catch (ClassCastException cce) {
2025                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2026                throw new RuntimeException(cce);
2027            } catch (HL7Exception he) {
2028                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2029                throw new RuntimeException(he);
2030            }
2031        }
2032    
2033    
2034    
2035        /**
2036         * Inserts a repetition of
2037         * GT1-19: "Guarantor Employee ID Number" at a specific index
2038         *
2039         * @param rep The repetition index (0-indexed)
2040         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2041         */
2042        public CX insertGuarantorEmployeeIDNumber(int rep) throws HL7Exception { 
2043            return (CX) super.insertRepetition(19, rep);
2044        }
2045    
2046    
2047    
2048        /**
2049         * Inserts a repetition of
2050         * GT1-19: "Guarantor Employee ID Number" at a specific index
2051         *
2052         * @param rep The repetition index (0-indexed)
2053         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2054         */
2055        public CX insertGt119_GuarantorEmployeeIDNumber(int rep) throws HL7Exception { 
2056            return (CX) super.insertRepetition(19, rep);
2057        }
2058    
2059    
2060        /**
2061         * Removes a repetition of
2062         * GT1-19: "Guarantor Employee ID Number" at a specific index
2063         *
2064         * @param rep The repetition index (0-indexed)
2065         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2066         */
2067        public CX removeGuarantorEmployeeIDNumber(int rep) throws HL7Exception { 
2068            return (CX) super.removeRepetition(19, rep);
2069        }
2070    
2071    
2072        /**
2073         * Removes a repetition of
2074         * GT1-19: "Guarantor Employee ID Number" at a specific index
2075         *
2076         * @param rep The repetition index (0-indexed)
2077         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2078         */
2079        public CX removeGt119_GuarantorEmployeeIDNumber(int rep) throws HL7Exception { 
2080            return (CX) super.removeRepetition(19, rep);
2081        }
2082    
2083    
2084    
2085    
2086        /**
2087         * Returns
2088         * GT1-20: "Guarantor Employment Status" - creates it if necessary
2089         */
2090        public IS getGuarantorEmploymentStatus() { 
2091            IS ret = null;
2092            try {
2093                Type t = this.getField(20, 0);
2094                ret = (IS)t;
2095            } catch (ClassCastException cce) {
2096                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2097                throw new RuntimeException(cce);
2098            } catch (HL7Exception he) {
2099                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2100                throw new RuntimeException(he);
2101            }
2102            return ret;
2103        }
2104    
2105    
2106        /**
2107         * Returns
2108         * GT1-20: "Guarantor Employment Status" - creates it if necessary
2109         */
2110        public IS getGt120_GuarantorEmploymentStatus() { 
2111            IS ret = null;
2112            try {
2113                Type t = this.getField(20, 0);
2114                ret = (IS)t;
2115            } catch (ClassCastException cce) {
2116                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2117                throw new RuntimeException(cce);
2118            } catch (HL7Exception he) {
2119                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2120                throw new RuntimeException(he);
2121            }
2122            return ret;
2123        }
2124    
2125    
2126        /**
2127         * Returns all repetitions of Guarantor Organization Name (GT1-21).
2128         */
2129        public XON[] getGuarantorOrganizationName() {
2130            XON[] ret = null;
2131            try {
2132                Type[] t = this.getField(21);  
2133                ret = new XON[t.length];
2134                for (int i = 0; i < ret.length; i++) {
2135                    ret[i] = (XON)t[i];
2136                }
2137            } catch (ClassCastException cce) {
2138                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2139                throw new RuntimeException(cce);
2140            } catch (HL7Exception he) {
2141                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2142                throw new RuntimeException(he);
2143            }
2144            return ret;
2145        }
2146    
2147    
2148        /**
2149         * Returns a count of the current number of repetitions of Guarantor Organization Name (GT1-21).
2150         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2151         * it will return zero.
2152         */
2153        public int getGuarantorOrganizationNameReps() {
2154            XON[] ret = null;
2155            try {
2156                Type[] t = this.getField(21);
2157                return t.length;  
2158            } catch (ClassCastException cce) {
2159                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2160                throw new RuntimeException(cce);
2161            } catch (HL7Exception he) {
2162                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2163                throw new RuntimeException(he);
2164            }
2165        }
2166    
2167    
2168        /**
2169         * Returns a specific repetition of
2170         * GT1-21: "Guarantor Organization Name" - creates it if necessary
2171         *
2172         * @param rep The repetition index (0-indexed)
2173         */
2174        public XON getGuarantorOrganizationName(int rep) { 
2175            XON ret = null;
2176            try {
2177                Type t = this.getField(21, rep);
2178                ret = (XON)t;
2179            } catch (ClassCastException cce) {
2180                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2181                throw new RuntimeException(cce);
2182            } catch (HL7Exception he) {
2183                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2184                throw new RuntimeException(he);
2185            }
2186            return ret;
2187        }
2188    
2189        /**
2190         * Returns a specific repetition of
2191         * GT1-21: "Guarantor Organization Name" - creates it if necessary
2192         *
2193         * @param rep The repetition index (0-indexed)
2194         */
2195        public XON getGt121_GuarantorOrganizationName(int rep) { 
2196            XON ret = null;
2197            try {
2198                Type t = this.getField(21, rep);
2199                ret = (XON)t;
2200            } catch (ClassCastException cce) {
2201                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2202                throw new RuntimeException(cce);
2203            } catch (HL7Exception he) {
2204                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2205                throw new RuntimeException(he);
2206            }
2207            return ret;
2208        }
2209    
2210    
2211        /**
2212         * Returns a count of the current number of repetitions of Guarantor Organization Name (GT1-21).
2213         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2214         * it will return zero.
2215         */
2216        public int getGt121_GuarantorOrganizationNameReps() {
2217            XON[] ret = null;
2218            try {
2219                Type[] t = this.getField(21);
2220                return t.length;  
2221            } catch (ClassCastException cce) {
2222                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2223                throw new RuntimeException(cce);
2224            } catch (HL7Exception he) {
2225                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2226                throw new RuntimeException(he);
2227            }
2228        }
2229    
2230    
2231    
2232        /**
2233         * Inserts a repetition of
2234         * GT1-21: "Guarantor Organization Name" at a specific index
2235         *
2236         * @param rep The repetition index (0-indexed)
2237         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2238         */
2239        public XON insertGuarantorOrganizationName(int rep) throws HL7Exception { 
2240            return (XON) super.insertRepetition(21, rep);
2241        }
2242    
2243    
2244    
2245        /**
2246         * Inserts a repetition of
2247         * GT1-21: "Guarantor Organization Name" at a specific index
2248         *
2249         * @param rep The repetition index (0-indexed)
2250         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2251         */
2252        public XON insertGt121_GuarantorOrganizationName(int rep) throws HL7Exception { 
2253            return (XON) super.insertRepetition(21, rep);
2254        }
2255    
2256    
2257        /**
2258         * Removes a repetition of
2259         * GT1-21: "Guarantor Organization Name" at a specific index
2260         *
2261         * @param rep The repetition index (0-indexed)
2262         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2263         */
2264        public XON removeGuarantorOrganizationName(int rep) throws HL7Exception { 
2265            return (XON) super.removeRepetition(21, rep);
2266        }
2267    
2268    
2269        /**
2270         * Removes a repetition of
2271         * GT1-21: "Guarantor Organization Name" at a specific index
2272         *
2273         * @param rep The repetition index (0-indexed)
2274         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2275         */
2276        public XON removeGt121_GuarantorOrganizationName(int rep) throws HL7Exception { 
2277            return (XON) super.removeRepetition(21, rep);
2278        }
2279    
2280    
2281    
2282    
2283        /**
2284         * Returns
2285         * GT1-22: "Guarantor Billing Hold Flag" - creates it if necessary
2286         */
2287        public ID getGuarantorBillingHoldFlag() { 
2288            ID ret = null;
2289            try {
2290                Type t = this.getField(22, 0);
2291                ret = (ID)t;
2292            } catch (ClassCastException cce) {
2293                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2294                throw new RuntimeException(cce);
2295            } catch (HL7Exception he) {
2296                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2297                throw new RuntimeException(he);
2298            }
2299            return ret;
2300        }
2301    
2302    
2303        /**
2304         * Returns
2305         * GT1-22: "Guarantor Billing Hold Flag" - creates it if necessary
2306         */
2307        public ID getGt122_GuarantorBillingHoldFlag() { 
2308            ID ret = null;
2309            try {
2310                Type t = this.getField(22, 0);
2311                ret = (ID)t;
2312            } catch (ClassCastException cce) {
2313                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2314                throw new RuntimeException(cce);
2315            } catch (HL7Exception he) {
2316                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2317                throw new RuntimeException(he);
2318            }
2319            return ret;
2320        }
2321    
2322    
2323    
2324        /**
2325         * Returns
2326         * GT1-23: "Guarantor Credit Rating Code" - creates it if necessary
2327         */
2328        public CE getGuarantorCreditRatingCode() { 
2329            CE ret = null;
2330            try {
2331                Type t = this.getField(23, 0);
2332                ret = (CE)t;
2333            } catch (ClassCastException cce) {
2334                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2335                throw new RuntimeException(cce);
2336            } catch (HL7Exception he) {
2337                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2338                throw new RuntimeException(he);
2339            }
2340            return ret;
2341        }
2342    
2343    
2344        /**
2345         * Returns
2346         * GT1-23: "Guarantor Credit Rating Code" - creates it if necessary
2347         */
2348        public CE getGt123_GuarantorCreditRatingCode() { 
2349            CE ret = null;
2350            try {
2351                Type t = this.getField(23, 0);
2352                ret = (CE)t;
2353            } catch (ClassCastException cce) {
2354                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2355                throw new RuntimeException(cce);
2356            } catch (HL7Exception he) {
2357                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2358                throw new RuntimeException(he);
2359            }
2360            return ret;
2361        }
2362    
2363    
2364    
2365        /**
2366         * Returns
2367         * GT1-24: "Guarantor Death Date And Time" - creates it if necessary
2368         */
2369        public TS getGuarantorDeathDateAndTime() { 
2370            TS ret = null;
2371            try {
2372                Type t = this.getField(24, 0);
2373                ret = (TS)t;
2374            } catch (ClassCastException cce) {
2375                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2376                throw new RuntimeException(cce);
2377            } catch (HL7Exception he) {
2378                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2379                throw new RuntimeException(he);
2380            }
2381            return ret;
2382        }
2383    
2384    
2385        /**
2386         * Returns
2387         * GT1-24: "Guarantor Death Date And Time" - creates it if necessary
2388         */
2389        public TS getGt124_GuarantorDeathDateAndTime() { 
2390            TS ret = null;
2391            try {
2392                Type t = this.getField(24, 0);
2393                ret = (TS)t;
2394            } catch (ClassCastException cce) {
2395                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2396                throw new RuntimeException(cce);
2397            } catch (HL7Exception he) {
2398                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2399                throw new RuntimeException(he);
2400            }
2401            return ret;
2402        }
2403    
2404    
2405    
2406        /**
2407         * Returns
2408         * GT1-25: "Guarantor Death Flag" - creates it if necessary
2409         */
2410        public ID getGuarantorDeathFlag() { 
2411            ID ret = null;
2412            try {
2413                Type t = this.getField(25, 0);
2414                ret = (ID)t;
2415            } catch (ClassCastException cce) {
2416                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2417                throw new RuntimeException(cce);
2418            } catch (HL7Exception he) {
2419                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2420                throw new RuntimeException(he);
2421            }
2422            return ret;
2423        }
2424    
2425    
2426        /**
2427         * Returns
2428         * GT1-25: "Guarantor Death Flag" - creates it if necessary
2429         */
2430        public ID getGt125_GuarantorDeathFlag() { 
2431            ID ret = null;
2432            try {
2433                Type t = this.getField(25, 0);
2434                ret = (ID)t;
2435            } catch (ClassCastException cce) {
2436                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2437                throw new RuntimeException(cce);
2438            } catch (HL7Exception he) {
2439                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2440                throw new RuntimeException(he);
2441            }
2442            return ret;
2443        }
2444    
2445    
2446    
2447        /**
2448         * Returns
2449         * GT1-26: "Guarantor Charge Adjustment Code" - creates it if necessary
2450         */
2451        public CE getGuarantorChargeAdjustmentCode() { 
2452            CE ret = null;
2453            try {
2454                Type t = this.getField(26, 0);
2455                ret = (CE)t;
2456            } catch (ClassCastException cce) {
2457                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2458                throw new RuntimeException(cce);
2459            } catch (HL7Exception he) {
2460                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2461                throw new RuntimeException(he);
2462            }
2463            return ret;
2464        }
2465    
2466    
2467        /**
2468         * Returns
2469         * GT1-26: "Guarantor Charge Adjustment Code" - creates it if necessary
2470         */
2471        public CE getGt126_GuarantorChargeAdjustmentCode() { 
2472            CE ret = null;
2473            try {
2474                Type t = this.getField(26, 0);
2475                ret = (CE)t;
2476            } catch (ClassCastException cce) {
2477                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2478                throw new RuntimeException(cce);
2479            } catch (HL7Exception he) {
2480                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2481                throw new RuntimeException(he);
2482            }
2483            return ret;
2484        }
2485    
2486    
2487    
2488        /**
2489         * Returns
2490         * GT1-27: "Guarantor Household Annual Income" - creates it if necessary
2491         */
2492        public CP getGuarantorHouseholdAnnualIncome() { 
2493            CP ret = null;
2494            try {
2495                Type t = this.getField(27, 0);
2496                ret = (CP)t;
2497            } catch (ClassCastException cce) {
2498                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2499                throw new RuntimeException(cce);
2500            } catch (HL7Exception he) {
2501                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2502                throw new RuntimeException(he);
2503            }
2504            return ret;
2505        }
2506    
2507    
2508        /**
2509         * Returns
2510         * GT1-27: "Guarantor Household Annual Income" - creates it if necessary
2511         */
2512        public CP getGt127_GuarantorHouseholdAnnualIncome() { 
2513            CP ret = null;
2514            try {
2515                Type t = this.getField(27, 0);
2516                ret = (CP)t;
2517            } catch (ClassCastException cce) {
2518                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2519                throw new RuntimeException(cce);
2520            } catch (HL7Exception he) {
2521                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2522                throw new RuntimeException(he);
2523            }
2524            return ret;
2525        }
2526    
2527    
2528    
2529        /**
2530         * Returns
2531         * GT1-28: "Guarantor Household Size" - creates it if necessary
2532         */
2533        public NM getGuarantorHouseholdSize() { 
2534            NM ret = null;
2535            try {
2536                Type t = this.getField(28, 0);
2537                ret = (NM)t;
2538            } catch (ClassCastException cce) {
2539                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2540                throw new RuntimeException(cce);
2541            } catch (HL7Exception he) {
2542                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2543                throw new RuntimeException(he);
2544            }
2545            return ret;
2546        }
2547    
2548    
2549        /**
2550         * Returns
2551         * GT1-28: "Guarantor Household Size" - creates it if necessary
2552         */
2553        public NM getGt128_GuarantorHouseholdSize() { 
2554            NM ret = null;
2555            try {
2556                Type t = this.getField(28, 0);
2557                ret = (NM)t;
2558            } catch (ClassCastException cce) {
2559                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2560                throw new RuntimeException(cce);
2561            } catch (HL7Exception he) {
2562                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2563                throw new RuntimeException(he);
2564            }
2565            return ret;
2566        }
2567    
2568    
2569        /**
2570         * Returns all repetitions of Guarantor Employer ID Number (GT1-29).
2571         */
2572        public CX[] getGuarantorEmployerIDNumber() {
2573            CX[] ret = null;
2574            try {
2575                Type[] t = this.getField(29);  
2576                ret = new CX[t.length];
2577                for (int i = 0; i < ret.length; i++) {
2578                    ret[i] = (CX)t[i];
2579                }
2580            } catch (ClassCastException cce) {
2581                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2582                throw new RuntimeException(cce);
2583            } catch (HL7Exception he) {
2584                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2585                throw new RuntimeException(he);
2586            }
2587            return ret;
2588        }
2589    
2590    
2591        /**
2592         * Returns a count of the current number of repetitions of Guarantor Employer ID Number (GT1-29).
2593         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2594         * it will return zero.
2595         */
2596        public int getGuarantorEmployerIDNumberReps() {
2597            CX[] ret = null;
2598            try {
2599                Type[] t = this.getField(29);
2600                return t.length;  
2601            } catch (ClassCastException cce) {
2602                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2603                throw new RuntimeException(cce);
2604            } catch (HL7Exception he) {
2605                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2606                throw new RuntimeException(he);
2607            }
2608        }
2609    
2610    
2611        /**
2612         * Returns a specific repetition of
2613         * GT1-29: "Guarantor Employer ID Number" - creates it if necessary
2614         *
2615         * @param rep The repetition index (0-indexed)
2616         */
2617        public CX getGuarantorEmployerIDNumber(int rep) { 
2618            CX ret = null;
2619            try {
2620                Type t = this.getField(29, rep);
2621                ret = (CX)t;
2622            } catch (ClassCastException cce) {
2623                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2624                throw new RuntimeException(cce);
2625            } catch (HL7Exception he) {
2626                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2627                throw new RuntimeException(he);
2628            }
2629            return ret;
2630        }
2631    
2632        /**
2633         * Returns a specific repetition of
2634         * GT1-29: "Guarantor Employer ID Number" - creates it if necessary
2635         *
2636         * @param rep The repetition index (0-indexed)
2637         */
2638        public CX getGt129_GuarantorEmployerIDNumber(int rep) { 
2639            CX ret = null;
2640            try {
2641                Type t = this.getField(29, rep);
2642                ret = (CX)t;
2643            } catch (ClassCastException cce) {
2644                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2645                throw new RuntimeException(cce);
2646            } catch (HL7Exception he) {
2647                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2648                throw new RuntimeException(he);
2649            }
2650            return ret;
2651        }
2652    
2653    
2654        /**
2655         * Returns a count of the current number of repetitions of Guarantor Employer ID Number (GT1-29).
2656         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2657         * it will return zero.
2658         */
2659        public int getGt129_GuarantorEmployerIDNumberReps() {
2660            CX[] ret = null;
2661            try {
2662                Type[] t = this.getField(29);
2663                return t.length;  
2664            } catch (ClassCastException cce) {
2665                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2666                throw new RuntimeException(cce);
2667            } catch (HL7Exception he) {
2668                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2669                throw new RuntimeException(he);
2670            }
2671        }
2672    
2673    
2674    
2675        /**
2676         * Inserts a repetition of
2677         * GT1-29: "Guarantor Employer ID Number" at a specific index
2678         *
2679         * @param rep The repetition index (0-indexed)
2680         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2681         */
2682        public CX insertGuarantorEmployerIDNumber(int rep) throws HL7Exception { 
2683            return (CX) super.insertRepetition(29, rep);
2684        }
2685    
2686    
2687    
2688        /**
2689         * Inserts a repetition of
2690         * GT1-29: "Guarantor Employer ID Number" at a specific index
2691         *
2692         * @param rep The repetition index (0-indexed)
2693         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2694         */
2695        public CX insertGt129_GuarantorEmployerIDNumber(int rep) throws HL7Exception { 
2696            return (CX) super.insertRepetition(29, rep);
2697        }
2698    
2699    
2700        /**
2701         * Removes a repetition of
2702         * GT1-29: "Guarantor Employer ID Number" at a specific index
2703         *
2704         * @param rep The repetition index (0-indexed)
2705         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2706         */
2707        public CX removeGuarantorEmployerIDNumber(int rep) throws HL7Exception { 
2708            return (CX) super.removeRepetition(29, rep);
2709        }
2710    
2711    
2712        /**
2713         * Removes a repetition of
2714         * GT1-29: "Guarantor Employer ID Number" at a specific index
2715         *
2716         * @param rep The repetition index (0-indexed)
2717         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2718         */
2719        public CX removeGt129_GuarantorEmployerIDNumber(int rep) throws HL7Exception { 
2720            return (CX) super.removeRepetition(29, rep);
2721        }
2722    
2723    
2724    
2725    
2726        /**
2727         * Returns
2728         * GT1-30: "Guarantor Marital Status Code" - creates it if necessary
2729         */
2730        public CE getGuarantorMaritalStatusCode() { 
2731            CE ret = null;
2732            try {
2733                Type t = this.getField(30, 0);
2734                ret = (CE)t;
2735            } catch (ClassCastException cce) {
2736                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2737                throw new RuntimeException(cce);
2738            } catch (HL7Exception he) {
2739                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2740                throw new RuntimeException(he);
2741            }
2742            return ret;
2743        }
2744    
2745    
2746        /**
2747         * Returns
2748         * GT1-30: "Guarantor Marital Status Code" - creates it if necessary
2749         */
2750        public CE getGt130_GuarantorMaritalStatusCode() { 
2751            CE ret = null;
2752            try {
2753                Type t = this.getField(30, 0);
2754                ret = (CE)t;
2755            } catch (ClassCastException cce) {
2756                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2757                throw new RuntimeException(cce);
2758            } catch (HL7Exception he) {
2759                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2760                throw new RuntimeException(he);
2761            }
2762            return ret;
2763        }
2764    
2765    
2766    
2767        /**
2768         * Returns
2769         * GT1-31: "Guarantor Hire Effective Date" - creates it if necessary
2770         */
2771        public DT getGuarantorHireEffectiveDate() { 
2772            DT ret = null;
2773            try {
2774                Type t = this.getField(31, 0);
2775                ret = (DT)t;
2776            } catch (ClassCastException cce) {
2777                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2778                throw new RuntimeException(cce);
2779            } catch (HL7Exception he) {
2780                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2781                throw new RuntimeException(he);
2782            }
2783            return ret;
2784        }
2785    
2786    
2787        /**
2788         * Returns
2789         * GT1-31: "Guarantor Hire Effective Date" - creates it if necessary
2790         */
2791        public DT getGt131_GuarantorHireEffectiveDate() { 
2792            DT ret = null;
2793            try {
2794                Type t = this.getField(31, 0);
2795                ret = (DT)t;
2796            } catch (ClassCastException cce) {
2797                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2798                throw new RuntimeException(cce);
2799            } catch (HL7Exception he) {
2800                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2801                throw new RuntimeException(he);
2802            }
2803            return ret;
2804        }
2805    
2806    
2807    
2808        /**
2809         * Returns
2810         * GT1-32: "Employment Stop Date" - creates it if necessary
2811         */
2812        public DT getEmploymentStopDate() { 
2813            DT ret = null;
2814            try {
2815                Type t = this.getField(32, 0);
2816                ret = (DT)t;
2817            } catch (ClassCastException cce) {
2818                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2819                throw new RuntimeException(cce);
2820            } catch (HL7Exception he) {
2821                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2822                throw new RuntimeException(he);
2823            }
2824            return ret;
2825        }
2826    
2827    
2828        /**
2829         * Returns
2830         * GT1-32: "Employment Stop Date" - creates it if necessary
2831         */
2832        public DT getGt132_EmploymentStopDate() { 
2833            DT ret = null;
2834            try {
2835                Type t = this.getField(32, 0);
2836                ret = (DT)t;
2837            } catch (ClassCastException cce) {
2838                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2839                throw new RuntimeException(cce);
2840            } catch (HL7Exception he) {
2841                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2842                throw new RuntimeException(he);
2843            }
2844            return ret;
2845        }
2846    
2847    
2848    
2849        /**
2850         * Returns
2851         * GT1-33: "Living Dependency" - creates it if necessary
2852         */
2853        public IS getLivingDependency() { 
2854            IS ret = null;
2855            try {
2856                Type t = this.getField(33, 0);
2857                ret = (IS)t;
2858            } catch (ClassCastException cce) {
2859                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2860                throw new RuntimeException(cce);
2861            } catch (HL7Exception he) {
2862                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2863                throw new RuntimeException(he);
2864            }
2865            return ret;
2866        }
2867    
2868    
2869        /**
2870         * Returns
2871         * GT1-33: "Living Dependency" - creates it if necessary
2872         */
2873        public IS getGt133_LivingDependency() { 
2874            IS ret = null;
2875            try {
2876                Type t = this.getField(33, 0);
2877                ret = (IS)t;
2878            } catch (ClassCastException cce) {
2879                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2880                throw new RuntimeException(cce);
2881            } catch (HL7Exception he) {
2882                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2883                throw new RuntimeException(he);
2884            }
2885            return ret;
2886        }
2887    
2888    
2889        /**
2890         * Returns all repetitions of Ambulatory Status (GT1-34).
2891         */
2892        public IS[] getAmbulatoryStatus() {
2893            IS[] ret = null;
2894            try {
2895                Type[] t = this.getField(34);  
2896                ret = new IS[t.length];
2897                for (int i = 0; i < ret.length; i++) {
2898                    ret[i] = (IS)t[i];
2899                }
2900            } catch (ClassCastException cce) {
2901                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2902                throw new RuntimeException(cce);
2903            } catch (HL7Exception he) {
2904                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2905                throw new RuntimeException(he);
2906            }
2907            return ret;
2908        }
2909    
2910    
2911        /**
2912         * Returns a count of the current number of repetitions of Ambulatory Status (GT1-34).
2913         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2914         * it will return zero.
2915         */
2916        public int getAmbulatoryStatusReps() {
2917            IS[] ret = null;
2918            try {
2919                Type[] t = this.getField(34);
2920                return t.length;  
2921            } catch (ClassCastException cce) {
2922                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2923                throw new RuntimeException(cce);
2924            } catch (HL7Exception he) {
2925                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2926                throw new RuntimeException(he);
2927            }
2928        }
2929    
2930    
2931        /**
2932         * Returns a specific repetition of
2933         * GT1-34: "Ambulatory Status" - creates it if necessary
2934         *
2935         * @param rep The repetition index (0-indexed)
2936         */
2937        public IS getAmbulatoryStatus(int rep) { 
2938            IS ret = null;
2939            try {
2940                Type t = this.getField(34, rep);
2941                ret = (IS)t;
2942            } catch (ClassCastException cce) {
2943                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2944                throw new RuntimeException(cce);
2945            } catch (HL7Exception he) {
2946                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2947                throw new RuntimeException(he);
2948            }
2949            return ret;
2950        }
2951    
2952        /**
2953         * Returns a specific repetition of
2954         * GT1-34: "Ambulatory Status" - creates it if necessary
2955         *
2956         * @param rep The repetition index (0-indexed)
2957         */
2958        public IS getGt134_AmbulatoryStatus(int rep) { 
2959            IS ret = null;
2960            try {
2961                Type t = this.getField(34, rep);
2962                ret = (IS)t;
2963            } catch (ClassCastException cce) {
2964                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2965                throw new RuntimeException(cce);
2966            } catch (HL7Exception he) {
2967                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2968                throw new RuntimeException(he);
2969            }
2970            return ret;
2971        }
2972    
2973    
2974        /**
2975         * Returns a count of the current number of repetitions of Ambulatory Status (GT1-34).
2976         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2977         * it will return zero.
2978         */
2979        public int getGt134_AmbulatoryStatusReps() {
2980            IS[] ret = null;
2981            try {
2982                Type[] t = this.getField(34);
2983                return t.length;  
2984            } catch (ClassCastException cce) {
2985                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2986                throw new RuntimeException(cce);
2987            } catch (HL7Exception he) {
2988                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2989                throw new RuntimeException(he);
2990            }
2991        }
2992    
2993    
2994    
2995        /**
2996         * Inserts a repetition of
2997         * GT1-34: "Ambulatory Status" at a specific index
2998         *
2999         * @param rep The repetition index (0-indexed)
3000         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3001         */
3002        public IS insertAmbulatoryStatus(int rep) throws HL7Exception { 
3003            return (IS) super.insertRepetition(34, rep);
3004        }
3005    
3006    
3007    
3008        /**
3009         * Inserts a repetition of
3010         * GT1-34: "Ambulatory Status" at a specific index
3011         *
3012         * @param rep The repetition index (0-indexed)
3013         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3014         */
3015        public IS insertGt134_AmbulatoryStatus(int rep) throws HL7Exception { 
3016            return (IS) super.insertRepetition(34, rep);
3017        }
3018    
3019    
3020        /**
3021         * Removes a repetition of
3022         * GT1-34: "Ambulatory Status" at a specific index
3023         *
3024         * @param rep The repetition index (0-indexed)
3025         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3026         */
3027        public IS removeAmbulatoryStatus(int rep) throws HL7Exception { 
3028            return (IS) super.removeRepetition(34, rep);
3029        }
3030    
3031    
3032        /**
3033         * Removes a repetition of
3034         * GT1-34: "Ambulatory Status" at a specific index
3035         *
3036         * @param rep The repetition index (0-indexed)
3037         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3038         */
3039        public IS removeGt134_AmbulatoryStatus(int rep) throws HL7Exception { 
3040            return (IS) super.removeRepetition(34, rep);
3041        }
3042    
3043    
3044    
3045        /**
3046         * Returns all repetitions of Citizenship (GT1-35).
3047         */
3048        public CE[] getCitizenship() {
3049            CE[] ret = null;
3050            try {
3051                Type[] t = this.getField(35);  
3052                ret = new CE[t.length];
3053                for (int i = 0; i < ret.length; i++) {
3054                    ret[i] = (CE)t[i];
3055                }
3056            } catch (ClassCastException cce) {
3057                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3058                throw new RuntimeException(cce);
3059            } catch (HL7Exception he) {
3060                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3061                throw new RuntimeException(he);
3062            }
3063            return ret;
3064        }
3065    
3066    
3067        /**
3068         * Returns a count of the current number of repetitions of Citizenship (GT1-35).
3069         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3070         * it will return zero.
3071         */
3072        public int getCitizenshipReps() {
3073            CE[] ret = null;
3074            try {
3075                Type[] t = this.getField(35);
3076                return t.length;  
3077            } catch (ClassCastException cce) {
3078                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3079                throw new RuntimeException(cce);
3080            } catch (HL7Exception he) {
3081                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3082                throw new RuntimeException(he);
3083            }
3084        }
3085    
3086    
3087        /**
3088         * Returns a specific repetition of
3089         * GT1-35: "Citizenship" - creates it if necessary
3090         *
3091         * @param rep The repetition index (0-indexed)
3092         */
3093        public CE getCitizenship(int rep) { 
3094            CE ret = null;
3095            try {
3096                Type t = this.getField(35, rep);
3097                ret = (CE)t;
3098            } catch (ClassCastException cce) {
3099                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3100                throw new RuntimeException(cce);
3101            } catch (HL7Exception he) {
3102                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3103                throw new RuntimeException(he);
3104            }
3105            return ret;
3106        }
3107    
3108        /**
3109         * Returns a specific repetition of
3110         * GT1-35: "Citizenship" - creates it if necessary
3111         *
3112         * @param rep The repetition index (0-indexed)
3113         */
3114        public CE getGt135_Citizenship(int rep) { 
3115            CE ret = null;
3116            try {
3117                Type t = this.getField(35, rep);
3118                ret = (CE)t;
3119            } catch (ClassCastException cce) {
3120                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3121                throw new RuntimeException(cce);
3122            } catch (HL7Exception he) {
3123                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3124                throw new RuntimeException(he);
3125            }
3126            return ret;
3127        }
3128    
3129    
3130        /**
3131         * Returns a count of the current number of repetitions of Citizenship (GT1-35).
3132         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3133         * it will return zero.
3134         */
3135        public int getGt135_CitizenshipReps() {
3136            CE[] ret = null;
3137            try {
3138                Type[] t = this.getField(35);
3139                return t.length;  
3140            } catch (ClassCastException cce) {
3141                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3142                throw new RuntimeException(cce);
3143            } catch (HL7Exception he) {
3144                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3145                throw new RuntimeException(he);
3146            }
3147        }
3148    
3149    
3150    
3151        /**
3152         * Inserts a repetition of
3153         * GT1-35: "Citizenship" at a specific index
3154         *
3155         * @param rep The repetition index (0-indexed)
3156         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3157         */
3158        public CE insertCitizenship(int rep) throws HL7Exception { 
3159            return (CE) super.insertRepetition(35, rep);
3160        }
3161    
3162    
3163    
3164        /**
3165         * Inserts a repetition of
3166         * GT1-35: "Citizenship" at a specific index
3167         *
3168         * @param rep The repetition index (0-indexed)
3169         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3170         */
3171        public CE insertGt135_Citizenship(int rep) throws HL7Exception { 
3172            return (CE) super.insertRepetition(35, rep);
3173        }
3174    
3175    
3176        /**
3177         * Removes a repetition of
3178         * GT1-35: "Citizenship" at a specific index
3179         *
3180         * @param rep The repetition index (0-indexed)
3181         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3182         */
3183        public CE removeCitizenship(int rep) throws HL7Exception { 
3184            return (CE) super.removeRepetition(35, rep);
3185        }
3186    
3187    
3188        /**
3189         * Removes a repetition of
3190         * GT1-35: "Citizenship" at a specific index
3191         *
3192         * @param rep The repetition index (0-indexed)
3193         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3194         */
3195        public CE removeGt135_Citizenship(int rep) throws HL7Exception { 
3196            return (CE) super.removeRepetition(35, rep);
3197        }
3198    
3199    
3200    
3201    
3202        /**
3203         * Returns
3204         * GT1-36: "Primary Language" - creates it if necessary
3205         */
3206        public CE getPrimaryLanguage() { 
3207            CE ret = null;
3208            try {
3209                Type t = this.getField(36, 0);
3210                ret = (CE)t;
3211            } catch (ClassCastException cce) {
3212                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3213                throw new RuntimeException(cce);
3214            } catch (HL7Exception he) {
3215                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3216                throw new RuntimeException(he);
3217            }
3218            return ret;
3219        }
3220    
3221    
3222        /**
3223         * Returns
3224         * GT1-36: "Primary Language" - creates it if necessary
3225         */
3226        public CE getGt136_PrimaryLanguage() { 
3227            CE ret = null;
3228            try {
3229                Type t = this.getField(36, 0);
3230                ret = (CE)t;
3231            } catch (ClassCastException cce) {
3232                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3233                throw new RuntimeException(cce);
3234            } catch (HL7Exception he) {
3235                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3236                throw new RuntimeException(he);
3237            }
3238            return ret;
3239        }
3240    
3241    
3242    
3243        /**
3244         * Returns
3245         * GT1-37: "Living Arrangement" - creates it if necessary
3246         */
3247        public IS getLivingArrangement() { 
3248            IS ret = null;
3249            try {
3250                Type t = this.getField(37, 0);
3251                ret = (IS)t;
3252            } catch (ClassCastException cce) {
3253                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3254                throw new RuntimeException(cce);
3255            } catch (HL7Exception he) {
3256                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3257                throw new RuntimeException(he);
3258            }
3259            return ret;
3260        }
3261    
3262    
3263        /**
3264         * Returns
3265         * GT1-37: "Living Arrangement" - creates it if necessary
3266         */
3267        public IS getGt137_LivingArrangement() { 
3268            IS ret = null;
3269            try {
3270                Type t = this.getField(37, 0);
3271                ret = (IS)t;
3272            } catch (ClassCastException cce) {
3273                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3274                throw new RuntimeException(cce);
3275            } catch (HL7Exception he) {
3276                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3277                throw new RuntimeException(he);
3278            }
3279            return ret;
3280        }
3281    
3282    
3283    
3284        /**
3285         * Returns
3286         * GT1-38: "Publicity Code" - creates it if necessary
3287         */
3288        public CE getPublicityCode() { 
3289            CE ret = null;
3290            try {
3291                Type t = this.getField(38, 0);
3292                ret = (CE)t;
3293            } catch (ClassCastException cce) {
3294                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3295                throw new RuntimeException(cce);
3296            } catch (HL7Exception he) {
3297                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3298                throw new RuntimeException(he);
3299            }
3300            return ret;
3301        }
3302    
3303    
3304        /**
3305         * Returns
3306         * GT1-38: "Publicity Code" - creates it if necessary
3307         */
3308        public CE getGt138_PublicityCode() { 
3309            CE ret = null;
3310            try {
3311                Type t = this.getField(38, 0);
3312                ret = (CE)t;
3313            } catch (ClassCastException cce) {
3314                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3315                throw new RuntimeException(cce);
3316            } catch (HL7Exception he) {
3317                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3318                throw new RuntimeException(he);
3319            }
3320            return ret;
3321        }
3322    
3323    
3324    
3325        /**
3326         * Returns
3327         * GT1-39: "Protection Indicator" - creates it if necessary
3328         */
3329        public ID getProtectionIndicator() { 
3330            ID ret = null;
3331            try {
3332                Type t = this.getField(39, 0);
3333                ret = (ID)t;
3334            } catch (ClassCastException cce) {
3335                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3336                throw new RuntimeException(cce);
3337            } catch (HL7Exception he) {
3338                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3339                throw new RuntimeException(he);
3340            }
3341            return ret;
3342        }
3343    
3344    
3345        /**
3346         * Returns
3347         * GT1-39: "Protection Indicator" - creates it if necessary
3348         */
3349        public ID getGt139_ProtectionIndicator() { 
3350            ID ret = null;
3351            try {
3352                Type t = this.getField(39, 0);
3353                ret = (ID)t;
3354            } catch (ClassCastException cce) {
3355                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3356                throw new RuntimeException(cce);
3357            } catch (HL7Exception he) {
3358                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3359                throw new RuntimeException(he);
3360            }
3361            return ret;
3362        }
3363    
3364    
3365    
3366        /**
3367         * Returns
3368         * GT1-40: "Student Indicator" - creates it if necessary
3369         */
3370        public IS getStudentIndicator() { 
3371            IS ret = null;
3372            try {
3373                Type t = this.getField(40, 0);
3374                ret = (IS)t;
3375            } catch (ClassCastException cce) {
3376                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3377                throw new RuntimeException(cce);
3378            } catch (HL7Exception he) {
3379                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3380                throw new RuntimeException(he);
3381            }
3382            return ret;
3383        }
3384    
3385    
3386        /**
3387         * Returns
3388         * GT1-40: "Student Indicator" - creates it if necessary
3389         */
3390        public IS getGt140_StudentIndicator() { 
3391            IS ret = null;
3392            try {
3393                Type t = this.getField(40, 0);
3394                ret = (IS)t;
3395            } catch (ClassCastException cce) {
3396                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3397                throw new RuntimeException(cce);
3398            } catch (HL7Exception he) {
3399                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3400                throw new RuntimeException(he);
3401            }
3402            return ret;
3403        }
3404    
3405    
3406    
3407        /**
3408         * Returns
3409         * GT1-41: "Religion" - creates it if necessary
3410         */
3411        public CE getReligion() { 
3412            CE ret = null;
3413            try {
3414                Type t = this.getField(41, 0);
3415                ret = (CE)t;
3416            } catch (ClassCastException cce) {
3417                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3418                throw new RuntimeException(cce);
3419            } catch (HL7Exception he) {
3420                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3421                throw new RuntimeException(he);
3422            }
3423            return ret;
3424        }
3425    
3426    
3427        /**
3428         * Returns
3429         * GT1-41: "Religion" - creates it if necessary
3430         */
3431        public CE getGt141_Religion() { 
3432            CE ret = null;
3433            try {
3434                Type t = this.getField(41, 0);
3435                ret = (CE)t;
3436            } catch (ClassCastException cce) {
3437                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3438                throw new RuntimeException(cce);
3439            } catch (HL7Exception he) {
3440                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3441                throw new RuntimeException(he);
3442            }
3443            return ret;
3444        }
3445    
3446    
3447        /**
3448         * Returns all repetitions of Mother's Maiden Name (GT1-42).
3449         */
3450        public XPN[] getMotherSMaidenName() {
3451            XPN[] ret = null;
3452            try {
3453                Type[] t = this.getField(42);  
3454                ret = new XPN[t.length];
3455                for (int i = 0; i < ret.length; i++) {
3456                    ret[i] = (XPN)t[i];
3457                }
3458            } catch (ClassCastException cce) {
3459                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3460                throw new RuntimeException(cce);
3461            } catch (HL7Exception he) {
3462                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3463                throw new RuntimeException(he);
3464            }
3465            return ret;
3466        }
3467    
3468    
3469        /**
3470         * Returns a count of the current number of repetitions of Mother's Maiden Name (GT1-42).
3471         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3472         * it will return zero.
3473         */
3474        public int getMotherSMaidenNameReps() {
3475            XPN[] ret = null;
3476            try {
3477                Type[] t = this.getField(42);
3478                return t.length;  
3479            } catch (ClassCastException cce) {
3480                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3481                throw new RuntimeException(cce);
3482            } catch (HL7Exception he) {
3483                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3484                throw new RuntimeException(he);
3485            }
3486        }
3487    
3488    
3489        /**
3490         * Returns a specific repetition of
3491         * GT1-42: "Mother's Maiden Name" - creates it if necessary
3492         *
3493         * @param rep The repetition index (0-indexed)
3494         */
3495        public XPN getMotherSMaidenName(int rep) { 
3496            XPN ret = null;
3497            try {
3498                Type t = this.getField(42, rep);
3499                ret = (XPN)t;
3500            } catch (ClassCastException cce) {
3501                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3502                throw new RuntimeException(cce);
3503            } catch (HL7Exception he) {
3504                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3505                throw new RuntimeException(he);
3506            }
3507            return ret;
3508        }
3509    
3510        /**
3511         * Returns a specific repetition of
3512         * GT1-42: "Mother's Maiden Name" - creates it if necessary
3513         *
3514         * @param rep The repetition index (0-indexed)
3515         */
3516        public XPN getGt142_MotherSMaidenName(int rep) { 
3517            XPN ret = null;
3518            try {
3519                Type t = this.getField(42, rep);
3520                ret = (XPN)t;
3521            } catch (ClassCastException cce) {
3522                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3523                throw new RuntimeException(cce);
3524            } catch (HL7Exception he) {
3525                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3526                throw new RuntimeException(he);
3527            }
3528            return ret;
3529        }
3530    
3531    
3532        /**
3533         * Returns a count of the current number of repetitions of Mother's Maiden Name (GT1-42).
3534         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3535         * it will return zero.
3536         */
3537        public int getGt142_MotherSMaidenNameReps() {
3538            XPN[] ret = null;
3539            try {
3540                Type[] t = this.getField(42);
3541                return t.length;  
3542            } catch (ClassCastException cce) {
3543                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3544                throw new RuntimeException(cce);
3545            } catch (HL7Exception he) {
3546                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3547                throw new RuntimeException(he);
3548            }
3549        }
3550    
3551    
3552    
3553        /**
3554         * Inserts a repetition of
3555         * GT1-42: "Mother's Maiden Name" at a specific index
3556         *
3557         * @param rep The repetition index (0-indexed)
3558         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3559         */
3560        public XPN insertMotherSMaidenName(int rep) throws HL7Exception { 
3561            return (XPN) super.insertRepetition(42, rep);
3562        }
3563    
3564    
3565    
3566        /**
3567         * Inserts a repetition of
3568         * GT1-42: "Mother's Maiden Name" at a specific index
3569         *
3570         * @param rep The repetition index (0-indexed)
3571         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3572         */
3573        public XPN insertGt142_MotherSMaidenName(int rep) throws HL7Exception { 
3574            return (XPN) super.insertRepetition(42, rep);
3575        }
3576    
3577    
3578        /**
3579         * Removes a repetition of
3580         * GT1-42: "Mother's Maiden Name" at a specific index
3581         *
3582         * @param rep The repetition index (0-indexed)
3583         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3584         */
3585        public XPN removeMotherSMaidenName(int rep) throws HL7Exception { 
3586            return (XPN) super.removeRepetition(42, rep);
3587        }
3588    
3589    
3590        /**
3591         * Removes a repetition of
3592         * GT1-42: "Mother's Maiden Name" at a specific index
3593         *
3594         * @param rep The repetition index (0-indexed)
3595         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3596         */
3597        public XPN removeGt142_MotherSMaidenName(int rep) throws HL7Exception { 
3598            return (XPN) super.removeRepetition(42, rep);
3599        }
3600    
3601    
3602    
3603    
3604        /**
3605         * Returns
3606         * GT1-43: "Nationality" - creates it if necessary
3607         */
3608        public CE getNationality() { 
3609            CE ret = null;
3610            try {
3611                Type t = this.getField(43, 0);
3612                ret = (CE)t;
3613            } catch (ClassCastException cce) {
3614                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3615                throw new RuntimeException(cce);
3616            } catch (HL7Exception he) {
3617                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3618                throw new RuntimeException(he);
3619            }
3620            return ret;
3621        }
3622    
3623    
3624        /**
3625         * Returns
3626         * GT1-43: "Nationality" - creates it if necessary
3627         */
3628        public CE getGt143_Nationality() { 
3629            CE ret = null;
3630            try {
3631                Type t = this.getField(43, 0);
3632                ret = (CE)t;
3633            } catch (ClassCastException cce) {
3634                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3635                throw new RuntimeException(cce);
3636            } catch (HL7Exception he) {
3637                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3638                throw new RuntimeException(he);
3639            }
3640            return ret;
3641        }
3642    
3643    
3644        /**
3645         * Returns all repetitions of Ethnic Group (GT1-44).
3646         */
3647        public CE[] getEthnicGroup() {
3648            CE[] ret = null;
3649            try {
3650                Type[] t = this.getField(44);  
3651                ret = new CE[t.length];
3652                for (int i = 0; i < ret.length; i++) {
3653                    ret[i] = (CE)t[i];
3654                }
3655            } catch (ClassCastException cce) {
3656                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3657                throw new RuntimeException(cce);
3658            } catch (HL7Exception he) {
3659                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3660                throw new RuntimeException(he);
3661            }
3662            return ret;
3663        }
3664    
3665    
3666        /**
3667         * Returns a count of the current number of repetitions of Ethnic Group (GT1-44).
3668         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3669         * it will return zero.
3670         */
3671        public int getEthnicGroupReps() {
3672            CE[] ret = null;
3673            try {
3674                Type[] t = this.getField(44);
3675                return t.length;  
3676            } catch (ClassCastException cce) {
3677                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3678                throw new RuntimeException(cce);
3679            } catch (HL7Exception he) {
3680                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3681                throw new RuntimeException(he);
3682            }
3683        }
3684    
3685    
3686        /**
3687         * Returns a specific repetition of
3688         * GT1-44: "Ethnic Group" - creates it if necessary
3689         *
3690         * @param rep The repetition index (0-indexed)
3691         */
3692        public CE getEthnicGroup(int rep) { 
3693            CE ret = null;
3694            try {
3695                Type t = this.getField(44, rep);
3696                ret = (CE)t;
3697            } catch (ClassCastException cce) {
3698                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3699                throw new RuntimeException(cce);
3700            } catch (HL7Exception he) {
3701                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3702                throw new RuntimeException(he);
3703            }
3704            return ret;
3705        }
3706    
3707        /**
3708         * Returns a specific repetition of
3709         * GT1-44: "Ethnic Group" - creates it if necessary
3710         *
3711         * @param rep The repetition index (0-indexed)
3712         */
3713        public CE getGt144_EthnicGroup(int rep) { 
3714            CE ret = null;
3715            try {
3716                Type t = this.getField(44, rep);
3717                ret = (CE)t;
3718            } catch (ClassCastException cce) {
3719                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3720                throw new RuntimeException(cce);
3721            } catch (HL7Exception he) {
3722                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3723                throw new RuntimeException(he);
3724            }
3725            return ret;
3726        }
3727    
3728    
3729        /**
3730         * Returns a count of the current number of repetitions of Ethnic Group (GT1-44).
3731         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3732         * it will return zero.
3733         */
3734        public int getGt144_EthnicGroupReps() {
3735            CE[] ret = null;
3736            try {
3737                Type[] t = this.getField(44);
3738                return t.length;  
3739            } catch (ClassCastException cce) {
3740                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3741                throw new RuntimeException(cce);
3742            } catch (HL7Exception he) {
3743                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3744                throw new RuntimeException(he);
3745            }
3746        }
3747    
3748    
3749    
3750        /**
3751         * Inserts a repetition of
3752         * GT1-44: "Ethnic Group" at a specific index
3753         *
3754         * @param rep The repetition index (0-indexed)
3755         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3756         */
3757        public CE insertEthnicGroup(int rep) throws HL7Exception { 
3758            return (CE) super.insertRepetition(44, rep);
3759        }
3760    
3761    
3762    
3763        /**
3764         * Inserts a repetition of
3765         * GT1-44: "Ethnic Group" at a specific index
3766         *
3767         * @param rep The repetition index (0-indexed)
3768         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3769         */
3770        public CE insertGt144_EthnicGroup(int rep) throws HL7Exception { 
3771            return (CE) super.insertRepetition(44, rep);
3772        }
3773    
3774    
3775        /**
3776         * Removes a repetition of
3777         * GT1-44: "Ethnic Group" at a specific index
3778         *
3779         * @param rep The repetition index (0-indexed)
3780         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3781         */
3782        public CE removeEthnicGroup(int rep) throws HL7Exception { 
3783            return (CE) super.removeRepetition(44, rep);
3784        }
3785    
3786    
3787        /**
3788         * Removes a repetition of
3789         * GT1-44: "Ethnic Group" at a specific index
3790         *
3791         * @param rep The repetition index (0-indexed)
3792         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3793         */
3794        public CE removeGt144_EthnicGroup(int rep) throws HL7Exception { 
3795            return (CE) super.removeRepetition(44, rep);
3796        }
3797    
3798    
3799    
3800        /**
3801         * Returns all repetitions of Contact Person's Name (GT1-45).
3802         */
3803        public XPN[] getContactPersonSName() {
3804            XPN[] ret = null;
3805            try {
3806                Type[] t = this.getField(45);  
3807                ret = new XPN[t.length];
3808                for (int i = 0; i < ret.length; i++) {
3809                    ret[i] = (XPN)t[i];
3810                }
3811            } catch (ClassCastException cce) {
3812                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3813                throw new RuntimeException(cce);
3814            } catch (HL7Exception he) {
3815                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3816                throw new RuntimeException(he);
3817            }
3818            return ret;
3819        }
3820    
3821    
3822        /**
3823         * Returns a count of the current number of repetitions of Contact Person's Name (GT1-45).
3824         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3825         * it will return zero.
3826         */
3827        public int getContactPersonSNameReps() {
3828            XPN[] ret = null;
3829            try {
3830                Type[] t = this.getField(45);
3831                return t.length;  
3832            } catch (ClassCastException cce) {
3833                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3834                throw new RuntimeException(cce);
3835            } catch (HL7Exception he) {
3836                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3837                throw new RuntimeException(he);
3838            }
3839        }
3840    
3841    
3842        /**
3843         * Returns a specific repetition of
3844         * GT1-45: "Contact Person's Name" - creates it if necessary
3845         *
3846         * @param rep The repetition index (0-indexed)
3847         */
3848        public XPN getContactPersonSName(int rep) { 
3849            XPN ret = null;
3850            try {
3851                Type t = this.getField(45, rep);
3852                ret = (XPN)t;
3853            } catch (ClassCastException cce) {
3854                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3855                throw new RuntimeException(cce);
3856            } catch (HL7Exception he) {
3857                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3858                throw new RuntimeException(he);
3859            }
3860            return ret;
3861        }
3862    
3863        /**
3864         * Returns a specific repetition of
3865         * GT1-45: "Contact Person's Name" - creates it if necessary
3866         *
3867         * @param rep The repetition index (0-indexed)
3868         */
3869        public XPN getGt145_ContactPersonSName(int rep) { 
3870            XPN ret = null;
3871            try {
3872                Type t = this.getField(45, rep);
3873                ret = (XPN)t;
3874            } catch (ClassCastException cce) {
3875                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3876                throw new RuntimeException(cce);
3877            } catch (HL7Exception he) {
3878                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3879                throw new RuntimeException(he);
3880            }
3881            return ret;
3882        }
3883    
3884    
3885        /**
3886         * Returns a count of the current number of repetitions of Contact Person's Name (GT1-45).
3887         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3888         * it will return zero.
3889         */
3890        public int getGt145_ContactPersonSNameReps() {
3891            XPN[] ret = null;
3892            try {
3893                Type[] t = this.getField(45);
3894                return t.length;  
3895            } catch (ClassCastException cce) {
3896                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3897                throw new RuntimeException(cce);
3898            } catch (HL7Exception he) {
3899                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3900                throw new RuntimeException(he);
3901            }
3902        }
3903    
3904    
3905    
3906        /**
3907         * Inserts a repetition of
3908         * GT1-45: "Contact Person's Name" at a specific index
3909         *
3910         * @param rep The repetition index (0-indexed)
3911         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3912         */
3913        public XPN insertContactPersonSName(int rep) throws HL7Exception { 
3914            return (XPN) super.insertRepetition(45, rep);
3915        }
3916    
3917    
3918    
3919        /**
3920         * Inserts a repetition of
3921         * GT1-45: "Contact Person's Name" at a specific index
3922         *
3923         * @param rep The repetition index (0-indexed)
3924         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3925         */
3926        public XPN insertGt145_ContactPersonSName(int rep) throws HL7Exception { 
3927            return (XPN) super.insertRepetition(45, rep);
3928        }
3929    
3930    
3931        /**
3932         * Removes a repetition of
3933         * GT1-45: "Contact Person's Name" at a specific index
3934         *
3935         * @param rep The repetition index (0-indexed)
3936         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3937         */
3938        public XPN removeContactPersonSName(int rep) throws HL7Exception { 
3939            return (XPN) super.removeRepetition(45, rep);
3940        }
3941    
3942    
3943        /**
3944         * Removes a repetition of
3945         * GT1-45: "Contact Person's Name" at a specific index
3946         *
3947         * @param rep The repetition index (0-indexed)
3948         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3949         */
3950        public XPN removeGt145_ContactPersonSName(int rep) throws HL7Exception { 
3951            return (XPN) super.removeRepetition(45, rep);
3952        }
3953    
3954    
3955    
3956        /**
3957         * Returns all repetitions of Contact Person's Telephone Number (GT1-46).
3958         */
3959        public XTN[] getContactPersonSTelephoneNumber() {
3960            XTN[] ret = null;
3961            try {
3962                Type[] t = this.getField(46);  
3963                ret = new XTN[t.length];
3964                for (int i = 0; i < ret.length; i++) {
3965                    ret[i] = (XTN)t[i];
3966                }
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 a count of the current number of repetitions of Contact Person's Telephone Number (GT1-46).
3980         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3981         * it will return zero.
3982         */
3983        public int getContactPersonSTelephoneNumberReps() {
3984            XTN[] ret = null;
3985            try {
3986                Type[] t = this.getField(46);
3987                return t.length;  
3988            } catch (ClassCastException cce) {
3989                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3990                throw new RuntimeException(cce);
3991            } catch (HL7Exception he) {
3992                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3993                throw new RuntimeException(he);
3994            }
3995        }
3996    
3997    
3998        /**
3999         * Returns a specific repetition of
4000         * GT1-46: "Contact Person's Telephone Number" - creates it if necessary
4001         *
4002         * @param rep The repetition index (0-indexed)
4003         */
4004        public XTN getContactPersonSTelephoneNumber(int rep) { 
4005            XTN ret = null;
4006            try {
4007                Type t = this.getField(46, rep);
4008                ret = (XTN)t;
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         * Returns a specific repetition of
4021         * GT1-46: "Contact Person's Telephone Number" - creates it if necessary
4022         *
4023         * @param rep The repetition index (0-indexed)
4024         */
4025        public XTN getGt146_ContactPersonSTelephoneNumber(int rep) { 
4026            XTN ret = null;
4027            try {
4028                Type t = this.getField(46, rep);
4029                ret = (XTN)t;
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            return ret;
4038        }
4039    
4040    
4041        /**
4042         * Returns a count of the current number of repetitions of Contact Person's Telephone Number (GT1-46).
4043         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4044         * it will return zero.
4045         */
4046        public int getGt146_ContactPersonSTelephoneNumberReps() {
4047            XTN[] ret = null;
4048            try {
4049                Type[] t = this.getField(46);
4050                return t.length;  
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        }
4059    
4060    
4061    
4062        /**
4063         * Inserts a repetition of
4064         * GT1-46: "Contact Person's Telephone Number" at a specific index
4065         *
4066         * @param rep The repetition index (0-indexed)
4067         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4068         */
4069        public XTN insertContactPersonSTelephoneNumber(int rep) throws HL7Exception { 
4070            return (XTN) super.insertRepetition(46, rep);
4071        }
4072    
4073    
4074    
4075        /**
4076         * Inserts a repetition of
4077         * GT1-46: "Contact Person's Telephone Number" at a specific index
4078         *
4079         * @param rep The repetition index (0-indexed)
4080         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4081         */
4082        public XTN insertGt146_ContactPersonSTelephoneNumber(int rep) throws HL7Exception { 
4083            return (XTN) super.insertRepetition(46, rep);
4084        }
4085    
4086    
4087        /**
4088         * Removes a repetition of
4089         * GT1-46: "Contact Person's Telephone Number" at a specific index
4090         *
4091         * @param rep The repetition index (0-indexed)
4092         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4093         */
4094        public XTN removeContactPersonSTelephoneNumber(int rep) throws HL7Exception { 
4095            return (XTN) super.removeRepetition(46, rep);
4096        }
4097    
4098    
4099        /**
4100         * Removes a repetition of
4101         * GT1-46: "Contact Person's Telephone Number" at a specific index
4102         *
4103         * @param rep The repetition index (0-indexed)
4104         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4105         */
4106        public XTN removeGt146_ContactPersonSTelephoneNumber(int rep) throws HL7Exception { 
4107            return (XTN) super.removeRepetition(46, rep);
4108        }
4109    
4110    
4111    
4112    
4113        /**
4114         * Returns
4115         * GT1-47: "Contact Reason" - creates it if necessary
4116         */
4117        public CE getContactReason() { 
4118            CE ret = null;
4119            try {
4120                Type t = this.getField(47, 0);
4121                ret = (CE)t;
4122            } catch (ClassCastException cce) {
4123                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4124                throw new RuntimeException(cce);
4125            } catch (HL7Exception he) {
4126                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4127                throw new RuntimeException(he);
4128            }
4129            return ret;
4130        }
4131    
4132    
4133        /**
4134         * Returns
4135         * GT1-47: "Contact Reason" - creates it if necessary
4136         */
4137        public CE getGt147_ContactReason() { 
4138            CE ret = null;
4139            try {
4140                Type t = this.getField(47, 0);
4141                ret = (CE)t;
4142            } catch (ClassCastException cce) {
4143                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4144                throw new RuntimeException(cce);
4145            } catch (HL7Exception he) {
4146                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4147                throw new RuntimeException(he);
4148            }
4149            return ret;
4150        }
4151    
4152    
4153    
4154        /**
4155         * Returns
4156         * GT1-48: "Contact Relationship" - creates it if necessary
4157         */
4158        public IS getContactRelationship() { 
4159            IS ret = null;
4160            try {
4161                Type t = this.getField(48, 0);
4162                ret = (IS)t;
4163            } catch (ClassCastException cce) {
4164                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4165                throw new RuntimeException(cce);
4166            } catch (HL7Exception he) {
4167                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4168                throw new RuntimeException(he);
4169            }
4170            return ret;
4171        }
4172    
4173    
4174        /**
4175         * Returns
4176         * GT1-48: "Contact Relationship" - creates it if necessary
4177         */
4178        public IS getGt148_ContactRelationship() { 
4179            IS ret = null;
4180            try {
4181                Type t = this.getField(48, 0);
4182                ret = (IS)t;
4183            } catch (ClassCastException cce) {
4184                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4185                throw new RuntimeException(cce);
4186            } catch (HL7Exception he) {
4187                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4188                throw new RuntimeException(he);
4189            }
4190            return ret;
4191        }
4192    
4193    
4194    
4195        /**
4196         * Returns
4197         * GT1-49: "Job Title" - creates it if necessary
4198         */
4199        public ST getJobTitle() { 
4200            ST ret = null;
4201            try {
4202                Type t = this.getField(49, 0);
4203                ret = (ST)t;
4204            } catch (ClassCastException cce) {
4205                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4206                throw new RuntimeException(cce);
4207            } catch (HL7Exception he) {
4208                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4209                throw new RuntimeException(he);
4210            }
4211            return ret;
4212        }
4213    
4214    
4215        /**
4216         * Returns
4217         * GT1-49: "Job Title" - creates it if necessary
4218         */
4219        public ST getGt149_JobTitle() { 
4220            ST ret = null;
4221            try {
4222                Type t = this.getField(49, 0);
4223                ret = (ST)t;
4224            } catch (ClassCastException cce) {
4225                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4226                throw new RuntimeException(cce);
4227            } catch (HL7Exception he) {
4228                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4229                throw new RuntimeException(he);
4230            }
4231            return ret;
4232        }
4233    
4234    
4235    
4236        /**
4237         * Returns
4238         * GT1-50: "Job Code/Class" - creates it if necessary
4239         */
4240        public JCC getJobCodeClass() { 
4241            JCC ret = null;
4242            try {
4243                Type t = this.getField(50, 0);
4244                ret = (JCC)t;
4245            } catch (ClassCastException cce) {
4246                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4247                throw new RuntimeException(cce);
4248            } catch (HL7Exception he) {
4249                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4250                throw new RuntimeException(he);
4251            }
4252            return ret;
4253        }
4254    
4255    
4256        /**
4257         * Returns
4258         * GT1-50: "Job Code/Class" - creates it if necessary
4259         */
4260        public JCC getGt150_JobCodeClass() { 
4261            JCC ret = null;
4262            try {
4263                Type t = this.getField(50, 0);
4264                ret = (JCC)t;
4265            } catch (ClassCastException cce) {
4266                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4267                throw new RuntimeException(cce);
4268            } catch (HL7Exception he) {
4269                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4270                throw new RuntimeException(he);
4271            }
4272            return ret;
4273        }
4274    
4275    
4276        /**
4277         * Returns all repetitions of Guarantor Employer's Organization Name (GT1-51).
4278         */
4279        public XON[] getGuarantorEmployerSOrganizationName() {
4280            XON[] ret = null;
4281            try {
4282                Type[] t = this.getField(51);  
4283                ret = new XON[t.length];
4284                for (int i = 0; i < ret.length; i++) {
4285                    ret[i] = (XON)t[i];
4286                }
4287            } catch (ClassCastException cce) {
4288                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4289                throw new RuntimeException(cce);
4290            } catch (HL7Exception he) {
4291                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4292                throw new RuntimeException(he);
4293            }
4294            return ret;
4295        }
4296    
4297    
4298        /**
4299         * Returns a count of the current number of repetitions of Guarantor Employer's Organization Name (GT1-51).
4300         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4301         * it will return zero.
4302         */
4303        public int getGuarantorEmployerSOrganizationNameReps() {
4304            XON[] ret = null;
4305            try {
4306                Type[] t = this.getField(51);
4307                return t.length;  
4308            } catch (ClassCastException cce) {
4309                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4310                throw new RuntimeException(cce);
4311            } catch (HL7Exception he) {
4312                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4313                throw new RuntimeException(he);
4314            }
4315        }
4316    
4317    
4318        /**
4319         * Returns a specific repetition of
4320         * GT1-51: "Guarantor Employer's Organization Name" - creates it if necessary
4321         *
4322         * @param rep The repetition index (0-indexed)
4323         */
4324        public XON getGuarantorEmployerSOrganizationName(int rep) { 
4325            XON ret = null;
4326            try {
4327                Type t = this.getField(51, rep);
4328                ret = (XON)t;
4329            } catch (ClassCastException cce) {
4330                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4331                throw new RuntimeException(cce);
4332            } catch (HL7Exception he) {
4333                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4334                throw new RuntimeException(he);
4335            }
4336            return ret;
4337        }
4338    
4339        /**
4340         * Returns a specific repetition of
4341         * GT1-51: "Guarantor Employer's Organization Name" - creates it if necessary
4342         *
4343         * @param rep The repetition index (0-indexed)
4344         */
4345        public XON getGt151_GuarantorEmployerSOrganizationName(int rep) { 
4346            XON ret = null;
4347            try {
4348                Type t = this.getField(51, rep);
4349                ret = (XON)t;
4350            } catch (ClassCastException cce) {
4351                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4352                throw new RuntimeException(cce);
4353            } catch (HL7Exception he) {
4354                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4355                throw new RuntimeException(he);
4356            }
4357            return ret;
4358        }
4359    
4360    
4361        /**
4362         * Returns a count of the current number of repetitions of Guarantor Employer's Organization Name (GT1-51).
4363         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4364         * it will return zero.
4365         */
4366        public int getGt151_GuarantorEmployerSOrganizationNameReps() {
4367            XON[] ret = null;
4368            try {
4369                Type[] t = this.getField(51);
4370                return t.length;  
4371            } catch (ClassCastException cce) {
4372                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4373                throw new RuntimeException(cce);
4374            } catch (HL7Exception he) {
4375                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4376                throw new RuntimeException(he);
4377            }
4378        }
4379    
4380    
4381    
4382        /**
4383         * Inserts a repetition of
4384         * GT1-51: "Guarantor Employer's Organization Name" at a specific index
4385         *
4386         * @param rep The repetition index (0-indexed)
4387         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4388         */
4389        public XON insertGuarantorEmployerSOrganizationName(int rep) throws HL7Exception { 
4390            return (XON) super.insertRepetition(51, rep);
4391        }
4392    
4393    
4394    
4395        /**
4396         * Inserts a repetition of
4397         * GT1-51: "Guarantor Employer's Organization Name" at a specific index
4398         *
4399         * @param rep The repetition index (0-indexed)
4400         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4401         */
4402        public XON insertGt151_GuarantorEmployerSOrganizationName(int rep) throws HL7Exception { 
4403            return (XON) super.insertRepetition(51, rep);
4404        }
4405    
4406    
4407        /**
4408         * Removes a repetition of
4409         * GT1-51: "Guarantor Employer's Organization Name" at a specific index
4410         *
4411         * @param rep The repetition index (0-indexed)
4412         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4413         */
4414        public XON removeGuarantorEmployerSOrganizationName(int rep) throws HL7Exception { 
4415            return (XON) super.removeRepetition(51, rep);
4416        }
4417    
4418    
4419        /**
4420         * Removes a repetition of
4421         * GT1-51: "Guarantor Employer's Organization Name" at a specific index
4422         *
4423         * @param rep The repetition index (0-indexed)
4424         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4425         */
4426        public XON removeGt151_GuarantorEmployerSOrganizationName(int rep) throws HL7Exception { 
4427            return (XON) super.removeRepetition(51, rep);
4428        }
4429    
4430    
4431    
4432    
4433        /**
4434         * Returns
4435         * GT1-52: "Handicap" - creates it if necessary
4436         */
4437        public IS getHandicap() { 
4438            IS ret = null;
4439            try {
4440                Type t = this.getField(52, 0);
4441                ret = (IS)t;
4442            } catch (ClassCastException cce) {
4443                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4444                throw new RuntimeException(cce);
4445            } catch (HL7Exception he) {
4446                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4447                throw new RuntimeException(he);
4448            }
4449            return ret;
4450        }
4451    
4452    
4453        /**
4454         * Returns
4455         * GT1-52: "Handicap" - creates it if necessary
4456         */
4457        public IS getGt152_Handicap() { 
4458            IS ret = null;
4459            try {
4460                Type t = this.getField(52, 0);
4461                ret = (IS)t;
4462            } catch (ClassCastException cce) {
4463                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4464                throw new RuntimeException(cce);
4465            } catch (HL7Exception he) {
4466                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4467                throw new RuntimeException(he);
4468            }
4469            return ret;
4470        }
4471    
4472    
4473    
4474        /**
4475         * Returns
4476         * GT1-53: "Job Status" - creates it if necessary
4477         */
4478        public IS getJobStatus() { 
4479            IS ret = null;
4480            try {
4481                Type t = this.getField(53, 0);
4482                ret = (IS)t;
4483            } catch (ClassCastException cce) {
4484                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4485                throw new RuntimeException(cce);
4486            } catch (HL7Exception he) {
4487                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4488                throw new RuntimeException(he);
4489            }
4490            return ret;
4491        }
4492    
4493    
4494        /**
4495         * Returns
4496         * GT1-53: "Job Status" - creates it if necessary
4497         */
4498        public IS getGt153_JobStatus() { 
4499            IS ret = null;
4500            try {
4501                Type t = this.getField(53, 0);
4502                ret = (IS)t;
4503            } catch (ClassCastException cce) {
4504                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4505                throw new RuntimeException(cce);
4506            } catch (HL7Exception he) {
4507                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4508                throw new RuntimeException(he);
4509            }
4510            return ret;
4511        }
4512    
4513    
4514    
4515        /**
4516         * Returns
4517         * GT1-54: "Guarantor Financial Class" - creates it if necessary
4518         */
4519        public FC getGuarantorFinancialClass() { 
4520            FC ret = null;
4521            try {
4522                Type t = this.getField(54, 0);
4523                ret = (FC)t;
4524            } catch (ClassCastException cce) {
4525                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4526                throw new RuntimeException(cce);
4527            } catch (HL7Exception he) {
4528                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4529                throw new RuntimeException(he);
4530            }
4531            return ret;
4532        }
4533    
4534    
4535        /**
4536         * Returns
4537         * GT1-54: "Guarantor Financial Class" - creates it if necessary
4538         */
4539        public FC getGt154_GuarantorFinancialClass() { 
4540            FC ret = null;
4541            try {
4542                Type t = this.getField(54, 0);
4543                ret = (FC)t;
4544            } catch (ClassCastException cce) {
4545                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4546                throw new RuntimeException(cce);
4547            } catch (HL7Exception he) {
4548                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4549                throw new RuntimeException(he);
4550            }
4551            return ret;
4552        }
4553    
4554    
4555        /**
4556         * Returns all repetitions of Guarantor Race (GT1-55).
4557         */
4558        public CE[] getGuarantorRace() {
4559            CE[] ret = null;
4560            try {
4561                Type[] t = this.getField(55);  
4562                ret = new CE[t.length];
4563                for (int i = 0; i < ret.length; i++) {
4564                    ret[i] = (CE)t[i];
4565                }
4566            } catch (ClassCastException cce) {
4567                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4568                throw new RuntimeException(cce);
4569            } catch (HL7Exception he) {
4570                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4571                throw new RuntimeException(he);
4572            }
4573            return ret;
4574        }
4575    
4576    
4577        /**
4578         * Returns a count of the current number of repetitions of Guarantor Race (GT1-55).
4579         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4580         * it will return zero.
4581         */
4582        public int getGuarantorRaceReps() {
4583            CE[] ret = null;
4584            try {
4585                Type[] t = this.getField(55);
4586                return t.length;  
4587            } catch (ClassCastException cce) {
4588                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4589                throw new RuntimeException(cce);
4590            } catch (HL7Exception he) {
4591                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4592                throw new RuntimeException(he);
4593            }
4594        }
4595    
4596    
4597        /**
4598         * Returns a specific repetition of
4599         * GT1-55: "Guarantor Race" - creates it if necessary
4600         *
4601         * @param rep The repetition index (0-indexed)
4602         */
4603        public CE getGuarantorRace(int rep) { 
4604            CE ret = null;
4605            try {
4606                Type t = this.getField(55, rep);
4607                ret = (CE)t;
4608            } catch (ClassCastException cce) {
4609                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4610                throw new RuntimeException(cce);
4611            } catch (HL7Exception he) {
4612                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4613                throw new RuntimeException(he);
4614            }
4615            return ret;
4616        }
4617    
4618        /**
4619         * Returns a specific repetition of
4620         * GT1-55: "Guarantor Race" - creates it if necessary
4621         *
4622         * @param rep The repetition index (0-indexed)
4623         */
4624        public CE getGt155_GuarantorRace(int rep) { 
4625            CE ret = null;
4626            try {
4627                Type t = this.getField(55, rep);
4628                ret = (CE)t;
4629            } catch (ClassCastException cce) {
4630                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4631                throw new RuntimeException(cce);
4632            } catch (HL7Exception he) {
4633                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4634                throw new RuntimeException(he);
4635            }
4636            return ret;
4637        }
4638    
4639    
4640        /**
4641         * Returns a count of the current number of repetitions of Guarantor Race (GT1-55).
4642         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
4643         * it will return zero.
4644         */
4645        public int getGt155_GuarantorRaceReps() {
4646            CE[] ret = null;
4647            try {
4648                Type[] t = this.getField(55);
4649                return t.length;  
4650            } catch (ClassCastException cce) {
4651                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
4652                throw new RuntimeException(cce);
4653            } catch (HL7Exception he) {
4654                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
4655                throw new RuntimeException(he);
4656            }
4657        }
4658    
4659    
4660    
4661        /**
4662         * Inserts a repetition of
4663         * GT1-55: "Guarantor Race" at a specific index
4664         *
4665         * @param rep The repetition index (0-indexed)
4666         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4667         */
4668        public CE insertGuarantorRace(int rep) throws HL7Exception { 
4669            return (CE) super.insertRepetition(55, rep);
4670        }
4671    
4672    
4673    
4674        /**
4675         * Inserts a repetition of
4676         * GT1-55: "Guarantor Race" at a specific index
4677         *
4678         * @param rep The repetition index (0-indexed)
4679         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4680         */
4681        public CE insertGt155_GuarantorRace(int rep) throws HL7Exception { 
4682            return (CE) super.insertRepetition(55, rep);
4683        }
4684    
4685    
4686        /**
4687         * Removes a repetition of
4688         * GT1-55: "Guarantor Race" at a specific index
4689         *
4690         * @param rep The repetition index (0-indexed)
4691         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4692         */
4693        public CE removeGuarantorRace(int rep) throws HL7Exception { 
4694            return (CE) super.removeRepetition(55, rep);
4695        }
4696    
4697    
4698        /**
4699         * Removes a repetition of
4700         * GT1-55: "Guarantor Race" at a specific index
4701         *
4702         * @param rep The repetition index (0-indexed)
4703         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
4704         */
4705        public CE removeGt155_GuarantorRace(int rep) throws HL7Exception { 
4706            return (CE) super.removeRepetition(55, rep);
4707        }
4708    
4709    
4710    
4711    
4712    
4713    
4714        /** {@inheritDoc} */   
4715        protected Type createNewTypeWithoutReflection(int field) {
4716           switch (field) {
4717              case 0: return new SI(getMessage());
4718              case 1: return new CX(getMessage());
4719              case 2: return new XPN(getMessage());
4720              case 3: return new XPN(getMessage());
4721              case 4: return new XAD(getMessage());
4722              case 5: return new XTN(getMessage());
4723              case 6: return new XTN(getMessage());
4724              case 7: return new TS(getMessage());
4725              case 8: return new IS(getMessage(), new Integer( 1 ));
4726              case 9: return new IS(getMessage(), new Integer( 68 ));
4727              case 10: return new CE(getMessage());
4728              case 11: return new ST(getMessage());
4729              case 12: return new DT(getMessage());
4730              case 13: return new DT(getMessage());
4731              case 14: return new NM(getMessage());
4732              case 15: return new XPN(getMessage());
4733              case 16: return new XAD(getMessage());
4734              case 17: return new XTN(getMessage());
4735              case 18: return new CX(getMessage());
4736              case 19: return new IS(getMessage(), new Integer( 66 ));
4737              case 20: return new XON(getMessage());
4738              case 21: return new ID(getMessage(), new Integer( 136 ));
4739              case 22: return new CE(getMessage());
4740              case 23: return new TS(getMessage());
4741              case 24: return new ID(getMessage(), new Integer( 136 ));
4742              case 25: return new CE(getMessage());
4743              case 26: return new CP(getMessage());
4744              case 27: return new NM(getMessage());
4745              case 28: return new CX(getMessage());
4746              case 29: return new CE(getMessage());
4747              case 30: return new DT(getMessage());
4748              case 31: return new DT(getMessage());
4749              case 32: return new IS(getMessage(), new Integer( 223 ));
4750              case 33: return new IS(getMessage(), new Integer( 9 ));
4751              case 34: return new CE(getMessage());
4752              case 35: return new CE(getMessage());
4753              case 36: return new IS(getMessage(), new Integer( 220 ));
4754              case 37: return new CE(getMessage());
4755              case 38: return new ID(getMessage(), new Integer( 136 ));
4756              case 39: return new IS(getMessage(), new Integer( 231 ));
4757              case 40: return new CE(getMessage());
4758              case 41: return new XPN(getMessage());
4759              case 42: return new CE(getMessage());
4760              case 43: return new CE(getMessage());
4761              case 44: return new XPN(getMessage());
4762              case 45: return new XTN(getMessage());
4763              case 46: return new CE(getMessage());
4764              case 47: return new IS(getMessage(), new Integer( 63 ));
4765              case 48: return new ST(getMessage());
4766              case 49: return new JCC(getMessage());
4767              case 50: return new XON(getMessage());
4768              case 51: return new IS(getMessage(), new Integer( 295 ));
4769              case 52: return new IS(getMessage(), new Integer( 311 ));
4770              case 53: return new FC(getMessage());
4771              case 54: return new CE(getMessage());
4772              default: return null;
4773           }
4774       }
4775    
4776    
4777    }
4778