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.v24.segment;
035
036// import ca.uhn.hl7v2.model.v24.group.*;
037import ca.uhn.hl7v2.model.v24.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 UB1 message segment (UB82). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>UB1-1: Set ID - UB1 (SI) <b>optional </b>
053     * <li>UB1-2: Blood Deductible  (43) (NM) <b>optional </b>
054     * <li>UB1-3: Blood Furnished-Pints Of (40) (NM) <b>optional </b>
055     * <li>UB1-4: Blood Replaced-Pints (41) (NM) <b>optional </b>
056     * <li>UB1-5: Blood Not Replaced-Pints(42) (NM) <b>optional </b>
057     * <li>UB1-6: Co-Insurance Days (25) (NM) <b>optional </b>
058     * <li>UB1-7: Condition Code (35-39) (IS) <b>optional repeating</b>
059     * <li>UB1-8: Covered Days - (23) (NM) <b>optional </b>
060     * <li>UB1-9: Non Covered Days - (24) (NM) <b>optional </b>
061     * <li>UB1-10: Value Amount & Code (46-49) (UVC) <b>optional repeating</b>
062     * <li>UB1-11: Number Of Grace Days (90) (NM) <b>optional </b>
063     * <li>UB1-12: Special Program Indicator (44) (CE) <b>optional </b>
064     * <li>UB1-13: PSRO/UR Approval Indicator (87) (CE) <b>optional </b>
065     * <li>UB1-14: PSRO/UR Approved Stay-Fm (88) (DT) <b>optional </b>
066     * <li>UB1-15: PSRO/UR Approved Stay-To (89) (DT) <b>optional </b>
067     * <li>UB1-16: Occurrence (28-32) (OCD) <b>optional repeating</b>
068     * <li>UB1-17: Occurrence Span (33) (CE) <b>optional </b>
069     * <li>UB1-18: Occur Span Start Date(33) (DT) <b>optional </b>
070     * <li>UB1-19: Occur Span End Date (33) (DT) <b>optional </b>
071     * <li>UB1-20: UB-82 Locator 2 (ST) <b>optional </b>
072     * <li>UB1-21: UB-82 Locator 9 (ST) <b>optional </b>
073     * <li>UB1-22: UB-82 Locator 27 (ST) <b>optional </b>
074     * <li>UB1-23: UB-82 Locator 45 (ST) <b>optional </b>
075 * </ul>
076 */
077@SuppressWarnings("unused")
078public class UB1 extends AbstractSegment {
079
080    /** 
081     * Creates a new UB1 segment
082     */
083    public UB1(Group parent, ModelClassFactory factory) {
084       super(parent, factory);
085       init(factory);
086    }
087
088    private void init(ModelClassFactory factory) {
089       try {
090                                  this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - UB1");
091                                  this.add(NM.class, false, 1, 1, new Object[]{ getMessage() }, "Blood Deductible  (43)");
092                                  this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Blood Furnished-Pints Of (40)");
093                                  this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Blood Replaced-Pints (41)");
094                                  this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Blood Not Replaced-Pints(42)");
095                                  this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Co-Insurance Days (25)");
096                                              this.add(IS.class, false, 5, 14, new Object[]{ getMessage(), new Integer(43) }, "Condition Code (35-39)");
097                                  this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Covered Days - (23)");
098                                  this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Non Covered Days - (24)");
099                                  this.add(UVC.class, false, 8, 12, new Object[]{ getMessage() }, "Value Amount & Code (46-49)");
100                                  this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Number Of Grace Days (90)");
101                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Special Program Indicator (44)");
102                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "PSRO/UR Approval Indicator (87)");
103                                  this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "PSRO/UR Approved Stay-Fm (88)");
104                                  this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "PSRO/UR Approved Stay-To (89)");
105                                  this.add(OCD.class, false, 5, 20, new Object[]{ getMessage() }, "Occurrence (28-32)");
106                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Occurrence Span (33)");
107                                  this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Occur Span Start Date(33)");
108                                  this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Occur Span End Date (33)");
109                                  this.add(ST.class, false, 1, 30, new Object[]{ getMessage() }, "UB-82 Locator 2");
110                                  this.add(ST.class, false, 1, 7, new Object[]{ getMessage() }, "UB-82 Locator 9");
111                                  this.add(ST.class, false, 1, 8, new Object[]{ getMessage() }, "UB-82 Locator 27");
112                                  this.add(ST.class, false, 1, 17, new Object[]{ getMessage() }, "UB-82 Locator 45");
113       } catch(HL7Exception e) {
114          log.error("Unexpected error creating UB1 - this is probably a bug in the source code generator.", e);
115       }
116    }
117
118
119
120    /**
121     * Returns
122     * UB1-1: "Set ID - UB1" - creates it if necessary
123     */
124    public SI getSetIDUB1() { 
125                SI retVal = this.getTypedField(1, 0);
126                return retVal;
127    }
128    
129    /**
130     * Returns
131     * UB1-1: "Set ID - UB1" - creates it if necessary
132     */
133    public SI getUb11_SetIDUB1() { 
134                SI retVal = this.getTypedField(1, 0);
135                return retVal;
136    }
137
138
139
140    /**
141     * Returns
142     * UB1-2: "Blood Deductible  (43)" - creates it if necessary
143     */
144    public NM getBloodDeductible() { 
145                NM retVal = this.getTypedField(2, 0);
146                return retVal;
147    }
148    
149    /**
150     * Returns
151     * UB1-2: "Blood Deductible  (43)" - creates it if necessary
152     */
153    public NM getUb12_BloodDeductible() { 
154                NM retVal = this.getTypedField(2, 0);
155                return retVal;
156    }
157
158
159
160    /**
161     * Returns
162     * UB1-3: "Blood Furnished-Pints Of (40)" - creates it if necessary
163     */
164    public NM getBloodFurnishedPintsOf() { 
165                NM retVal = this.getTypedField(3, 0);
166                return retVal;
167    }
168    
169    /**
170     * Returns
171     * UB1-3: "Blood Furnished-Pints Of (40)" - creates it if necessary
172     */
173    public NM getUb13_BloodFurnishedPintsOf() { 
174                NM retVal = this.getTypedField(3, 0);
175                return retVal;
176    }
177
178
179
180    /**
181     * Returns
182     * UB1-4: "Blood Replaced-Pints (41)" - creates it if necessary
183     */
184    public NM getBloodReplacedPints() { 
185                NM retVal = this.getTypedField(4, 0);
186                return retVal;
187    }
188    
189    /**
190     * Returns
191     * UB1-4: "Blood Replaced-Pints (41)" - creates it if necessary
192     */
193    public NM getUb14_BloodReplacedPints() { 
194                NM retVal = this.getTypedField(4, 0);
195                return retVal;
196    }
197
198
199
200    /**
201     * Returns
202     * UB1-5: "Blood Not Replaced-Pints(42)" - creates it if necessary
203     */
204    public NM getBloodNotReplacedPints() { 
205                NM retVal = this.getTypedField(5, 0);
206                return retVal;
207    }
208    
209    /**
210     * Returns
211     * UB1-5: "Blood Not Replaced-Pints(42)" - creates it if necessary
212     */
213    public NM getUb15_BloodNotReplacedPints() { 
214                NM retVal = this.getTypedField(5, 0);
215                return retVal;
216    }
217
218
219
220    /**
221     * Returns
222     * UB1-6: "Co-Insurance Days (25)" - creates it if necessary
223     */
224    public NM getCoInsuranceDays() { 
225                NM retVal = this.getTypedField(6, 0);
226                return retVal;
227    }
228    
229    /**
230     * Returns
231     * UB1-6: "Co-Insurance Days (25)" - creates it if necessary
232     */
233    public NM getUb16_CoInsuranceDays() { 
234                NM retVal = this.getTypedField(6, 0);
235                return retVal;
236    }
237
238
239    /**
240     * Returns all repetitions of Condition Code (35-39) (UB1-7).
241     */
242    public IS[] getConditionCode3539() {
243        IS[] retVal = this.getTypedField(7, new IS[0]);
244        return retVal;
245    }
246
247
248    /**
249     * Returns all repetitions of Condition Code (35-39) (UB1-7).
250     */
251    public IS[] getUb17_ConditionCode3539() {
252        IS[] retVal = this.getTypedField(7, new IS[0]);
253        return retVal;
254    }
255
256
257    /**
258     * Returns a count of the current number of repetitions of Condition Code (35-39) (UB1-7).
259     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
260     * it will return zero.
261     */
262    public int getConditionCode3539Reps() {
263        return this.getReps(7);
264    }
265
266
267    /**
268     * Returns a specific repetition of
269     * UB1-7: "Condition Code (35-39)" - creates it if necessary
270     *
271     * @param rep The repetition index (0-indexed)
272     */
273    public IS getConditionCode3539(int rep) { 
274                IS retVal = this.getTypedField(7, rep);
275                return retVal;
276    }
277
278    /**
279     * Returns a specific repetition of
280     * UB1-7: "Condition Code (35-39)" - creates it if necessary
281     *
282     * @param rep The repetition index (0-indexed)
283     */
284    public IS getUb17_ConditionCode3539(int rep) { 
285                IS retVal = this.getTypedField(7, rep);
286                return retVal;
287    }
288
289    /**
290     * Returns a count of the current number of repetitions of Condition Code (35-39) (UB1-7).
291     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
292     * it will return zero.
293     */
294    public int getUb17_ConditionCode3539Reps() {
295        return this.getReps(7);
296    }
297
298
299    /**
300     * Inserts a repetition of
301     * UB1-7: "Condition Code (35-39)" at a specific index
302     *
303     * @param rep The repetition index (0-indexed)
304     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
305     */
306    public IS insertConditionCode3539(int rep) throws HL7Exception { 
307        return (IS) super.insertRepetition(7, rep);
308    }
309
310
311    /**
312     * Inserts a repetition of
313     * UB1-7: "Condition Code (35-39)" at a specific index
314     *
315     * @param rep The repetition index (0-indexed)
316     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
317     */
318    public IS insertUb17_ConditionCode3539(int rep) throws HL7Exception { 
319        return (IS) super.insertRepetition(7, rep);
320    }
321
322
323    /**
324     * Removes a repetition of
325     * UB1-7: "Condition Code (35-39)" at a specific index
326     *
327     * @param rep The repetition index (0-indexed)
328     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
329     */
330    public IS removeConditionCode3539(int rep) throws HL7Exception { 
331        return (IS) super.removeRepetition(7, rep);
332    }
333
334
335    /**
336     * Removes a repetition of
337     * UB1-7: "Condition Code (35-39)" at a specific index
338     *
339     * @param rep The repetition index (0-indexed)
340     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
341     */
342    public IS removeUb17_ConditionCode3539(int rep) throws HL7Exception { 
343        return (IS) super.removeRepetition(7, rep);
344    }
345
346
347
348
349    /**
350     * Returns
351     * UB1-8: "Covered Days - (23)" - creates it if necessary
352     */
353    public NM getCoveredDays() { 
354                NM retVal = this.getTypedField(8, 0);
355                return retVal;
356    }
357    
358    /**
359     * Returns
360     * UB1-8: "Covered Days - (23)" - creates it if necessary
361     */
362    public NM getUb18_CoveredDays() { 
363                NM retVal = this.getTypedField(8, 0);
364                return retVal;
365    }
366
367
368
369    /**
370     * Returns
371     * UB1-9: "Non Covered Days - (24)" - creates it if necessary
372     */
373    public NM getNonCoveredDays() { 
374                NM retVal = this.getTypedField(9, 0);
375                return retVal;
376    }
377    
378    /**
379     * Returns
380     * UB1-9: "Non Covered Days - (24)" - creates it if necessary
381     */
382    public NM getUb19_NonCoveredDays() { 
383                NM retVal = this.getTypedField(9, 0);
384                return retVal;
385    }
386
387
388    /**
389     * Returns all repetitions of Value Amount & Code (46-49) (UB1-10).
390     */
391    public UVC[] getValueAmountCode4649() {
392        UVC[] retVal = this.getTypedField(10, new UVC[0]);
393        return retVal;
394    }
395
396
397    /**
398     * Returns all repetitions of Value Amount & Code (46-49) (UB1-10).
399     */
400    public UVC[] getUb110_ValueAmountCode4649() {
401        UVC[] retVal = this.getTypedField(10, new UVC[0]);
402        return retVal;
403    }
404
405
406    /**
407     * Returns a count of the current number of repetitions of Value Amount & Code (46-49) (UB1-10).
408     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
409     * it will return zero.
410     */
411    public int getValueAmountCode4649Reps() {
412        return this.getReps(10);
413    }
414
415
416    /**
417     * Returns a specific repetition of
418     * UB1-10: "Value Amount & Code (46-49)" - creates it if necessary
419     *
420     * @param rep The repetition index (0-indexed)
421     */
422    public UVC getValueAmountCode4649(int rep) { 
423                UVC retVal = this.getTypedField(10, rep);
424                return retVal;
425    }
426
427    /**
428     * Returns a specific repetition of
429     * UB1-10: "Value Amount & Code (46-49)" - creates it if necessary
430     *
431     * @param rep The repetition index (0-indexed)
432     */
433    public UVC getUb110_ValueAmountCode4649(int rep) { 
434                UVC retVal = this.getTypedField(10, rep);
435                return retVal;
436    }
437
438    /**
439     * Returns a count of the current number of repetitions of Value Amount & Code (46-49) (UB1-10).
440     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
441     * it will return zero.
442     */
443    public int getUb110_ValueAmountCode4649Reps() {
444        return this.getReps(10);
445    }
446
447
448    /**
449     * Inserts a repetition of
450     * UB1-10: "Value Amount & Code (46-49)" at a specific index
451     *
452     * @param rep The repetition index (0-indexed)
453     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
454     */
455    public UVC insertValueAmountCode4649(int rep) throws HL7Exception { 
456        return (UVC) super.insertRepetition(10, rep);
457    }
458
459
460    /**
461     * Inserts a repetition of
462     * UB1-10: "Value Amount & Code (46-49)" at a specific index
463     *
464     * @param rep The repetition index (0-indexed)
465     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
466     */
467    public UVC insertUb110_ValueAmountCode4649(int rep) throws HL7Exception { 
468        return (UVC) super.insertRepetition(10, rep);
469    }
470
471
472    /**
473     * Removes a repetition of
474     * UB1-10: "Value Amount & Code (46-49)" at a specific index
475     *
476     * @param rep The repetition index (0-indexed)
477     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
478     */
479    public UVC removeValueAmountCode4649(int rep) throws HL7Exception { 
480        return (UVC) super.removeRepetition(10, rep);
481    }
482
483
484    /**
485     * Removes a repetition of
486     * UB1-10: "Value Amount & Code (46-49)" at a specific index
487     *
488     * @param rep The repetition index (0-indexed)
489     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
490     */
491    public UVC removeUb110_ValueAmountCode4649(int rep) throws HL7Exception { 
492        return (UVC) super.removeRepetition(10, rep);
493    }
494
495
496
497
498    /**
499     * Returns
500     * UB1-11: "Number Of Grace Days (90)" - creates it if necessary
501     */
502    public NM getNumberOfGraceDays() { 
503                NM retVal = this.getTypedField(11, 0);
504                return retVal;
505    }
506    
507    /**
508     * Returns
509     * UB1-11: "Number Of Grace Days (90)" - creates it if necessary
510     */
511    public NM getUb111_NumberOfGraceDays() { 
512                NM retVal = this.getTypedField(11, 0);
513                return retVal;
514    }
515
516
517
518    /**
519     * Returns
520     * UB1-12: "Special Program Indicator (44)" - creates it if necessary
521     */
522    public CE getSpecialProgramIndicator() { 
523                CE retVal = this.getTypedField(12, 0);
524                return retVal;
525    }
526    
527    /**
528     * Returns
529     * UB1-12: "Special Program Indicator (44)" - creates it if necessary
530     */
531    public CE getUb112_SpecialProgramIndicator() { 
532                CE retVal = this.getTypedField(12, 0);
533                return retVal;
534    }
535
536
537
538    /**
539     * Returns
540     * UB1-13: "PSRO/UR Approval Indicator (87)" - creates it if necessary
541     */
542    public CE getPSROURApprovalIndicator() { 
543                CE retVal = this.getTypedField(13, 0);
544                return retVal;
545    }
546    
547    /**
548     * Returns
549     * UB1-13: "PSRO/UR Approval Indicator (87)" - creates it if necessary
550     */
551    public CE getUb113_PSROURApprovalIndicator() { 
552                CE retVal = this.getTypedField(13, 0);
553                return retVal;
554    }
555
556
557
558    /**
559     * Returns
560     * UB1-14: "PSRO/UR Approved Stay-Fm (88)" - creates it if necessary
561     */
562    public DT getPSROURApprovedStayFm() { 
563                DT retVal = this.getTypedField(14, 0);
564                return retVal;
565    }
566    
567    /**
568     * Returns
569     * UB1-14: "PSRO/UR Approved Stay-Fm (88)" - creates it if necessary
570     */
571    public DT getUb114_PSROURApprovedStayFm() { 
572                DT retVal = this.getTypedField(14, 0);
573                return retVal;
574    }
575
576
577
578    /**
579     * Returns
580     * UB1-15: "PSRO/UR Approved Stay-To (89)" - creates it if necessary
581     */
582    public DT getPSROURApprovedStayTo() { 
583                DT retVal = this.getTypedField(15, 0);
584                return retVal;
585    }
586    
587    /**
588     * Returns
589     * UB1-15: "PSRO/UR Approved Stay-To (89)" - creates it if necessary
590     */
591    public DT getUb115_PSROURApprovedStayTo() { 
592                DT retVal = this.getTypedField(15, 0);
593                return retVal;
594    }
595
596
597    /**
598     * Returns all repetitions of Occurrence (28-32) (UB1-16).
599     */
600    public OCD[] getOccurrence2832() {
601        OCD[] retVal = this.getTypedField(16, new OCD[0]);
602        return retVal;
603    }
604
605
606    /**
607     * Returns all repetitions of Occurrence (28-32) (UB1-16).
608     */
609    public OCD[] getUb116_Occurrence2832() {
610        OCD[] retVal = this.getTypedField(16, new OCD[0]);
611        return retVal;
612    }
613
614
615    /**
616     * Returns a count of the current number of repetitions of Occurrence (28-32) (UB1-16).
617     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
618     * it will return zero.
619     */
620    public int getOccurrence2832Reps() {
621        return this.getReps(16);
622    }
623
624
625    /**
626     * Returns a specific repetition of
627     * UB1-16: "Occurrence (28-32)" - creates it if necessary
628     *
629     * @param rep The repetition index (0-indexed)
630     */
631    public OCD getOccurrence2832(int rep) { 
632                OCD retVal = this.getTypedField(16, rep);
633                return retVal;
634    }
635
636    /**
637     * Returns a specific repetition of
638     * UB1-16: "Occurrence (28-32)" - creates it if necessary
639     *
640     * @param rep The repetition index (0-indexed)
641     */
642    public OCD getUb116_Occurrence2832(int rep) { 
643                OCD retVal = this.getTypedField(16, rep);
644                return retVal;
645    }
646
647    /**
648     * Returns a count of the current number of repetitions of Occurrence (28-32) (UB1-16).
649     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
650     * it will return zero.
651     */
652    public int getUb116_Occurrence2832Reps() {
653        return this.getReps(16);
654    }
655
656
657    /**
658     * Inserts a repetition of
659     * UB1-16: "Occurrence (28-32)" at a specific index
660     *
661     * @param rep The repetition index (0-indexed)
662     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
663     */
664    public OCD insertOccurrence2832(int rep) throws HL7Exception { 
665        return (OCD) super.insertRepetition(16, rep);
666    }
667
668
669    /**
670     * Inserts a repetition of
671     * UB1-16: "Occurrence (28-32)" at a specific index
672     *
673     * @param rep The repetition index (0-indexed)
674     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
675     */
676    public OCD insertUb116_Occurrence2832(int rep) throws HL7Exception { 
677        return (OCD) super.insertRepetition(16, rep);
678    }
679
680
681    /**
682     * Removes a repetition of
683     * UB1-16: "Occurrence (28-32)" 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 OCD removeOccurrence2832(int rep) throws HL7Exception { 
689        return (OCD) super.removeRepetition(16, rep);
690    }
691
692
693    /**
694     * Removes a repetition of
695     * UB1-16: "Occurrence (28-32)" 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 OCD removeUb116_Occurrence2832(int rep) throws HL7Exception { 
701        return (OCD) super.removeRepetition(16, rep);
702    }
703
704
705
706
707    /**
708     * Returns
709     * UB1-17: "Occurrence Span (33)" - creates it if necessary
710     */
711    public CE getOccurrenceSpan() { 
712                CE retVal = this.getTypedField(17, 0);
713                return retVal;
714    }
715    
716    /**
717     * Returns
718     * UB1-17: "Occurrence Span (33)" - creates it if necessary
719     */
720    public CE getUb117_OccurrenceSpan() { 
721                CE retVal = this.getTypedField(17, 0);
722                return retVal;
723    }
724
725
726
727    /**
728     * Returns
729     * UB1-18: "Occur Span Start Date(33)" - creates it if necessary
730     */
731    public DT getOccurSpanStartDate() { 
732                DT retVal = this.getTypedField(18, 0);
733                return retVal;
734    }
735    
736    /**
737     * Returns
738     * UB1-18: "Occur Span Start Date(33)" - creates it if necessary
739     */
740    public DT getUb118_OccurSpanStartDate() { 
741                DT retVal = this.getTypedField(18, 0);
742                return retVal;
743    }
744
745
746
747    /**
748     * Returns
749     * UB1-19: "Occur Span End Date (33)" - creates it if necessary
750     */
751    public DT getOccurSpanEndDate() { 
752                DT retVal = this.getTypedField(19, 0);
753                return retVal;
754    }
755    
756    /**
757     * Returns
758     * UB1-19: "Occur Span End Date (33)" - creates it if necessary
759     */
760    public DT getUb119_OccurSpanEndDate() { 
761                DT retVal = this.getTypedField(19, 0);
762                return retVal;
763    }
764
765
766
767    /**
768     * Returns
769     * UB1-20: "UB-82 Locator 2" - creates it if necessary
770     */
771    public ST getUB82Locator2() { 
772                ST retVal = this.getTypedField(20, 0);
773                return retVal;
774    }
775    
776    /**
777     * Returns
778     * UB1-20: "UB-82 Locator 2" - creates it if necessary
779     */
780    public ST getUb120_UB82Locator2() { 
781                ST retVal = this.getTypedField(20, 0);
782                return retVal;
783    }
784
785
786
787    /**
788     * Returns
789     * UB1-21: "UB-82 Locator 9" - creates it if necessary
790     */
791    public ST getUB82Locator9() { 
792                ST retVal = this.getTypedField(21, 0);
793                return retVal;
794    }
795    
796    /**
797     * Returns
798     * UB1-21: "UB-82 Locator 9" - creates it if necessary
799     */
800    public ST getUb121_UB82Locator9() { 
801                ST retVal = this.getTypedField(21, 0);
802                return retVal;
803    }
804
805
806
807    /**
808     * Returns
809     * UB1-22: "UB-82 Locator 27" - creates it if necessary
810     */
811    public ST getUB82Locator27() { 
812                ST retVal = this.getTypedField(22, 0);
813                return retVal;
814    }
815    
816    /**
817     * Returns
818     * UB1-22: "UB-82 Locator 27" - creates it if necessary
819     */
820    public ST getUb122_UB82Locator27() { 
821                ST retVal = this.getTypedField(22, 0);
822                return retVal;
823    }
824
825
826
827    /**
828     * Returns
829     * UB1-23: "UB-82 Locator 45" - creates it if necessary
830     */
831    public ST getUB82Locator45() { 
832                ST retVal = this.getTypedField(23, 0);
833                return retVal;
834    }
835    
836    /**
837     * Returns
838     * UB1-23: "UB-82 Locator 45" - creates it if necessary
839     */
840    public ST getUb123_UB82Locator45() { 
841                ST retVal = this.getTypedField(23, 0);
842                return retVal;
843    }
844
845
846
847
848
849    /** {@inheritDoc} */   
850    protected Type createNewTypeWithoutReflection(int field) {
851       switch (field) {
852          case 0: return new SI(getMessage());
853          case 1: return new NM(getMessage());
854          case 2: return new NM(getMessage());
855          case 3: return new NM(getMessage());
856          case 4: return new NM(getMessage());
857          case 5: return new NM(getMessage());
858          case 6: return new IS(getMessage(), new Integer( 43 ));
859          case 7: return new NM(getMessage());
860          case 8: return new NM(getMessage());
861          case 9: return new UVC(getMessage());
862          case 10: return new NM(getMessage());
863          case 11: return new CE(getMessage());
864          case 12: return new CE(getMessage());
865          case 13: return new DT(getMessage());
866          case 14: return new DT(getMessage());
867          case 15: return new OCD(getMessage());
868          case 16: return new CE(getMessage());
869          case 17: return new DT(getMessage());
870          case 18: return new DT(getMessage());
871          case 19: return new ST(getMessage());
872          case 20: return new ST(getMessage());
873          case 21: return new ST(getMessage());
874          case 22: return new ST(getMessage());
875          default: return null;
876       }
877   }
878
879
880}
881