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.v231.segment;
009    
010    // import ca.uhn.hl7v2.model.v231.group.*;
011    import ca.uhn.hl7v2.model.v231.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 ARQ message segment (ARQ - appointment request segment). 
024     * This segment has the following fields:</p>
025     * <ul>
026         * <li>ARQ-1: Placer Appointment ID (EI) <b> </b>
027         * <li>ARQ-2: Filler Appointment ID (EI) <b>optional </b>
028         * <li>ARQ-3: Occurrence Number (NM) <b>optional </b>
029         * <li>ARQ-4: Placer Group Number (EI) <b>optional </b>
030         * <li>ARQ-5: Schedule ID (CE) <b>optional </b>
031         * <li>ARQ-6: Request Event Reason (CE) <b>optional </b>
032         * <li>ARQ-7: Appointment Reason (CE) <b>optional </b>
033         * <li>ARQ-8: Appointment Type (CE) <b>optional </b>
034         * <li>ARQ-9: Appointment Duration (NM) <b>optional </b>
035         * <li>ARQ-10: Appointment Duration Units (CE) <b>optional </b>
036         * <li>ARQ-11: Requested Start Date/Time Range (DR) <b>optional repeating</b>
037         * <li>ARQ-12: Priority-ARQ (ST) <b>optional </b>
038         * <li>ARQ-13: Repeating Interval (RI) <b>optional </b>
039         * <li>ARQ-14: Repeating Interval Duration (ST) <b>optional </b>
040         * <li>ARQ-15: Placer Contact Person (XCN) <b> repeating</b>
041         * <li>ARQ-16: Placer Contact Phone Number (XTN) <b>optional repeating</b>
042         * <li>ARQ-17: Placer Contact Address (XAD) <b>optional repeating</b>
043         * <li>ARQ-18: Placer Contact Location (PL) <b>optional </b>
044         * <li>ARQ-19: Entered by Person (XCN) <b> repeating</b>
045         * <li>ARQ-20: Entered by Phone Number (XTN) <b>optional repeating</b>
046         * <li>ARQ-21: Entered by Location (PL) <b>optional </b>
047         * <li>ARQ-22: Parent Placer Appointment ID (EI) <b>optional </b>
048         * <li>ARQ-23: Parent Filler Appointment ID (EI) <b>optional </b>
049     * </ul>
050     */
051    public class ARQ extends AbstractSegment {
052    
053        /** 
054         * Creates a new ARQ segment
055         */
056        public ARQ(Group parent, ModelClassFactory factory) {
057           super(parent, factory);
058           init(factory);
059        }
060    
061        private void init(ModelClassFactory factory) {
062           try {
063                                      this.add(EI.class, true, 1, 75, new Object[]{ getMessage(), new Integer(0) }, "Placer Appointment ID");
064                                      this.add(EI.class, false, 1, 75, new Object[]{ getMessage(), new Integer(0) }, "Filler Appointment ID");
065                                      this.add(NM.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Occurrence Number");
066                                      this.add(EI.class, false, 1, 22, new Object[]{ getMessage(), new Integer(0) }, "Placer Group Number");
067                                      this.add(CE.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Schedule ID");
068                                      this.add(CE.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Request Event Reason");
069                                      this.add(CE.class, false, 1, 200, new Object[]{ getMessage(), new Integer(276) }, "Appointment Reason");
070                                      this.add(CE.class, false, 1, 200, new Object[]{ getMessage(), new Integer(277) }, "Appointment Type");
071                                      this.add(NM.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Appointment Duration");
072                                      this.add(CE.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Appointment Duration Units");
073                                      this.add(DR.class, false, 0, 53, new Object[]{ getMessage(), new Integer(0) }, "Requested Start Date/Time Range");
074                                      this.add(ST.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Priority-ARQ");
075                                      this.add(RI.class, false, 1, 100, new Object[]{ getMessage(), new Integer(0) }, "Repeating Interval");
076                                      this.add(ST.class, false, 1, 5, new Object[]{ getMessage(), new Integer(0) }, "Repeating Interval Duration");
077                                      this.add(XCN.class, true, 0, 48, new Object[]{ getMessage(), new Integer(0) }, "Placer Contact Person");
078                                      this.add(XTN.class, false, 0, 40, new Object[]{ getMessage(), new Integer(0) }, "Placer Contact Phone Number");
079                                      this.add(XAD.class, false, 0, 106, new Object[]{ getMessage(), new Integer(0) }, "Placer Contact Address");
080                                      this.add(PL.class, false, 1, 80, new Object[]{ getMessage(), new Integer(0) }, "Placer Contact Location");
081                                      this.add(XCN.class, true, 0, 48, new Object[]{ getMessage(), new Integer(0) }, "Entered by Person");
082                                      this.add(XTN.class, false, 0, 40, new Object[]{ getMessage(), new Integer(0) }, "Entered by Phone Number");
083                                      this.add(PL.class, false, 1, 80, new Object[]{ getMessage(), new Integer(0) }, "Entered by Location");
084                                      this.add(EI.class, false, 1, 75, new Object[]{ getMessage(), new Integer(0) }, "Parent Placer Appointment ID");
085                                      this.add(EI.class, false, 1, 75, new Object[]{ getMessage(), new Integer(0) }, "Parent Filler Appointment ID");
086           } catch(HL7Exception e) {
087              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating ARQ - this is probably a bug in the source code generator.", e);
088           }
089        }
090    
091    
092    
093        /**
094         * Returns
095         * ARQ-1: "Placer Appointment ID" - creates it if necessary
096         */
097        public EI getPlacerAppointmentID() { 
098            EI ret = null;
099            try {
100                Type t = this.getField(1, 0);
101                ret = (EI)t;
102            } catch (ClassCastException cce) {
103                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
104                throw new RuntimeException(cce);
105            } catch (HL7Exception he) {
106                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
107                throw new RuntimeException(he);
108            }
109            return ret;
110        }
111    
112    
113        /**
114         * Returns
115         * ARQ-1: "Placer Appointment ID" - creates it if necessary
116         */
117        public EI getArq1_PlacerAppointmentID() { 
118            EI ret = null;
119            try {
120                Type t = this.getField(1, 0);
121                ret = (EI)t;
122            } catch (ClassCastException cce) {
123                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
124                throw new RuntimeException(cce);
125            } catch (HL7Exception he) {
126                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
127                throw new RuntimeException(he);
128            }
129            return ret;
130        }
131    
132    
133    
134        /**
135         * Returns
136         * ARQ-2: "Filler Appointment ID" - creates it if necessary
137         */
138        public EI getFillerAppointmentID() { 
139            EI ret = null;
140            try {
141                Type t = this.getField(2, 0);
142                ret = (EI)t;
143            } catch (ClassCastException cce) {
144                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
145                throw new RuntimeException(cce);
146            } catch (HL7Exception he) {
147                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
148                throw new RuntimeException(he);
149            }
150            return ret;
151        }
152    
153    
154        /**
155         * Returns
156         * ARQ-2: "Filler Appointment ID" - creates it if necessary
157         */
158        public EI getArq2_FillerAppointmentID() { 
159            EI ret = null;
160            try {
161                Type t = this.getField(2, 0);
162                ret = (EI)t;
163            } catch (ClassCastException cce) {
164                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
165                throw new RuntimeException(cce);
166            } catch (HL7Exception he) {
167                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
168                throw new RuntimeException(he);
169            }
170            return ret;
171        }
172    
173    
174    
175        /**
176         * Returns
177         * ARQ-3: "Occurrence Number" - creates it if necessary
178         */
179        public NM getOccurrenceNumber() { 
180            NM ret = null;
181            try {
182                Type t = this.getField(3, 0);
183                ret = (NM)t;
184            } catch (ClassCastException cce) {
185                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
186                throw new RuntimeException(cce);
187            } catch (HL7Exception he) {
188                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
189                throw new RuntimeException(he);
190            }
191            return ret;
192        }
193    
194    
195        /**
196         * Returns
197         * ARQ-3: "Occurrence Number" - creates it if necessary
198         */
199        public NM getArq3_OccurrenceNumber() { 
200            NM ret = null;
201            try {
202                Type t = this.getField(3, 0);
203                ret = (NM)t;
204            } catch (ClassCastException cce) {
205                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
206                throw new RuntimeException(cce);
207            } catch (HL7Exception he) {
208                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
209                throw new RuntimeException(he);
210            }
211            return ret;
212        }
213    
214    
215    
216        /**
217         * Returns
218         * ARQ-4: "Placer Group Number" - creates it if necessary
219         */
220        public EI getPlacerGroupNumber() { 
221            EI ret = null;
222            try {
223                Type t = this.getField(4, 0);
224                ret = (EI)t;
225            } catch (ClassCastException cce) {
226                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
227                throw new RuntimeException(cce);
228            } catch (HL7Exception he) {
229                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
230                throw new RuntimeException(he);
231            }
232            return ret;
233        }
234    
235    
236        /**
237         * Returns
238         * ARQ-4: "Placer Group Number" - creates it if necessary
239         */
240        public EI getArq4_PlacerGroupNumber() { 
241            EI ret = null;
242            try {
243                Type t = this.getField(4, 0);
244                ret = (EI)t;
245            } catch (ClassCastException cce) {
246                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
247                throw new RuntimeException(cce);
248            } catch (HL7Exception he) {
249                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
250                throw new RuntimeException(he);
251            }
252            return ret;
253        }
254    
255    
256    
257        /**
258         * Returns
259         * ARQ-5: "Schedule ID" - creates it if necessary
260         */
261        public CE getScheduleID() { 
262            CE ret = null;
263            try {
264                Type t = this.getField(5, 0);
265                ret = (CE)t;
266            } catch (ClassCastException cce) {
267                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
268                throw new RuntimeException(cce);
269            } catch (HL7Exception he) {
270                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
271                throw new RuntimeException(he);
272            }
273            return ret;
274        }
275    
276    
277        /**
278         * Returns
279         * ARQ-5: "Schedule ID" - creates it if necessary
280         */
281        public CE getArq5_ScheduleID() { 
282            CE ret = null;
283            try {
284                Type t = this.getField(5, 0);
285                ret = (CE)t;
286            } catch (ClassCastException cce) {
287                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
288                throw new RuntimeException(cce);
289            } catch (HL7Exception he) {
290                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
291                throw new RuntimeException(he);
292            }
293            return ret;
294        }
295    
296    
297    
298        /**
299         * Returns
300         * ARQ-6: "Request Event Reason" - creates it if necessary
301         */
302        public CE getRequestEventReason() { 
303            CE ret = null;
304            try {
305                Type t = this.getField(6, 0);
306                ret = (CE)t;
307            } catch (ClassCastException cce) {
308                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
309                throw new RuntimeException(cce);
310            } catch (HL7Exception he) {
311                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
312                throw new RuntimeException(he);
313            }
314            return ret;
315        }
316    
317    
318        /**
319         * Returns
320         * ARQ-6: "Request Event Reason" - creates it if necessary
321         */
322        public CE getArq6_RequestEventReason() { 
323            CE ret = null;
324            try {
325                Type t = this.getField(6, 0);
326                ret = (CE)t;
327            } catch (ClassCastException cce) {
328                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
329                throw new RuntimeException(cce);
330            } catch (HL7Exception he) {
331                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
332                throw new RuntimeException(he);
333            }
334            return ret;
335        }
336    
337    
338    
339        /**
340         * Returns
341         * ARQ-7: "Appointment Reason" - creates it if necessary
342         */
343        public CE getAppointmentReason() { 
344            CE ret = null;
345            try {
346                Type t = this.getField(7, 0);
347                ret = (CE)t;
348            } catch (ClassCastException cce) {
349                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
350                throw new RuntimeException(cce);
351            } catch (HL7Exception he) {
352                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
353                throw new RuntimeException(he);
354            }
355            return ret;
356        }
357    
358    
359        /**
360         * Returns
361         * ARQ-7: "Appointment Reason" - creates it if necessary
362         */
363        public CE getArq7_AppointmentReason() { 
364            CE ret = null;
365            try {
366                Type t = this.getField(7, 0);
367                ret = (CE)t;
368            } catch (ClassCastException cce) {
369                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
370                throw new RuntimeException(cce);
371            } catch (HL7Exception he) {
372                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
373                throw new RuntimeException(he);
374            }
375            return ret;
376        }
377    
378    
379    
380        /**
381         * Returns
382         * ARQ-8: "Appointment Type" - creates it if necessary
383         */
384        public CE getAppointmentType() { 
385            CE ret = null;
386            try {
387                Type t = this.getField(8, 0);
388                ret = (CE)t;
389            } catch (ClassCastException cce) {
390                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
391                throw new RuntimeException(cce);
392            } catch (HL7Exception he) {
393                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
394                throw new RuntimeException(he);
395            }
396            return ret;
397        }
398    
399    
400        /**
401         * Returns
402         * ARQ-8: "Appointment Type" - creates it if necessary
403         */
404        public CE getArq8_AppointmentType() { 
405            CE ret = null;
406            try {
407                Type t = this.getField(8, 0);
408                ret = (CE)t;
409            } catch (ClassCastException cce) {
410                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
411                throw new RuntimeException(cce);
412            } catch (HL7Exception he) {
413                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
414                throw new RuntimeException(he);
415            }
416            return ret;
417        }
418    
419    
420    
421        /**
422         * Returns
423         * ARQ-9: "Appointment Duration" - creates it if necessary
424         */
425        public NM getAppointmentDuration() { 
426            NM ret = null;
427            try {
428                Type t = this.getField(9, 0);
429                ret = (NM)t;
430            } catch (ClassCastException cce) {
431                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
432                throw new RuntimeException(cce);
433            } catch (HL7Exception he) {
434                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
435                throw new RuntimeException(he);
436            }
437            return ret;
438        }
439    
440    
441        /**
442         * Returns
443         * ARQ-9: "Appointment Duration" - creates it if necessary
444         */
445        public NM getArq9_AppointmentDuration() { 
446            NM ret = null;
447            try {
448                Type t = this.getField(9, 0);
449                ret = (NM)t;
450            } catch (ClassCastException cce) {
451                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
452                throw new RuntimeException(cce);
453            } catch (HL7Exception he) {
454                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
455                throw new RuntimeException(he);
456            }
457            return ret;
458        }
459    
460    
461    
462        /**
463         * Returns
464         * ARQ-10: "Appointment Duration Units" - creates it if necessary
465         */
466        public CE getAppointmentDurationUnits() { 
467            CE ret = null;
468            try {
469                Type t = this.getField(10, 0);
470                ret = (CE)t;
471            } catch (ClassCastException cce) {
472                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
473                throw new RuntimeException(cce);
474            } catch (HL7Exception he) {
475                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
476                throw new RuntimeException(he);
477            }
478            return ret;
479        }
480    
481    
482        /**
483         * Returns
484         * ARQ-10: "Appointment Duration Units" - creates it if necessary
485         */
486        public CE getArq10_AppointmentDurationUnits() { 
487            CE ret = null;
488            try {
489                Type t = this.getField(10, 0);
490                ret = (CE)t;
491            } catch (ClassCastException cce) {
492                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
493                throw new RuntimeException(cce);
494            } catch (HL7Exception he) {
495                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
496                throw new RuntimeException(he);
497            }
498            return ret;
499        }
500    
501    
502        /**
503         * Returns all repetitions of Requested Start Date/Time Range (ARQ-11).
504         */
505        public DR[] getRequestedStartDateTimeRange() {
506            DR[] ret = null;
507            try {
508                Type[] t = this.getField(11);  
509                ret = new DR[t.length];
510                for (int i = 0; i < ret.length; i++) {
511                    ret[i] = (DR)t[i];
512                }
513            } catch (ClassCastException cce) {
514                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
515                throw new RuntimeException(cce);
516            } catch (HL7Exception he) {
517                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
518                throw new RuntimeException(he);
519            }
520            return ret;
521        }
522    
523    
524        /**
525         * Returns a count of the current number of repetitions of Requested Start Date/Time Range (ARQ-11).
526         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
527         * it will return zero.
528         */
529        public int getRequestedStartDateTimeRangeReps() {
530            DR[] ret = null;
531            try {
532                Type[] t = this.getField(11);
533                return t.length;  
534            } catch (ClassCastException cce) {
535                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
536                throw new RuntimeException(cce);
537            } catch (HL7Exception he) {
538                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
539                throw new RuntimeException(he);
540            }
541        }
542    
543    
544        /**
545         * Returns a specific repetition of
546         * ARQ-11: "Requested Start Date/Time Range" - creates it if necessary
547         *
548         * @param rep The repetition index (0-indexed)
549         */
550        public DR getRequestedStartDateTimeRange(int rep) { 
551            DR ret = null;
552            try {
553                Type t = this.getField(11, rep);
554                ret = (DR)t;
555            } catch (ClassCastException cce) {
556                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
557                throw new RuntimeException(cce);
558            } catch (HL7Exception he) {
559                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
560                throw new RuntimeException(he);
561            }
562            return ret;
563        }
564    
565        /**
566         * Returns a specific repetition of
567         * ARQ-11: "Requested Start Date/Time Range" - creates it if necessary
568         *
569         * @param rep The repetition index (0-indexed)
570         */
571        public DR getArq11_RequestedStartDateTimeRange(int rep) { 
572            DR ret = null;
573            try {
574                Type t = this.getField(11, rep);
575                ret = (DR)t;
576            } catch (ClassCastException cce) {
577                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
578                throw new RuntimeException(cce);
579            } catch (HL7Exception he) {
580                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
581                throw new RuntimeException(he);
582            }
583            return ret;
584        }
585    
586    
587        /**
588         * Returns a count of the current number of repetitions of Requested Start Date/Time Range (ARQ-11).
589         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
590         * it will return zero.
591         */
592        public int getArq11_RequestedStartDateTimeRangeReps() {
593            DR[] ret = null;
594            try {
595                Type[] t = this.getField(11);
596                return t.length;  
597            } catch (ClassCastException cce) {
598                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
599                throw new RuntimeException(cce);
600            } catch (HL7Exception he) {
601                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
602                throw new RuntimeException(he);
603            }
604        }
605    
606    
607    
608        /**
609         * Inserts a repetition of
610         * ARQ-11: "Requested Start Date/Time Range" at a specific index
611         *
612         * @param rep The repetition index (0-indexed)
613         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
614         */
615        public DR insertRequestedStartDateTimeRange(int rep) throws HL7Exception { 
616            return (DR) super.insertRepetition(11, rep);
617        }
618    
619    
620    
621        /**
622         * Inserts a repetition of
623         * ARQ-11: "Requested Start Date/Time Range" at a specific index
624         *
625         * @param rep The repetition index (0-indexed)
626         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
627         */
628        public DR insertArq11_RequestedStartDateTimeRange(int rep) throws HL7Exception { 
629            return (DR) super.insertRepetition(11, rep);
630        }
631    
632    
633        /**
634         * Removes a repetition of
635         * ARQ-11: "Requested Start Date/Time Range" at a specific index
636         *
637         * @param rep The repetition index (0-indexed)
638         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
639         */
640        public DR removeRequestedStartDateTimeRange(int rep) throws HL7Exception { 
641            return (DR) super.removeRepetition(11, rep);
642        }
643    
644    
645        /**
646         * Removes a repetition of
647         * ARQ-11: "Requested Start Date/Time Range" at a specific index
648         *
649         * @param rep The repetition index (0-indexed)
650         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
651         */
652        public DR removeArq11_RequestedStartDateTimeRange(int rep) throws HL7Exception { 
653            return (DR) super.removeRepetition(11, rep);
654        }
655    
656    
657    
658    
659        /**
660         * Returns
661         * ARQ-12: "Priority-ARQ" - creates it if necessary
662         */
663        public ST getPriorityARQ() { 
664            ST ret = null;
665            try {
666                Type t = this.getField(12, 0);
667                ret = (ST)t;
668            } catch (ClassCastException cce) {
669                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
670                throw new RuntimeException(cce);
671            } catch (HL7Exception he) {
672                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
673                throw new RuntimeException(he);
674            }
675            return ret;
676        }
677    
678    
679        /**
680         * Returns
681         * ARQ-12: "Priority-ARQ" - creates it if necessary
682         */
683        public ST getArq12_PriorityARQ() { 
684            ST ret = null;
685            try {
686                Type t = this.getField(12, 0);
687                ret = (ST)t;
688            } catch (ClassCastException cce) {
689                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
690                throw new RuntimeException(cce);
691            } catch (HL7Exception he) {
692                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
693                throw new RuntimeException(he);
694            }
695            return ret;
696        }
697    
698    
699    
700        /**
701         * Returns
702         * ARQ-13: "Repeating Interval" - creates it if necessary
703         */
704        public RI getRepeatingInterval() { 
705            RI ret = null;
706            try {
707                Type t = this.getField(13, 0);
708                ret = (RI)t;
709            } catch (ClassCastException cce) {
710                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
711                throw new RuntimeException(cce);
712            } catch (HL7Exception he) {
713                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
714                throw new RuntimeException(he);
715            }
716            return ret;
717        }
718    
719    
720        /**
721         * Returns
722         * ARQ-13: "Repeating Interval" - creates it if necessary
723         */
724        public RI getArq13_RepeatingInterval() { 
725            RI ret = null;
726            try {
727                Type t = this.getField(13, 0);
728                ret = (RI)t;
729            } catch (ClassCastException cce) {
730                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
731                throw new RuntimeException(cce);
732            } catch (HL7Exception he) {
733                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
734                throw new RuntimeException(he);
735            }
736            return ret;
737        }
738    
739    
740    
741        /**
742         * Returns
743         * ARQ-14: "Repeating Interval Duration" - creates it if necessary
744         */
745        public ST getRepeatingIntervalDuration() { 
746            ST ret = null;
747            try {
748                Type t = this.getField(14, 0);
749                ret = (ST)t;
750            } catch (ClassCastException cce) {
751                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
752                throw new RuntimeException(cce);
753            } catch (HL7Exception he) {
754                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
755                throw new RuntimeException(he);
756            }
757            return ret;
758        }
759    
760    
761        /**
762         * Returns
763         * ARQ-14: "Repeating Interval Duration" - creates it if necessary
764         */
765        public ST getArq14_RepeatingIntervalDuration() { 
766            ST ret = null;
767            try {
768                Type t = this.getField(14, 0);
769                ret = (ST)t;
770            } catch (ClassCastException cce) {
771                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
772                throw new RuntimeException(cce);
773            } catch (HL7Exception he) {
774                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
775                throw new RuntimeException(he);
776            }
777            return ret;
778        }
779    
780    
781        /**
782         * Returns all repetitions of Placer Contact Person (ARQ-15).
783         */
784        public XCN[] getPlacerContactPerson() {
785            XCN[] ret = null;
786            try {
787                Type[] t = this.getField(15);  
788                ret = new XCN[t.length];
789                for (int i = 0; i < ret.length; i++) {
790                    ret[i] = (XCN)t[i];
791                }
792            } catch (ClassCastException cce) {
793                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
794                throw new RuntimeException(cce);
795            } catch (HL7Exception he) {
796                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
797                throw new RuntimeException(he);
798            }
799            return ret;
800        }
801    
802    
803        /**
804         * Returns a count of the current number of repetitions of Placer Contact Person (ARQ-15).
805         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
806         * it will return zero.
807         */
808        public int getPlacerContactPersonReps() {
809            XCN[] ret = null;
810            try {
811                Type[] t = this.getField(15);
812                return t.length;  
813            } catch (ClassCastException cce) {
814                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
815                throw new RuntimeException(cce);
816            } catch (HL7Exception he) {
817                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
818                throw new RuntimeException(he);
819            }
820        }
821    
822    
823        /**
824         * Returns a specific repetition of
825         * ARQ-15: "Placer Contact Person" - creates it if necessary
826         *
827         * @param rep The repetition index (0-indexed)
828         */
829        public XCN getPlacerContactPerson(int rep) { 
830            XCN ret = null;
831            try {
832                Type t = this.getField(15, rep);
833                ret = (XCN)t;
834            } catch (ClassCastException cce) {
835                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
836                throw new RuntimeException(cce);
837            } catch (HL7Exception he) {
838                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
839                throw new RuntimeException(he);
840            }
841            return ret;
842        }
843    
844        /**
845         * Returns a specific repetition of
846         * ARQ-15: "Placer Contact Person" - creates it if necessary
847         *
848         * @param rep The repetition index (0-indexed)
849         */
850        public XCN getArq15_PlacerContactPerson(int rep) { 
851            XCN ret = null;
852            try {
853                Type t = this.getField(15, rep);
854                ret = (XCN)t;
855            } catch (ClassCastException cce) {
856                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
857                throw new RuntimeException(cce);
858            } catch (HL7Exception he) {
859                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
860                throw new RuntimeException(he);
861            }
862            return ret;
863        }
864    
865    
866        /**
867         * Returns a count of the current number of repetitions of Placer Contact Person (ARQ-15).
868         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
869         * it will return zero.
870         */
871        public int getArq15_PlacerContactPersonReps() {
872            XCN[] ret = null;
873            try {
874                Type[] t = this.getField(15);
875                return t.length;  
876            } catch (ClassCastException cce) {
877                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
878                throw new RuntimeException(cce);
879            } catch (HL7Exception he) {
880                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
881                throw new RuntimeException(he);
882            }
883        }
884    
885    
886    
887        /**
888         * Inserts a repetition of
889         * ARQ-15: "Placer Contact Person" at a specific index
890         *
891         * @param rep The repetition index (0-indexed)
892         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
893         */
894        public XCN insertPlacerContactPerson(int rep) throws HL7Exception { 
895            return (XCN) super.insertRepetition(15, rep);
896        }
897    
898    
899    
900        /**
901         * Inserts a repetition of
902         * ARQ-15: "Placer Contact Person" at a specific index
903         *
904         * @param rep The repetition index (0-indexed)
905         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
906         */
907        public XCN insertArq15_PlacerContactPerson(int rep) throws HL7Exception { 
908            return (XCN) super.insertRepetition(15, rep);
909        }
910    
911    
912        /**
913         * Removes a repetition of
914         * ARQ-15: "Placer Contact Person" at a specific index
915         *
916         * @param rep The repetition index (0-indexed)
917         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
918         */
919        public XCN removePlacerContactPerson(int rep) throws HL7Exception { 
920            return (XCN) super.removeRepetition(15, rep);
921        }
922    
923    
924        /**
925         * Removes a repetition of
926         * ARQ-15: "Placer Contact Person" at a specific index
927         *
928         * @param rep The repetition index (0-indexed)
929         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
930         */
931        public XCN removeArq15_PlacerContactPerson(int rep) throws HL7Exception { 
932            return (XCN) super.removeRepetition(15, rep);
933        }
934    
935    
936    
937        /**
938         * Returns all repetitions of Placer Contact Phone Number (ARQ-16).
939         */
940        public XTN[] getPlacerContactPhoneNumber() {
941            XTN[] ret = null;
942            try {
943                Type[] t = this.getField(16);  
944                ret = new XTN[t.length];
945                for (int i = 0; i < ret.length; i++) {
946                    ret[i] = (XTN)t[i];
947                }
948            } catch (ClassCastException cce) {
949                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
950                throw new RuntimeException(cce);
951            } catch (HL7Exception he) {
952                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
953                throw new RuntimeException(he);
954            }
955            return ret;
956        }
957    
958    
959        /**
960         * Returns a count of the current number of repetitions of Placer Contact Phone Number (ARQ-16).
961         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
962         * it will return zero.
963         */
964        public int getPlacerContactPhoneNumberReps() {
965            XTN[] ret = null;
966            try {
967                Type[] t = this.getField(16);
968                return t.length;  
969            } catch (ClassCastException cce) {
970                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
971                throw new RuntimeException(cce);
972            } catch (HL7Exception he) {
973                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
974                throw new RuntimeException(he);
975            }
976        }
977    
978    
979        /**
980         * Returns a specific repetition of
981         * ARQ-16: "Placer Contact Phone Number" - creates it if necessary
982         *
983         * @param rep The repetition index (0-indexed)
984         */
985        public XTN getPlacerContactPhoneNumber(int rep) { 
986            XTN ret = null;
987            try {
988                Type t = this.getField(16, rep);
989                ret = (XTN)t;
990            } catch (ClassCastException cce) {
991                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
992                throw new RuntimeException(cce);
993            } catch (HL7Exception he) {
994                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
995                throw new RuntimeException(he);
996            }
997            return ret;
998        }
999    
1000        /**
1001         * Returns a specific repetition of
1002         * ARQ-16: "Placer Contact Phone Number" - creates it if necessary
1003         *
1004         * @param rep The repetition index (0-indexed)
1005         */
1006        public XTN getArq16_PlacerContactPhoneNumber(int rep) { 
1007            XTN ret = null;
1008            try {
1009                Type t = this.getField(16, rep);
1010                ret = (XTN)t;
1011            } catch (ClassCastException cce) {
1012                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1013                throw new RuntimeException(cce);
1014            } catch (HL7Exception he) {
1015                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1016                throw new RuntimeException(he);
1017            }
1018            return ret;
1019        }
1020    
1021    
1022        /**
1023         * Returns a count of the current number of repetitions of Placer Contact Phone Number (ARQ-16).
1024         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1025         * it will return zero.
1026         */
1027        public int getArq16_PlacerContactPhoneNumberReps() {
1028            XTN[] ret = null;
1029            try {
1030                Type[] t = this.getField(16);
1031                return t.length;  
1032            } catch (ClassCastException cce) {
1033                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1034                throw new RuntimeException(cce);
1035            } catch (HL7Exception he) {
1036                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1037                throw new RuntimeException(he);
1038            }
1039        }
1040    
1041    
1042    
1043        /**
1044         * Inserts a repetition of
1045         * ARQ-16: "Placer Contact Phone Number" at a specific index
1046         *
1047         * @param rep The repetition index (0-indexed)
1048         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1049         */
1050        public XTN insertPlacerContactPhoneNumber(int rep) throws HL7Exception { 
1051            return (XTN) super.insertRepetition(16, rep);
1052        }
1053    
1054    
1055    
1056        /**
1057         * Inserts a repetition of
1058         * ARQ-16: "Placer Contact Phone Number" at a specific index
1059         *
1060         * @param rep The repetition index (0-indexed)
1061         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1062         */
1063        public XTN insertArq16_PlacerContactPhoneNumber(int rep) throws HL7Exception { 
1064            return (XTN) super.insertRepetition(16, rep);
1065        }
1066    
1067    
1068        /**
1069         * Removes a repetition of
1070         * ARQ-16: "Placer Contact Phone Number" at a specific index
1071         *
1072         * @param rep The repetition index (0-indexed)
1073         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1074         */
1075        public XTN removePlacerContactPhoneNumber(int rep) throws HL7Exception { 
1076            return (XTN) super.removeRepetition(16, rep);
1077        }
1078    
1079    
1080        /**
1081         * Removes a repetition of
1082         * ARQ-16: "Placer Contact Phone Number" at a specific index
1083         *
1084         * @param rep The repetition index (0-indexed)
1085         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1086         */
1087        public XTN removeArq16_PlacerContactPhoneNumber(int rep) throws HL7Exception { 
1088            return (XTN) super.removeRepetition(16, rep);
1089        }
1090    
1091    
1092    
1093        /**
1094         * Returns all repetitions of Placer Contact Address (ARQ-17).
1095         */
1096        public XAD[] getPlacerContactAddress() {
1097            XAD[] ret = null;
1098            try {
1099                Type[] t = this.getField(17);  
1100                ret = new XAD[t.length];
1101                for (int i = 0; i < ret.length; i++) {
1102                    ret[i] = (XAD)t[i];
1103                }
1104            } catch (ClassCastException cce) {
1105                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1106                throw new RuntimeException(cce);
1107            } catch (HL7Exception he) {
1108                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1109                throw new RuntimeException(he);
1110            }
1111            return ret;
1112        }
1113    
1114    
1115        /**
1116         * Returns a count of the current number of repetitions of Placer Contact Address (ARQ-17).
1117         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1118         * it will return zero.
1119         */
1120        public int getPlacerContactAddressReps() {
1121            XAD[] ret = null;
1122            try {
1123                Type[] t = this.getField(17);
1124                return t.length;  
1125            } catch (ClassCastException cce) {
1126                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1127                throw new RuntimeException(cce);
1128            } catch (HL7Exception he) {
1129                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1130                throw new RuntimeException(he);
1131            }
1132        }
1133    
1134    
1135        /**
1136         * Returns a specific repetition of
1137         * ARQ-17: "Placer Contact Address" - creates it if necessary
1138         *
1139         * @param rep The repetition index (0-indexed)
1140         */
1141        public XAD getPlacerContactAddress(int rep) { 
1142            XAD ret = null;
1143            try {
1144                Type t = this.getField(17, rep);
1145                ret = (XAD)t;
1146            } catch (ClassCastException cce) {
1147                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1148                throw new RuntimeException(cce);
1149            } catch (HL7Exception he) {
1150                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1151                throw new RuntimeException(he);
1152            }
1153            return ret;
1154        }
1155    
1156        /**
1157         * Returns a specific repetition of
1158         * ARQ-17: "Placer Contact Address" - creates it if necessary
1159         *
1160         * @param rep The repetition index (0-indexed)
1161         */
1162        public XAD getArq17_PlacerContactAddress(int rep) { 
1163            XAD ret = null;
1164            try {
1165                Type t = this.getField(17, rep);
1166                ret = (XAD)t;
1167            } catch (ClassCastException cce) {
1168                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1169                throw new RuntimeException(cce);
1170            } catch (HL7Exception he) {
1171                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1172                throw new RuntimeException(he);
1173            }
1174            return ret;
1175        }
1176    
1177    
1178        /**
1179         * Returns a count of the current number of repetitions of Placer Contact Address (ARQ-17).
1180         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1181         * it will return zero.
1182         */
1183        public int getArq17_PlacerContactAddressReps() {
1184            XAD[] ret = null;
1185            try {
1186                Type[] t = this.getField(17);
1187                return t.length;  
1188            } catch (ClassCastException cce) {
1189                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1190                throw new RuntimeException(cce);
1191            } catch (HL7Exception he) {
1192                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1193                throw new RuntimeException(he);
1194            }
1195        }
1196    
1197    
1198    
1199        /**
1200         * Inserts a repetition of
1201         * ARQ-17: "Placer Contact Address" at a specific index
1202         *
1203         * @param rep The repetition index (0-indexed)
1204         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1205         */
1206        public XAD insertPlacerContactAddress(int rep) throws HL7Exception { 
1207            return (XAD) super.insertRepetition(17, rep);
1208        }
1209    
1210    
1211    
1212        /**
1213         * Inserts a repetition of
1214         * ARQ-17: "Placer Contact Address" at a specific index
1215         *
1216         * @param rep The repetition index (0-indexed)
1217         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1218         */
1219        public XAD insertArq17_PlacerContactAddress(int rep) throws HL7Exception { 
1220            return (XAD) super.insertRepetition(17, rep);
1221        }
1222    
1223    
1224        /**
1225         * Removes a repetition of
1226         * ARQ-17: "Placer Contact Address" at a specific index
1227         *
1228         * @param rep The repetition index (0-indexed)
1229         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1230         */
1231        public XAD removePlacerContactAddress(int rep) throws HL7Exception { 
1232            return (XAD) super.removeRepetition(17, rep);
1233        }
1234    
1235    
1236        /**
1237         * Removes a repetition of
1238         * ARQ-17: "Placer Contact Address" at a specific index
1239         *
1240         * @param rep The repetition index (0-indexed)
1241         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1242         */
1243        public XAD removeArq17_PlacerContactAddress(int rep) throws HL7Exception { 
1244            return (XAD) super.removeRepetition(17, rep);
1245        }
1246    
1247    
1248    
1249    
1250        /**
1251         * Returns
1252         * ARQ-18: "Placer Contact Location" - creates it if necessary
1253         */
1254        public PL getPlacerContactLocation() { 
1255            PL ret = null;
1256            try {
1257                Type t = this.getField(18, 0);
1258                ret = (PL)t;
1259            } catch (ClassCastException cce) {
1260                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1261                throw new RuntimeException(cce);
1262            } catch (HL7Exception he) {
1263                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1264                throw new RuntimeException(he);
1265            }
1266            return ret;
1267        }
1268    
1269    
1270        /**
1271         * Returns
1272         * ARQ-18: "Placer Contact Location" - creates it if necessary
1273         */
1274        public PL getArq18_PlacerContactLocation() { 
1275            PL ret = null;
1276            try {
1277                Type t = this.getField(18, 0);
1278                ret = (PL)t;
1279            } catch (ClassCastException cce) {
1280                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1281                throw new RuntimeException(cce);
1282            } catch (HL7Exception he) {
1283                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1284                throw new RuntimeException(he);
1285            }
1286            return ret;
1287        }
1288    
1289    
1290        /**
1291         * Returns all repetitions of Entered by Person (ARQ-19).
1292         */
1293        public XCN[] getEnteredByPerson() {
1294            XCN[] ret = null;
1295            try {
1296                Type[] t = this.getField(19);  
1297                ret = new XCN[t.length];
1298                for (int i = 0; i < ret.length; i++) {
1299                    ret[i] = (XCN)t[i];
1300                }
1301            } catch (ClassCastException cce) {
1302                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1303                throw new RuntimeException(cce);
1304            } catch (HL7Exception he) {
1305                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1306                throw new RuntimeException(he);
1307            }
1308            return ret;
1309        }
1310    
1311    
1312        /**
1313         * Returns a count of the current number of repetitions of Entered by Person (ARQ-19).
1314         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1315         * it will return zero.
1316         */
1317        public int getEnteredByPersonReps() {
1318            XCN[] ret = null;
1319            try {
1320                Type[] t = this.getField(19);
1321                return t.length;  
1322            } catch (ClassCastException cce) {
1323                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1324                throw new RuntimeException(cce);
1325            } catch (HL7Exception he) {
1326                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1327                throw new RuntimeException(he);
1328            }
1329        }
1330    
1331    
1332        /**
1333         * Returns a specific repetition of
1334         * ARQ-19: "Entered by Person" - creates it if necessary
1335         *
1336         * @param rep The repetition index (0-indexed)
1337         */
1338        public XCN getEnteredByPerson(int rep) { 
1339            XCN ret = null;
1340            try {
1341                Type t = this.getField(19, rep);
1342                ret = (XCN)t;
1343            } catch (ClassCastException cce) {
1344                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1345                throw new RuntimeException(cce);
1346            } catch (HL7Exception he) {
1347                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1348                throw new RuntimeException(he);
1349            }
1350            return ret;
1351        }
1352    
1353        /**
1354         * Returns a specific repetition of
1355         * ARQ-19: "Entered by Person" - creates it if necessary
1356         *
1357         * @param rep The repetition index (0-indexed)
1358         */
1359        public XCN getArq19_EnteredByPerson(int rep) { 
1360            XCN ret = null;
1361            try {
1362                Type t = this.getField(19, rep);
1363                ret = (XCN)t;
1364            } catch (ClassCastException cce) {
1365                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1366                throw new RuntimeException(cce);
1367            } catch (HL7Exception he) {
1368                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1369                throw new RuntimeException(he);
1370            }
1371            return ret;
1372        }
1373    
1374    
1375        /**
1376         * Returns a count of the current number of repetitions of Entered by Person (ARQ-19).
1377         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1378         * it will return zero.
1379         */
1380        public int getArq19_EnteredByPersonReps() {
1381            XCN[] ret = null;
1382            try {
1383                Type[] t = this.getField(19);
1384                return t.length;  
1385            } catch (ClassCastException cce) {
1386                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1387                throw new RuntimeException(cce);
1388            } catch (HL7Exception he) {
1389                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1390                throw new RuntimeException(he);
1391            }
1392        }
1393    
1394    
1395    
1396        /**
1397         * Inserts a repetition of
1398         * ARQ-19: "Entered by Person" at a specific index
1399         *
1400         * @param rep The repetition index (0-indexed)
1401         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1402         */
1403        public XCN insertEnteredByPerson(int rep) throws HL7Exception { 
1404            return (XCN) super.insertRepetition(19, rep);
1405        }
1406    
1407    
1408    
1409        /**
1410         * Inserts a repetition of
1411         * ARQ-19: "Entered by Person" at a specific index
1412         *
1413         * @param rep The repetition index (0-indexed)
1414         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1415         */
1416        public XCN insertArq19_EnteredByPerson(int rep) throws HL7Exception { 
1417            return (XCN) super.insertRepetition(19, rep);
1418        }
1419    
1420    
1421        /**
1422         * Removes a repetition of
1423         * ARQ-19: "Entered by Person" at a specific index
1424         *
1425         * @param rep The repetition index (0-indexed)
1426         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1427         */
1428        public XCN removeEnteredByPerson(int rep) throws HL7Exception { 
1429            return (XCN) super.removeRepetition(19, rep);
1430        }
1431    
1432    
1433        /**
1434         * Removes a repetition of
1435         * ARQ-19: "Entered by Person" at a specific index
1436         *
1437         * @param rep The repetition index (0-indexed)
1438         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1439         */
1440        public XCN removeArq19_EnteredByPerson(int rep) throws HL7Exception { 
1441            return (XCN) super.removeRepetition(19, rep);
1442        }
1443    
1444    
1445    
1446        /**
1447         * Returns all repetitions of Entered by Phone Number (ARQ-20).
1448         */
1449        public XTN[] getEnteredByPhoneNumber() {
1450            XTN[] ret = null;
1451            try {
1452                Type[] t = this.getField(20);  
1453                ret = new XTN[t.length];
1454                for (int i = 0; i < ret.length; i++) {
1455                    ret[i] = (XTN)t[i];
1456                }
1457            } catch (ClassCastException cce) {
1458                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1459                throw new RuntimeException(cce);
1460            } catch (HL7Exception he) {
1461                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1462                throw new RuntimeException(he);
1463            }
1464            return ret;
1465        }
1466    
1467    
1468        /**
1469         * Returns a count of the current number of repetitions of Entered by Phone Number (ARQ-20).
1470         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1471         * it will return zero.
1472         */
1473        public int getEnteredByPhoneNumberReps() {
1474            XTN[] ret = null;
1475            try {
1476                Type[] t = this.getField(20);
1477                return t.length;  
1478            } catch (ClassCastException cce) {
1479                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1480                throw new RuntimeException(cce);
1481            } catch (HL7Exception he) {
1482                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1483                throw new RuntimeException(he);
1484            }
1485        }
1486    
1487    
1488        /**
1489         * Returns a specific repetition of
1490         * ARQ-20: "Entered by Phone Number" - creates it if necessary
1491         *
1492         * @param rep The repetition index (0-indexed)
1493         */
1494        public XTN getEnteredByPhoneNumber(int rep) { 
1495            XTN ret = null;
1496            try {
1497                Type t = this.getField(20, rep);
1498                ret = (XTN)t;
1499            } catch (ClassCastException cce) {
1500                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1501                throw new RuntimeException(cce);
1502            } catch (HL7Exception he) {
1503                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1504                throw new RuntimeException(he);
1505            }
1506            return ret;
1507        }
1508    
1509        /**
1510         * Returns a specific repetition of
1511         * ARQ-20: "Entered by Phone Number" - creates it if necessary
1512         *
1513         * @param rep The repetition index (0-indexed)
1514         */
1515        public XTN getArq20_EnteredByPhoneNumber(int rep) { 
1516            XTN ret = null;
1517            try {
1518                Type t = this.getField(20, rep);
1519                ret = (XTN)t;
1520            } catch (ClassCastException cce) {
1521                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1522                throw new RuntimeException(cce);
1523            } catch (HL7Exception he) {
1524                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1525                throw new RuntimeException(he);
1526            }
1527            return ret;
1528        }
1529    
1530    
1531        /**
1532         * Returns a count of the current number of repetitions of Entered by Phone Number (ARQ-20).
1533         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1534         * it will return zero.
1535         */
1536        public int getArq20_EnteredByPhoneNumberReps() {
1537            XTN[] ret = null;
1538            try {
1539                Type[] t = this.getField(20);
1540                return t.length;  
1541            } catch (ClassCastException cce) {
1542                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1543                throw new RuntimeException(cce);
1544            } catch (HL7Exception he) {
1545                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1546                throw new RuntimeException(he);
1547            }
1548        }
1549    
1550    
1551    
1552        /**
1553         * Inserts a repetition of
1554         * ARQ-20: "Entered by Phone Number" at a specific index
1555         *
1556         * @param rep The repetition index (0-indexed)
1557         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1558         */
1559        public XTN insertEnteredByPhoneNumber(int rep) throws HL7Exception { 
1560            return (XTN) super.insertRepetition(20, rep);
1561        }
1562    
1563    
1564    
1565        /**
1566         * Inserts a repetition of
1567         * ARQ-20: "Entered by Phone Number" at a specific index
1568         *
1569         * @param rep The repetition index (0-indexed)
1570         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1571         */
1572        public XTN insertArq20_EnteredByPhoneNumber(int rep) throws HL7Exception { 
1573            return (XTN) super.insertRepetition(20, rep);
1574        }
1575    
1576    
1577        /**
1578         * Removes a repetition of
1579         * ARQ-20: "Entered by Phone Number" at a specific index
1580         *
1581         * @param rep The repetition index (0-indexed)
1582         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1583         */
1584        public XTN removeEnteredByPhoneNumber(int rep) throws HL7Exception { 
1585            return (XTN) super.removeRepetition(20, rep);
1586        }
1587    
1588    
1589        /**
1590         * Removes a repetition of
1591         * ARQ-20: "Entered by Phone Number" at a specific index
1592         *
1593         * @param rep The repetition index (0-indexed)
1594         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1595         */
1596        public XTN removeArq20_EnteredByPhoneNumber(int rep) throws HL7Exception { 
1597            return (XTN) super.removeRepetition(20, rep);
1598        }
1599    
1600    
1601    
1602    
1603        /**
1604         * Returns
1605         * ARQ-21: "Entered by Location" - creates it if necessary
1606         */
1607        public PL getEnteredByLocation() { 
1608            PL ret = null;
1609            try {
1610                Type t = this.getField(21, 0);
1611                ret = (PL)t;
1612            } catch (ClassCastException cce) {
1613                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1614                throw new RuntimeException(cce);
1615            } catch (HL7Exception he) {
1616                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1617                throw new RuntimeException(he);
1618            }
1619            return ret;
1620        }
1621    
1622    
1623        /**
1624         * Returns
1625         * ARQ-21: "Entered by Location" - creates it if necessary
1626         */
1627        public PL getArq21_EnteredByLocation() { 
1628            PL ret = null;
1629            try {
1630                Type t = this.getField(21, 0);
1631                ret = (PL)t;
1632            } catch (ClassCastException cce) {
1633                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1634                throw new RuntimeException(cce);
1635            } catch (HL7Exception he) {
1636                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1637                throw new RuntimeException(he);
1638            }
1639            return ret;
1640        }
1641    
1642    
1643    
1644        /**
1645         * Returns
1646         * ARQ-22: "Parent Placer Appointment ID" - creates it if necessary
1647         */
1648        public EI getParentPlacerAppointmentID() { 
1649            EI ret = null;
1650            try {
1651                Type t = this.getField(22, 0);
1652                ret = (EI)t;
1653            } catch (ClassCastException cce) {
1654                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1655                throw new RuntimeException(cce);
1656            } catch (HL7Exception he) {
1657                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1658                throw new RuntimeException(he);
1659            }
1660            return ret;
1661        }
1662    
1663    
1664        /**
1665         * Returns
1666         * ARQ-22: "Parent Placer Appointment ID" - creates it if necessary
1667         */
1668        public EI getArq22_ParentPlacerAppointmentID() { 
1669            EI ret = null;
1670            try {
1671                Type t = this.getField(22, 0);
1672                ret = (EI)t;
1673            } catch (ClassCastException cce) {
1674                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1675                throw new RuntimeException(cce);
1676            } catch (HL7Exception he) {
1677                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1678                throw new RuntimeException(he);
1679            }
1680            return ret;
1681        }
1682    
1683    
1684    
1685        /**
1686         * Returns
1687         * ARQ-23: "Parent Filler Appointment ID" - creates it if necessary
1688         */
1689        public EI getParentFillerAppointmentID() { 
1690            EI ret = null;
1691            try {
1692                Type t = this.getField(23, 0);
1693                ret = (EI)t;
1694            } catch (ClassCastException cce) {
1695                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1696                throw new RuntimeException(cce);
1697            } catch (HL7Exception he) {
1698                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1699                throw new RuntimeException(he);
1700            }
1701            return ret;
1702        }
1703    
1704    
1705        /**
1706         * Returns
1707         * ARQ-23: "Parent Filler Appointment ID" - creates it if necessary
1708         */
1709        public EI getArq23_ParentFillerAppointmentID() { 
1710            EI ret = null;
1711            try {
1712                Type t = this.getField(23, 0);
1713                ret = (EI)t;
1714            } catch (ClassCastException cce) {
1715                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1716                throw new RuntimeException(cce);
1717            } catch (HL7Exception he) {
1718                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1719                throw new RuntimeException(he);
1720            }
1721            return ret;
1722        }
1723    
1724    
1725    
1726    
1727    
1728        /** {@inheritDoc} */   
1729        protected Type createNewTypeWithoutReflection(int field) {
1730           switch (field) {
1731              case 0: return new EI(getMessage());
1732              case 1: return new EI(getMessage());
1733              case 2: return new NM(getMessage());
1734              case 3: return new EI(getMessage());
1735              case 4: return new CE(getMessage());
1736              case 5: return new CE(getMessage());
1737              case 6: return new CE(getMessage());
1738              case 7: return new CE(getMessage());
1739              case 8: return new NM(getMessage());
1740              case 9: return new CE(getMessage());
1741              case 10: return new DR(getMessage());
1742              case 11: return new ST(getMessage());
1743              case 12: return new RI(getMessage());
1744              case 13: return new ST(getMessage());
1745              case 14: return new XCN(getMessage());
1746              case 15: return new XTN(getMessage());
1747              case 16: return new XAD(getMessage());
1748              case 17: return new PL(getMessage());
1749              case 18: return new XCN(getMessage());
1750              case 19: return new XTN(getMessage());
1751              case 20: return new PL(getMessage());
1752              case 21: return new EI(getMessage());
1753              case 22: return new EI(getMessage());
1754              default: return null;
1755           }
1756       }
1757    
1758    
1759    }
1760