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 STF message segment (STF - staff identification segment).
024 * This segment has the following fields:</p>
025 * <ul>
026 * <li>STF-1: Primary Key Value - STF (CE) <b> </b>
027 * <li>STF-2: Staff ID Code (CX) <b>optional repeating</b>
028 * <li>STF-3: Staff Name (XPN) <b>optional repeating</b>
029 * <li>STF-4: Staff Type (IS) <b>optional repeating</b>
030 * <li>STF-5: Sex (IS) <b>optional </b>
031 * <li>STF-6: Date/Time Of Birth (TS) <b>optional </b>
032 * <li>STF-7: Active/Inactive Flag (ID) <b>optional </b>
033 * <li>STF-8: Department (CE) <b>optional repeating</b>
034 * <li>STF-9: Hospital Service (CE) <b>optional repeating</b>
035 * <li>STF-10: Phone (XTN) <b>optional repeating</b>
036 * <li>STF-11: Office/Home Address (XAD) <b>optional repeating</b>
037 * <li>STF-12: Institution Activation Date (DIN) <b>optional repeating</b>
038 * <li>STF-13: Institution Inactivation Date (DIN) <b>optional repeating</b>
039 * <li>STF-14: Backup Person ID (CE) <b>optional repeating</b>
040 * <li>STF-15: E-Mail Address (ST) <b>optional repeating</b>
041 * <li>STF-16: Preferred Method Of Contact (CE) <b>optional </b>
042 * <li>STF-17: Marital Status (CE) <b>optional </b>
043 * <li>STF-18: Job Title (ST) <b>optional </b>
044 * <li>STF-19: Job Code/Class (JCC) <b>optional </b>
045 * <li>STF-20: Employment Status (IS) <b>optional </b>
046 * <li>STF-21: Additional Insured on Auto (ID) <b>optional </b>
047 * <li>STF-22: Driver’s License Number - Staff (DLN) <b>optional </b>
048 * <li>STF-23: Copy Auto Ins (ID) <b>optional </b>
049 * <li>STF-24: Auto Ins. Expires (DT) <b>optional </b>
050 * <li>STF-25: Date Last DMV Review (DT) <b>optional </b>
051 * <li>STF-26: Date Next DMV Review (DT) <b>optional </b>
052 * </ul>
053 */
054 public class STF extends AbstractSegment {
055
056 /**
057 * Creates a new STF segment
058 */
059 public STF(Group parent, ModelClassFactory factory) {
060 super(parent, factory);
061 init(factory);
062 }
063
064 private void init(ModelClassFactory factory) {
065 try {
066 this.add(CE.class, true, 1, 60, new Object[]{ getMessage(), new Integer(0) }, "Primary Key Value - STF");
067 this.add(CX.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Staff ID Code");
068 this.add(XPN.class, false, 0, 48, new Object[]{ getMessage(), new Integer(0) }, "Staff Name");
069 this.add(IS.class, false, 0, 2, new Object[]{ getMessage() }, "Staff Type");
070 this.add(IS.class, false, 1, 1, new Object[]{ getMessage() }, "Sex");
071 this.add(TS.class, false, 1, 26, new Object[]{ getMessage(), new Integer(0) }, "Date/Time Of Birth");
072 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Active/Inactive Flag");
073 this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(184) }, "Department");
074 this.add(CE.class, false, 0, 200, new Object[]{ getMessage(), new Integer(69) }, "Hospital Service");
075 this.add(XTN.class, false, 0, 40, new Object[]{ getMessage(), new Integer(0) }, "Phone");
076 this.add(XAD.class, false, 0, 106, new Object[]{ getMessage(), new Integer(0) }, "Office/Home Address");
077 this.add(DIN.class, false, 0, 26, new Object[]{ getMessage(), new Integer(0) }, "Institution Activation Date");
078 this.add(DIN.class, false, 0, 26, new Object[]{ getMessage(), new Integer(0) }, "Institution Inactivation Date");
079 this.add(CE.class, false, 0, 60, new Object[]{ getMessage(), new Integer(0) }, "Backup Person ID");
080 this.add(ST.class, false, 0, 40, new Object[]{ getMessage(), new Integer(0) }, "E-Mail Address");
081 this.add(CE.class, false, 1, 200, new Object[]{ getMessage(), new Integer(185) }, "Preferred Method Of Contact");
082 this.add(CE.class, false, 1, 80, new Object[]{ getMessage(), new Integer(2) }, "Marital Status");
083 this.add(ST.class, false, 1, 20, new Object[]{ getMessage(), new Integer(0) }, "Job Title");
084 this.add(JCC.class, false, 1, 20, new Object[]{ getMessage(), new Integer(327) }, "Job Code/Class");
085 this.add(IS.class, false, 1, 2, new Object[]{ getMessage() }, "Employment Status");
086 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Additional Insured on Auto");
087 this.add(DLN.class, false, 1, 25, new Object[]{ getMessage(), new Integer(0) }, "Driver’s License Number - Staff");
088 this.add(ID.class, false, 1, 1, new Object[]{ getMessage() }, "Copy Auto Ins");
089 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Auto Ins. Expires");
090 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Date Last DMV Review");
091 this.add(DT.class, false, 1, 8, new Object[]{ getMessage(), new Integer(0) }, "Date Next DMV Review");
092 } catch(HL7Exception e) {
093 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating STF - this is probably a bug in the source code generator.", e);
094 }
095 }
096
097
098
099 /**
100 * Returns
101 * STF-1: "Primary Key Value - STF" - creates it if necessary
102 */
103 public CE getPrimaryKeyValueSTF() {
104 CE ret = null;
105 try {
106 Type t = this.getField(1, 0);
107 ret = (CE)t;
108 } catch (ClassCastException cce) {
109 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
110 throw new RuntimeException(cce);
111 } catch (HL7Exception he) {
112 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
113 throw new RuntimeException(he);
114 }
115 return ret;
116 }
117
118
119 /**
120 * Returns
121 * STF-1: "Primary Key Value - STF" - creates it if necessary
122 */
123 public CE getStf1_PrimaryKeyValueSTF() {
124 CE ret = null;
125 try {
126 Type t = this.getField(1, 0);
127 ret = (CE)t;
128 } catch (ClassCastException cce) {
129 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
130 throw new RuntimeException(cce);
131 } catch (HL7Exception he) {
132 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
133 throw new RuntimeException(he);
134 }
135 return ret;
136 }
137
138
139 /**
140 * Returns all repetitions of Staff ID Code (STF-2).
141 */
142 public CX[] getStaffIDCode() {
143 CX[] ret = null;
144 try {
145 Type[] t = this.getField(2);
146 ret = new CX[t.length];
147 for (int i = 0; i < ret.length; i++) {
148 ret[i] = (CX)t[i];
149 }
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 * Returns a count of the current number of repetitions of Staff ID Code (STF-2).
163 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
164 * it will return zero.
165 */
166 public int getStaffIDCodeReps() {
167 CX[] ret = null;
168 try {
169 Type[] t = this.getField(2);
170 return t.length;
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 }
179
180
181 /**
182 * Returns a specific repetition of
183 * STF-2: "Staff ID Code" - creates it if necessary
184 *
185 * @param rep The repetition index (0-indexed)
186 */
187 public CX getStaffIDCode(int rep) {
188 CX ret = null;
189 try {
190 Type t = this.getField(2, rep);
191 ret = (CX)t;
192 } catch (ClassCastException cce) {
193 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
194 throw new RuntimeException(cce);
195 } catch (HL7Exception he) {
196 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
197 throw new RuntimeException(he);
198 }
199 return ret;
200 }
201
202 /**
203 * Returns a specific repetition of
204 * STF-2: "Staff ID Code" - creates it if necessary
205 *
206 * @param rep The repetition index (0-indexed)
207 */
208 public CX getStf2_StaffIDCode(int rep) {
209 CX ret = null;
210 try {
211 Type t = this.getField(2, rep);
212 ret = (CX)t;
213 } catch (ClassCastException cce) {
214 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
215 throw new RuntimeException(cce);
216 } catch (HL7Exception he) {
217 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
218 throw new RuntimeException(he);
219 }
220 return ret;
221 }
222
223
224 /**
225 * Returns a count of the current number of repetitions of Staff ID Code (STF-2).
226 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
227 * it will return zero.
228 */
229 public int getStf2_StaffIDCodeReps() {
230 CX[] ret = null;
231 try {
232 Type[] t = this.getField(2);
233 return t.length;
234 } catch (ClassCastException cce) {
235 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
236 throw new RuntimeException(cce);
237 } catch (HL7Exception he) {
238 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
239 throw new RuntimeException(he);
240 }
241 }
242
243
244
245 /**
246 * Inserts a repetition of
247 * STF-2: "Staff ID Code" at a specific index
248 *
249 * @param rep The repetition index (0-indexed)
250 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
251 */
252 public CX insertStaffIDCode(int rep) throws HL7Exception {
253 return (CX) super.insertRepetition(2, rep);
254 }
255
256
257
258 /**
259 * Inserts a repetition of
260 * STF-2: "Staff ID Code" at a specific index
261 *
262 * @param rep The repetition index (0-indexed)
263 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
264 */
265 public CX insertStf2_StaffIDCode(int rep) throws HL7Exception {
266 return (CX) super.insertRepetition(2, rep);
267 }
268
269
270 /**
271 * Removes a repetition of
272 * STF-2: "Staff ID Code" at a specific index
273 *
274 * @param rep The repetition index (0-indexed)
275 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
276 */
277 public CX removeStaffIDCode(int rep) throws HL7Exception {
278 return (CX) super.removeRepetition(2, rep);
279 }
280
281
282 /**
283 * Removes a repetition of
284 * STF-2: "Staff ID Code" at a specific index
285 *
286 * @param rep The repetition index (0-indexed)
287 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
288 */
289 public CX removeStf2_StaffIDCode(int rep) throws HL7Exception {
290 return (CX) super.removeRepetition(2, rep);
291 }
292
293
294
295 /**
296 * Returns all repetitions of Staff Name (STF-3).
297 */
298 public XPN[] getStaffName() {
299 XPN[] ret = null;
300 try {
301 Type[] t = this.getField(3);
302 ret = new XPN[t.length];
303 for (int i = 0; i < ret.length; i++) {
304 ret[i] = (XPN)t[i];
305 }
306 } catch (ClassCastException cce) {
307 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
308 throw new RuntimeException(cce);
309 } catch (HL7Exception he) {
310 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
311 throw new RuntimeException(he);
312 }
313 return ret;
314 }
315
316
317 /**
318 * Returns a count of the current number of repetitions of Staff Name (STF-3).
319 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
320 * it will return zero.
321 */
322 public int getStaffNameReps() {
323 XPN[] ret = null;
324 try {
325 Type[] t = this.getField(3);
326 return t.length;
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 }
335
336
337 /**
338 * Returns a specific repetition of
339 * STF-3: "Staff Name" - creates it if necessary
340 *
341 * @param rep The repetition index (0-indexed)
342 */
343 public XPN getStaffName(int rep) {
344 XPN ret = null;
345 try {
346 Type t = this.getField(3, rep);
347 ret = (XPN)t;
348 } catch (ClassCastException cce) {
349 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
350 throw new RuntimeException(cce);
351 } catch (HL7Exception he) {
352 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
353 throw new RuntimeException(he);
354 }
355 return ret;
356 }
357
358 /**
359 * Returns a specific repetition of
360 * STF-3: "Staff Name" - creates it if necessary
361 *
362 * @param rep The repetition index (0-indexed)
363 */
364 public XPN getStf3_StaffName(int rep) {
365 XPN ret = null;
366 try {
367 Type t = this.getField(3, rep);
368 ret = (XPN)t;
369 } catch (ClassCastException cce) {
370 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
371 throw new RuntimeException(cce);
372 } catch (HL7Exception he) {
373 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
374 throw new RuntimeException(he);
375 }
376 return ret;
377 }
378
379
380 /**
381 * Returns a count of the current number of repetitions of Staff Name (STF-3).
382 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
383 * it will return zero.
384 */
385 public int getStf3_StaffNameReps() {
386 XPN[] ret = null;
387 try {
388 Type[] t = this.getField(3);
389 return t.length;
390 } catch (ClassCastException cce) {
391 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
392 throw new RuntimeException(cce);
393 } catch (HL7Exception he) {
394 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
395 throw new RuntimeException(he);
396 }
397 }
398
399
400
401 /**
402 * Inserts a repetition of
403 * STF-3: "Staff Name" at a specific index
404 *
405 * @param rep The repetition index (0-indexed)
406 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
407 */
408 public XPN insertStaffName(int rep) throws HL7Exception {
409 return (XPN) super.insertRepetition(3, rep);
410 }
411
412
413
414 /**
415 * Inserts a repetition of
416 * STF-3: "Staff Name" at a specific index
417 *
418 * @param rep The repetition index (0-indexed)
419 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
420 */
421 public XPN insertStf3_StaffName(int rep) throws HL7Exception {
422 return (XPN) super.insertRepetition(3, rep);
423 }
424
425
426 /**
427 * Removes a repetition of
428 * STF-3: "Staff Name" at a specific index
429 *
430 * @param rep The repetition index (0-indexed)
431 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
432 */
433 public XPN removeStaffName(int rep) throws HL7Exception {
434 return (XPN) super.removeRepetition(3, rep);
435 }
436
437
438 /**
439 * Removes a repetition of
440 * STF-3: "Staff Name" at a specific index
441 *
442 * @param rep The repetition index (0-indexed)
443 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
444 */
445 public XPN removeStf3_StaffName(int rep) throws HL7Exception {
446 return (XPN) super.removeRepetition(3, rep);
447 }
448
449
450
451 /**
452 * Returns all repetitions of Staff Type (STF-4).
453 */
454 public IS[] getStaffType() {
455 IS[] ret = null;
456 try {
457 Type[] t = this.getField(4);
458 ret = new IS[t.length];
459 for (int i = 0; i < ret.length; i++) {
460 ret[i] = (IS)t[i];
461 }
462 } catch (ClassCastException cce) {
463 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
464 throw new RuntimeException(cce);
465 } catch (HL7Exception he) {
466 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
467 throw new RuntimeException(he);
468 }
469 return ret;
470 }
471
472
473 /**
474 * Returns a count of the current number of repetitions of Staff Type (STF-4).
475 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
476 * it will return zero.
477 */
478 public int getStaffTypeReps() {
479 IS[] ret = null;
480 try {
481 Type[] t = this.getField(4);
482 return t.length;
483 } catch (ClassCastException cce) {
484 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
485 throw new RuntimeException(cce);
486 } catch (HL7Exception he) {
487 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
488 throw new RuntimeException(he);
489 }
490 }
491
492
493 /**
494 * Returns a specific repetition of
495 * STF-4: "Staff Type" - creates it if necessary
496 *
497 * @param rep The repetition index (0-indexed)
498 */
499 public IS getStaffType(int rep) {
500 IS ret = null;
501 try {
502 Type t = this.getField(4, rep);
503 ret = (IS)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 * Returns a specific repetition of
516 * STF-4: "Staff Type" - creates it if necessary
517 *
518 * @param rep The repetition index (0-indexed)
519 */
520 public IS getStf4_StaffType(int rep) {
521 IS ret = null;
522 try {
523 Type t = this.getField(4, rep);
524 ret = (IS)t;
525 } catch (ClassCastException cce) {
526 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
527 throw new RuntimeException(cce);
528 } catch (HL7Exception he) {
529 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
530 throw new RuntimeException(he);
531 }
532 return ret;
533 }
534
535
536 /**
537 * Returns a count of the current number of repetitions of Staff Type (STF-4).
538 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
539 * it will return zero.
540 */
541 public int getStf4_StaffTypeReps() {
542 IS[] ret = null;
543 try {
544 Type[] t = this.getField(4);
545 return t.length;
546 } catch (ClassCastException cce) {
547 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
548 throw new RuntimeException(cce);
549 } catch (HL7Exception he) {
550 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
551 throw new RuntimeException(he);
552 }
553 }
554
555
556
557 /**
558 * Inserts a repetition of
559 * STF-4: "Staff Type" at a specific index
560 *
561 * @param rep The repetition index (0-indexed)
562 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
563 */
564 public IS insertStaffType(int rep) throws HL7Exception {
565 return (IS) super.insertRepetition(4, rep);
566 }
567
568
569
570 /**
571 * Inserts a repetition of
572 * STF-4: "Staff Type" at a specific index
573 *
574 * @param rep The repetition index (0-indexed)
575 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
576 */
577 public IS insertStf4_StaffType(int rep) throws HL7Exception {
578 return (IS) super.insertRepetition(4, rep);
579 }
580
581
582 /**
583 * Removes a repetition of
584 * STF-4: "Staff Type" at a specific index
585 *
586 * @param rep The repetition index (0-indexed)
587 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
588 */
589 public IS removeStaffType(int rep) throws HL7Exception {
590 return (IS) super.removeRepetition(4, rep);
591 }
592
593
594 /**
595 * Removes a repetition of
596 * STF-4: "Staff Type" at a specific index
597 *
598 * @param rep The repetition index (0-indexed)
599 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
600 */
601 public IS removeStf4_StaffType(int rep) throws HL7Exception {
602 return (IS) super.removeRepetition(4, rep);
603 }
604
605
606
607
608 /**
609 * Returns
610 * STF-5: "Sex" - creates it if necessary
611 */
612 public IS getSex() {
613 IS ret = null;
614 try {
615 Type t = this.getField(5, 0);
616 ret = (IS)t;
617 } catch (ClassCastException cce) {
618 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
619 throw new RuntimeException(cce);
620 } catch (HL7Exception he) {
621 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
622 throw new RuntimeException(he);
623 }
624 return ret;
625 }
626
627
628 /**
629 * Returns
630 * STF-5: "Sex" - creates it if necessary
631 */
632 public IS getStf5_Sex() {
633 IS ret = null;
634 try {
635 Type t = this.getField(5, 0);
636 ret = (IS)t;
637 } catch (ClassCastException cce) {
638 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
639 throw new RuntimeException(cce);
640 } catch (HL7Exception he) {
641 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
642 throw new RuntimeException(he);
643 }
644 return ret;
645 }
646
647
648
649 /**
650 * Returns
651 * STF-6: "Date/Time Of Birth" - creates it if necessary
652 */
653 public TS getDateTimeOfBirth() {
654 TS ret = null;
655 try {
656 Type t = this.getField(6, 0);
657 ret = (TS)t;
658 } catch (ClassCastException cce) {
659 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
660 throw new RuntimeException(cce);
661 } catch (HL7Exception he) {
662 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
663 throw new RuntimeException(he);
664 }
665 return ret;
666 }
667
668
669 /**
670 * Returns
671 * STF-6: "Date/Time Of Birth" - creates it if necessary
672 */
673 public TS getStf6_DateTimeOfBirth() {
674 TS ret = null;
675 try {
676 Type t = this.getField(6, 0);
677 ret = (TS)t;
678 } catch (ClassCastException cce) {
679 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
680 throw new RuntimeException(cce);
681 } catch (HL7Exception he) {
682 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
683 throw new RuntimeException(he);
684 }
685 return ret;
686 }
687
688
689
690 /**
691 * Returns
692 * STF-7: "Active/Inactive Flag" - creates it if necessary
693 */
694 public ID getActiveInactiveFlag() {
695 ID ret = null;
696 try {
697 Type t = this.getField(7, 0);
698 ret = (ID)t;
699 } catch (ClassCastException cce) {
700 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
701 throw new RuntimeException(cce);
702 } catch (HL7Exception he) {
703 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
704 throw new RuntimeException(he);
705 }
706 return ret;
707 }
708
709
710 /**
711 * Returns
712 * STF-7: "Active/Inactive Flag" - creates it if necessary
713 */
714 public ID getStf7_ActiveInactiveFlag() {
715 ID ret = null;
716 try {
717 Type t = this.getField(7, 0);
718 ret = (ID)t;
719 } catch (ClassCastException cce) {
720 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
721 throw new RuntimeException(cce);
722 } catch (HL7Exception he) {
723 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
724 throw new RuntimeException(he);
725 }
726 return ret;
727 }
728
729
730 /**
731 * Returns all repetitions of Department (STF-8).
732 */
733 public CE[] getDepartment() {
734 CE[] ret = null;
735 try {
736 Type[] t = this.getField(8);
737 ret = new CE[t.length];
738 for (int i = 0; i < ret.length; i++) {
739 ret[i] = (CE)t[i];
740 }
741 } catch (ClassCastException cce) {
742 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
743 throw new RuntimeException(cce);
744 } catch (HL7Exception he) {
745 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
746 throw new RuntimeException(he);
747 }
748 return ret;
749 }
750
751
752 /**
753 * Returns a count of the current number of repetitions of Department (STF-8).
754 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
755 * it will return zero.
756 */
757 public int getDepartmentReps() {
758 CE[] ret = null;
759 try {
760 Type[] t = this.getField(8);
761 return t.length;
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 }
770
771
772 /**
773 * Returns a specific repetition of
774 * STF-8: "Department" - creates it if necessary
775 *
776 * @param rep The repetition index (0-indexed)
777 */
778 public CE getDepartment(int rep) {
779 CE ret = null;
780 try {
781 Type t = this.getField(8, rep);
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 * Returns a specific repetition of
795 * STF-8: "Department" - creates it if necessary
796 *
797 * @param rep The repetition index (0-indexed)
798 */
799 public CE getStf8_Department(int rep) {
800 CE ret = null;
801 try {
802 Type t = this.getField(8, rep);
803 ret = (CE)t;
804 } catch (ClassCastException cce) {
805 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
806 throw new RuntimeException(cce);
807 } catch (HL7Exception he) {
808 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
809 throw new RuntimeException(he);
810 }
811 return ret;
812 }
813
814
815 /**
816 * Returns a count of the current number of repetitions of Department (STF-8).
817 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
818 * it will return zero.
819 */
820 public int getStf8_DepartmentReps() {
821 CE[] ret = null;
822 try {
823 Type[] t = this.getField(8);
824 return t.length;
825 } catch (ClassCastException cce) {
826 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
827 throw new RuntimeException(cce);
828 } catch (HL7Exception he) {
829 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
830 throw new RuntimeException(he);
831 }
832 }
833
834
835
836 /**
837 * Inserts a repetition of
838 * STF-8: "Department" at a specific index
839 *
840 * @param rep The repetition index (0-indexed)
841 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
842 */
843 public CE insertDepartment(int rep) throws HL7Exception {
844 return (CE) super.insertRepetition(8, rep);
845 }
846
847
848
849 /**
850 * Inserts a repetition of
851 * STF-8: "Department" at a specific index
852 *
853 * @param rep The repetition index (0-indexed)
854 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
855 */
856 public CE insertStf8_Department(int rep) throws HL7Exception {
857 return (CE) super.insertRepetition(8, rep);
858 }
859
860
861 /**
862 * Removes a repetition of
863 * STF-8: "Department" at a specific index
864 *
865 * @param rep The repetition index (0-indexed)
866 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
867 */
868 public CE removeDepartment(int rep) throws HL7Exception {
869 return (CE) super.removeRepetition(8, rep);
870 }
871
872
873 /**
874 * Removes a repetition of
875 * STF-8: "Department" at a specific index
876 *
877 * @param rep The repetition index (0-indexed)
878 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
879 */
880 public CE removeStf8_Department(int rep) throws HL7Exception {
881 return (CE) super.removeRepetition(8, rep);
882 }
883
884
885
886 /**
887 * Returns all repetitions of Hospital Service (STF-9).
888 */
889 public CE[] getHospitalService() {
890 CE[] ret = null;
891 try {
892 Type[] t = this.getField(9);
893 ret = new CE[t.length];
894 for (int i = 0; i < ret.length; i++) {
895 ret[i] = (CE)t[i];
896 }
897 } catch (ClassCastException cce) {
898 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
899 throw new RuntimeException(cce);
900 } catch (HL7Exception he) {
901 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
902 throw new RuntimeException(he);
903 }
904 return ret;
905 }
906
907
908 /**
909 * Returns a count of the current number of repetitions of Hospital Service (STF-9).
910 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
911 * it will return zero.
912 */
913 public int getHospitalServiceReps() {
914 CE[] ret = null;
915 try {
916 Type[] t = this.getField(9);
917 return t.length;
918 } catch (ClassCastException cce) {
919 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
920 throw new RuntimeException(cce);
921 } catch (HL7Exception he) {
922 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
923 throw new RuntimeException(he);
924 }
925 }
926
927
928 /**
929 * Returns a specific repetition of
930 * STF-9: "Hospital Service" - creates it if necessary
931 *
932 * @param rep The repetition index (0-indexed)
933 */
934 public CE getHospitalService(int rep) {
935 CE ret = null;
936 try {
937 Type t = this.getField(9, rep);
938 ret = (CE)t;
939 } catch (ClassCastException cce) {
940 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
941 throw new RuntimeException(cce);
942 } catch (HL7Exception he) {
943 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
944 throw new RuntimeException(he);
945 }
946 return ret;
947 }
948
949 /**
950 * Returns a specific repetition of
951 * STF-9: "Hospital Service" - creates it if necessary
952 *
953 * @param rep The repetition index (0-indexed)
954 */
955 public CE getStf9_HospitalService(int rep) {
956 CE ret = null;
957 try {
958 Type t = this.getField(9, rep);
959 ret = (CE)t;
960 } catch (ClassCastException cce) {
961 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
962 throw new RuntimeException(cce);
963 } catch (HL7Exception he) {
964 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
965 throw new RuntimeException(he);
966 }
967 return ret;
968 }
969
970
971 /**
972 * Returns a count of the current number of repetitions of Hospital Service (STF-9).
973 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
974 * it will return zero.
975 */
976 public int getStf9_HospitalServiceReps() {
977 CE[] ret = null;
978 try {
979 Type[] t = this.getField(9);
980 return t.length;
981 } catch (ClassCastException cce) {
982 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
983 throw new RuntimeException(cce);
984 } catch (HL7Exception he) {
985 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
986 throw new RuntimeException(he);
987 }
988 }
989
990
991
992 /**
993 * Inserts a repetition of
994 * STF-9: "Hospital Service" at a specific index
995 *
996 * @param rep The repetition index (0-indexed)
997 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
998 */
999 public CE insertHospitalService(int rep) throws HL7Exception {
1000 return (CE) super.insertRepetition(9, rep);
1001 }
1002
1003
1004
1005 /**
1006 * Inserts a repetition of
1007 * STF-9: "Hospital Service" at a specific index
1008 *
1009 * @param rep The repetition index (0-indexed)
1010 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1011 */
1012 public CE insertStf9_HospitalService(int rep) throws HL7Exception {
1013 return (CE) super.insertRepetition(9, rep);
1014 }
1015
1016
1017 /**
1018 * Removes a repetition of
1019 * STF-9: "Hospital Service" at a specific index
1020 *
1021 * @param rep The repetition index (0-indexed)
1022 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1023 */
1024 public CE removeHospitalService(int rep) throws HL7Exception {
1025 return (CE) super.removeRepetition(9, rep);
1026 }
1027
1028
1029 /**
1030 * Removes a repetition of
1031 * STF-9: "Hospital Service" at a specific index
1032 *
1033 * @param rep The repetition index (0-indexed)
1034 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1035 */
1036 public CE removeStf9_HospitalService(int rep) throws HL7Exception {
1037 return (CE) super.removeRepetition(9, rep);
1038 }
1039
1040
1041
1042 /**
1043 * Returns all repetitions of Phone (STF-10).
1044 */
1045 public XTN[] getPhone() {
1046 XTN[] ret = null;
1047 try {
1048 Type[] t = this.getField(10);
1049 ret = new XTN[t.length];
1050 for (int i = 0; i < ret.length; i++) {
1051 ret[i] = (XTN)t[i];
1052 }
1053 } catch (ClassCastException cce) {
1054 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1055 throw new RuntimeException(cce);
1056 } catch (HL7Exception he) {
1057 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1058 throw new RuntimeException(he);
1059 }
1060 return ret;
1061 }
1062
1063
1064 /**
1065 * Returns a count of the current number of repetitions of Phone (STF-10).
1066 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1067 * it will return zero.
1068 */
1069 public int getPhoneReps() {
1070 XTN[] ret = null;
1071 try {
1072 Type[] t = this.getField(10);
1073 return t.length;
1074 } catch (ClassCastException cce) {
1075 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1076 throw new RuntimeException(cce);
1077 } catch (HL7Exception he) {
1078 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1079 throw new RuntimeException(he);
1080 }
1081 }
1082
1083
1084 /**
1085 * Returns a specific repetition of
1086 * STF-10: "Phone" - creates it if necessary
1087 *
1088 * @param rep The repetition index (0-indexed)
1089 */
1090 public XTN getPhone(int rep) {
1091 XTN ret = null;
1092 try {
1093 Type t = this.getField(10, rep);
1094 ret = (XTN)t;
1095 } catch (ClassCastException cce) {
1096 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1097 throw new RuntimeException(cce);
1098 } catch (HL7Exception he) {
1099 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1100 throw new RuntimeException(he);
1101 }
1102 return ret;
1103 }
1104
1105 /**
1106 * Returns a specific repetition of
1107 * STF-10: "Phone" - creates it if necessary
1108 *
1109 * @param rep The repetition index (0-indexed)
1110 */
1111 public XTN getStf10_Phone(int rep) {
1112 XTN ret = null;
1113 try {
1114 Type t = this.getField(10, rep);
1115 ret = (XTN)t;
1116 } catch (ClassCastException cce) {
1117 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1118 throw new RuntimeException(cce);
1119 } catch (HL7Exception he) {
1120 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1121 throw new RuntimeException(he);
1122 }
1123 return ret;
1124 }
1125
1126
1127 /**
1128 * Returns a count of the current number of repetitions of Phone (STF-10).
1129 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1130 * it will return zero.
1131 */
1132 public int getStf10_PhoneReps() {
1133 XTN[] ret = null;
1134 try {
1135 Type[] t = this.getField(10);
1136 return t.length;
1137 } catch (ClassCastException cce) {
1138 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1139 throw new RuntimeException(cce);
1140 } catch (HL7Exception he) {
1141 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1142 throw new RuntimeException(he);
1143 }
1144 }
1145
1146
1147
1148 /**
1149 * Inserts a repetition of
1150 * STF-10: "Phone" at a specific index
1151 *
1152 * @param rep The repetition index (0-indexed)
1153 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1154 */
1155 public XTN insertPhone(int rep) throws HL7Exception {
1156 return (XTN) super.insertRepetition(10, rep);
1157 }
1158
1159
1160
1161 /**
1162 * Inserts a repetition of
1163 * STF-10: "Phone" at a specific index
1164 *
1165 * @param rep The repetition index (0-indexed)
1166 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1167 */
1168 public XTN insertStf10_Phone(int rep) throws HL7Exception {
1169 return (XTN) super.insertRepetition(10, rep);
1170 }
1171
1172
1173 /**
1174 * Removes a repetition of
1175 * STF-10: "Phone" at a specific index
1176 *
1177 * @param rep The repetition index (0-indexed)
1178 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1179 */
1180 public XTN removePhone(int rep) throws HL7Exception {
1181 return (XTN) super.removeRepetition(10, rep);
1182 }
1183
1184
1185 /**
1186 * Removes a repetition of
1187 * STF-10: "Phone" at a specific index
1188 *
1189 * @param rep The repetition index (0-indexed)
1190 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1191 */
1192 public XTN removeStf10_Phone(int rep) throws HL7Exception {
1193 return (XTN) super.removeRepetition(10, rep);
1194 }
1195
1196
1197
1198 /**
1199 * Returns all repetitions of Office/Home Address (STF-11).
1200 */
1201 public XAD[] getOfficeHomeAddress() {
1202 XAD[] ret = null;
1203 try {
1204 Type[] t = this.getField(11);
1205 ret = new XAD[t.length];
1206 for (int i = 0; i < ret.length; i++) {
1207 ret[i] = (XAD)t[i];
1208 }
1209 } catch (ClassCastException cce) {
1210 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1211 throw new RuntimeException(cce);
1212 } catch (HL7Exception he) {
1213 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1214 throw new RuntimeException(he);
1215 }
1216 return ret;
1217 }
1218
1219
1220 /**
1221 * Returns a count of the current number of repetitions of Office/Home Address (STF-11).
1222 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1223 * it will return zero.
1224 */
1225 public int getOfficeHomeAddressReps() {
1226 XAD[] ret = null;
1227 try {
1228 Type[] t = this.getField(11);
1229 return t.length;
1230 } catch (ClassCastException cce) {
1231 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1232 throw new RuntimeException(cce);
1233 } catch (HL7Exception he) {
1234 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1235 throw new RuntimeException(he);
1236 }
1237 }
1238
1239
1240 /**
1241 * Returns a specific repetition of
1242 * STF-11: "Office/Home Address" - creates it if necessary
1243 *
1244 * @param rep The repetition index (0-indexed)
1245 */
1246 public XAD getOfficeHomeAddress(int rep) {
1247 XAD ret = null;
1248 try {
1249 Type t = this.getField(11, rep);
1250 ret = (XAD)t;
1251 } catch (ClassCastException cce) {
1252 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1253 throw new RuntimeException(cce);
1254 } catch (HL7Exception he) {
1255 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1256 throw new RuntimeException(he);
1257 }
1258 return ret;
1259 }
1260
1261 /**
1262 * Returns a specific repetition of
1263 * STF-11: "Office/Home Address" - creates it if necessary
1264 *
1265 * @param rep The repetition index (0-indexed)
1266 */
1267 public XAD getStf11_OfficeHomeAddress(int rep) {
1268 XAD ret = null;
1269 try {
1270 Type t = this.getField(11, rep);
1271 ret = (XAD)t;
1272 } catch (ClassCastException cce) {
1273 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1274 throw new RuntimeException(cce);
1275 } catch (HL7Exception he) {
1276 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1277 throw new RuntimeException(he);
1278 }
1279 return ret;
1280 }
1281
1282
1283 /**
1284 * Returns a count of the current number of repetitions of Office/Home Address (STF-11).
1285 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1286 * it will return zero.
1287 */
1288 public int getStf11_OfficeHomeAddressReps() {
1289 XAD[] ret = null;
1290 try {
1291 Type[] t = this.getField(11);
1292 return t.length;
1293 } catch (ClassCastException cce) {
1294 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1295 throw new RuntimeException(cce);
1296 } catch (HL7Exception he) {
1297 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1298 throw new RuntimeException(he);
1299 }
1300 }
1301
1302
1303
1304 /**
1305 * Inserts a repetition of
1306 * STF-11: "Office/Home Address" at a specific index
1307 *
1308 * @param rep The repetition index (0-indexed)
1309 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1310 */
1311 public XAD insertOfficeHomeAddress(int rep) throws HL7Exception {
1312 return (XAD) super.insertRepetition(11, rep);
1313 }
1314
1315
1316
1317 /**
1318 * Inserts a repetition of
1319 * STF-11: "Office/Home Address" at a specific index
1320 *
1321 * @param rep The repetition index (0-indexed)
1322 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1323 */
1324 public XAD insertStf11_OfficeHomeAddress(int rep) throws HL7Exception {
1325 return (XAD) super.insertRepetition(11, rep);
1326 }
1327
1328
1329 /**
1330 * Removes a repetition of
1331 * STF-11: "Office/Home Address" at a specific index
1332 *
1333 * @param rep The repetition index (0-indexed)
1334 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1335 */
1336 public XAD removeOfficeHomeAddress(int rep) throws HL7Exception {
1337 return (XAD) super.removeRepetition(11, rep);
1338 }
1339
1340
1341 /**
1342 * Removes a repetition of
1343 * STF-11: "Office/Home Address" at a specific index
1344 *
1345 * @param rep The repetition index (0-indexed)
1346 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1347 */
1348 public XAD removeStf11_OfficeHomeAddress(int rep) throws HL7Exception {
1349 return (XAD) super.removeRepetition(11, rep);
1350 }
1351
1352
1353
1354 /**
1355 * Returns all repetitions of Institution Activation Date (STF-12).
1356 */
1357 public DIN[] getInstitutionActivationDate() {
1358 DIN[] ret = null;
1359 try {
1360 Type[] t = this.getField(12);
1361 ret = new DIN[t.length];
1362 for (int i = 0; i < ret.length; i++) {
1363 ret[i] = (DIN)t[i];
1364 }
1365 } catch (ClassCastException cce) {
1366 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1367 throw new RuntimeException(cce);
1368 } catch (HL7Exception he) {
1369 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1370 throw new RuntimeException(he);
1371 }
1372 return ret;
1373 }
1374
1375
1376 /**
1377 * Returns a count of the current number of repetitions of Institution Activation Date (STF-12).
1378 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1379 * it will return zero.
1380 */
1381 public int getInstitutionActivationDateReps() {
1382 DIN[] ret = null;
1383 try {
1384 Type[] t = this.getField(12);
1385 return t.length;
1386 } catch (ClassCastException cce) {
1387 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1388 throw new RuntimeException(cce);
1389 } catch (HL7Exception he) {
1390 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1391 throw new RuntimeException(he);
1392 }
1393 }
1394
1395
1396 /**
1397 * Returns a specific repetition of
1398 * STF-12: "Institution Activation Date" - creates it if necessary
1399 *
1400 * @param rep The repetition index (0-indexed)
1401 */
1402 public DIN getInstitutionActivationDate(int rep) {
1403 DIN ret = null;
1404 try {
1405 Type t = this.getField(12, rep);
1406 ret = (DIN)t;
1407 } catch (ClassCastException cce) {
1408 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1409 throw new RuntimeException(cce);
1410 } catch (HL7Exception he) {
1411 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1412 throw new RuntimeException(he);
1413 }
1414 return ret;
1415 }
1416
1417 /**
1418 * Returns a specific repetition of
1419 * STF-12: "Institution Activation Date" - creates it if necessary
1420 *
1421 * @param rep The repetition index (0-indexed)
1422 */
1423 public DIN getStf12_InstitutionActivationDate(int rep) {
1424 DIN ret = null;
1425 try {
1426 Type t = this.getField(12, rep);
1427 ret = (DIN)t;
1428 } catch (ClassCastException cce) {
1429 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1430 throw new RuntimeException(cce);
1431 } catch (HL7Exception he) {
1432 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1433 throw new RuntimeException(he);
1434 }
1435 return ret;
1436 }
1437
1438
1439 /**
1440 * Returns a count of the current number of repetitions of Institution Activation Date (STF-12).
1441 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1442 * it will return zero.
1443 */
1444 public int getStf12_InstitutionActivationDateReps() {
1445 DIN[] ret = null;
1446 try {
1447 Type[] t = this.getField(12);
1448 return t.length;
1449 } catch (ClassCastException cce) {
1450 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1451 throw new RuntimeException(cce);
1452 } catch (HL7Exception he) {
1453 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1454 throw new RuntimeException(he);
1455 }
1456 }
1457
1458
1459
1460 /**
1461 * Inserts a repetition of
1462 * STF-12: "Institution Activation Date" at a specific index
1463 *
1464 * @param rep The repetition index (0-indexed)
1465 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1466 */
1467 public DIN insertInstitutionActivationDate(int rep) throws HL7Exception {
1468 return (DIN) super.insertRepetition(12, rep);
1469 }
1470
1471
1472
1473 /**
1474 * Inserts a repetition of
1475 * STF-12: "Institution Activation Date" at a specific index
1476 *
1477 * @param rep The repetition index (0-indexed)
1478 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1479 */
1480 public DIN insertStf12_InstitutionActivationDate(int rep) throws HL7Exception {
1481 return (DIN) super.insertRepetition(12, rep);
1482 }
1483
1484
1485 /**
1486 * Removes a repetition of
1487 * STF-12: "Institution Activation Date" at a specific index
1488 *
1489 * @param rep The repetition index (0-indexed)
1490 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1491 */
1492 public DIN removeInstitutionActivationDate(int rep) throws HL7Exception {
1493 return (DIN) super.removeRepetition(12, rep);
1494 }
1495
1496
1497 /**
1498 * Removes a repetition of
1499 * STF-12: "Institution Activation Date" at a specific index
1500 *
1501 * @param rep The repetition index (0-indexed)
1502 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1503 */
1504 public DIN removeStf12_InstitutionActivationDate(int rep) throws HL7Exception {
1505 return (DIN) super.removeRepetition(12, rep);
1506 }
1507
1508
1509
1510 /**
1511 * Returns all repetitions of Institution Inactivation Date (STF-13).
1512 */
1513 public DIN[] getInstitutionInactivationDate() {
1514 DIN[] ret = null;
1515 try {
1516 Type[] t = this.getField(13);
1517 ret = new DIN[t.length];
1518 for (int i = 0; i < ret.length; i++) {
1519 ret[i] = (DIN)t[i];
1520 }
1521 } catch (ClassCastException cce) {
1522 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1523 throw new RuntimeException(cce);
1524 } catch (HL7Exception he) {
1525 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1526 throw new RuntimeException(he);
1527 }
1528 return ret;
1529 }
1530
1531
1532 /**
1533 * Returns a count of the current number of repetitions of Institution Inactivation Date (STF-13).
1534 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1535 * it will return zero.
1536 */
1537 public int getInstitutionInactivationDateReps() {
1538 DIN[] ret = null;
1539 try {
1540 Type[] t = this.getField(13);
1541 return t.length;
1542 } catch (ClassCastException cce) {
1543 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1544 throw new RuntimeException(cce);
1545 } catch (HL7Exception he) {
1546 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1547 throw new RuntimeException(he);
1548 }
1549 }
1550
1551
1552 /**
1553 * Returns a specific repetition of
1554 * STF-13: "Institution Inactivation Date" - creates it if necessary
1555 *
1556 * @param rep The repetition index (0-indexed)
1557 */
1558 public DIN getInstitutionInactivationDate(int rep) {
1559 DIN ret = null;
1560 try {
1561 Type t = this.getField(13, rep);
1562 ret = (DIN)t;
1563 } catch (ClassCastException cce) {
1564 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1565 throw new RuntimeException(cce);
1566 } catch (HL7Exception he) {
1567 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1568 throw new RuntimeException(he);
1569 }
1570 return ret;
1571 }
1572
1573 /**
1574 * Returns a specific repetition of
1575 * STF-13: "Institution Inactivation Date" - creates it if necessary
1576 *
1577 * @param rep The repetition index (0-indexed)
1578 */
1579 public DIN getStf13_InstitutionInactivationDate(int rep) {
1580 DIN ret = null;
1581 try {
1582 Type t = this.getField(13, rep);
1583 ret = (DIN)t;
1584 } catch (ClassCastException cce) {
1585 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1586 throw new RuntimeException(cce);
1587 } catch (HL7Exception he) {
1588 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1589 throw new RuntimeException(he);
1590 }
1591 return ret;
1592 }
1593
1594
1595 /**
1596 * Returns a count of the current number of repetitions of Institution Inactivation Date (STF-13).
1597 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1598 * it will return zero.
1599 */
1600 public int getStf13_InstitutionInactivationDateReps() {
1601 DIN[] ret = null;
1602 try {
1603 Type[] t = this.getField(13);
1604 return t.length;
1605 } catch (ClassCastException cce) {
1606 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1607 throw new RuntimeException(cce);
1608 } catch (HL7Exception he) {
1609 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1610 throw new RuntimeException(he);
1611 }
1612 }
1613
1614
1615
1616 /**
1617 * Inserts a repetition of
1618 * STF-13: "Institution Inactivation Date" at a specific index
1619 *
1620 * @param rep The repetition index (0-indexed)
1621 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1622 */
1623 public DIN insertInstitutionInactivationDate(int rep) throws HL7Exception {
1624 return (DIN) super.insertRepetition(13, rep);
1625 }
1626
1627
1628
1629 /**
1630 * Inserts a repetition of
1631 * STF-13: "Institution Inactivation Date" at a specific index
1632 *
1633 * @param rep The repetition index (0-indexed)
1634 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1635 */
1636 public DIN insertStf13_InstitutionInactivationDate(int rep) throws HL7Exception {
1637 return (DIN) super.insertRepetition(13, rep);
1638 }
1639
1640
1641 /**
1642 * Removes a repetition of
1643 * STF-13: "Institution Inactivation Date" at a specific index
1644 *
1645 * @param rep The repetition index (0-indexed)
1646 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1647 */
1648 public DIN removeInstitutionInactivationDate(int rep) throws HL7Exception {
1649 return (DIN) super.removeRepetition(13, rep);
1650 }
1651
1652
1653 /**
1654 * Removes a repetition of
1655 * STF-13: "Institution Inactivation Date" at a specific index
1656 *
1657 * @param rep The repetition index (0-indexed)
1658 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1659 */
1660 public DIN removeStf13_InstitutionInactivationDate(int rep) throws HL7Exception {
1661 return (DIN) super.removeRepetition(13, rep);
1662 }
1663
1664
1665
1666 /**
1667 * Returns all repetitions of Backup Person ID (STF-14).
1668 */
1669 public CE[] getBackupPersonID() {
1670 CE[] ret = null;
1671 try {
1672 Type[] t = this.getField(14);
1673 ret = new CE[t.length];
1674 for (int i = 0; i < ret.length; i++) {
1675 ret[i] = (CE)t[i];
1676 }
1677 } catch (ClassCastException cce) {
1678 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1679 throw new RuntimeException(cce);
1680 } catch (HL7Exception he) {
1681 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1682 throw new RuntimeException(he);
1683 }
1684 return ret;
1685 }
1686
1687
1688 /**
1689 * Returns a count of the current number of repetitions of Backup Person ID (STF-14).
1690 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1691 * it will return zero.
1692 */
1693 public int getBackupPersonIDReps() {
1694 CE[] ret = null;
1695 try {
1696 Type[] t = this.getField(14);
1697 return t.length;
1698 } catch (ClassCastException cce) {
1699 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1700 throw new RuntimeException(cce);
1701 } catch (HL7Exception he) {
1702 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1703 throw new RuntimeException(he);
1704 }
1705 }
1706
1707
1708 /**
1709 * Returns a specific repetition of
1710 * STF-14: "Backup Person ID" - creates it if necessary
1711 *
1712 * @param rep The repetition index (0-indexed)
1713 */
1714 public CE getBackupPersonID(int rep) {
1715 CE ret = null;
1716 try {
1717 Type t = this.getField(14, rep);
1718 ret = (CE)t;
1719 } catch (ClassCastException cce) {
1720 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1721 throw new RuntimeException(cce);
1722 } catch (HL7Exception he) {
1723 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1724 throw new RuntimeException(he);
1725 }
1726 return ret;
1727 }
1728
1729 /**
1730 * Returns a specific repetition of
1731 * STF-14: "Backup Person ID" - creates it if necessary
1732 *
1733 * @param rep The repetition index (0-indexed)
1734 */
1735 public CE getStf14_BackupPersonID(int rep) {
1736 CE ret = null;
1737 try {
1738 Type t = this.getField(14, rep);
1739 ret = (CE)t;
1740 } catch (ClassCastException cce) {
1741 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1742 throw new RuntimeException(cce);
1743 } catch (HL7Exception he) {
1744 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1745 throw new RuntimeException(he);
1746 }
1747 return ret;
1748 }
1749
1750
1751 /**
1752 * Returns a count of the current number of repetitions of Backup Person ID (STF-14).
1753 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1754 * it will return zero.
1755 */
1756 public int getStf14_BackupPersonIDReps() {
1757 CE[] ret = null;
1758 try {
1759 Type[] t = this.getField(14);
1760 return t.length;
1761 } catch (ClassCastException cce) {
1762 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1763 throw new RuntimeException(cce);
1764 } catch (HL7Exception he) {
1765 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1766 throw new RuntimeException(he);
1767 }
1768 }
1769
1770
1771
1772 /**
1773 * Inserts a repetition of
1774 * STF-14: "Backup Person ID" at a specific index
1775 *
1776 * @param rep The repetition index (0-indexed)
1777 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1778 */
1779 public CE insertBackupPersonID(int rep) throws HL7Exception {
1780 return (CE) super.insertRepetition(14, rep);
1781 }
1782
1783
1784
1785 /**
1786 * Inserts a repetition of
1787 * STF-14: "Backup Person ID" at a specific index
1788 *
1789 * @param rep The repetition index (0-indexed)
1790 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1791 */
1792 public CE insertStf14_BackupPersonID(int rep) throws HL7Exception {
1793 return (CE) super.insertRepetition(14, rep);
1794 }
1795
1796
1797 /**
1798 * Removes a repetition of
1799 * STF-14: "Backup Person ID" at a specific index
1800 *
1801 * @param rep The repetition index (0-indexed)
1802 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1803 */
1804 public CE removeBackupPersonID(int rep) throws HL7Exception {
1805 return (CE) super.removeRepetition(14, rep);
1806 }
1807
1808
1809 /**
1810 * Removes a repetition of
1811 * STF-14: "Backup Person ID" at a specific index
1812 *
1813 * @param rep The repetition index (0-indexed)
1814 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1815 */
1816 public CE removeStf14_BackupPersonID(int rep) throws HL7Exception {
1817 return (CE) super.removeRepetition(14, rep);
1818 }
1819
1820
1821
1822 /**
1823 * Returns all repetitions of E-Mail Address (STF-15).
1824 */
1825 public ST[] getEMailAddress() {
1826 ST[] ret = null;
1827 try {
1828 Type[] t = this.getField(15);
1829 ret = new ST[t.length];
1830 for (int i = 0; i < ret.length; i++) {
1831 ret[i] = (ST)t[i];
1832 }
1833 } catch (ClassCastException cce) {
1834 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1835 throw new RuntimeException(cce);
1836 } catch (HL7Exception he) {
1837 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1838 throw new RuntimeException(he);
1839 }
1840 return ret;
1841 }
1842
1843
1844 /**
1845 * Returns a count of the current number of repetitions of E-Mail Address (STF-15).
1846 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1847 * it will return zero.
1848 */
1849 public int getEMailAddressReps() {
1850 ST[] ret = null;
1851 try {
1852 Type[] t = this.getField(15);
1853 return t.length;
1854 } catch (ClassCastException cce) {
1855 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1856 throw new RuntimeException(cce);
1857 } catch (HL7Exception he) {
1858 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1859 throw new RuntimeException(he);
1860 }
1861 }
1862
1863
1864 /**
1865 * Returns a specific repetition of
1866 * STF-15: "E-Mail Address" - creates it if necessary
1867 *
1868 * @param rep The repetition index (0-indexed)
1869 */
1870 public ST getEMailAddress(int rep) {
1871 ST ret = null;
1872 try {
1873 Type t = this.getField(15, rep);
1874 ret = (ST)t;
1875 } catch (ClassCastException cce) {
1876 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1877 throw new RuntimeException(cce);
1878 } catch (HL7Exception he) {
1879 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1880 throw new RuntimeException(he);
1881 }
1882 return ret;
1883 }
1884
1885 /**
1886 * Returns a specific repetition of
1887 * STF-15: "E-Mail Address" - creates it if necessary
1888 *
1889 * @param rep The repetition index (0-indexed)
1890 */
1891 public ST getStf15_EMailAddress(int rep) {
1892 ST ret = null;
1893 try {
1894 Type t = this.getField(15, rep);
1895 ret = (ST)t;
1896 } catch (ClassCastException cce) {
1897 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1898 throw new RuntimeException(cce);
1899 } catch (HL7Exception he) {
1900 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1901 throw new RuntimeException(he);
1902 }
1903 return ret;
1904 }
1905
1906
1907 /**
1908 * Returns a count of the current number of repetitions of E-Mail Address (STF-15).
1909 * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1910 * it will return zero.
1911 */
1912 public int getStf15_EMailAddressReps() {
1913 ST[] ret = null;
1914 try {
1915 Type[] t = this.getField(15);
1916 return t.length;
1917 } catch (ClassCastException cce) {
1918 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1919 throw new RuntimeException(cce);
1920 } catch (HL7Exception he) {
1921 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1922 throw new RuntimeException(he);
1923 }
1924 }
1925
1926
1927
1928 /**
1929 * Inserts a repetition of
1930 * STF-15: "E-Mail Address" at a specific index
1931 *
1932 * @param rep The repetition index (0-indexed)
1933 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1934 */
1935 public ST insertEMailAddress(int rep) throws HL7Exception {
1936 return (ST) super.insertRepetition(15, rep);
1937 }
1938
1939
1940
1941 /**
1942 * Inserts a repetition of
1943 * STF-15: "E-Mail Address" at a specific index
1944 *
1945 * @param rep The repetition index (0-indexed)
1946 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1947 */
1948 public ST insertStf15_EMailAddress(int rep) throws HL7Exception {
1949 return (ST) super.insertRepetition(15, rep);
1950 }
1951
1952
1953 /**
1954 * Removes a repetition of
1955 * STF-15: "E-Mail Address" at a specific index
1956 *
1957 * @param rep The repetition index (0-indexed)
1958 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1959 */
1960 public ST removeEMailAddress(int rep) throws HL7Exception {
1961 return (ST) super.removeRepetition(15, rep);
1962 }
1963
1964
1965 /**
1966 * Removes a repetition of
1967 * STF-15: "E-Mail Address" at a specific index
1968 *
1969 * @param rep The repetition index (0-indexed)
1970 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1971 */
1972 public ST removeStf15_EMailAddress(int rep) throws HL7Exception {
1973 return (ST) super.removeRepetition(15, rep);
1974 }
1975
1976
1977
1978
1979 /**
1980 * Returns
1981 * STF-16: "Preferred Method Of Contact" - creates it if necessary
1982 */
1983 public CE getPreferredMethodOfContact() {
1984 CE ret = null;
1985 try {
1986 Type t = this.getField(16, 0);
1987 ret = (CE)t;
1988 } catch (ClassCastException cce) {
1989 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
1990 throw new RuntimeException(cce);
1991 } catch (HL7Exception he) {
1992 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
1993 throw new RuntimeException(he);
1994 }
1995 return ret;
1996 }
1997
1998
1999 /**
2000 * Returns
2001 * STF-16: "Preferred Method Of Contact" - creates it if necessary
2002 */
2003 public CE getStf16_PreferredMethodOfContact() {
2004 CE ret = null;
2005 try {
2006 Type t = this.getField(16, 0);
2007 ret = (CE)t;
2008 } catch (ClassCastException cce) {
2009 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2010 throw new RuntimeException(cce);
2011 } catch (HL7Exception he) {
2012 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2013 throw new RuntimeException(he);
2014 }
2015 return ret;
2016 }
2017
2018
2019
2020 /**
2021 * Returns
2022 * STF-17: "Marital Status" - creates it if necessary
2023 */
2024 public CE getMaritalStatus() {
2025 CE ret = null;
2026 try {
2027 Type t = this.getField(17, 0);
2028 ret = (CE)t;
2029 } catch (ClassCastException cce) {
2030 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2031 throw new RuntimeException(cce);
2032 } catch (HL7Exception he) {
2033 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2034 throw new RuntimeException(he);
2035 }
2036 return ret;
2037 }
2038
2039
2040 /**
2041 * Returns
2042 * STF-17: "Marital Status" - creates it if necessary
2043 */
2044 public CE getStf17_MaritalStatus() {
2045 CE ret = null;
2046 try {
2047 Type t = this.getField(17, 0);
2048 ret = (CE)t;
2049 } catch (ClassCastException cce) {
2050 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2051 throw new RuntimeException(cce);
2052 } catch (HL7Exception he) {
2053 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2054 throw new RuntimeException(he);
2055 }
2056 return ret;
2057 }
2058
2059
2060
2061 /**
2062 * Returns
2063 * STF-18: "Job Title" - creates it if necessary
2064 */
2065 public ST getJobTitle() {
2066 ST ret = null;
2067 try {
2068 Type t = this.getField(18, 0);
2069 ret = (ST)t;
2070 } catch (ClassCastException cce) {
2071 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2072 throw new RuntimeException(cce);
2073 } catch (HL7Exception he) {
2074 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2075 throw new RuntimeException(he);
2076 }
2077 return ret;
2078 }
2079
2080
2081 /**
2082 * Returns
2083 * STF-18: "Job Title" - creates it if necessary
2084 */
2085 public ST getStf18_JobTitle() {
2086 ST ret = null;
2087 try {
2088 Type t = this.getField(18, 0);
2089 ret = (ST)t;
2090 } catch (ClassCastException cce) {
2091 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2092 throw new RuntimeException(cce);
2093 } catch (HL7Exception he) {
2094 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2095 throw new RuntimeException(he);
2096 }
2097 return ret;
2098 }
2099
2100
2101
2102 /**
2103 * Returns
2104 * STF-19: "Job Code/Class" - creates it if necessary
2105 */
2106 public JCC getJobCodeClass() {
2107 JCC ret = null;
2108 try {
2109 Type t = this.getField(19, 0);
2110 ret = (JCC)t;
2111 } catch (ClassCastException cce) {
2112 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2113 throw new RuntimeException(cce);
2114 } catch (HL7Exception he) {
2115 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2116 throw new RuntimeException(he);
2117 }
2118 return ret;
2119 }
2120
2121
2122 /**
2123 * Returns
2124 * STF-19: "Job Code/Class" - creates it if necessary
2125 */
2126 public JCC getStf19_JobCodeClass() {
2127 JCC ret = null;
2128 try {
2129 Type t = this.getField(19, 0);
2130 ret = (JCC)t;
2131 } catch (ClassCastException cce) {
2132 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2133 throw new RuntimeException(cce);
2134 } catch (HL7Exception he) {
2135 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2136 throw new RuntimeException(he);
2137 }
2138 return ret;
2139 }
2140
2141
2142
2143 /**
2144 * Returns
2145 * STF-20: "Employment Status" - creates it if necessary
2146 */
2147 public IS getEmploymentStatus() {
2148 IS ret = null;
2149 try {
2150 Type t = this.getField(20, 0);
2151 ret = (IS)t;
2152 } catch (ClassCastException cce) {
2153 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2154 throw new RuntimeException(cce);
2155 } catch (HL7Exception he) {
2156 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2157 throw new RuntimeException(he);
2158 }
2159 return ret;
2160 }
2161
2162
2163 /**
2164 * Returns
2165 * STF-20: "Employment Status" - creates it if necessary
2166 */
2167 public IS getStf20_EmploymentStatus() {
2168 IS ret = null;
2169 try {
2170 Type t = this.getField(20, 0);
2171 ret = (IS)t;
2172 } catch (ClassCastException cce) {
2173 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2174 throw new RuntimeException(cce);
2175 } catch (HL7Exception he) {
2176 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2177 throw new RuntimeException(he);
2178 }
2179 return ret;
2180 }
2181
2182
2183
2184 /**
2185 * Returns
2186 * STF-21: "Additional Insured on Auto" - creates it if necessary
2187 */
2188 public ID getAdditionalInsuredOnAuto() {
2189 ID ret = null;
2190 try {
2191 Type t = this.getField(21, 0);
2192 ret = (ID)t;
2193 } catch (ClassCastException cce) {
2194 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2195 throw new RuntimeException(cce);
2196 } catch (HL7Exception he) {
2197 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2198 throw new RuntimeException(he);
2199 }
2200 return ret;
2201 }
2202
2203
2204 /**
2205 * Returns
2206 * STF-21: "Additional Insured on Auto" - creates it if necessary
2207 */
2208 public ID getStf21_AdditionalInsuredOnAuto() {
2209 ID ret = null;
2210 try {
2211 Type t = this.getField(21, 0);
2212 ret = (ID)t;
2213 } catch (ClassCastException cce) {
2214 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2215 throw new RuntimeException(cce);
2216 } catch (HL7Exception he) {
2217 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2218 throw new RuntimeException(he);
2219 }
2220 return ret;
2221 }
2222
2223
2224
2225 /**
2226 * Returns
2227 * STF-22: "Driver’s License Number - Staff" - creates it if necessary
2228 */
2229 public DLN getDriverSLicenseNumberStaff() {
2230 DLN ret = null;
2231 try {
2232 Type t = this.getField(22, 0);
2233 ret = (DLN)t;
2234 } catch (ClassCastException cce) {
2235 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2236 throw new RuntimeException(cce);
2237 } catch (HL7Exception he) {
2238 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2239 throw new RuntimeException(he);
2240 }
2241 return ret;
2242 }
2243
2244
2245 /**
2246 * Returns
2247 * STF-22: "Driver’s License Number - Staff" - creates it if necessary
2248 */
2249 public DLN getStf22_DriverSLicenseNumberStaff() {
2250 DLN ret = null;
2251 try {
2252 Type t = this.getField(22, 0);
2253 ret = (DLN)t;
2254 } catch (ClassCastException cce) {
2255 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2256 throw new RuntimeException(cce);
2257 } catch (HL7Exception he) {
2258 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2259 throw new RuntimeException(he);
2260 }
2261 return ret;
2262 }
2263
2264
2265
2266 /**
2267 * Returns
2268 * STF-23: "Copy Auto Ins" - creates it if necessary
2269 */
2270 public ID getCopyAutoIns() {
2271 ID ret = null;
2272 try {
2273 Type t = this.getField(23, 0);
2274 ret = (ID)t;
2275 } catch (ClassCastException cce) {
2276 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2277 throw new RuntimeException(cce);
2278 } catch (HL7Exception he) {
2279 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2280 throw new RuntimeException(he);
2281 }
2282 return ret;
2283 }
2284
2285
2286 /**
2287 * Returns
2288 * STF-23: "Copy Auto Ins" - creates it if necessary
2289 */
2290 public ID getStf23_CopyAutoIns() {
2291 ID ret = null;
2292 try {
2293 Type t = this.getField(23, 0);
2294 ret = (ID)t;
2295 } catch (ClassCastException cce) {
2296 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2297 throw new RuntimeException(cce);
2298 } catch (HL7Exception he) {
2299 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2300 throw new RuntimeException(he);
2301 }
2302 return ret;
2303 }
2304
2305
2306
2307 /**
2308 * Returns
2309 * STF-24: "Auto Ins. Expires" - creates it if necessary
2310 */
2311 public DT getAutoInsExpires() {
2312 DT ret = null;
2313 try {
2314 Type t = this.getField(24, 0);
2315 ret = (DT)t;
2316 } catch (ClassCastException cce) {
2317 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2318 throw new RuntimeException(cce);
2319 } catch (HL7Exception he) {
2320 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2321 throw new RuntimeException(he);
2322 }
2323 return ret;
2324 }
2325
2326
2327 /**
2328 * Returns
2329 * STF-24: "Auto Ins. Expires" - creates it if necessary
2330 */
2331 public DT getStf24_AutoInsExpires() {
2332 DT ret = null;
2333 try {
2334 Type t = this.getField(24, 0);
2335 ret = (DT)t;
2336 } catch (ClassCastException cce) {
2337 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2338 throw new RuntimeException(cce);
2339 } catch (HL7Exception he) {
2340 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2341 throw new RuntimeException(he);
2342 }
2343 return ret;
2344 }
2345
2346
2347
2348 /**
2349 * Returns
2350 * STF-25: "Date Last DMV Review" - creates it if necessary
2351 */
2352 public DT getDateLastDMVReview() {
2353 DT ret = null;
2354 try {
2355 Type t = this.getField(25, 0);
2356 ret = (DT)t;
2357 } catch (ClassCastException cce) {
2358 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2359 throw new RuntimeException(cce);
2360 } catch (HL7Exception he) {
2361 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2362 throw new RuntimeException(he);
2363 }
2364 return ret;
2365 }
2366
2367
2368 /**
2369 * Returns
2370 * STF-25: "Date Last DMV Review" - creates it if necessary
2371 */
2372 public DT getStf25_DateLastDMVReview() {
2373 DT ret = null;
2374 try {
2375 Type t = this.getField(25, 0);
2376 ret = (DT)t;
2377 } catch (ClassCastException cce) {
2378 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2379 throw new RuntimeException(cce);
2380 } catch (HL7Exception he) {
2381 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2382 throw new RuntimeException(he);
2383 }
2384 return ret;
2385 }
2386
2387
2388
2389 /**
2390 * Returns
2391 * STF-26: "Date Next DMV Review" - creates it if necessary
2392 */
2393 public DT getDateNextDMVReview() {
2394 DT ret = null;
2395 try {
2396 Type t = this.getField(26, 0);
2397 ret = (DT)t;
2398 } catch (ClassCastException cce) {
2399 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2400 throw new RuntimeException(cce);
2401 } catch (HL7Exception he) {
2402 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2403 throw new RuntimeException(he);
2404 }
2405 return ret;
2406 }
2407
2408
2409 /**
2410 * Returns
2411 * STF-26: "Date Next DMV Review" - creates it if necessary
2412 */
2413 public DT getStf26_DateNextDMVReview() {
2414 DT ret = null;
2415 try {
2416 Type t = this.getField(26, 0);
2417 ret = (DT)t;
2418 } catch (ClassCastException cce) {
2419 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", cce);
2420 throw new RuntimeException(cce);
2421 } catch (HL7Exception he) {
2422 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected problem obtaining field value. This is a bug.", he);
2423 throw new RuntimeException(he);
2424 }
2425 return ret;
2426 }
2427
2428
2429
2430
2431
2432 /** {@inheritDoc} */
2433 protected Type createNewTypeWithoutReflection(int field) {
2434 switch (field) {
2435 case 0: return new CE(getMessage());
2436 case 1: return new CX(getMessage());
2437 case 2: return new XPN(getMessage());
2438 case 3: return new IS(getMessage(), new Integer( 182 ));
2439 case 4: return new IS(getMessage(), new Integer( 1 ));
2440 case 5: return new TS(getMessage());
2441 case 6: return new ID(getMessage(), new Integer( 183 ));
2442 case 7: return new CE(getMessage());
2443 case 8: return new CE(getMessage());
2444 case 9: return new XTN(getMessage());
2445 case 10: return new XAD(getMessage());
2446 case 11: return new DIN(getMessage());
2447 case 12: return new DIN(getMessage());
2448 case 13: return new CE(getMessage());
2449 case 14: return new ST(getMessage());
2450 case 15: return new CE(getMessage());
2451 case 16: return new CE(getMessage());
2452 case 17: return new ST(getMessage());
2453 case 18: return new JCC(getMessage());
2454 case 19: return new IS(getMessage(), new Integer( 66 ));
2455 case 20: return new ID(getMessage(), new Integer( 136 ));
2456 case 21: return new DLN(getMessage());
2457 case 22: return new ID(getMessage(), new Integer( 136 ));
2458 case 23: return new DT(getMessage());
2459 case 24: return new DT(getMessage());
2460 case 25: return new DT(getMessage());
2461 default: return null;
2462 }
2463 }
2464
2465
2466 }
2467