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