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