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 OBR message segment (OBR - observation request segment). 
024     * This segment has the following fields:</p>
025     * <ul>
026         * <li>OBR-1: Set ID - OBR (SI) <b>optional </b>
027         * <li>OBR-2: Placer Order Number (EI) <b>optional </b>
028         * <li>OBR-3: Filler Order Number (EI) <b>optional </b>
029         * <li>OBR-4: Universal Service ID (CE) <b> </b>
030         * <li>OBR-5: Priority-OBR (ID) <b>optional </b>
031         * <li>OBR-6: Requested Date/time (TS) <b>optional </b>
032         * <li>OBR-7: Observation Date/Time # (TS) <b>optional </b>
033         * <li>OBR-8: Observation End Date/Time # (TS) <b>optional </b>
034         * <li>OBR-9: Collection Volume * (CQ) <b>optional </b>
035         * <li>OBR-10: Collector Identifier * (XCN) <b>optional repeating</b>
036         * <li>OBR-11: Specimen Action Code * (ID) <b>optional </b>
037         * <li>OBR-12: Danger Code (CE) <b>optional </b>
038         * <li>OBR-13: Relevant Clinical Info. (ST) <b>optional </b>
039         * <li>OBR-14: Specimen Received Date/Time * (TS) <b>optional </b>
040         * <li>OBR-15: Specimen Source (SPS) <b>optional </b>
041         * <li>OBR-16: Ordering Provider (XCN) <b>optional repeating</b>
042         * <li>OBR-17: Order Callback Phone Number (XTN) <b>optional repeating</b>
043         * <li>OBR-18: Placer Field 1 (ST) <b>optional </b>
044         * <li>OBR-19: Placer Field 2 (ST) <b>optional </b>
045         * <li>OBR-20: Filler Field 1 + (ST) <b>optional </b>
046         * <li>OBR-21: Filler Field 2 + (ST) <b>optional </b>
047         * <li>OBR-22: Results Rpt/Status Chng - Date/Time + (TS) <b>optional </b>
048         * <li>OBR-23: Charge to Practice + (MOC) <b>optional </b>
049         * <li>OBR-24: Diagnostic Serv Sect ID (ID) <b>optional </b>
050         * <li>OBR-25: Result Status + (ID) <b>optional </b>
051         * <li>OBR-26: Parent Result + (PRL) <b>optional </b>
052         * <li>OBR-27: Quantity/Timing (TQ) <b>optional repeating</b>
053         * <li>OBR-28: Result Copies To (XCN) <b>optional repeating</b>
054         * <li>OBR-29: Parent Number (EIP) <b>optional </b>
055         * <li>OBR-30: Transportation Mode (ID) <b>optional </b>
056         * <li>OBR-31: Reason for Study (CE) <b>optional repeating</b>
057         * <li>OBR-32: Principal Result Interpreter + (NDL) <b>optional </b>
058         * <li>OBR-33: Assistant Result Interpreter + (NDL) <b>optional repeating</b>
059         * <li>OBR-34: Technician + (NDL) <b>optional repeating</b>
060         * <li>OBR-35: Transcriptionist + (NDL) <b>optional repeating</b>
061         * <li>OBR-36: Scheduled Date/Time + (TS) <b>optional </b>
062         * <li>OBR-37: Number of Sample Containers * (NM) <b>optional </b>
063         * <li>OBR-38: Transport Logistics of Collected Sample * (CE) <b>optional repeating</b>
064         * <li>OBR-39: Collector’s Comment * (CE) <b>optional repeating</b>
065         * <li>OBR-40: Transport Arrangement Responsibility (CE) <b>optional </b>
066         * <li>OBR-41: Transport Arranged (ID) <b>optional </b>
067         * <li>OBR-42: Escort Required (ID) <b>optional </b>
068         * <li>OBR-43: Planned Patient Transport Comment (CE) <b>optional repeating</b>
069         * <li>OBR-44: Procedure Code (CE) <b>optional </b>
070         * <li>OBR-45: Procedure Code Modifier (CE) <b>optional repeating</b>
071     * </ul>
072     */
073    public class OBR extends AbstractSegment {
074    
075        /** 
076         * Creates a new OBR segment
077         */
078        public OBR(Group parent, ModelClassFactory factory) {
079           super(parent, factory);
080           init(factory);
081        }
082    
083        private void init(ModelClassFactory factory) {
084           try {
085                                      this.add(SI.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID - OBR");
086                                      this.add(EI.class, false, 1, 22, new Object[]{ getMessage(), new Integer(0) }, "Placer Order Number");
087                                      this.add(EI.class, false, 1, 22, new Object[]{ getMessage(), new Integer(0) }, "Filler Order Number");
088                                      this.add(CE.class, true, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Universal Service ID");
089                                      this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Priority-OBR");
090                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Requested Date/time");
091                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Observation Date/Time #");
092                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Observation End Date/Time #");
093                                      this.add(CQ.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Collection Volume *");
094                                      this.add(XCN.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Collector Identifier *");
095                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Specimen Action Code *");
096                                      this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Danger Code");
097                                      this.add(ST.class, false, 1, 300, new Object[]{ getMessage(), new Integer(0) }, "Relevant Clinical Info.");
098                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Specimen Received Date/Time *");
099                                      this.add(SPS.class, false, 1, 300, new Object[]{ getMessage(), new Integer(70) }, "Specimen Source");
100                                      this.add(XCN.class, false, 0, 120, new Object[]{ getMessage(), new Integer(0) }, "Ordering Provider");
101                                      this.add(XTN.class, false, 2, 40, new Object[]{ getMessage(), new Integer(0) }, "Order Callback Phone Number");
102                                      this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Placer Field 1");
103                                      this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Placer Field 2");
104                                      this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Filler Field 1 +");
105                                      this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Filler Field 2 +");
106                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Results Rpt/Status Chng - Date/Time +");
107                                      this.add(MOC.class, false, 1, 40, new Object[]{ getMessage(), new Integer(0) }, "Charge to Practice +");
108                                      this.add(ID.class, false, 1, 10, new Object[]{ getMessage() }, "Diagnostic Serv Sect ID");
109                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Result Status +");
110                                      this.add(PRL.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Parent Result +");
111                                      this.add(TQ.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Quantity/Timing");
112                                      this.add(XCN.class, false, 5, 150, new Object[]{ getMessage(), new Integer(0) }, "Result Copies To");
113                                      this.add(EIP.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Parent Number");
114                                      this.add(ID.class, false, 1, 20, new Object[]{ getMessage() }, "Transportation Mode");
115                                      this.add(CE.class, false, 0, 300, new Object[]{ getMessage(), new Integer(0) }, "Reason for Study");
116                                      this.add(NDL.class, false, 1, 200, new Object[]{ getMessage(), new Integer(0) }, "Principal Result Interpreter +");
117                                      this.add(NDL.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Assistant Result Interpreter +");
118                                      this.add(NDL.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Technician +");
119                                      this.add(NDL.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Transcriptionist +");
120                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Scheduled Date/Time +");
121                                      this.add(NM.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Number of Sample Containers *");
122                                      this.add(CE.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Transport Logistics of Collected Sample *");
123                                      this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Collector’s Comment *");
124                                      this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Transport Arrangement Responsibility");
125                                      this.add(ID.class, false, 1, 30, new Object[]{ getMessage() }, "Transport Arranged");
126                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Escort Required");
127                                      this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(0) }, "Planned Patient Transport Comment");
128                                      this.add(CE.class, false, 1, 80, new Object[]{ getMessage(), new Integer(88) }, "Procedure Code");
129                                      this.add(CE.class, false, 0, 80, new Object[]{ getMessage(), new Integer(340) }, "Procedure Code Modifier");
130           } catch(HL7Exception e) {
131              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating OBR - this is probably a bug in the source code generator.", e);
132           }
133        }
134    
135    
136    
137        /**
138         * Returns
139         * OBR-1: "Set ID - OBR" - creates it if necessary
140         */
141        public SI getSetIDOBR() { 
142            SI ret = null;
143            try {
144                Type t = this.getField(1, 0);
145                ret = (SI)t;
146            } catch (ClassCastException cce) {
147                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
148                throw new RuntimeException(cce);
149            } catch (HL7Exception he) {
150                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
151                throw new RuntimeException(he);
152            }
153            return ret;
154        }
155    
156    
157        /**
158         * Returns
159         * OBR-1: "Set ID - OBR" - creates it if necessary
160         */
161        public SI getObr1_SetIDOBR() { 
162            SI ret = null;
163            try {
164                Type t = this.getField(1, 0);
165                ret = (SI)t;
166            } catch (ClassCastException cce) {
167                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
168                throw new RuntimeException(cce);
169            } catch (HL7Exception he) {
170                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
171                throw new RuntimeException(he);
172            }
173            return ret;
174        }
175    
176    
177    
178        /**
179         * Returns
180         * OBR-2: "Placer Order Number" - creates it if necessary
181         */
182        public EI getPlacerOrderNumber() { 
183            EI ret = null;
184            try {
185                Type t = this.getField(2, 0);
186                ret = (EI)t;
187            } catch (ClassCastException cce) {
188                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
189                throw new RuntimeException(cce);
190            } catch (HL7Exception he) {
191                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
192                throw new RuntimeException(he);
193            }
194            return ret;
195        }
196    
197    
198        /**
199         * Returns
200         * OBR-2: "Placer Order Number" - creates it if necessary
201         */
202        public EI getObr2_PlacerOrderNumber() { 
203            EI ret = null;
204            try {
205                Type t = this.getField(2, 0);
206                ret = (EI)t;
207            } catch (ClassCastException cce) {
208                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
209                throw new RuntimeException(cce);
210            } catch (HL7Exception he) {
211                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
212                throw new RuntimeException(he);
213            }
214            return ret;
215        }
216    
217    
218    
219        /**
220         * Returns
221         * OBR-3: "Filler Order Number" - creates it if necessary
222         */
223        public EI getFillerOrderNumber() { 
224            EI ret = null;
225            try {
226                Type t = this.getField(3, 0);
227                ret = (EI)t;
228            } catch (ClassCastException cce) {
229                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
230                throw new RuntimeException(cce);
231            } catch (HL7Exception he) {
232                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
233                throw new RuntimeException(he);
234            }
235            return ret;
236        }
237    
238    
239        /**
240         * Returns
241         * OBR-3: "Filler Order Number" - creates it if necessary
242         */
243        public EI getObr3_FillerOrderNumber() { 
244            EI ret = null;
245            try {
246                Type t = this.getField(3, 0);
247                ret = (EI)t;
248            } catch (ClassCastException cce) {
249                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
250                throw new RuntimeException(cce);
251            } catch (HL7Exception he) {
252                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
253                throw new RuntimeException(he);
254            }
255            return ret;
256        }
257    
258    
259    
260        /**
261         * Returns
262         * OBR-4: "Universal Service ID" - creates it if necessary
263         */
264        public CE getUniversalServiceID() { 
265            CE ret = null;
266            try {
267                Type t = this.getField(4, 0);
268                ret = (CE)t;
269            } catch (ClassCastException cce) {
270                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
271                throw new RuntimeException(cce);
272            } catch (HL7Exception he) {
273                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
274                throw new RuntimeException(he);
275            }
276            return ret;
277        }
278    
279    
280        /**
281         * Returns
282         * OBR-4: "Universal Service ID" - creates it if necessary
283         */
284        public CE getObr4_UniversalServiceID() { 
285            CE ret = null;
286            try {
287                Type t = this.getField(4, 0);
288                ret = (CE)t;
289            } catch (ClassCastException cce) {
290                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
291                throw new RuntimeException(cce);
292            } catch (HL7Exception he) {
293                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
294                throw new RuntimeException(he);
295            }
296            return ret;
297        }
298    
299    
300    
301        /**
302         * Returns
303         * OBR-5: "Priority-OBR" - creates it if necessary
304         */
305        public ID getPriorityOBR() { 
306            ID ret = null;
307            try {
308                Type t = this.getField(5, 0);
309                ret = (ID)t;
310            } catch (ClassCastException cce) {
311                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
312                throw new RuntimeException(cce);
313            } catch (HL7Exception he) {
314                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
315                throw new RuntimeException(he);
316            }
317            return ret;
318        }
319    
320    
321        /**
322         * Returns
323         * OBR-5: "Priority-OBR" - creates it if necessary
324         */
325        public ID getObr5_PriorityOBR() { 
326            ID ret = null;
327            try {
328                Type t = this.getField(5, 0);
329                ret = (ID)t;
330            } catch (ClassCastException cce) {
331                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
332                throw new RuntimeException(cce);
333            } catch (HL7Exception he) {
334                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
335                throw new RuntimeException(he);
336            }
337            return ret;
338        }
339    
340    
341    
342        /**
343         * Returns
344         * OBR-6: "Requested Date/time" - creates it if necessary
345         */
346        public TS getRequestedDateTime() { 
347            TS ret = null;
348            try {
349                Type t = this.getField(6, 0);
350                ret = (TS)t;
351            } catch (ClassCastException cce) {
352                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
353                throw new RuntimeException(cce);
354            } catch (HL7Exception he) {
355                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
356                throw new RuntimeException(he);
357            }
358            return ret;
359        }
360    
361    
362        /**
363         * Returns
364         * OBR-6: "Requested Date/time" - creates it if necessary
365         */
366        public TS getObr6_RequestedDateTime() { 
367            TS ret = null;
368            try {
369                Type t = this.getField(6, 0);
370                ret = (TS)t;
371            } catch (ClassCastException cce) {
372                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
373                throw new RuntimeException(cce);
374            } catch (HL7Exception he) {
375                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
376                throw new RuntimeException(he);
377            }
378            return ret;
379        }
380    
381    
382    
383        /**
384         * Returns
385         * OBR-7: "Observation Date/Time #" - creates it if necessary
386         */
387        public TS getObservationDateTime() { 
388            TS ret = null;
389            try {
390                Type t = this.getField(7, 0);
391                ret = (TS)t;
392            } catch (ClassCastException cce) {
393                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
394                throw new RuntimeException(cce);
395            } catch (HL7Exception he) {
396                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
397                throw new RuntimeException(he);
398            }
399            return ret;
400        }
401    
402    
403        /**
404         * Returns
405         * OBR-7: "Observation Date/Time #" - creates it if necessary
406         */
407        public TS getObr7_ObservationDateTime() { 
408            TS ret = null;
409            try {
410                Type t = this.getField(7, 0);
411                ret = (TS)t;
412            } catch (ClassCastException cce) {
413                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
414                throw new RuntimeException(cce);
415            } catch (HL7Exception he) {
416                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
417                throw new RuntimeException(he);
418            }
419            return ret;
420        }
421    
422    
423    
424        /**
425         * Returns
426         * OBR-8: "Observation End Date/Time #" - creates it if necessary
427         */
428        public TS getObservationEndDateTime() { 
429            TS ret = null;
430            try {
431                Type t = this.getField(8, 0);
432                ret = (TS)t;
433            } catch (ClassCastException cce) {
434                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
435                throw new RuntimeException(cce);
436            } catch (HL7Exception he) {
437                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
438                throw new RuntimeException(he);
439            }
440            return ret;
441        }
442    
443    
444        /**
445         * Returns
446         * OBR-8: "Observation End Date/Time #" - creates it if necessary
447         */
448        public TS getObr8_ObservationEndDateTime() { 
449            TS ret = null;
450            try {
451                Type t = this.getField(8, 0);
452                ret = (TS)t;
453            } catch (ClassCastException cce) {
454                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
455                throw new RuntimeException(cce);
456            } catch (HL7Exception he) {
457                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
458                throw new RuntimeException(he);
459            }
460            return ret;
461        }
462    
463    
464    
465        /**
466         * Returns
467         * OBR-9: "Collection Volume *" - creates it if necessary
468         */
469        public CQ getCollectionVolume() { 
470            CQ ret = null;
471            try {
472                Type t = this.getField(9, 0);
473                ret = (CQ)t;
474            } catch (ClassCastException cce) {
475                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
476                throw new RuntimeException(cce);
477            } catch (HL7Exception he) {
478                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
479                throw new RuntimeException(he);
480            }
481            return ret;
482        }
483    
484    
485        /**
486         * Returns
487         * OBR-9: "Collection Volume *" - creates it if necessary
488         */
489        public CQ getObr9_CollectionVolume() { 
490            CQ ret = null;
491            try {
492                Type t = this.getField(9, 0);
493                ret = (CQ)t;
494            } catch (ClassCastException cce) {
495                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
496                throw new RuntimeException(cce);
497            } catch (HL7Exception he) {
498                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
499                throw new RuntimeException(he);
500            }
501            return ret;
502        }
503    
504    
505        /**
506         * Returns all repetitions of Collector Identifier * (OBR-10).
507         */
508        public XCN[] getCollectorIdentifier() {
509            XCN[] ret = null;
510            try {
511                Type[] t = this.getField(10);  
512                ret = new XCN[t.length];
513                for (int i = 0; i < ret.length; i++) {
514                    ret[i] = (XCN)t[i];
515                }
516            } catch (ClassCastException cce) {
517                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
518                throw new RuntimeException(cce);
519            } catch (HL7Exception he) {
520                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
521                throw new RuntimeException(he);
522            }
523            return ret;
524        }
525    
526    
527        /**
528         * Returns a count of the current number of repetitions of Collector Identifier * (OBR-10).
529         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
530         * it will return zero.
531         */
532        public int getCollectorIdentifierReps() {
533            XCN[] ret = null;
534            try {
535                Type[] t = this.getField(10);
536                return t.length;  
537            } catch (ClassCastException cce) {
538                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
539                throw new RuntimeException(cce);
540            } catch (HL7Exception he) {
541                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
542                throw new RuntimeException(he);
543            }
544        }
545    
546    
547        /**
548         * Returns a specific repetition of
549         * OBR-10: "Collector Identifier *" - creates it if necessary
550         *
551         * @param rep The repetition index (0-indexed)
552         */
553        public XCN getCollectorIdentifier(int rep) { 
554            XCN ret = null;
555            try {
556                Type t = this.getField(10, rep);
557                ret = (XCN)t;
558            } catch (ClassCastException cce) {
559                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
560                throw new RuntimeException(cce);
561            } catch (HL7Exception he) {
562                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
563                throw new RuntimeException(he);
564            }
565            return ret;
566        }
567    
568        /**
569         * Returns a specific repetition of
570         * OBR-10: "Collector Identifier *" - creates it if necessary
571         *
572         * @param rep The repetition index (0-indexed)
573         */
574        public XCN getObr10_CollectorIdentifier(int rep) { 
575            XCN ret = null;
576            try {
577                Type t = this.getField(10, rep);
578                ret = (XCN)t;
579            } catch (ClassCastException cce) {
580                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
581                throw new RuntimeException(cce);
582            } catch (HL7Exception he) {
583                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
584                throw new RuntimeException(he);
585            }
586            return ret;
587        }
588    
589    
590        /**
591         * Returns a count of the current number of repetitions of Collector Identifier * (OBR-10).
592         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
593         * it will return zero.
594         */
595        public int getObr10_CollectorIdentifierReps() {
596            XCN[] ret = null;
597            try {
598                Type[] t = this.getField(10);
599                return t.length;  
600            } catch (ClassCastException cce) {
601                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
602                throw new RuntimeException(cce);
603            } catch (HL7Exception he) {
604                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
605                throw new RuntimeException(he);
606            }
607        }
608    
609    
610    
611        /**
612         * Inserts a repetition of
613         * OBR-10: "Collector Identifier *" at a specific index
614         *
615         * @param rep The repetition index (0-indexed)
616         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
617         */
618        public XCN insertCollectorIdentifier(int rep) throws HL7Exception { 
619            return (XCN) super.insertRepetition(10, rep);
620        }
621    
622    
623    
624        /**
625         * Inserts a repetition of
626         * OBR-10: "Collector Identifier *" at a specific index
627         *
628         * @param rep The repetition index (0-indexed)
629         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
630         */
631        public XCN insertObr10_CollectorIdentifier(int rep) throws HL7Exception { 
632            return (XCN) super.insertRepetition(10, rep);
633        }
634    
635    
636        /**
637         * Removes a repetition of
638         * OBR-10: "Collector Identifier *" at a specific index
639         *
640         * @param rep The repetition index (0-indexed)
641         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
642         */
643        public XCN removeCollectorIdentifier(int rep) throws HL7Exception { 
644            return (XCN) super.removeRepetition(10, rep);
645        }
646    
647    
648        /**
649         * Removes a repetition of
650         * OBR-10: "Collector Identifier *" at a specific index
651         *
652         * @param rep The repetition index (0-indexed)
653         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
654         */
655        public XCN removeObr10_CollectorIdentifier(int rep) throws HL7Exception { 
656            return (XCN) super.removeRepetition(10, rep);
657        }
658    
659    
660    
661    
662        /**
663         * Returns
664         * OBR-11: "Specimen Action Code *" - creates it if necessary
665         */
666        public ID getSpecimenActionCode() { 
667            ID ret = null;
668            try {
669                Type t = this.getField(11, 0);
670                ret = (ID)t;
671            } catch (ClassCastException cce) {
672                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
673                throw new RuntimeException(cce);
674            } catch (HL7Exception he) {
675                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
676                throw new RuntimeException(he);
677            }
678            return ret;
679        }
680    
681    
682        /**
683         * Returns
684         * OBR-11: "Specimen Action Code *" - creates it if necessary
685         */
686        public ID getObr11_SpecimenActionCode() { 
687            ID ret = null;
688            try {
689                Type t = this.getField(11, 0);
690                ret = (ID)t;
691            } catch (ClassCastException cce) {
692                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
693                throw new RuntimeException(cce);
694            } catch (HL7Exception he) {
695                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
696                throw new RuntimeException(he);
697            }
698            return ret;
699        }
700    
701    
702    
703        /**
704         * Returns
705         * OBR-12: "Danger Code" - creates it if necessary
706         */
707        public CE getDangerCode() { 
708            CE ret = null;
709            try {
710                Type t = this.getField(12, 0);
711                ret = (CE)t;
712            } catch (ClassCastException cce) {
713                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
714                throw new RuntimeException(cce);
715            } catch (HL7Exception he) {
716                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
717                throw new RuntimeException(he);
718            }
719            return ret;
720        }
721    
722    
723        /**
724         * Returns
725         * OBR-12: "Danger Code" - creates it if necessary
726         */
727        public CE getObr12_DangerCode() { 
728            CE ret = null;
729            try {
730                Type t = this.getField(12, 0);
731                ret = (CE)t;
732            } catch (ClassCastException cce) {
733                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
734                throw new RuntimeException(cce);
735            } catch (HL7Exception he) {
736                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
737                throw new RuntimeException(he);
738            }
739            return ret;
740        }
741    
742    
743    
744        /**
745         * Returns
746         * OBR-13: "Relevant Clinical Info." - creates it if necessary
747         */
748        public ST getRelevantClinicalInfo() { 
749            ST ret = null;
750            try {
751                Type t = this.getField(13, 0);
752                ret = (ST)t;
753            } catch (ClassCastException cce) {
754                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
755                throw new RuntimeException(cce);
756            } catch (HL7Exception he) {
757                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
758                throw new RuntimeException(he);
759            }
760            return ret;
761        }
762    
763    
764        /**
765         * Returns
766         * OBR-13: "Relevant Clinical Info." - creates it if necessary
767         */
768        public ST getObr13_RelevantClinicalInfo() { 
769            ST ret = null;
770            try {
771                Type t = this.getField(13, 0);
772                ret = (ST)t;
773            } catch (ClassCastException cce) {
774                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
775                throw new RuntimeException(cce);
776            } catch (HL7Exception he) {
777                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
778                throw new RuntimeException(he);
779            }
780            return ret;
781        }
782    
783    
784    
785        /**
786         * Returns
787         * OBR-14: "Specimen Received Date/Time *" - creates it if necessary
788         */
789        public TS getSpecimenReceivedDateTime() { 
790            TS ret = null;
791            try {
792                Type t = this.getField(14, 0);
793                ret = (TS)t;
794            } catch (ClassCastException cce) {
795                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
796                throw new RuntimeException(cce);
797            } catch (HL7Exception he) {
798                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
799                throw new RuntimeException(he);
800            }
801            return ret;
802        }
803    
804    
805        /**
806         * Returns
807         * OBR-14: "Specimen Received Date/Time *" - creates it if necessary
808         */
809        public TS getObr14_SpecimenReceivedDateTime() { 
810            TS ret = null;
811            try {
812                Type t = this.getField(14, 0);
813                ret = (TS)t;
814            } catch (ClassCastException cce) {
815                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
816                throw new RuntimeException(cce);
817            } catch (HL7Exception he) {
818                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
819                throw new RuntimeException(he);
820            }
821            return ret;
822        }
823    
824    
825    
826        /**
827         * Returns
828         * OBR-15: "Specimen Source" - creates it if necessary
829         */
830        public SPS getSpecimenSource() { 
831            SPS ret = null;
832            try {
833                Type t = this.getField(15, 0);
834                ret = (SPS)t;
835            } catch (ClassCastException cce) {
836                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
837                throw new RuntimeException(cce);
838            } catch (HL7Exception he) {
839                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
840                throw new RuntimeException(he);
841            }
842            return ret;
843        }
844    
845    
846        /**
847         * Returns
848         * OBR-15: "Specimen Source" - creates it if necessary
849         */
850        public SPS getObr15_SpecimenSource() { 
851            SPS ret = null;
852            try {
853                Type t = this.getField(15, 0);
854                ret = (SPS)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 all repetitions of Ordering Provider (OBR-16).
868         */
869        public XCN[] getOrderingProvider() {
870            XCN[] ret = null;
871            try {
872                Type[] t = this.getField(16);  
873                ret = new XCN[t.length];
874                for (int i = 0; i < ret.length; i++) {
875                    ret[i] = (XCN)t[i];
876                }
877            } catch (ClassCastException cce) {
878                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
879                throw new RuntimeException(cce);
880            } catch (HL7Exception he) {
881                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
882                throw new RuntimeException(he);
883            }
884            return ret;
885        }
886    
887    
888        /**
889         * Returns a count of the current number of repetitions of Ordering Provider (OBR-16).
890         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
891         * it will return zero.
892         */
893        public int getOrderingProviderReps() {
894            XCN[] ret = null;
895            try {
896                Type[] t = this.getField(16);
897                return t.length;  
898            } catch (ClassCastException cce) {
899                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
900                throw new RuntimeException(cce);
901            } catch (HL7Exception he) {
902                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
903                throw new RuntimeException(he);
904            }
905        }
906    
907    
908        /**
909         * Returns a specific repetition of
910         * OBR-16: "Ordering Provider" - creates it if necessary
911         *
912         * @param rep The repetition index (0-indexed)
913         */
914        public XCN getOrderingProvider(int rep) { 
915            XCN ret = null;
916            try {
917                Type t = this.getField(16, rep);
918                ret = (XCN)t;
919            } catch (ClassCastException cce) {
920                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
921                throw new RuntimeException(cce);
922            } catch (HL7Exception he) {
923                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
924                throw new RuntimeException(he);
925            }
926            return ret;
927        }
928    
929        /**
930         * Returns a specific repetition of
931         * OBR-16: "Ordering Provider" - creates it if necessary
932         *
933         * @param rep The repetition index (0-indexed)
934         */
935        public XCN getObr16_OrderingProvider(int rep) { 
936            XCN ret = null;
937            try {
938                Type t = this.getField(16, rep);
939                ret = (XCN)t;
940            } catch (ClassCastException cce) {
941                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
942                throw new RuntimeException(cce);
943            } catch (HL7Exception he) {
944                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
945                throw new RuntimeException(he);
946            }
947            return ret;
948        }
949    
950    
951        /**
952         * Returns a count of the current number of repetitions of Ordering Provider (OBR-16).
953         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
954         * it will return zero.
955         */
956        public int getObr16_OrderingProviderReps() {
957            XCN[] ret = null;
958            try {
959                Type[] t = this.getField(16);
960                return t.length;  
961            } catch (ClassCastException cce) {
962                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
963                throw new RuntimeException(cce);
964            } catch (HL7Exception he) {
965                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
966                throw new RuntimeException(he);
967            }
968        }
969    
970    
971    
972        /**
973         * Inserts a repetition of
974         * OBR-16: "Ordering Provider" at a specific index
975         *
976         * @param rep The repetition index (0-indexed)
977         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
978         */
979        public XCN insertOrderingProvider(int rep) throws HL7Exception { 
980            return (XCN) super.insertRepetition(16, rep);
981        }
982    
983    
984    
985        /**
986         * Inserts a repetition of
987         * OBR-16: "Ordering Provider" at a specific index
988         *
989         * @param rep The repetition index (0-indexed)
990         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
991         */
992        public XCN insertObr16_OrderingProvider(int rep) throws HL7Exception { 
993            return (XCN) super.insertRepetition(16, rep);
994        }
995    
996    
997        /**
998         * Removes a repetition of
999         * OBR-16: "Ordering Provider" at a specific index
1000         *
1001         * @param rep The repetition index (0-indexed)
1002         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1003         */
1004        public XCN removeOrderingProvider(int rep) throws HL7Exception { 
1005            return (XCN) super.removeRepetition(16, rep);
1006        }
1007    
1008    
1009        /**
1010         * Removes a repetition of
1011         * OBR-16: "Ordering Provider" at a specific index
1012         *
1013         * @param rep The repetition index (0-indexed)
1014         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1015         */
1016        public XCN removeObr16_OrderingProvider(int rep) throws HL7Exception { 
1017            return (XCN) super.removeRepetition(16, rep);
1018        }
1019    
1020    
1021    
1022        /**
1023         * Returns all repetitions of Order Callback Phone Number (OBR-17).
1024         */
1025        public XTN[] getOrderCallbackPhoneNumber() {
1026            XTN[] ret = null;
1027            try {
1028                Type[] t = this.getField(17);  
1029                ret = new XTN[t.length];
1030                for (int i = 0; i < ret.length; i++) {
1031                    ret[i] = (XTN)t[i];
1032                }
1033            } catch (ClassCastException cce) {
1034                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1035                throw new RuntimeException(cce);
1036            } catch (HL7Exception he) {
1037                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1038                throw new RuntimeException(he);
1039            }
1040            return ret;
1041        }
1042    
1043    
1044        /**
1045         * Returns a count of the current number of repetitions of Order Callback Phone Number (OBR-17).
1046         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1047         * it will return zero.
1048         */
1049        public int getOrderCallbackPhoneNumberReps() {
1050            XTN[] ret = null;
1051            try {
1052                Type[] t = this.getField(17);
1053                return t.length;  
1054            } catch (ClassCastException cce) {
1055                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1056                throw new RuntimeException(cce);
1057            } catch (HL7Exception he) {
1058                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1059                throw new RuntimeException(he);
1060            }
1061        }
1062    
1063    
1064        /**
1065         * Returns a specific repetition of
1066         * OBR-17: "Order Callback Phone Number" - creates it if necessary
1067         *
1068         * @param rep The repetition index (0-indexed)
1069         */
1070        public XTN getOrderCallbackPhoneNumber(int rep) { 
1071            XTN ret = null;
1072            try {
1073                Type t = this.getField(17, rep);
1074                ret = (XTN)t;
1075            } catch (ClassCastException cce) {
1076                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1077                throw new RuntimeException(cce);
1078            } catch (HL7Exception he) {
1079                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1080                throw new RuntimeException(he);
1081            }
1082            return ret;
1083        }
1084    
1085        /**
1086         * Returns a specific repetition of
1087         * OBR-17: "Order Callback Phone Number" - creates it if necessary
1088         *
1089         * @param rep The repetition index (0-indexed)
1090         */
1091        public XTN getObr17_OrderCallbackPhoneNumber(int rep) { 
1092            XTN ret = null;
1093            try {
1094                Type t = this.getField(17, rep);
1095                ret = (XTN)t;
1096            } catch (ClassCastException cce) {
1097                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1098                throw new RuntimeException(cce);
1099            } catch (HL7Exception he) {
1100                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1101                throw new RuntimeException(he);
1102            }
1103            return ret;
1104        }
1105    
1106    
1107        /**
1108         * Returns a count of the current number of repetitions of Order Callback Phone Number (OBR-17).
1109         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1110         * it will return zero.
1111         */
1112        public int getObr17_OrderCallbackPhoneNumberReps() {
1113            XTN[] ret = null;
1114            try {
1115                Type[] t = this.getField(17);
1116                return t.length;  
1117            } catch (ClassCastException cce) {
1118                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1119                throw new RuntimeException(cce);
1120            } catch (HL7Exception he) {
1121                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1122                throw new RuntimeException(he);
1123            }
1124        }
1125    
1126    
1127    
1128        /**
1129         * Inserts a repetition of
1130         * OBR-17: "Order Callback Phone Number" at a specific index
1131         *
1132         * @param rep The repetition index (0-indexed)
1133         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1134         */
1135        public XTN insertOrderCallbackPhoneNumber(int rep) throws HL7Exception { 
1136            return (XTN) super.insertRepetition(17, rep);
1137        }
1138    
1139    
1140    
1141        /**
1142         * Inserts a repetition of
1143         * OBR-17: "Order Callback Phone Number" at a specific index
1144         *
1145         * @param rep The repetition index (0-indexed)
1146         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1147         */
1148        public XTN insertObr17_OrderCallbackPhoneNumber(int rep) throws HL7Exception { 
1149            return (XTN) super.insertRepetition(17, rep);
1150        }
1151    
1152    
1153        /**
1154         * Removes a repetition of
1155         * OBR-17: "Order Callback Phone Number" at a specific index
1156         *
1157         * @param rep The repetition index (0-indexed)
1158         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1159         */
1160        public XTN removeOrderCallbackPhoneNumber(int rep) throws HL7Exception { 
1161            return (XTN) super.removeRepetition(17, rep);
1162        }
1163    
1164    
1165        /**
1166         * Removes a repetition of
1167         * OBR-17: "Order Callback Phone Number" at a specific index
1168         *
1169         * @param rep The repetition index (0-indexed)
1170         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1171         */
1172        public XTN removeObr17_OrderCallbackPhoneNumber(int rep) throws HL7Exception { 
1173            return (XTN) super.removeRepetition(17, rep);
1174        }
1175    
1176    
1177    
1178    
1179        /**
1180         * Returns
1181         * OBR-18: "Placer Field 1" - creates it if necessary
1182         */
1183        public ST getPlacerField1() { 
1184            ST ret = null;
1185            try {
1186                Type t = this.getField(18, 0);
1187                ret = (ST)t;
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            return ret;
1196        }
1197    
1198    
1199        /**
1200         * Returns
1201         * OBR-18: "Placer Field 1" - creates it if necessary
1202         */
1203        public ST getObr18_PlacerField1() { 
1204            ST ret = null;
1205            try {
1206                Type t = this.getField(18, 0);
1207                ret = (ST)t;
1208            } catch (ClassCastException cce) {
1209                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1210                throw new RuntimeException(cce);
1211            } catch (HL7Exception he) {
1212                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1213                throw new RuntimeException(he);
1214            }
1215            return ret;
1216        }
1217    
1218    
1219    
1220        /**
1221         * Returns
1222         * OBR-19: "Placer Field 2" - creates it if necessary
1223         */
1224        public ST getPlacerField2() { 
1225            ST ret = null;
1226            try {
1227                Type t = this.getField(19, 0);
1228                ret = (ST)t;
1229            } catch (ClassCastException cce) {
1230                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1231                throw new RuntimeException(cce);
1232            } catch (HL7Exception he) {
1233                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1234                throw new RuntimeException(he);
1235            }
1236            return ret;
1237        }
1238    
1239    
1240        /**
1241         * Returns
1242         * OBR-19: "Placer Field 2" - creates it if necessary
1243         */
1244        public ST getObr19_PlacerField2() { 
1245            ST ret = null;
1246            try {
1247                Type t = this.getField(19, 0);
1248                ret = (ST)t;
1249            } catch (ClassCastException cce) {
1250                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1251                throw new RuntimeException(cce);
1252            } catch (HL7Exception he) {
1253                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1254                throw new RuntimeException(he);
1255            }
1256            return ret;
1257        }
1258    
1259    
1260    
1261        /**
1262         * Returns
1263         * OBR-20: "Filler Field 1 +" - creates it if necessary
1264         */
1265        public ST getFillerField1() { 
1266            ST ret = null;
1267            try {
1268                Type t = this.getField(20, 0);
1269                ret = (ST)t;
1270            } catch (ClassCastException cce) {
1271                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1272                throw new RuntimeException(cce);
1273            } catch (HL7Exception he) {
1274                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1275                throw new RuntimeException(he);
1276            }
1277            return ret;
1278        }
1279    
1280    
1281        /**
1282         * Returns
1283         * OBR-20: "Filler Field 1 +" - creates it if necessary
1284         */
1285        public ST getObr20_FillerField1() { 
1286            ST ret = null;
1287            try {
1288                Type t = this.getField(20, 0);
1289                ret = (ST)t;
1290            } catch (ClassCastException cce) {
1291                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1292                throw new RuntimeException(cce);
1293            } catch (HL7Exception he) {
1294                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1295                throw new RuntimeException(he);
1296            }
1297            return ret;
1298        }
1299    
1300    
1301    
1302        /**
1303         * Returns
1304         * OBR-21: "Filler Field 2 +" - creates it if necessary
1305         */
1306        public ST getFillerField2() { 
1307            ST ret = null;
1308            try {
1309                Type t = this.getField(21, 0);
1310                ret = (ST)t;
1311            } catch (ClassCastException cce) {
1312                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1313                throw new RuntimeException(cce);
1314            } catch (HL7Exception he) {
1315                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1316                throw new RuntimeException(he);
1317            }
1318            return ret;
1319        }
1320    
1321    
1322        /**
1323         * Returns
1324         * OBR-21: "Filler Field 2 +" - creates it if necessary
1325         */
1326        public ST getObr21_FillerField2() { 
1327            ST ret = null;
1328            try {
1329                Type t = this.getField(21, 0);
1330                ret = (ST)t;
1331            } catch (ClassCastException cce) {
1332                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1333                throw new RuntimeException(cce);
1334            } catch (HL7Exception he) {
1335                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1336                throw new RuntimeException(he);
1337            }
1338            return ret;
1339        }
1340    
1341    
1342    
1343        /**
1344         * Returns
1345         * OBR-22: "Results Rpt/Status Chng - Date/Time +" - creates it if necessary
1346         */
1347        public TS getResultsRptStatusChngDateTime() { 
1348            TS ret = null;
1349            try {
1350                Type t = this.getField(22, 0);
1351                ret = (TS)t;
1352            } catch (ClassCastException cce) {
1353                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1354                throw new RuntimeException(cce);
1355            } catch (HL7Exception he) {
1356                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1357                throw new RuntimeException(he);
1358            }
1359            return ret;
1360        }
1361    
1362    
1363        /**
1364         * Returns
1365         * OBR-22: "Results Rpt/Status Chng - Date/Time +" - creates it if necessary
1366         */
1367        public TS getObr22_ResultsRptStatusChngDateTime() { 
1368            TS ret = null;
1369            try {
1370                Type t = this.getField(22, 0);
1371                ret = (TS)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    
1384        /**
1385         * Returns
1386         * OBR-23: "Charge to Practice +" - creates it if necessary
1387         */
1388        public MOC getChargeToPractice() { 
1389            MOC ret = null;
1390            try {
1391                Type t = this.getField(23, 0);
1392                ret = (MOC)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
1406         * OBR-23: "Charge to Practice +" - creates it if necessary
1407         */
1408        public MOC getObr23_ChargeToPractice() { 
1409            MOC ret = null;
1410            try {
1411                Type t = this.getField(23, 0);
1412                ret = (MOC)t;
1413            } catch (ClassCastException cce) {
1414                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1415                throw new RuntimeException(cce);
1416            } catch (HL7Exception he) {
1417                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1418                throw new RuntimeException(he);
1419            }
1420            return ret;
1421        }
1422    
1423    
1424    
1425        /**
1426         * Returns
1427         * OBR-24: "Diagnostic Serv Sect ID" - creates it if necessary
1428         */
1429        public ID getDiagnosticServSectID() { 
1430            ID ret = null;
1431            try {
1432                Type t = this.getField(24, 0);
1433                ret = (ID)t;
1434            } catch (ClassCastException cce) {
1435                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1436                throw new RuntimeException(cce);
1437            } catch (HL7Exception he) {
1438                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1439                throw new RuntimeException(he);
1440            }
1441            return ret;
1442        }
1443    
1444    
1445        /**
1446         * Returns
1447         * OBR-24: "Diagnostic Serv Sect ID" - creates it if necessary
1448         */
1449        public ID getObr24_DiagnosticServSectID() { 
1450            ID ret = null;
1451            try {
1452                Type t = this.getField(24, 0);
1453                ret = (ID)t;
1454            } catch (ClassCastException cce) {
1455                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1456                throw new RuntimeException(cce);
1457            } catch (HL7Exception he) {
1458                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1459                throw new RuntimeException(he);
1460            }
1461            return ret;
1462        }
1463    
1464    
1465    
1466        /**
1467         * Returns
1468         * OBR-25: "Result Status +" - creates it if necessary
1469         */
1470        public ID getResultStatus() { 
1471            ID ret = null;
1472            try {
1473                Type t = this.getField(25, 0);
1474                ret = (ID)t;
1475            } catch (ClassCastException cce) {
1476                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1477                throw new RuntimeException(cce);
1478            } catch (HL7Exception he) {
1479                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1480                throw new RuntimeException(he);
1481            }
1482            return ret;
1483        }
1484    
1485    
1486        /**
1487         * Returns
1488         * OBR-25: "Result Status +" - creates it if necessary
1489         */
1490        public ID getObr25_ResultStatus() { 
1491            ID ret = null;
1492            try {
1493                Type t = this.getField(25, 0);
1494                ret = (ID)t;
1495            } catch (ClassCastException cce) {
1496                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1497                throw new RuntimeException(cce);
1498            } catch (HL7Exception he) {
1499                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1500                throw new RuntimeException(he);
1501            }
1502            return ret;
1503        }
1504    
1505    
1506    
1507        /**
1508         * Returns
1509         * OBR-26: "Parent Result +" - creates it if necessary
1510         */
1511        public PRL getParentResult() { 
1512            PRL ret = null;
1513            try {
1514                Type t = this.getField(26, 0);
1515                ret = (PRL)t;
1516            } catch (ClassCastException cce) {
1517                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1518                throw new RuntimeException(cce);
1519            } catch (HL7Exception he) {
1520                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1521                throw new RuntimeException(he);
1522            }
1523            return ret;
1524        }
1525    
1526    
1527        /**
1528         * Returns
1529         * OBR-26: "Parent Result +" - creates it if necessary
1530         */
1531        public PRL getObr26_ParentResult() { 
1532            PRL ret = null;
1533            try {
1534                Type t = this.getField(26, 0);
1535                ret = (PRL)t;
1536            } catch (ClassCastException cce) {
1537                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1538                throw new RuntimeException(cce);
1539            } catch (HL7Exception he) {
1540                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1541                throw new RuntimeException(he);
1542            }
1543            return ret;
1544        }
1545    
1546    
1547        /**
1548         * Returns all repetitions of Quantity/Timing (OBR-27).
1549         */
1550        public TQ[] getQuantityTiming() {
1551            TQ[] ret = null;
1552            try {
1553                Type[] t = this.getField(27);  
1554                ret = new TQ[t.length];
1555                for (int i = 0; i < ret.length; i++) {
1556                    ret[i] = (TQ)t[i];
1557                }
1558            } catch (ClassCastException cce) {
1559                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1560                throw new RuntimeException(cce);
1561            } catch (HL7Exception he) {
1562                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1563                throw new RuntimeException(he);
1564            }
1565            return ret;
1566        }
1567    
1568    
1569        /**
1570         * Returns a count of the current number of repetitions of Quantity/Timing (OBR-27).
1571         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1572         * it will return zero.
1573         */
1574        public int getQuantityTimingReps() {
1575            TQ[] ret = null;
1576            try {
1577                Type[] t = this.getField(27);
1578                return t.length;  
1579            } catch (ClassCastException cce) {
1580                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1581                throw new RuntimeException(cce);
1582            } catch (HL7Exception he) {
1583                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1584                throw new RuntimeException(he);
1585            }
1586        }
1587    
1588    
1589        /**
1590         * Returns a specific repetition of
1591         * OBR-27: "Quantity/Timing" - creates it if necessary
1592         *
1593         * @param rep The repetition index (0-indexed)
1594         */
1595        public TQ getQuantityTiming(int rep) { 
1596            TQ ret = null;
1597            try {
1598                Type t = this.getField(27, rep);
1599                ret = (TQ)t;
1600            } catch (ClassCastException cce) {
1601                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1602                throw new RuntimeException(cce);
1603            } catch (HL7Exception he) {
1604                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1605                throw new RuntimeException(he);
1606            }
1607            return ret;
1608        }
1609    
1610        /**
1611         * Returns a specific repetition of
1612         * OBR-27: "Quantity/Timing" - creates it if necessary
1613         *
1614         * @param rep The repetition index (0-indexed)
1615         */
1616        public TQ getObr27_QuantityTiming(int rep) { 
1617            TQ ret = null;
1618            try {
1619                Type t = this.getField(27, rep);
1620                ret = (TQ)t;
1621            } catch (ClassCastException cce) {
1622                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1623                throw new RuntimeException(cce);
1624            } catch (HL7Exception he) {
1625                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1626                throw new RuntimeException(he);
1627            }
1628            return ret;
1629        }
1630    
1631    
1632        /**
1633         * Returns a count of the current number of repetitions of Quantity/Timing (OBR-27).
1634         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1635         * it will return zero.
1636         */
1637        public int getObr27_QuantityTimingReps() {
1638            TQ[] ret = null;
1639            try {
1640                Type[] t = this.getField(27);
1641                return t.length;  
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        }
1650    
1651    
1652    
1653        /**
1654         * Inserts a repetition of
1655         * OBR-27: "Quantity/Timing" at a specific index
1656         *
1657         * @param rep The repetition index (0-indexed)
1658         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1659         */
1660        public TQ insertQuantityTiming(int rep) throws HL7Exception { 
1661            return (TQ) super.insertRepetition(27, rep);
1662        }
1663    
1664    
1665    
1666        /**
1667         * Inserts a repetition of
1668         * OBR-27: "Quantity/Timing" at a specific index
1669         *
1670         * @param rep The repetition index (0-indexed)
1671         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1672         */
1673        public TQ insertObr27_QuantityTiming(int rep) throws HL7Exception { 
1674            return (TQ) super.insertRepetition(27, rep);
1675        }
1676    
1677    
1678        /**
1679         * Removes a repetition of
1680         * OBR-27: "Quantity/Timing" at a specific index
1681         *
1682         * @param rep The repetition index (0-indexed)
1683         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1684         */
1685        public TQ removeQuantityTiming(int rep) throws HL7Exception { 
1686            return (TQ) super.removeRepetition(27, rep);
1687        }
1688    
1689    
1690        /**
1691         * Removes a repetition of
1692         * OBR-27: "Quantity/Timing" at a specific index
1693         *
1694         * @param rep The repetition index (0-indexed)
1695         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1696         */
1697        public TQ removeObr27_QuantityTiming(int rep) throws HL7Exception { 
1698            return (TQ) super.removeRepetition(27, rep);
1699        }
1700    
1701    
1702    
1703        /**
1704         * Returns all repetitions of Result Copies To (OBR-28).
1705         */
1706        public XCN[] getResultCopiesTo() {
1707            XCN[] ret = null;
1708            try {
1709                Type[] t = this.getField(28);  
1710                ret = new XCN[t.length];
1711                for (int i = 0; i < ret.length; i++) {
1712                    ret[i] = (XCN)t[i];
1713                }
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         * Returns a count of the current number of repetitions of Result Copies To (OBR-28).
1727         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1728         * it will return zero.
1729         */
1730        public int getResultCopiesToReps() {
1731            XCN[] ret = null;
1732            try {
1733                Type[] t = this.getField(28);
1734                return t.length;  
1735            } catch (ClassCastException cce) {
1736                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1737                throw new RuntimeException(cce);
1738            } catch (HL7Exception he) {
1739                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1740                throw new RuntimeException(he);
1741            }
1742        }
1743    
1744    
1745        /**
1746         * Returns a specific repetition of
1747         * OBR-28: "Result Copies To" - creates it if necessary
1748         *
1749         * @param rep The repetition index (0-indexed)
1750         */
1751        public XCN getResultCopiesTo(int rep) { 
1752            XCN ret = null;
1753            try {
1754                Type t = this.getField(28, rep);
1755                ret = (XCN)t;
1756            } catch (ClassCastException cce) {
1757                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1758                throw new RuntimeException(cce);
1759            } catch (HL7Exception he) {
1760                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1761                throw new RuntimeException(he);
1762            }
1763            return ret;
1764        }
1765    
1766        /**
1767         * Returns a specific repetition of
1768         * OBR-28: "Result Copies To" - creates it if necessary
1769         *
1770         * @param rep The repetition index (0-indexed)
1771         */
1772        public XCN getObr28_ResultCopiesTo(int rep) { 
1773            XCN ret = null;
1774            try {
1775                Type t = this.getField(28, rep);
1776                ret = (XCN)t;
1777            } catch (ClassCastException cce) {
1778                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1779                throw new RuntimeException(cce);
1780            } catch (HL7Exception he) {
1781                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1782                throw new RuntimeException(he);
1783            }
1784            return ret;
1785        }
1786    
1787    
1788        /**
1789         * Returns a count of the current number of repetitions of Result Copies To (OBR-28).
1790         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1791         * it will return zero.
1792         */
1793        public int getObr28_ResultCopiesToReps() {
1794            XCN[] ret = null;
1795            try {
1796                Type[] t = this.getField(28);
1797                return t.length;  
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        }
1806    
1807    
1808    
1809        /**
1810         * Inserts a repetition of
1811         * OBR-28: "Result Copies To" at a specific index
1812         *
1813         * @param rep The repetition index (0-indexed)
1814         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1815         */
1816        public XCN insertResultCopiesTo(int rep) throws HL7Exception { 
1817            return (XCN) super.insertRepetition(28, rep);
1818        }
1819    
1820    
1821    
1822        /**
1823         * Inserts a repetition of
1824         * OBR-28: "Result Copies To" at a specific index
1825         *
1826         * @param rep The repetition index (0-indexed)
1827         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1828         */
1829        public XCN insertObr28_ResultCopiesTo(int rep) throws HL7Exception { 
1830            return (XCN) super.insertRepetition(28, rep);
1831        }
1832    
1833    
1834        /**
1835         * Removes a repetition of
1836         * OBR-28: "Result Copies To" at a specific index
1837         *
1838         * @param rep The repetition index (0-indexed)
1839         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1840         */
1841        public XCN removeResultCopiesTo(int rep) throws HL7Exception { 
1842            return (XCN) super.removeRepetition(28, rep);
1843        }
1844    
1845    
1846        /**
1847         * Removes a repetition of
1848         * OBR-28: "Result Copies To" at a specific index
1849         *
1850         * @param rep The repetition index (0-indexed)
1851         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1852         */
1853        public XCN removeObr28_ResultCopiesTo(int rep) throws HL7Exception { 
1854            return (XCN) super.removeRepetition(28, rep);
1855        }
1856    
1857    
1858    
1859    
1860        /**
1861         * Returns
1862         * OBR-29: "Parent Number" - creates it if necessary
1863         */
1864        public EIP getParentNumber() { 
1865            EIP ret = null;
1866            try {
1867                Type t = this.getField(29, 0);
1868                ret = (EIP)t;
1869            } catch (ClassCastException cce) {
1870                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1871                throw new RuntimeException(cce);
1872            } catch (HL7Exception he) {
1873                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1874                throw new RuntimeException(he);
1875            }
1876            return ret;
1877        }
1878    
1879    
1880        /**
1881         * Returns
1882         * OBR-29: "Parent Number" - creates it if necessary
1883         */
1884        public EIP getObr29_ParentNumber() { 
1885            EIP ret = null;
1886            try {
1887                Type t = this.getField(29, 0);
1888                ret = (EIP)t;
1889            } catch (ClassCastException cce) {
1890                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1891                throw new RuntimeException(cce);
1892            } catch (HL7Exception he) {
1893                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1894                throw new RuntimeException(he);
1895            }
1896            return ret;
1897        }
1898    
1899    
1900    
1901        /**
1902         * Returns
1903         * OBR-30: "Transportation Mode" - creates it if necessary
1904         */
1905        public ID getTransportationMode() { 
1906            ID ret = null;
1907            try {
1908                Type t = this.getField(30, 0);
1909                ret = (ID)t;
1910            } catch (ClassCastException cce) {
1911                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1912                throw new RuntimeException(cce);
1913            } catch (HL7Exception he) {
1914                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1915                throw new RuntimeException(he);
1916            }
1917            return ret;
1918        }
1919    
1920    
1921        /**
1922         * Returns
1923         * OBR-30: "Transportation Mode" - creates it if necessary
1924         */
1925        public ID getObr30_TransportationMode() { 
1926            ID ret = null;
1927            try {
1928                Type t = this.getField(30, 0);
1929                ret = (ID)t;
1930            } catch (ClassCastException cce) {
1931                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1932                throw new RuntimeException(cce);
1933            } catch (HL7Exception he) {
1934                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1935                throw new RuntimeException(he);
1936            }
1937            return ret;
1938        }
1939    
1940    
1941        /**
1942         * Returns all repetitions of Reason for Study (OBR-31).
1943         */
1944        public CE[] getReasonForStudy() {
1945            CE[] ret = null;
1946            try {
1947                Type[] t = this.getField(31);  
1948                ret = new CE[t.length];
1949                for (int i = 0; i < ret.length; i++) {
1950                    ret[i] = (CE)t[i];
1951                }
1952            } catch (ClassCastException cce) {
1953                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1954                throw new RuntimeException(cce);
1955            } catch (HL7Exception he) {
1956                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1957                throw new RuntimeException(he);
1958            }
1959            return ret;
1960        }
1961    
1962    
1963        /**
1964         * Returns a count of the current number of repetitions of Reason for Study (OBR-31).
1965         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1966         * it will return zero.
1967         */
1968        public int getReasonForStudyReps() {
1969            CE[] ret = null;
1970            try {
1971                Type[] t = this.getField(31);
1972                return t.length;  
1973            } catch (ClassCastException cce) {
1974                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1975                throw new RuntimeException(cce);
1976            } catch (HL7Exception he) {
1977                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1978                throw new RuntimeException(he);
1979            }
1980        }
1981    
1982    
1983        /**
1984         * Returns a specific repetition of
1985         * OBR-31: "Reason for Study" - creates it if necessary
1986         *
1987         * @param rep The repetition index (0-indexed)
1988         */
1989        public CE getReasonForStudy(int rep) { 
1990            CE ret = null;
1991            try {
1992                Type t = this.getField(31, rep);
1993                ret = (CE)t;
1994            } catch (ClassCastException cce) {
1995                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
1996                throw new RuntimeException(cce);
1997            } catch (HL7Exception he) {
1998                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
1999                throw new RuntimeException(he);
2000            }
2001            return ret;
2002        }
2003    
2004        /**
2005         * Returns a specific repetition of
2006         * OBR-31: "Reason for Study" - creates it if necessary
2007         *
2008         * @param rep The repetition index (0-indexed)
2009         */
2010        public CE getObr31_ReasonForStudy(int rep) { 
2011            CE ret = null;
2012            try {
2013                Type t = this.getField(31, rep);
2014                ret = (CE)t;
2015            } catch (ClassCastException cce) {
2016                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2017                throw new RuntimeException(cce);
2018            } catch (HL7Exception he) {
2019                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2020                throw new RuntimeException(he);
2021            }
2022            return ret;
2023        }
2024    
2025    
2026        /**
2027         * Returns a count of the current number of repetitions of Reason for Study (OBR-31).
2028         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2029         * it will return zero.
2030         */
2031        public int getObr31_ReasonForStudyReps() {
2032            CE[] ret = null;
2033            try {
2034                Type[] t = this.getField(31);
2035                return t.length;  
2036            } catch (ClassCastException cce) {
2037                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2038                throw new RuntimeException(cce);
2039            } catch (HL7Exception he) {
2040                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2041                throw new RuntimeException(he);
2042            }
2043        }
2044    
2045    
2046    
2047        /**
2048         * Inserts a repetition of
2049         * OBR-31: "Reason for Study" at a specific index
2050         *
2051         * @param rep The repetition index (0-indexed)
2052         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2053         */
2054        public CE insertReasonForStudy(int rep) throws HL7Exception { 
2055            return (CE) super.insertRepetition(31, rep);
2056        }
2057    
2058    
2059    
2060        /**
2061         * Inserts a repetition of
2062         * OBR-31: "Reason for Study" at a specific index
2063         *
2064         * @param rep The repetition index (0-indexed)
2065         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2066         */
2067        public CE insertObr31_ReasonForStudy(int rep) throws HL7Exception { 
2068            return (CE) super.insertRepetition(31, rep);
2069        }
2070    
2071    
2072        /**
2073         * Removes a repetition of
2074         * OBR-31: "Reason for Study" at a specific index
2075         *
2076         * @param rep The repetition index (0-indexed)
2077         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2078         */
2079        public CE removeReasonForStudy(int rep) throws HL7Exception { 
2080            return (CE) super.removeRepetition(31, rep);
2081        }
2082    
2083    
2084        /**
2085         * Removes a repetition of
2086         * OBR-31: "Reason for Study" at a specific index
2087         *
2088         * @param rep The repetition index (0-indexed)
2089         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2090         */
2091        public CE removeObr31_ReasonForStudy(int rep) throws HL7Exception { 
2092            return (CE) super.removeRepetition(31, rep);
2093        }
2094    
2095    
2096    
2097    
2098        /**
2099         * Returns
2100         * OBR-32: "Principal Result Interpreter +" - creates it if necessary
2101         */
2102        public NDL getPrincipalResultInterpreter() { 
2103            NDL ret = null;
2104            try {
2105                Type t = this.getField(32, 0);
2106                ret = (NDL)t;
2107            } catch (ClassCastException cce) {
2108                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2109                throw new RuntimeException(cce);
2110            } catch (HL7Exception he) {
2111                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2112                throw new RuntimeException(he);
2113            }
2114            return ret;
2115        }
2116    
2117    
2118        /**
2119         * Returns
2120         * OBR-32: "Principal Result Interpreter +" - creates it if necessary
2121         */
2122        public NDL getObr32_PrincipalResultInterpreter() { 
2123            NDL ret = null;
2124            try {
2125                Type t = this.getField(32, 0);
2126                ret = (NDL)t;
2127            } catch (ClassCastException cce) {
2128                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2129                throw new RuntimeException(cce);
2130            } catch (HL7Exception he) {
2131                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2132                throw new RuntimeException(he);
2133            }
2134            return ret;
2135        }
2136    
2137    
2138        /**
2139         * Returns all repetitions of Assistant Result Interpreter + (OBR-33).
2140         */
2141        public NDL[] getAssistantResultInterpreter() {
2142            NDL[] ret = null;
2143            try {
2144                Type[] t = this.getField(33);  
2145                ret = new NDL[t.length];
2146                for (int i = 0; i < ret.length; i++) {
2147                    ret[i] = (NDL)t[i];
2148                }
2149            } catch (ClassCastException cce) {
2150                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2151                throw new RuntimeException(cce);
2152            } catch (HL7Exception he) {
2153                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2154                throw new RuntimeException(he);
2155            }
2156            return ret;
2157        }
2158    
2159    
2160        /**
2161         * Returns a count of the current number of repetitions of Assistant Result Interpreter + (OBR-33).
2162         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2163         * it will return zero.
2164         */
2165        public int getAssistantResultInterpreterReps() {
2166            NDL[] ret = null;
2167            try {
2168                Type[] t = this.getField(33);
2169                return t.length;  
2170            } catch (ClassCastException cce) {
2171                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2172                throw new RuntimeException(cce);
2173            } catch (HL7Exception he) {
2174                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2175                throw new RuntimeException(he);
2176            }
2177        }
2178    
2179    
2180        /**
2181         * Returns a specific repetition of
2182         * OBR-33: "Assistant Result Interpreter +" - creates it if necessary
2183         *
2184         * @param rep The repetition index (0-indexed)
2185         */
2186        public NDL getAssistantResultInterpreter(int rep) { 
2187            NDL ret = null;
2188            try {
2189                Type t = this.getField(33, rep);
2190                ret = (NDL)t;
2191            } catch (ClassCastException cce) {
2192                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2193                throw new RuntimeException(cce);
2194            } catch (HL7Exception he) {
2195                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2196                throw new RuntimeException(he);
2197            }
2198            return ret;
2199        }
2200    
2201        /**
2202         * Returns a specific repetition of
2203         * OBR-33: "Assistant Result Interpreter +" - creates it if necessary
2204         *
2205         * @param rep The repetition index (0-indexed)
2206         */
2207        public NDL getObr33_AssistantResultInterpreter(int rep) { 
2208            NDL ret = null;
2209            try {
2210                Type t = this.getField(33, rep);
2211                ret = (NDL)t;
2212            } catch (ClassCastException cce) {
2213                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2214                throw new RuntimeException(cce);
2215            } catch (HL7Exception he) {
2216                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2217                throw new RuntimeException(he);
2218            }
2219            return ret;
2220        }
2221    
2222    
2223        /**
2224         * Returns a count of the current number of repetitions of Assistant Result Interpreter + (OBR-33).
2225         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2226         * it will return zero.
2227         */
2228        public int getObr33_AssistantResultInterpreterReps() {
2229            NDL[] ret = null;
2230            try {
2231                Type[] t = this.getField(33);
2232                return t.length;  
2233            } catch (ClassCastException cce) {
2234                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2235                throw new RuntimeException(cce);
2236            } catch (HL7Exception he) {
2237                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2238                throw new RuntimeException(he);
2239            }
2240        }
2241    
2242    
2243    
2244        /**
2245         * Inserts a repetition of
2246         * OBR-33: "Assistant Result Interpreter +" at a specific index
2247         *
2248         * @param rep The repetition index (0-indexed)
2249         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2250         */
2251        public NDL insertAssistantResultInterpreter(int rep) throws HL7Exception { 
2252            return (NDL) super.insertRepetition(33, rep);
2253        }
2254    
2255    
2256    
2257        /**
2258         * Inserts a repetition of
2259         * OBR-33: "Assistant Result Interpreter +" at a specific index
2260         *
2261         * @param rep The repetition index (0-indexed)
2262         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2263         */
2264        public NDL insertObr33_AssistantResultInterpreter(int rep) throws HL7Exception { 
2265            return (NDL) super.insertRepetition(33, rep);
2266        }
2267    
2268    
2269        /**
2270         * Removes a repetition of
2271         * OBR-33: "Assistant Result Interpreter +" at a specific index
2272         *
2273         * @param rep The repetition index (0-indexed)
2274         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2275         */
2276        public NDL removeAssistantResultInterpreter(int rep) throws HL7Exception { 
2277            return (NDL) super.removeRepetition(33, rep);
2278        }
2279    
2280    
2281        /**
2282         * Removes a repetition of
2283         * OBR-33: "Assistant Result Interpreter +" at a specific index
2284         *
2285         * @param rep The repetition index (0-indexed)
2286         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2287         */
2288        public NDL removeObr33_AssistantResultInterpreter(int rep) throws HL7Exception { 
2289            return (NDL) super.removeRepetition(33, rep);
2290        }
2291    
2292    
2293    
2294        /**
2295         * Returns all repetitions of Technician + (OBR-34).
2296         */
2297        public NDL[] getTechnician() {
2298            NDL[] ret = null;
2299            try {
2300                Type[] t = this.getField(34);  
2301                ret = new NDL[t.length];
2302                for (int i = 0; i < ret.length; i++) {
2303                    ret[i] = (NDL)t[i];
2304                }
2305            } catch (ClassCastException cce) {
2306                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2307                throw new RuntimeException(cce);
2308            } catch (HL7Exception he) {
2309                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2310                throw new RuntimeException(he);
2311            }
2312            return ret;
2313        }
2314    
2315    
2316        /**
2317         * Returns a count of the current number of repetitions of Technician + (OBR-34).
2318         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2319         * it will return zero.
2320         */
2321        public int getTechnicianReps() {
2322            NDL[] ret = null;
2323            try {
2324                Type[] t = this.getField(34);
2325                return t.length;  
2326            } catch (ClassCastException cce) {
2327                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2328                throw new RuntimeException(cce);
2329            } catch (HL7Exception he) {
2330                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2331                throw new RuntimeException(he);
2332            }
2333        }
2334    
2335    
2336        /**
2337         * Returns a specific repetition of
2338         * OBR-34: "Technician +" - creates it if necessary
2339         *
2340         * @param rep The repetition index (0-indexed)
2341         */
2342        public NDL getTechnician(int rep) { 
2343            NDL ret = null;
2344            try {
2345                Type t = this.getField(34, rep);
2346                ret = (NDL)t;
2347            } catch (ClassCastException cce) {
2348                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2349                throw new RuntimeException(cce);
2350            } catch (HL7Exception he) {
2351                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2352                throw new RuntimeException(he);
2353            }
2354            return ret;
2355        }
2356    
2357        /**
2358         * Returns a specific repetition of
2359         * OBR-34: "Technician +" - creates it if necessary
2360         *
2361         * @param rep The repetition index (0-indexed)
2362         */
2363        public NDL getObr34_Technician(int rep) { 
2364            NDL ret = null;
2365            try {
2366                Type t = this.getField(34, rep);
2367                ret = (NDL)t;
2368            } catch (ClassCastException cce) {
2369                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2370                throw new RuntimeException(cce);
2371            } catch (HL7Exception he) {
2372                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2373                throw new RuntimeException(he);
2374            }
2375            return ret;
2376        }
2377    
2378    
2379        /**
2380         * Returns a count of the current number of repetitions of Technician + (OBR-34).
2381         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2382         * it will return zero.
2383         */
2384        public int getObr34_TechnicianReps() {
2385            NDL[] ret = null;
2386            try {
2387                Type[] t = this.getField(34);
2388                return t.length;  
2389            } catch (ClassCastException cce) {
2390                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2391                throw new RuntimeException(cce);
2392            } catch (HL7Exception he) {
2393                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2394                throw new RuntimeException(he);
2395            }
2396        }
2397    
2398    
2399    
2400        /**
2401         * Inserts a repetition of
2402         * OBR-34: "Technician +" at a specific index
2403         *
2404         * @param rep The repetition index (0-indexed)
2405         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2406         */
2407        public NDL insertTechnician(int rep) throws HL7Exception { 
2408            return (NDL) super.insertRepetition(34, rep);
2409        }
2410    
2411    
2412    
2413        /**
2414         * Inserts a repetition of
2415         * OBR-34: "Technician +" at a specific index
2416         *
2417         * @param rep The repetition index (0-indexed)
2418         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2419         */
2420        public NDL insertObr34_Technician(int rep) throws HL7Exception { 
2421            return (NDL) super.insertRepetition(34, rep);
2422        }
2423    
2424    
2425        /**
2426         * Removes a repetition of
2427         * OBR-34: "Technician +" at a specific index
2428         *
2429         * @param rep The repetition index (0-indexed)
2430         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2431         */
2432        public NDL removeTechnician(int rep) throws HL7Exception { 
2433            return (NDL) super.removeRepetition(34, rep);
2434        }
2435    
2436    
2437        /**
2438         * Removes a repetition of
2439         * OBR-34: "Technician +" at a specific index
2440         *
2441         * @param rep The repetition index (0-indexed)
2442         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2443         */
2444        public NDL removeObr34_Technician(int rep) throws HL7Exception { 
2445            return (NDL) super.removeRepetition(34, rep);
2446        }
2447    
2448    
2449    
2450        /**
2451         * Returns all repetitions of Transcriptionist + (OBR-35).
2452         */
2453        public NDL[] getTranscriptionist() {
2454            NDL[] ret = null;
2455            try {
2456                Type[] t = this.getField(35);  
2457                ret = new NDL[t.length];
2458                for (int i = 0; i < ret.length; i++) {
2459                    ret[i] = (NDL)t[i];
2460                }
2461            } catch (ClassCastException cce) {
2462                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2463                throw new RuntimeException(cce);
2464            } catch (HL7Exception he) {
2465                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2466                throw new RuntimeException(he);
2467            }
2468            return ret;
2469        }
2470    
2471    
2472        /**
2473         * Returns a count of the current number of repetitions of Transcriptionist + (OBR-35).
2474         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2475         * it will return zero.
2476         */
2477        public int getTranscriptionistReps() {
2478            NDL[] ret = null;
2479            try {
2480                Type[] t = this.getField(35);
2481                return t.length;  
2482            } catch (ClassCastException cce) {
2483                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2484                throw new RuntimeException(cce);
2485            } catch (HL7Exception he) {
2486                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2487                throw new RuntimeException(he);
2488            }
2489        }
2490    
2491    
2492        /**
2493         * Returns a specific repetition of
2494         * OBR-35: "Transcriptionist +" - creates it if necessary
2495         *
2496         * @param rep The repetition index (0-indexed)
2497         */
2498        public NDL getTranscriptionist(int rep) { 
2499            NDL ret = null;
2500            try {
2501                Type t = this.getField(35, rep);
2502                ret = (NDL)t;
2503            } catch (ClassCastException cce) {
2504                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2505                throw new RuntimeException(cce);
2506            } catch (HL7Exception he) {
2507                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2508                throw new RuntimeException(he);
2509            }
2510            return ret;
2511        }
2512    
2513        /**
2514         * Returns a specific repetition of
2515         * OBR-35: "Transcriptionist +" - creates it if necessary
2516         *
2517         * @param rep The repetition index (0-indexed)
2518         */
2519        public NDL getObr35_Transcriptionist(int rep) { 
2520            NDL ret = null;
2521            try {
2522                Type t = this.getField(35, rep);
2523                ret = (NDL)t;
2524            } catch (ClassCastException cce) {
2525                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2526                throw new RuntimeException(cce);
2527            } catch (HL7Exception he) {
2528                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2529                throw new RuntimeException(he);
2530            }
2531            return ret;
2532        }
2533    
2534    
2535        /**
2536         * Returns a count of the current number of repetitions of Transcriptionist + (OBR-35).
2537         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2538         * it will return zero.
2539         */
2540        public int getObr35_TranscriptionistReps() {
2541            NDL[] ret = null;
2542            try {
2543                Type[] t = this.getField(35);
2544                return t.length;  
2545            } catch (ClassCastException cce) {
2546                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2547                throw new RuntimeException(cce);
2548            } catch (HL7Exception he) {
2549                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2550                throw new RuntimeException(he);
2551            }
2552        }
2553    
2554    
2555    
2556        /**
2557         * Inserts a repetition of
2558         * OBR-35: "Transcriptionist +" at a specific index
2559         *
2560         * @param rep The repetition index (0-indexed)
2561         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2562         */
2563        public NDL insertTranscriptionist(int rep) throws HL7Exception { 
2564            return (NDL) super.insertRepetition(35, rep);
2565        }
2566    
2567    
2568    
2569        /**
2570         * Inserts a repetition of
2571         * OBR-35: "Transcriptionist +" at a specific index
2572         *
2573         * @param rep The repetition index (0-indexed)
2574         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2575         */
2576        public NDL insertObr35_Transcriptionist(int rep) throws HL7Exception { 
2577            return (NDL) super.insertRepetition(35, rep);
2578        }
2579    
2580    
2581        /**
2582         * Removes a repetition of
2583         * OBR-35: "Transcriptionist +" at a specific index
2584         *
2585         * @param rep The repetition index (0-indexed)
2586         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2587         */
2588        public NDL removeTranscriptionist(int rep) throws HL7Exception { 
2589            return (NDL) super.removeRepetition(35, rep);
2590        }
2591    
2592    
2593        /**
2594         * Removes a repetition of
2595         * OBR-35: "Transcriptionist +" at a specific index
2596         *
2597         * @param rep The repetition index (0-indexed)
2598         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2599         */
2600        public NDL removeObr35_Transcriptionist(int rep) throws HL7Exception { 
2601            return (NDL) super.removeRepetition(35, rep);
2602        }
2603    
2604    
2605    
2606    
2607        /**
2608         * Returns
2609         * OBR-36: "Scheduled Date/Time +" - creates it if necessary
2610         */
2611        public TS getScheduledDateTime() { 
2612            TS ret = null;
2613            try {
2614                Type t = this.getField(36, 0);
2615                ret = (TS)t;
2616            } catch (ClassCastException cce) {
2617                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2618                throw new RuntimeException(cce);
2619            } catch (HL7Exception he) {
2620                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2621                throw new RuntimeException(he);
2622            }
2623            return ret;
2624        }
2625    
2626    
2627        /**
2628         * Returns
2629         * OBR-36: "Scheduled Date/Time +" - creates it if necessary
2630         */
2631        public TS getObr36_ScheduledDateTime() { 
2632            TS ret = null;
2633            try {
2634                Type t = this.getField(36, 0);
2635                ret = (TS)t;
2636            } catch (ClassCastException cce) {
2637                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2638                throw new RuntimeException(cce);
2639            } catch (HL7Exception he) {
2640                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2641                throw new RuntimeException(he);
2642            }
2643            return ret;
2644        }
2645    
2646    
2647    
2648        /**
2649         * Returns
2650         * OBR-37: "Number of Sample Containers *" - creates it if necessary
2651         */
2652        public NM getNumberOfSampleContainers() { 
2653            NM ret = null;
2654            try {
2655                Type t = this.getField(37, 0);
2656                ret = (NM)t;
2657            } catch (ClassCastException cce) {
2658                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2659                throw new RuntimeException(cce);
2660            } catch (HL7Exception he) {
2661                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2662                throw new RuntimeException(he);
2663            }
2664            return ret;
2665        }
2666    
2667    
2668        /**
2669         * Returns
2670         * OBR-37: "Number of Sample Containers *" - creates it if necessary
2671         */
2672        public NM getObr37_NumberOfSampleContainers() { 
2673            NM ret = null;
2674            try {
2675                Type t = this.getField(37, 0);
2676                ret = (NM)t;
2677            } catch (ClassCastException cce) {
2678                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2679                throw new RuntimeException(cce);
2680            } catch (HL7Exception he) {
2681                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2682                throw new RuntimeException(he);
2683            }
2684            return ret;
2685        }
2686    
2687    
2688        /**
2689         * Returns all repetitions of Transport Logistics of Collected Sample * (OBR-38).
2690         */
2691        public CE[] getTransportLogisticsOfCollectedSample() {
2692            CE[] ret = null;
2693            try {
2694                Type[] t = this.getField(38);  
2695                ret = new CE[t.length];
2696                for (int i = 0; i < ret.length; i++) {
2697                    ret[i] = (CE)t[i];
2698                }
2699            } catch (ClassCastException cce) {
2700                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2701                throw new RuntimeException(cce);
2702            } catch (HL7Exception he) {
2703                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2704                throw new RuntimeException(he);
2705            }
2706            return ret;
2707        }
2708    
2709    
2710        /**
2711         * Returns a count of the current number of repetitions of Transport Logistics of Collected Sample * (OBR-38).
2712         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2713         * it will return zero.
2714         */
2715        public int getTransportLogisticsOfCollectedSampleReps() {
2716            CE[] ret = null;
2717            try {
2718                Type[] t = this.getField(38);
2719                return t.length;  
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        }
2728    
2729    
2730        /**
2731         * Returns a specific repetition of
2732         * OBR-38: "Transport Logistics of Collected Sample *" - creates it if necessary
2733         *
2734         * @param rep The repetition index (0-indexed)
2735         */
2736        public CE getTransportLogisticsOfCollectedSample(int rep) { 
2737            CE ret = null;
2738            try {
2739                Type t = this.getField(38, rep);
2740                ret = (CE)t;
2741            } catch (ClassCastException cce) {
2742                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2743                throw new RuntimeException(cce);
2744            } catch (HL7Exception he) {
2745                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2746                throw new RuntimeException(he);
2747            }
2748            return ret;
2749        }
2750    
2751        /**
2752         * Returns a specific repetition of
2753         * OBR-38: "Transport Logistics of Collected Sample *" - creates it if necessary
2754         *
2755         * @param rep The repetition index (0-indexed)
2756         */
2757        public CE getObr38_TransportLogisticsOfCollectedSample(int rep) { 
2758            CE ret = null;
2759            try {
2760                Type t = this.getField(38, rep);
2761                ret = (CE)t;
2762            } catch (ClassCastException cce) {
2763                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2764                throw new RuntimeException(cce);
2765            } catch (HL7Exception he) {
2766                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2767                throw new RuntimeException(he);
2768            }
2769            return ret;
2770        }
2771    
2772    
2773        /**
2774         * Returns a count of the current number of repetitions of Transport Logistics of Collected Sample * (OBR-38).
2775         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2776         * it will return zero.
2777         */
2778        public int getObr38_TransportLogisticsOfCollectedSampleReps() {
2779            CE[] ret = null;
2780            try {
2781                Type[] t = this.getField(38);
2782                return t.length;  
2783            } catch (ClassCastException cce) {
2784                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2785                throw new RuntimeException(cce);
2786            } catch (HL7Exception he) {
2787                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2788                throw new RuntimeException(he);
2789            }
2790        }
2791    
2792    
2793    
2794        /**
2795         * Inserts a repetition of
2796         * OBR-38: "Transport Logistics of Collected Sample *" at a specific index
2797         *
2798         * @param rep The repetition index (0-indexed)
2799         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2800         */
2801        public CE insertTransportLogisticsOfCollectedSample(int rep) throws HL7Exception { 
2802            return (CE) super.insertRepetition(38, rep);
2803        }
2804    
2805    
2806    
2807        /**
2808         * Inserts a repetition of
2809         * OBR-38: "Transport Logistics of Collected Sample *" at a specific index
2810         *
2811         * @param rep The repetition index (0-indexed)
2812         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2813         */
2814        public CE insertObr38_TransportLogisticsOfCollectedSample(int rep) throws HL7Exception { 
2815            return (CE) super.insertRepetition(38, rep);
2816        }
2817    
2818    
2819        /**
2820         * Removes a repetition of
2821         * OBR-38: "Transport Logistics of Collected Sample *" at a specific index
2822         *
2823         * @param rep The repetition index (0-indexed)
2824         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2825         */
2826        public CE removeTransportLogisticsOfCollectedSample(int rep) throws HL7Exception { 
2827            return (CE) super.removeRepetition(38, rep);
2828        }
2829    
2830    
2831        /**
2832         * Removes a repetition of
2833         * OBR-38: "Transport Logistics of Collected Sample *" at a specific index
2834         *
2835         * @param rep The repetition index (0-indexed)
2836         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2837         */
2838        public CE removeObr38_TransportLogisticsOfCollectedSample(int rep) throws HL7Exception { 
2839            return (CE) super.removeRepetition(38, rep);
2840        }
2841    
2842    
2843    
2844        /**
2845         * Returns all repetitions of Collector’s Comment * (OBR-39).
2846         */
2847        public CE[] getCollectorSComment() {
2848            CE[] ret = null;
2849            try {
2850                Type[] t = this.getField(39);  
2851                ret = new CE[t.length];
2852                for (int i = 0; i < ret.length; i++) {
2853                    ret[i] = (CE)t[i];
2854                }
2855            } catch (ClassCastException cce) {
2856                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2857                throw new RuntimeException(cce);
2858            } catch (HL7Exception he) {
2859                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2860                throw new RuntimeException(he);
2861            }
2862            return ret;
2863        }
2864    
2865    
2866        /**
2867         * Returns a count of the current number of repetitions of Collector’s Comment * (OBR-39).
2868         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2869         * it will return zero.
2870         */
2871        public int getCollectorSCommentReps() {
2872            CE[] ret = null;
2873            try {
2874                Type[] t = this.getField(39);
2875                return t.length;  
2876            } catch (ClassCastException cce) {
2877                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2878                throw new RuntimeException(cce);
2879            } catch (HL7Exception he) {
2880                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2881                throw new RuntimeException(he);
2882            }
2883        }
2884    
2885    
2886        /**
2887         * Returns a specific repetition of
2888         * OBR-39: "Collector’s Comment *" - creates it if necessary
2889         *
2890         * @param rep The repetition index (0-indexed)
2891         */
2892        public CE getCollectorSComment(int rep) { 
2893            CE ret = null;
2894            try {
2895                Type t = this.getField(39, rep);
2896                ret = (CE)t;
2897            } catch (ClassCastException cce) {
2898                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2899                throw new RuntimeException(cce);
2900            } catch (HL7Exception he) {
2901                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2902                throw new RuntimeException(he);
2903            }
2904            return ret;
2905        }
2906    
2907        /**
2908         * Returns a specific repetition of
2909         * OBR-39: "Collector’s Comment *" - creates it if necessary
2910         *
2911         * @param rep The repetition index (0-indexed)
2912         */
2913        public CE getObr39_CollectorSComment(int rep) { 
2914            CE ret = null;
2915            try {
2916                Type t = this.getField(39, rep);
2917                ret = (CE)t;
2918            } catch (ClassCastException cce) {
2919                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2920                throw new RuntimeException(cce);
2921            } catch (HL7Exception he) {
2922                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2923                throw new RuntimeException(he);
2924            }
2925            return ret;
2926        }
2927    
2928    
2929        /**
2930         * Returns a count of the current number of repetitions of Collector’s Comment * (OBR-39).
2931         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
2932         * it will return zero.
2933         */
2934        public int getObr39_CollectorSCommentReps() {
2935            CE[] ret = null;
2936            try {
2937                Type[] t = this.getField(39);
2938                return t.length;  
2939            } catch (ClassCastException cce) {
2940                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
2941                throw new RuntimeException(cce);
2942            } catch (HL7Exception he) {
2943                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
2944                throw new RuntimeException(he);
2945            }
2946        }
2947    
2948    
2949    
2950        /**
2951         * Inserts a repetition of
2952         * OBR-39: "Collector’s Comment *" at a specific index
2953         *
2954         * @param rep The repetition index (0-indexed)
2955         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2956         */
2957        public CE insertCollectorSComment(int rep) throws HL7Exception { 
2958            return (CE) super.insertRepetition(39, rep);
2959        }
2960    
2961    
2962    
2963        /**
2964         * Inserts a repetition of
2965         * OBR-39: "Collector’s Comment *" at a specific index
2966         *
2967         * @param rep The repetition index (0-indexed)
2968         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2969         */
2970        public CE insertObr39_CollectorSComment(int rep) throws HL7Exception { 
2971            return (CE) super.insertRepetition(39, rep);
2972        }
2973    
2974    
2975        /**
2976         * Removes a repetition of
2977         * OBR-39: "Collector’s Comment *" at a specific index
2978         *
2979         * @param rep The repetition index (0-indexed)
2980         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2981         */
2982        public CE removeCollectorSComment(int rep) throws HL7Exception { 
2983            return (CE) super.removeRepetition(39, rep);
2984        }
2985    
2986    
2987        /**
2988         * Removes a repetition of
2989         * OBR-39: "Collector’s Comment *" at a specific index
2990         *
2991         * @param rep The repetition index (0-indexed)
2992         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
2993         */
2994        public CE removeObr39_CollectorSComment(int rep) throws HL7Exception { 
2995            return (CE) super.removeRepetition(39, rep);
2996        }
2997    
2998    
2999    
3000    
3001        /**
3002         * Returns
3003         * OBR-40: "Transport Arrangement Responsibility" - creates it if necessary
3004         */
3005        public CE getTransportArrangementResponsibility() { 
3006            CE ret = null;
3007            try {
3008                Type t = this.getField(40, 0);
3009                ret = (CE)t;
3010            } catch (ClassCastException cce) {
3011                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3012                throw new RuntimeException(cce);
3013            } catch (HL7Exception he) {
3014                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3015                throw new RuntimeException(he);
3016            }
3017            return ret;
3018        }
3019    
3020    
3021        /**
3022         * Returns
3023         * OBR-40: "Transport Arrangement Responsibility" - creates it if necessary
3024         */
3025        public CE getObr40_TransportArrangementResponsibility() { 
3026            CE ret = null;
3027            try {
3028                Type t = this.getField(40, 0);
3029                ret = (CE)t;
3030            } catch (ClassCastException cce) {
3031                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3032                throw new RuntimeException(cce);
3033            } catch (HL7Exception he) {
3034                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3035                throw new RuntimeException(he);
3036            }
3037            return ret;
3038        }
3039    
3040    
3041    
3042        /**
3043         * Returns
3044         * OBR-41: "Transport Arranged" - creates it if necessary
3045         */
3046        public ID getTransportArranged() { 
3047            ID ret = null;
3048            try {
3049                Type t = this.getField(41, 0);
3050                ret = (ID)t;
3051            } catch (ClassCastException cce) {
3052                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3053                throw new RuntimeException(cce);
3054            } catch (HL7Exception he) {
3055                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3056                throw new RuntimeException(he);
3057            }
3058            return ret;
3059        }
3060    
3061    
3062        /**
3063         * Returns
3064         * OBR-41: "Transport Arranged" - creates it if necessary
3065         */
3066        public ID getObr41_TransportArranged() { 
3067            ID ret = null;
3068            try {
3069                Type t = this.getField(41, 0);
3070                ret = (ID)t;
3071            } catch (ClassCastException cce) {
3072                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3073                throw new RuntimeException(cce);
3074            } catch (HL7Exception he) {
3075                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3076                throw new RuntimeException(he);
3077            }
3078            return ret;
3079        }
3080    
3081    
3082    
3083        /**
3084         * Returns
3085         * OBR-42: "Escort Required" - creates it if necessary
3086         */
3087        public ID getEscortRequired() { 
3088            ID ret = null;
3089            try {
3090                Type t = this.getField(42, 0);
3091                ret = (ID)t;
3092            } catch (ClassCastException cce) {
3093                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3094                throw new RuntimeException(cce);
3095            } catch (HL7Exception he) {
3096                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3097                throw new RuntimeException(he);
3098            }
3099            return ret;
3100        }
3101    
3102    
3103        /**
3104         * Returns
3105         * OBR-42: "Escort Required" - creates it if necessary
3106         */
3107        public ID getObr42_EscortRequired() { 
3108            ID ret = null;
3109            try {
3110                Type t = this.getField(42, 0);
3111                ret = (ID)t;
3112            } catch (ClassCastException cce) {
3113                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3114                throw new RuntimeException(cce);
3115            } catch (HL7Exception he) {
3116                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3117                throw new RuntimeException(he);
3118            }
3119            return ret;
3120        }
3121    
3122    
3123        /**
3124         * Returns all repetitions of Planned Patient Transport Comment (OBR-43).
3125         */
3126        public CE[] getPlannedPatientTransportComment() {
3127            CE[] ret = null;
3128            try {
3129                Type[] t = this.getField(43);  
3130                ret = new CE[t.length];
3131                for (int i = 0; i < ret.length; i++) {
3132                    ret[i] = (CE)t[i];
3133                }
3134            } catch (ClassCastException cce) {
3135                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3136                throw new RuntimeException(cce);
3137            } catch (HL7Exception he) {
3138                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3139                throw new RuntimeException(he);
3140            }
3141            return ret;
3142        }
3143    
3144    
3145        /**
3146         * Returns a count of the current number of repetitions of Planned Patient Transport Comment (OBR-43).
3147         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3148         * it will return zero.
3149         */
3150        public int getPlannedPatientTransportCommentReps() {
3151            CE[] ret = null;
3152            try {
3153                Type[] t = this.getField(43);
3154                return t.length;  
3155            } catch (ClassCastException cce) {
3156                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3157                throw new RuntimeException(cce);
3158            } catch (HL7Exception he) {
3159                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3160                throw new RuntimeException(he);
3161            }
3162        }
3163    
3164    
3165        /**
3166         * Returns a specific repetition of
3167         * OBR-43: "Planned Patient Transport Comment" - creates it if necessary
3168         *
3169         * @param rep The repetition index (0-indexed)
3170         */
3171        public CE getPlannedPatientTransportComment(int rep) { 
3172            CE ret = null;
3173            try {
3174                Type t = this.getField(43, rep);
3175                ret = (CE)t;
3176            } catch (ClassCastException cce) {
3177                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3178                throw new RuntimeException(cce);
3179            } catch (HL7Exception he) {
3180                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3181                throw new RuntimeException(he);
3182            }
3183            return ret;
3184        }
3185    
3186        /**
3187         * Returns a specific repetition of
3188         * OBR-43: "Planned Patient Transport Comment" - creates it if necessary
3189         *
3190         * @param rep The repetition index (0-indexed)
3191         */
3192        public CE getObr43_PlannedPatientTransportComment(int rep) { 
3193            CE ret = null;
3194            try {
3195                Type t = this.getField(43, rep);
3196                ret = (CE)t;
3197            } catch (ClassCastException cce) {
3198                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3199                throw new RuntimeException(cce);
3200            } catch (HL7Exception he) {
3201                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3202                throw new RuntimeException(he);
3203            }
3204            return ret;
3205        }
3206    
3207    
3208        /**
3209         * Returns a count of the current number of repetitions of Planned Patient Transport Comment (OBR-43).
3210         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3211         * it will return zero.
3212         */
3213        public int getObr43_PlannedPatientTransportCommentReps() {
3214            CE[] ret = null;
3215            try {
3216                Type[] t = this.getField(43);
3217                return t.length;  
3218            } catch (ClassCastException cce) {
3219                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3220                throw new RuntimeException(cce);
3221            } catch (HL7Exception he) {
3222                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3223                throw new RuntimeException(he);
3224            }
3225        }
3226    
3227    
3228    
3229        /**
3230         * Inserts a repetition of
3231         * OBR-43: "Planned Patient Transport Comment" at a specific index
3232         *
3233         * @param rep The repetition index (0-indexed)
3234         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3235         */
3236        public CE insertPlannedPatientTransportComment(int rep) throws HL7Exception { 
3237            return (CE) super.insertRepetition(43, rep);
3238        }
3239    
3240    
3241    
3242        /**
3243         * Inserts a repetition of
3244         * OBR-43: "Planned Patient Transport Comment" at a specific index
3245         *
3246         * @param rep The repetition index (0-indexed)
3247         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3248         */
3249        public CE insertObr43_PlannedPatientTransportComment(int rep) throws HL7Exception { 
3250            return (CE) super.insertRepetition(43, rep);
3251        }
3252    
3253    
3254        /**
3255         * Removes a repetition of
3256         * OBR-43: "Planned Patient Transport Comment" at a specific index
3257         *
3258         * @param rep The repetition index (0-indexed)
3259         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3260         */
3261        public CE removePlannedPatientTransportComment(int rep) throws HL7Exception { 
3262            return (CE) super.removeRepetition(43, rep);
3263        }
3264    
3265    
3266        /**
3267         * Removes a repetition of
3268         * OBR-43: "Planned Patient Transport Comment" at a specific index
3269         *
3270         * @param rep The repetition index (0-indexed)
3271         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3272         */
3273        public CE removeObr43_PlannedPatientTransportComment(int rep) throws HL7Exception { 
3274            return (CE) super.removeRepetition(43, rep);
3275        }
3276    
3277    
3278    
3279    
3280        /**
3281         * Returns
3282         * OBR-44: "Procedure Code" - creates it if necessary
3283         */
3284        public CE getProcedureCode() { 
3285            CE ret = null;
3286            try {
3287                Type t = this.getField(44, 0);
3288                ret = (CE)t;
3289            } catch (ClassCastException cce) {
3290                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3291                throw new RuntimeException(cce);
3292            } catch (HL7Exception he) {
3293                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3294                throw new RuntimeException(he);
3295            }
3296            return ret;
3297        }
3298    
3299    
3300        /**
3301         * Returns
3302         * OBR-44: "Procedure Code" - creates it if necessary
3303         */
3304        public CE getObr44_ProcedureCode() { 
3305            CE ret = null;
3306            try {
3307                Type t = this.getField(44, 0);
3308                ret = (CE)t;
3309            } catch (ClassCastException cce) {
3310                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3311                throw new RuntimeException(cce);
3312            } catch (HL7Exception he) {
3313                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3314                throw new RuntimeException(he);
3315            }
3316            return ret;
3317        }
3318    
3319    
3320        /**
3321         * Returns all repetitions of Procedure Code Modifier (OBR-45).
3322         */
3323        public CE[] getProcedureCodeModifier() {
3324            CE[] ret = null;
3325            try {
3326                Type[] t = this.getField(45);  
3327                ret = new CE[t.length];
3328                for (int i = 0; i < ret.length; i++) {
3329                    ret[i] = (CE)t[i];
3330                }
3331            } catch (ClassCastException cce) {
3332                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3333                throw new RuntimeException(cce);
3334            } catch (HL7Exception he) {
3335                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3336                throw new RuntimeException(he);
3337            }
3338            return ret;
3339        }
3340    
3341    
3342        /**
3343         * Returns a count of the current number of repetitions of Procedure Code Modifier (OBR-45).
3344         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3345         * it will return zero.
3346         */
3347        public int getProcedureCodeModifierReps() {
3348            CE[] ret = null;
3349            try {
3350                Type[] t = this.getField(45);
3351                return t.length;  
3352            } catch (ClassCastException cce) {
3353                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3354                throw new RuntimeException(cce);
3355            } catch (HL7Exception he) {
3356                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3357                throw new RuntimeException(he);
3358            }
3359        }
3360    
3361    
3362        /**
3363         * Returns a specific repetition of
3364         * OBR-45: "Procedure Code Modifier" - creates it if necessary
3365         *
3366         * @param rep The repetition index (0-indexed)
3367         */
3368        public CE getProcedureCodeModifier(int rep) { 
3369            CE ret = null;
3370            try {
3371                Type t = this.getField(45, rep);
3372                ret = (CE)t;
3373            } catch (ClassCastException cce) {
3374                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3375                throw new RuntimeException(cce);
3376            } catch (HL7Exception he) {
3377                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3378                throw new RuntimeException(he);
3379            }
3380            return ret;
3381        }
3382    
3383        /**
3384         * Returns a specific repetition of
3385         * OBR-45: "Procedure Code Modifier" - creates it if necessary
3386         *
3387         * @param rep The repetition index (0-indexed)
3388         */
3389        public CE getObr45_ProcedureCodeModifier(int rep) { 
3390            CE ret = null;
3391            try {
3392                Type t = this.getField(45, rep);
3393                ret = (CE)t;
3394            } catch (ClassCastException cce) {
3395                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3396                throw new RuntimeException(cce);
3397            } catch (HL7Exception he) {
3398                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3399                throw new RuntimeException(he);
3400            }
3401            return ret;
3402        }
3403    
3404    
3405        /**
3406         * Returns a count of the current number of repetitions of Procedure Code Modifier (OBR-45).
3407         * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
3408         * it will return zero.
3409         */
3410        public int getObr45_ProcedureCodeModifierReps() {
3411            CE[] ret = null;
3412            try {
3413                Type[] t = this.getField(45);
3414                return t.length;  
3415            } catch (ClassCastException cce) {
3416                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
3417                throw new RuntimeException(cce);
3418            } catch (HL7Exception he) {
3419                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
3420                throw new RuntimeException(he);
3421            }
3422        }
3423    
3424    
3425    
3426        /**
3427         * Inserts a repetition of
3428         * OBR-45: "Procedure Code Modifier" at a specific index
3429         *
3430         * @param rep The repetition index (0-indexed)
3431         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3432         */
3433        public CE insertProcedureCodeModifier(int rep) throws HL7Exception { 
3434            return (CE) super.insertRepetition(45, rep);
3435        }
3436    
3437    
3438    
3439        /**
3440         * Inserts a repetition of
3441         * OBR-45: "Procedure Code Modifier" at a specific index
3442         *
3443         * @param rep The repetition index (0-indexed)
3444         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3445         */
3446        public CE insertObr45_ProcedureCodeModifier(int rep) throws HL7Exception { 
3447            return (CE) super.insertRepetition(45, rep);
3448        }
3449    
3450    
3451        /**
3452         * Removes a repetition of
3453         * OBR-45: "Procedure Code Modifier" at a specific index
3454         *
3455         * @param rep The repetition index (0-indexed)
3456         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3457         */
3458        public CE removeProcedureCodeModifier(int rep) throws HL7Exception { 
3459            return (CE) super.removeRepetition(45, rep);
3460        }
3461    
3462    
3463        /**
3464         * Removes a repetition of
3465         * OBR-45: "Procedure Code Modifier" at a specific index
3466         *
3467         * @param rep The repetition index (0-indexed)
3468         * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
3469         */
3470        public CE removeObr45_ProcedureCodeModifier(int rep) throws HL7Exception { 
3471            return (CE) super.removeRepetition(45, rep);
3472        }
3473    
3474    
3475    
3476    
3477    
3478    
3479        /** {@inheritDoc} */   
3480        protected Type createNewTypeWithoutReflection(int field) {
3481           switch (field) {
3482              case 0: return new SI(getMessage());
3483              case 1: return new EI(getMessage());
3484              case 2: return new EI(getMessage());
3485              case 3: return new CE(getMessage());
3486              case 4: return new ID(getMessage(), new Integer( 0 ));
3487              case 5: return new TS(getMessage());
3488              case 6: return new TS(getMessage());
3489              case 7: return new TS(getMessage());
3490              case 8: return new CQ(getMessage());
3491              case 9: return new XCN(getMessage());
3492              case 10: return new ID(getMessage(), new Integer( 65 ));
3493              case 11: return new CE(getMessage());
3494              case 12: return new ST(getMessage());
3495              case 13: return new TS(getMessage());
3496              case 14: return new SPS(getMessage());
3497              case 15: return new XCN(getMessage());
3498              case 16: return new XTN(getMessage());
3499              case 17: return new ST(getMessage());
3500              case 18: return new ST(getMessage());
3501              case 19: return new ST(getMessage());
3502              case 20: return new ST(getMessage());
3503              case 21: return new TS(getMessage());
3504              case 22: return new MOC(getMessage());
3505              case 23: return new ID(getMessage(), new Integer( 74 ));
3506              case 24: return new ID(getMessage(), new Integer( 123 ));
3507              case 25: return new PRL(getMessage());
3508              case 26: return new TQ(getMessage());
3509              case 27: return new XCN(getMessage());
3510              case 28: return new EIP(getMessage());
3511              case 29: return new ID(getMessage(), new Integer( 124 ));
3512              case 30: return new CE(getMessage());
3513              case 31: return new NDL(getMessage());
3514              case 32: return new NDL(getMessage());
3515              case 33: return new NDL(getMessage());
3516              case 34: return new NDL(getMessage());
3517              case 35: return new TS(getMessage());
3518              case 36: return new NM(getMessage());
3519              case 37: return new CE(getMessage());
3520              case 38: return new CE(getMessage());
3521              case 39: return new CE(getMessage());
3522              case 40: return new ID(getMessage(), new Integer( 224 ));
3523              case 41: return new ID(getMessage(), new Integer( 225 ));
3524              case 42: return new CE(getMessage());
3525              case 43: return new CE(getMessage());
3526              case 44: return new CE(getMessage());
3527              default: return null;
3528           }
3529       }
3530    
3531    
3532    }
3533