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 PV2 message segment (PV2 - patient visit - additional information segment).
024 * This segment has the following fields:</p>
025 * <ul>
026 * <li>PV2-1: Prior Pending Location (PL) <b>optional </b>
027 * <li>PV2-2: Accommodation Code (CE) <b>optional </b>
028 * <li>PV2-3: Admit Reason (CE) <b>optional </b>
029 * <li>PV2-4: Transfer Reason (CE) <b>optional </b>
030 * <li>PV2-5: Patient Valuables (ST) <b>optional repeating</b>
031 * <li>PV2-6: Patient Valuables Location (ST) <b>optional </b>
032 * <li>PV2-7: Visit User Code (IS) <b>optional </b>
033 * <li>PV2-8: Expected Admit Date/Time (TS) <b>optional </b>
034 * <li>PV2-9: Expected Discharge Date/Time (TS) <b>optional </b>
035 * <li>PV2-10: Estimated Length of Inpatient Stay (NM) <b>optional </b>
036 * <li>PV2-11: Actual Length of Inpatient Stay (NM) <b>optional </b>
037 * <li>PV2-12: Visit Description (ST) <b>optional </b>
038 * <li>PV2-13: Referral Source Code (XCN) <b>optional repeating</b>
039 * <li>PV2-14: Previous Service Date (DT) <b>optional </b>
040 * <li>PV2-15: Employment Illness Related Indicator (ID) <b>optional </b>
041 * <li>PV2-16: Purge Status Code (IS) <b>optional </b>
042 * <li>PV2-17: Purge Status Date (DT) <b>optional </b>
043 * <li>PV2-18: Special Program Code (IS) <b>optional </b>
044 * <li>PV2-19: Retention Indicator (ID) <b>optional </b>
045 * <li>PV2-20: Expected Number of Insurance Plans (NM) <b>optional </b>
046 * <li>PV2-21: Visit Publicity Code (IS) <b>optional </b>
047 * <li>PV2-22: Visit Protection Indicator (ID) <b>optional </b>
048 * <li>PV2-23: Clinic Organization Name (XON) <b>optional repeating</b>
049 * <li>PV2-24: Patient Status Code (IS) <b>optional </b>
050 * <li>PV2-25: Visit Priority Code (IS) <b>optional </b>
051 * <li>PV2-26: Previous Treatment Date (DT) <b>optional </b>
052 * <li>PV2-27: Expected Discharge Disposition (IS) <b>optional </b>
053 * <li>PV2-28: Signature on File Date (DT) <b>optional </b>
054 * <li>PV2-29: First Similar Illness Date (DT) <b>optional </b>
055 * <li>PV2-30: Patient Charge Adjustment Code (CE) <b>optional </b>
056 * <li>PV2-31: Recurring Service Code (IS) <b>optional </b>
057 * <li>PV2-32: Billing Media Code (ID) <b>optional </b>
058 * <li>PV2-33: Expected Surgery Date & Time (TS) <b>optional </b>
059 * <li>PV2-34: Military Partnership Code (ID) <b>optional </b>
060 * <li>PV2-35: Military Non-Availability Code (ID) <b>optional </b>
061 * <li>PV2-36: Newborn Baby Indicator (ID) <b>optional </b>
062 * <li>PV2-37: Baby Detained Indicator (ID) <b>optional </b>
063 * </ul>
064 */
065 public class PV2 extends AbstractSegment {
066
067 /**
068 * Creates a new PV2 segment
069 */
070 public PV2(Group parent, ModelClassFactory factory) {
071 super(parent, factory);
072 init(factory);
073 }
074
075 private void init(ModelClassFactory factory) {
076 try {
077 this.add(PL.class, false, 1, 80, new Object[]{ getMessage(), new Integer(0) }, "Prior Pending Location");
078 this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(129) }, "Accommodation Code");
079 this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Admit Reason");
080 this.add(CE.class, false, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Transfer Reason");
081 this.add(ST.class, false, 0, 25, new Object[]{ getMessage(), new Integer(0) }, "Patient Valuables");
082 this.add(ST.class, false, 1, 25, new Object[]{ getMessage(), new Integer(0) }, "Patient Valuables Location");
083 this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Visit User Code");
084 this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Expected Admit Date/Time");
085 this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Expected Discharge Date/Time");
086 this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Estimated Length of Inpatient Stay");
087 this.add(NM.class, false, 1, 3, new Object[]{ getMessage(), new Integer(0) }, "Actual Length of Inpatient Stay");
088 this.add(ST.class, false, 1, 50, new Object[]{ getMessage(), new Integer(0) }, "Visit Description");
089 this.add(XCN.class, false, 0, 90, new Object[]{ getMessage(), new Integer(0) }, "Referral Source Code");
090 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Previous Service Date");
091 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Employment Illness Related Indicator");
092 this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Purge Status Code");
093 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Purge Status Date");
094 this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Special Program Code");
095 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Retention Indicator");
096 this.add(NM.class, false, 1, 1, new Object[]{ getMessage(), new Integer(0) }, "Expected Number of Insurance Plans");
097 this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Visit Publicity Code");
098 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Visit Protection Indicator");
099 this.add(XON.class, false, 0, 90, new Object[]{ getMessage(), new Integer(0) }, "Clinic Organization Name");
100 this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Patient Status Code");
101 this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Visit Priority Code");
102 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Previous Treatment Date");
103 this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Expected Discharge Disposition");
104 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Signature on File Date");
105 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "First Similar Illness Date");
106 this.add(CE.class, false, 1, 80, new Object[]{ getMessage(), new Integer(218) }, "Patient Charge Adjustment Code");
107 this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Recurring Service Code");
108 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Billing Media Code");
109 this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Expected Surgery Date & Time");
110 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Military Partnership Code");
111 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Military Non-Availability Code");
112 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Newborn Baby Indicator");
113 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Baby Detained Indicator");
114 } catch(HL7Exception e) {
115 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating PV2 - this is probably a bug in the source code generator.", e);
116 }
117 }
118
119
120
121 /**
122 * Returns
123 * PV2-1: "Prior Pending Location" - creates it if necessary
124 */
125 public PL getPriorPendingLocation() {
126 PL ret = null;
127 try {
128 Type t = this.getField(1, 0);
129 ret = (PL)t;
130 } catch (ClassCastException cce) {
131 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
132 throw new RuntimeException(cce);
133 } catch (HL7Exception he) {
134 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
135 throw new RuntimeException(he);
136 }
137 return ret;
138 }
139
140
141 /**
142 * Returns
143 * PV2-1: "Prior Pending Location" - creates it if necessary
144 */
145 public PL getPv21_PriorPendingLocation() {
146 PL ret = null;
147 try {
148 Type t = this.getField(1, 0);
149 ret = (PL)t;
150 } catch (ClassCastException cce) {
151 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
152 throw new RuntimeException(cce);
153 } catch (HL7Exception he) {
154 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
155 throw new RuntimeException(he);
156 }
157 return ret;
158 }
159
160
161
162 /**
163 * Returns
164 * PV2-2: "Accommodation Code" - creates it if necessary
165 */
166 public CE getAccommodationCode() {
167 CE ret = null;
168 try {
169 Type t = this.getField(2, 0);
170 ret = (CE)t;
171 } catch (ClassCastException cce) {
172 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
173 throw new RuntimeException(cce);
174 } catch (HL7Exception he) {
175 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
176 throw new RuntimeException(he);
177 }
178 return ret;
179 }
180
181
182 /**
183 * Returns
184 * PV2-2: "Accommodation Code" - creates it if necessary
185 */
186 public CE getPv22_AccommodationCode() {
187 CE ret = null;
188 try {
189 Type t = this.getField(2, 0);
190 ret = (CE)t;
191 } catch (ClassCastException cce) {
192 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
193 throw new RuntimeException(cce);
194 } catch (HL7Exception he) {
195 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
196 throw new RuntimeException(he);
197 }
198 return ret;
199 }
200
201
202
203 /**
204 * Returns
205 * PV2-3: "Admit Reason" - creates it if necessary
206 */
207 public CE getAdmitReason() {
208 CE ret = null;
209 try {
210 Type t = this.getField(3, 0);
211 ret = (CE)t;
212 } catch (ClassCastException cce) {
213 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
214 throw new RuntimeException(cce);
215 } catch (HL7Exception he) {
216 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
217 throw new RuntimeException(he);
218 }
219 return ret;
220 }
221
222
223 /**
224 * Returns
225 * PV2-3: "Admit Reason" - creates it if necessary
226 */
227 public CE getPv23_AdmitReason() {
228 CE ret = null;
229 try {
230 Type t = this.getField(3, 0);
231 ret = (CE)t;
232 } catch (ClassCastException cce) {
233 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
234 throw new RuntimeException(cce);
235 } catch (HL7Exception he) {
236 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
237 throw new RuntimeException(he);
238 }
239 return ret;
240 }
241
242
243
244 /**
245 * Returns
246 * PV2-4: "Transfer Reason" - creates it if necessary
247 */
248 public CE getTransferReason() {
249 CE ret = null;
250 try {
251 Type t = this.getField(4, 0);
252 ret = (CE)t;
253 } catch (ClassCastException cce) {
254 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
255 throw new RuntimeException(cce);
256 } catch (HL7Exception he) {
257 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
258 throw new RuntimeException(he);
259 }
260 return ret;
261 }
262
263
264 /**
265 * Returns
266 * PV2-4: "Transfer Reason" - creates it if necessary
267 */
268 public CE getPv24_TransferReason() {
269 CE ret = null;
270 try {
271 Type t = this.getField(4, 0);
272 ret = (CE)t;
273 } catch (ClassCastException cce) {
274 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
275 throw new RuntimeException(cce);
276 } catch (HL7Exception he) {
277 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
278 throw new RuntimeException(he);
279 }
280 return ret;
281 }
282
283
284 /**
285 * Returns all repetitions of Patient Valuables (PV2-5).
286 */
287 public ST[] getPatientValuables() {
288 ST[] ret = null;
289 try {
290 Type[] t = this.getField(5);
291 ret = new ST[t.length];
292 for (int i = 0; i < ret.length; i++) {
293 ret[i] = (ST)t[i];
294 }
295 } catch (ClassCastException cce) {
296 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
297 throw new RuntimeException(cce);
298 } catch (HL7Exception he) {
299 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
300 throw new RuntimeException(he);
301 }
302 return ret;
303 }
304
305
306 /**
307 * Returns a count of the current number of repetitions of Patient Valuables (PV2-5).
308 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
309 * it will return zero.
310 */
311 public int getPatientValuablesReps() {
312 ST[] ret = null;
313 try {
314 Type[] t = this.getField(5);
315 return t.length;
316 } catch (ClassCastException cce) {
317 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
318 throw new RuntimeException(cce);
319 } catch (HL7Exception he) {
320 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
321 throw new RuntimeException(he);
322 }
323 }
324
325
326 /**
327 * Returns a specific repetition of
328 * PV2-5: "Patient Valuables" - creates it if necessary
329 *
330 * @param rep The repetition index (0-indexed)
331 */
332 public ST getPatientValuables(int rep) {
333 ST ret = null;
334 try {
335 Type t = this.getField(5, rep);
336 ret = (ST)t;
337 } catch (ClassCastException cce) {
338 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
339 throw new RuntimeException(cce);
340 } catch (HL7Exception he) {
341 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
342 throw new RuntimeException(he);
343 }
344 return ret;
345 }
346
347 /**
348 * Returns a specific repetition of
349 * PV2-5: "Patient Valuables" - creates it if necessary
350 *
351 * @param rep The repetition index (0-indexed)
352 */
353 public ST getPv25_PatientValuables(int rep) {
354 ST ret = null;
355 try {
356 Type t = this.getField(5, rep);
357 ret = (ST)t;
358 } catch (ClassCastException cce) {
359 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
360 throw new RuntimeException(cce);
361 } catch (HL7Exception he) {
362 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
363 throw new RuntimeException(he);
364 }
365 return ret;
366 }
367
368
369 /**
370 * Returns a count of the current number of repetitions of Patient Valuables (PV2-5).
371 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
372 * it will return zero.
373 */
374 public int getPv25_PatientValuablesReps() {
375 ST[] ret = null;
376 try {
377 Type[] t = this.getField(5);
378 return t.length;
379 } catch (ClassCastException cce) {
380 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
381 throw new RuntimeException(cce);
382 } catch (HL7Exception he) {
383 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
384 throw new RuntimeException(he);
385 }
386 }
387
388
389
390 /**
391 * Inserts a repetition of
392 * PV2-5: "Patient Valuables" at a specific index
393 *
394 * @param rep The repetition index (0-indexed)
395 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
396 */
397 public ST insertPatientValuables(int rep) throws HL7Exception {
398 return (ST) super.insertRepetition(5, rep);
399 }
400
401
402
403 /**
404 * Inserts a repetition of
405 * PV2-5: "Patient Valuables" at a specific index
406 *
407 * @param rep The repetition index (0-indexed)
408 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
409 */
410 public ST insertPv25_PatientValuables(int rep) throws HL7Exception {
411 return (ST) super.insertRepetition(5, rep);
412 }
413
414
415 /**
416 * Removes a repetition of
417 * PV2-5: "Patient Valuables" at a specific index
418 *
419 * @param rep The repetition index (0-indexed)
420 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
421 */
422 public ST removePatientValuables(int rep) throws HL7Exception {
423 return (ST) super.removeRepetition(5, rep);
424 }
425
426
427 /**
428 * Removes a repetition of
429 * PV2-5: "Patient Valuables" at a specific index
430 *
431 * @param rep The repetition index (0-indexed)
432 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
433 */
434 public ST removePv25_PatientValuables(int rep) throws HL7Exception {
435 return (ST) super.removeRepetition(5, rep);
436 }
437
438
439
440
441 /**
442 * Returns
443 * PV2-6: "Patient Valuables Location" - creates it if necessary
444 */
445 public ST getPatientValuablesLocation() {
446 ST ret = null;
447 try {
448 Type t = this.getField(6, 0);
449 ret = (ST)t;
450 } catch (ClassCastException cce) {
451 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
452 throw new RuntimeException(cce);
453 } catch (HL7Exception he) {
454 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
455 throw new RuntimeException(he);
456 }
457 return ret;
458 }
459
460
461 /**
462 * Returns
463 * PV2-6: "Patient Valuables Location" - creates it if necessary
464 */
465 public ST getPv26_PatientValuablesLocation() {
466 ST ret = null;
467 try {
468 Type t = this.getField(6, 0);
469 ret = (ST)t;
470 } catch (ClassCastException cce) {
471 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
472 throw new RuntimeException(cce);
473 } catch (HL7Exception he) {
474 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
475 throw new RuntimeException(he);
476 }
477 return ret;
478 }
479
480
481
482 /**
483 * Returns
484 * PV2-7: "Visit User Code" - creates it if necessary
485 */
486 public IS getVisitUserCode() {
487 IS ret = null;
488 try {
489 Type t = this.getField(7, 0);
490 ret = (IS)t;
491 } catch (ClassCastException cce) {
492 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
493 throw new RuntimeException(cce);
494 } catch (HL7Exception he) {
495 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
496 throw new RuntimeException(he);
497 }
498 return ret;
499 }
500
501
502 /**
503 * Returns
504 * PV2-7: "Visit User Code" - creates it if necessary
505 */
506 public IS getPv27_VisitUserCode() {
507 IS ret = null;
508 try {
509 Type t = this.getField(7, 0);
510 ret = (IS)t;
511 } catch (ClassCastException cce) {
512 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
513 throw new RuntimeException(cce);
514 } catch (HL7Exception he) {
515 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
516 throw new RuntimeException(he);
517 }
518 return ret;
519 }
520
521
522
523 /**
524 * Returns
525 * PV2-8: "Expected Admit Date/Time" - creates it if necessary
526 */
527 public TS getExpectedAdmitDateTime() {
528 TS ret = null;
529 try {
530 Type t = this.getField(8, 0);
531 ret = (TS)t;
532 } catch (ClassCastException cce) {
533 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
534 throw new RuntimeException(cce);
535 } catch (HL7Exception he) {
536 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
537 throw new RuntimeException(he);
538 }
539 return ret;
540 }
541
542
543 /**
544 * Returns
545 * PV2-8: "Expected Admit Date/Time" - creates it if necessary
546 */
547 public TS getPv28_ExpectedAdmitDateTime() {
548 TS ret = null;
549 try {
550 Type t = this.getField(8, 0);
551 ret = (TS)t;
552 } catch (ClassCastException cce) {
553 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
554 throw new RuntimeException(cce);
555 } catch (HL7Exception he) {
556 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
557 throw new RuntimeException(he);
558 }
559 return ret;
560 }
561
562
563
564 /**
565 * Returns
566 * PV2-9: "Expected Discharge Date/Time" - creates it if necessary
567 */
568 public TS getExpectedDischargeDateTime() {
569 TS ret = null;
570 try {
571 Type t = this.getField(9, 0);
572 ret = (TS)t;
573 } catch (ClassCastException cce) {
574 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
575 throw new RuntimeException(cce);
576 } catch (HL7Exception he) {
577 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
578 throw new RuntimeException(he);
579 }
580 return ret;
581 }
582
583
584 /**
585 * Returns
586 * PV2-9: "Expected Discharge Date/Time" - creates it if necessary
587 */
588 public TS getPv29_ExpectedDischargeDateTime() {
589 TS ret = null;
590 try {
591 Type t = this.getField(9, 0);
592 ret = (TS)t;
593 } catch (ClassCastException cce) {
594 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
595 throw new RuntimeException(cce);
596 } catch (HL7Exception he) {
597 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
598 throw new RuntimeException(he);
599 }
600 return ret;
601 }
602
603
604
605 /**
606 * Returns
607 * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary
608 */
609 public NM getEstimatedLengthOfInpatientStay() {
610 NM ret = null;
611 try {
612 Type t = this.getField(10, 0);
613 ret = (NM)t;
614 } catch (ClassCastException cce) {
615 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
616 throw new RuntimeException(cce);
617 } catch (HL7Exception he) {
618 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
619 throw new RuntimeException(he);
620 }
621 return ret;
622 }
623
624
625 /**
626 * Returns
627 * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary
628 */
629 public NM getPv210_EstimatedLengthOfInpatientStay() {
630 NM ret = null;
631 try {
632 Type t = this.getField(10, 0);
633 ret = (NM)t;
634 } catch (ClassCastException cce) {
635 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
636 throw new RuntimeException(cce);
637 } catch (HL7Exception he) {
638 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
639 throw new RuntimeException(he);
640 }
641 return ret;
642 }
643
644
645
646 /**
647 * Returns
648 * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary
649 */
650 public NM getActualLengthOfInpatientStay() {
651 NM ret = null;
652 try {
653 Type t = this.getField(11, 0);
654 ret = (NM)t;
655 } catch (ClassCastException cce) {
656 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
657 throw new RuntimeException(cce);
658 } catch (HL7Exception he) {
659 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
660 throw new RuntimeException(he);
661 }
662 return ret;
663 }
664
665
666 /**
667 * Returns
668 * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary
669 */
670 public NM getPv211_ActualLengthOfInpatientStay() {
671 NM ret = null;
672 try {
673 Type t = this.getField(11, 0);
674 ret = (NM)t;
675 } catch (ClassCastException cce) {
676 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
677 throw new RuntimeException(cce);
678 } catch (HL7Exception he) {
679 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
680 throw new RuntimeException(he);
681 }
682 return ret;
683 }
684
685
686
687 /**
688 * Returns
689 * PV2-12: "Visit Description" - creates it if necessary
690 */
691 public ST getVisitDescription() {
692 ST ret = null;
693 try {
694 Type t = this.getField(12, 0);
695 ret = (ST)t;
696 } catch (ClassCastException cce) {
697 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
698 throw new RuntimeException(cce);
699 } catch (HL7Exception he) {
700 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
701 throw new RuntimeException(he);
702 }
703 return ret;
704 }
705
706
707 /**
708 * Returns
709 * PV2-12: "Visit Description" - creates it if necessary
710 */
711 public ST getPv212_VisitDescription() {
712 ST ret = null;
713 try {
714 Type t = this.getField(12, 0);
715 ret = (ST)t;
716 } catch (ClassCastException cce) {
717 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
718 throw new RuntimeException(cce);
719 } catch (HL7Exception he) {
720 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
721 throw new RuntimeException(he);
722 }
723 return ret;
724 }
725
726
727 /**
728 * Returns all repetitions of Referral Source Code (PV2-13).
729 */
730 public XCN[] getReferralSourceCode() {
731 XCN[] ret = null;
732 try {
733 Type[] t = this.getField(13);
734 ret = new XCN[t.length];
735 for (int i = 0; i < ret.length; i++) {
736 ret[i] = (XCN)t[i];
737 }
738 } catch (ClassCastException cce) {
739 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
740 throw new RuntimeException(cce);
741 } catch (HL7Exception he) {
742 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
743 throw new RuntimeException(he);
744 }
745 return ret;
746 }
747
748
749 /**
750 * Returns a count of the current number of repetitions of Referral Source Code (PV2-13).
751 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
752 * it will return zero.
753 */
754 public int getReferralSourceCodeReps() {
755 XCN[] ret = null;
756 try {
757 Type[] t = this.getField(13);
758 return t.length;
759 } catch (ClassCastException cce) {
760 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
761 throw new RuntimeException(cce);
762 } catch (HL7Exception he) {
763 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
764 throw new RuntimeException(he);
765 }
766 }
767
768
769 /**
770 * Returns a specific repetition of
771 * PV2-13: "Referral Source Code" - creates it if necessary
772 *
773 * @param rep The repetition index (0-indexed)
774 */
775 public XCN getReferralSourceCode(int rep) {
776 XCN ret = null;
777 try {
778 Type t = this.getField(13, rep);
779 ret = (XCN)t;
780 } catch (ClassCastException cce) {
781 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
782 throw new RuntimeException(cce);
783 } catch (HL7Exception he) {
784 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
785 throw new RuntimeException(he);
786 }
787 return ret;
788 }
789
790 /**
791 * Returns a specific repetition of
792 * PV2-13: "Referral Source Code" - creates it if necessary
793 *
794 * @param rep The repetition index (0-indexed)
795 */
796 public XCN getPv213_ReferralSourceCode(int rep) {
797 XCN ret = null;
798 try {
799 Type t = this.getField(13, rep);
800 ret = (XCN)t;
801 } catch (ClassCastException cce) {
802 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
803 throw new RuntimeException(cce);
804 } catch (HL7Exception he) {
805 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
806 throw new RuntimeException(he);
807 }
808 return ret;
809 }
810
811
812 /**
813 * Returns a count of the current number of repetitions of Referral Source Code (PV2-13).
814 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
815 * it will return zero.
816 */
817 public int getPv213_ReferralSourceCodeReps() {
818 XCN[] ret = null;
819 try {
820 Type[] t = this.getField(13);
821 return t.length;
822 } catch (ClassCastException cce) {
823 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
824 throw new RuntimeException(cce);
825 } catch (HL7Exception he) {
826 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
827 throw new RuntimeException(he);
828 }
829 }
830
831
832
833 /**
834 * Inserts a repetition of
835 * PV2-13: "Referral Source Code" at a specific index
836 *
837 * @param rep The repetition index (0-indexed)
838 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
839 */
840 public XCN insertReferralSourceCode(int rep) throws HL7Exception {
841 return (XCN) super.insertRepetition(13, rep);
842 }
843
844
845
846 /**
847 * Inserts a repetition of
848 * PV2-13: "Referral Source Code" at a specific index
849 *
850 * @param rep The repetition index (0-indexed)
851 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
852 */
853 public XCN insertPv213_ReferralSourceCode(int rep) throws HL7Exception {
854 return (XCN) super.insertRepetition(13, rep);
855 }
856
857
858 /**
859 * Removes a repetition of
860 * PV2-13: "Referral Source Code" at a specific index
861 *
862 * @param rep The repetition index (0-indexed)
863 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
864 */
865 public XCN removeReferralSourceCode(int rep) throws HL7Exception {
866 return (XCN) super.removeRepetition(13, rep);
867 }
868
869
870 /**
871 * Removes a repetition of
872 * PV2-13: "Referral Source Code" at a specific index
873 *
874 * @param rep The repetition index (0-indexed)
875 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
876 */
877 public XCN removePv213_ReferralSourceCode(int rep) throws HL7Exception {
878 return (XCN) super.removeRepetition(13, rep);
879 }
880
881
882
883
884 /**
885 * Returns
886 * PV2-14: "Previous Service Date" - creates it if necessary
887 */
888 public DT getPreviousServiceDate() {
889 DT ret = null;
890 try {
891 Type t = this.getField(14, 0);
892 ret = (DT)t;
893 } catch (ClassCastException cce) {
894 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
895 throw new RuntimeException(cce);
896 } catch (HL7Exception he) {
897 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
898 throw new RuntimeException(he);
899 }
900 return ret;
901 }
902
903
904 /**
905 * Returns
906 * PV2-14: "Previous Service Date" - creates it if necessary
907 */
908 public DT getPv214_PreviousServiceDate() {
909 DT ret = null;
910 try {
911 Type t = this.getField(14, 0);
912 ret = (DT)t;
913 } catch (ClassCastException cce) {
914 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
915 throw new RuntimeException(cce);
916 } catch (HL7Exception he) {
917 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
918 throw new RuntimeException(he);
919 }
920 return ret;
921 }
922
923
924
925 /**
926 * Returns
927 * PV2-15: "Employment Illness Related Indicator" - creates it if necessary
928 */
929 public ID getEmploymentIllnessRelatedIndicator() {
930 ID ret = null;
931 try {
932 Type t = this.getField(15, 0);
933 ret = (ID)t;
934 } catch (ClassCastException cce) {
935 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
936 throw new RuntimeException(cce);
937 } catch (HL7Exception he) {
938 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
939 throw new RuntimeException(he);
940 }
941 return ret;
942 }
943
944
945 /**
946 * Returns
947 * PV2-15: "Employment Illness Related Indicator" - creates it if necessary
948 */
949 public ID getPv215_EmploymentIllnessRelatedIndicator() {
950 ID ret = null;
951 try {
952 Type t = this.getField(15, 0);
953 ret = (ID)t;
954 } catch (ClassCastException cce) {
955 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
956 throw new RuntimeException(cce);
957 } catch (HL7Exception he) {
958 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
959 throw new RuntimeException(he);
960 }
961 return ret;
962 }
963
964
965
966 /**
967 * Returns
968 * PV2-16: "Purge Status Code" - creates it if necessary
969 */
970 public IS getPurgeStatusCode() {
971 IS ret = null;
972 try {
973 Type t = this.getField(16, 0);
974 ret = (IS)t;
975 } catch (ClassCastException cce) {
976 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
977 throw new RuntimeException(cce);
978 } catch (HL7Exception he) {
979 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
980 throw new RuntimeException(he);
981 }
982 return ret;
983 }
984
985
986 /**
987 * Returns
988 * PV2-16: "Purge Status Code" - creates it if necessary
989 */
990 public IS getPv216_PurgeStatusCode() {
991 IS ret = null;
992 try {
993 Type t = this.getField(16, 0);
994 ret = (IS)t;
995 } catch (ClassCastException cce) {
996 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
997 throw new RuntimeException(cce);
998 } catch (HL7Exception he) {
999 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1000 throw new RuntimeException(he);
1001 }
1002 return ret;
1003 }
1004
1005
1006
1007 /**
1008 * Returns
1009 * PV2-17: "Purge Status Date" - creates it if necessary
1010 */
1011 public DT getPurgeStatusDate() {
1012 DT ret = null;
1013 try {
1014 Type t = this.getField(17, 0);
1015 ret = (DT)t;
1016 } catch (ClassCastException cce) {
1017 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1018 throw new RuntimeException(cce);
1019 } catch (HL7Exception he) {
1020 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1021 throw new RuntimeException(he);
1022 }
1023 return ret;
1024 }
1025
1026
1027 /**
1028 * Returns
1029 * PV2-17: "Purge Status Date" - creates it if necessary
1030 */
1031 public DT getPv217_PurgeStatusDate() {
1032 DT ret = null;
1033 try {
1034 Type t = this.getField(17, 0);
1035 ret = (DT)t;
1036 } catch (ClassCastException cce) {
1037 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1038 throw new RuntimeException(cce);
1039 } catch (HL7Exception he) {
1040 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1041 throw new RuntimeException(he);
1042 }
1043 return ret;
1044 }
1045
1046
1047
1048 /**
1049 * Returns
1050 * PV2-18: "Special Program Code" - creates it if necessary
1051 */
1052 public IS getSpecialProgramCode() {
1053 IS ret = null;
1054 try {
1055 Type t = this.getField(18, 0);
1056 ret = (IS)t;
1057 } catch (ClassCastException cce) {
1058 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1059 throw new RuntimeException(cce);
1060 } catch (HL7Exception he) {
1061 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1062 throw new RuntimeException(he);
1063 }
1064 return ret;
1065 }
1066
1067
1068 /**
1069 * Returns
1070 * PV2-18: "Special Program Code" - creates it if necessary
1071 */
1072 public IS getPv218_SpecialProgramCode() {
1073 IS ret = null;
1074 try {
1075 Type t = this.getField(18, 0);
1076 ret = (IS)t;
1077 } catch (ClassCastException cce) {
1078 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1079 throw new RuntimeException(cce);
1080 } catch (HL7Exception he) {
1081 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1082 throw new RuntimeException(he);
1083 }
1084 return ret;
1085 }
1086
1087
1088
1089 /**
1090 * Returns
1091 * PV2-19: "Retention Indicator" - creates it if necessary
1092 */
1093 public ID getRetentionIndicator() {
1094 ID ret = null;
1095 try {
1096 Type t = this.getField(19, 0);
1097 ret = (ID)t;
1098 } catch (ClassCastException cce) {
1099 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1100 throw new RuntimeException(cce);
1101 } catch (HL7Exception he) {
1102 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1103 throw new RuntimeException(he);
1104 }
1105 return ret;
1106 }
1107
1108
1109 /**
1110 * Returns
1111 * PV2-19: "Retention Indicator" - creates it if necessary
1112 */
1113 public ID getPv219_RetentionIndicator() {
1114 ID ret = null;
1115 try {
1116 Type t = this.getField(19, 0);
1117 ret = (ID)t;
1118 } catch (ClassCastException cce) {
1119 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1120 throw new RuntimeException(cce);
1121 } catch (HL7Exception he) {
1122 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1123 throw new RuntimeException(he);
1124 }
1125 return ret;
1126 }
1127
1128
1129
1130 /**
1131 * Returns
1132 * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary
1133 */
1134 public NM getExpectedNumberOfInsurancePlans() {
1135 NM ret = null;
1136 try {
1137 Type t = this.getField(20, 0);
1138 ret = (NM)t;
1139 } catch (ClassCastException cce) {
1140 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1141 throw new RuntimeException(cce);
1142 } catch (HL7Exception he) {
1143 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1144 throw new RuntimeException(he);
1145 }
1146 return ret;
1147 }
1148
1149
1150 /**
1151 * Returns
1152 * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary
1153 */
1154 public NM getPv220_ExpectedNumberOfInsurancePlans() {
1155 NM ret = null;
1156 try {
1157 Type t = this.getField(20, 0);
1158 ret = (NM)t;
1159 } catch (ClassCastException cce) {
1160 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1161 throw new RuntimeException(cce);
1162 } catch (HL7Exception he) {
1163 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1164 throw new RuntimeException(he);
1165 }
1166 return ret;
1167 }
1168
1169
1170
1171 /**
1172 * Returns
1173 * PV2-21: "Visit Publicity Code" - creates it if necessary
1174 */
1175 public IS getVisitPublicityCode() {
1176 IS ret = null;
1177 try {
1178 Type t = this.getField(21, 0);
1179 ret = (IS)t;
1180 } catch (ClassCastException cce) {
1181 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1182 throw new RuntimeException(cce);
1183 } catch (HL7Exception he) {
1184 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1185 throw new RuntimeException(he);
1186 }
1187 return ret;
1188 }
1189
1190
1191 /**
1192 * Returns
1193 * PV2-21: "Visit Publicity Code" - creates it if necessary
1194 */
1195 public IS getPv221_VisitPublicityCode() {
1196 IS ret = null;
1197 try {
1198 Type t = this.getField(21, 0);
1199 ret = (IS)t;
1200 } catch (ClassCastException cce) {
1201 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1202 throw new RuntimeException(cce);
1203 } catch (HL7Exception he) {
1204 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1205 throw new RuntimeException(he);
1206 }
1207 return ret;
1208 }
1209
1210
1211
1212 /**
1213 * Returns
1214 * PV2-22: "Visit Protection Indicator" - creates it if necessary
1215 */
1216 public ID getVisitProtectionIndicator() {
1217 ID ret = null;
1218 try {
1219 Type t = this.getField(22, 0);
1220 ret = (ID)t;
1221 } catch (ClassCastException cce) {
1222 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1223 throw new RuntimeException(cce);
1224 } catch (HL7Exception he) {
1225 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1226 throw new RuntimeException(he);
1227 }
1228 return ret;
1229 }
1230
1231
1232 /**
1233 * Returns
1234 * PV2-22: "Visit Protection Indicator" - creates it if necessary
1235 */
1236 public ID getPv222_VisitProtectionIndicator() {
1237 ID ret = null;
1238 try {
1239 Type t = this.getField(22, 0);
1240 ret = (ID)t;
1241 } catch (ClassCastException cce) {
1242 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1243 throw new RuntimeException(cce);
1244 } catch (HL7Exception he) {
1245 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1246 throw new RuntimeException(he);
1247 }
1248 return ret;
1249 }
1250
1251
1252 /**
1253 * Returns all repetitions of Clinic Organization Name (PV2-23).
1254 */
1255 public XON[] getClinicOrganizationName() {
1256 XON[] ret = null;
1257 try {
1258 Type[] t = this.getField(23);
1259 ret = new XON[t.length];
1260 for (int i = 0; i < ret.length; i++) {
1261 ret[i] = (XON)t[i];
1262 }
1263 } catch (ClassCastException cce) {
1264 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1265 throw new RuntimeException(cce);
1266 } catch (HL7Exception he) {
1267 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1268 throw new RuntimeException(he);
1269 }
1270 return ret;
1271 }
1272
1273
1274 /**
1275 * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23).
1276 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1277 * it will return zero.
1278 */
1279 public int getClinicOrganizationNameReps() {
1280 XON[] ret = null;
1281 try {
1282 Type[] t = this.getField(23);
1283 return t.length;
1284 } catch (ClassCastException cce) {
1285 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1286 throw new RuntimeException(cce);
1287 } catch (HL7Exception he) {
1288 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1289 throw new RuntimeException(he);
1290 }
1291 }
1292
1293
1294 /**
1295 * Returns a specific repetition of
1296 * PV2-23: "Clinic Organization Name" - creates it if necessary
1297 *
1298 * @param rep The repetition index (0-indexed)
1299 */
1300 public XON getClinicOrganizationName(int rep) {
1301 XON ret = null;
1302 try {
1303 Type t = this.getField(23, rep);
1304 ret = (XON)t;
1305 } catch (ClassCastException cce) {
1306 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1307 throw new RuntimeException(cce);
1308 } catch (HL7Exception he) {
1309 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1310 throw new RuntimeException(he);
1311 }
1312 return ret;
1313 }
1314
1315 /**
1316 * Returns a specific repetition of
1317 * PV2-23: "Clinic Organization Name" - creates it if necessary
1318 *
1319 * @param rep The repetition index (0-indexed)
1320 */
1321 public XON getPv223_ClinicOrganizationName(int rep) {
1322 XON ret = null;
1323 try {
1324 Type t = this.getField(23, rep);
1325 ret = (XON)t;
1326 } catch (ClassCastException cce) {
1327 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1328 throw new RuntimeException(cce);
1329 } catch (HL7Exception he) {
1330 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1331 throw new RuntimeException(he);
1332 }
1333 return ret;
1334 }
1335
1336
1337 /**
1338 * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23).
1339 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1340 * it will return zero.
1341 */
1342 public int getPv223_ClinicOrganizationNameReps() {
1343 XON[] ret = null;
1344 try {
1345 Type[] t = this.getField(23);
1346 return t.length;
1347 } catch (ClassCastException cce) {
1348 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1349 throw new RuntimeException(cce);
1350 } catch (HL7Exception he) {
1351 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1352 throw new RuntimeException(he);
1353 }
1354 }
1355
1356
1357
1358 /**
1359 * Inserts a repetition of
1360 * PV2-23: "Clinic Organization Name" at a specific index
1361 *
1362 * @param rep The repetition index (0-indexed)
1363 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1364 */
1365 public XON insertClinicOrganizationName(int rep) throws HL7Exception {
1366 return (XON) super.insertRepetition(23, rep);
1367 }
1368
1369
1370
1371 /**
1372 * Inserts a repetition of
1373 * PV2-23: "Clinic Organization Name" at a specific index
1374 *
1375 * @param rep The repetition index (0-indexed)
1376 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1377 */
1378 public XON insertPv223_ClinicOrganizationName(int rep) throws HL7Exception {
1379 return (XON) super.insertRepetition(23, rep);
1380 }
1381
1382
1383 /**
1384 * Removes a repetition of
1385 * PV2-23: "Clinic Organization Name" at a specific index
1386 *
1387 * @param rep The repetition index (0-indexed)
1388 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1389 */
1390 public XON removeClinicOrganizationName(int rep) throws HL7Exception {
1391 return (XON) super.removeRepetition(23, rep);
1392 }
1393
1394
1395 /**
1396 * Removes a repetition of
1397 * PV2-23: "Clinic Organization Name" at a specific index
1398 *
1399 * @param rep The repetition index (0-indexed)
1400 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1401 */
1402 public XON removePv223_ClinicOrganizationName(int rep) throws HL7Exception {
1403 return (XON) super.removeRepetition(23, rep);
1404 }
1405
1406
1407
1408
1409 /**
1410 * Returns
1411 * PV2-24: "Patient Status Code" - creates it if necessary
1412 */
1413 public IS getPatientStatusCode() {
1414 IS ret = null;
1415 try {
1416 Type t = this.getField(24, 0);
1417 ret = (IS)t;
1418 } catch (ClassCastException cce) {
1419 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1420 throw new RuntimeException(cce);
1421 } catch (HL7Exception he) {
1422 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1423 throw new RuntimeException(he);
1424 }
1425 return ret;
1426 }
1427
1428
1429 /**
1430 * Returns
1431 * PV2-24: "Patient Status Code" - creates it if necessary
1432 */
1433 public IS getPv224_PatientStatusCode() {
1434 IS ret = null;
1435 try {
1436 Type t = this.getField(24, 0);
1437 ret = (IS)t;
1438 } catch (ClassCastException cce) {
1439 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1440 throw new RuntimeException(cce);
1441 } catch (HL7Exception he) {
1442 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1443 throw new RuntimeException(he);
1444 }
1445 return ret;
1446 }
1447
1448
1449
1450 /**
1451 * Returns
1452 * PV2-25: "Visit Priority Code" - creates it if necessary
1453 */
1454 public IS getVisitPriorityCode() {
1455 IS ret = null;
1456 try {
1457 Type t = this.getField(25, 0);
1458 ret = (IS)t;
1459 } catch (ClassCastException cce) {
1460 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1461 throw new RuntimeException(cce);
1462 } catch (HL7Exception he) {
1463 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1464 throw new RuntimeException(he);
1465 }
1466 return ret;
1467 }
1468
1469
1470 /**
1471 * Returns
1472 * PV2-25: "Visit Priority Code" - creates it if necessary
1473 */
1474 public IS getPv225_VisitPriorityCode() {
1475 IS ret = null;
1476 try {
1477 Type t = this.getField(25, 0);
1478 ret = (IS)t;
1479 } catch (ClassCastException cce) {
1480 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1481 throw new RuntimeException(cce);
1482 } catch (HL7Exception he) {
1483 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1484 throw new RuntimeException(he);
1485 }
1486 return ret;
1487 }
1488
1489
1490
1491 /**
1492 * Returns
1493 * PV2-26: "Previous Treatment Date" - creates it if necessary
1494 */
1495 public DT getPreviousTreatmentDate() {
1496 DT ret = null;
1497 try {
1498 Type t = this.getField(26, 0);
1499 ret = (DT)t;
1500 } catch (ClassCastException cce) {
1501 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1502 throw new RuntimeException(cce);
1503 } catch (HL7Exception he) {
1504 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1505 throw new RuntimeException(he);
1506 }
1507 return ret;
1508 }
1509
1510
1511 /**
1512 * Returns
1513 * PV2-26: "Previous Treatment Date" - creates it if necessary
1514 */
1515 public DT getPv226_PreviousTreatmentDate() {
1516 DT ret = null;
1517 try {
1518 Type t = this.getField(26, 0);
1519 ret = (DT)t;
1520 } catch (ClassCastException cce) {
1521 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1522 throw new RuntimeException(cce);
1523 } catch (HL7Exception he) {
1524 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1525 throw new RuntimeException(he);
1526 }
1527 return ret;
1528 }
1529
1530
1531
1532 /**
1533 * Returns
1534 * PV2-27: "Expected Discharge Disposition" - creates it if necessary
1535 */
1536 public IS getExpectedDischargeDisposition() {
1537 IS ret = null;
1538 try {
1539 Type t = this.getField(27, 0);
1540 ret = (IS)t;
1541 } catch (ClassCastException cce) {
1542 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1543 throw new RuntimeException(cce);
1544 } catch (HL7Exception he) {
1545 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1546 throw new RuntimeException(he);
1547 }
1548 return ret;
1549 }
1550
1551
1552 /**
1553 * Returns
1554 * PV2-27: "Expected Discharge Disposition" - creates it if necessary
1555 */
1556 public IS getPv227_ExpectedDischargeDisposition() {
1557 IS ret = null;
1558 try {
1559 Type t = this.getField(27, 0);
1560 ret = (IS)t;
1561 } catch (ClassCastException cce) {
1562 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1563 throw new RuntimeException(cce);
1564 } catch (HL7Exception he) {
1565 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1566 throw new RuntimeException(he);
1567 }
1568 return ret;
1569 }
1570
1571
1572
1573 /**
1574 * Returns
1575 * PV2-28: "Signature on File Date" - creates it if necessary
1576 */
1577 public DT getSignatureOnFileDate() {
1578 DT ret = null;
1579 try {
1580 Type t = this.getField(28, 0);
1581 ret = (DT)t;
1582 } catch (ClassCastException cce) {
1583 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1584 throw new RuntimeException(cce);
1585 } catch (HL7Exception he) {
1586 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1587 throw new RuntimeException(he);
1588 }
1589 return ret;
1590 }
1591
1592
1593 /**
1594 * Returns
1595 * PV2-28: "Signature on File Date" - creates it if necessary
1596 */
1597 public DT getPv228_SignatureOnFileDate() {
1598 DT ret = null;
1599 try {
1600 Type t = this.getField(28, 0);
1601 ret = (DT)t;
1602 } catch (ClassCastException cce) {
1603 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1604 throw new RuntimeException(cce);
1605 } catch (HL7Exception he) {
1606 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1607 throw new RuntimeException(he);
1608 }
1609 return ret;
1610 }
1611
1612
1613
1614 /**
1615 * Returns
1616 * PV2-29: "First Similar Illness Date" - creates it if necessary
1617 */
1618 public DT getFirstSimilarIllnessDate() {
1619 DT ret = null;
1620 try {
1621 Type t = this.getField(29, 0);
1622 ret = (DT)t;
1623 } catch (ClassCastException cce) {
1624 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1625 throw new RuntimeException(cce);
1626 } catch (HL7Exception he) {
1627 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1628 throw new RuntimeException(he);
1629 }
1630 return ret;
1631 }
1632
1633
1634 /**
1635 * Returns
1636 * PV2-29: "First Similar Illness Date" - creates it if necessary
1637 */
1638 public DT getPv229_FirstSimilarIllnessDate() {
1639 DT ret = null;
1640 try {
1641 Type t = this.getField(29, 0);
1642 ret = (DT)t;
1643 } catch (ClassCastException cce) {
1644 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1645 throw new RuntimeException(cce);
1646 } catch (HL7Exception he) {
1647 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1648 throw new RuntimeException(he);
1649 }
1650 return ret;
1651 }
1652
1653
1654
1655 /**
1656 * Returns
1657 * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary
1658 */
1659 public CE getPatientChargeAdjustmentCode() {
1660 CE ret = null;
1661 try {
1662 Type t = this.getField(30, 0);
1663 ret = (CE)t;
1664 } catch (ClassCastException cce) {
1665 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1666 throw new RuntimeException(cce);
1667 } catch (HL7Exception he) {
1668 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1669 throw new RuntimeException(he);
1670 }
1671 return ret;
1672 }
1673
1674
1675 /**
1676 * Returns
1677 * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary
1678 */
1679 public CE getPv230_PatientChargeAdjustmentCode() {
1680 CE ret = null;
1681 try {
1682 Type t = this.getField(30, 0);
1683 ret = (CE)t;
1684 } catch (ClassCastException cce) {
1685 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1686 throw new RuntimeException(cce);
1687 } catch (HL7Exception he) {
1688 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1689 throw new RuntimeException(he);
1690 }
1691 return ret;
1692 }
1693
1694
1695
1696 /**
1697 * Returns
1698 * PV2-31: "Recurring Service Code" - creates it if necessary
1699 */
1700 public IS getRecurringServiceCode() {
1701 IS ret = null;
1702 try {
1703 Type t = this.getField(31, 0);
1704 ret = (IS)t;
1705 } catch (ClassCastException cce) {
1706 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1707 throw new RuntimeException(cce);
1708 } catch (HL7Exception he) {
1709 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1710 throw new RuntimeException(he);
1711 }
1712 return ret;
1713 }
1714
1715
1716 /**
1717 * Returns
1718 * PV2-31: "Recurring Service Code" - creates it if necessary
1719 */
1720 public IS getPv231_RecurringServiceCode() {
1721 IS ret = null;
1722 try {
1723 Type t = this.getField(31, 0);
1724 ret = (IS)t;
1725 } catch (ClassCastException cce) {
1726 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1727 throw new RuntimeException(cce);
1728 } catch (HL7Exception he) {
1729 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1730 throw new RuntimeException(he);
1731 }
1732 return ret;
1733 }
1734
1735
1736
1737 /**
1738 * Returns
1739 * PV2-32: "Billing Media Code" - creates it if necessary
1740 */
1741 public ID getBillingMediaCode() {
1742 ID ret = null;
1743 try {
1744 Type t = this.getField(32, 0);
1745 ret = (ID)t;
1746 } catch (ClassCastException cce) {
1747 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1748 throw new RuntimeException(cce);
1749 } catch (HL7Exception he) {
1750 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1751 throw new RuntimeException(he);
1752 }
1753 return ret;
1754 }
1755
1756
1757 /**
1758 * Returns
1759 * PV2-32: "Billing Media Code" - creates it if necessary
1760 */
1761 public ID getPv232_BillingMediaCode() {
1762 ID ret = null;
1763 try {
1764 Type t = this.getField(32, 0);
1765 ret = (ID)t;
1766 } catch (ClassCastException cce) {
1767 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1768 throw new RuntimeException(cce);
1769 } catch (HL7Exception he) {
1770 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1771 throw new RuntimeException(he);
1772 }
1773 return ret;
1774 }
1775
1776
1777
1778 /**
1779 * Returns
1780 * PV2-33: "Expected Surgery Date & Time" - creates it if necessary
1781 */
1782 public TS getExpectedSurgeryDateTime() {
1783 TS ret = null;
1784 try {
1785 Type t = this.getField(33, 0);
1786 ret = (TS)t;
1787 } catch (ClassCastException cce) {
1788 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1789 throw new RuntimeException(cce);
1790 } catch (HL7Exception he) {
1791 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1792 throw new RuntimeException(he);
1793 }
1794 return ret;
1795 }
1796
1797
1798 /**
1799 * Returns
1800 * PV2-33: "Expected Surgery Date & Time" - creates it if necessary
1801 */
1802 public TS getPv233_ExpectedSurgeryDateTime() {
1803 TS ret = null;
1804 try {
1805 Type t = this.getField(33, 0);
1806 ret = (TS)t;
1807 } catch (ClassCastException cce) {
1808 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1809 throw new RuntimeException(cce);
1810 } catch (HL7Exception he) {
1811 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1812 throw new RuntimeException(he);
1813 }
1814 return ret;
1815 }
1816
1817
1818
1819 /**
1820 * Returns
1821 * PV2-34: "Military Partnership Code" - creates it if necessary
1822 */
1823 public ID getMilitaryPartnershipCode() {
1824 ID ret = null;
1825 try {
1826 Type t = this.getField(34, 0);
1827 ret = (ID)t;
1828 } catch (ClassCastException cce) {
1829 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1830 throw new RuntimeException(cce);
1831 } catch (HL7Exception he) {
1832 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1833 throw new RuntimeException(he);
1834 }
1835 return ret;
1836 }
1837
1838
1839 /**
1840 * Returns
1841 * PV2-34: "Military Partnership Code" - creates it if necessary
1842 */
1843 public ID getPv234_MilitaryPartnershipCode() {
1844 ID ret = null;
1845 try {
1846 Type t = this.getField(34, 0);
1847 ret = (ID)t;
1848 } catch (ClassCastException cce) {
1849 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1850 throw new RuntimeException(cce);
1851 } catch (HL7Exception he) {
1852 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1853 throw new RuntimeException(he);
1854 }
1855 return ret;
1856 }
1857
1858
1859
1860 /**
1861 * Returns
1862 * PV2-35: "Military Non-Availability Code" - creates it if necessary
1863 */
1864 public ID getMilitaryNonAvailabilityCode() {
1865 ID ret = null;
1866 try {
1867 Type t = this.getField(35, 0);
1868 ret = (ID)t;
1869 } catch (ClassCastException cce) {
1870 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1871 throw new RuntimeException(cce);
1872 } catch (HL7Exception he) {
1873 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1874 throw new RuntimeException(he);
1875 }
1876 return ret;
1877 }
1878
1879
1880 /**
1881 * Returns
1882 * PV2-35: "Military Non-Availability Code" - creates it if necessary
1883 */
1884 public ID getPv235_MilitaryNonAvailabilityCode() {
1885 ID ret = null;
1886 try {
1887 Type t = this.getField(35, 0);
1888 ret = (ID)t;
1889 } catch (ClassCastException cce) {
1890 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1891 throw new RuntimeException(cce);
1892 } catch (HL7Exception he) {
1893 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1894 throw new RuntimeException(he);
1895 }
1896 return ret;
1897 }
1898
1899
1900
1901 /**
1902 * Returns
1903 * PV2-36: "Newborn Baby Indicator" - creates it if necessary
1904 */
1905 public ID getNewbornBabyIndicator() {
1906 ID ret = null;
1907 try {
1908 Type t = this.getField(36, 0);
1909 ret = (ID)t;
1910 } catch (ClassCastException cce) {
1911 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1912 throw new RuntimeException(cce);
1913 } catch (HL7Exception he) {
1914 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1915 throw new RuntimeException(he);
1916 }
1917 return ret;
1918 }
1919
1920
1921 /**
1922 * Returns
1923 * PV2-36: "Newborn Baby Indicator" - creates it if necessary
1924 */
1925 public ID getPv236_NewbornBabyIndicator() {
1926 ID ret = null;
1927 try {
1928 Type t = this.getField(36, 0);
1929 ret = (ID)t;
1930 } catch (ClassCastException cce) {
1931 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1932 throw new RuntimeException(cce);
1933 } catch (HL7Exception he) {
1934 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1935 throw new RuntimeException(he);
1936 }
1937 return ret;
1938 }
1939
1940
1941
1942 /**
1943 * Returns
1944 * PV2-37: "Baby Detained Indicator" - creates it if necessary
1945 */
1946 public ID getBabyDetainedIndicator() {
1947 ID ret = null;
1948 try {
1949 Type t = this.getField(37, 0);
1950 ret = (ID)t;
1951 } catch (ClassCastException cce) {
1952 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1953 throw new RuntimeException(cce);
1954 } catch (HL7Exception he) {
1955 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1956 throw new RuntimeException(he);
1957 }
1958 return ret;
1959 }
1960
1961
1962 /**
1963 * Returns
1964 * PV2-37: "Baby Detained Indicator" - creates it if necessary
1965 */
1966 public ID getPv237_BabyDetainedIndicator() {
1967 ID ret = null;
1968 try {
1969 Type t = this.getField(37, 0);
1970 ret = (ID)t;
1971 } catch (ClassCastException cce) {
1972 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1973 throw new RuntimeException(cce);
1974 } catch (HL7Exception he) {
1975 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1976 throw new RuntimeException(he);
1977 }
1978 return ret;
1979 }
1980
1981
1982
1983
1984
1985 /** {@inheritDoc} */
1986 protected Type createNewTypeWithoutReflection(int field) {
1987 switch (field) {
1988 case 0: return new PL(getMessage());
1989 case 1: return new CE(getMessage());
1990 case 2: return new CE(getMessage());
1991 case 3: return new CE(getMessage());
1992 case 4: return new ST(getMessage());
1993 case 5: return new ST(getMessage());
1994 case 6: return new IS(getMessage(), new Integer( 130 ));
1995 case 7: return new TS(getMessage());
1996 case 8: return new TS(getMessage());
1997 case 9: return new NM(getMessage());
1998 case 10: return new NM(getMessage());
1999 case 11: return new ST(getMessage());
2000 case 12: return new XCN(getMessage());
2001 case 13: return new DT(getMessage());
2002 case 14: return new ID(getMessage(), new Integer( 136 ));
2003 case 15: return new IS(getMessage(), new Integer( 213 ));
2004 case 16: return new DT(getMessage());
2005 case 17: return new IS(getMessage(), new Integer( 214 ));
2006 case 18: return new ID(getMessage(), new Integer( 136 ));
2007 case 19: return new NM(getMessage());
2008 case 20: return new IS(getMessage(), new Integer( 215 ));
2009 case 21: return new ID(getMessage(), new Integer( 136 ));
2010 case 22: return new XON(getMessage());
2011 case 23: return new IS(getMessage(), new Integer( 216 ));
2012 case 24: return new IS(getMessage(), new Integer( 217 ));
2013 case 25: return new DT(getMessage());
2014 case 26: return new IS(getMessage(), new Integer( 112 ));
2015 case 27: return new DT(getMessage());
2016 case 28: return new DT(getMessage());
2017 case 29: return new CE(getMessage());
2018 case 30: return new IS(getMessage(), new Integer( 219 ));
2019 case 31: return new ID(getMessage(), new Integer( 136 ));
2020 case 32: return new TS(getMessage());
2021 case 33: return new ID(getMessage(), new Integer( 136 ));
2022 case 34: return new ID(getMessage(), new Integer( 136 ));
2023 case 35: return new ID(getMessage(), new Integer( 136 ));
2024 case 36: return new ID(getMessage(), new Integer( 136 ));
2025 default: return null;
2026 }
2027 }
2028
2029
2030 }
2031