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 OBX message segment (Observation/Result).
024 * This segment has the following fields:</p>
025 * <ul>
026 * <li>OBX-1: Set ID - OBX (SI) <b>optional </b>
027 * <li>OBX-2: Value Type (ID) <b>optional </b>
028 * <li>OBX-3: Observation Identifier (CE) <b> </b>
029 * <li>OBX-4: Observation Sub-Id (ST) <b>optional </b>
030 * <li>OBX-5: Observation Value (Varies) <b>optional repeating</b>
031 * <li>OBX-6: Units (CE) <b>optional </b>
032 * <li>OBX-7: References Range (ST) <b>optional </b>
033 * <li>OBX-8: Abnormal Flags (IS) <b>optional </b>
034 * <li>OBX-9: Probability (NM) <b>optional repeating</b>
035 * <li>OBX-10: Nature of Abnormal Test (ID) <b>optional </b>
036 * <li>OBX-11: Observation Result Status (ID) <b> </b>
037 * <li>OBX-12: Date Last Observation Normal Value (TS) <b>optional </b>
038 * <li>OBX-13: User Defined Access Checks (ST) <b>optional </b>
039 * <li>OBX-14: Date/Time of the Observation (TS) <b>optional </b>
040 * <li>OBX-15: Producer's ID (CE) <b>optional </b>
041 * <li>OBX-16: Responsible Observer (XCN) <b>optional </b>
042 * <li>OBX-17: Observation Method (CE) <b>optional repeating</b>
043 * <li>OBX-18: Equipment Instance Identifier (EI) <b>optional repeating</b>
044 * <li>OBX-19: Date/Time of the Analysis (TS) <b>optional </b>
045 * </ul>
046 */
047 public class OBX extends AbstractSegment {
048
049 /**
050 * Creates a new OBX segment
051 */
052 public OBX(Group parent, ModelClassFactory factory) {
053 super(parent, factory);
054 init(factory);
055 }
056
057 private void init(ModelClassFactory factory) {
058 try {
059 this.add(SI.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID - OBX");
060 this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Value Type");
061 this.add(CE.class, true, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Observation Identifier");
062 this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Observation Sub-Id");
063 this.add(Varies.class, false, 0, 65536, new Object[]{ getMessage(), new Integer(0) }, "Observation Value");
064 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Units");
065 this.add(ST.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "References Range");
066 this.add(IS.class, false, 1, 5, new Object[]{ getMessage() }, "Abnormal Flags");
067 this.add(NM.class, false, 5, 5, new Object[]{ getMessage(), new Integer(0) }, "Probability");
068 this.add(ID.class, false, 1, 2, new Object[]{ getMessage() }, "Nature of Abnormal Test");
069 this.add(ID.class, true, 1, 1, new Object[]{ getMessage() }, "Observation Result Status");
070 this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date Last Observation Normal Value");
071 this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "User Defined Access Checks");
072 this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date/Time of the Observation");
073 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Producer's ID");
074 this.add(XCN.class, false, 1, 250, new Object[]{ getMessage(), new Integer(0) }, "Responsible Observer");
075 this.add(CE.class, false, 0, 250, new Object[]{ getMessage(), new Integer(0) }, "Observation Method");
076 this.add(EI.class, false, 0, 22, new Object[]{ getMessage(), new Integer(0) }, "Equipment Instance Identifier");
077 this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date/Time of the Analysis");
078 } catch(HL7Exception e) {
079 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating OBX - this is probably a bug in the source code generator.", e);
080 }
081 }
082
083
084
085 /**
086 * Returns
087 * OBX-1: "Set ID - OBX" - creates it if necessary
088 */
089 public SI getSetIDOBX() {
090 SI ret = null;
091 try {
092 Type t = this.getField(1, 0);
093 ret = (SI)t;
094 } catch (ClassCastException cce) {
095 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
096 throw new RuntimeException(cce);
097 } catch (HL7Exception he) {
098 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
099 throw new RuntimeException(he);
100 }
101 return ret;
102 }
103
104
105 /**
106 * Returns
107 * OBX-1: "Set ID - OBX" - creates it if necessary
108 */
109 public SI getObx1_SetIDOBX() {
110 SI ret = null;
111 try {
112 Type t = this.getField(1, 0);
113 ret = (SI)t;
114 } catch (ClassCastException cce) {
115 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
116 throw new RuntimeException(cce);
117 } catch (HL7Exception he) {
118 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
119 throw new RuntimeException(he);
120 }
121 return ret;
122 }
123
124
125
126 /**
127 * Returns
128 * OBX-2: "Value Type" - creates it if necessary
129 */
130 public ID getValueType() {
131 ID ret = null;
132 try {
133 Type t = this.getField(2, 0);
134 ret = (ID)t;
135 } catch (ClassCastException cce) {
136 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
137 throw new RuntimeException(cce);
138 } catch (HL7Exception he) {
139 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
140 throw new RuntimeException(he);
141 }
142 return ret;
143 }
144
145
146 /**
147 * Returns
148 * OBX-2: "Value Type" - creates it if necessary
149 */
150 public ID getObx2_ValueType() {
151 ID ret = null;
152 try {
153 Type t = this.getField(2, 0);
154 ret = (ID)t;
155 } catch (ClassCastException cce) {
156 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
157 throw new RuntimeException(cce);
158 } catch (HL7Exception he) {
159 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
160 throw new RuntimeException(he);
161 }
162 return ret;
163 }
164
165
166
167 /**
168 * Returns
169 * OBX-3: "Observation Identifier" - creates it if necessary
170 */
171 public CE getObservationIdentifier() {
172 CE ret = null;
173 try {
174 Type t = this.getField(3, 0);
175 ret = (CE)t;
176 } catch (ClassCastException cce) {
177 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
178 throw new RuntimeException(cce);
179 } catch (HL7Exception he) {
180 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
181 throw new RuntimeException(he);
182 }
183 return ret;
184 }
185
186
187 /**
188 * Returns
189 * OBX-3: "Observation Identifier" - creates it if necessary
190 */
191 public CE getObx3_ObservationIdentifier() {
192 CE ret = null;
193 try {
194 Type t = this.getField(3, 0);
195 ret = (CE)t;
196 } catch (ClassCastException cce) {
197 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
198 throw new RuntimeException(cce);
199 } catch (HL7Exception he) {
200 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
201 throw new RuntimeException(he);
202 }
203 return ret;
204 }
205
206
207
208 /**
209 * Returns
210 * OBX-4: "Observation Sub-Id" - creates it if necessary
211 */
212 public ST getObservationSubId() {
213 ST ret = null;
214 try {
215 Type t = this.getField(4, 0);
216 ret = (ST)t;
217 } catch (ClassCastException cce) {
218 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
219 throw new RuntimeException(cce);
220 } catch (HL7Exception he) {
221 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
222 throw new RuntimeException(he);
223 }
224 return ret;
225 }
226
227
228 /**
229 * Returns
230 * OBX-4: "Observation Sub-Id" - creates it if necessary
231 */
232 public ST getObx4_ObservationSubId() {
233 ST ret = null;
234 try {
235 Type t = this.getField(4, 0);
236 ret = (ST)t;
237 } catch (ClassCastException cce) {
238 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
239 throw new RuntimeException(cce);
240 } catch (HL7Exception he) {
241 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
242 throw new RuntimeException(he);
243 }
244 return ret;
245 }
246
247
248 /**
249 * Returns all repetitions of Observation Value (OBX-5).
250 */
251 public Varies[] getObservationValue() {
252 Varies[] ret = null;
253 try {
254 Type[] t = this.getField(5);
255 ret = new Varies[t.length];
256 for (int i = 0; i < ret.length; i++) {
257 ret[i] = (Varies)t[i];
258 }
259 } catch (ClassCastException cce) {
260 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
261 throw new RuntimeException(cce);
262 } catch (HL7Exception he) {
263 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
264 throw new RuntimeException(he);
265 }
266 return ret;
267 }
268
269
270 /**
271 * Returns a count of the current number of repetitions of Observation Value (OBX-5).
272 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
273 * it will return zero.
274 */
275 public int getObservationValueReps() {
276 Varies[] ret = null;
277 try {
278 Type[] t = this.getField(5);
279 return t.length;
280 } catch (ClassCastException cce) {
281 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
282 throw new RuntimeException(cce);
283 } catch (HL7Exception he) {
284 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
285 throw new RuntimeException(he);
286 }
287 }
288
289
290 /**
291 * Returns a specific repetition of
292 * OBX-5: "Observation Value" - creates it if necessary
293 *
294 * @param rep The repetition index (0-indexed)
295 */
296 public Varies getObservationValue(int rep) {
297 Varies ret = null;
298 try {
299 Type t = this.getField(5, rep);
300 ret = (Varies)t;
301 } catch (ClassCastException cce) {
302 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
303 throw new RuntimeException(cce);
304 } catch (HL7Exception he) {
305 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
306 throw new RuntimeException(he);
307 }
308 return ret;
309 }
310
311 /**
312 * Returns a specific repetition of
313 * OBX-5: "Observation Value" - creates it if necessary
314 *
315 * @param rep The repetition index (0-indexed)
316 */
317 public Varies getObx5_ObservationValue(int rep) {
318 Varies ret = null;
319 try {
320 Type t = this.getField(5, rep);
321 ret = (Varies)t;
322 } catch (ClassCastException cce) {
323 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
324 throw new RuntimeException(cce);
325 } catch (HL7Exception he) {
326 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
327 throw new RuntimeException(he);
328 }
329 return ret;
330 }
331
332
333 /**
334 * Returns a count of the current number of repetitions of Observation Value (OBX-5).
335 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
336 * it will return zero.
337 */
338 public int getObx5_ObservationValueReps() {
339 Varies[] ret = null;
340 try {
341 Type[] t = this.getField(5);
342 return t.length;
343 } catch (ClassCastException cce) {
344 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
345 throw new RuntimeException(cce);
346 } catch (HL7Exception he) {
347 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
348 throw new RuntimeException(he);
349 }
350 }
351
352
353
354 /**
355 * Inserts a repetition of
356 * OBX-5: "Observation Value" at a specific index
357 *
358 * @param rep The repetition index (0-indexed)
359 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
360 */
361 public Varies insertObservationValue(int rep) throws HL7Exception {
362 return (Varies) super.insertRepetition(5, rep);
363 }
364
365
366
367 /**
368 * Inserts a repetition of
369 * OBX-5: "Observation Value" at a specific index
370 *
371 * @param rep The repetition index (0-indexed)
372 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
373 */
374 public Varies insertObx5_ObservationValue(int rep) throws HL7Exception {
375 return (Varies) super.insertRepetition(5, rep);
376 }
377
378
379 /**
380 * Removes a repetition of
381 * OBX-5: "Observation Value" at a specific index
382 *
383 * @param rep The repetition index (0-indexed)
384 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
385 */
386 public Varies removeObservationValue(int rep) throws HL7Exception {
387 return (Varies) super.removeRepetition(5, rep);
388 }
389
390
391 /**
392 * Removes a repetition of
393 * OBX-5: "Observation Value" at a specific index
394 *
395 * @param rep The repetition index (0-indexed)
396 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
397 */
398 public Varies removeObx5_ObservationValue(int rep) throws HL7Exception {
399 return (Varies) super.removeRepetition(5, rep);
400 }
401
402
403
404
405 /**
406 * Returns
407 * OBX-6: "Units" - creates it if necessary
408 */
409 public CE getUnits() {
410 CE ret = null;
411 try {
412 Type t = this.getField(6, 0);
413 ret = (CE)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 * OBX-6: "Units" - creates it if necessary
428 */
429 public CE getObx6_Units() {
430 CE ret = null;
431 try {
432 Type t = this.getField(6, 0);
433 ret = (CE)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 * OBX-7: "References Range" - creates it if necessary
449 */
450 public ST getReferencesRange() {
451 ST ret = null;
452 try {
453 Type t = this.getField(7, 0);
454 ret = (ST)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 * OBX-7: "References Range" - creates it if necessary
469 */
470 public ST getObx7_ReferencesRange() {
471 ST ret = null;
472 try {
473 Type t = this.getField(7, 0);
474 ret = (ST)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 * OBX-8: "Abnormal Flags" - creates it if necessary
490 */
491 public IS getAbnormalFlags() {
492 IS ret = null;
493 try {
494 Type t = this.getField(8, 0);
495 ret = (IS)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 * OBX-8: "Abnormal Flags" - creates it if necessary
510 */
511 public IS getObx8_AbnormalFlags() {
512 IS ret = null;
513 try {
514 Type t = this.getField(8, 0);
515 ret = (IS)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 * Returns all repetitions of Probability (OBX-9).
529 */
530 public NM[] getProbability() {
531 NM[] ret = null;
532 try {
533 Type[] t = this.getField(9);
534 ret = new NM[t.length];
535 for (int i = 0; i < ret.length; i++) {
536 ret[i] = (NM)t[i];
537 }
538 } catch (ClassCastException cce) {
539 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
540 throw new RuntimeException(cce);
541 } catch (HL7Exception he) {
542 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
543 throw new RuntimeException(he);
544 }
545 return ret;
546 }
547
548
549 /**
550 * Returns a count of the current number of repetitions of Probability (OBX-9).
551 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
552 * it will return zero.
553 */
554 public int getProbabilityReps() {
555 NM[] ret = null;
556 try {
557 Type[] t = this.getField(9);
558 return t.length;
559 } catch (ClassCastException cce) {
560 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
561 throw new RuntimeException(cce);
562 } catch (HL7Exception he) {
563 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
564 throw new RuntimeException(he);
565 }
566 }
567
568
569 /**
570 * Returns a specific repetition of
571 * OBX-9: "Probability" - creates it if necessary
572 *
573 * @param rep The repetition index (0-indexed)
574 */
575 public NM getProbability(int rep) {
576 NM ret = null;
577 try {
578 Type t = this.getField(9, rep);
579 ret = (NM)t;
580 } catch (ClassCastException cce) {
581 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
582 throw new RuntimeException(cce);
583 } catch (HL7Exception he) {
584 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
585 throw new RuntimeException(he);
586 }
587 return ret;
588 }
589
590 /**
591 * Returns a specific repetition of
592 * OBX-9: "Probability" - creates it if necessary
593 *
594 * @param rep The repetition index (0-indexed)
595 */
596 public NM getObx9_Probability(int rep) {
597 NM ret = null;
598 try {
599 Type t = this.getField(9, rep);
600 ret = (NM)t;
601 } catch (ClassCastException cce) {
602 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
603 throw new RuntimeException(cce);
604 } catch (HL7Exception he) {
605 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
606 throw new RuntimeException(he);
607 }
608 return ret;
609 }
610
611
612 /**
613 * Returns a count of the current number of repetitions of Probability (OBX-9).
614 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
615 * it will return zero.
616 */
617 public int getObx9_ProbabilityReps() {
618 NM[] ret = null;
619 try {
620 Type[] t = this.getField(9);
621 return t.length;
622 } catch (ClassCastException cce) {
623 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
624 throw new RuntimeException(cce);
625 } catch (HL7Exception he) {
626 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
627 throw new RuntimeException(he);
628 }
629 }
630
631
632
633 /**
634 * Inserts a repetition of
635 * OBX-9: "Probability" at a specific index
636 *
637 * @param rep The repetition index (0-indexed)
638 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
639 */
640 public NM insertProbability(int rep) throws HL7Exception {
641 return (NM) super.insertRepetition(9, rep);
642 }
643
644
645
646 /**
647 * Inserts a repetition of
648 * OBX-9: "Probability" at a specific index
649 *
650 * @param rep The repetition index (0-indexed)
651 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
652 */
653 public NM insertObx9_Probability(int rep) throws HL7Exception {
654 return (NM) super.insertRepetition(9, rep);
655 }
656
657
658 /**
659 * Removes a repetition of
660 * OBX-9: "Probability" at a specific index
661 *
662 * @param rep The repetition index (0-indexed)
663 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
664 */
665 public NM removeProbability(int rep) throws HL7Exception {
666 return (NM) super.removeRepetition(9, rep);
667 }
668
669
670 /**
671 * Removes a repetition of
672 * OBX-9: "Probability" at a specific index
673 *
674 * @param rep The repetition index (0-indexed)
675 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
676 */
677 public NM removeObx9_Probability(int rep) throws HL7Exception {
678 return (NM) super.removeRepetition(9, rep);
679 }
680
681
682
683
684 /**
685 * Returns
686 * OBX-10: "Nature of Abnormal Test" - creates it if necessary
687 */
688 public ID getNatureOfAbnormalTest() {
689 ID ret = null;
690 try {
691 Type t = this.getField(10, 0);
692 ret = (ID)t;
693 } catch (ClassCastException cce) {
694 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
695 throw new RuntimeException(cce);
696 } catch (HL7Exception he) {
697 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
698 throw new RuntimeException(he);
699 }
700 return ret;
701 }
702
703
704 /**
705 * Returns
706 * OBX-10: "Nature of Abnormal Test" - creates it if necessary
707 */
708 public ID getObx10_NatureOfAbnormalTest() {
709 ID ret = null;
710 try {
711 Type t = this.getField(10, 0);
712 ret = (ID)t;
713 } catch (ClassCastException cce) {
714 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
715 throw new RuntimeException(cce);
716 } catch (HL7Exception he) {
717 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
718 throw new RuntimeException(he);
719 }
720 return ret;
721 }
722
723
724
725 /**
726 * Returns
727 * OBX-11: "Observation Result Status" - creates it if necessary
728 */
729 public ID getObservationResultStatus() {
730 ID ret = null;
731 try {
732 Type t = this.getField(11, 0);
733 ret = (ID)t;
734 } catch (ClassCastException cce) {
735 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
736 throw new RuntimeException(cce);
737 } catch (HL7Exception he) {
738 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
739 throw new RuntimeException(he);
740 }
741 return ret;
742 }
743
744
745 /**
746 * Returns
747 * OBX-11: "Observation Result Status" - creates it if necessary
748 */
749 public ID getObx11_ObservationResultStatus() {
750 ID ret = null;
751 try {
752 Type t = this.getField(11, 0);
753 ret = (ID)t;
754 } catch (ClassCastException cce) {
755 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
756 throw new RuntimeException(cce);
757 } catch (HL7Exception he) {
758 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
759 throw new RuntimeException(he);
760 }
761 return ret;
762 }
763
764
765
766 /**
767 * Returns
768 * OBX-12: "Date Last Observation Normal Value" - creates it if necessary
769 */
770 public TS getDateLastObservationNormalValue() {
771 TS ret = null;
772 try {
773 Type t = this.getField(12, 0);
774 ret = (TS)t;
775 } catch (ClassCastException cce) {
776 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
777 throw new RuntimeException(cce);
778 } catch (HL7Exception he) {
779 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
780 throw new RuntimeException(he);
781 }
782 return ret;
783 }
784
785
786 /**
787 * Returns
788 * OBX-12: "Date Last Observation Normal Value" - creates it if necessary
789 */
790 public TS getObx12_DateLastObservationNormalValue() {
791 TS ret = null;
792 try {
793 Type t = this.getField(12, 0);
794 ret = (TS)t;
795 } catch (ClassCastException cce) {
796 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
797 throw new RuntimeException(cce);
798 } catch (HL7Exception he) {
799 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
800 throw new RuntimeException(he);
801 }
802 return ret;
803 }
804
805
806
807 /**
808 * Returns
809 * OBX-13: "User Defined Access Checks" - creates it if necessary
810 */
811 public ST getUserDefinedAccessChecks() {
812 ST ret = null;
813 try {
814 Type t = this.getField(13, 0);
815 ret = (ST)t;
816 } catch (ClassCastException cce) {
817 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
818 throw new RuntimeException(cce);
819 } catch (HL7Exception he) {
820 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
821 throw new RuntimeException(he);
822 }
823 return ret;
824 }
825
826
827 /**
828 * Returns
829 * OBX-13: "User Defined Access Checks" - creates it if necessary
830 */
831 public ST getObx13_UserDefinedAccessChecks() {
832 ST ret = null;
833 try {
834 Type t = this.getField(13, 0);
835 ret = (ST)t;
836 } catch (ClassCastException cce) {
837 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
838 throw new RuntimeException(cce);
839 } catch (HL7Exception he) {
840 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
841 throw new RuntimeException(he);
842 }
843 return ret;
844 }
845
846
847
848 /**
849 * Returns
850 * OBX-14: "Date/Time of the Observation" - creates it if necessary
851 */
852 public TS getDateTimeOfTheObservation() {
853 TS ret = null;
854 try {
855 Type t = this.getField(14, 0);
856 ret = (TS)t;
857 } catch (ClassCastException cce) {
858 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
859 throw new RuntimeException(cce);
860 } catch (HL7Exception he) {
861 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
862 throw new RuntimeException(he);
863 }
864 return ret;
865 }
866
867
868 /**
869 * Returns
870 * OBX-14: "Date/Time of the Observation" - creates it if necessary
871 */
872 public TS getObx14_DateTimeOfTheObservation() {
873 TS ret = null;
874 try {
875 Type t = this.getField(14, 0);
876 ret = (TS)t;
877 } catch (ClassCastException cce) {
878 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
879 throw new RuntimeException(cce);
880 } catch (HL7Exception he) {
881 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
882 throw new RuntimeException(he);
883 }
884 return ret;
885 }
886
887
888
889 /**
890 * Returns
891 * OBX-15: "Producer's ID" - creates it if necessary
892 */
893 public CE getProducerSID() {
894 CE ret = null;
895 try {
896 Type t = this.getField(15, 0);
897 ret = (CE)t;
898 } catch (ClassCastException cce) {
899 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
900 throw new RuntimeException(cce);
901 } catch (HL7Exception he) {
902 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
903 throw new RuntimeException(he);
904 }
905 return ret;
906 }
907
908
909 /**
910 * Returns
911 * OBX-15: "Producer's ID" - creates it if necessary
912 */
913 public CE getObx15_ProducerSID() {
914 CE ret = null;
915 try {
916 Type t = this.getField(15, 0);
917 ret = (CE)t;
918 } catch (ClassCastException cce) {
919 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
920 throw new RuntimeException(cce);
921 } catch (HL7Exception he) {
922 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
923 throw new RuntimeException(he);
924 }
925 return ret;
926 }
927
928
929
930 /**
931 * Returns
932 * OBX-16: "Responsible Observer" - creates it if necessary
933 */
934 public XCN getResponsibleObserver() {
935 XCN ret = null;
936 try {
937 Type t = this.getField(16, 0);
938 ret = (XCN)t;
939 } catch (ClassCastException cce) {
940 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
941 throw new RuntimeException(cce);
942 } catch (HL7Exception he) {
943 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
944 throw new RuntimeException(he);
945 }
946 return ret;
947 }
948
949
950 /**
951 * Returns
952 * OBX-16: "Responsible Observer" - creates it if necessary
953 */
954 public XCN getObx16_ResponsibleObserver() {
955 XCN ret = null;
956 try {
957 Type t = this.getField(16, 0);
958 ret = (XCN)t;
959 } catch (ClassCastException cce) {
960 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
961 throw new RuntimeException(cce);
962 } catch (HL7Exception he) {
963 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
964 throw new RuntimeException(he);
965 }
966 return ret;
967 }
968
969
970 /**
971 * Returns all repetitions of Observation Method (OBX-17).
972 */
973 public CE[] getObservationMethod() {
974 CE[] ret = null;
975 try {
976 Type[] t = this.getField(17);
977 ret = new CE[t.length];
978 for (int i = 0; i < ret.length; i++) {
979 ret[i] = (CE)t[i];
980 }
981 } catch (ClassCastException cce) {
982 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
983 throw new RuntimeException(cce);
984 } catch (HL7Exception he) {
985 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
986 throw new RuntimeException(he);
987 }
988 return ret;
989 }
990
991
992 /**
993 * Returns a count of the current number of repetitions of Observation Method (OBX-17).
994 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
995 * it will return zero.
996 */
997 public int getObservationMethodReps() {
998 CE[] ret = null;
999 try {
1000 Type[] t = this.getField(17);
1001 return t.length;
1002 } catch (ClassCastException cce) {
1003 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1004 throw new RuntimeException(cce);
1005 } catch (HL7Exception he) {
1006 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1007 throw new RuntimeException(he);
1008 }
1009 }
1010
1011
1012 /**
1013 * Returns a specific repetition of
1014 * OBX-17: "Observation Method" - creates it if necessary
1015 *
1016 * @param rep The repetition index (0-indexed)
1017 */
1018 public CE getObservationMethod(int rep) {
1019 CE ret = null;
1020 try {
1021 Type t = this.getField(17, rep);
1022 ret = (CE)t;
1023 } catch (ClassCastException cce) {
1024 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1025 throw new RuntimeException(cce);
1026 } catch (HL7Exception he) {
1027 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1028 throw new RuntimeException(he);
1029 }
1030 return ret;
1031 }
1032
1033 /**
1034 * Returns a specific repetition of
1035 * OBX-17: "Observation Method" - creates it if necessary
1036 *
1037 * @param rep The repetition index (0-indexed)
1038 */
1039 public CE getObx17_ObservationMethod(int rep) {
1040 CE ret = null;
1041 try {
1042 Type t = this.getField(17, rep);
1043 ret = (CE)t;
1044 } catch (ClassCastException cce) {
1045 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1046 throw new RuntimeException(cce);
1047 } catch (HL7Exception he) {
1048 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1049 throw new RuntimeException(he);
1050 }
1051 return ret;
1052 }
1053
1054
1055 /**
1056 * Returns a count of the current number of repetitions of Observation Method (OBX-17).
1057 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1058 * it will return zero.
1059 */
1060 public int getObx17_ObservationMethodReps() {
1061 CE[] ret = null;
1062 try {
1063 Type[] t = this.getField(17);
1064 return t.length;
1065 } catch (ClassCastException cce) {
1066 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1067 throw new RuntimeException(cce);
1068 } catch (HL7Exception he) {
1069 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1070 throw new RuntimeException(he);
1071 }
1072 }
1073
1074
1075
1076 /**
1077 * Inserts a repetition of
1078 * OBX-17: "Observation Method" at a specific index
1079 *
1080 * @param rep The repetition index (0-indexed)
1081 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1082 */
1083 public CE insertObservationMethod(int rep) throws HL7Exception {
1084 return (CE) super.insertRepetition(17, rep);
1085 }
1086
1087
1088
1089 /**
1090 * Inserts a repetition of
1091 * OBX-17: "Observation Method" at a specific index
1092 *
1093 * @param rep The repetition index (0-indexed)
1094 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1095 */
1096 public CE insertObx17_ObservationMethod(int rep) throws HL7Exception {
1097 return (CE) super.insertRepetition(17, rep);
1098 }
1099
1100
1101 /**
1102 * Removes a repetition of
1103 * OBX-17: "Observation Method" at a specific index
1104 *
1105 * @param rep The repetition index (0-indexed)
1106 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1107 */
1108 public CE removeObservationMethod(int rep) throws HL7Exception {
1109 return (CE) super.removeRepetition(17, rep);
1110 }
1111
1112
1113 /**
1114 * Removes a repetition of
1115 * OBX-17: "Observation Method" at a specific index
1116 *
1117 * @param rep The repetition index (0-indexed)
1118 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1119 */
1120 public CE removeObx17_ObservationMethod(int rep) throws HL7Exception {
1121 return (CE) super.removeRepetition(17, rep);
1122 }
1123
1124
1125
1126 /**
1127 * Returns all repetitions of Equipment Instance Identifier (OBX-18).
1128 */
1129 public EI[] getEquipmentInstanceIdentifier() {
1130 EI[] ret = null;
1131 try {
1132 Type[] t = this.getField(18);
1133 ret = new EI[t.length];
1134 for (int i = 0; i < ret.length; i++) {
1135 ret[i] = (EI)t[i];
1136 }
1137 } catch (ClassCastException cce) {
1138 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1139 throw new RuntimeException(cce);
1140 } catch (HL7Exception he) {
1141 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1142 throw new RuntimeException(he);
1143 }
1144 return ret;
1145 }
1146
1147
1148 /**
1149 * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
1150 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1151 * it will return zero.
1152 */
1153 public int getEquipmentInstanceIdentifierReps() {
1154 EI[] ret = null;
1155 try {
1156 Type[] t = this.getField(18);
1157 return t.length;
1158 } catch (ClassCastException cce) {
1159 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1160 throw new RuntimeException(cce);
1161 } catch (HL7Exception he) {
1162 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1163 throw new RuntimeException(he);
1164 }
1165 }
1166
1167
1168 /**
1169 * Returns a specific repetition of
1170 * OBX-18: "Equipment Instance Identifier" - creates it if necessary
1171 *
1172 * @param rep The repetition index (0-indexed)
1173 */
1174 public EI getEquipmentInstanceIdentifier(int rep) {
1175 EI ret = null;
1176 try {
1177 Type t = this.getField(18, rep);
1178 ret = (EI)t;
1179 } catch (ClassCastException cce) {
1180 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1181 throw new RuntimeException(cce);
1182 } catch (HL7Exception he) {
1183 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1184 throw new RuntimeException(he);
1185 }
1186 return ret;
1187 }
1188
1189 /**
1190 * Returns a specific repetition of
1191 * OBX-18: "Equipment Instance Identifier" - creates it if necessary
1192 *
1193 * @param rep The repetition index (0-indexed)
1194 */
1195 public EI getObx18_EquipmentInstanceIdentifier(int rep) {
1196 EI ret = null;
1197 try {
1198 Type t = this.getField(18, rep);
1199 ret = (EI)t;
1200 } catch (ClassCastException cce) {
1201 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1202 throw new RuntimeException(cce);
1203 } catch (HL7Exception he) {
1204 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1205 throw new RuntimeException(he);
1206 }
1207 return ret;
1208 }
1209
1210
1211 /**
1212 * Returns a count of the current number of repetitions of Equipment Instance Identifier (OBX-18).
1213 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1214 * it will return zero.
1215 */
1216 public int getObx18_EquipmentInstanceIdentifierReps() {
1217 EI[] ret = null;
1218 try {
1219 Type[] t = this.getField(18);
1220 return t.length;
1221 } catch (ClassCastException cce) {
1222 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1223 throw new RuntimeException(cce);
1224 } catch (HL7Exception he) {
1225 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1226 throw new RuntimeException(he);
1227 }
1228 }
1229
1230
1231
1232 /**
1233 * Inserts a repetition of
1234 * OBX-18: "Equipment Instance Identifier" at a specific index
1235 *
1236 * @param rep The repetition index (0-indexed)
1237 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1238 */
1239 public EI insertEquipmentInstanceIdentifier(int rep) throws HL7Exception {
1240 return (EI) super.insertRepetition(18, rep);
1241 }
1242
1243
1244
1245 /**
1246 * Inserts a repetition of
1247 * OBX-18: "Equipment Instance Identifier" at a specific index
1248 *
1249 * @param rep The repetition index (0-indexed)
1250 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1251 */
1252 public EI insertObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception {
1253 return (EI) super.insertRepetition(18, rep);
1254 }
1255
1256
1257 /**
1258 * Removes a repetition of
1259 * OBX-18: "Equipment Instance Identifier" at a specific index
1260 *
1261 * @param rep The repetition index (0-indexed)
1262 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1263 */
1264 public EI removeEquipmentInstanceIdentifier(int rep) throws HL7Exception {
1265 return (EI) super.removeRepetition(18, rep);
1266 }
1267
1268
1269 /**
1270 * Removes a repetition of
1271 * OBX-18: "Equipment Instance Identifier" at a specific index
1272 *
1273 * @param rep The repetition index (0-indexed)
1274 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1275 */
1276 public EI removeObx18_EquipmentInstanceIdentifier(int rep) throws HL7Exception {
1277 return (EI) super.removeRepetition(18, rep);
1278 }
1279
1280
1281
1282
1283 /**
1284 * Returns
1285 * OBX-19: "Date/Time of the Analysis" - creates it if necessary
1286 */
1287 public TS getDateTimeOfTheAnalysis() {
1288 TS ret = null;
1289 try {
1290 Type t = this.getField(19, 0);
1291 ret = (TS)t;
1292 } catch (ClassCastException cce) {
1293 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1294 throw new RuntimeException(cce);
1295 } catch (HL7Exception he) {
1296 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1297 throw new RuntimeException(he);
1298 }
1299 return ret;
1300 }
1301
1302
1303 /**
1304 * Returns
1305 * OBX-19: "Date/Time of the Analysis" - creates it if necessary
1306 */
1307 public TS getObx19_DateTimeOfTheAnalysis() {
1308 TS ret = null;
1309 try {
1310 Type t = this.getField(19, 0);
1311 ret = (TS)t;
1312 } catch (ClassCastException cce) {
1313 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1314 throw new RuntimeException(cce);
1315 } catch (HL7Exception he) {
1316 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1317 throw new RuntimeException(he);
1318 }
1319 return ret;
1320 }
1321
1322
1323
1324
1325
1326 /** {@inheritDoc} */
1327 protected Type createNewTypeWithoutReflection(int field) {
1328 switch (field) {
1329 case 0: return new SI(getMessage());
1330 case 1: return new ID(getMessage(), new Integer( 125 ));
1331 case 2: return new CE(getMessage());
1332 case 3: return new ST(getMessage());
1333 case 4: return new Varies(getMessage());
1334 case 5: return new CE(getMessage());
1335 case 6: return new ST(getMessage());
1336 case 7: return new IS(getMessage(), new Integer( 78 ));
1337 case 8: return new NM(getMessage());
1338 case 9: return new ID(getMessage(), new Integer( 80 ));
1339 case 10: return new ID(getMessage(), new Integer( 85 ));
1340 case 11: return new TS(getMessage());
1341 case 12: return new ST(getMessage());
1342 case 13: return new TS(getMessage());
1343 case 14: return new CE(getMessage());
1344 case 15: return new XCN(getMessage());
1345 case 16: return new CE(getMessage());
1346 case 17: return new EI(getMessage());
1347 case 18: return new TS(getMessage());
1348 default: return null;
1349 }
1350 }
1351
1352
1353 }
1354