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