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 UB1 message segment (UB82).
024 * This segment has the following fields:</p>
025 * <ul>
026 * <li>UB1-1: Set ID - UB1 (SI) <b>optional </b>
027 * <li>UB1-2: Blood Deductible (43) (NM) <b>optional </b>
028 * <li>UB1-3: Blood Furnished-Pints Of (40) (NM) <b>optional </b>
029 * <li>UB1-4: Blood Replaced-Pints (41) (NM) <b>optional </b>
030 * <li>UB1-5: Blood Not Replaced-Pints(42) (NM) <b>optional </b>
031 * <li>UB1-6: Co-Insurance Days (25) (NM) <b>optional </b>
032 * <li>UB1-7: Condition Code (35-39) (IS) <b>optional repeating</b>
033 * <li>UB1-8: Covered Days - (23) (NM) <b>optional </b>
034 * <li>UB1-9: Non Covered Days - (24) (NM) <b>optional </b>
035 * <li>UB1-10: Value Amount & Code (46-49) (UVC) <b>optional repeating</b>
036 * <li>UB1-11: Number Of Grace Days (90) (NM) <b>optional </b>
037 * <li>UB1-12: Special Program Indicator (44) (CE) <b>optional </b>
038 * <li>UB1-13: PSRO/UR Approval Indicator (87) (CE) <b>optional </b>
039 * <li>UB1-14: PSRO/UR Approved Stay-Fm (88) (DT) <b>optional </b>
040 * <li>UB1-15: PSRO/UR Approved Stay-To (89) (DT) <b>optional </b>
041 * <li>UB1-16: Occurrence (28-32) (OCD) <b>optional repeating</b>
042 * <li>UB1-17: Occurrence Span (33) (CE) <b>optional </b>
043 * <li>UB1-18: Occur Span Start Date(33) (DT) <b>optional </b>
044 * <li>UB1-19: Occur Span End Date (33) (DT) <b>optional </b>
045 * <li>UB1-20: UB-82 Locator 2 (ST) <b>optional </b>
046 * <li>UB1-21: UB-82 Locator 9 (ST) <b>optional </b>
047 * <li>UB1-22: UB-82 Locator 27 (ST) <b>optional </b>
048 * <li>UB1-23: UB-82 Locator 45 (ST) <b>optional </b>
049 * </ul>
050 */
051 public class UB1 extends AbstractSegment {
052
053 /**
054 * Creates a new UB1 segment
055 */
056 public UB1(Group parent, ModelClassFactory factory) {
057 super(parent, factory);
058 init(factory);
059 }
060
061 private void init(ModelClassFactory factory) {
062 try {
063 this.add(SI.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Set ID - UB1");
064 this.add(NM.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "Blood Deductible (43)");
065 this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Blood Furnished-Pints Of (40)");
066 this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Blood Replaced-Pints (41)");
067 this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Blood Not Replaced-Pints(42)");
068 this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Co-Insurance Days (25)");
069 this.add(IS.class, false, 5, 14, new Object[]{ getMessage() }, "Condition Code (35-39)");
070 this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Covered Days - (23)");
071 this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Non Covered Days - (24)");
072 this.add(UVC.class, false, 8, 12, new Object[]{ getMessage(), new Integer(153) }, "Value Amount & Code (46-49)");
073 this.add(NM.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "Number Of Grace Days (90)");
074 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(348) }, "Special Program Indicator (44)");
075 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(349) }, "PSRO/UR Approval Indicator (87)");
076 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "PSRO/UR Approved Stay-Fm (88)");
077 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "PSRO/UR Approved Stay-To (89)");
078 this.add(OCD.class, false, 5, 20, new Object[]{ getMessage(), new Integer(350) }, "Occurrence (28-32)");
079 this.add(CE.class, false, 1, 250, new Object[]{ getMessage(), new Integer(351) }, "Occurrence Span (33)");
080 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Occur Span Start Date(33)");
081 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Occur Span End Date (33)");
082 this.add(ST.class, false, 1, 30, new Object[]{ getMessage(), new Integer(0) }, "UB-82 Locator 2");
083 this.add(ST.class, false, 1, 7, new Object[]{ getMessage(), new Integer(0) }, "UB-82 Locator 9");
084 this.add(ST.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "UB-82 Locator 27");
085 this.add(ST.class, false, 1, 17, new Object[]{ getMessage(), new Integer(0) }, "UB-82 Locator 45");
086 } catch(HL7Exception e) {
087 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating UB1 - this is probably a bug in the source code generator.", e);
088 }
089 }
090
091
092
093 /**
094 * Returns
095 * UB1-1: "Set ID - UB1" - creates it if necessary
096 */
097 public SI getSetIDUB1() {
098 SI ret = null;
099 try {
100 Type t = this.getField(1, 0);
101 ret = (SI)t;
102 } catch (ClassCastException cce) {
103 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
104 throw new RuntimeException(cce);
105 } catch (HL7Exception he) {
106 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
107 throw new RuntimeException(he);
108 }
109 return ret;
110 }
111
112
113 /**
114 * Returns
115 * UB1-1: "Set ID - UB1" - creates it if necessary
116 */
117 public SI getUb11_SetIDUB1() {
118 SI ret = null;
119 try {
120 Type t = this.getField(1, 0);
121 ret = (SI)t;
122 } catch (ClassCastException cce) {
123 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
124 throw new RuntimeException(cce);
125 } catch (HL7Exception he) {
126 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
127 throw new RuntimeException(he);
128 }
129 return ret;
130 }
131
132
133
134 /**
135 * Returns
136 * UB1-2: "Blood Deductible (43)" - creates it if necessary
137 */
138 public NM getBloodDeductible() {
139 NM ret = null;
140 try {
141 Type t = this.getField(2, 0);
142 ret = (NM)t;
143 } catch (ClassCastException cce) {
144 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
145 throw new RuntimeException(cce);
146 } catch (HL7Exception he) {
147 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
148 throw new RuntimeException(he);
149 }
150 return ret;
151 }
152
153
154 /**
155 * Returns
156 * UB1-2: "Blood Deductible (43)" - creates it if necessary
157 */
158 public NM getUb12_BloodDeductible() {
159 NM ret = null;
160 try {
161 Type t = this.getField(2, 0);
162 ret = (NM)t;
163 } catch (ClassCastException cce) {
164 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
165 throw new RuntimeException(cce);
166 } catch (HL7Exception he) {
167 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
168 throw new RuntimeException(he);
169 }
170 return ret;
171 }
172
173
174
175 /**
176 * Returns
177 * UB1-3: "Blood Furnished-Pints Of (40)" - creates it if necessary
178 */
179 public NM getBloodFurnishedPintsOf() {
180 NM ret = null;
181 try {
182 Type t = this.getField(3, 0);
183 ret = (NM)t;
184 } catch (ClassCastException cce) {
185 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
186 throw new RuntimeException(cce);
187 } catch (HL7Exception he) {
188 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
189 throw new RuntimeException(he);
190 }
191 return ret;
192 }
193
194
195 /**
196 * Returns
197 * UB1-3: "Blood Furnished-Pints Of (40)" - creates it if necessary
198 */
199 public NM getUb13_BloodFurnishedPintsOf() {
200 NM ret = null;
201 try {
202 Type t = this.getField(3, 0);
203 ret = (NM)t;
204 } catch (ClassCastException cce) {
205 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
206 throw new RuntimeException(cce);
207 } catch (HL7Exception he) {
208 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
209 throw new RuntimeException(he);
210 }
211 return ret;
212 }
213
214
215
216 /**
217 * Returns
218 * UB1-4: "Blood Replaced-Pints (41)" - creates it if necessary
219 */
220 public NM getBloodReplacedPints() {
221 NM ret = null;
222 try {
223 Type t = this.getField(4, 0);
224 ret = (NM)t;
225 } catch (ClassCastException cce) {
226 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
227 throw new RuntimeException(cce);
228 } catch (HL7Exception he) {
229 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
230 throw new RuntimeException(he);
231 }
232 return ret;
233 }
234
235
236 /**
237 * Returns
238 * UB1-4: "Blood Replaced-Pints (41)" - creates it if necessary
239 */
240 public NM getUb14_BloodReplacedPints() {
241 NM ret = null;
242 try {
243 Type t = this.getField(4, 0);
244 ret = (NM)t;
245 } catch (ClassCastException cce) {
246 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
247 throw new RuntimeException(cce);
248 } catch (HL7Exception he) {
249 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
250 throw new RuntimeException(he);
251 }
252 return ret;
253 }
254
255
256
257 /**
258 * Returns
259 * UB1-5: "Blood Not Replaced-Pints(42)" - creates it if necessary
260 */
261 public NM getBloodNotReplacedPints() {
262 NM ret = null;
263 try {
264 Type t = this.getField(5, 0);
265 ret = (NM)t;
266 } catch (ClassCastException cce) {
267 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
268 throw new RuntimeException(cce);
269 } catch (HL7Exception he) {
270 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
271 throw new RuntimeException(he);
272 }
273 return ret;
274 }
275
276
277 /**
278 * Returns
279 * UB1-5: "Blood Not Replaced-Pints(42)" - creates it if necessary
280 */
281 public NM getUb15_BloodNotReplacedPints() {
282 NM ret = null;
283 try {
284 Type t = this.getField(5, 0);
285 ret = (NM)t;
286 } catch (ClassCastException cce) {
287 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
288 throw new RuntimeException(cce);
289 } catch (HL7Exception he) {
290 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
291 throw new RuntimeException(he);
292 }
293 return ret;
294 }
295
296
297
298 /**
299 * Returns
300 * UB1-6: "Co-Insurance Days (25)" - creates it if necessary
301 */
302 public NM getCoInsuranceDays() {
303 NM ret = null;
304 try {
305 Type t = this.getField(6, 0);
306 ret = (NM)t;
307 } catch (ClassCastException cce) {
308 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
309 throw new RuntimeException(cce);
310 } catch (HL7Exception he) {
311 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
312 throw new RuntimeException(he);
313 }
314 return ret;
315 }
316
317
318 /**
319 * Returns
320 * UB1-6: "Co-Insurance Days (25)" - creates it if necessary
321 */
322 public NM getUb16_CoInsuranceDays() {
323 NM ret = null;
324 try {
325 Type t = this.getField(6, 0);
326 ret = (NM)t;
327 } catch (ClassCastException cce) {
328 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
329 throw new RuntimeException(cce);
330 } catch (HL7Exception he) {
331 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
332 throw new RuntimeException(he);
333 }
334 return ret;
335 }
336
337
338 /**
339 * Returns all repetitions of Condition Code (35-39) (UB1-7).
340 */
341 public IS[] getConditionCode3539() {
342 IS[] ret = null;
343 try {
344 Type[] t = this.getField(7);
345 ret = new IS[t.length];
346 for (int i = 0; i < ret.length; i++) {
347 ret[i] = (IS)t[i];
348 }
349 } catch (ClassCastException cce) {
350 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
351 throw new RuntimeException(cce);
352 } catch (HL7Exception he) {
353 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
354 throw new RuntimeException(he);
355 }
356 return ret;
357 }
358
359
360 /**
361 * Returns a count of the current number of repetitions of Condition Code (35-39) (UB1-7).
362 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
363 * it will return zero.
364 */
365 public int getConditionCode3539Reps() {
366 IS[] ret = null;
367 try {
368 Type[] t = this.getField(7);
369 return t.length;
370 } catch (ClassCastException cce) {
371 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
372 throw new RuntimeException(cce);
373 } catch (HL7Exception he) {
374 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
375 throw new RuntimeException(he);
376 }
377 }
378
379
380 /**
381 * Returns a specific repetition of
382 * UB1-7: "Condition Code (35-39)" - creates it if necessary
383 *
384 * @param rep The repetition index (0-indexed)
385 */
386 public IS getConditionCode3539(int rep) {
387 IS ret = null;
388 try {
389 Type t = this.getField(7, rep);
390 ret = (IS)t;
391 } catch (ClassCastException cce) {
392 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
393 throw new RuntimeException(cce);
394 } catch (HL7Exception he) {
395 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
396 throw new RuntimeException(he);
397 }
398 return ret;
399 }
400
401 /**
402 * Returns a specific repetition of
403 * UB1-7: "Condition Code (35-39)" - creates it if necessary
404 *
405 * @param rep The repetition index (0-indexed)
406 */
407 public IS getUb17_ConditionCode3539(int rep) {
408 IS ret = null;
409 try {
410 Type t = this.getField(7, rep);
411 ret = (IS)t;
412 } catch (ClassCastException cce) {
413 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
414 throw new RuntimeException(cce);
415 } catch (HL7Exception he) {
416 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
417 throw new RuntimeException(he);
418 }
419 return ret;
420 }
421
422
423 /**
424 * Returns a count of the current number of repetitions of Condition Code (35-39) (UB1-7).
425 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
426 * it will return zero.
427 */
428 public int getUb17_ConditionCode3539Reps() {
429 IS[] ret = null;
430 try {
431 Type[] t = this.getField(7);
432 return t.length;
433 } catch (ClassCastException cce) {
434 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
435 throw new RuntimeException(cce);
436 } catch (HL7Exception he) {
437 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
438 throw new RuntimeException(he);
439 }
440 }
441
442
443
444 /**
445 * Inserts a repetition of
446 * UB1-7: "Condition Code (35-39)" at a specific index
447 *
448 * @param rep The repetition index (0-indexed)
449 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
450 */
451 public IS insertConditionCode3539(int rep) throws HL7Exception {
452 return (IS) super.insertRepetition(7, rep);
453 }
454
455
456
457 /**
458 * Inserts a repetition of
459 * UB1-7: "Condition Code (35-39)" at a specific index
460 *
461 * @param rep The repetition index (0-indexed)
462 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
463 */
464 public IS insertUb17_ConditionCode3539(int rep) throws HL7Exception {
465 return (IS) super.insertRepetition(7, rep);
466 }
467
468
469 /**
470 * Removes a repetition of
471 * UB1-7: "Condition Code (35-39)" at a specific index
472 *
473 * @param rep The repetition index (0-indexed)
474 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
475 */
476 public IS removeConditionCode3539(int rep) throws HL7Exception {
477 return (IS) super.removeRepetition(7, rep);
478 }
479
480
481 /**
482 * Removes a repetition of
483 * UB1-7: "Condition Code (35-39)" at a specific index
484 *
485 * @param rep The repetition index (0-indexed)
486 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
487 */
488 public IS removeUb17_ConditionCode3539(int rep) throws HL7Exception {
489 return (IS) super.removeRepetition(7, rep);
490 }
491
492
493
494
495 /**
496 * Returns
497 * UB1-8: "Covered Days - (23)" - creates it if necessary
498 */
499 public NM getCoveredDays() {
500 NM ret = null;
501 try {
502 Type t = this.getField(8, 0);
503 ret = (NM)t;
504 } catch (ClassCastException cce) {
505 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
506 throw new RuntimeException(cce);
507 } catch (HL7Exception he) {
508 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
509 throw new RuntimeException(he);
510 }
511 return ret;
512 }
513
514
515 /**
516 * Returns
517 * UB1-8: "Covered Days - (23)" - creates it if necessary
518 */
519 public NM getUb18_CoveredDays() {
520 NM ret = null;
521 try {
522 Type t = this.getField(8, 0);
523 ret = (NM)t;
524 } catch (ClassCastException cce) {
525 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
526 throw new RuntimeException(cce);
527 } catch (HL7Exception he) {
528 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
529 throw new RuntimeException(he);
530 }
531 return ret;
532 }
533
534
535
536 /**
537 * Returns
538 * UB1-9: "Non Covered Days - (24)" - creates it if necessary
539 */
540 public NM getNonCoveredDays() {
541 NM ret = null;
542 try {
543 Type t = this.getField(9, 0);
544 ret = (NM)t;
545 } catch (ClassCastException cce) {
546 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
547 throw new RuntimeException(cce);
548 } catch (HL7Exception he) {
549 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
550 throw new RuntimeException(he);
551 }
552 return ret;
553 }
554
555
556 /**
557 * Returns
558 * UB1-9: "Non Covered Days - (24)" - creates it if necessary
559 */
560 public NM getUb19_NonCoveredDays() {
561 NM ret = null;
562 try {
563 Type t = this.getField(9, 0);
564 ret = (NM)t;
565 } catch (ClassCastException cce) {
566 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
567 throw new RuntimeException(cce);
568 } catch (HL7Exception he) {
569 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
570 throw new RuntimeException(he);
571 }
572 return ret;
573 }
574
575
576 /**
577 * Returns all repetitions of Value Amount & Code (46-49) (UB1-10).
578 */
579 public UVC[] getValueAmountCode4649() {
580 UVC[] ret = null;
581 try {
582 Type[] t = this.getField(10);
583 ret = new UVC[t.length];
584 for (int i = 0; i < ret.length; i++) {
585 ret[i] = (UVC)t[i];
586 }
587 } catch (ClassCastException cce) {
588 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
589 throw new RuntimeException(cce);
590 } catch (HL7Exception he) {
591 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
592 throw new RuntimeException(he);
593 }
594 return ret;
595 }
596
597
598 /**
599 * Returns a count of the current number of repetitions of Value Amount & Code (46-49) (UB1-10).
600 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
601 * it will return zero.
602 */
603 public int getValueAmountCode4649Reps() {
604 UVC[] ret = null;
605 try {
606 Type[] t = this.getField(10);
607 return t.length;
608 } catch (ClassCastException cce) {
609 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
610 throw new RuntimeException(cce);
611 } catch (HL7Exception he) {
612 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
613 throw new RuntimeException(he);
614 }
615 }
616
617
618 /**
619 * Returns a specific repetition of
620 * UB1-10: "Value Amount & Code (46-49)" - creates it if necessary
621 *
622 * @param rep The repetition index (0-indexed)
623 */
624 public UVC getValueAmountCode4649(int rep) {
625 UVC ret = null;
626 try {
627 Type t = this.getField(10, rep);
628 ret = (UVC)t;
629 } catch (ClassCastException cce) {
630 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
631 throw new RuntimeException(cce);
632 } catch (HL7Exception he) {
633 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
634 throw new RuntimeException(he);
635 }
636 return ret;
637 }
638
639 /**
640 * Returns a specific repetition of
641 * UB1-10: "Value Amount & Code (46-49)" - creates it if necessary
642 *
643 * @param rep The repetition index (0-indexed)
644 */
645 public UVC getUb110_ValueAmountCode4649(int rep) {
646 UVC ret = null;
647 try {
648 Type t = this.getField(10, rep);
649 ret = (UVC)t;
650 } catch (ClassCastException cce) {
651 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
652 throw new RuntimeException(cce);
653 } catch (HL7Exception he) {
654 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
655 throw new RuntimeException(he);
656 }
657 return ret;
658 }
659
660
661 /**
662 * Returns a count of the current number of repetitions of Value Amount & Code (46-49) (UB1-10).
663 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
664 * it will return zero.
665 */
666 public int getUb110_ValueAmountCode4649Reps() {
667 UVC[] ret = null;
668 try {
669 Type[] t = this.getField(10);
670 return t.length;
671 } catch (ClassCastException cce) {
672 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
673 throw new RuntimeException(cce);
674 } catch (HL7Exception he) {
675 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
676 throw new RuntimeException(he);
677 }
678 }
679
680
681
682 /**
683 * Inserts a repetition of
684 * UB1-10: "Value Amount & Code (46-49)" at a specific index
685 *
686 * @param rep The repetition index (0-indexed)
687 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
688 */
689 public UVC insertValueAmountCode4649(int rep) throws HL7Exception {
690 return (UVC) super.insertRepetition(10, rep);
691 }
692
693
694
695 /**
696 * Inserts a repetition of
697 * UB1-10: "Value Amount & Code (46-49)" at a specific index
698 *
699 * @param rep The repetition index (0-indexed)
700 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
701 */
702 public UVC insertUb110_ValueAmountCode4649(int rep) throws HL7Exception {
703 return (UVC) super.insertRepetition(10, rep);
704 }
705
706
707 /**
708 * Removes a repetition of
709 * UB1-10: "Value Amount & Code (46-49)" at a specific index
710 *
711 * @param rep The repetition index (0-indexed)
712 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
713 */
714 public UVC removeValueAmountCode4649(int rep) throws HL7Exception {
715 return (UVC) super.removeRepetition(10, rep);
716 }
717
718
719 /**
720 * Removes a repetition of
721 * UB1-10: "Value Amount & Code (46-49)" at a specific index
722 *
723 * @param rep The repetition index (0-indexed)
724 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
725 */
726 public UVC removeUb110_ValueAmountCode4649(int rep) throws HL7Exception {
727 return (UVC) super.removeRepetition(10, rep);
728 }
729
730
731
732
733 /**
734 * Returns
735 * UB1-11: "Number Of Grace Days (90)" - creates it if necessary
736 */
737 public NM getNumberOfGraceDays() {
738 NM ret = null;
739 try {
740 Type t = this.getField(11, 0);
741 ret = (NM)t;
742 } catch (ClassCastException cce) {
743 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
744 throw new RuntimeException(cce);
745 } catch (HL7Exception he) {
746 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
747 throw new RuntimeException(he);
748 }
749 return ret;
750 }
751
752
753 /**
754 * Returns
755 * UB1-11: "Number Of Grace Days (90)" - creates it if necessary
756 */
757 public NM getUb111_NumberOfGraceDays() {
758 NM ret = null;
759 try {
760 Type t = this.getField(11, 0);
761 ret = (NM)t;
762 } catch (ClassCastException cce) {
763 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
764 throw new RuntimeException(cce);
765 } catch (HL7Exception he) {
766 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
767 throw new RuntimeException(he);
768 }
769 return ret;
770 }
771
772
773
774 /**
775 * Returns
776 * UB1-12: "Special Program Indicator (44)" - creates it if necessary
777 */
778 public CE getSpecialProgramIndicator() {
779 CE ret = null;
780 try {
781 Type t = this.getField(12, 0);
782 ret = (CE)t;
783 } catch (ClassCastException cce) {
784 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
785 throw new RuntimeException(cce);
786 } catch (HL7Exception he) {
787 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
788 throw new RuntimeException(he);
789 }
790 return ret;
791 }
792
793
794 /**
795 * Returns
796 * UB1-12: "Special Program Indicator (44)" - creates it if necessary
797 */
798 public CE getUb112_SpecialProgramIndicator() {
799 CE ret = null;
800 try {
801 Type t = this.getField(12, 0);
802 ret = (CE)t;
803 } catch (ClassCastException cce) {
804 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
805 throw new RuntimeException(cce);
806 } catch (HL7Exception he) {
807 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
808 throw new RuntimeException(he);
809 }
810 return ret;
811 }
812
813
814
815 /**
816 * Returns
817 * UB1-13: "PSRO/UR Approval Indicator (87)" - creates it if necessary
818 */
819 public CE getPSROURApprovalIndicator() {
820 CE ret = null;
821 try {
822 Type t = this.getField(13, 0);
823 ret = (CE)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 * Returns
837 * UB1-13: "PSRO/UR Approval Indicator (87)" - creates it if necessary
838 */
839 public CE getUb113_PSROURApprovalIndicator() {
840 CE ret = null;
841 try {
842 Type t = this.getField(13, 0);
843 ret = (CE)t;
844 } catch (ClassCastException cce) {
845 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
846 throw new RuntimeException(cce);
847 } catch (HL7Exception he) {
848 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
849 throw new RuntimeException(he);
850 }
851 return ret;
852 }
853
854
855
856 /**
857 * Returns
858 * UB1-14: "PSRO/UR Approved Stay-Fm (88)" - creates it if necessary
859 */
860 public DT getPSROURApprovedStayFm() {
861 DT ret = null;
862 try {
863 Type t = this.getField(14, 0);
864 ret = (DT)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 * Returns
878 * UB1-14: "PSRO/UR Approved Stay-Fm (88)" - creates it if necessary
879 */
880 public DT getUb114_PSROURApprovedStayFm() {
881 DT ret = null;
882 try {
883 Type t = this.getField(14, 0);
884 ret = (DT)t;
885 } catch (ClassCastException cce) {
886 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
887 throw new RuntimeException(cce);
888 } catch (HL7Exception he) {
889 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
890 throw new RuntimeException(he);
891 }
892 return ret;
893 }
894
895
896
897 /**
898 * Returns
899 * UB1-15: "PSRO/UR Approved Stay-To (89)" - creates it if necessary
900 */
901 public DT getPSROURApprovedStayTo() {
902 DT ret = null;
903 try {
904 Type t = this.getField(15, 0);
905 ret = (DT)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 * Returns
919 * UB1-15: "PSRO/UR Approved Stay-To (89)" - creates it if necessary
920 */
921 public DT getUb115_PSROURApprovedStayTo() {
922 DT ret = null;
923 try {
924 Type t = this.getField(15, 0);
925 ret = (DT)t;
926 } catch (ClassCastException cce) {
927 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
928 throw new RuntimeException(cce);
929 } catch (HL7Exception he) {
930 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
931 throw new RuntimeException(he);
932 }
933 return ret;
934 }
935
936
937 /**
938 * Returns all repetitions of Occurrence (28-32) (UB1-16).
939 */
940 public OCD[] getOccurrence2832() {
941 OCD[] ret = null;
942 try {
943 Type[] t = this.getField(16);
944 ret = new OCD[t.length];
945 for (int i = 0; i < ret.length; i++) {
946 ret[i] = (OCD)t[i];
947 }
948 } catch (ClassCastException cce) {
949 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
950 throw new RuntimeException(cce);
951 } catch (HL7Exception he) {
952 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
953 throw new RuntimeException(he);
954 }
955 return ret;
956 }
957
958
959 /**
960 * Returns a count of the current number of repetitions of Occurrence (28-32) (UB1-16).
961 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
962 * it will return zero.
963 */
964 public int getOccurrence2832Reps() {
965 OCD[] ret = null;
966 try {
967 Type[] t = this.getField(16);
968 return t.length;
969 } catch (ClassCastException cce) {
970 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
971 throw new RuntimeException(cce);
972 } catch (HL7Exception he) {
973 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
974 throw new RuntimeException(he);
975 }
976 }
977
978
979 /**
980 * Returns a specific repetition of
981 * UB1-16: "Occurrence (28-32)" - creates it if necessary
982 *
983 * @param rep The repetition index (0-indexed)
984 */
985 public OCD getOccurrence2832(int rep) {
986 OCD ret = null;
987 try {
988 Type t = this.getField(16, rep);
989 ret = (OCD)t;
990 } catch (ClassCastException cce) {
991 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
992 throw new RuntimeException(cce);
993 } catch (HL7Exception he) {
994 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
995 throw new RuntimeException(he);
996 }
997 return ret;
998 }
999
1000 /**
1001 * Returns a specific repetition of
1002 * UB1-16: "Occurrence (28-32)" - creates it if necessary
1003 *
1004 * @param rep The repetition index (0-indexed)
1005 */
1006 public OCD getUb116_Occurrence2832(int rep) {
1007 OCD ret = null;
1008 try {
1009 Type t = this.getField(16, rep);
1010 ret = (OCD)t;
1011 } catch (ClassCastException cce) {
1012 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1013 throw new RuntimeException(cce);
1014 } catch (HL7Exception he) {
1015 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1016 throw new RuntimeException(he);
1017 }
1018 return ret;
1019 }
1020
1021
1022 /**
1023 * Returns a count of the current number of repetitions of Occurrence (28-32) (UB1-16).
1024 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1025 * it will return zero.
1026 */
1027 public int getUb116_Occurrence2832Reps() {
1028 OCD[] ret = null;
1029 try {
1030 Type[] t = this.getField(16);
1031 return t.length;
1032 } catch (ClassCastException cce) {
1033 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1034 throw new RuntimeException(cce);
1035 } catch (HL7Exception he) {
1036 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1037 throw new RuntimeException(he);
1038 }
1039 }
1040
1041
1042
1043 /**
1044 * Inserts a repetition of
1045 * UB1-16: "Occurrence (28-32)" at a specific index
1046 *
1047 * @param rep The repetition index (0-indexed)
1048 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1049 */
1050 public OCD insertOccurrence2832(int rep) throws HL7Exception {
1051 return (OCD) super.insertRepetition(16, rep);
1052 }
1053
1054
1055
1056 /**
1057 * Inserts a repetition of
1058 * UB1-16: "Occurrence (28-32)" at a specific index
1059 *
1060 * @param rep The repetition index (0-indexed)
1061 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1062 */
1063 public OCD insertUb116_Occurrence2832(int rep) throws HL7Exception {
1064 return (OCD) super.insertRepetition(16, rep);
1065 }
1066
1067
1068 /**
1069 * Removes a repetition of
1070 * UB1-16: "Occurrence (28-32)" at a specific index
1071 *
1072 * @param rep The repetition index (0-indexed)
1073 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1074 */
1075 public OCD removeOccurrence2832(int rep) throws HL7Exception {
1076 return (OCD) super.removeRepetition(16, rep);
1077 }
1078
1079
1080 /**
1081 * Removes a repetition of
1082 * UB1-16: "Occurrence (28-32)" at a specific index
1083 *
1084 * @param rep The repetition index (0-indexed)
1085 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1086 */
1087 public OCD removeUb116_Occurrence2832(int rep) throws HL7Exception {
1088 return (OCD) super.removeRepetition(16, rep);
1089 }
1090
1091
1092
1093
1094 /**
1095 * Returns
1096 * UB1-17: "Occurrence Span (33)" - creates it if necessary
1097 */
1098 public CE getOccurrenceSpan() {
1099 CE ret = null;
1100 try {
1101 Type t = this.getField(17, 0);
1102 ret = (CE)t;
1103 } catch (ClassCastException cce) {
1104 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1105 throw new RuntimeException(cce);
1106 } catch (HL7Exception he) {
1107 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1108 throw new RuntimeException(he);
1109 }
1110 return ret;
1111 }
1112
1113
1114 /**
1115 * Returns
1116 * UB1-17: "Occurrence Span (33)" - creates it if necessary
1117 */
1118 public CE getUb117_OccurrenceSpan() {
1119 CE ret = null;
1120 try {
1121 Type t = this.getField(17, 0);
1122 ret = (CE)t;
1123 } catch (ClassCastException cce) {
1124 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1125 throw new RuntimeException(cce);
1126 } catch (HL7Exception he) {
1127 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1128 throw new RuntimeException(he);
1129 }
1130 return ret;
1131 }
1132
1133
1134
1135 /**
1136 * Returns
1137 * UB1-18: "Occur Span Start Date(33)" - creates it if necessary
1138 */
1139 public DT getOccurSpanStartDate() {
1140 DT ret = null;
1141 try {
1142 Type t = this.getField(18, 0);
1143 ret = (DT)t;
1144 } catch (ClassCastException cce) {
1145 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1146 throw new RuntimeException(cce);
1147 } catch (HL7Exception he) {
1148 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1149 throw new RuntimeException(he);
1150 }
1151 return ret;
1152 }
1153
1154
1155 /**
1156 * Returns
1157 * UB1-18: "Occur Span Start Date(33)" - creates it if necessary
1158 */
1159 public DT getUb118_OccurSpanStartDate() {
1160 DT ret = null;
1161 try {
1162 Type t = this.getField(18, 0);
1163 ret = (DT)t;
1164 } catch (ClassCastException cce) {
1165 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1166 throw new RuntimeException(cce);
1167 } catch (HL7Exception he) {
1168 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1169 throw new RuntimeException(he);
1170 }
1171 return ret;
1172 }
1173
1174
1175
1176 /**
1177 * Returns
1178 * UB1-19: "Occur Span End Date (33)" - creates it if necessary
1179 */
1180 public DT getOccurSpanEndDate() {
1181 DT ret = null;
1182 try {
1183 Type t = this.getField(19, 0);
1184 ret = (DT)t;
1185 } catch (ClassCastException cce) {
1186 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1187 throw new RuntimeException(cce);
1188 } catch (HL7Exception he) {
1189 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1190 throw new RuntimeException(he);
1191 }
1192 return ret;
1193 }
1194
1195
1196 /**
1197 * Returns
1198 * UB1-19: "Occur Span End Date (33)" - creates it if necessary
1199 */
1200 public DT getUb119_OccurSpanEndDate() {
1201 DT ret = null;
1202 try {
1203 Type t = this.getField(19, 0);
1204 ret = (DT)t;
1205 } catch (ClassCastException cce) {
1206 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1207 throw new RuntimeException(cce);
1208 } catch (HL7Exception he) {
1209 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1210 throw new RuntimeException(he);
1211 }
1212 return ret;
1213 }
1214
1215
1216
1217 /**
1218 * Returns
1219 * UB1-20: "UB-82 Locator 2" - creates it if necessary
1220 */
1221 public ST getUB82Locator2() {
1222 ST ret = null;
1223 try {
1224 Type t = this.getField(20, 0);
1225 ret = (ST)t;
1226 } catch (ClassCastException cce) {
1227 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1228 throw new RuntimeException(cce);
1229 } catch (HL7Exception he) {
1230 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1231 throw new RuntimeException(he);
1232 }
1233 return ret;
1234 }
1235
1236
1237 /**
1238 * Returns
1239 * UB1-20: "UB-82 Locator 2" - creates it if necessary
1240 */
1241 public ST getUb120_UB82Locator2() {
1242 ST ret = null;
1243 try {
1244 Type t = this.getField(20, 0);
1245 ret = (ST)t;
1246 } catch (ClassCastException cce) {
1247 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1248 throw new RuntimeException(cce);
1249 } catch (HL7Exception he) {
1250 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1251 throw new RuntimeException(he);
1252 }
1253 return ret;
1254 }
1255
1256
1257
1258 /**
1259 * Returns
1260 * UB1-21: "UB-82 Locator 9" - creates it if necessary
1261 */
1262 public ST getUB82Locator9() {
1263 ST ret = null;
1264 try {
1265 Type t = this.getField(21, 0);
1266 ret = (ST)t;
1267 } catch (ClassCastException cce) {
1268 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1269 throw new RuntimeException(cce);
1270 } catch (HL7Exception he) {
1271 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1272 throw new RuntimeException(he);
1273 }
1274 return ret;
1275 }
1276
1277
1278 /**
1279 * Returns
1280 * UB1-21: "UB-82 Locator 9" - creates it if necessary
1281 */
1282 public ST getUb121_UB82Locator9() {
1283 ST ret = null;
1284 try {
1285 Type t = this.getField(21, 0);
1286 ret = (ST)t;
1287 } catch (ClassCastException cce) {
1288 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1289 throw new RuntimeException(cce);
1290 } catch (HL7Exception he) {
1291 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1292 throw new RuntimeException(he);
1293 }
1294 return ret;
1295 }
1296
1297
1298
1299 /**
1300 * Returns
1301 * UB1-22: "UB-82 Locator 27" - creates it if necessary
1302 */
1303 public ST getUB82Locator27() {
1304 ST ret = null;
1305 try {
1306 Type t = this.getField(22, 0);
1307 ret = (ST)t;
1308 } catch (ClassCastException cce) {
1309 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1310 throw new RuntimeException(cce);
1311 } catch (HL7Exception he) {
1312 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1313 throw new RuntimeException(he);
1314 }
1315 return ret;
1316 }
1317
1318
1319 /**
1320 * Returns
1321 * UB1-22: "UB-82 Locator 27" - creates it if necessary
1322 */
1323 public ST getUb122_UB82Locator27() {
1324 ST ret = null;
1325 try {
1326 Type t = this.getField(22, 0);
1327 ret = (ST)t;
1328 } catch (ClassCastException cce) {
1329 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1330 throw new RuntimeException(cce);
1331 } catch (HL7Exception he) {
1332 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1333 throw new RuntimeException(he);
1334 }
1335 return ret;
1336 }
1337
1338
1339
1340 /**
1341 * Returns
1342 * UB1-23: "UB-82 Locator 45" - creates it if necessary
1343 */
1344 public ST getUB82Locator45() {
1345 ST ret = null;
1346 try {
1347 Type t = this.getField(23, 0);
1348 ret = (ST)t;
1349 } catch (ClassCastException cce) {
1350 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1351 throw new RuntimeException(cce);
1352 } catch (HL7Exception he) {
1353 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1354 throw new RuntimeException(he);
1355 }
1356 return ret;
1357 }
1358
1359
1360 /**
1361 * Returns
1362 * UB1-23: "UB-82 Locator 45" - creates it if necessary
1363 */
1364 public ST getUb123_UB82Locator45() {
1365 ST ret = null;
1366 try {
1367 Type t = this.getField(23, 0);
1368 ret = (ST)t;
1369 } catch (ClassCastException cce) {
1370 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1371 throw new RuntimeException(cce);
1372 } catch (HL7Exception he) {
1373 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1374 throw new RuntimeException(he);
1375 }
1376 return ret;
1377 }
1378
1379
1380
1381
1382
1383 /** {@inheritDoc} */
1384 protected Type createNewTypeWithoutReflection(int field) {
1385 switch (field) {
1386 case 0: return new SI(getMessage());
1387 case 1: return new NM(getMessage());
1388 case 2: return new NM(getMessage());
1389 case 3: return new NM(getMessage());
1390 case 4: return new NM(getMessage());
1391 case 5: return new NM(getMessage());
1392 case 6: return new IS(getMessage(), new Integer( 43 ));
1393 case 7: return new NM(getMessage());
1394 case 8: return new NM(getMessage());
1395 case 9: return new UVC(getMessage());
1396 case 10: return new NM(getMessage());
1397 case 11: return new CE(getMessage());
1398 case 12: return new CE(getMessage());
1399 case 13: return new DT(getMessage());
1400 case 14: return new DT(getMessage());
1401 case 15: return new OCD(getMessage());
1402 case 16: return new CE(getMessage());
1403 case 17: return new DT(getMessage());
1404 case 18: return new DT(getMessage());
1405 case 19: return new ST(getMessage());
1406 case 20: return new ST(getMessage());
1407 case 21: return new ST(getMessage());
1408 case 22: return new ST(getMessage());
1409 default: return null;
1410 }
1411 }
1412
1413
1414 }
1415