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.v231.segment;
035
036// import ca.uhn.hl7v2.model.v231.group.*;
037import ca.uhn.hl7v2.model.v231.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 URS message segment (URS - unsolicited selection segment). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>URS-1: R/U Where Subject Definition (ST) <b> repeating</b>
052     * <li>URS-2: R/U When Data Start Date/Time (TS) <b>optional </b>
053     * <li>URS-3: R/U When Data End Date/Time (TS) <b>optional </b>
054     * <li>URS-4: R/U What User Qualifier (ST) <b>optional repeating</b>
055     * <li>URS-5: R/U Other Results Subject Definition (ST) <b>optional repeating</b>
056     * <li>URS-6: R/U Which Date/Time Qualifier (ID) <b>optional repeating</b>
057     * <li>URS-7: R/U Which Date/Time Status Qualifier (ID) <b>optional repeating</b>
058     * <li>URS-8: R/U Date/Time Selection Qualifier (ID) <b>optional repeating</b>
059     * <li>URS-9: R/U Quantity/Timing Qualifier (TQ) <b>optional </b>
060 * </ul>
061 */
062@SuppressWarnings("unused")
063public class URS extends AbstractSegment {
064
065    /** 
066     * Creates a new URS segment
067     */
068    public URS(Group parent, ModelClassFactory factory) {
069       super(parent, factory);
070       init(factory);
071    }
072
073    private void init(ModelClassFactory factory) {
074       try {
075                                  this.add(ST.class, true, 0, 20, new Object[]{ getMessage() }, "R/U Where Subject Definition");
076                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "R/U When Data Start Date/Time");
077                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "R/U When Data End Date/Time");
078                                  this.add(ST.class, false, 0, 20, new Object[]{ getMessage() }, "R/U What User Qualifier");
079                                  this.add(ST.class, false, 0, 20, new Object[]{ getMessage() }, "R/U Other Results Subject Definition");
080                                              this.add(ID.class, false, 0, 12, new Object[]{ getMessage(), new Integer(156) }, "R/U Which Date/Time Qualifier");
081                                              this.add(ID.class, false, 0, 12, new Object[]{ getMessage(), new Integer(157) }, "R/U Which Date/Time Status Qualifier");
082                                              this.add(ID.class, false, 0, 12, new Object[]{ getMessage(), new Integer(158) }, "R/U Date/Time Selection Qualifier");
083                                  this.add(TQ.class, false, 1, 60, new Object[]{ getMessage() }, "R/U Quantity/Timing Qualifier");
084       } catch(HL7Exception e) {
085          log.error("Unexpected error creating URS - this is probably a bug in the source code generator.", e);
086       }
087    }
088
089
090    /**
091     * Returns all repetitions of R/U Where Subject Definition (URS-1).
092     */
093    public ST[] getRUWhereSubjectDefinition() {
094        ST[] retVal = this.getTypedField(1, new ST[0]);
095        return retVal;
096    }
097
098
099    /**
100     * Returns all repetitions of R/U Where Subject Definition (URS-1).
101     */
102    public ST[] getUrs1_RUWhereSubjectDefinition() {
103        ST[] retVal = this.getTypedField(1, new ST[0]);
104        return retVal;
105    }
106
107
108    /**
109     * Returns a count of the current number of repetitions of R/U Where Subject Definition (URS-1).
110     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
111     * it will return zero.
112     */
113    public int getRUWhereSubjectDefinitionReps() {
114        return this.getReps(1);
115    }
116
117
118    /**
119     * Returns a specific repetition of
120     * URS-1: "R/U Where Subject Definition" - creates it if necessary
121     *
122     * @param rep The repetition index (0-indexed)
123     */
124    public ST getRUWhereSubjectDefinition(int rep) { 
125                ST retVal = this.getTypedField(1, rep);
126                return retVal;
127    }
128
129    /**
130     * Returns a specific repetition of
131     * URS-1: "R/U Where Subject Definition" - creates it if necessary
132     *
133     * @param rep The repetition index (0-indexed)
134     */
135    public ST getUrs1_RUWhereSubjectDefinition(int rep) { 
136                ST retVal = this.getTypedField(1, rep);
137                return retVal;
138    }
139
140    /**
141     * Returns a count of the current number of repetitions of R/U Where Subject Definition (URS-1).
142     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
143     * it will return zero.
144     */
145    public int getUrs1_RUWhereSubjectDefinitionReps() {
146        return this.getReps(1);
147    }
148
149
150    /**
151     * Inserts a repetition of
152     * URS-1: "R/U Where Subject Definition" at a specific index
153     *
154     * @param rep The repetition index (0-indexed)
155     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
156     */
157    public ST insertRUWhereSubjectDefinition(int rep) throws HL7Exception { 
158        return (ST) super.insertRepetition(1, rep);
159    }
160
161
162    /**
163     * Inserts a repetition of
164     * URS-1: "R/U Where Subject Definition" at a specific index
165     *
166     * @param rep The repetition index (0-indexed)
167     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
168     */
169    public ST insertUrs1_RUWhereSubjectDefinition(int rep) throws HL7Exception { 
170        return (ST) super.insertRepetition(1, rep);
171    }
172
173
174    /**
175     * Removes a repetition of
176     * URS-1: "R/U Where Subject Definition" at a specific index
177     *
178     * @param rep The repetition index (0-indexed)
179     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
180     */
181    public ST removeRUWhereSubjectDefinition(int rep) throws HL7Exception { 
182        return (ST) super.removeRepetition(1, rep);
183    }
184
185
186    /**
187     * Removes a repetition of
188     * URS-1: "R/U Where Subject Definition" at a specific index
189     *
190     * @param rep The repetition index (0-indexed)
191     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
192     */
193    public ST removeUrs1_RUWhereSubjectDefinition(int rep) throws HL7Exception { 
194        return (ST) super.removeRepetition(1, rep);
195    }
196
197
198
199
200    /**
201     * Returns
202     * URS-2: "R/U When Data Start Date/Time" - creates it if necessary
203     */
204    public TS getRUWhenDataStartDateTime() { 
205                TS retVal = this.getTypedField(2, 0);
206                return retVal;
207    }
208    
209    /**
210     * Returns
211     * URS-2: "R/U When Data Start Date/Time" - creates it if necessary
212     */
213    public TS getUrs2_RUWhenDataStartDateTime() { 
214                TS retVal = this.getTypedField(2, 0);
215                return retVal;
216    }
217
218
219
220    /**
221     * Returns
222     * URS-3: "R/U When Data End Date/Time" - creates it if necessary
223     */
224    public TS getRUWhenDataEndDateTime() { 
225                TS retVal = this.getTypedField(3, 0);
226                return retVal;
227    }
228    
229    /**
230     * Returns
231     * URS-3: "R/U When Data End Date/Time" - creates it if necessary
232     */
233    public TS getUrs3_RUWhenDataEndDateTime() { 
234                TS retVal = this.getTypedField(3, 0);
235                return retVal;
236    }
237
238
239    /**
240     * Returns all repetitions of R/U What User Qualifier (URS-4).
241     */
242    public ST[] getRUWhatUserQualifier() {
243        ST[] retVal = this.getTypedField(4, new ST[0]);
244        return retVal;
245    }
246
247
248    /**
249     * Returns all repetitions of R/U What User Qualifier (URS-4).
250     */
251    public ST[] getUrs4_RUWhatUserQualifier() {
252        ST[] retVal = this.getTypedField(4, new ST[0]);
253        return retVal;
254    }
255
256
257    /**
258     * Returns a count of the current number of repetitions of R/U What User Qualifier (URS-4).
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 getRUWhatUserQualifierReps() {
263        return this.getReps(4);
264    }
265
266
267    /**
268     * Returns a specific repetition of
269     * URS-4: "R/U What User Qualifier" - creates it if necessary
270     *
271     * @param rep The repetition index (0-indexed)
272     */
273    public ST getRUWhatUserQualifier(int rep) { 
274                ST retVal = this.getTypedField(4, rep);
275                return retVal;
276    }
277
278    /**
279     * Returns a specific repetition of
280     * URS-4: "R/U What User Qualifier" - creates it if necessary
281     *
282     * @param rep The repetition index (0-indexed)
283     */
284    public ST getUrs4_RUWhatUserQualifier(int rep) { 
285                ST retVal = this.getTypedField(4, rep);
286                return retVal;
287    }
288
289    /**
290     * Returns a count of the current number of repetitions of R/U What User Qualifier (URS-4).
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 getUrs4_RUWhatUserQualifierReps() {
295        return this.getReps(4);
296    }
297
298
299    /**
300     * Inserts a repetition of
301     * URS-4: "R/U What User Qualifier" 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 ST insertRUWhatUserQualifier(int rep) throws HL7Exception { 
307        return (ST) super.insertRepetition(4, rep);
308    }
309
310
311    /**
312     * Inserts a repetition of
313     * URS-4: "R/U What User Qualifier" 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 ST insertUrs4_RUWhatUserQualifier(int rep) throws HL7Exception { 
319        return (ST) super.insertRepetition(4, rep);
320    }
321
322
323    /**
324     * Removes a repetition of
325     * URS-4: "R/U What User Qualifier" 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 ST removeRUWhatUserQualifier(int rep) throws HL7Exception { 
331        return (ST) super.removeRepetition(4, rep);
332    }
333
334
335    /**
336     * Removes a repetition of
337     * URS-4: "R/U What User Qualifier" 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 ST removeUrs4_RUWhatUserQualifier(int rep) throws HL7Exception { 
343        return (ST) super.removeRepetition(4, rep);
344    }
345
346
347
348    /**
349     * Returns all repetitions of R/U Other Results Subject Definition (URS-5).
350     */
351    public ST[] getRUOtherResultsSubjectDefinition() {
352        ST[] retVal = this.getTypedField(5, new ST[0]);
353        return retVal;
354    }
355
356
357    /**
358     * Returns all repetitions of R/U Other Results Subject Definition (URS-5).
359     */
360    public ST[] getUrs5_RUOtherResultsSubjectDefinition() {
361        ST[] retVal = this.getTypedField(5, new ST[0]);
362        return retVal;
363    }
364
365
366    /**
367     * Returns a count of the current number of repetitions of R/U Other Results Subject Definition (URS-5).
368     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
369     * it will return zero.
370     */
371    public int getRUOtherResultsSubjectDefinitionReps() {
372        return this.getReps(5);
373    }
374
375
376    /**
377     * Returns a specific repetition of
378     * URS-5: "R/U Other Results Subject Definition" - creates it if necessary
379     *
380     * @param rep The repetition index (0-indexed)
381     */
382    public ST getRUOtherResultsSubjectDefinition(int rep) { 
383                ST retVal = this.getTypedField(5, rep);
384                return retVal;
385    }
386
387    /**
388     * Returns a specific repetition of
389     * URS-5: "R/U Other Results Subject Definition" - creates it if necessary
390     *
391     * @param rep The repetition index (0-indexed)
392     */
393    public ST getUrs5_RUOtherResultsSubjectDefinition(int rep) { 
394                ST retVal = this.getTypedField(5, rep);
395                return retVal;
396    }
397
398    /**
399     * Returns a count of the current number of repetitions of R/U Other Results Subject Definition (URS-5).
400     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
401     * it will return zero.
402     */
403    public int getUrs5_RUOtherResultsSubjectDefinitionReps() {
404        return this.getReps(5);
405    }
406
407
408    /**
409     * Inserts a repetition of
410     * URS-5: "R/U Other Results Subject Definition" at a specific index
411     *
412     * @param rep The repetition index (0-indexed)
413     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
414     */
415    public ST insertRUOtherResultsSubjectDefinition(int rep) throws HL7Exception { 
416        return (ST) super.insertRepetition(5, rep);
417    }
418
419
420    /**
421     * Inserts a repetition of
422     * URS-5: "R/U Other Results Subject Definition" at a specific index
423     *
424     * @param rep The repetition index (0-indexed)
425     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
426     */
427    public ST insertUrs5_RUOtherResultsSubjectDefinition(int rep) throws HL7Exception { 
428        return (ST) super.insertRepetition(5, rep);
429    }
430
431
432    /**
433     * Removes a repetition of
434     * URS-5: "R/U Other Results Subject Definition" at a specific index
435     *
436     * @param rep The repetition index (0-indexed)
437     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
438     */
439    public ST removeRUOtherResultsSubjectDefinition(int rep) throws HL7Exception { 
440        return (ST) super.removeRepetition(5, rep);
441    }
442
443
444    /**
445     * Removes a repetition of
446     * URS-5: "R/U Other Results Subject Definition" at a specific index
447     *
448     * @param rep The repetition index (0-indexed)
449     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
450     */
451    public ST removeUrs5_RUOtherResultsSubjectDefinition(int rep) throws HL7Exception { 
452        return (ST) super.removeRepetition(5, rep);
453    }
454
455
456
457    /**
458     * Returns all repetitions of R/U Which Date/Time Qualifier (URS-6).
459     */
460    public ID[] getRUWhichDateTimeQualifier() {
461        ID[] retVal = this.getTypedField(6, new ID[0]);
462        return retVal;
463    }
464
465
466    /**
467     * Returns all repetitions of R/U Which Date/Time Qualifier (URS-6).
468     */
469    public ID[] getUrs6_RUWhichDateTimeQualifier() {
470        ID[] retVal = this.getTypedField(6, new ID[0]);
471        return retVal;
472    }
473
474
475    /**
476     * Returns a count of the current number of repetitions of R/U Which Date/Time Qualifier (URS-6).
477     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
478     * it will return zero.
479     */
480    public int getRUWhichDateTimeQualifierReps() {
481        return this.getReps(6);
482    }
483
484
485    /**
486     * Returns a specific repetition of
487     * URS-6: "R/U Which Date/Time Qualifier" - creates it if necessary
488     *
489     * @param rep The repetition index (0-indexed)
490     */
491    public ID getRUWhichDateTimeQualifier(int rep) { 
492                ID retVal = this.getTypedField(6, rep);
493                return retVal;
494    }
495
496    /**
497     * Returns a specific repetition of
498     * URS-6: "R/U Which Date/Time Qualifier" - creates it if necessary
499     *
500     * @param rep The repetition index (0-indexed)
501     */
502    public ID getUrs6_RUWhichDateTimeQualifier(int rep) { 
503                ID retVal = this.getTypedField(6, rep);
504                return retVal;
505    }
506
507    /**
508     * Returns a count of the current number of repetitions of R/U Which Date/Time Qualifier (URS-6).
509     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
510     * it will return zero.
511     */
512    public int getUrs6_RUWhichDateTimeQualifierReps() {
513        return this.getReps(6);
514    }
515
516
517    /**
518     * Inserts a repetition of
519     * URS-6: "R/U Which Date/Time Qualifier" at a specific index
520     *
521     * @param rep The repetition index (0-indexed)
522     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
523     */
524    public ID insertRUWhichDateTimeQualifier(int rep) throws HL7Exception { 
525        return (ID) super.insertRepetition(6, rep);
526    }
527
528
529    /**
530     * Inserts a repetition of
531     * URS-6: "R/U Which Date/Time Qualifier" at a specific index
532     *
533     * @param rep The repetition index (0-indexed)
534     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
535     */
536    public ID insertUrs6_RUWhichDateTimeQualifier(int rep) throws HL7Exception { 
537        return (ID) super.insertRepetition(6, rep);
538    }
539
540
541    /**
542     * Removes a repetition of
543     * URS-6: "R/U Which Date/Time Qualifier" at a specific index
544     *
545     * @param rep The repetition index (0-indexed)
546     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
547     */
548    public ID removeRUWhichDateTimeQualifier(int rep) throws HL7Exception { 
549        return (ID) super.removeRepetition(6, rep);
550    }
551
552
553    /**
554     * Removes a repetition of
555     * URS-6: "R/U Which Date/Time Qualifier" at a specific index
556     *
557     * @param rep The repetition index (0-indexed)
558     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
559     */
560    public ID removeUrs6_RUWhichDateTimeQualifier(int rep) throws HL7Exception { 
561        return (ID) super.removeRepetition(6, rep);
562    }
563
564
565
566    /**
567     * Returns all repetitions of R/U Which Date/Time Status Qualifier (URS-7).
568     */
569    public ID[] getRUWhichDateTimeStatusQualifier() {
570        ID[] retVal = this.getTypedField(7, new ID[0]);
571        return retVal;
572    }
573
574
575    /**
576     * Returns all repetitions of R/U Which Date/Time Status Qualifier (URS-7).
577     */
578    public ID[] getUrs7_RUWhichDateTimeStatusQualifier() {
579        ID[] retVal = this.getTypedField(7, new ID[0]);
580        return retVal;
581    }
582
583
584    /**
585     * Returns a count of the current number of repetitions of R/U Which Date/Time Status Qualifier (URS-7).
586     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
587     * it will return zero.
588     */
589    public int getRUWhichDateTimeStatusQualifierReps() {
590        return this.getReps(7);
591    }
592
593
594    /**
595     * Returns a specific repetition of
596     * URS-7: "R/U Which Date/Time Status Qualifier" - creates it if necessary
597     *
598     * @param rep The repetition index (0-indexed)
599     */
600    public ID getRUWhichDateTimeStatusQualifier(int rep) { 
601                ID retVal = this.getTypedField(7, rep);
602                return retVal;
603    }
604
605    /**
606     * Returns a specific repetition of
607     * URS-7: "R/U Which Date/Time Status Qualifier" - creates it if necessary
608     *
609     * @param rep The repetition index (0-indexed)
610     */
611    public ID getUrs7_RUWhichDateTimeStatusQualifier(int rep) { 
612                ID retVal = this.getTypedField(7, rep);
613                return retVal;
614    }
615
616    /**
617     * Returns a count of the current number of repetitions of R/U Which Date/Time Status Qualifier (URS-7).
618     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
619     * it will return zero.
620     */
621    public int getUrs7_RUWhichDateTimeStatusQualifierReps() {
622        return this.getReps(7);
623    }
624
625
626    /**
627     * Inserts a repetition of
628     * URS-7: "R/U Which Date/Time Status Qualifier" at a specific index
629     *
630     * @param rep The repetition index (0-indexed)
631     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
632     */
633    public ID insertRUWhichDateTimeStatusQualifier(int rep) throws HL7Exception { 
634        return (ID) super.insertRepetition(7, rep);
635    }
636
637
638    /**
639     * Inserts a repetition of
640     * URS-7: "R/U Which Date/Time Status Qualifier" at a specific index
641     *
642     * @param rep The repetition index (0-indexed)
643     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
644     */
645    public ID insertUrs7_RUWhichDateTimeStatusQualifier(int rep) throws HL7Exception { 
646        return (ID) super.insertRepetition(7, rep);
647    }
648
649
650    /**
651     * Removes a repetition of
652     * URS-7: "R/U Which Date/Time Status Qualifier" at a specific index
653     *
654     * @param rep The repetition index (0-indexed)
655     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
656     */
657    public ID removeRUWhichDateTimeStatusQualifier(int rep) throws HL7Exception { 
658        return (ID) super.removeRepetition(7, rep);
659    }
660
661
662    /**
663     * Removes a repetition of
664     * URS-7: "R/U Which Date/Time Status Qualifier" at a specific index
665     *
666     * @param rep The repetition index (0-indexed)
667     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
668     */
669    public ID removeUrs7_RUWhichDateTimeStatusQualifier(int rep) throws HL7Exception { 
670        return (ID) super.removeRepetition(7, rep);
671    }
672
673
674
675    /**
676     * Returns all repetitions of R/U Date/Time Selection Qualifier (URS-8).
677     */
678    public ID[] getRUDateTimeSelectionQualifier() {
679        ID[] retVal = this.getTypedField(8, new ID[0]);
680        return retVal;
681    }
682
683
684    /**
685     * Returns all repetitions of R/U Date/Time Selection Qualifier (URS-8).
686     */
687    public ID[] getUrs8_RUDateTimeSelectionQualifier() {
688        ID[] retVal = this.getTypedField(8, new ID[0]);
689        return retVal;
690    }
691
692
693    /**
694     * Returns a count of the current number of repetitions of R/U Date/Time Selection Qualifier (URS-8).
695     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
696     * it will return zero.
697     */
698    public int getRUDateTimeSelectionQualifierReps() {
699        return this.getReps(8);
700    }
701
702
703    /**
704     * Returns a specific repetition of
705     * URS-8: "R/U Date/Time Selection Qualifier" - creates it if necessary
706     *
707     * @param rep The repetition index (0-indexed)
708     */
709    public ID getRUDateTimeSelectionQualifier(int rep) { 
710                ID retVal = this.getTypedField(8, rep);
711                return retVal;
712    }
713
714    /**
715     * Returns a specific repetition of
716     * URS-8: "R/U Date/Time Selection Qualifier" - creates it if necessary
717     *
718     * @param rep The repetition index (0-indexed)
719     */
720    public ID getUrs8_RUDateTimeSelectionQualifier(int rep) { 
721                ID retVal = this.getTypedField(8, rep);
722                return retVal;
723    }
724
725    /**
726     * Returns a count of the current number of repetitions of R/U Date/Time Selection Qualifier (URS-8).
727     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
728     * it will return zero.
729     */
730    public int getUrs8_RUDateTimeSelectionQualifierReps() {
731        return this.getReps(8);
732    }
733
734
735    /**
736     * Inserts a repetition of
737     * URS-8: "R/U Date/Time Selection Qualifier" at a specific index
738     *
739     * @param rep The repetition index (0-indexed)
740     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
741     */
742    public ID insertRUDateTimeSelectionQualifier(int rep) throws HL7Exception { 
743        return (ID) super.insertRepetition(8, rep);
744    }
745
746
747    /**
748     * Inserts a repetition of
749     * URS-8: "R/U Date/Time Selection Qualifier" at a specific index
750     *
751     * @param rep The repetition index (0-indexed)
752     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
753     */
754    public ID insertUrs8_RUDateTimeSelectionQualifier(int rep) throws HL7Exception { 
755        return (ID) super.insertRepetition(8, rep);
756    }
757
758
759    /**
760     * Removes a repetition of
761     * URS-8: "R/U Date/Time Selection Qualifier" at a specific index
762     *
763     * @param rep The repetition index (0-indexed)
764     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
765     */
766    public ID removeRUDateTimeSelectionQualifier(int rep) throws HL7Exception { 
767        return (ID) super.removeRepetition(8, rep);
768    }
769
770
771    /**
772     * Removes a repetition of
773     * URS-8: "R/U Date/Time Selection Qualifier" at a specific index
774     *
775     * @param rep The repetition index (0-indexed)
776     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
777     */
778    public ID removeUrs8_RUDateTimeSelectionQualifier(int rep) throws HL7Exception { 
779        return (ID) super.removeRepetition(8, rep);
780    }
781
782
783
784
785    /**
786     * Returns
787     * URS-9: "R/U Quantity/Timing Qualifier" - creates it if necessary
788     */
789    public TQ getRUQuantityTimingQualifier() { 
790                TQ retVal = this.getTypedField(9, 0);
791                return retVal;
792    }
793    
794    /**
795     * Returns
796     * URS-9: "R/U Quantity/Timing Qualifier" - creates it if necessary
797     */
798    public TQ getUrs9_RUQuantityTimingQualifier() { 
799                TQ retVal = this.getTypedField(9, 0);
800                return retVal;
801    }
802
803
804
805
806
807    /** {@inheritDoc} */   
808    protected Type createNewTypeWithoutReflection(int field) {
809       switch (field) {
810          case 0: return new ST(getMessage());
811          case 1: return new TS(getMessage());
812          case 2: return new TS(getMessage());
813          case 3: return new ST(getMessage());
814          case 4: return new ST(getMessage());
815          case 5: return new ID(getMessage(), new Integer( 156 ));
816          case 6: return new ID(getMessage(), new Integer( 157 ));
817          case 7: return new ID(getMessage(), new Integer( 158 ));
818          case 8: return new TQ(getMessage());
819          default: return null;
820       }
821   }
822
823
824}
825