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