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