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.v23.segment;
035
036// import ca.uhn.hl7v2.model.v23.group.*;
037import ca.uhn.hl7v2.model.v23.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 UB2 message segment (UB92 data). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>UB2-1: Set ID - UB2 (SI) <b>optional </b>
052     * <li>UB2-2: Co-Insurance Days (9) (ST) <b>optional </b>
053     * <li>UB2-3: Condition Code (24-30) (ID) <b>optional repeating</b>
054     * <li>UB2-4: Covered Days (7) (ST) <b>optional </b>
055     * <li>UB2-5: Non-Covered Days (8) (ST) <b>optional </b>
056     * <li>UB2-6: Value Amount & Code (CM_UVC) <b>optional repeating</b>
057     * <li>UB2-7: Occurrence Code & Date (32-35) (CM_OCD) <b>optional repeating</b>
058     * <li>UB2-8: Occurrence Span Code/Dates (36) (CM_OSP) <b>optional repeating</b>
059     * <li>UB2-9: UB92 Locator 2 (State) (ST) <b>optional repeating</b>
060     * <li>UB2-10: UB92 Locator 11 (State) (ST) <b>optional repeating</b>
061     * <li>UB2-11: UB92 Locator 31 (National) (ST) <b>optional </b>
062     * <li>UB2-12: Document Control Number (ST) <b>optional repeating</b>
063     * <li>UB2-13: UB92 Locator 49 (National) (ST) <b>optional repeating</b>
064     * <li>UB2-14: UB92 Locator 56 (State) (ST) <b>optional repeating</b>
065     * <li>UB2-15: UB92 Locator 57 (National) (ST) <b>optional </b>
066     * <li>UB2-16: UB92 Locator 78 (State) (ST) <b>optional repeating</b>
067     * <li>UB2-17: Special Visit Count (NM) <b>optional </b>
068 * </ul>
069 */
070@SuppressWarnings("unused")
071public class UB2 extends AbstractSegment {
072
073    /** 
074     * Creates a new UB2 segment
075     */
076    public UB2(Group parent, ModelClassFactory factory) {
077       super(parent, factory);
078       init(factory);
079    }
080
081    private void init(ModelClassFactory factory) {
082       try {
083                                  this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - UB2");
084                                  this.add(ST.class, false, 1, 3, new Object[]{ getMessage() }, "Co-Insurance Days (9)");
085                                              this.add(ID.class, false, 7, 2, new Object[]{ getMessage(), new Integer(43) }, "Condition Code (24-30)");
086                                  this.add(ST.class, false, 1, 3, new Object[]{ getMessage() }, "Covered Days (7)");
087                                  this.add(ST.class, false, 1, 4, new Object[]{ getMessage() }, "Non-Covered Days (8)");
088                                  this.add(CM_UVC.class, false, 12, 11, new Object[]{ getMessage() }, "Value Amount & Code");
089                                  this.add(CM_OCD.class, false, 8, 11, new Object[]{ getMessage() }, "Occurrence Code & Date (32-35)");
090                                  this.add(CM_OSP.class, false, 2, 28, new Object[]{ getMessage() }, "Occurrence Span Code/Dates (36)");
091                                  this.add(ST.class, false, 2, 29, new Object[]{ getMessage() }, "UB92 Locator 2 (State)");
092                                  this.add(ST.class, false, 2, 12, new Object[]{ getMessage() }, "UB92 Locator 11 (State)");
093                                  this.add(ST.class, false, 1, 5, new Object[]{ getMessage() }, "UB92 Locator 31 (National)");
094                                  this.add(ST.class, false, 3, 23, new Object[]{ getMessage() }, "Document Control Number");
095                                  this.add(ST.class, false, 23, 4, new Object[]{ getMessage() }, "UB92 Locator 49 (National)");
096                                  this.add(ST.class, false, 5, 14, new Object[]{ getMessage() }, "UB92 Locator 56 (State)");
097                                  this.add(ST.class, false, 1, 27, new Object[]{ getMessage() }, "UB92 Locator 57 (National)");
098                                  this.add(ST.class, false, 2, 2, new Object[]{ getMessage() }, "UB92 Locator 78 (State)");
099                                  this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Special Visit Count");
100       } catch(HL7Exception e) {
101          log.error("Unexpected error creating UB2 - this is probably a bug in the source code generator.", e);
102       }
103    }
104
105
106
107    /**
108     * Returns
109     * UB2-1: "Set ID - UB2" - creates it if necessary
110     */
111    public SI getSetIDUB2() { 
112                SI retVal = this.getTypedField(1, 0);
113                return retVal;
114    }
115    
116    /**
117     * Returns
118     * UB2-1: "Set ID - UB2" - creates it if necessary
119     */
120    public SI getUb21_SetIDUB2() { 
121                SI retVal = this.getTypedField(1, 0);
122                return retVal;
123    }
124
125
126
127    /**
128     * Returns
129     * UB2-2: "Co-Insurance Days (9)" - creates it if necessary
130     */
131    public ST getCoInsuranceDays9() { 
132                ST retVal = this.getTypedField(2, 0);
133                return retVal;
134    }
135    
136    /**
137     * Returns
138     * UB2-2: "Co-Insurance Days (9)" - creates it if necessary
139     */
140    public ST getUb22_CoInsuranceDays9() { 
141                ST retVal = this.getTypedField(2, 0);
142                return retVal;
143    }
144
145
146    /**
147     * Returns all repetitions of Condition Code (24-30) (UB2-3).
148     */
149    public ID[] getConditionCode2430() {
150        ID[] retVal = this.getTypedField(3, new ID[0]);
151        return retVal;
152    }
153
154
155    /**
156     * Returns all repetitions of Condition Code (24-30) (UB2-3).
157     */
158    public ID[] getUb23_ConditionCode2430() {
159        ID[] retVal = this.getTypedField(3, new ID[0]);
160        return retVal;
161    }
162
163
164    /**
165     * Returns a count of the current number of repetitions of Condition Code (24-30) (UB2-3).
166     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
167     * it will return zero.
168     */
169    public int getConditionCode2430Reps() {
170        return this.getReps(3);
171    }
172
173
174    /**
175     * Returns a specific repetition of
176     * UB2-3: "Condition Code (24-30)" - creates it if necessary
177     *
178     * @param rep The repetition index (0-indexed)
179     */
180    public ID getConditionCode2430(int rep) { 
181                ID retVal = this.getTypedField(3, rep);
182                return retVal;
183    }
184
185    /**
186     * Returns a specific repetition of
187     * UB2-3: "Condition Code (24-30)" - creates it if necessary
188     *
189     * @param rep The repetition index (0-indexed)
190     */
191    public ID getUb23_ConditionCode2430(int rep) { 
192                ID retVal = this.getTypedField(3, rep);
193                return retVal;
194    }
195
196    /**
197     * Returns a count of the current number of repetitions of Condition Code (24-30) (UB2-3).
198     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
199     * it will return zero.
200     */
201    public int getUb23_ConditionCode2430Reps() {
202        return this.getReps(3);
203    }
204
205
206    /**
207     * Inserts a repetition of
208     * UB2-3: "Condition Code (24-30)" at a specific index
209     *
210     * @param rep The repetition index (0-indexed)
211     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
212     */
213    public ID insertConditionCode2430(int rep) throws HL7Exception { 
214        return (ID) super.insertRepetition(3, rep);
215    }
216
217
218    /**
219     * Inserts a repetition of
220     * UB2-3: "Condition Code (24-30)" at a specific index
221     *
222     * @param rep The repetition index (0-indexed)
223     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
224     */
225    public ID insertUb23_ConditionCode2430(int rep) throws HL7Exception { 
226        return (ID) super.insertRepetition(3, rep);
227    }
228
229
230    /**
231     * Removes a repetition of
232     * UB2-3: "Condition Code (24-30)" at a specific index
233     *
234     * @param rep The repetition index (0-indexed)
235     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
236     */
237    public ID removeConditionCode2430(int rep) throws HL7Exception { 
238        return (ID) super.removeRepetition(3, rep);
239    }
240
241
242    /**
243     * Removes a repetition of
244     * UB2-3: "Condition Code (24-30)" at a specific index
245     *
246     * @param rep The repetition index (0-indexed)
247     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
248     */
249    public ID removeUb23_ConditionCode2430(int rep) throws HL7Exception { 
250        return (ID) super.removeRepetition(3, rep);
251    }
252
253
254
255
256    /**
257     * Returns
258     * UB2-4: "Covered Days (7)" - creates it if necessary
259     */
260    public ST getCoveredDays7() { 
261                ST retVal = this.getTypedField(4, 0);
262                return retVal;
263    }
264    
265    /**
266     * Returns
267     * UB2-4: "Covered Days (7)" - creates it if necessary
268     */
269    public ST getUb24_CoveredDays7() { 
270                ST retVal = this.getTypedField(4, 0);
271                return retVal;
272    }
273
274
275
276    /**
277     * Returns
278     * UB2-5: "Non-Covered Days (8)" - creates it if necessary
279     */
280    public ST getNonCoveredDays8() { 
281                ST retVal = this.getTypedField(5, 0);
282                return retVal;
283    }
284    
285    /**
286     * Returns
287     * UB2-5: "Non-Covered Days (8)" - creates it if necessary
288     */
289    public ST getUb25_NonCoveredDays8() { 
290                ST retVal = this.getTypedField(5, 0);
291                return retVal;
292    }
293
294
295    /**
296     * Returns all repetitions of Value Amount & Code (UB2-6).
297     */
298    public CM_UVC[] getValueAmountCode() {
299        CM_UVC[] retVal = this.getTypedField(6, new CM_UVC[0]);
300        return retVal;
301    }
302
303
304    /**
305     * Returns all repetitions of Value Amount & Code (UB2-6).
306     */
307    public CM_UVC[] getUb26_ValueAmountCode() {
308        CM_UVC[] retVal = this.getTypedField(6, new CM_UVC[0]);
309        return retVal;
310    }
311
312
313    /**
314     * Returns a count of the current number of repetitions of Value Amount & Code (UB2-6).
315     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
316     * it will return zero.
317     */
318    public int getValueAmountCodeReps() {
319        return this.getReps(6);
320    }
321
322
323    /**
324     * Returns a specific repetition of
325     * UB2-6: "Value Amount & Code" - creates it if necessary
326     *
327     * @param rep The repetition index (0-indexed)
328     */
329    public CM_UVC getValueAmountCode(int rep) { 
330                CM_UVC retVal = this.getTypedField(6, rep);
331                return retVal;
332    }
333
334    /**
335     * Returns a specific repetition of
336     * UB2-6: "Value Amount & Code" - creates it if necessary
337     *
338     * @param rep The repetition index (0-indexed)
339     */
340    public CM_UVC getUb26_ValueAmountCode(int rep) { 
341                CM_UVC retVal = this.getTypedField(6, rep);
342                return retVal;
343    }
344
345    /**
346     * Returns a count of the current number of repetitions of Value Amount & Code (UB2-6).
347     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
348     * it will return zero.
349     */
350    public int getUb26_ValueAmountCodeReps() {
351        return this.getReps(6);
352    }
353
354
355    /**
356     * Inserts a repetition of
357     * UB2-6: "Value Amount & Code" at a specific index
358     *
359     * @param rep The repetition index (0-indexed)
360     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
361     */
362    public CM_UVC insertValueAmountCode(int rep) throws HL7Exception { 
363        return (CM_UVC) super.insertRepetition(6, rep);
364    }
365
366
367    /**
368     * Inserts a repetition of
369     * UB2-6: "Value Amount & Code" at a specific index
370     *
371     * @param rep The repetition index (0-indexed)
372     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
373     */
374    public CM_UVC insertUb26_ValueAmountCode(int rep) throws HL7Exception { 
375        return (CM_UVC) super.insertRepetition(6, rep);
376    }
377
378
379    /**
380     * Removes a repetition of
381     * UB2-6: "Value Amount & Code" at a specific index
382     *
383     * @param rep The repetition index (0-indexed)
384     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
385     */
386    public CM_UVC removeValueAmountCode(int rep) throws HL7Exception { 
387        return (CM_UVC) super.removeRepetition(6, rep);
388    }
389
390
391    /**
392     * Removes a repetition of
393     * UB2-6: "Value Amount & Code" at a specific index
394     *
395     * @param rep The repetition index (0-indexed)
396     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
397     */
398    public CM_UVC removeUb26_ValueAmountCode(int rep) throws HL7Exception { 
399        return (CM_UVC) super.removeRepetition(6, rep);
400    }
401
402
403
404    /**
405     * Returns all repetitions of Occurrence Code & Date (32-35) (UB2-7).
406     */
407    public CM_OCD[] getOccurrenceCodeDate3235() {
408        CM_OCD[] retVal = this.getTypedField(7, new CM_OCD[0]);
409        return retVal;
410    }
411
412
413    /**
414     * Returns all repetitions of Occurrence Code & Date (32-35) (UB2-7).
415     */
416    public CM_OCD[] getUb27_OccurrenceCodeDate3235() {
417        CM_OCD[] retVal = this.getTypedField(7, new CM_OCD[0]);
418        return retVal;
419    }
420
421
422    /**
423     * Returns a count of the current number of repetitions of Occurrence Code & Date (32-35) (UB2-7).
424     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
425     * it will return zero.
426     */
427    public int getOccurrenceCodeDate3235Reps() {
428        return this.getReps(7);
429    }
430
431
432    /**
433     * Returns a specific repetition of
434     * UB2-7: "Occurrence Code & Date (32-35)" - creates it if necessary
435     *
436     * @param rep The repetition index (0-indexed)
437     */
438    public CM_OCD getOccurrenceCodeDate3235(int rep) { 
439                CM_OCD retVal = this.getTypedField(7, rep);
440                return retVal;
441    }
442
443    /**
444     * Returns a specific repetition of
445     * UB2-7: "Occurrence Code & Date (32-35)" - creates it if necessary
446     *
447     * @param rep The repetition index (0-indexed)
448     */
449    public CM_OCD getUb27_OccurrenceCodeDate3235(int rep) { 
450                CM_OCD retVal = this.getTypedField(7, rep);
451                return retVal;
452    }
453
454    /**
455     * Returns a count of the current number of repetitions of Occurrence Code & Date (32-35) (UB2-7).
456     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
457     * it will return zero.
458     */
459    public int getUb27_OccurrenceCodeDate3235Reps() {
460        return this.getReps(7);
461    }
462
463
464    /**
465     * Inserts a repetition of
466     * UB2-7: "Occurrence Code & Date (32-35)" at a specific index
467     *
468     * @param rep The repetition index (0-indexed)
469     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
470     */
471    public CM_OCD insertOccurrenceCodeDate3235(int rep) throws HL7Exception { 
472        return (CM_OCD) super.insertRepetition(7, rep);
473    }
474
475
476    /**
477     * Inserts a repetition of
478     * UB2-7: "Occurrence Code & Date (32-35)" at a specific index
479     *
480     * @param rep The repetition index (0-indexed)
481     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
482     */
483    public CM_OCD insertUb27_OccurrenceCodeDate3235(int rep) throws HL7Exception { 
484        return (CM_OCD) super.insertRepetition(7, rep);
485    }
486
487
488    /**
489     * Removes a repetition of
490     * UB2-7: "Occurrence Code & Date (32-35)" at a specific index
491     *
492     * @param rep The repetition index (0-indexed)
493     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
494     */
495    public CM_OCD removeOccurrenceCodeDate3235(int rep) throws HL7Exception { 
496        return (CM_OCD) super.removeRepetition(7, rep);
497    }
498
499
500    /**
501     * Removes a repetition of
502     * UB2-7: "Occurrence Code & Date (32-35)" at a specific index
503     *
504     * @param rep The repetition index (0-indexed)
505     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
506     */
507    public CM_OCD removeUb27_OccurrenceCodeDate3235(int rep) throws HL7Exception { 
508        return (CM_OCD) super.removeRepetition(7, rep);
509    }
510
511
512
513    /**
514     * Returns all repetitions of Occurrence Span Code/Dates (36) (UB2-8).
515     */
516    public CM_OSP[] getOccurrenceSpanCodeDates() {
517        CM_OSP[] retVal = this.getTypedField(8, new CM_OSP[0]);
518        return retVal;
519    }
520
521
522    /**
523     * Returns all repetitions of Occurrence Span Code/Dates (36) (UB2-8).
524     */
525    public CM_OSP[] getUb28_OccurrenceSpanCodeDates() {
526        CM_OSP[] retVal = this.getTypedField(8, new CM_OSP[0]);
527        return retVal;
528    }
529
530
531    /**
532     * Returns a count of the current number of repetitions of Occurrence Span Code/Dates (36) (UB2-8).
533     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
534     * it will return zero.
535     */
536    public int getOccurrenceSpanCodeDatesReps() {
537        return this.getReps(8);
538    }
539
540
541    /**
542     * Returns a specific repetition of
543     * UB2-8: "Occurrence Span Code/Dates (36)" - creates it if necessary
544     *
545     * @param rep The repetition index (0-indexed)
546     */
547    public CM_OSP getOccurrenceSpanCodeDates(int rep) { 
548                CM_OSP retVal = this.getTypedField(8, rep);
549                return retVal;
550    }
551
552    /**
553     * Returns a specific repetition of
554     * UB2-8: "Occurrence Span Code/Dates (36)" - creates it if necessary
555     *
556     * @param rep The repetition index (0-indexed)
557     */
558    public CM_OSP getUb28_OccurrenceSpanCodeDates(int rep) { 
559                CM_OSP retVal = this.getTypedField(8, rep);
560                return retVal;
561    }
562
563    /**
564     * Returns a count of the current number of repetitions of Occurrence Span Code/Dates (36) (UB2-8).
565     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
566     * it will return zero.
567     */
568    public int getUb28_OccurrenceSpanCodeDatesReps() {
569        return this.getReps(8);
570    }
571
572
573    /**
574     * Inserts a repetition of
575     * UB2-8: "Occurrence Span Code/Dates (36)" at a specific index
576     *
577     * @param rep The repetition index (0-indexed)
578     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
579     */
580    public CM_OSP insertOccurrenceSpanCodeDates(int rep) throws HL7Exception { 
581        return (CM_OSP) super.insertRepetition(8, rep);
582    }
583
584
585    /**
586     * Inserts a repetition of
587     * UB2-8: "Occurrence Span Code/Dates (36)" at a specific index
588     *
589     * @param rep The repetition index (0-indexed)
590     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
591     */
592    public CM_OSP insertUb28_OccurrenceSpanCodeDates(int rep) throws HL7Exception { 
593        return (CM_OSP) super.insertRepetition(8, rep);
594    }
595
596
597    /**
598     * Removes a repetition of
599     * UB2-8: "Occurrence Span Code/Dates (36)" at a specific index
600     *
601     * @param rep The repetition index (0-indexed)
602     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
603     */
604    public CM_OSP removeOccurrenceSpanCodeDates(int rep) throws HL7Exception { 
605        return (CM_OSP) super.removeRepetition(8, rep);
606    }
607
608
609    /**
610     * Removes a repetition of
611     * UB2-8: "Occurrence Span Code/Dates (36)" at a specific index
612     *
613     * @param rep The repetition index (0-indexed)
614     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
615     */
616    public CM_OSP removeUb28_OccurrenceSpanCodeDates(int rep) throws HL7Exception { 
617        return (CM_OSP) super.removeRepetition(8, rep);
618    }
619
620
621
622    /**
623     * Returns all repetitions of UB92 Locator 2 (State) (UB2-9).
624     */
625    public ST[] getUB92Locator2State() {
626        ST[] retVal = this.getTypedField(9, new ST[0]);
627        return retVal;
628    }
629
630
631    /**
632     * Returns all repetitions of UB92 Locator 2 (State) (UB2-9).
633     */
634    public ST[] getUb29_UB92Locator2State() {
635        ST[] retVal = this.getTypedField(9, new ST[0]);
636        return retVal;
637    }
638
639
640    /**
641     * Returns a count of the current number of repetitions of UB92 Locator 2 (State) (UB2-9).
642     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
643     * it will return zero.
644     */
645    public int getUB92Locator2StateReps() {
646        return this.getReps(9);
647    }
648
649
650    /**
651     * Returns a specific repetition of
652     * UB2-9: "UB92 Locator 2 (State)" - creates it if necessary
653     *
654     * @param rep The repetition index (0-indexed)
655     */
656    public ST getUB92Locator2State(int rep) { 
657                ST retVal = this.getTypedField(9, rep);
658                return retVal;
659    }
660
661    /**
662     * Returns a specific repetition of
663     * UB2-9: "UB92 Locator 2 (State)" - creates it if necessary
664     *
665     * @param rep The repetition index (0-indexed)
666     */
667    public ST getUb29_UB92Locator2State(int rep) { 
668                ST retVal = this.getTypedField(9, rep);
669                return retVal;
670    }
671
672    /**
673     * Returns a count of the current number of repetitions of UB92 Locator 2 (State) (UB2-9).
674     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
675     * it will return zero.
676     */
677    public int getUb29_UB92Locator2StateReps() {
678        return this.getReps(9);
679    }
680
681
682    /**
683     * Inserts a repetition of
684     * UB2-9: "UB92 Locator 2 (State)" at a specific index
685     *
686     * @param rep The repetition index (0-indexed)
687     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
688     */
689    public ST insertUB92Locator2State(int rep) throws HL7Exception { 
690        return (ST) super.insertRepetition(9, rep);
691    }
692
693
694    /**
695     * Inserts a repetition of
696     * UB2-9: "UB92 Locator 2 (State)" at a specific index
697     *
698     * @param rep The repetition index (0-indexed)
699     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
700     */
701    public ST insertUb29_UB92Locator2State(int rep) throws HL7Exception { 
702        return (ST) super.insertRepetition(9, rep);
703    }
704
705
706    /**
707     * Removes a repetition of
708     * UB2-9: "UB92 Locator 2 (State)" at a specific index
709     *
710     * @param rep The repetition index (0-indexed)
711     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
712     */
713    public ST removeUB92Locator2State(int rep) throws HL7Exception { 
714        return (ST) super.removeRepetition(9, rep);
715    }
716
717
718    /**
719     * Removes a repetition of
720     * UB2-9: "UB92 Locator 2 (State)" at a specific index
721     *
722     * @param rep The repetition index (0-indexed)
723     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
724     */
725    public ST removeUb29_UB92Locator2State(int rep) throws HL7Exception { 
726        return (ST) super.removeRepetition(9, rep);
727    }
728
729
730
731    /**
732     * Returns all repetitions of UB92 Locator 11 (State) (UB2-10).
733     */
734    public ST[] getUB92Locator11State() {
735        ST[] retVal = this.getTypedField(10, new ST[0]);
736        return retVal;
737    }
738
739
740    /**
741     * Returns all repetitions of UB92 Locator 11 (State) (UB2-10).
742     */
743    public ST[] getUb210_UB92Locator11State() {
744        ST[] retVal = this.getTypedField(10, new ST[0]);
745        return retVal;
746    }
747
748
749    /**
750     * Returns a count of the current number of repetitions of UB92 Locator 11 (State) (UB2-10).
751     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
752     * it will return zero.
753     */
754    public int getUB92Locator11StateReps() {
755        return this.getReps(10);
756    }
757
758
759    /**
760     * Returns a specific repetition of
761     * UB2-10: "UB92 Locator 11 (State)" - creates it if necessary
762     *
763     * @param rep The repetition index (0-indexed)
764     */
765    public ST getUB92Locator11State(int rep) { 
766                ST retVal = this.getTypedField(10, rep);
767                return retVal;
768    }
769
770    /**
771     * Returns a specific repetition of
772     * UB2-10: "UB92 Locator 11 (State)" - creates it if necessary
773     *
774     * @param rep The repetition index (0-indexed)
775     */
776    public ST getUb210_UB92Locator11State(int rep) { 
777                ST retVal = this.getTypedField(10, rep);
778                return retVal;
779    }
780
781    /**
782     * Returns a count of the current number of repetitions of UB92 Locator 11 (State) (UB2-10).
783     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
784     * it will return zero.
785     */
786    public int getUb210_UB92Locator11StateReps() {
787        return this.getReps(10);
788    }
789
790
791    /**
792     * Inserts a repetition of
793     * UB2-10: "UB92 Locator 11 (State)" at a specific index
794     *
795     * @param rep The repetition index (0-indexed)
796     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
797     */
798    public ST insertUB92Locator11State(int rep) throws HL7Exception { 
799        return (ST) super.insertRepetition(10, rep);
800    }
801
802
803    /**
804     * Inserts a repetition of
805     * UB2-10: "UB92 Locator 11 (State)" at a specific index
806     *
807     * @param rep The repetition index (0-indexed)
808     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
809     */
810    public ST insertUb210_UB92Locator11State(int rep) throws HL7Exception { 
811        return (ST) super.insertRepetition(10, rep);
812    }
813
814
815    /**
816     * Removes a repetition of
817     * UB2-10: "UB92 Locator 11 (State)" at a specific index
818     *
819     * @param rep The repetition index (0-indexed)
820     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
821     */
822    public ST removeUB92Locator11State(int rep) throws HL7Exception { 
823        return (ST) super.removeRepetition(10, rep);
824    }
825
826
827    /**
828     * Removes a repetition of
829     * UB2-10: "UB92 Locator 11 (State)" at a specific index
830     *
831     * @param rep The repetition index (0-indexed)
832     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
833     */
834    public ST removeUb210_UB92Locator11State(int rep) throws HL7Exception { 
835        return (ST) super.removeRepetition(10, rep);
836    }
837
838
839
840
841    /**
842     * Returns
843     * UB2-11: "UB92 Locator 31 (National)" - creates it if necessary
844     */
845    public ST getUB92Locator31National() { 
846                ST retVal = this.getTypedField(11, 0);
847                return retVal;
848    }
849    
850    /**
851     * Returns
852     * UB2-11: "UB92 Locator 31 (National)" - creates it if necessary
853     */
854    public ST getUb211_UB92Locator31National() { 
855                ST retVal = this.getTypedField(11, 0);
856                return retVal;
857    }
858
859
860    /**
861     * Returns all repetitions of Document Control Number (UB2-12).
862     */
863    public ST[] getDocumentControlNumber() {
864        ST[] retVal = this.getTypedField(12, new ST[0]);
865        return retVal;
866    }
867
868
869    /**
870     * Returns all repetitions of Document Control Number (UB2-12).
871     */
872    public ST[] getUb212_DocumentControlNumber() {
873        ST[] retVal = this.getTypedField(12, new ST[0]);
874        return retVal;
875    }
876
877
878    /**
879     * Returns a count of the current number of repetitions of Document Control Number (UB2-12).
880     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
881     * it will return zero.
882     */
883    public int getDocumentControlNumberReps() {
884        return this.getReps(12);
885    }
886
887
888    /**
889     * Returns a specific repetition of
890     * UB2-12: "Document Control Number" - creates it if necessary
891     *
892     * @param rep The repetition index (0-indexed)
893     */
894    public ST getDocumentControlNumber(int rep) { 
895                ST retVal = this.getTypedField(12, rep);
896                return retVal;
897    }
898
899    /**
900     * Returns a specific repetition of
901     * UB2-12: "Document Control Number" - creates it if necessary
902     *
903     * @param rep The repetition index (0-indexed)
904     */
905    public ST getUb212_DocumentControlNumber(int rep) { 
906                ST retVal = this.getTypedField(12, rep);
907                return retVal;
908    }
909
910    /**
911     * Returns a count of the current number of repetitions of Document Control Number (UB2-12).
912     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
913     * it will return zero.
914     */
915    public int getUb212_DocumentControlNumberReps() {
916        return this.getReps(12);
917    }
918
919
920    /**
921     * Inserts a repetition of
922     * UB2-12: "Document Control Number" at a specific index
923     *
924     * @param rep The repetition index (0-indexed)
925     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
926     */
927    public ST insertDocumentControlNumber(int rep) throws HL7Exception { 
928        return (ST) super.insertRepetition(12, rep);
929    }
930
931
932    /**
933     * Inserts a repetition of
934     * UB2-12: "Document Control Number" at a specific index
935     *
936     * @param rep The repetition index (0-indexed)
937     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
938     */
939    public ST insertUb212_DocumentControlNumber(int rep) throws HL7Exception { 
940        return (ST) super.insertRepetition(12, rep);
941    }
942
943
944    /**
945     * Removes a repetition of
946     * UB2-12: "Document Control Number" at a specific index
947     *
948     * @param rep The repetition index (0-indexed)
949     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
950     */
951    public ST removeDocumentControlNumber(int rep) throws HL7Exception { 
952        return (ST) super.removeRepetition(12, rep);
953    }
954
955
956    /**
957     * Removes a repetition of
958     * UB2-12: "Document Control Number" at a specific index
959     *
960     * @param rep The repetition index (0-indexed)
961     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
962     */
963    public ST removeUb212_DocumentControlNumber(int rep) throws HL7Exception { 
964        return (ST) super.removeRepetition(12, rep);
965    }
966
967
968
969    /**
970     * Returns all repetitions of UB92 Locator 49 (National) (UB2-13).
971     */
972    public ST[] getUB92Locator49National() {
973        ST[] retVal = this.getTypedField(13, new ST[0]);
974        return retVal;
975    }
976
977
978    /**
979     * Returns all repetitions of UB92 Locator 49 (National) (UB2-13).
980     */
981    public ST[] getUb213_UB92Locator49National() {
982        ST[] retVal = this.getTypedField(13, new ST[0]);
983        return retVal;
984    }
985
986
987    /**
988     * Returns a count of the current number of repetitions of UB92 Locator 49 (National) (UB2-13).
989     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
990     * it will return zero.
991     */
992    public int getUB92Locator49NationalReps() {
993        return this.getReps(13);
994    }
995
996
997    /**
998     * Returns a specific repetition of
999     * UB2-13: "UB92 Locator 49 (National)" - creates it if necessary
1000     *
1001     * @param rep The repetition index (0-indexed)
1002     */
1003    public ST getUB92Locator49National(int rep) { 
1004                ST retVal = this.getTypedField(13, rep);
1005                return retVal;
1006    }
1007
1008    /**
1009     * Returns a specific repetition of
1010     * UB2-13: "UB92 Locator 49 (National)" - creates it if necessary
1011     *
1012     * @param rep The repetition index (0-indexed)
1013     */
1014    public ST getUb213_UB92Locator49National(int rep) { 
1015                ST retVal = this.getTypedField(13, rep);
1016                return retVal;
1017    }
1018
1019    /**
1020     * Returns a count of the current number of repetitions of UB92 Locator 49 (National) (UB2-13).
1021     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1022     * it will return zero.
1023     */
1024    public int getUb213_UB92Locator49NationalReps() {
1025        return this.getReps(13);
1026    }
1027
1028
1029    /**
1030     * Inserts a repetition of
1031     * UB2-13: "UB92 Locator 49 (National)" at a specific index
1032     *
1033     * @param rep The repetition index (0-indexed)
1034     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1035     */
1036    public ST insertUB92Locator49National(int rep) throws HL7Exception { 
1037        return (ST) super.insertRepetition(13, rep);
1038    }
1039
1040
1041    /**
1042     * Inserts a repetition of
1043     * UB2-13: "UB92 Locator 49 (National)" at a specific index
1044     *
1045     * @param rep The repetition index (0-indexed)
1046     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1047     */
1048    public ST insertUb213_UB92Locator49National(int rep) throws HL7Exception { 
1049        return (ST) super.insertRepetition(13, rep);
1050    }
1051
1052
1053    /**
1054     * Removes a repetition of
1055     * UB2-13: "UB92 Locator 49 (National)" at a specific index
1056     *
1057     * @param rep The repetition index (0-indexed)
1058     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1059     */
1060    public ST removeUB92Locator49National(int rep) throws HL7Exception { 
1061        return (ST) super.removeRepetition(13, rep);
1062    }
1063
1064
1065    /**
1066     * Removes a repetition of
1067     * UB2-13: "UB92 Locator 49 (National)" at a specific index
1068     *
1069     * @param rep The repetition index (0-indexed)
1070     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1071     */
1072    public ST removeUb213_UB92Locator49National(int rep) throws HL7Exception { 
1073        return (ST) super.removeRepetition(13, rep);
1074    }
1075
1076
1077
1078    /**
1079     * Returns all repetitions of UB92 Locator 56 (State) (UB2-14).
1080     */
1081    public ST[] getUB92Locator56State() {
1082        ST[] retVal = this.getTypedField(14, new ST[0]);
1083        return retVal;
1084    }
1085
1086
1087    /**
1088     * Returns all repetitions of UB92 Locator 56 (State) (UB2-14).
1089     */
1090    public ST[] getUb214_UB92Locator56State() {
1091        ST[] retVal = this.getTypedField(14, new ST[0]);
1092        return retVal;
1093    }
1094
1095
1096    /**
1097     * Returns a count of the current number of repetitions of UB92 Locator 56 (State) (UB2-14).
1098     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1099     * it will return zero.
1100     */
1101    public int getUB92Locator56StateReps() {
1102        return this.getReps(14);
1103    }
1104
1105
1106    /**
1107     * Returns a specific repetition of
1108     * UB2-14: "UB92 Locator 56 (State)" - creates it if necessary
1109     *
1110     * @param rep The repetition index (0-indexed)
1111     */
1112    public ST getUB92Locator56State(int rep) { 
1113                ST retVal = this.getTypedField(14, rep);
1114                return retVal;
1115    }
1116
1117    /**
1118     * Returns a specific repetition of
1119     * UB2-14: "UB92 Locator 56 (State)" - creates it if necessary
1120     *
1121     * @param rep The repetition index (0-indexed)
1122     */
1123    public ST getUb214_UB92Locator56State(int rep) { 
1124                ST retVal = this.getTypedField(14, rep);
1125                return retVal;
1126    }
1127
1128    /**
1129     * Returns a count of the current number of repetitions of UB92 Locator 56 (State) (UB2-14).
1130     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1131     * it will return zero.
1132     */
1133    public int getUb214_UB92Locator56StateReps() {
1134        return this.getReps(14);
1135    }
1136
1137
1138    /**
1139     * Inserts a repetition of
1140     * UB2-14: "UB92 Locator 56 (State)" at a specific index
1141     *
1142     * @param rep The repetition index (0-indexed)
1143     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1144     */
1145    public ST insertUB92Locator56State(int rep) throws HL7Exception { 
1146        return (ST) super.insertRepetition(14, rep);
1147    }
1148
1149
1150    /**
1151     * Inserts a repetition of
1152     * UB2-14: "UB92 Locator 56 (State)" at a specific index
1153     *
1154     * @param rep The repetition index (0-indexed)
1155     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1156     */
1157    public ST insertUb214_UB92Locator56State(int rep) throws HL7Exception { 
1158        return (ST) super.insertRepetition(14, rep);
1159    }
1160
1161
1162    /**
1163     * Removes a repetition of
1164     * UB2-14: "UB92 Locator 56 (State)" at a specific index
1165     *
1166     * @param rep The repetition index (0-indexed)
1167     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1168     */
1169    public ST removeUB92Locator56State(int rep) throws HL7Exception { 
1170        return (ST) super.removeRepetition(14, rep);
1171    }
1172
1173
1174    /**
1175     * Removes a repetition of
1176     * UB2-14: "UB92 Locator 56 (State)" at a specific index
1177     *
1178     * @param rep The repetition index (0-indexed)
1179     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1180     */
1181    public ST removeUb214_UB92Locator56State(int rep) throws HL7Exception { 
1182        return (ST) super.removeRepetition(14, rep);
1183    }
1184
1185
1186
1187
1188    /**
1189     * Returns
1190     * UB2-15: "UB92 Locator 57 (National)" - creates it if necessary
1191     */
1192    public ST getUB92Locator57National() { 
1193                ST retVal = this.getTypedField(15, 0);
1194                return retVal;
1195    }
1196    
1197    /**
1198     * Returns
1199     * UB2-15: "UB92 Locator 57 (National)" - creates it if necessary
1200     */
1201    public ST getUb215_UB92Locator57National() { 
1202                ST retVal = this.getTypedField(15, 0);
1203                return retVal;
1204    }
1205
1206
1207    /**
1208     * Returns all repetitions of UB92 Locator 78 (State) (UB2-16).
1209     */
1210    public ST[] getUB92Locator78State() {
1211        ST[] retVal = this.getTypedField(16, new ST[0]);
1212        return retVal;
1213    }
1214
1215
1216    /**
1217     * Returns all repetitions of UB92 Locator 78 (State) (UB2-16).
1218     */
1219    public ST[] getUb216_UB92Locator78State() {
1220        ST[] retVal = this.getTypedField(16, new ST[0]);
1221        return retVal;
1222    }
1223
1224
1225    /**
1226     * Returns a count of the current number of repetitions of UB92 Locator 78 (State) (UB2-16).
1227     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1228     * it will return zero.
1229     */
1230    public int getUB92Locator78StateReps() {
1231        return this.getReps(16);
1232    }
1233
1234
1235    /**
1236     * Returns a specific repetition of
1237     * UB2-16: "UB92 Locator 78 (State)" - creates it if necessary
1238     *
1239     * @param rep The repetition index (0-indexed)
1240     */
1241    public ST getUB92Locator78State(int rep) { 
1242                ST retVal = this.getTypedField(16, rep);
1243                return retVal;
1244    }
1245
1246    /**
1247     * Returns a specific repetition of
1248     * UB2-16: "UB92 Locator 78 (State)" - creates it if necessary
1249     *
1250     * @param rep The repetition index (0-indexed)
1251     */
1252    public ST getUb216_UB92Locator78State(int rep) { 
1253                ST retVal = this.getTypedField(16, rep);
1254                return retVal;
1255    }
1256
1257    /**
1258     * Returns a count of the current number of repetitions of UB92 Locator 78 (State) (UB2-16).
1259     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1260     * it will return zero.
1261     */
1262    public int getUb216_UB92Locator78StateReps() {
1263        return this.getReps(16);
1264    }
1265
1266
1267    /**
1268     * Inserts a repetition of
1269     * UB2-16: "UB92 Locator 78 (State)" at a specific index
1270     *
1271     * @param rep The repetition index (0-indexed)
1272     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1273     */
1274    public ST insertUB92Locator78State(int rep) throws HL7Exception { 
1275        return (ST) super.insertRepetition(16, rep);
1276    }
1277
1278
1279    /**
1280     * Inserts a repetition of
1281     * UB2-16: "UB92 Locator 78 (State)" at a specific index
1282     *
1283     * @param rep The repetition index (0-indexed)
1284     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1285     */
1286    public ST insertUb216_UB92Locator78State(int rep) throws HL7Exception { 
1287        return (ST) super.insertRepetition(16, rep);
1288    }
1289
1290
1291    /**
1292     * Removes a repetition of
1293     * UB2-16: "UB92 Locator 78 (State)" at a specific index
1294     *
1295     * @param rep The repetition index (0-indexed)
1296     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1297     */
1298    public ST removeUB92Locator78State(int rep) throws HL7Exception { 
1299        return (ST) super.removeRepetition(16, rep);
1300    }
1301
1302
1303    /**
1304     * Removes a repetition of
1305     * UB2-16: "UB92 Locator 78 (State)" at a specific index
1306     *
1307     * @param rep The repetition index (0-indexed)
1308     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1309     */
1310    public ST removeUb216_UB92Locator78State(int rep) throws HL7Exception { 
1311        return (ST) super.removeRepetition(16, rep);
1312    }
1313
1314
1315
1316
1317    /**
1318     * Returns
1319     * UB2-17: "Special Visit Count" - creates it if necessary
1320     */
1321    public NM getSpecialVisitCount() { 
1322                NM retVal = this.getTypedField(17, 0);
1323                return retVal;
1324    }
1325    
1326    /**
1327     * Returns
1328     * UB2-17: "Special Visit Count" - creates it if necessary
1329     */
1330    public NM getUb217_SpecialVisitCount() { 
1331                NM retVal = this.getTypedField(17, 0);
1332                return retVal;
1333    }
1334
1335
1336
1337
1338
1339    /** {@inheritDoc} */   
1340    protected Type createNewTypeWithoutReflection(int field) {
1341       switch (field) {
1342          case 0: return new SI(getMessage());
1343          case 1: return new ST(getMessage());
1344          case 2: return new ID(getMessage(), new Integer( 43 ));
1345          case 3: return new ST(getMessage());
1346          case 4: return new ST(getMessage());
1347          case 5: return new CM_UVC(getMessage());
1348          case 6: return new CM_OCD(getMessage());
1349          case 7: return new CM_OSP(getMessage());
1350          case 8: return new ST(getMessage());
1351          case 9: return new ST(getMessage());
1352          case 10: return new ST(getMessage());
1353          case 11: return new ST(getMessage());
1354          case 12: return new ST(getMessage());
1355          case 13: return new ST(getMessage());
1356          case 14: return new ST(getMessage());
1357          case 15: return new ST(getMessage());
1358          case 16: return new NM(getMessage());
1359          default: return null;
1360       }
1361   }
1362
1363
1364}
1365