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 ABS message segment (Abstract). 
024     * This segment has the following fields:</p>
025     * <ul>
026         * <li>ABS-1: Discharge Care Provider (XCN) <b>optional </b>
027         * <li>ABS-2: Transfer Medical Service Code (CE) <b>optional </b>
028         * <li>ABS-3: Severity of Illness Code (CE) <b>optional </b>
029         * <li>ABS-4: Date/Time of Attestation (TS) <b>optional </b>
030         * <li>ABS-5: Attested By (XCN) <b>optional </b>
031         * <li>ABS-6: Triage Code (CE) <b>optional </b>
032         * <li>ABS-7: Abstract Completion Date/Time (TS) <b>optional </b>
033         * <li>ABS-8: Abstracted By (XCN) <b>optional </b>
034         * <li>ABS-9: Case Category Code (CE) <b>optional </b>
035         * <li>ABS-10: Caesarian Section Indicator (ID) <b>optional </b>
036         * <li>ABS-11: Gestation Category Code (CE) <b>optional </b>
037         * <li>ABS-12: Gestation Period - Weeks (NM) <b>optional </b>
038         * <li>ABS-13: Newborn Code (CE) <b>optional </b>
039         * <li>ABS-14: Stillborn Indicator (ID) <b>optional </b>
040     * </ul>
041     */
042    public class ABS extends AbstractSegment {
043    
044        /** 
045         * Creates a new ABS segment
046         */
047        public ABS(Group parent, ModelClassFactory factory) {
048           super(parent, factory);
049           init(factory);
050        }
051    
052        private void init(ModelClassFactory factory) {
053           try {
054                                      this.add(XCN.class, false, 1, 250, new Object[]{ getMessage(), new Integer(10) }, "Discharge Care Provider");
055                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(69) }, "Transfer Medical Service Code");
056                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(421) }, "Severity of Illness Code");
057                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date/Time of Attestation");
058                                      this.add(XCN.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Attested By");
059                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(422) }, "Triage Code");
060                                      this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Abstract Completion Date/Time");
061                                      this.add(XCN.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Abstracted By");
062                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(423) }, "Case Category Code");
063                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Caesarian Section Indicator");
064                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(424) }, "Gestation Category Code");
065                                      this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Gestation Period - Weeks");
066                                      this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(425) }, "Newborn Code");
067                                      this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Stillborn Indicator");
068           } catch(HL7Exception e) {
069              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating ABS - this is probably a bug in the source code generator.", e);
070           }
071        }
072    
073    
074    
075        /**
076         * Returns
077         * ABS-1: "Discharge Care Provider" - creates it if necessary
078         */
079        public XCN getDischargeCareProvider() { 
080            XCN ret = null;
081            try {
082                Type t = this.getField(1, 0);
083                ret = (XCN)t;
084            } catch (ClassCastException cce) {
085                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
086                throw new RuntimeException(cce);
087            } catch (HL7Exception he) {
088                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
089                throw new RuntimeException(he);
090            }
091            return ret;
092        }
093    
094    
095        /**
096         * Returns
097         * ABS-1: "Discharge Care Provider" - creates it if necessary
098         */
099        public XCN getAbs1_DischargeCareProvider() { 
100            XCN ret = null;
101            try {
102                Type t = this.getField(1, 0);
103                ret = (XCN)t;
104            } catch (ClassCastException cce) {
105                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
106                throw new RuntimeException(cce);
107            } catch (HL7Exception he) {
108                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
109                throw new RuntimeException(he);
110            }
111            return ret;
112        }
113    
114    
115    
116        /**
117         * Returns
118         * ABS-2: "Transfer Medical Service Code" - creates it if necessary
119         */
120        public CE getTransferMedicalServiceCode() { 
121            CE ret = null;
122            try {
123                Type t = this.getField(2, 0);
124                ret = (CE)t;
125            } catch (ClassCastException cce) {
126                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
127                throw new RuntimeException(cce);
128            } catch (HL7Exception he) {
129                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
130                throw new RuntimeException(he);
131            }
132            return ret;
133        }
134    
135    
136        /**
137         * Returns
138         * ABS-2: "Transfer Medical Service Code" - creates it if necessary
139         */
140        public CE getAbs2_TransferMedicalServiceCode() { 
141            CE ret = null;
142            try {
143                Type t = this.getField(2, 0);
144                ret = (CE)t;
145            } catch (ClassCastException cce) {
146                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
147                throw new RuntimeException(cce);
148            } catch (HL7Exception he) {
149                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
150                throw new RuntimeException(he);
151            }
152            return ret;
153        }
154    
155    
156    
157        /**
158         * Returns
159         * ABS-3: "Severity of Illness Code" - creates it if necessary
160         */
161        public CE getSeverityOfIllnessCode() { 
162            CE ret = null;
163            try {
164                Type t = this.getField(3, 0);
165                ret = (CE)t;
166            } catch (ClassCastException cce) {
167                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
168                throw new RuntimeException(cce);
169            } catch (HL7Exception he) {
170                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
171                throw new RuntimeException(he);
172            }
173            return ret;
174        }
175    
176    
177        /**
178         * Returns
179         * ABS-3: "Severity of Illness Code" - creates it if necessary
180         */
181        public CE getAbs3_SeverityOfIllnessCode() { 
182            CE ret = null;
183            try {
184                Type t = this.getField(3, 0);
185                ret = (CE)t;
186            } catch (ClassCastException cce) {
187                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
188                throw new RuntimeException(cce);
189            } catch (HL7Exception he) {
190                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
191                throw new RuntimeException(he);
192            }
193            return ret;
194        }
195    
196    
197    
198        /**
199         * Returns
200         * ABS-4: "Date/Time of Attestation" - creates it if necessary
201         */
202        public TS getDateTimeOfAttestation() { 
203            TS ret = null;
204            try {
205                Type t = this.getField(4, 0);
206                ret = (TS)t;
207            } catch (ClassCastException cce) {
208                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
209                throw new RuntimeException(cce);
210            } catch (HL7Exception he) {
211                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
212                throw new RuntimeException(he);
213            }
214            return ret;
215        }
216    
217    
218        /**
219         * Returns
220         * ABS-4: "Date/Time of Attestation" - creates it if necessary
221         */
222        public TS getAbs4_DateTimeOfAttestation() { 
223            TS ret = null;
224            try {
225                Type t = this.getField(4, 0);
226                ret = (TS)t;
227            } catch (ClassCastException cce) {
228                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
229                throw new RuntimeException(cce);
230            } catch (HL7Exception he) {
231                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
232                throw new RuntimeException(he);
233            }
234            return ret;
235        }
236    
237    
238    
239        /**
240         * Returns
241         * ABS-5: "Attested By" - creates it if necessary
242         */
243        public XCN getAttestedBy() { 
244            XCN ret = null;
245            try {
246                Type t = this.getField(5, 0);
247                ret = (XCN)t;
248            } catch (ClassCastException cce) {
249                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
250                throw new RuntimeException(cce);
251            } catch (HL7Exception he) {
252                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
253                throw new RuntimeException(he);
254            }
255            return ret;
256        }
257    
258    
259        /**
260         * Returns
261         * ABS-5: "Attested By" - creates it if necessary
262         */
263        public XCN getAbs5_AttestedBy() { 
264            XCN ret = null;
265            try {
266                Type t = this.getField(5, 0);
267                ret = (XCN)t;
268            } catch (ClassCastException cce) {
269                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
270                throw new RuntimeException(cce);
271            } catch (HL7Exception he) {
272                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
273                throw new RuntimeException(he);
274            }
275            return ret;
276        }
277    
278    
279    
280        /**
281         * Returns
282         * ABS-6: "Triage Code" - creates it if necessary
283         */
284        public CE getTriageCode() { 
285            CE ret = null;
286            try {
287                Type t = this.getField(6, 0);
288                ret = (CE)t;
289            } catch (ClassCastException cce) {
290                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
291                throw new RuntimeException(cce);
292            } catch (HL7Exception he) {
293                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
294                throw new RuntimeException(he);
295            }
296            return ret;
297        }
298    
299    
300        /**
301         * Returns
302         * ABS-6: "Triage Code" - creates it if necessary
303         */
304        public CE getAbs6_TriageCode() { 
305            CE ret = null;
306            try {
307                Type t = this.getField(6, 0);
308                ret = (CE)t;
309            } catch (ClassCastException cce) {
310                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
311                throw new RuntimeException(cce);
312            } catch (HL7Exception he) {
313                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
314                throw new RuntimeException(he);
315            }
316            return ret;
317        }
318    
319    
320    
321        /**
322         * Returns
323         * ABS-7: "Abstract Completion Date/Time" - creates it if necessary
324         */
325        public TS getAbstractCompletionDateTime() { 
326            TS ret = null;
327            try {
328                Type t = this.getField(7, 0);
329                ret = (TS)t;
330            } catch (ClassCastException cce) {
331                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
332                throw new RuntimeException(cce);
333            } catch (HL7Exception he) {
334                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
335                throw new RuntimeException(he);
336            }
337            return ret;
338        }
339    
340    
341        /**
342         * Returns
343         * ABS-7: "Abstract Completion Date/Time" - creates it if necessary
344         */
345        public TS getAbs7_AbstractCompletionDateTime() { 
346            TS ret = null;
347            try {
348                Type t = this.getField(7, 0);
349                ret = (TS)t;
350            } catch (ClassCastException cce) {
351                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
352                throw new RuntimeException(cce);
353            } catch (HL7Exception he) {
354                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
355                throw new RuntimeException(he);
356            }
357            return ret;
358        }
359    
360    
361    
362        /**
363         * Returns
364         * ABS-8: "Abstracted By" - creates it if necessary
365         */
366        public XCN getAbstractedBy() { 
367            XCN ret = null;
368            try {
369                Type t = this.getField(8, 0);
370                ret = (XCN)t;
371            } catch (ClassCastException cce) {
372                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
373                throw new RuntimeException(cce);
374            } catch (HL7Exception he) {
375                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
376                throw new RuntimeException(he);
377            }
378            return ret;
379        }
380    
381    
382        /**
383         * Returns
384         * ABS-8: "Abstracted By" - creates it if necessary
385         */
386        public XCN getAbs8_AbstractedBy() { 
387            XCN ret = null;
388            try {
389                Type t = this.getField(8, 0);
390                ret = (XCN)t;
391            } catch (ClassCastException cce) {
392                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
393                throw new RuntimeException(cce);
394            } catch (HL7Exception he) {
395                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
396                throw new RuntimeException(he);
397            }
398            return ret;
399        }
400    
401    
402    
403        /**
404         * Returns
405         * ABS-9: "Case Category Code" - creates it if necessary
406         */
407        public CE getCaseCategoryCode() { 
408            CE ret = null;
409            try {
410                Type t = this.getField(9, 0);
411                ret = (CE)t;
412            } catch (ClassCastException cce) {
413                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
414                throw new RuntimeException(cce);
415            } catch (HL7Exception he) {
416                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
417                throw new RuntimeException(he);
418            }
419            return ret;
420        }
421    
422    
423        /**
424         * Returns
425         * ABS-9: "Case Category Code" - creates it if necessary
426         */
427        public CE getAbs9_CaseCategoryCode() { 
428            CE ret = null;
429            try {
430                Type t = this.getField(9, 0);
431                ret = (CE)t;
432            } catch (ClassCastException cce) {
433                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
434                throw new RuntimeException(cce);
435            } catch (HL7Exception he) {
436                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
437                throw new RuntimeException(he);
438            }
439            return ret;
440        }
441    
442    
443    
444        /**
445         * Returns
446         * ABS-10: "Caesarian Section Indicator" - creates it if necessary
447         */
448        public ID getCaesarianSectionIndicator() { 
449            ID ret = null;
450            try {
451                Type t = this.getField(10, 0);
452                ret = (ID)t;
453            } catch (ClassCastException cce) {
454                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
455                throw new RuntimeException(cce);
456            } catch (HL7Exception he) {
457                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
458                throw new RuntimeException(he);
459            }
460            return ret;
461        }
462    
463    
464        /**
465         * Returns
466         * ABS-10: "Caesarian Section Indicator" - creates it if necessary
467         */
468        public ID getAbs10_CaesarianSectionIndicator() { 
469            ID ret = null;
470            try {
471                Type t = this.getField(10, 0);
472                ret = (ID)t;
473            } catch (ClassCastException cce) {
474                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
475                throw new RuntimeException(cce);
476            } catch (HL7Exception he) {
477                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
478                throw new RuntimeException(he);
479            }
480            return ret;
481        }
482    
483    
484    
485        /**
486         * Returns
487         * ABS-11: "Gestation Category Code" - creates it if necessary
488         */
489        public CE getGestationCategoryCode() { 
490            CE ret = null;
491            try {
492                Type t = this.getField(11, 0);
493                ret = (CE)t;
494            } catch (ClassCastException cce) {
495                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
496                throw new RuntimeException(cce);
497            } catch (HL7Exception he) {
498                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
499                throw new RuntimeException(he);
500            }
501            return ret;
502        }
503    
504    
505        /**
506         * Returns
507         * ABS-11: "Gestation Category Code" - creates it if necessary
508         */
509        public CE getAbs11_GestationCategoryCode() { 
510            CE ret = null;
511            try {
512                Type t = this.getField(11, 0);
513                ret = (CE)t;
514            } catch (ClassCastException cce) {
515                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
516                throw new RuntimeException(cce);
517            } catch (HL7Exception he) {
518                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
519                throw new RuntimeException(he);
520            }
521            return ret;
522        }
523    
524    
525    
526        /**
527         * Returns
528         * ABS-12: "Gestation Period - Weeks" - creates it if necessary
529         */
530        public NM getGestationPeriodWeeks() { 
531            NM ret = null;
532            try {
533                Type t = this.getField(12, 0);
534                ret = (NM)t;
535            } catch (ClassCastException cce) {
536                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
537                throw new RuntimeException(cce);
538            } catch (HL7Exception he) {
539                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
540                throw new RuntimeException(he);
541            }
542            return ret;
543        }
544    
545    
546        /**
547         * Returns
548         * ABS-12: "Gestation Period - Weeks" - creates it if necessary
549         */
550        public NM getAbs12_GestationPeriodWeeks() { 
551            NM ret = null;
552            try {
553                Type t = this.getField(12, 0);
554                ret = (NM)t;
555            } catch (ClassCastException cce) {
556                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
557                throw new RuntimeException(cce);
558            } catch (HL7Exception he) {
559                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
560                throw new RuntimeException(he);
561            }
562            return ret;
563        }
564    
565    
566    
567        /**
568         * Returns
569         * ABS-13: "Newborn Code" - creates it if necessary
570         */
571        public CE getNewbornCode() { 
572            CE ret = null;
573            try {
574                Type t = this.getField(13, 0);
575                ret = (CE)t;
576            } catch (ClassCastException cce) {
577                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
578                throw new RuntimeException(cce);
579            } catch (HL7Exception he) {
580                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
581                throw new RuntimeException(he);
582            }
583            return ret;
584        }
585    
586    
587        /**
588         * Returns
589         * ABS-13: "Newborn Code" - creates it if necessary
590         */
591        public CE getAbs13_NewbornCode() { 
592            CE ret = null;
593            try {
594                Type t = this.getField(13, 0);
595                ret = (CE)t;
596            } catch (ClassCastException cce) {
597                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
598                throw new RuntimeException(cce);
599            } catch (HL7Exception he) {
600                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
601                throw new RuntimeException(he);
602            }
603            return ret;
604        }
605    
606    
607    
608        /**
609         * Returns
610         * ABS-14: "Stillborn Indicator" - creates it if necessary
611         */
612        public ID getStillbornIndicator() { 
613            ID ret = null;
614            try {
615                Type t = this.getField(14, 0);
616                ret = (ID)t;
617            } catch (ClassCastException cce) {
618                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
619                throw new RuntimeException(cce);
620            } catch (HL7Exception he) {
621                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
622                throw new RuntimeException(he);
623            }
624            return ret;
625        }
626    
627    
628        /**
629         * Returns
630         * ABS-14: "Stillborn Indicator" - creates it if necessary
631         */
632        public ID getAbs14_StillbornIndicator() { 
633            ID ret = null;
634            try {
635                Type t = this.getField(14, 0);
636                ret = (ID)t;
637            } catch (ClassCastException cce) {
638                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
639                throw new RuntimeException(cce);
640            } catch (HL7Exception he) {
641                HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value.  This is a bug.", he);
642                throw new RuntimeException(he);
643            }
644            return ret;
645        }
646    
647    
648    
649    
650    
651        /** {@inheritDoc} */   
652        protected Type createNewTypeWithoutReflection(int field) {
653           switch (field) {
654              case 0: return new XCN(getMessage());
655              case 1: return new CE(getMessage());
656              case 2: return new CE(getMessage());
657              case 3: return new TS(getMessage());
658              case 4: return new XCN(getMessage());
659              case 5: return new CE(getMessage());
660              case 6: return new TS(getMessage());
661              case 7: return new XCN(getMessage());
662              case 8: return new CE(getMessage());
663              case 9: return new ID(getMessage(), new Integer( 136 ));
664              case 10: return new CE(getMessage());
665              case 11: return new NM(getMessage());
666              case 12: return new CE(getMessage());
667              case 13: return new ID(getMessage(), new Integer( 136 ));
668              default: return null;
669           }
670       }
671    
672    
673    }
674