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