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 PEO message segment (Product Experience Observation). 
024     * This segment has the following fields:</p>
025     * <ul>
026         * <li>PEO-1: Event Identifiers Used (CE) <b>optional repeating</b>
027         * <li>PEO-2: Event Symptom/Diagnosis Code (CE) <b>optional repeating</b>
028         * <li>PEO-3: Event Onset Date/Time (TS) <b> </b>
029         * <li>PEO-4: Event Exacerbation Date/Time (TS) <b>optional </b>
030         * <li>PEO-5: Event Improved Date/Time (TS) <b>optional </b>
031         * <li>PEO-6: Event Ended Data/Time (TS) <b>optional </b>
032         * <li>PEO-7: Event Location Occurred Address (XAD) <b>optional repeating</b>
033         * <li>PEO-8: Event Qualification (ID) <b>optional repeating</b>
034         * <li>PEO-9: Event Serious (ID) <b>optional </b>
035         * <li>PEO-10: Event Expected (ID) <b>optional </b>
036         * <li>PEO-11: Event Outcome (ID) <b>optional repeating</b>
037         * <li>PEO-12: Patient Outcome (ID) <b>optional </b>
038         * <li>PEO-13: Event Description From Others (FT) <b>optional repeating</b>
039         * <li>PEO-14: Event From Original Reporter (FT) <b>optional repeating</b>
040         * <li>PEO-15: Event Description From Patient (FT) <b>optional repeating</b>
041         * <li>PEO-16: Event Description From Practitioner (FT) <b>optional repeating</b>
042         * <li>PEO-17: Event Description From Autopsy (FT) <b>optional repeating</b>
043         * <li>PEO-18: Cause Of Death (CE) <b>optional repeating</b>
044         * <li>PEO-19: Primary Observer Name (XPN) <b>optional repeating</b>
045         * <li>PEO-20: Primary Observer Address (XAD) <b>optional repeating</b>
046         * <li>PEO-21: Primary Observer Telephone (XTN) <b>optional repeating</b>
047         * <li>PEO-22: Primary Observer's Qualification (ID) <b>optional </b>
048         * <li>PEO-23: Confirmation Provided By (ID) <b>optional </b>
049         * <li>PEO-24: Primary Observer Aware Date/Time (TS) <b>optional </b>
050         * <li>PEO-25: Primary Observer's identity May Be Divulged (ID) <b>optional </b>
051     * </ul>
052     */
053    public class PEO extends AbstractSegment {
054    
055        /** 
056         * Creates a new PEO segment
057         */
058        public PEO(Group parent, ModelClassFactory factory) {
059           super(parent, factory);
060           init(factory);
061        }
062    
063        private void init(ModelClassFactory factory) {
064           try {
065                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Event Identifiers Used");
066                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Event Symptom/Diagnosis Code");
067                                      this.add(TS.class, true, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Event Onset Date/Time");
068                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Event Exacerbation Date/Time");
069                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Event Improved Date/Time");
070                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Event Ended Data/Time");
071                                      this.add(XAD.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Event Location Occurred Address");
072                                      this.add(ID.class, false, 0, 1, new Object[]{ getMessage() }, "Event Qualification");
073                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Event Serious");
074                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Event Expected");
075                                      this.add(ID.class, false, 0, 1, new Object[]{ getMessage() }, "Event Outcome");
076                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Patient Outcome");
077                                      this.add(FT.class, false, 0, 600, new Object[]{ getMessage(), new Integer(0) }, "Event Description From Others");
078                                      this.add(FT.class, false, 0, 600, new Object[]{ getMessage(), new Integer(0) }, "Event From Original Reporter");
079                                      this.add(FT.class, false, 0, 600, new Object[]{ getMessage(), new Integer(0) }, "Event Description From Patient");
080                                      this.add(FT.class, false, 0, 600, new Object[]{ getMessage(), new Integer(0) }, "Event Description From Practitioner");
081                                      this.add(FT.class, false, 0, 600, new Object[]{ getMessage(), new Integer(0) }, "Event Description From Autopsy");
082                                      this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Cause Of Death");
083                                      this.add(XPN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Primary Observer Name");
084                                      this.add(XAD.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Primary Observer Address");
085                                      this.add(XTN.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Primary Observer Telephone");
086                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Primary Observer's Qualification");
087                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Confirmation Provided By");
088                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Primary Observer Aware Date/Time");
089                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Primary Observer's identity May Be Divulged");
090           } catch(HL7Exception e) {
091              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating PEO - this is probably a bug in the source code generator.", e);
092           }
093        }
094    
095    
096        /**
097         * Returns all repetitions of Event Identifiers Used (PEO-1).
098         */
099        public CE[] getEventIdentifiersUsed() {
100            CE[] ret = null;
101            try {
102                Type[] t = this.getField(1);  
103                ret = new CE[t.length];
104                for (int i = 0; i < ret.length; i++) {
105                    ret[i] = (CE)t[i];
106                }
107            } catch (ClassCastException cce) {
108                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
109                throw new RuntimeException(cce);
110            } catch (HL7Exception he) {
111                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
112                throw new RuntimeException(he);
113            }
114            return ret;
115        }
116    
117    
118        /**
119         * Returns a count of the current number of repetitions of Event Identifiers Used (PEO-1).
120         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
121         * it will return zero.
122         */
123        public int getEventIdentifiersUsedReps() {
124            CE[] ret = null;
125            try {
126                Type[] t = this.getField(1);
127                return t.length;  
128            } catch (ClassCastException cce) {
129                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
130                throw new RuntimeException(cce);
131            } catch (HL7Exception he) {
132                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
133                throw new RuntimeException(he);
134            }
135        }
136    
137    
138        /**
139         * Returns a specific repetition of
140         * PEO-1: "Event Identifiers Used" - creates it if necessary
141         *
142         * @param rep The repetition index (0-indexed)
143         */
144        public CE getEventIdentifiersUsed(int rep) { 
145            CE ret = null;
146            try {
147                Type t = this.getField(1, rep);
148                ret = (CE)t;
149            } catch (ClassCastException cce) {
150                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
151                throw new RuntimeException(cce);
152            } catch (HL7Exception he) {
153                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
154                throw new RuntimeException(he);
155            }
156            return ret;
157        }
158    
159        /**
160         * Returns a specific repetition of
161         * PEO-1: "Event Identifiers Used" - creates it if necessary
162         *
163         * @param rep The repetition index (0-indexed)
164         */
165        public CE getPeo1_EventIdentifiersUsed(int rep) { 
166            CE ret = null;
167            try {
168                Type t = this.getField(1, rep);
169                ret = (CE)t;
170            } catch (ClassCastException cce) {
171                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
172                throw new RuntimeException(cce);
173            } catch (HL7Exception he) {
174                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
175                throw new RuntimeException(he);
176            }
177            return ret;
178        }
179    
180    
181        /**
182         * Returns a count of the current number of repetitions of Event Identifiers Used (PEO-1).
183         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
184         * it will return zero.
185         */
186        public int getPeo1_EventIdentifiersUsedReps() {
187            CE[] ret = null;
188            try {
189                Type[] t = this.getField(1);
190                return t.length;  
191            } catch (ClassCastException cce) {
192                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
193                throw new RuntimeException(cce);
194            } catch (HL7Exception he) {
195                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
196                throw new RuntimeException(he);
197            }
198        }
199    
200    
201    
202        /**
203         * Inserts a repetition of
204         * PEO-1: "Event Identifiers Used" at a specific index
205         *
206         * @param rep The repetition index (0-indexed)
207         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
208         */
209        public CE insertEventIdentifiersUsed(int rep) throws HL7Exception { 
210            return (CE) super.insertRepetition(1, rep);
211        }
212    
213    
214    
215        /**
216         * Inserts a repetition of
217         * PEO-1: "Event Identifiers Used" at a specific index
218         *
219         * @param rep The repetition index (0-indexed)
220         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
221         */
222        public CE insertPeo1_EventIdentifiersUsed(int rep) throws HL7Exception { 
223            return (CE) super.insertRepetition(1, rep);
224        }
225    
226    
227        /**
228         * Removes a repetition of
229         * PEO-1: "Event Identifiers Used" at a specific index
230         *
231         * @param rep The repetition index (0-indexed)
232         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
233         */
234        public CE removeEventIdentifiersUsed(int rep) throws HL7Exception { 
235            return (CE) super.removeRepetition(1, rep);
236        }
237    
238    
239        /**
240         * Removes a repetition of
241         * PEO-1: "Event Identifiers Used" at a specific index
242         *
243         * @param rep The repetition index (0-indexed)
244         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
245         */
246        public CE removePeo1_EventIdentifiersUsed(int rep) throws HL7Exception { 
247            return (CE) super.removeRepetition(1, rep);
248        }
249    
250    
251    
252        /**
253         * Returns all repetitions of Event Symptom/Diagnosis Code (PEO-2).
254         */
255        public CE[] getEventSymptomDiagnosisCode() {
256            CE[] ret = null;
257            try {
258                Type[] t = this.getField(2);  
259                ret = new CE[t.length];
260                for (int i = 0; i < ret.length; i++) {
261                    ret[i] = (CE)t[i];
262                }
263            } catch (ClassCastException cce) {
264                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
265                throw new RuntimeException(cce);
266            } catch (HL7Exception he) {
267                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
268                throw new RuntimeException(he);
269            }
270            return ret;
271        }
272    
273    
274        /**
275         * Returns a count of the current number of repetitions of Event Symptom/Diagnosis Code (PEO-2).
276         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
277         * it will return zero.
278         */
279        public int getEventSymptomDiagnosisCodeReps() {
280            CE[] ret = null;
281            try {
282                Type[] t = this.getField(2);
283                return t.length;  
284            } catch (ClassCastException cce) {
285                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
286                throw new RuntimeException(cce);
287            } catch (HL7Exception he) {
288                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
289                throw new RuntimeException(he);
290            }
291        }
292    
293    
294        /**
295         * Returns a specific repetition of
296         * PEO-2: "Event Symptom/Diagnosis Code" - creates it if necessary
297         *
298         * @param rep The repetition index (0-indexed)
299         */
300        public CE getEventSymptomDiagnosisCode(int rep) { 
301            CE ret = null;
302            try {
303                Type t = this.getField(2, rep);
304                ret = (CE)t;
305            } catch (ClassCastException cce) {
306                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
307                throw new RuntimeException(cce);
308            } catch (HL7Exception he) {
309                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
310                throw new RuntimeException(he);
311            }
312            return ret;
313        }
314    
315        /**
316         * Returns a specific repetition of
317         * PEO-2: "Event Symptom/Diagnosis Code" - creates it if necessary
318         *
319         * @param rep The repetition index (0-indexed)
320         */
321        public CE getPeo2_EventSymptomDiagnosisCode(int rep) { 
322            CE ret = null;
323            try {
324                Type t = this.getField(2, rep);
325                ret = (CE)t;
326            } catch (ClassCastException cce) {
327                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
328                throw new RuntimeException(cce);
329            } catch (HL7Exception he) {
330                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
331                throw new RuntimeException(he);
332            }
333            return ret;
334        }
335    
336    
337        /**
338         * Returns a count of the current number of repetitions of Event Symptom/Diagnosis Code (PEO-2).
339         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
340         * it will return zero.
341         */
342        public int getPeo2_EventSymptomDiagnosisCodeReps() {
343            CE[] ret = null;
344            try {
345                Type[] t = this.getField(2);
346                return t.length;  
347            } catch (ClassCastException cce) {
348                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
349                throw new RuntimeException(cce);
350            } catch (HL7Exception he) {
351                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
352                throw new RuntimeException(he);
353            }
354        }
355    
356    
357    
358        /**
359         * Inserts a repetition of
360         * PEO-2: "Event Symptom/Diagnosis Code" at a specific index
361         *
362         * @param rep The repetition index (0-indexed)
363         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
364         */
365        public CE insertEventSymptomDiagnosisCode(int rep) throws HL7Exception { 
366            return (CE) super.insertRepetition(2, rep);
367        }
368    
369    
370    
371        /**
372         * Inserts a repetition of
373         * PEO-2: "Event Symptom/Diagnosis Code" at a specific index
374         *
375         * @param rep The repetition index (0-indexed)
376         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
377         */
378        public CE insertPeo2_EventSymptomDiagnosisCode(int rep) throws HL7Exception { 
379            return (CE) super.insertRepetition(2, rep);
380        }
381    
382    
383        /**
384         * Removes a repetition of
385         * PEO-2: "Event Symptom/Diagnosis Code" at a specific index
386         *
387         * @param rep The repetition index (0-indexed)
388         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
389         */
390        public CE removeEventSymptomDiagnosisCode(int rep) throws HL7Exception { 
391            return (CE) super.removeRepetition(2, rep);
392        }
393    
394    
395        /**
396         * Removes a repetition of
397         * PEO-2: "Event Symptom/Diagnosis Code" at a specific index
398         *
399         * @param rep The repetition index (0-indexed)
400         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
401         */
402        public CE removePeo2_EventSymptomDiagnosisCode(int rep) throws HL7Exception { 
403            return (CE) super.removeRepetition(2, rep);
404        }
405    
406    
407    
408    
409        /**
410         * Returns
411         * PEO-3: "Event Onset Date/Time" - creates it if necessary
412         */
413        public TS getEventOnsetDateTime() { 
414            TS ret = null;
415            try {
416                Type t = this.getField(3, 0);
417                ret = (TS)t;
418            } catch (ClassCastException cce) {
419                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
420                throw new RuntimeException(cce);
421            } catch (HL7Exception he) {
422                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
423                throw new RuntimeException(he);
424            }
425            return ret;
426        }
427    
428    
429        /**
430         * Returns
431         * PEO-3: "Event Onset Date/Time" - creates it if necessary
432         */
433        public TS getPeo3_EventOnsetDateTime() { 
434            TS ret = null;
435            try {
436                Type t = this.getField(3, 0);
437                ret = (TS)t;
438            } catch (ClassCastException cce) {
439                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
440                throw new RuntimeException(cce);
441            } catch (HL7Exception he) {
442                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
443                throw new RuntimeException(he);
444            }
445            return ret;
446        }
447    
448    
449    
450        /**
451         * Returns
452         * PEO-4: "Event Exacerbation Date/Time" - creates it if necessary
453         */
454        public TS getEventExacerbationDateTime() { 
455            TS ret = null;
456            try {
457                Type t = this.getField(4, 0);
458                ret = (TS)t;
459            } catch (ClassCastException cce) {
460                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
461                throw new RuntimeException(cce);
462            } catch (HL7Exception he) {
463                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
464                throw new RuntimeException(he);
465            }
466            return ret;
467        }
468    
469    
470        /**
471         * Returns
472         * PEO-4: "Event Exacerbation Date/Time" - creates it if necessary
473         */
474        public TS getPeo4_EventExacerbationDateTime() { 
475            TS ret = null;
476            try {
477                Type t = this.getField(4, 0);
478                ret = (TS)t;
479            } catch (ClassCastException cce) {
480                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
481                throw new RuntimeException(cce);
482            } catch (HL7Exception he) {
483                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
484                throw new RuntimeException(he);
485            }
486            return ret;
487        }
488    
489    
490    
491        /**
492         * Returns
493         * PEO-5: "Event Improved Date/Time" - creates it if necessary
494         */
495        public TS getEventImprovedDateTime() { 
496            TS ret = null;
497            try {
498                Type t = this.getField(5, 0);
499                ret = (TS)t;
500            } catch (ClassCastException cce) {
501                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
502                throw new RuntimeException(cce);
503            } catch (HL7Exception he) {
504                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
505                throw new RuntimeException(he);
506            }
507            return ret;
508        }
509    
510    
511        /**
512         * Returns
513         * PEO-5: "Event Improved Date/Time" - creates it if necessary
514         */
515        public TS getPeo5_EventImprovedDateTime() { 
516            TS ret = null;
517            try {
518                Type t = this.getField(5, 0);
519                ret = (TS)t;
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        /**
533         * Returns
534         * PEO-6: "Event Ended Data/Time" - creates it if necessary
535         */
536        public TS getEventEndedDataTime() { 
537            TS ret = null;
538            try {
539                Type t = this.getField(6, 0);
540                ret = (TS)t;
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            return ret;
549        }
550    
551    
552        /**
553         * Returns
554         * PEO-6: "Event Ended Data/Time" - creates it if necessary
555         */
556        public TS getPeo6_EventEndedDataTime() { 
557            TS ret = null;
558            try {
559                Type t = this.getField(6, 0);
560                ret = (TS)t;
561            } catch (ClassCastException cce) {
562                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
563                throw new RuntimeException(cce);
564            } catch (HL7Exception he) {
565                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
566                throw new RuntimeException(he);
567            }
568            return ret;
569        }
570    
571    
572        /**
573         * Returns all repetitions of Event Location Occurred Address (PEO-7).
574         */
575        public XAD[] getEventLocationOccurredAddress() {
576            XAD[] ret = null;
577            try {
578                Type[] t = this.getField(7);  
579                ret = new XAD[t.length];
580                for (int i = 0; i < ret.length; i++) {
581                    ret[i] = (XAD)t[i];
582                }
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 Event Location Occurred Address (PEO-7).
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 getEventLocationOccurredAddressReps() {
600            XAD[] ret = null;
601            try {
602                Type[] t = this.getField(7);
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         * Returns a specific repetition of
616         * PEO-7: "Event Location Occurred Address" - creates it if necessary
617         *
618         * @param rep The repetition index (0-indexed)
619         */
620        public XAD getEventLocationOccurredAddress(int rep) { 
621            XAD ret = null;
622            try {
623                Type t = this.getField(7, rep);
624                ret = (XAD)t;
625            } catch (ClassCastException cce) {
626                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
627                throw new RuntimeException(cce);
628            } catch (HL7Exception he) {
629                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
630                throw new RuntimeException(he);
631            }
632            return ret;
633        }
634    
635        /**
636         * Returns a specific repetition of
637         * PEO-7: "Event Location Occurred Address" - creates it if necessary
638         *
639         * @param rep The repetition index (0-indexed)
640         */
641        public XAD getPeo7_EventLocationOccurredAddress(int rep) { 
642            XAD ret = null;
643            try {
644                Type t = this.getField(7, rep);
645                ret = (XAD)t;
646            } catch (ClassCastException cce) {
647                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
648                throw new RuntimeException(cce);
649            } catch (HL7Exception he) {
650                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
651                throw new RuntimeException(he);
652            }
653            return ret;
654        }
655    
656    
657        /**
658         * Returns a count of the current number of repetitions of Event Location Occurred Address (PEO-7).
659         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
660         * it will return zero.
661         */
662        public int getPeo7_EventLocationOccurredAddressReps() {
663            XAD[] ret = null;
664            try {
665                Type[] t = this.getField(7);
666                return t.length;  
667            } catch (ClassCastException cce) {
668                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
669                throw new RuntimeException(cce);
670            } catch (HL7Exception he) {
671                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
672                throw new RuntimeException(he);
673            }
674        }
675    
676    
677    
678        /**
679         * Inserts a repetition of
680         * PEO-7: "Event Location Occurred Address" at a specific index
681         *
682         * @param rep The repetition index (0-indexed)
683         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
684         */
685        public XAD insertEventLocationOccurredAddress(int rep) throws HL7Exception { 
686            return (XAD) super.insertRepetition(7, rep);
687        }
688    
689    
690    
691        /**
692         * Inserts a repetition of
693         * PEO-7: "Event Location Occurred Address" at a specific index
694         *
695         * @param rep The repetition index (0-indexed)
696         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
697         */
698        public XAD insertPeo7_EventLocationOccurredAddress(int rep) throws HL7Exception { 
699            return (XAD) super.insertRepetition(7, rep);
700        }
701    
702    
703        /**
704         * Removes a repetition of
705         * PEO-7: "Event Location Occurred Address" at a specific index
706         *
707         * @param rep The repetition index (0-indexed)
708         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
709         */
710        public XAD removeEventLocationOccurredAddress(int rep) throws HL7Exception { 
711            return (XAD) super.removeRepetition(7, rep);
712        }
713    
714    
715        /**
716         * Removes a repetition of
717         * PEO-7: "Event Location Occurred Address" at a specific index
718         *
719         * @param rep The repetition index (0-indexed)
720         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
721         */
722        public XAD removePeo7_EventLocationOccurredAddress(int rep) throws HL7Exception { 
723            return (XAD) super.removeRepetition(7, rep);
724        }
725    
726    
727    
728        /**
729         * Returns all repetitions of Event Qualification (PEO-8).
730         */
731        public ID[] getEventQualification() {
732            ID[] ret = null;
733            try {
734                Type[] t = this.getField(8);  
735                ret = new ID[t.length];
736                for (int i = 0; i < ret.length; i++) {
737                    ret[i] = (ID)t[i];
738                }
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 Event Qualification (PEO-8).
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 getEventQualificationReps() {
756            ID[] ret = null;
757            try {
758                Type[] t = this.getField(8);
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         * Returns a specific repetition of
772         * PEO-8: "Event Qualification" - creates it if necessary
773         *
774         * @param rep The repetition index (0-indexed)
775         */
776        public ID getEventQualification(int rep) { 
777            ID ret = null;
778            try {
779                Type t = this.getField(8, rep);
780                ret = (ID)t;
781            } catch (ClassCastException cce) {
782                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
783                throw new RuntimeException(cce);
784            } catch (HL7Exception he) {
785                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
786                throw new RuntimeException(he);
787            }
788            return ret;
789        }
790    
791        /**
792         * Returns a specific repetition of
793         * PEO-8: "Event Qualification" - creates it if necessary
794         *
795         * @param rep The repetition index (0-indexed)
796         */
797        public ID getPeo8_EventQualification(int rep) { 
798            ID ret = null;
799            try {
800                Type t = this.getField(8, rep);
801                ret = (ID)t;
802            } catch (ClassCastException cce) {
803                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
804                throw new RuntimeException(cce);
805            } catch (HL7Exception he) {
806                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
807                throw new RuntimeException(he);
808            }
809            return ret;
810        }
811    
812    
813        /**
814         * Returns a count of the current number of repetitions of Event Qualification (PEO-8).
815         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
816         * it will return zero.
817         */
818        public int getPeo8_EventQualificationReps() {
819            ID[] ret = null;
820            try {
821                Type[] t = this.getField(8);
822                return t.length;  
823            } catch (ClassCastException cce) {
824                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
825                throw new RuntimeException(cce);
826            } catch (HL7Exception he) {
827                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
828                throw new RuntimeException(he);
829            }
830        }
831    
832    
833    
834        /**
835         * Inserts a repetition of
836         * PEO-8: "Event Qualification" at a specific index
837         *
838         * @param rep The repetition index (0-indexed)
839         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
840         */
841        public ID insertEventQualification(int rep) throws HL7Exception { 
842            return (ID) super.insertRepetition(8, rep);
843        }
844    
845    
846    
847        /**
848         * Inserts a repetition of
849         * PEO-8: "Event Qualification" at a specific index
850         *
851         * @param rep The repetition index (0-indexed)
852         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
853         */
854        public ID insertPeo8_EventQualification(int rep) throws HL7Exception { 
855            return (ID) super.insertRepetition(8, rep);
856        }
857    
858    
859        /**
860         * Removes a repetition of
861         * PEO-8: "Event Qualification" at a specific index
862         *
863         * @param rep The repetition index (0-indexed)
864         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
865         */
866        public ID removeEventQualification(int rep) throws HL7Exception { 
867            return (ID) super.removeRepetition(8, rep);
868        }
869    
870    
871        /**
872         * Removes a repetition of
873         * PEO-8: "Event Qualification" at a specific index
874         *
875         * @param rep The repetition index (0-indexed)
876         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
877         */
878        public ID removePeo8_EventQualification(int rep) throws HL7Exception { 
879            return (ID) super.removeRepetition(8, rep);
880        }
881    
882    
883    
884    
885        /**
886         * Returns
887         * PEO-9: "Event Serious" - creates it if necessary
888         */
889        public ID getEventSerious() { 
890            ID ret = null;
891            try {
892                Type t = this.getField(9, 0);
893                ret = (ID)t;
894            } catch (ClassCastException cce) {
895                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
896                throw new RuntimeException(cce);
897            } catch (HL7Exception he) {
898                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
899                throw new RuntimeException(he);
900            }
901            return ret;
902        }
903    
904    
905        /**
906         * Returns
907         * PEO-9: "Event Serious" - creates it if necessary
908         */
909        public ID getPeo9_EventSerious() { 
910            ID ret = null;
911            try {
912                Type t = this.getField(9, 0);
913                ret = (ID)t;
914            } catch (ClassCastException cce) {
915                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
916                throw new RuntimeException(cce);
917            } catch (HL7Exception he) {
918                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
919                throw new RuntimeException(he);
920            }
921            return ret;
922        }
923    
924    
925    
926        /**
927         * Returns
928         * PEO-10: "Event Expected" - creates it if necessary
929         */
930        public ID getEventExpected() { 
931            ID ret = null;
932            try {
933                Type t = this.getField(10, 0);
934                ret = (ID)t;
935            } catch (ClassCastException cce) {
936                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
937                throw new RuntimeException(cce);
938            } catch (HL7Exception he) {
939                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
940                throw new RuntimeException(he);
941            }
942            return ret;
943        }
944    
945    
946        /**
947         * Returns
948         * PEO-10: "Event Expected" - creates it if necessary
949         */
950        public ID getPeo10_EventExpected() { 
951            ID ret = null;
952            try {
953                Type t = this.getField(10, 0);
954                ret = (ID)t;
955            } catch (ClassCastException cce) {
956                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
957                throw new RuntimeException(cce);
958            } catch (HL7Exception he) {
959                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
960                throw new RuntimeException(he);
961            }
962            return ret;
963        }
964    
965    
966        /**
967         * Returns all repetitions of Event Outcome (PEO-11).
968         */
969        public ID[] getEventOutcome() {
970            ID[] ret = null;
971            try {
972                Type[] t = this.getField(11);  
973                ret = new ID[t.length];
974                for (int i = 0; i < ret.length; i++) {
975                    ret[i] = (ID)t[i];
976                }
977            } catch (ClassCastException cce) {
978                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
979                throw new RuntimeException(cce);
980            } catch (HL7Exception he) {
981                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
982                throw new RuntimeException(he);
983            }
984            return ret;
985        }
986    
987    
988        /**
989         * Returns a count of the current number of repetitions of Event Outcome (PEO-11).
990         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
991         * it will return zero.
992         */
993        public int getEventOutcomeReps() {
994            ID[] ret = null;
995            try {
996                Type[] t = this.getField(11);
997                return t.length;  
998            } catch (ClassCastException cce) {
999                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1000                throw new RuntimeException(cce);
1001            } catch (HL7Exception he) {
1002                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1003                throw new RuntimeException(he);
1004            }
1005        }
1006    
1007    
1008        /**
1009         * Returns a specific repetition of
1010         * PEO-11: "Event Outcome" - creates it if necessary
1011         *
1012         * @param rep The repetition index (0-indexed)
1013         */
1014        public ID getEventOutcome(int rep) { 
1015            ID ret = null;
1016            try {
1017                Type t = this.getField(11, rep);
1018                ret = (ID)t;
1019            } catch (ClassCastException cce) {
1020                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1021                throw new RuntimeException(cce);
1022            } catch (HL7Exception he) {
1023                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1024                throw new RuntimeException(he);
1025            }
1026            return ret;
1027        }
1028    
1029        /**
1030         * Returns a specific repetition of
1031         * PEO-11: "Event Outcome" - creates it if necessary
1032         *
1033         * @param rep The repetition index (0-indexed)
1034         */
1035        public ID getPeo11_EventOutcome(int rep) { 
1036            ID ret = null;
1037            try {
1038                Type t = this.getField(11, rep);
1039                ret = (ID)t;
1040            } catch (ClassCastException cce) {
1041                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1042                throw new RuntimeException(cce);
1043            } catch (HL7Exception he) {
1044                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1045                throw new RuntimeException(he);
1046            }
1047            return ret;
1048        }
1049    
1050    
1051        /**
1052         * Returns a count of the current number of repetitions of Event Outcome (PEO-11).
1053         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1054         * it will return zero.
1055         */
1056        public int getPeo11_EventOutcomeReps() {
1057            ID[] ret = null;
1058            try {
1059                Type[] t = this.getField(11);
1060                return t.length;  
1061            } catch (ClassCastException cce) {
1062                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1063                throw new RuntimeException(cce);
1064            } catch (HL7Exception he) {
1065                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1066                throw new RuntimeException(he);
1067            }
1068        }
1069    
1070    
1071    
1072        /**
1073         * Inserts a repetition of
1074         * PEO-11: "Event Outcome" at a specific index
1075         *
1076         * @param rep The repetition index (0-indexed)
1077         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1078         */
1079        public ID insertEventOutcome(int rep) throws HL7Exception { 
1080            return (ID) super.insertRepetition(11, rep);
1081        }
1082    
1083    
1084    
1085        /**
1086         * Inserts a repetition of
1087         * PEO-11: "Event Outcome" at a specific index
1088         *
1089         * @param rep The repetition index (0-indexed)
1090         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1091         */
1092        public ID insertPeo11_EventOutcome(int rep) throws HL7Exception { 
1093            return (ID) super.insertRepetition(11, rep);
1094        }
1095    
1096    
1097        /**
1098         * Removes a repetition of
1099         * PEO-11: "Event Outcome" at a specific index
1100         *
1101         * @param rep The repetition index (0-indexed)
1102         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1103         */
1104        public ID removeEventOutcome(int rep) throws HL7Exception { 
1105            return (ID) super.removeRepetition(11, rep);
1106        }
1107    
1108    
1109        /**
1110         * Removes a repetition of
1111         * PEO-11: "Event Outcome" at a specific index
1112         *
1113         * @param rep The repetition index (0-indexed)
1114         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1115         */
1116        public ID removePeo11_EventOutcome(int rep) throws HL7Exception { 
1117            return (ID) super.removeRepetition(11, rep);
1118        }
1119    
1120    
1121    
1122    
1123        /**
1124         * Returns
1125         * PEO-12: "Patient Outcome" - creates it if necessary
1126         */
1127        public ID getPatientOutcome() { 
1128            ID ret = null;
1129            try {
1130                Type t = this.getField(12, 0);
1131                ret = (ID)t;
1132            } catch (ClassCastException cce) {
1133                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1134                throw new RuntimeException(cce);
1135            } catch (HL7Exception he) {
1136                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1137                throw new RuntimeException(he);
1138            }
1139            return ret;
1140        }
1141    
1142    
1143        /**
1144         * Returns
1145         * PEO-12: "Patient Outcome" - creates it if necessary
1146         */
1147        public ID getPeo12_PatientOutcome() { 
1148            ID ret = null;
1149            try {
1150                Type t = this.getField(12, 0);
1151                ret = (ID)t;
1152            } catch (ClassCastException cce) {
1153                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1154                throw new RuntimeException(cce);
1155            } catch (HL7Exception he) {
1156                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1157                throw new RuntimeException(he);
1158            }
1159            return ret;
1160        }
1161    
1162    
1163        /**
1164         * Returns all repetitions of Event Description From Others (PEO-13).
1165         */
1166        public FT[] getEventDescriptionFromOthers() {
1167            FT[] ret = null;
1168            try {
1169                Type[] t = this.getField(13);  
1170                ret = new FT[t.length];
1171                for (int i = 0; i < ret.length; i++) {
1172                    ret[i] = (FT)t[i];
1173                }
1174            } catch (ClassCastException cce) {
1175                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1176                throw new RuntimeException(cce);
1177            } catch (HL7Exception he) {
1178                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1179                throw new RuntimeException(he);
1180            }
1181            return ret;
1182        }
1183    
1184    
1185        /**
1186         * Returns a count of the current number of repetitions of Event Description From Others (PEO-13).
1187         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1188         * it will return zero.
1189         */
1190        public int getEventDescriptionFromOthersReps() {
1191            FT[] ret = null;
1192            try {
1193                Type[] t = this.getField(13);
1194                return t.length;  
1195            } catch (ClassCastException cce) {
1196                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1197                throw new RuntimeException(cce);
1198            } catch (HL7Exception he) {
1199                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1200                throw new RuntimeException(he);
1201            }
1202        }
1203    
1204    
1205        /**
1206         * Returns a specific repetition of
1207         * PEO-13: "Event Description From Others" - creates it if necessary
1208         *
1209         * @param rep The repetition index (0-indexed)
1210         */
1211        public FT getEventDescriptionFromOthers(int rep) { 
1212            FT ret = null;
1213            try {
1214                Type t = this.getField(13, rep);
1215                ret = (FT)t;
1216            } catch (ClassCastException cce) {
1217                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1218                throw new RuntimeException(cce);
1219            } catch (HL7Exception he) {
1220                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1221                throw new RuntimeException(he);
1222            }
1223            return ret;
1224        }
1225    
1226        /**
1227         * Returns a specific repetition of
1228         * PEO-13: "Event Description From Others" - creates it if necessary
1229         *
1230         * @param rep The repetition index (0-indexed)
1231         */
1232        public FT getPeo13_EventDescriptionFromOthers(int rep) { 
1233            FT ret = null;
1234            try {
1235                Type t = this.getField(13, rep);
1236                ret = (FT)t;
1237            } catch (ClassCastException cce) {
1238                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1239                throw new RuntimeException(cce);
1240            } catch (HL7Exception he) {
1241                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1242                throw new RuntimeException(he);
1243            }
1244            return ret;
1245        }
1246    
1247    
1248        /**
1249         * Returns a count of the current number of repetitions of Event Description From Others (PEO-13).
1250         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1251         * it will return zero.
1252         */
1253        public int getPeo13_EventDescriptionFromOthersReps() {
1254            FT[] ret = null;
1255            try {
1256                Type[] t = this.getField(13);
1257                return t.length;  
1258            } catch (ClassCastException cce) {
1259                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1260                throw new RuntimeException(cce);
1261            } catch (HL7Exception he) {
1262                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1263                throw new RuntimeException(he);
1264            }
1265        }
1266    
1267    
1268    
1269        /**
1270         * Inserts a repetition of
1271         * PEO-13: "Event Description From Others" at a specific index
1272         *
1273         * @param rep The repetition index (0-indexed)
1274         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1275         */
1276        public FT insertEventDescriptionFromOthers(int rep) throws HL7Exception { 
1277            return (FT) super.insertRepetition(13, rep);
1278        }
1279    
1280    
1281    
1282        /**
1283         * Inserts a repetition of
1284         * PEO-13: "Event Description From Others" at a specific index
1285         *
1286         * @param rep The repetition index (0-indexed)
1287         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1288         */
1289        public FT insertPeo13_EventDescriptionFromOthers(int rep) throws HL7Exception { 
1290            return (FT) super.insertRepetition(13, rep);
1291        }
1292    
1293    
1294        /**
1295         * Removes a repetition of
1296         * PEO-13: "Event Description From Others" at a specific index
1297         *
1298         * @param rep The repetition index (0-indexed)
1299         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1300         */
1301        public FT removeEventDescriptionFromOthers(int rep) throws HL7Exception { 
1302            return (FT) super.removeRepetition(13, rep);
1303        }
1304    
1305    
1306        /**
1307         * Removes a repetition of
1308         * PEO-13: "Event Description From Others" at a specific index
1309         *
1310         * @param rep The repetition index (0-indexed)
1311         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1312         */
1313        public FT removePeo13_EventDescriptionFromOthers(int rep) throws HL7Exception { 
1314            return (FT) super.removeRepetition(13, rep);
1315        }
1316    
1317    
1318    
1319        /**
1320         * Returns all repetitions of Event From Original Reporter (PEO-14).
1321         */
1322        public FT[] getEventFromOriginalReporter() {
1323            FT[] ret = null;
1324            try {
1325                Type[] t = this.getField(14);  
1326                ret = new FT[t.length];
1327                for (int i = 0; i < ret.length; i++) {
1328                    ret[i] = (FT)t[i];
1329                }
1330            } catch (ClassCastException cce) {
1331                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1332                throw new RuntimeException(cce);
1333            } catch (HL7Exception he) {
1334                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1335                throw new RuntimeException(he);
1336            }
1337            return ret;
1338        }
1339    
1340    
1341        /**
1342         * Returns a count of the current number of repetitions of Event From Original Reporter (PEO-14).
1343         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1344         * it will return zero.
1345         */
1346        public int getEventFromOriginalReporterReps() {
1347            FT[] ret = null;
1348            try {
1349                Type[] t = this.getField(14);
1350                return t.length;  
1351            } catch (ClassCastException cce) {
1352                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1353                throw new RuntimeException(cce);
1354            } catch (HL7Exception he) {
1355                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1356                throw new RuntimeException(he);
1357            }
1358        }
1359    
1360    
1361        /**
1362         * Returns a specific repetition of
1363         * PEO-14: "Event From Original Reporter" - creates it if necessary
1364         *
1365         * @param rep The repetition index (0-indexed)
1366         */
1367        public FT getEventFromOriginalReporter(int rep) { 
1368            FT ret = null;
1369            try {
1370                Type t = this.getField(14, rep);
1371                ret = (FT)t;
1372            } catch (ClassCastException cce) {
1373                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1374                throw new RuntimeException(cce);
1375            } catch (HL7Exception he) {
1376                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1377                throw new RuntimeException(he);
1378            }
1379            return ret;
1380        }
1381    
1382        /**
1383         * Returns a specific repetition of
1384         * PEO-14: "Event From Original Reporter" - creates it if necessary
1385         *
1386         * @param rep The repetition index (0-indexed)
1387         */
1388        public FT getPeo14_EventFromOriginalReporter(int rep) { 
1389            FT ret = null;
1390            try {
1391                Type t = this.getField(14, rep);
1392                ret = (FT)t;
1393            } catch (ClassCastException cce) {
1394                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1395                throw new RuntimeException(cce);
1396            } catch (HL7Exception he) {
1397                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1398                throw new RuntimeException(he);
1399            }
1400            return ret;
1401        }
1402    
1403    
1404        /**
1405         * Returns a count of the current number of repetitions of Event From Original Reporter (PEO-14).
1406         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1407         * it will return zero.
1408         */
1409        public int getPeo14_EventFromOriginalReporterReps() {
1410            FT[] ret = null;
1411            try {
1412                Type[] t = this.getField(14);
1413                return t.length;  
1414            } catch (ClassCastException cce) {
1415                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1416                throw new RuntimeException(cce);
1417            } catch (HL7Exception he) {
1418                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1419                throw new RuntimeException(he);
1420            }
1421        }
1422    
1423    
1424    
1425        /**
1426         * Inserts a repetition of
1427         * PEO-14: "Event From Original Reporter" at a specific index
1428         *
1429         * @param rep The repetition index (0-indexed)
1430         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1431         */
1432        public FT insertEventFromOriginalReporter(int rep) throws HL7Exception { 
1433            return (FT) super.insertRepetition(14, rep);
1434        }
1435    
1436    
1437    
1438        /**
1439         * Inserts a repetition of
1440         * PEO-14: "Event From Original Reporter" at a specific index
1441         *
1442         * @param rep The repetition index (0-indexed)
1443         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1444         */
1445        public FT insertPeo14_EventFromOriginalReporter(int rep) throws HL7Exception { 
1446            return (FT) super.insertRepetition(14, rep);
1447        }
1448    
1449    
1450        /**
1451         * Removes a repetition of
1452         * PEO-14: "Event From Original Reporter" at a specific index
1453         *
1454         * @param rep The repetition index (0-indexed)
1455         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1456         */
1457        public FT removeEventFromOriginalReporter(int rep) throws HL7Exception { 
1458            return (FT) super.removeRepetition(14, rep);
1459        }
1460    
1461    
1462        /**
1463         * Removes a repetition of
1464         * PEO-14: "Event From Original Reporter" at a specific index
1465         *
1466         * @param rep The repetition index (0-indexed)
1467         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1468         */
1469        public FT removePeo14_EventFromOriginalReporter(int rep) throws HL7Exception { 
1470            return (FT) super.removeRepetition(14, rep);
1471        }
1472    
1473    
1474    
1475        /**
1476         * Returns all repetitions of Event Description From Patient (PEO-15).
1477         */
1478        public FT[] getEventDescriptionFromPatient() {
1479            FT[] ret = null;
1480            try {
1481                Type[] t = this.getField(15);  
1482                ret = new FT[t.length];
1483                for (int i = 0; i < ret.length; i++) {
1484                    ret[i] = (FT)t[i];
1485                }
1486            } catch (ClassCastException cce) {
1487                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1488                throw new RuntimeException(cce);
1489            } catch (HL7Exception he) {
1490                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1491                throw new RuntimeException(he);
1492            }
1493            return ret;
1494        }
1495    
1496    
1497        /**
1498         * Returns a count of the current number of repetitions of Event Description From Patient (PEO-15).
1499         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1500         * it will return zero.
1501         */
1502        public int getEventDescriptionFromPatientReps() {
1503            FT[] ret = null;
1504            try {
1505                Type[] t = this.getField(15);
1506                return t.length;  
1507            } catch (ClassCastException cce) {
1508                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1509                throw new RuntimeException(cce);
1510            } catch (HL7Exception he) {
1511                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1512                throw new RuntimeException(he);
1513            }
1514        }
1515    
1516    
1517        /**
1518         * Returns a specific repetition of
1519         * PEO-15: "Event Description From Patient" - creates it if necessary
1520         *
1521         * @param rep The repetition index (0-indexed)
1522         */
1523        public FT getEventDescriptionFromPatient(int rep) { 
1524            FT ret = null;
1525            try {
1526                Type t = this.getField(15, rep);
1527                ret = (FT)t;
1528            } catch (ClassCastException cce) {
1529                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1530                throw new RuntimeException(cce);
1531            } catch (HL7Exception he) {
1532                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1533                throw new RuntimeException(he);
1534            }
1535            return ret;
1536        }
1537    
1538        /**
1539         * Returns a specific repetition of
1540         * PEO-15: "Event Description From Patient" - creates it if necessary
1541         *
1542         * @param rep The repetition index (0-indexed)
1543         */
1544        public FT getPeo15_EventDescriptionFromPatient(int rep) { 
1545            FT ret = null;
1546            try {
1547                Type t = this.getField(15, rep);
1548                ret = (FT)t;
1549            } catch (ClassCastException cce) {
1550                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1551                throw new RuntimeException(cce);
1552            } catch (HL7Exception he) {
1553                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1554                throw new RuntimeException(he);
1555            }
1556            return ret;
1557        }
1558    
1559    
1560        /**
1561         * Returns a count of the current number of repetitions of Event Description From Patient (PEO-15).
1562         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1563         * it will return zero.
1564         */
1565        public int getPeo15_EventDescriptionFromPatientReps() {
1566            FT[] ret = null;
1567            try {
1568                Type[] t = this.getField(15);
1569                return t.length;  
1570            } catch (ClassCastException cce) {
1571                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1572                throw new RuntimeException(cce);
1573            } catch (HL7Exception he) {
1574                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1575                throw new RuntimeException(he);
1576            }
1577        }
1578    
1579    
1580    
1581        /**
1582         * Inserts a repetition of
1583         * PEO-15: "Event Description From Patient" at a specific index
1584         *
1585         * @param rep The repetition index (0-indexed)
1586         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1587         */
1588        public FT insertEventDescriptionFromPatient(int rep) throws HL7Exception { 
1589            return (FT) super.insertRepetition(15, rep);
1590        }
1591    
1592    
1593    
1594        /**
1595         * Inserts a repetition of
1596         * PEO-15: "Event Description From Patient" at a specific index
1597         *
1598         * @param rep The repetition index (0-indexed)
1599         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1600         */
1601        public FT insertPeo15_EventDescriptionFromPatient(int rep) throws HL7Exception { 
1602            return (FT) super.insertRepetition(15, rep);
1603        }
1604    
1605    
1606        /**
1607         * Removes a repetition of
1608         * PEO-15: "Event Description From Patient" at a specific index
1609         *
1610         * @param rep The repetition index (0-indexed)
1611         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1612         */
1613        public FT removeEventDescriptionFromPatient(int rep) throws HL7Exception { 
1614            return (FT) super.removeRepetition(15, rep);
1615        }
1616    
1617    
1618        /**
1619         * Removes a repetition of
1620         * PEO-15: "Event Description From Patient" at a specific index
1621         *
1622         * @param rep The repetition index (0-indexed)
1623         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1624         */
1625        public FT removePeo15_EventDescriptionFromPatient(int rep) throws HL7Exception { 
1626            return (FT) super.removeRepetition(15, rep);
1627        }
1628    
1629    
1630    
1631        /**
1632         * Returns all repetitions of Event Description From Practitioner (PEO-16).
1633         */
1634        public FT[] getEventDescriptionFromPractitioner() {
1635            FT[] ret = null;
1636            try {
1637                Type[] t = this.getField(16);  
1638                ret = new FT[t.length];
1639                for (int i = 0; i < ret.length; i++) {
1640                    ret[i] = (FT)t[i];
1641                }
1642            } catch (ClassCastException cce) {
1643                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1644                throw new RuntimeException(cce);
1645            } catch (HL7Exception he) {
1646                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1647                throw new RuntimeException(he);
1648            }
1649            return ret;
1650        }
1651    
1652    
1653        /**
1654         * Returns a count of the current number of repetitions of Event Description From Practitioner (PEO-16).
1655         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1656         * it will return zero.
1657         */
1658        public int getEventDescriptionFromPractitionerReps() {
1659            FT[] ret = null;
1660            try {
1661                Type[] t = this.getField(16);
1662                return t.length;  
1663            } catch (ClassCastException cce) {
1664                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1665                throw new RuntimeException(cce);
1666            } catch (HL7Exception he) {
1667                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1668                throw new RuntimeException(he);
1669            }
1670        }
1671    
1672    
1673        /**
1674         * Returns a specific repetition of
1675         * PEO-16: "Event Description From Practitioner" - creates it if necessary
1676         *
1677         * @param rep The repetition index (0-indexed)
1678         */
1679        public FT getEventDescriptionFromPractitioner(int rep) { 
1680            FT ret = null;
1681            try {
1682                Type t = this.getField(16, rep);
1683                ret = (FT)t;
1684            } catch (ClassCastException cce) {
1685                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1686                throw new RuntimeException(cce);
1687            } catch (HL7Exception he) {
1688                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1689                throw new RuntimeException(he);
1690            }
1691            return ret;
1692        }
1693    
1694        /**
1695         * Returns a specific repetition of
1696         * PEO-16: "Event Description From Practitioner" - creates it if necessary
1697         *
1698         * @param rep The repetition index (0-indexed)
1699         */
1700        public FT getPeo16_EventDescriptionFromPractitioner(int rep) { 
1701            FT ret = null;
1702            try {
1703                Type t = this.getField(16, rep);
1704                ret = (FT)t;
1705            } catch (ClassCastException cce) {
1706                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1707                throw new RuntimeException(cce);
1708            } catch (HL7Exception he) {
1709                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1710                throw new RuntimeException(he);
1711            }
1712            return ret;
1713        }
1714    
1715    
1716        /**
1717         * Returns a count of the current number of repetitions of Event Description From Practitioner (PEO-16).
1718         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1719         * it will return zero.
1720         */
1721        public int getPeo16_EventDescriptionFromPractitionerReps() {
1722            FT[] ret = null;
1723            try {
1724                Type[] t = this.getField(16);
1725                return t.length;  
1726            } catch (ClassCastException cce) {
1727                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1728                throw new RuntimeException(cce);
1729            } catch (HL7Exception he) {
1730                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1731                throw new RuntimeException(he);
1732            }
1733        }
1734    
1735    
1736    
1737        /**
1738         * Inserts a repetition of
1739         * PEO-16: "Event Description From Practitioner" at a specific index
1740         *
1741         * @param rep The repetition index (0-indexed)
1742         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1743         */
1744        public FT insertEventDescriptionFromPractitioner(int rep) throws HL7Exception { 
1745            return (FT) super.insertRepetition(16, rep);
1746        }
1747    
1748    
1749    
1750        /**
1751         * Inserts a repetition of
1752         * PEO-16: "Event Description From Practitioner" at a specific index
1753         *
1754         * @param rep The repetition index (0-indexed)
1755         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1756         */
1757        public FT insertPeo16_EventDescriptionFromPractitioner(int rep) throws HL7Exception { 
1758            return (FT) super.insertRepetition(16, rep);
1759        }
1760    
1761    
1762        /**
1763         * Removes a repetition of
1764         * PEO-16: "Event Description From Practitioner" at a specific index
1765         *
1766         * @param rep The repetition index (0-indexed)
1767         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1768         */
1769        public FT removeEventDescriptionFromPractitioner(int rep) throws HL7Exception { 
1770            return (FT) super.removeRepetition(16, rep);
1771        }
1772    
1773    
1774        /**
1775         * Removes a repetition of
1776         * PEO-16: "Event Description From Practitioner" at a specific index
1777         *
1778         * @param rep The repetition index (0-indexed)
1779         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1780         */
1781        public FT removePeo16_EventDescriptionFromPractitioner(int rep) throws HL7Exception { 
1782            return (FT) super.removeRepetition(16, rep);
1783        }
1784    
1785    
1786    
1787        /**
1788         * Returns all repetitions of Event Description From Autopsy (PEO-17).
1789         */
1790        public FT[] getEventDescriptionFromAutopsy() {
1791            FT[] ret = null;
1792            try {
1793                Type[] t = this.getField(17);  
1794                ret = new FT[t.length];
1795                for (int i = 0; i < ret.length; i++) {
1796                    ret[i] = (FT)t[i];
1797                }
1798            } catch (ClassCastException cce) {
1799                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1800                throw new RuntimeException(cce);
1801            } catch (HL7Exception he) {
1802                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1803                throw new RuntimeException(he);
1804            }
1805            return ret;
1806        }
1807    
1808    
1809        /**
1810         * Returns a count of the current number of repetitions of Event Description From Autopsy (PEO-17).
1811         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1812         * it will return zero.
1813         */
1814        public int getEventDescriptionFromAutopsyReps() {
1815            FT[] ret = null;
1816            try {
1817                Type[] t = this.getField(17);
1818                return t.length;  
1819            } catch (ClassCastException cce) {
1820                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1821                throw new RuntimeException(cce);
1822            } catch (HL7Exception he) {
1823                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1824                throw new RuntimeException(he);
1825            }
1826        }
1827    
1828    
1829        /**
1830         * Returns a specific repetition of
1831         * PEO-17: "Event Description From Autopsy" - creates it if necessary
1832         *
1833         * @param rep The repetition index (0-indexed)
1834         */
1835        public FT getEventDescriptionFromAutopsy(int rep) { 
1836            FT ret = null;
1837            try {
1838                Type t = this.getField(17, rep);
1839                ret = (FT)t;
1840            } catch (ClassCastException cce) {
1841                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1842                throw new RuntimeException(cce);
1843            } catch (HL7Exception he) {
1844                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1845                throw new RuntimeException(he);
1846            }
1847            return ret;
1848        }
1849    
1850        /**
1851         * Returns a specific repetition of
1852         * PEO-17: "Event Description From Autopsy" - creates it if necessary
1853         *
1854         * @param rep The repetition index (0-indexed)
1855         */
1856        public FT getPeo17_EventDescriptionFromAutopsy(int rep) { 
1857            FT ret = null;
1858            try {
1859                Type t = this.getField(17, rep);
1860                ret = (FT)t;
1861            } catch (ClassCastException cce) {
1862                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1863                throw new RuntimeException(cce);
1864            } catch (HL7Exception he) {
1865                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1866                throw new RuntimeException(he);
1867            }
1868            return ret;
1869        }
1870    
1871    
1872        /**
1873         * Returns a count of the current number of repetitions of Event Description From Autopsy (PEO-17).
1874         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1875         * it will return zero.
1876         */
1877        public int getPeo17_EventDescriptionFromAutopsyReps() {
1878            FT[] ret = null;
1879            try {
1880                Type[] t = this.getField(17);
1881                return t.length;  
1882            } catch (ClassCastException cce) {
1883                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1884                throw new RuntimeException(cce);
1885            } catch (HL7Exception he) {
1886                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1887                throw new RuntimeException(he);
1888            }
1889        }
1890    
1891    
1892    
1893        /**
1894         * Inserts a repetition of
1895         * PEO-17: "Event Description From Autopsy" at a specific index
1896         *
1897         * @param rep The repetition index (0-indexed)
1898         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1899         */
1900        public FT insertEventDescriptionFromAutopsy(int rep) throws HL7Exception { 
1901            return (FT) super.insertRepetition(17, rep);
1902        }
1903    
1904    
1905    
1906        /**
1907         * Inserts a repetition of
1908         * PEO-17: "Event Description From Autopsy" at a specific index
1909         *
1910         * @param rep The repetition index (0-indexed)
1911         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1912         */
1913        public FT insertPeo17_EventDescriptionFromAutopsy(int rep) throws HL7Exception { 
1914            return (FT) super.insertRepetition(17, rep);
1915        }
1916    
1917    
1918        /**
1919         * Removes a repetition of
1920         * PEO-17: "Event Description From Autopsy" at a specific index
1921         *
1922         * @param rep The repetition index (0-indexed)
1923         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1924         */
1925        public FT removeEventDescriptionFromAutopsy(int rep) throws HL7Exception { 
1926            return (FT) super.removeRepetition(17, rep);
1927        }
1928    
1929    
1930        /**
1931         * Removes a repetition of
1932         * PEO-17: "Event Description From Autopsy" at a specific index
1933         *
1934         * @param rep The repetition index (0-indexed)
1935         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1936         */
1937        public FT removePeo17_EventDescriptionFromAutopsy(int rep) throws HL7Exception { 
1938            return (FT) super.removeRepetition(17, rep);
1939        }
1940    
1941    
1942    
1943        /**
1944         * Returns all repetitions of Cause Of Death (PEO-18).
1945         */
1946        public CE[] getCauseOfDeath() {
1947            CE[] ret = null;
1948            try {
1949                Type[] t = this.getField(18);  
1950                ret = new CE[t.length];
1951                for (int i = 0; i < ret.length; i++) {
1952                    ret[i] = (CE)t[i];
1953                }
1954            } catch (ClassCastException cce) {
1955                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1956                throw new RuntimeException(cce);
1957            } catch (HL7Exception he) {
1958                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1959                throw new RuntimeException(he);
1960            }
1961            return ret;
1962        }
1963    
1964    
1965        /**
1966         * Returns a count of the current number of repetitions of Cause Of Death (PEO-18).
1967         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1968         * it will return zero.
1969         */
1970        public int getCauseOfDeathReps() {
1971            CE[] ret = null;
1972            try {
1973                Type[] t = this.getField(18);
1974                return t.length;  
1975            } catch (ClassCastException cce) {
1976                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1977                throw new RuntimeException(cce);
1978            } catch (HL7Exception he) {
1979                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1980                throw new RuntimeException(he);
1981            }
1982        }
1983    
1984    
1985        /**
1986         * Returns a specific repetition of
1987         * PEO-18: "Cause Of Death" - creates it if necessary
1988         *
1989         * @param rep The repetition index (0-indexed)
1990         */
1991        public CE getCauseOfDeath(int rep) { 
1992            CE ret = null;
1993            try {
1994                Type t = this.getField(18, rep);
1995                ret = (CE)t;
1996            } catch (ClassCastException cce) {
1997                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1998                throw new RuntimeException(cce);
1999            } catch (HL7Exception he) {
2000                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2001                throw new RuntimeException(he);
2002            }
2003            return ret;
2004        }
2005    
2006        /**
2007         * Returns a specific repetition of
2008         * PEO-18: "Cause Of Death" - creates it if necessary
2009         *
2010         * @param rep The repetition index (0-indexed)
2011         */
2012        public CE getPeo18_CauseOfDeath(int rep) { 
2013            CE ret = null;
2014            try {
2015                Type t = this.getField(18, rep);
2016                ret = (CE)t;
2017            } catch (ClassCastException cce) {
2018                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2019                throw new RuntimeException(cce);
2020            } catch (HL7Exception he) {
2021                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2022                throw new RuntimeException(he);
2023            }
2024            return ret;
2025        }
2026    
2027    
2028        /**
2029         * Returns a count of the current number of repetitions of Cause Of Death (PEO-18).
2030         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2031         * it will return zero.
2032         */
2033        public int getPeo18_CauseOfDeathReps() {
2034            CE[] ret = null;
2035            try {
2036                Type[] t = this.getField(18);
2037                return t.length;  
2038            } catch (ClassCastException cce) {
2039                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2040                throw new RuntimeException(cce);
2041            } catch (HL7Exception he) {
2042                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2043                throw new RuntimeException(he);
2044            }
2045        }
2046    
2047    
2048    
2049        /**
2050         * Inserts a repetition of
2051         * PEO-18: "Cause Of Death" at a specific index
2052         *
2053         * @param rep The repetition index (0-indexed)
2054         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2055         */
2056        public CE insertCauseOfDeath(int rep) throws HL7Exception { 
2057            return (CE) super.insertRepetition(18, rep);
2058        }
2059    
2060    
2061    
2062        /**
2063         * Inserts a repetition of
2064         * PEO-18: "Cause Of Death" at a specific index
2065         *
2066         * @param rep The repetition index (0-indexed)
2067         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2068         */
2069        public CE insertPeo18_CauseOfDeath(int rep) throws HL7Exception { 
2070            return (CE) super.insertRepetition(18, rep);
2071        }
2072    
2073    
2074        /**
2075         * Removes a repetition of
2076         * PEO-18: "Cause Of Death" at a specific index
2077         *
2078         * @param rep The repetition index (0-indexed)
2079         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2080         */
2081        public CE removeCauseOfDeath(int rep) throws HL7Exception { 
2082            return (CE) super.removeRepetition(18, rep);
2083        }
2084    
2085    
2086        /**
2087         * Removes a repetition of
2088         * PEO-18: "Cause Of Death" at a specific index
2089         *
2090         * @param rep The repetition index (0-indexed)
2091         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2092         */
2093        public CE removePeo18_CauseOfDeath(int rep) throws HL7Exception { 
2094            return (CE) super.removeRepetition(18, rep);
2095        }
2096    
2097    
2098    
2099        /**
2100         * Returns all repetitions of Primary Observer Name (PEO-19).
2101         */
2102        public XPN[] getPrimaryObserverName() {
2103            XPN[] ret = null;
2104            try {
2105                Type[] t = this.getField(19);  
2106                ret = new XPN[t.length];
2107                for (int i = 0; i < ret.length; i++) {
2108                    ret[i] = (XPN)t[i];
2109                }
2110            } catch (ClassCastException cce) {
2111                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2112                throw new RuntimeException(cce);
2113            } catch (HL7Exception he) {
2114                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2115                throw new RuntimeException(he);
2116            }
2117            return ret;
2118        }
2119    
2120    
2121        /**
2122         * Returns a count of the current number of repetitions of Primary Observer Name (PEO-19).
2123         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2124         * it will return zero.
2125         */
2126        public int getPrimaryObserverNameReps() {
2127            XPN[] ret = null;
2128            try {
2129                Type[] t = this.getField(19);
2130                return t.length;  
2131            } catch (ClassCastException cce) {
2132                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2133                throw new RuntimeException(cce);
2134            } catch (HL7Exception he) {
2135                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2136                throw new RuntimeException(he);
2137            }
2138        }
2139    
2140    
2141        /**
2142         * Returns a specific repetition of
2143         * PEO-19: "Primary Observer Name" - creates it if necessary
2144         *
2145         * @param rep The repetition index (0-indexed)
2146         */
2147        public XPN getPrimaryObserverName(int rep) { 
2148            XPN ret = null;
2149            try {
2150                Type t = this.getField(19, rep);
2151                ret = (XPN)t;
2152            } catch (ClassCastException cce) {
2153                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2154                throw new RuntimeException(cce);
2155            } catch (HL7Exception he) {
2156                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2157                throw new RuntimeException(he);
2158            }
2159            return ret;
2160        }
2161    
2162        /**
2163         * Returns a specific repetition of
2164         * PEO-19: "Primary Observer Name" - creates it if necessary
2165         *
2166         * @param rep The repetition index (0-indexed)
2167         */
2168        public XPN getPeo19_PrimaryObserverName(int rep) { 
2169            XPN ret = null;
2170            try {
2171                Type t = this.getField(19, rep);
2172                ret = (XPN)t;
2173            } catch (ClassCastException cce) {
2174                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2175                throw new RuntimeException(cce);
2176            } catch (HL7Exception he) {
2177                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2178                throw new RuntimeException(he);
2179            }
2180            return ret;
2181        }
2182    
2183    
2184        /**
2185         * Returns a count of the current number of repetitions of Primary Observer Name (PEO-19).
2186         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2187         * it will return zero.
2188         */
2189        public int getPeo19_PrimaryObserverNameReps() {
2190            XPN[] ret = null;
2191            try {
2192                Type[] t = this.getField(19);
2193                return t.length;  
2194            } catch (ClassCastException cce) {
2195                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2196                throw new RuntimeException(cce);
2197            } catch (HL7Exception he) {
2198                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2199                throw new RuntimeException(he);
2200            }
2201        }
2202    
2203    
2204    
2205        /**
2206         * Inserts a repetition of
2207         * PEO-19: "Primary Observer Name" at a specific index
2208         *
2209         * @param rep The repetition index (0-indexed)
2210         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2211         */
2212        public XPN insertPrimaryObserverName(int rep) throws HL7Exception { 
2213            return (XPN) super.insertRepetition(19, rep);
2214        }
2215    
2216    
2217    
2218        /**
2219         * Inserts a repetition of
2220         * PEO-19: "Primary Observer Name" at a specific index
2221         *
2222         * @param rep The repetition index (0-indexed)
2223         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2224         */
2225        public XPN insertPeo19_PrimaryObserverName(int rep) throws HL7Exception { 
2226            return (XPN) super.insertRepetition(19, rep);
2227        }
2228    
2229    
2230        /**
2231         * Removes a repetition of
2232         * PEO-19: "Primary Observer Name" at a specific index
2233         *
2234         * @param rep The repetition index (0-indexed)
2235         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2236         */
2237        public XPN removePrimaryObserverName(int rep) throws HL7Exception { 
2238            return (XPN) super.removeRepetition(19, rep);
2239        }
2240    
2241    
2242        /**
2243         * Removes a repetition of
2244         * PEO-19: "Primary Observer Name" at a specific index
2245         *
2246         * @param rep The repetition index (0-indexed)
2247         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2248         */
2249        public XPN removePeo19_PrimaryObserverName(int rep) throws HL7Exception { 
2250            return (XPN) super.removeRepetition(19, rep);
2251        }
2252    
2253    
2254    
2255        /**
2256         * Returns all repetitions of Primary Observer Address (PEO-20).
2257         */
2258        public XAD[] getPrimaryObserverAddress() {
2259            XAD[] ret = null;
2260            try {
2261                Type[] t = this.getField(20);  
2262                ret = new XAD[t.length];
2263                for (int i = 0; i < ret.length; i++) {
2264                    ret[i] = (XAD)t[i];
2265                }
2266            } catch (ClassCastException cce) {
2267                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2268                throw new RuntimeException(cce);
2269            } catch (HL7Exception he) {
2270                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2271                throw new RuntimeException(he);
2272            }
2273            return ret;
2274        }
2275    
2276    
2277        /**
2278         * Returns a count of the current number of repetitions of Primary Observer Address (PEO-20).
2279         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2280         * it will return zero.
2281         */
2282        public int getPrimaryObserverAddressReps() {
2283            XAD[] ret = null;
2284            try {
2285                Type[] t = this.getField(20);
2286                return t.length;  
2287            } catch (ClassCastException cce) {
2288                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2289                throw new RuntimeException(cce);
2290            } catch (HL7Exception he) {
2291                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2292                throw new RuntimeException(he);
2293            }
2294        }
2295    
2296    
2297        /**
2298         * Returns a specific repetition of
2299         * PEO-20: "Primary Observer Address" - creates it if necessary
2300         *
2301         * @param rep The repetition index (0-indexed)
2302         */
2303        public XAD getPrimaryObserverAddress(int rep) { 
2304            XAD ret = null;
2305            try {
2306                Type t = this.getField(20, rep);
2307                ret = (XAD)t;
2308            } catch (ClassCastException cce) {
2309                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2310                throw new RuntimeException(cce);
2311            } catch (HL7Exception he) {
2312                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2313                throw new RuntimeException(he);
2314            }
2315            return ret;
2316        }
2317    
2318        /**
2319         * Returns a specific repetition of
2320         * PEO-20: "Primary Observer Address" - creates it if necessary
2321         *
2322         * @param rep The repetition index (0-indexed)
2323         */
2324        public XAD getPeo20_PrimaryObserverAddress(int rep) { 
2325            XAD ret = null;
2326            try {
2327                Type t = this.getField(20, rep);
2328                ret = (XAD)t;
2329            } catch (ClassCastException cce) {
2330                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2331                throw new RuntimeException(cce);
2332            } catch (HL7Exception he) {
2333                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2334                throw new RuntimeException(he);
2335            }
2336            return ret;
2337        }
2338    
2339    
2340        /**
2341         * Returns a count of the current number of repetitions of Primary Observer Address (PEO-20).
2342         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2343         * it will return zero.
2344         */
2345        public int getPeo20_PrimaryObserverAddressReps() {
2346            XAD[] ret = null;
2347            try {
2348                Type[] t = this.getField(20);
2349                return t.length;  
2350            } catch (ClassCastException cce) {
2351                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2352                throw new RuntimeException(cce);
2353            } catch (HL7Exception he) {
2354                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2355                throw new RuntimeException(he);
2356            }
2357        }
2358    
2359    
2360    
2361        /**
2362         * Inserts a repetition of
2363         * PEO-20: "Primary Observer Address" at a specific index
2364         *
2365         * @param rep The repetition index (0-indexed)
2366         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2367         */
2368        public XAD insertPrimaryObserverAddress(int rep) throws HL7Exception { 
2369            return (XAD) super.insertRepetition(20, rep);
2370        }
2371    
2372    
2373    
2374        /**
2375         * Inserts a repetition of
2376         * PEO-20: "Primary Observer Address" at a specific index
2377         *
2378         * @param rep The repetition index (0-indexed)
2379         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2380         */
2381        public XAD insertPeo20_PrimaryObserverAddress(int rep) throws HL7Exception { 
2382            return (XAD) super.insertRepetition(20, rep);
2383        }
2384    
2385    
2386        /**
2387         * Removes a repetition of
2388         * PEO-20: "Primary Observer Address" at a specific index
2389         *
2390         * @param rep The repetition index (0-indexed)
2391         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2392         */
2393        public XAD removePrimaryObserverAddress(int rep) throws HL7Exception { 
2394            return (XAD) super.removeRepetition(20, rep);
2395        }
2396    
2397    
2398        /**
2399         * Removes a repetition of
2400         * PEO-20: "Primary Observer Address" at a specific index
2401         *
2402         * @param rep The repetition index (0-indexed)
2403         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2404         */
2405        public XAD removePeo20_PrimaryObserverAddress(int rep) throws HL7Exception { 
2406            return (XAD) super.removeRepetition(20, rep);
2407        }
2408    
2409    
2410    
2411        /**
2412         * Returns all repetitions of Primary Observer Telephone (PEO-21).
2413         */
2414        public XTN[] getPrimaryObserverTelephone() {
2415            XTN[] ret = null;
2416            try {
2417                Type[] t = this.getField(21);  
2418                ret = new XTN[t.length];
2419                for (int i = 0; i < ret.length; i++) {
2420                    ret[i] = (XTN)t[i];
2421                }
2422            } catch (ClassCastException cce) {
2423                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2424                throw new RuntimeException(cce);
2425            } catch (HL7Exception he) {
2426                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2427                throw new RuntimeException(he);
2428            }
2429            return ret;
2430        }
2431    
2432    
2433        /**
2434         * Returns a count of the current number of repetitions of Primary Observer Telephone (PEO-21).
2435         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2436         * it will return zero.
2437         */
2438        public int getPrimaryObserverTelephoneReps() {
2439            XTN[] ret = null;
2440            try {
2441                Type[] t = this.getField(21);
2442                return t.length;  
2443            } catch (ClassCastException cce) {
2444                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2445                throw new RuntimeException(cce);
2446            } catch (HL7Exception he) {
2447                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2448                throw new RuntimeException(he);
2449            }
2450        }
2451    
2452    
2453        /**
2454         * Returns a specific repetition of
2455         * PEO-21: "Primary Observer Telephone" - creates it if necessary
2456         *
2457         * @param rep The repetition index (0-indexed)
2458         */
2459        public XTN getPrimaryObserverTelephone(int rep) { 
2460            XTN ret = null;
2461            try {
2462                Type t = this.getField(21, rep);
2463                ret = (XTN)t;
2464            } catch (ClassCastException cce) {
2465                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2466                throw new RuntimeException(cce);
2467            } catch (HL7Exception he) {
2468                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2469                throw new RuntimeException(he);
2470            }
2471            return ret;
2472        }
2473    
2474        /**
2475         * Returns a specific repetition of
2476         * PEO-21: "Primary Observer Telephone" - creates it if necessary
2477         *
2478         * @param rep The repetition index (0-indexed)
2479         */
2480        public XTN getPeo21_PrimaryObserverTelephone(int rep) { 
2481            XTN ret = null;
2482            try {
2483                Type t = this.getField(21, rep);
2484                ret = (XTN)t;
2485            } catch (ClassCastException cce) {
2486                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2487                throw new RuntimeException(cce);
2488            } catch (HL7Exception he) {
2489                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2490                throw new RuntimeException(he);
2491            }
2492            return ret;
2493        }
2494    
2495    
2496        /**
2497         * Returns a count of the current number of repetitions of Primary Observer Telephone (PEO-21).
2498         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2499         * it will return zero.
2500         */
2501        public int getPeo21_PrimaryObserverTelephoneReps() {
2502            XTN[] ret = null;
2503            try {
2504                Type[] t = this.getField(21);
2505                return t.length;  
2506            } catch (ClassCastException cce) {
2507                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2508                throw new RuntimeException(cce);
2509            } catch (HL7Exception he) {
2510                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2511                throw new RuntimeException(he);
2512            }
2513        }
2514    
2515    
2516    
2517        /**
2518         * Inserts a repetition of
2519         * PEO-21: "Primary Observer Telephone" at a specific index
2520         *
2521         * @param rep The repetition index (0-indexed)
2522         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2523         */
2524        public XTN insertPrimaryObserverTelephone(int rep) throws HL7Exception { 
2525            return (XTN) super.insertRepetition(21, rep);
2526        }
2527    
2528    
2529    
2530        /**
2531         * Inserts a repetition of
2532         * PEO-21: "Primary Observer Telephone" at a specific index
2533         *
2534         * @param rep The repetition index (0-indexed)
2535         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2536         */
2537        public XTN insertPeo21_PrimaryObserverTelephone(int rep) throws HL7Exception { 
2538            return (XTN) super.insertRepetition(21, rep);
2539        }
2540    
2541    
2542        /**
2543         * Removes a repetition of
2544         * PEO-21: "Primary Observer Telephone" at a specific index
2545         *
2546         * @param rep The repetition index (0-indexed)
2547         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2548         */
2549        public XTN removePrimaryObserverTelephone(int rep) throws HL7Exception { 
2550            return (XTN) super.removeRepetition(21, rep);
2551        }
2552    
2553    
2554        /**
2555         * Removes a repetition of
2556         * PEO-21: "Primary Observer Telephone" at a specific index
2557         *
2558         * @param rep The repetition index (0-indexed)
2559         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2560         */
2561        public XTN removePeo21_PrimaryObserverTelephone(int rep) throws HL7Exception { 
2562            return (XTN) super.removeRepetition(21, rep);
2563        }
2564    
2565    
2566    
2567    
2568        /**
2569         * Returns
2570         * PEO-22: "Primary Observer's Qualification" - creates it if necessary
2571         */
2572        public ID getPrimaryObserverSQualification() { 
2573            ID ret = null;
2574            try {
2575                Type t = this.getField(22, 0);
2576                ret = (ID)t;
2577            } catch (ClassCastException cce) {
2578                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2579                throw new RuntimeException(cce);
2580            } catch (HL7Exception he) {
2581                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2582                throw new RuntimeException(he);
2583            }
2584            return ret;
2585        }
2586    
2587    
2588        /**
2589         * Returns
2590         * PEO-22: "Primary Observer's Qualification" - creates it if necessary
2591         */
2592        public ID getPeo22_PrimaryObserverSQualification() { 
2593            ID ret = null;
2594            try {
2595                Type t = this.getField(22, 0);
2596                ret = (ID)t;
2597            } catch (ClassCastException cce) {
2598                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2599                throw new RuntimeException(cce);
2600            } catch (HL7Exception he) {
2601                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2602                throw new RuntimeException(he);
2603            }
2604            return ret;
2605        }
2606    
2607    
2608    
2609        /**
2610         * Returns
2611         * PEO-23: "Confirmation Provided By" - creates it if necessary
2612         */
2613        public ID getConfirmationProvidedBy() { 
2614            ID ret = null;
2615            try {
2616                Type t = this.getField(23, 0);
2617                ret = (ID)t;
2618            } catch (ClassCastException cce) {
2619                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2620                throw new RuntimeException(cce);
2621            } catch (HL7Exception he) {
2622                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2623                throw new RuntimeException(he);
2624            }
2625            return ret;
2626        }
2627    
2628    
2629        /**
2630         * Returns
2631         * PEO-23: "Confirmation Provided By" - creates it if necessary
2632         */
2633        public ID getPeo23_ConfirmationProvidedBy() { 
2634            ID ret = null;
2635            try {
2636                Type t = this.getField(23, 0);
2637                ret = (ID)t;
2638            } catch (ClassCastException cce) {
2639                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2640                throw new RuntimeException(cce);
2641            } catch (HL7Exception he) {
2642                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2643                throw new RuntimeException(he);
2644            }
2645            return ret;
2646        }
2647    
2648    
2649    
2650        /**
2651         * Returns
2652         * PEO-24: "Primary Observer Aware Date/Time" - creates it if necessary
2653         */
2654        public TS getPrimaryObserverAwareDateTime() { 
2655            TS ret = null;
2656            try {
2657                Type t = this.getField(24, 0);
2658                ret = (TS)t;
2659            } catch (ClassCastException cce) {
2660                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2661                throw new RuntimeException(cce);
2662            } catch (HL7Exception he) {
2663                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2664                throw new RuntimeException(he);
2665            }
2666            return ret;
2667        }
2668    
2669    
2670        /**
2671         * Returns
2672         * PEO-24: "Primary Observer Aware Date/Time" - creates it if necessary
2673         */
2674        public TS getPeo24_PrimaryObserverAwareDateTime() { 
2675            TS ret = null;
2676            try {
2677                Type t = this.getField(24, 0);
2678                ret = (TS)t;
2679            } catch (ClassCastException cce) {
2680                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2681                throw new RuntimeException(cce);
2682            } catch (HL7Exception he) {
2683                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2684                throw new RuntimeException(he);
2685            }
2686            return ret;
2687        }
2688    
2689    
2690    
2691        /**
2692         * Returns
2693         * PEO-25: "Primary Observer's identity May Be Divulged" - creates it if necessary
2694         */
2695        public ID getPrimaryObserverSIdentityMayBeDivulged() { 
2696            ID ret = null;
2697            try {
2698                Type t = this.getField(25, 0);
2699                ret = (ID)t;
2700            } catch (ClassCastException cce) {
2701                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2702                throw new RuntimeException(cce);
2703            } catch (HL7Exception he) {
2704                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2705                throw new RuntimeException(he);
2706            }
2707            return ret;
2708        }
2709    
2710    
2711        /**
2712         * Returns
2713         * PEO-25: "Primary Observer's identity May Be Divulged" - creates it if necessary
2714         */
2715        public ID getPeo25_PrimaryObserverSIdentityMayBeDivulged() { 
2716            ID ret = null;
2717            try {
2718                Type t = this.getField(25, 0);
2719                ret = (ID)t;
2720            } catch (ClassCastException cce) {
2721                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2722                throw new RuntimeException(cce);
2723            } catch (HL7Exception he) {
2724                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2725                throw new RuntimeException(he);
2726            }
2727            return ret;
2728        }
2729    
2730    
2731    
2732    
2733    
2734        /** {@inheritDoc} */   
2735        protected Type createNewTypeWithoutReflection(int field) {
2736           switch (field) {
2737              case 0: return new CE(getMessage());
2738              case 1: return new CE(getMessage());
2739              case 2: return new TS(getMessage());
2740              case 3: return new TS(getMessage());
2741              case 4: return new TS(getMessage());
2742              case 5: return new TS(getMessage());
2743              case 6: return new XAD(getMessage());
2744              case 7: return new ID(getMessage(), new Integer( 237 ));
2745              case 8: return new ID(getMessage(), new Integer( 238 ));
2746              case 9: return new ID(getMessage(), new Integer( 239 ));
2747              case 10: return new ID(getMessage(), new Integer( 240 ));
2748              case 11: return new ID(getMessage(), new Integer( 241 ));
2749              case 12: return new FT(getMessage());
2750              case 13: return new FT(getMessage());
2751              case 14: return new FT(getMessage());
2752              case 15: return new FT(getMessage());
2753              case 16: return new FT(getMessage());
2754              case 17: return new CE(getMessage());
2755              case 18: return new XPN(getMessage());
2756              case 19: return new XAD(getMessage());
2757              case 20: return new XTN(getMessage());
2758              case 21: return new ID(getMessage(), new Integer( 242 ));
2759              case 22: return new ID(getMessage(), new Integer( 242 ));
2760              case 23: return new TS(getMessage());
2761              case 24: return new ID(getMessage(), new Integer( 243 ));
2762              default: return null;
2763           }
2764       }
2765    
2766    
2767    }
2768