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 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v22.segment;
035
036// import ca.uhn.hl7v2.model.v22.group.*;
037import ca.uhn.hl7v2.model.v22.datatype.*;
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
041import ca.uhn.hl7v2.model.AbstractMessage;
042import ca.uhn.hl7v2.model.Group;
043import ca.uhn.hl7v2.model.Type;
044import ca.uhn.hl7v2.model.AbstractSegment;
045import ca.uhn.hl7v2.model.Varies;
046
047/**
048 *<p>Represents an HL7 STF message segment (staff identification segment). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>STF-1: STF - primary key value (CE) <b> </b>
052     * <li>STF-2: Staff ID Code (CE) <b>optional repeating</b>
053     * <li>STF-3: Staff Name (PN) <b>optional </b>
054     * <li>STF-4: Staff Type (ID) <b>optional repeating</b>
055     * <li>STF-5: Sex (ID) <b>optional </b>
056     * <li>STF-6: Date of Birth (TS) <b>optional </b>
057     * <li>STF-7: Active / inactive (ID) <b>optional </b>
058     * <li>STF-8: Department (CE) <b>optional repeating</b>
059     * <li>STF-9: Service (CE) <b>optional repeating</b>
060     * <li>STF-10: Phone (TN) <b>optional repeating</b>
061     * <li>STF-11: Office / home address (AD) <b>optional repeating</b>
062     * <li>STF-12: Activation Date (CM_DIN) <b>optional repeating</b>
063     * <li>STF-13: Inactivation Date (CM_DIN) <b>optional repeating</b>
064     * <li>STF-14: Backup Person ID (CE) <b>optional repeating</b>
065     * <li>STF-15: E-mail Address (ST) <b>optional repeating</b>
066     * <li>STF-16: Preferred method of Contact (ID) <b>optional </b>
067 * </ul>
068 */
069@SuppressWarnings("unused")
070public class STF extends AbstractSegment {
071
072    /** 
073     * Creates a new STF segment
074     */
075    public STF(Group parent, ModelClassFactory factory) {
076       super(parent, factory);
077       init(factory);
078    }
079
080    private void init(ModelClassFactory factory) {
081       try {
082                                  this.add(CE.class, true, 1, 60, new Object[]{ getMessage() }, "STF - primary key value");
083                                  this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Staff ID Code");
084                                  this.add(PN.class, false, 1, 48, new Object[]{ getMessage() }, "Staff Name");
085                                              this.add(ID.class, false, 0, 2, new Object[]{ getMessage(), new Integer(182) }, "Staff Type");
086                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(1) }, "Sex");
087                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date of Birth");
088                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(183) }, "Active / inactive");
089                                  this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Department");
090                                  this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Service");
091                                  this.add(TN.class, false, 0, 40, new Object[]{ getMessage() }, "Phone");
092                                  this.add(AD.class, false, 2, 106, new Object[]{ getMessage() }, "Office / home address");
093                                  this.add(CM_DIN.class, false, 0, 19, new Object[]{ getMessage() }, "Activation Date");
094                                  this.add(CM_DIN.class, false, 0, 19, new Object[]{ getMessage() }, "Inactivation Date");
095                                  this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Backup Person ID");
096                                  this.add(ST.class, false, 0, 40, new Object[]{ getMessage() }, "E-mail Address");
097                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(185) }, "Preferred method of Contact");
098       } catch(HL7Exception e) {
099          log.error("Unexpected error creating STF - this is probably a bug in the source code generator.", e);
100       }
101    }
102
103
104
105    /**
106     * Returns
107     * STF-1: "STF - primary key value" - creates it if necessary
108     */
109    public CE getSTFPrimaryKeyValue() { 
110                CE retVal = this.getTypedField(1, 0);
111                return retVal;
112    }
113    
114    /**
115     * Returns
116     * STF-1: "STF - primary key value" - creates it if necessary
117     */
118    public CE getStf1_STFPrimaryKeyValue() { 
119                CE retVal = this.getTypedField(1, 0);
120                return retVal;
121    }
122
123
124    /**
125     * Returns all repetitions of Staff ID Code (STF-2).
126     */
127    public CE[] getStaffIDCode() {
128        CE[] retVal = this.getTypedField(2, new CE[0]);
129        return retVal;
130    }
131
132
133    /**
134     * Returns all repetitions of Staff ID Code (STF-2).
135     */
136    public CE[] getStf2_StaffIDCode() {
137        CE[] retVal = this.getTypedField(2, new CE[0]);
138        return retVal;
139    }
140
141
142    /**
143     * Returns a count of the current number of repetitions of Staff ID Code (STF-2).
144     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
145     * it will return zero.
146     */
147    public int getStaffIDCodeReps() {
148        return this.getReps(2);
149    }
150
151
152    /**
153     * Returns a specific repetition of
154     * STF-2: "Staff ID Code" - creates it if necessary
155     *
156     * @param rep The repetition index (0-indexed)
157     */
158    public CE getStaffIDCode(int rep) { 
159                CE retVal = this.getTypedField(2, rep);
160                return retVal;
161    }
162
163    /**
164     * Returns a specific repetition of
165     * STF-2: "Staff ID Code" - creates it if necessary
166     *
167     * @param rep The repetition index (0-indexed)
168     */
169    public CE getStf2_StaffIDCode(int rep) { 
170                CE retVal = this.getTypedField(2, rep);
171                return retVal;
172    }
173
174    /**
175     * Returns a count of the current number of repetitions of Staff ID Code (STF-2).
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 getStf2_StaffIDCodeReps() {
180        return this.getReps(2);
181    }
182
183
184    /**
185     * Inserts a repetition of
186     * STF-2: "Staff ID Code" at a specific index
187     *
188     * @param rep The repetition index (0-indexed)
189     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
190     */
191    public CE insertStaffIDCode(int rep) throws HL7Exception { 
192        return (CE) super.insertRepetition(2, rep);
193    }
194
195
196    /**
197     * Inserts a repetition of
198     * STF-2: "Staff ID Code" at a specific index
199     *
200     * @param rep The repetition index (0-indexed)
201     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
202     */
203    public CE insertStf2_StaffIDCode(int rep) throws HL7Exception { 
204        return (CE) super.insertRepetition(2, rep);
205    }
206
207
208    /**
209     * Removes a repetition of
210     * STF-2: "Staff ID Code" at a specific index
211     *
212     * @param rep The repetition index (0-indexed)
213     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
214     */
215    public CE removeStaffIDCode(int rep) throws HL7Exception { 
216        return (CE) super.removeRepetition(2, rep);
217    }
218
219
220    /**
221     * Removes a repetition of
222     * STF-2: "Staff ID Code" at a specific index
223     *
224     * @param rep The repetition index (0-indexed)
225     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
226     */
227    public CE removeStf2_StaffIDCode(int rep) throws HL7Exception { 
228        return (CE) super.removeRepetition(2, rep);
229    }
230
231
232
233
234    /**
235     * Returns
236     * STF-3: "Staff Name" - creates it if necessary
237     */
238    public PN getStaffName() { 
239                PN retVal = this.getTypedField(3, 0);
240                return retVal;
241    }
242    
243    /**
244     * Returns
245     * STF-3: "Staff Name" - creates it if necessary
246     */
247    public PN getStf3_StaffName() { 
248                PN retVal = this.getTypedField(3, 0);
249                return retVal;
250    }
251
252
253    /**
254     * Returns all repetitions of Staff Type (STF-4).
255     */
256    public ID[] getStaffType() {
257        ID[] retVal = this.getTypedField(4, new ID[0]);
258        return retVal;
259    }
260
261
262    /**
263     * Returns all repetitions of Staff Type (STF-4).
264     */
265    public ID[] getStf4_StaffType() {
266        ID[] retVal = this.getTypedField(4, new ID[0]);
267        return retVal;
268    }
269
270
271    /**
272     * Returns a count of the current number of repetitions of Staff Type (STF-4).
273     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
274     * it will return zero.
275     */
276    public int getStaffTypeReps() {
277        return this.getReps(4);
278    }
279
280
281    /**
282     * Returns a specific repetition of
283     * STF-4: "Staff Type" - creates it if necessary
284     *
285     * @param rep The repetition index (0-indexed)
286     */
287    public ID getStaffType(int rep) { 
288                ID retVal = this.getTypedField(4, rep);
289                return retVal;
290    }
291
292    /**
293     * Returns a specific repetition of
294     * STF-4: "Staff Type" - creates it if necessary
295     *
296     * @param rep The repetition index (0-indexed)
297     */
298    public ID getStf4_StaffType(int rep) { 
299                ID retVal = this.getTypedField(4, rep);
300                return retVal;
301    }
302
303    /**
304     * Returns a count of the current number of repetitions of Staff Type (STF-4).
305     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
306     * it will return zero.
307     */
308    public int getStf4_StaffTypeReps() {
309        return this.getReps(4);
310    }
311
312
313    /**
314     * Inserts a repetition of
315     * STF-4: "Staff Type" at a specific index
316     *
317     * @param rep The repetition index (0-indexed)
318     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
319     */
320    public ID insertStaffType(int rep) throws HL7Exception { 
321        return (ID) super.insertRepetition(4, rep);
322    }
323
324
325    /**
326     * Inserts a repetition of
327     * STF-4: "Staff Type" at a specific index
328     *
329     * @param rep The repetition index (0-indexed)
330     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
331     */
332    public ID insertStf4_StaffType(int rep) throws HL7Exception { 
333        return (ID) super.insertRepetition(4, rep);
334    }
335
336
337    /**
338     * Removes a repetition of
339     * STF-4: "Staff Type" at a specific index
340     *
341     * @param rep The repetition index (0-indexed)
342     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
343     */
344    public ID removeStaffType(int rep) throws HL7Exception { 
345        return (ID) super.removeRepetition(4, rep);
346    }
347
348
349    /**
350     * Removes a repetition of
351     * STF-4: "Staff Type" at a specific index
352     *
353     * @param rep The repetition index (0-indexed)
354     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
355     */
356    public ID removeStf4_StaffType(int rep) throws HL7Exception { 
357        return (ID) super.removeRepetition(4, rep);
358    }
359
360
361
362
363    /**
364     * Returns
365     * STF-5: "Sex" - creates it if necessary
366     */
367    public ID getSex() { 
368                ID retVal = this.getTypedField(5, 0);
369                return retVal;
370    }
371    
372    /**
373     * Returns
374     * STF-5: "Sex" - creates it if necessary
375     */
376    public ID getStf5_Sex() { 
377                ID retVal = this.getTypedField(5, 0);
378                return retVal;
379    }
380
381
382
383    /**
384     * Returns
385     * STF-6: "Date of Birth" - creates it if necessary
386     */
387    public TS getDateOfBirth() { 
388                TS retVal = this.getTypedField(6, 0);
389                return retVal;
390    }
391    
392    /**
393     * Returns
394     * STF-6: "Date of Birth" - creates it if necessary
395     */
396    public TS getStf6_DateOfBirth() { 
397                TS retVal = this.getTypedField(6, 0);
398                return retVal;
399    }
400
401
402
403    /**
404     * Returns
405     * STF-7: "Active / inactive" - creates it if necessary
406     */
407    public ID getActiveInactive() { 
408                ID retVal = this.getTypedField(7, 0);
409                return retVal;
410    }
411    
412    /**
413     * Returns
414     * STF-7: "Active / inactive" - creates it if necessary
415     */
416    public ID getStf7_ActiveInactive() { 
417                ID retVal = this.getTypedField(7, 0);
418                return retVal;
419    }
420
421
422    /**
423     * Returns all repetitions of Department (STF-8).
424     */
425    public CE[] getDepartment() {
426        CE[] retVal = this.getTypedField(8, new CE[0]);
427        return retVal;
428    }
429
430
431    /**
432     * Returns all repetitions of Department (STF-8).
433     */
434    public CE[] getStf8_Department() {
435        CE[] retVal = this.getTypedField(8, new CE[0]);
436        return retVal;
437    }
438
439
440    /**
441     * Returns a count of the current number of repetitions of Department (STF-8).
442     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
443     * it will return zero.
444     */
445    public int getDepartmentReps() {
446        return this.getReps(8);
447    }
448
449
450    /**
451     * Returns a specific repetition of
452     * STF-8: "Department" - creates it if necessary
453     *
454     * @param rep The repetition index (0-indexed)
455     */
456    public CE getDepartment(int rep) { 
457                CE retVal = this.getTypedField(8, rep);
458                return retVal;
459    }
460
461    /**
462     * Returns a specific repetition of
463     * STF-8: "Department" - creates it if necessary
464     *
465     * @param rep The repetition index (0-indexed)
466     */
467    public CE getStf8_Department(int rep) { 
468                CE retVal = this.getTypedField(8, rep);
469                return retVal;
470    }
471
472    /**
473     * Returns a count of the current number of repetitions of Department (STF-8).
474     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
475     * it will return zero.
476     */
477    public int getStf8_DepartmentReps() {
478        return this.getReps(8);
479    }
480
481
482    /**
483     * Inserts a repetition of
484     * STF-8: "Department" at a specific index
485     *
486     * @param rep The repetition index (0-indexed)
487     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
488     */
489    public CE insertDepartment(int rep) throws HL7Exception { 
490        return (CE) super.insertRepetition(8, rep);
491    }
492
493
494    /**
495     * Inserts a repetition of
496     * STF-8: "Department" at a specific index
497     *
498     * @param rep The repetition index (0-indexed)
499     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
500     */
501    public CE insertStf8_Department(int rep) throws HL7Exception { 
502        return (CE) super.insertRepetition(8, rep);
503    }
504
505
506    /**
507     * Removes a repetition of
508     * STF-8: "Department" at a specific index
509     *
510     * @param rep The repetition index (0-indexed)
511     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
512     */
513    public CE removeDepartment(int rep) throws HL7Exception { 
514        return (CE) super.removeRepetition(8, rep);
515    }
516
517
518    /**
519     * Removes a repetition of
520     * STF-8: "Department" at a specific index
521     *
522     * @param rep The repetition index (0-indexed)
523     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
524     */
525    public CE removeStf8_Department(int rep) throws HL7Exception { 
526        return (CE) super.removeRepetition(8, rep);
527    }
528
529
530
531    /**
532     * Returns all repetitions of Service (STF-9).
533     */
534    public CE[] getService() {
535        CE[] retVal = this.getTypedField(9, new CE[0]);
536        return retVal;
537    }
538
539
540    /**
541     * Returns all repetitions of Service (STF-9).
542     */
543    public CE[] getStf9_Service() {
544        CE[] retVal = this.getTypedField(9, new CE[0]);
545        return retVal;
546    }
547
548
549    /**
550     * Returns a count of the current number of repetitions of Service (STF-9).
551     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
552     * it will return zero.
553     */
554    public int getServiceReps() {
555        return this.getReps(9);
556    }
557
558
559    /**
560     * Returns a specific repetition of
561     * STF-9: "Service" - creates it if necessary
562     *
563     * @param rep The repetition index (0-indexed)
564     */
565    public CE getService(int rep) { 
566                CE retVal = this.getTypedField(9, rep);
567                return retVal;
568    }
569
570    /**
571     * Returns a specific repetition of
572     * STF-9: "Service" - creates it if necessary
573     *
574     * @param rep The repetition index (0-indexed)
575     */
576    public CE getStf9_Service(int rep) { 
577                CE retVal = this.getTypedField(9, rep);
578                return retVal;
579    }
580
581    /**
582     * Returns a count of the current number of repetitions of Service (STF-9).
583     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
584     * it will return zero.
585     */
586    public int getStf9_ServiceReps() {
587        return this.getReps(9);
588    }
589
590
591    /**
592     * Inserts a repetition of
593     * STF-9: "Service" at a specific index
594     *
595     * @param rep The repetition index (0-indexed)
596     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
597     */
598    public CE insertService(int rep) throws HL7Exception { 
599        return (CE) super.insertRepetition(9, rep);
600    }
601
602
603    /**
604     * Inserts a repetition of
605     * STF-9: "Service" at a specific index
606     *
607     * @param rep The repetition index (0-indexed)
608     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
609     */
610    public CE insertStf9_Service(int rep) throws HL7Exception { 
611        return (CE) super.insertRepetition(9, rep);
612    }
613
614
615    /**
616     * Removes a repetition of
617     * STF-9: "Service" at a specific index
618     *
619     * @param rep The repetition index (0-indexed)
620     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
621     */
622    public CE removeService(int rep) throws HL7Exception { 
623        return (CE) super.removeRepetition(9, rep);
624    }
625
626
627    /**
628     * Removes a repetition of
629     * STF-9: "Service" at a specific index
630     *
631     * @param rep The repetition index (0-indexed)
632     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
633     */
634    public CE removeStf9_Service(int rep) throws HL7Exception { 
635        return (CE) super.removeRepetition(9, rep);
636    }
637
638
639
640    /**
641     * Returns all repetitions of Phone (STF-10).
642     */
643    public TN[] getPhone() {
644        TN[] retVal = this.getTypedField(10, new TN[0]);
645        return retVal;
646    }
647
648
649    /**
650     * Returns all repetitions of Phone (STF-10).
651     */
652    public TN[] getStf10_Phone() {
653        TN[] retVal = this.getTypedField(10, new TN[0]);
654        return retVal;
655    }
656
657
658    /**
659     * Returns a count of the current number of repetitions of Phone (STF-10).
660     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
661     * it will return zero.
662     */
663    public int getPhoneReps() {
664        return this.getReps(10);
665    }
666
667
668    /**
669     * Returns a specific repetition of
670     * STF-10: "Phone" - creates it if necessary
671     *
672     * @param rep The repetition index (0-indexed)
673     */
674    public TN getPhone(int rep) { 
675                TN retVal = this.getTypedField(10, rep);
676                return retVal;
677    }
678
679    /**
680     * Returns a specific repetition of
681     * STF-10: "Phone" - creates it if necessary
682     *
683     * @param rep The repetition index (0-indexed)
684     */
685    public TN getStf10_Phone(int rep) { 
686                TN retVal = this.getTypedField(10, rep);
687                return retVal;
688    }
689
690    /**
691     * Returns a count of the current number of repetitions of Phone (STF-10).
692     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
693     * it will return zero.
694     */
695    public int getStf10_PhoneReps() {
696        return this.getReps(10);
697    }
698
699
700    /**
701     * Inserts a repetition of
702     * STF-10: "Phone" at a specific index
703     *
704     * @param rep The repetition index (0-indexed)
705     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
706     */
707    public TN insertPhone(int rep) throws HL7Exception { 
708        return (TN) super.insertRepetition(10, rep);
709    }
710
711
712    /**
713     * Inserts a repetition of
714     * STF-10: "Phone" at a specific index
715     *
716     * @param rep The repetition index (0-indexed)
717     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
718     */
719    public TN insertStf10_Phone(int rep) throws HL7Exception { 
720        return (TN) super.insertRepetition(10, rep);
721    }
722
723
724    /**
725     * Removes a repetition of
726     * STF-10: "Phone" at a specific index
727     *
728     * @param rep The repetition index (0-indexed)
729     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
730     */
731    public TN removePhone(int rep) throws HL7Exception { 
732        return (TN) super.removeRepetition(10, rep);
733    }
734
735
736    /**
737     * Removes a repetition of
738     * STF-10: "Phone" at a specific index
739     *
740     * @param rep The repetition index (0-indexed)
741     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
742     */
743    public TN removeStf10_Phone(int rep) throws HL7Exception { 
744        return (TN) super.removeRepetition(10, rep);
745    }
746
747
748
749    /**
750     * Returns all repetitions of Office / home address (STF-11).
751     */
752    public AD[] getOfficeHomeAddress() {
753        AD[] retVal = this.getTypedField(11, new AD[0]);
754        return retVal;
755    }
756
757
758    /**
759     * Returns all repetitions of Office / home address (STF-11).
760     */
761    public AD[] getStf11_OfficeHomeAddress() {
762        AD[] retVal = this.getTypedField(11, new AD[0]);
763        return retVal;
764    }
765
766
767    /**
768     * Returns a count of the current number of repetitions of Office / home address (STF-11).
769     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
770     * it will return zero.
771     */
772    public int getOfficeHomeAddressReps() {
773        return this.getReps(11);
774    }
775
776
777    /**
778     * Returns a specific repetition of
779     * STF-11: "Office / home address" - creates it if necessary
780     *
781     * @param rep The repetition index (0-indexed)
782     */
783    public AD getOfficeHomeAddress(int rep) { 
784                AD retVal = this.getTypedField(11, rep);
785                return retVal;
786    }
787
788    /**
789     * Returns a specific repetition of
790     * STF-11: "Office / home address" - creates it if necessary
791     *
792     * @param rep The repetition index (0-indexed)
793     */
794    public AD getStf11_OfficeHomeAddress(int rep) { 
795                AD retVal = this.getTypedField(11, rep);
796                return retVal;
797    }
798
799    /**
800     * Returns a count of the current number of repetitions of Office / home address (STF-11).
801     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
802     * it will return zero.
803     */
804    public int getStf11_OfficeHomeAddressReps() {
805        return this.getReps(11);
806    }
807
808
809    /**
810     * Inserts a repetition of
811     * STF-11: "Office / home address" at a specific index
812     *
813     * @param rep The repetition index (0-indexed)
814     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
815     */
816    public AD insertOfficeHomeAddress(int rep) throws HL7Exception { 
817        return (AD) super.insertRepetition(11, rep);
818    }
819
820
821    /**
822     * Inserts a repetition of
823     * STF-11: "Office / home address" at a specific index
824     *
825     * @param rep The repetition index (0-indexed)
826     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
827     */
828    public AD insertStf11_OfficeHomeAddress(int rep) throws HL7Exception { 
829        return (AD) super.insertRepetition(11, rep);
830    }
831
832
833    /**
834     * Removes a repetition of
835     * STF-11: "Office / home address" at a specific index
836     *
837     * @param rep The repetition index (0-indexed)
838     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
839     */
840    public AD removeOfficeHomeAddress(int rep) throws HL7Exception { 
841        return (AD) super.removeRepetition(11, rep);
842    }
843
844
845    /**
846     * Removes a repetition of
847     * STF-11: "Office / home address" at a specific index
848     *
849     * @param rep The repetition index (0-indexed)
850     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
851     */
852    public AD removeStf11_OfficeHomeAddress(int rep) throws HL7Exception { 
853        return (AD) super.removeRepetition(11, rep);
854    }
855
856
857
858    /**
859     * Returns all repetitions of Activation Date (STF-12).
860     */
861    public CM_DIN[] getActivationDate() {
862        CM_DIN[] retVal = this.getTypedField(12, new CM_DIN[0]);
863        return retVal;
864    }
865
866
867    /**
868     * Returns all repetitions of Activation Date (STF-12).
869     */
870    public CM_DIN[] getStf12_ActivationDate() {
871        CM_DIN[] retVal = this.getTypedField(12, new CM_DIN[0]);
872        return retVal;
873    }
874
875
876    /**
877     * Returns a count of the current number of repetitions of Activation Date (STF-12).
878     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
879     * it will return zero.
880     */
881    public int getActivationDateReps() {
882        return this.getReps(12);
883    }
884
885
886    /**
887     * Returns a specific repetition of
888     * STF-12: "Activation Date" - creates it if necessary
889     *
890     * @param rep The repetition index (0-indexed)
891     */
892    public CM_DIN getActivationDate(int rep) { 
893                CM_DIN retVal = this.getTypedField(12, rep);
894                return retVal;
895    }
896
897    /**
898     * Returns a specific repetition of
899     * STF-12: "Activation Date" - creates it if necessary
900     *
901     * @param rep The repetition index (0-indexed)
902     */
903    public CM_DIN getStf12_ActivationDate(int rep) { 
904                CM_DIN retVal = this.getTypedField(12, rep);
905                return retVal;
906    }
907
908    /**
909     * Returns a count of the current number of repetitions of Activation Date (STF-12).
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 getStf12_ActivationDateReps() {
914        return this.getReps(12);
915    }
916
917
918    /**
919     * Inserts a repetition of
920     * STF-12: "Activation Date" at a specific index
921     *
922     * @param rep The repetition index (0-indexed)
923     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
924     */
925    public CM_DIN insertActivationDate(int rep) throws HL7Exception { 
926        return (CM_DIN) super.insertRepetition(12, rep);
927    }
928
929
930    /**
931     * Inserts a repetition of
932     * STF-12: "Activation Date" at a specific index
933     *
934     * @param rep The repetition index (0-indexed)
935     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
936     */
937    public CM_DIN insertStf12_ActivationDate(int rep) throws HL7Exception { 
938        return (CM_DIN) super.insertRepetition(12, rep);
939    }
940
941
942    /**
943     * Removes a repetition of
944     * STF-12: "Activation Date" at a specific index
945     *
946     * @param rep The repetition index (0-indexed)
947     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
948     */
949    public CM_DIN removeActivationDate(int rep) throws HL7Exception { 
950        return (CM_DIN) super.removeRepetition(12, rep);
951    }
952
953
954    /**
955     * Removes a repetition of
956     * STF-12: "Activation Date" at a specific index
957     *
958     * @param rep The repetition index (0-indexed)
959     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
960     */
961    public CM_DIN removeStf12_ActivationDate(int rep) throws HL7Exception { 
962        return (CM_DIN) super.removeRepetition(12, rep);
963    }
964
965
966
967    /**
968     * Returns all repetitions of Inactivation Date (STF-13).
969     */
970    public CM_DIN[] getInactivationDate() {
971        CM_DIN[] retVal = this.getTypedField(13, new CM_DIN[0]);
972        return retVal;
973    }
974
975
976    /**
977     * Returns all repetitions of Inactivation Date (STF-13).
978     */
979    public CM_DIN[] getStf13_InactivationDate() {
980        CM_DIN[] retVal = this.getTypedField(13, new CM_DIN[0]);
981        return retVal;
982    }
983
984
985    /**
986     * Returns a count of the current number of repetitions of Inactivation Date (STF-13).
987     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
988     * it will return zero.
989     */
990    public int getInactivationDateReps() {
991        return this.getReps(13);
992    }
993
994
995    /**
996     * Returns a specific repetition of
997     * STF-13: "Inactivation Date" - creates it if necessary
998     *
999     * @param rep The repetition index (0-indexed)
1000     */
1001    public CM_DIN getInactivationDate(int rep) { 
1002                CM_DIN retVal = this.getTypedField(13, rep);
1003                return retVal;
1004    }
1005
1006    /**
1007     * Returns a specific repetition of
1008     * STF-13: "Inactivation Date" - creates it if necessary
1009     *
1010     * @param rep The repetition index (0-indexed)
1011     */
1012    public CM_DIN getStf13_InactivationDate(int rep) { 
1013                CM_DIN retVal = this.getTypedField(13, rep);
1014                return retVal;
1015    }
1016
1017    /**
1018     * Returns a count of the current number of repetitions of Inactivation Date (STF-13).
1019     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1020     * it will return zero.
1021     */
1022    public int getStf13_InactivationDateReps() {
1023        return this.getReps(13);
1024    }
1025
1026
1027    /**
1028     * Inserts a repetition of
1029     * STF-13: "Inactivation Date" at a specific index
1030     *
1031     * @param rep The repetition index (0-indexed)
1032     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1033     */
1034    public CM_DIN insertInactivationDate(int rep) throws HL7Exception { 
1035        return (CM_DIN) super.insertRepetition(13, rep);
1036    }
1037
1038
1039    /**
1040     * Inserts a repetition of
1041     * STF-13: "Inactivation Date" at a specific index
1042     *
1043     * @param rep The repetition index (0-indexed)
1044     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1045     */
1046    public CM_DIN insertStf13_InactivationDate(int rep) throws HL7Exception { 
1047        return (CM_DIN) super.insertRepetition(13, rep);
1048    }
1049
1050
1051    /**
1052     * Removes a repetition of
1053     * STF-13: "Inactivation Date" at a specific index
1054     *
1055     * @param rep The repetition index (0-indexed)
1056     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1057     */
1058    public CM_DIN removeInactivationDate(int rep) throws HL7Exception { 
1059        return (CM_DIN) super.removeRepetition(13, rep);
1060    }
1061
1062
1063    /**
1064     * Removes a repetition of
1065     * STF-13: "Inactivation Date" at a specific index
1066     *
1067     * @param rep The repetition index (0-indexed)
1068     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1069     */
1070    public CM_DIN removeStf13_InactivationDate(int rep) throws HL7Exception { 
1071        return (CM_DIN) super.removeRepetition(13, rep);
1072    }
1073
1074
1075
1076    /**
1077     * Returns all repetitions of Backup Person ID (STF-14).
1078     */
1079    public CE[] getBackupPersonID() {
1080        CE[] retVal = this.getTypedField(14, new CE[0]);
1081        return retVal;
1082    }
1083
1084
1085    /**
1086     * Returns all repetitions of Backup Person ID (STF-14).
1087     */
1088    public CE[] getStf14_BackupPersonID() {
1089        CE[] retVal = this.getTypedField(14, new CE[0]);
1090        return retVal;
1091    }
1092
1093
1094    /**
1095     * Returns a count of the current number of repetitions of Backup Person ID (STF-14).
1096     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1097     * it will return zero.
1098     */
1099    public int getBackupPersonIDReps() {
1100        return this.getReps(14);
1101    }
1102
1103
1104    /**
1105     * Returns a specific repetition of
1106     * STF-14: "Backup Person ID" - creates it if necessary
1107     *
1108     * @param rep The repetition index (0-indexed)
1109     */
1110    public CE getBackupPersonID(int rep) { 
1111                CE retVal = this.getTypedField(14, rep);
1112                return retVal;
1113    }
1114
1115    /**
1116     * Returns a specific repetition of
1117     * STF-14: "Backup Person ID" - creates it if necessary
1118     *
1119     * @param rep The repetition index (0-indexed)
1120     */
1121    public CE getStf14_BackupPersonID(int rep) { 
1122                CE retVal = this.getTypedField(14, rep);
1123                return retVal;
1124    }
1125
1126    /**
1127     * Returns a count of the current number of repetitions of Backup Person ID (STF-14).
1128     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1129     * it will return zero.
1130     */
1131    public int getStf14_BackupPersonIDReps() {
1132        return this.getReps(14);
1133    }
1134
1135
1136    /**
1137     * Inserts a repetition of
1138     * STF-14: "Backup Person ID" at a specific index
1139     *
1140     * @param rep The repetition index (0-indexed)
1141     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1142     */
1143    public CE insertBackupPersonID(int rep) throws HL7Exception { 
1144        return (CE) super.insertRepetition(14, rep);
1145    }
1146
1147
1148    /**
1149     * Inserts a repetition of
1150     * STF-14: "Backup Person ID" 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 CE insertStf14_BackupPersonID(int rep) throws HL7Exception { 
1156        return (CE) super.insertRepetition(14, rep);
1157    }
1158
1159
1160    /**
1161     * Removes a repetition of
1162     * STF-14: "Backup Person ID" at a specific index
1163     *
1164     * @param rep The repetition index (0-indexed)
1165     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1166     */
1167    public CE removeBackupPersonID(int rep) throws HL7Exception { 
1168        return (CE) super.removeRepetition(14, rep);
1169    }
1170
1171
1172    /**
1173     * Removes a repetition of
1174     * STF-14: "Backup Person ID" at a specific index
1175     *
1176     * @param rep The repetition index (0-indexed)
1177     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1178     */
1179    public CE removeStf14_BackupPersonID(int rep) throws HL7Exception { 
1180        return (CE) super.removeRepetition(14, rep);
1181    }
1182
1183
1184
1185    /**
1186     * Returns all repetitions of E-mail Address (STF-15).
1187     */
1188    public ST[] getEMailAddress() {
1189        ST[] retVal = this.getTypedField(15, new ST[0]);
1190        return retVal;
1191    }
1192
1193
1194    /**
1195     * Returns all repetitions of E-mail Address (STF-15).
1196     */
1197    public ST[] getStf15_EMailAddress() {
1198        ST[] retVal = this.getTypedField(15, new ST[0]);
1199        return retVal;
1200    }
1201
1202
1203    /**
1204     * Returns a count of the current number of repetitions of E-mail Address (STF-15).
1205     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1206     * it will return zero.
1207     */
1208    public int getEMailAddressReps() {
1209        return this.getReps(15);
1210    }
1211
1212
1213    /**
1214     * Returns a specific repetition of
1215     * STF-15: "E-mail Address" - creates it if necessary
1216     *
1217     * @param rep The repetition index (0-indexed)
1218     */
1219    public ST getEMailAddress(int rep) { 
1220                ST retVal = this.getTypedField(15, rep);
1221                return retVal;
1222    }
1223
1224    /**
1225     * Returns a specific repetition of
1226     * STF-15: "E-mail Address" - creates it if necessary
1227     *
1228     * @param rep The repetition index (0-indexed)
1229     */
1230    public ST getStf15_EMailAddress(int rep) { 
1231                ST retVal = this.getTypedField(15, rep);
1232                return retVal;
1233    }
1234
1235    /**
1236     * Returns a count of the current number of repetitions of E-mail Address (STF-15).
1237     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1238     * it will return zero.
1239     */
1240    public int getStf15_EMailAddressReps() {
1241        return this.getReps(15);
1242    }
1243
1244
1245    /**
1246     * Inserts a repetition of
1247     * STF-15: "E-mail Address" at a specific index
1248     *
1249     * @param rep The repetition index (0-indexed)
1250     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1251     */
1252    public ST insertEMailAddress(int rep) throws HL7Exception { 
1253        return (ST) super.insertRepetition(15, rep);
1254    }
1255
1256
1257    /**
1258     * Inserts a repetition of
1259     * STF-15: "E-mail Address" at a specific index
1260     *
1261     * @param rep The repetition index (0-indexed)
1262     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1263     */
1264    public ST insertStf15_EMailAddress(int rep) throws HL7Exception { 
1265        return (ST) super.insertRepetition(15, rep);
1266    }
1267
1268
1269    /**
1270     * Removes a repetition of
1271     * STF-15: "E-mail Address" at a specific index
1272     *
1273     * @param rep The repetition index (0-indexed)
1274     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1275     */
1276    public ST removeEMailAddress(int rep) throws HL7Exception { 
1277        return (ST) super.removeRepetition(15, rep);
1278    }
1279
1280
1281    /**
1282     * Removes a repetition of
1283     * STF-15: "E-mail Address" at a specific index
1284     *
1285     * @param rep The repetition index (0-indexed)
1286     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1287     */
1288    public ST removeStf15_EMailAddress(int rep) throws HL7Exception { 
1289        return (ST) super.removeRepetition(15, rep);
1290    }
1291
1292
1293
1294
1295    /**
1296     * Returns
1297     * STF-16: "Preferred method of Contact" - creates it if necessary
1298     */
1299    public ID getPreferredMethodOfContact() { 
1300                ID retVal = this.getTypedField(16, 0);
1301                return retVal;
1302    }
1303    
1304    /**
1305     * Returns
1306     * STF-16: "Preferred method of Contact" - creates it if necessary
1307     */
1308    public ID getStf16_PreferredMethodOfContact() { 
1309                ID retVal = this.getTypedField(16, 0);
1310                return retVal;
1311    }
1312
1313
1314
1315
1316
1317    /** {@inheritDoc} */   
1318    protected Type createNewTypeWithoutReflection(int field) {
1319       switch (field) {
1320          case 0: return new CE(getMessage());
1321          case 1: return new CE(getMessage());
1322          case 2: return new PN(getMessage());
1323          case 3: return new ID(getMessage(), new Integer( 182 ));
1324          case 4: return new ID(getMessage(), new Integer( 1 ));
1325          case 5: return new TS(getMessage());
1326          case 6: return new ID(getMessage(), new Integer( 183 ));
1327          case 7: return new CE(getMessage());
1328          case 8: return new CE(getMessage());
1329          case 9: return new TN(getMessage());
1330          case 10: return new AD(getMessage());
1331          case 11: return new CM_DIN(getMessage());
1332          case 12: return new CM_DIN(getMessage());
1333          case 13: return new CE(getMessage());
1334          case 14: return new ST(getMessage());
1335          case 15: return new ID(getMessage(), new Integer( 185 ));
1336          default: return null;
1337       }
1338   }
1339
1340
1341}
1342