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.v25.segment;
035
036// import ca.uhn.hl7v2.model.v25.group.*;
037import ca.uhn.hl7v2.model.v25.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 RXO message segment (Pharmacy/Treatment Order). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>RXO-1: Requested Give Code (CE) <b>optional </b>
052     * <li>RXO-2: Requested Give Amount - Minimum (NM) <b>optional </b>
053     * <li>RXO-3: Requested Give Amount - Maximum (NM) <b>optional </b>
054     * <li>RXO-4: Requested Give Units (CE) <b>optional </b>
055     * <li>RXO-5: Requested Dosage Form (CE) <b>optional </b>
056     * <li>RXO-6: Provider's Pharmacy/Treatment Instructions (CE) <b>optional repeating</b>
057     * <li>RXO-7: Provider's Administration Instructions (CE) <b>optional repeating</b>
058     * <li>RXO-8: Deliver-To Location (LA1) <b>optional </b>
059     * <li>RXO-9: Allow Substitutions (ID) <b>optional </b>
060     * <li>RXO-10: Requested Dispense Code (CE) <b>optional </b>
061     * <li>RXO-11: Requested Dispense Amount (NM) <b>optional </b>
062     * <li>RXO-12: Requested Dispense Units (CE) <b>optional </b>
063     * <li>RXO-13: Number Of Refills (NM) <b>optional </b>
064     * <li>RXO-14: Ordering Provider's DEA Number (XCN) <b>optional repeating</b>
065     * <li>RXO-15: Pharmacist/Treatment Supplier's Verifier ID (XCN) <b>optional repeating</b>
066     * <li>RXO-16: Needs Human Review (ID) <b>optional </b>
067     * <li>RXO-17: Requested Give Per (Time Unit) (ST) <b>optional </b>
068     * <li>RXO-18: Requested Give Strength (NM) <b>optional </b>
069     * <li>RXO-19: Requested Give Strength Units (CE) <b>optional </b>
070     * <li>RXO-20: Indication (CE) <b>optional repeating</b>
071     * <li>RXO-21: Requested Give Rate Amount (ST) <b>optional </b>
072     * <li>RXO-22: Requested Give Rate Units (CE) <b>optional </b>
073     * <li>RXO-23: Total Daily Dose (CQ) <b>optional </b>
074     * <li>RXO-24: Supplementary Code (CE) <b>optional repeating</b>
075     * <li>RXO-25: Requested Drug Strength Volume (NM) <b>optional </b>
076     * <li>RXO-26: Requested Drug Strength Volume Units (CWE) <b>optional </b>
077     * <li>RXO-27: Pharmacy Order Type (ID) <b>optional </b>
078     * <li>RXO-28: Dispensing Interval (NM) <b>optional </b>
079 * </ul>
080 */
081@SuppressWarnings("unused")
082public class RXO extends AbstractSegment {
083
084    /** 
085     * Creates a new RXO segment
086     */
087    public RXO(Group parent, ModelClassFactory factory) {
088       super(parent, factory);
089       init(factory);
090    }
091
092    private void init(ModelClassFactory factory) {
093       try {
094                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Requested Give Code");
095                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Requested Give Amount - Minimum");
096                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Requested Give Amount - Maximum");
097                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Requested Give Units");
098                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Requested Dosage Form");
099                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Provider's Pharmacy/Treatment Instructions");
100                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Provider's Administration Instructions");
101                                  this.add(LA1.class, false, 1, 200, new Object[]{ getMessage() }, "Deliver-To Location");
102                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(161) }, "Allow Substitutions");
103                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Requested Dispense Code");
104                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Requested Dispense Amount");
105                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Requested Dispense Units");
106                                  this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Number Of Refills");
107                                  this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Ordering Provider's DEA Number");
108                                  this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Pharmacist/Treatment Supplier's Verifier ID");
109                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Needs Human Review");
110                                  this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Requested Give Per (Time Unit)");
111                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Requested Give Strength");
112                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Requested Give Strength Units");
113                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Indication");
114                                  this.add(ST.class, false, 1, 6, new Object[]{ getMessage() }, "Requested Give Rate Amount");
115                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Requested Give Rate Units");
116                                  this.add(CQ.class, false, 1, 10, new Object[]{ getMessage() }, "Total Daily Dose");
117                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Supplementary Code");
118                                  this.add(NM.class, false, 1, 5, new Object[]{ getMessage() }, "Requested Drug Strength Volume");
119                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Requested Drug Strength Volume Units");
120                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(480) }, "Pharmacy Order Type");
121                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Dispensing Interval");
122       } catch(HL7Exception e) {
123          log.error("Unexpected error creating RXO - this is probably a bug in the source code generator.", e);
124       }
125    }
126
127
128
129    /**
130     * Returns
131     * RXO-1: "Requested Give Code" - creates it if necessary
132     */
133    public CE getRequestedGiveCode() { 
134                CE retVal = this.getTypedField(1, 0);
135                return retVal;
136    }
137    
138    /**
139     * Returns
140     * RXO-1: "Requested Give Code" - creates it if necessary
141     */
142    public CE getRxo1_RequestedGiveCode() { 
143                CE retVal = this.getTypedField(1, 0);
144                return retVal;
145    }
146
147
148
149    /**
150     * Returns
151     * RXO-2: "Requested Give Amount - Minimum" - creates it if necessary
152     */
153    public NM getRequestedGiveAmountMinimum() { 
154                NM retVal = this.getTypedField(2, 0);
155                return retVal;
156    }
157    
158    /**
159     * Returns
160     * RXO-2: "Requested Give Amount - Minimum" - creates it if necessary
161     */
162    public NM getRxo2_RequestedGiveAmountMinimum() { 
163                NM retVal = this.getTypedField(2, 0);
164                return retVal;
165    }
166
167
168
169    /**
170     * Returns
171     * RXO-3: "Requested Give Amount - Maximum" - creates it if necessary
172     */
173    public NM getRequestedGiveAmountMaximum() { 
174                NM retVal = this.getTypedField(3, 0);
175                return retVal;
176    }
177    
178    /**
179     * Returns
180     * RXO-3: "Requested Give Amount - Maximum" - creates it if necessary
181     */
182    public NM getRxo3_RequestedGiveAmountMaximum() { 
183                NM retVal = this.getTypedField(3, 0);
184                return retVal;
185    }
186
187
188
189    /**
190     * Returns
191     * RXO-4: "Requested Give Units" - creates it if necessary
192     */
193    public CE getRequestedGiveUnits() { 
194                CE retVal = this.getTypedField(4, 0);
195                return retVal;
196    }
197    
198    /**
199     * Returns
200     * RXO-4: "Requested Give Units" - creates it if necessary
201     */
202    public CE getRxo4_RequestedGiveUnits() { 
203                CE retVal = this.getTypedField(4, 0);
204                return retVal;
205    }
206
207
208
209    /**
210     * Returns
211     * RXO-5: "Requested Dosage Form" - creates it if necessary
212     */
213    public CE getRequestedDosageForm() { 
214                CE retVal = this.getTypedField(5, 0);
215                return retVal;
216    }
217    
218    /**
219     * Returns
220     * RXO-5: "Requested Dosage Form" - creates it if necessary
221     */
222    public CE getRxo5_RequestedDosageForm() { 
223                CE retVal = this.getTypedField(5, 0);
224                return retVal;
225    }
226
227
228    /**
229     * Returns all repetitions of Provider's Pharmacy/Treatment Instructions (RXO-6).
230     */
231    public CE[] getProviderSPharmacyTreatmentInstructions() {
232        CE[] retVal = this.getTypedField(6, new CE[0]);
233        return retVal;
234    }
235
236
237    /**
238     * Returns all repetitions of Provider's Pharmacy/Treatment Instructions (RXO-6).
239     */
240    public CE[] getRxo6_ProviderSPharmacyTreatmentInstructions() {
241        CE[] retVal = this.getTypedField(6, new CE[0]);
242        return retVal;
243    }
244
245
246    /**
247     * Returns a count of the current number of repetitions of Provider's Pharmacy/Treatment Instructions (RXO-6).
248     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
249     * it will return zero.
250     */
251    public int getProviderSPharmacyTreatmentInstructionsReps() {
252        return this.getReps(6);
253    }
254
255
256    /**
257     * Returns a specific repetition of
258     * RXO-6: "Provider's Pharmacy/Treatment Instructions" - creates it if necessary
259     *
260     * @param rep The repetition index (0-indexed)
261     */
262    public CE getProviderSPharmacyTreatmentInstructions(int rep) { 
263                CE retVal = this.getTypedField(6, rep);
264                return retVal;
265    }
266
267    /**
268     * Returns a specific repetition of
269     * RXO-6: "Provider's Pharmacy/Treatment Instructions" - creates it if necessary
270     *
271     * @param rep The repetition index (0-indexed)
272     */
273    public CE getRxo6_ProviderSPharmacyTreatmentInstructions(int rep) { 
274                CE retVal = this.getTypedField(6, rep);
275                return retVal;
276    }
277
278    /**
279     * Returns a count of the current number of repetitions of Provider's Pharmacy/Treatment Instructions (RXO-6).
280     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
281     * it will return zero.
282     */
283    public int getRxo6_ProviderSPharmacyTreatmentInstructionsReps() {
284        return this.getReps(6);
285    }
286
287
288    /**
289     * Inserts a repetition of
290     * RXO-6: "Provider's Pharmacy/Treatment Instructions" at a specific index
291     *
292     * @param rep The repetition index (0-indexed)
293     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
294     */
295    public CE insertProviderSPharmacyTreatmentInstructions(int rep) throws HL7Exception { 
296        return (CE) super.insertRepetition(6, rep);
297    }
298
299
300    /**
301     * Inserts a repetition of
302     * RXO-6: "Provider's Pharmacy/Treatment Instructions" at a specific index
303     *
304     * @param rep The repetition index (0-indexed)
305     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
306     */
307    public CE insertRxo6_ProviderSPharmacyTreatmentInstructions(int rep) throws HL7Exception { 
308        return (CE) super.insertRepetition(6, rep);
309    }
310
311
312    /**
313     * Removes a repetition of
314     * RXO-6: "Provider's Pharmacy/Treatment Instructions" at a specific index
315     *
316     * @param rep The repetition index (0-indexed)
317     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
318     */
319    public CE removeProviderSPharmacyTreatmentInstructions(int rep) throws HL7Exception { 
320        return (CE) super.removeRepetition(6, rep);
321    }
322
323
324    /**
325     * Removes a repetition of
326     * RXO-6: "Provider's Pharmacy/Treatment Instructions" at a specific index
327     *
328     * @param rep The repetition index (0-indexed)
329     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
330     */
331    public CE removeRxo6_ProviderSPharmacyTreatmentInstructions(int rep) throws HL7Exception { 
332        return (CE) super.removeRepetition(6, rep);
333    }
334
335
336
337    /**
338     * Returns all repetitions of Provider's Administration Instructions (RXO-7).
339     */
340    public CE[] getProviderSAdministrationInstructions() {
341        CE[] retVal = this.getTypedField(7, new CE[0]);
342        return retVal;
343    }
344
345
346    /**
347     * Returns all repetitions of Provider's Administration Instructions (RXO-7).
348     */
349    public CE[] getRxo7_ProviderSAdministrationInstructions() {
350        CE[] retVal = this.getTypedField(7, new CE[0]);
351        return retVal;
352    }
353
354
355    /**
356     * Returns a count of the current number of repetitions of Provider's Administration Instructions (RXO-7).
357     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
358     * it will return zero.
359     */
360    public int getProviderSAdministrationInstructionsReps() {
361        return this.getReps(7);
362    }
363
364
365    /**
366     * Returns a specific repetition of
367     * RXO-7: "Provider's Administration Instructions" - creates it if necessary
368     *
369     * @param rep The repetition index (0-indexed)
370     */
371    public CE getProviderSAdministrationInstructions(int rep) { 
372                CE retVal = this.getTypedField(7, rep);
373                return retVal;
374    }
375
376    /**
377     * Returns a specific repetition of
378     * RXO-7: "Provider's Administration Instructions" - creates it if necessary
379     *
380     * @param rep The repetition index (0-indexed)
381     */
382    public CE getRxo7_ProviderSAdministrationInstructions(int rep) { 
383                CE retVal = this.getTypedField(7, rep);
384                return retVal;
385    }
386
387    /**
388     * Returns a count of the current number of repetitions of Provider's Administration Instructions (RXO-7).
389     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
390     * it will return zero.
391     */
392    public int getRxo7_ProviderSAdministrationInstructionsReps() {
393        return this.getReps(7);
394    }
395
396
397    /**
398     * Inserts a repetition of
399     * RXO-7: "Provider's Administration Instructions" at a specific index
400     *
401     * @param rep The repetition index (0-indexed)
402     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
403     */
404    public CE insertProviderSAdministrationInstructions(int rep) throws HL7Exception { 
405        return (CE) super.insertRepetition(7, rep);
406    }
407
408
409    /**
410     * Inserts a repetition of
411     * RXO-7: "Provider's Administration Instructions" at a specific index
412     *
413     * @param rep The repetition index (0-indexed)
414     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
415     */
416    public CE insertRxo7_ProviderSAdministrationInstructions(int rep) throws HL7Exception { 
417        return (CE) super.insertRepetition(7, rep);
418    }
419
420
421    /**
422     * Removes a repetition of
423     * RXO-7: "Provider's Administration Instructions" at a specific index
424     *
425     * @param rep The repetition index (0-indexed)
426     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
427     */
428    public CE removeProviderSAdministrationInstructions(int rep) throws HL7Exception { 
429        return (CE) super.removeRepetition(7, rep);
430    }
431
432
433    /**
434     * Removes a repetition of
435     * RXO-7: "Provider's Administration Instructions" at a specific index
436     *
437     * @param rep The repetition index (0-indexed)
438     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
439     */
440    public CE removeRxo7_ProviderSAdministrationInstructions(int rep) throws HL7Exception { 
441        return (CE) super.removeRepetition(7, rep);
442    }
443
444
445
446
447    /**
448     * Returns
449     * RXO-8: "Deliver-To Location" - creates it if necessary
450     */
451    public LA1 getDeliverToLocation() { 
452                LA1 retVal = this.getTypedField(8, 0);
453                return retVal;
454    }
455    
456    /**
457     * Returns
458     * RXO-8: "Deliver-To Location" - creates it if necessary
459     */
460    public LA1 getRxo8_DeliverToLocation() { 
461                LA1 retVal = this.getTypedField(8, 0);
462                return retVal;
463    }
464
465
466
467    /**
468     * Returns
469     * RXO-9: "Allow Substitutions" - creates it if necessary
470     */
471    public ID getAllowSubstitutions() { 
472                ID retVal = this.getTypedField(9, 0);
473                return retVal;
474    }
475    
476    /**
477     * Returns
478     * RXO-9: "Allow Substitutions" - creates it if necessary
479     */
480    public ID getRxo9_AllowSubstitutions() { 
481                ID retVal = this.getTypedField(9, 0);
482                return retVal;
483    }
484
485
486
487    /**
488     * Returns
489     * RXO-10: "Requested Dispense Code" - creates it if necessary
490     */
491    public CE getRequestedDispenseCode() { 
492                CE retVal = this.getTypedField(10, 0);
493                return retVal;
494    }
495    
496    /**
497     * Returns
498     * RXO-10: "Requested Dispense Code" - creates it if necessary
499     */
500    public CE getRxo10_RequestedDispenseCode() { 
501                CE retVal = this.getTypedField(10, 0);
502                return retVal;
503    }
504
505
506
507    /**
508     * Returns
509     * RXO-11: "Requested Dispense Amount" - creates it if necessary
510     */
511    public NM getRequestedDispenseAmount() { 
512                NM retVal = this.getTypedField(11, 0);
513                return retVal;
514    }
515    
516    /**
517     * Returns
518     * RXO-11: "Requested Dispense Amount" - creates it if necessary
519     */
520    public NM getRxo11_RequestedDispenseAmount() { 
521                NM retVal = this.getTypedField(11, 0);
522                return retVal;
523    }
524
525
526
527    /**
528     * Returns
529     * RXO-12: "Requested Dispense Units" - creates it if necessary
530     */
531    public CE getRequestedDispenseUnits() { 
532                CE retVal = this.getTypedField(12, 0);
533                return retVal;
534    }
535    
536    /**
537     * Returns
538     * RXO-12: "Requested Dispense Units" - creates it if necessary
539     */
540    public CE getRxo12_RequestedDispenseUnits() { 
541                CE retVal = this.getTypedField(12, 0);
542                return retVal;
543    }
544
545
546
547    /**
548     * Returns
549     * RXO-13: "Number Of Refills" - creates it if necessary
550     */
551    public NM getNumberOfRefills() { 
552                NM retVal = this.getTypedField(13, 0);
553                return retVal;
554    }
555    
556    /**
557     * Returns
558     * RXO-13: "Number Of Refills" - creates it if necessary
559     */
560    public NM getRxo13_NumberOfRefills() { 
561                NM retVal = this.getTypedField(13, 0);
562                return retVal;
563    }
564
565
566    /**
567     * Returns all repetitions of Ordering Provider's DEA Number (RXO-14).
568     */
569    public XCN[] getOrderingProviderSDEANumber() {
570        XCN[] retVal = this.getTypedField(14, new XCN[0]);
571        return retVal;
572    }
573
574
575    /**
576     * Returns all repetitions of Ordering Provider's DEA Number (RXO-14).
577     */
578    public XCN[] getRxo14_OrderingProviderSDEANumber() {
579        XCN[] retVal = this.getTypedField(14, new XCN[0]);
580        return retVal;
581    }
582
583
584    /**
585     * Returns a count of the current number of repetitions of Ordering Provider's DEA Number (RXO-14).
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 getOrderingProviderSDEANumberReps() {
590        return this.getReps(14);
591    }
592
593
594    /**
595     * Returns a specific repetition of
596     * RXO-14: "Ordering Provider's DEA Number" - creates it if necessary
597     *
598     * @param rep The repetition index (0-indexed)
599     */
600    public XCN getOrderingProviderSDEANumber(int rep) { 
601                XCN retVal = this.getTypedField(14, rep);
602                return retVal;
603    }
604
605    /**
606     * Returns a specific repetition of
607     * RXO-14: "Ordering Provider's DEA Number" - creates it if necessary
608     *
609     * @param rep The repetition index (0-indexed)
610     */
611    public XCN getRxo14_OrderingProviderSDEANumber(int rep) { 
612                XCN retVal = this.getTypedField(14, rep);
613                return retVal;
614    }
615
616    /**
617     * Returns a count of the current number of repetitions of Ordering Provider's DEA Number (RXO-14).
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 getRxo14_OrderingProviderSDEANumberReps() {
622        return this.getReps(14);
623    }
624
625
626    /**
627     * Inserts a repetition of
628     * RXO-14: "Ordering Provider's DEA Number" 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 XCN insertOrderingProviderSDEANumber(int rep) throws HL7Exception { 
634        return (XCN) super.insertRepetition(14, rep);
635    }
636
637
638    /**
639     * Inserts a repetition of
640     * RXO-14: "Ordering Provider's DEA Number" 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 XCN insertRxo14_OrderingProviderSDEANumber(int rep) throws HL7Exception { 
646        return (XCN) super.insertRepetition(14, rep);
647    }
648
649
650    /**
651     * Removes a repetition of
652     * RXO-14: "Ordering Provider's DEA Number" 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 XCN removeOrderingProviderSDEANumber(int rep) throws HL7Exception { 
658        return (XCN) super.removeRepetition(14, rep);
659    }
660
661
662    /**
663     * Removes a repetition of
664     * RXO-14: "Ordering Provider's DEA Number" 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 XCN removeRxo14_OrderingProviderSDEANumber(int rep) throws HL7Exception { 
670        return (XCN) super.removeRepetition(14, rep);
671    }
672
673
674
675    /**
676     * Returns all repetitions of Pharmacist/Treatment Supplier's Verifier ID (RXO-15).
677     */
678    public XCN[] getPharmacistTreatmentSupplierSVerifierID() {
679        XCN[] retVal = this.getTypedField(15, new XCN[0]);
680        return retVal;
681    }
682
683
684    /**
685     * Returns all repetitions of Pharmacist/Treatment Supplier's Verifier ID (RXO-15).
686     */
687    public XCN[] getRxo15_PharmacistTreatmentSupplierSVerifierID() {
688        XCN[] retVal = this.getTypedField(15, new XCN[0]);
689        return retVal;
690    }
691
692
693    /**
694     * Returns a count of the current number of repetitions of Pharmacist/Treatment Supplier's Verifier ID (RXO-15).
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 getPharmacistTreatmentSupplierSVerifierIDReps() {
699        return this.getReps(15);
700    }
701
702
703    /**
704     * Returns a specific repetition of
705     * RXO-15: "Pharmacist/Treatment Supplier's Verifier ID" - creates it if necessary
706     *
707     * @param rep The repetition index (0-indexed)
708     */
709    public XCN getPharmacistTreatmentSupplierSVerifierID(int rep) { 
710                XCN retVal = this.getTypedField(15, rep);
711                return retVal;
712    }
713
714    /**
715     * Returns a specific repetition of
716     * RXO-15: "Pharmacist/Treatment Supplier's Verifier ID" - creates it if necessary
717     *
718     * @param rep The repetition index (0-indexed)
719     */
720    public XCN getRxo15_PharmacistTreatmentSupplierSVerifierID(int rep) { 
721                XCN retVal = this.getTypedField(15, rep);
722                return retVal;
723    }
724
725    /**
726     * Returns a count of the current number of repetitions of Pharmacist/Treatment Supplier's Verifier ID (RXO-15).
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 getRxo15_PharmacistTreatmentSupplierSVerifierIDReps() {
731        return this.getReps(15);
732    }
733
734
735    /**
736     * Inserts a repetition of
737     * RXO-15: "Pharmacist/Treatment Supplier's Verifier ID" 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 XCN insertPharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception { 
743        return (XCN) super.insertRepetition(15, rep);
744    }
745
746
747    /**
748     * Inserts a repetition of
749     * RXO-15: "Pharmacist/Treatment Supplier's Verifier ID" 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 XCN insertRxo15_PharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception { 
755        return (XCN) super.insertRepetition(15, rep);
756    }
757
758
759    /**
760     * Removes a repetition of
761     * RXO-15: "Pharmacist/Treatment Supplier's Verifier ID" 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 XCN removePharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception { 
767        return (XCN) super.removeRepetition(15, rep);
768    }
769
770
771    /**
772     * Removes a repetition of
773     * RXO-15: "Pharmacist/Treatment Supplier's Verifier ID" 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 XCN removeRxo15_PharmacistTreatmentSupplierSVerifierID(int rep) throws HL7Exception { 
779        return (XCN) super.removeRepetition(15, rep);
780    }
781
782
783
784
785    /**
786     * Returns
787     * RXO-16: "Needs Human Review" - creates it if necessary
788     */
789    public ID getNeedsHumanReview() { 
790                ID retVal = this.getTypedField(16, 0);
791                return retVal;
792    }
793    
794    /**
795     * Returns
796     * RXO-16: "Needs Human Review" - creates it if necessary
797     */
798    public ID getRxo16_NeedsHumanReview() { 
799                ID retVal = this.getTypedField(16, 0);
800                return retVal;
801    }
802
803
804
805    /**
806     * Returns
807     * RXO-17: "Requested Give Per (Time Unit)" - creates it if necessary
808     */
809    public ST getRequestedGivePerTimeUnit() { 
810                ST retVal = this.getTypedField(17, 0);
811                return retVal;
812    }
813    
814    /**
815     * Returns
816     * RXO-17: "Requested Give Per (Time Unit)" - creates it if necessary
817     */
818    public ST getRxo17_RequestedGivePerTimeUnit() { 
819                ST retVal = this.getTypedField(17, 0);
820                return retVal;
821    }
822
823
824
825    /**
826     * Returns
827     * RXO-18: "Requested Give Strength" - creates it if necessary
828     */
829    public NM getRequestedGiveStrength() { 
830                NM retVal = this.getTypedField(18, 0);
831                return retVal;
832    }
833    
834    /**
835     * Returns
836     * RXO-18: "Requested Give Strength" - creates it if necessary
837     */
838    public NM getRxo18_RequestedGiveStrength() { 
839                NM retVal = this.getTypedField(18, 0);
840                return retVal;
841    }
842
843
844
845    /**
846     * Returns
847     * RXO-19: "Requested Give Strength Units" - creates it if necessary
848     */
849    public CE getRequestedGiveStrengthUnits() { 
850                CE retVal = this.getTypedField(19, 0);
851                return retVal;
852    }
853    
854    /**
855     * Returns
856     * RXO-19: "Requested Give Strength Units" - creates it if necessary
857     */
858    public CE getRxo19_RequestedGiveStrengthUnits() { 
859                CE retVal = this.getTypedField(19, 0);
860                return retVal;
861    }
862
863
864    /**
865     * Returns all repetitions of Indication (RXO-20).
866     */
867    public CE[] getIndication() {
868        CE[] retVal = this.getTypedField(20, new CE[0]);
869        return retVal;
870    }
871
872
873    /**
874     * Returns all repetitions of Indication (RXO-20).
875     */
876    public CE[] getRxo20_Indication() {
877        CE[] retVal = this.getTypedField(20, new CE[0]);
878        return retVal;
879    }
880
881
882    /**
883     * Returns a count of the current number of repetitions of Indication (RXO-20).
884     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
885     * it will return zero.
886     */
887    public int getIndicationReps() {
888        return this.getReps(20);
889    }
890
891
892    /**
893     * Returns a specific repetition of
894     * RXO-20: "Indication" - creates it if necessary
895     *
896     * @param rep The repetition index (0-indexed)
897     */
898    public CE getIndication(int rep) { 
899                CE retVal = this.getTypedField(20, rep);
900                return retVal;
901    }
902
903    /**
904     * Returns a specific repetition of
905     * RXO-20: "Indication" - creates it if necessary
906     *
907     * @param rep The repetition index (0-indexed)
908     */
909    public CE getRxo20_Indication(int rep) { 
910                CE retVal = this.getTypedField(20, rep);
911                return retVal;
912    }
913
914    /**
915     * Returns a count of the current number of repetitions of Indication (RXO-20).
916     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
917     * it will return zero.
918     */
919    public int getRxo20_IndicationReps() {
920        return this.getReps(20);
921    }
922
923
924    /**
925     * Inserts a repetition of
926     * RXO-20: "Indication" at a specific index
927     *
928     * @param rep The repetition index (0-indexed)
929     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
930     */
931    public CE insertIndication(int rep) throws HL7Exception { 
932        return (CE) super.insertRepetition(20, rep);
933    }
934
935
936    /**
937     * Inserts a repetition of
938     * RXO-20: "Indication" at a specific index
939     *
940     * @param rep The repetition index (0-indexed)
941     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
942     */
943    public CE insertRxo20_Indication(int rep) throws HL7Exception { 
944        return (CE) super.insertRepetition(20, rep);
945    }
946
947
948    /**
949     * Removes a repetition of
950     * RXO-20: "Indication" at a specific index
951     *
952     * @param rep The repetition index (0-indexed)
953     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
954     */
955    public CE removeIndication(int rep) throws HL7Exception { 
956        return (CE) super.removeRepetition(20, rep);
957    }
958
959
960    /**
961     * Removes a repetition of
962     * RXO-20: "Indication" at a specific index
963     *
964     * @param rep The repetition index (0-indexed)
965     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
966     */
967    public CE removeRxo20_Indication(int rep) throws HL7Exception { 
968        return (CE) super.removeRepetition(20, rep);
969    }
970
971
972
973
974    /**
975     * Returns
976     * RXO-21: "Requested Give Rate Amount" - creates it if necessary
977     */
978    public ST getRequestedGiveRateAmount() { 
979                ST retVal = this.getTypedField(21, 0);
980                return retVal;
981    }
982    
983    /**
984     * Returns
985     * RXO-21: "Requested Give Rate Amount" - creates it if necessary
986     */
987    public ST getRxo21_RequestedGiveRateAmount() { 
988                ST retVal = this.getTypedField(21, 0);
989                return retVal;
990    }
991
992
993
994    /**
995     * Returns
996     * RXO-22: "Requested Give Rate Units" - creates it if necessary
997     */
998    public CE getRequestedGiveRateUnits() { 
999                CE retVal = this.getTypedField(22, 0);
1000                return retVal;
1001    }
1002    
1003    /**
1004     * Returns
1005     * RXO-22: "Requested Give Rate Units" - creates it if necessary
1006     */
1007    public CE getRxo22_RequestedGiveRateUnits() { 
1008                CE retVal = this.getTypedField(22, 0);
1009                return retVal;
1010    }
1011
1012
1013
1014    /**
1015     * Returns
1016     * RXO-23: "Total Daily Dose" - creates it if necessary
1017     */
1018    public CQ getTotalDailyDose() { 
1019                CQ retVal = this.getTypedField(23, 0);
1020                return retVal;
1021    }
1022    
1023    /**
1024     * Returns
1025     * RXO-23: "Total Daily Dose" - creates it if necessary
1026     */
1027    public CQ getRxo23_TotalDailyDose() { 
1028                CQ retVal = this.getTypedField(23, 0);
1029                return retVal;
1030    }
1031
1032
1033    /**
1034     * Returns all repetitions of Supplementary Code (RXO-24).
1035     */
1036    public CE[] getSupplementaryCode() {
1037        CE[] retVal = this.getTypedField(24, new CE[0]);
1038        return retVal;
1039    }
1040
1041
1042    /**
1043     * Returns all repetitions of Supplementary Code (RXO-24).
1044     */
1045    public CE[] getRxo24_SupplementaryCode() {
1046        CE[] retVal = this.getTypedField(24, new CE[0]);
1047        return retVal;
1048    }
1049
1050
1051    /**
1052     * Returns a count of the current number of repetitions of Supplementary Code (RXO-24).
1053     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1054     * it will return zero.
1055     */
1056    public int getSupplementaryCodeReps() {
1057        return this.getReps(24);
1058    }
1059
1060
1061    /**
1062     * Returns a specific repetition of
1063     * RXO-24: "Supplementary Code" - creates it if necessary
1064     *
1065     * @param rep The repetition index (0-indexed)
1066     */
1067    public CE getSupplementaryCode(int rep) { 
1068                CE retVal = this.getTypedField(24, rep);
1069                return retVal;
1070    }
1071
1072    /**
1073     * Returns a specific repetition of
1074     * RXO-24: "Supplementary Code" - creates it if necessary
1075     *
1076     * @param rep The repetition index (0-indexed)
1077     */
1078    public CE getRxo24_SupplementaryCode(int rep) { 
1079                CE retVal = this.getTypedField(24, rep);
1080                return retVal;
1081    }
1082
1083    /**
1084     * Returns a count of the current number of repetitions of Supplementary Code (RXO-24).
1085     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1086     * it will return zero.
1087     */
1088    public int getRxo24_SupplementaryCodeReps() {
1089        return this.getReps(24);
1090    }
1091
1092
1093    /**
1094     * Inserts a repetition of
1095     * RXO-24: "Supplementary Code" at a specific index
1096     *
1097     * @param rep The repetition index (0-indexed)
1098     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1099     */
1100    public CE insertSupplementaryCode(int rep) throws HL7Exception { 
1101        return (CE) super.insertRepetition(24, rep);
1102    }
1103
1104
1105    /**
1106     * Inserts a repetition of
1107     * RXO-24: "Supplementary Code" at a specific index
1108     *
1109     * @param rep The repetition index (0-indexed)
1110     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1111     */
1112    public CE insertRxo24_SupplementaryCode(int rep) throws HL7Exception { 
1113        return (CE) super.insertRepetition(24, rep);
1114    }
1115
1116
1117    /**
1118     * Removes a repetition of
1119     * RXO-24: "Supplementary Code" at a specific index
1120     *
1121     * @param rep The repetition index (0-indexed)
1122     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1123     */
1124    public CE removeSupplementaryCode(int rep) throws HL7Exception { 
1125        return (CE) super.removeRepetition(24, rep);
1126    }
1127
1128
1129    /**
1130     * Removes a repetition of
1131     * RXO-24: "Supplementary Code" at a specific index
1132     *
1133     * @param rep The repetition index (0-indexed)
1134     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1135     */
1136    public CE removeRxo24_SupplementaryCode(int rep) throws HL7Exception { 
1137        return (CE) super.removeRepetition(24, rep);
1138    }
1139
1140
1141
1142
1143    /**
1144     * Returns
1145     * RXO-25: "Requested Drug Strength Volume" - creates it if necessary
1146     */
1147    public NM getRequestedDrugStrengthVolume() { 
1148                NM retVal = this.getTypedField(25, 0);
1149                return retVal;
1150    }
1151    
1152    /**
1153     * Returns
1154     * RXO-25: "Requested Drug Strength Volume" - creates it if necessary
1155     */
1156    public NM getRxo25_RequestedDrugStrengthVolume() { 
1157                NM retVal = this.getTypedField(25, 0);
1158                return retVal;
1159    }
1160
1161
1162
1163    /**
1164     * Returns
1165     * RXO-26: "Requested Drug Strength Volume Units" - creates it if necessary
1166     */
1167    public CWE getRequestedDrugStrengthVolumeUnits() { 
1168                CWE retVal = this.getTypedField(26, 0);
1169                return retVal;
1170    }
1171    
1172    /**
1173     * Returns
1174     * RXO-26: "Requested Drug Strength Volume Units" - creates it if necessary
1175     */
1176    public CWE getRxo26_RequestedDrugStrengthVolumeUnits() { 
1177                CWE retVal = this.getTypedField(26, 0);
1178                return retVal;
1179    }
1180
1181
1182
1183    /**
1184     * Returns
1185     * RXO-27: "Pharmacy Order Type" - creates it if necessary
1186     */
1187    public ID getPharmacyOrderType() { 
1188                ID retVal = this.getTypedField(27, 0);
1189                return retVal;
1190    }
1191    
1192    /**
1193     * Returns
1194     * RXO-27: "Pharmacy Order Type" - creates it if necessary
1195     */
1196    public ID getRxo27_PharmacyOrderType() { 
1197                ID retVal = this.getTypedField(27, 0);
1198                return retVal;
1199    }
1200
1201
1202
1203    /**
1204     * Returns
1205     * RXO-28: "Dispensing Interval" - creates it if necessary
1206     */
1207    public NM getDispensingInterval() { 
1208                NM retVal = this.getTypedField(28, 0);
1209                return retVal;
1210    }
1211    
1212    /**
1213     * Returns
1214     * RXO-28: "Dispensing Interval" - creates it if necessary
1215     */
1216    public NM getRxo28_DispensingInterval() { 
1217                NM retVal = this.getTypedField(28, 0);
1218                return retVal;
1219    }
1220
1221
1222
1223
1224
1225    /** {@inheritDoc} */   
1226    protected Type createNewTypeWithoutReflection(int field) {
1227       switch (field) {
1228          case 0: return new CE(getMessage());
1229          case 1: return new NM(getMessage());
1230          case 2: return new NM(getMessage());
1231          case 3: return new CE(getMessage());
1232          case 4: return new CE(getMessage());
1233          case 5: return new CE(getMessage());
1234          case 6: return new CE(getMessage());
1235          case 7: return new LA1(getMessage());
1236          case 8: return new ID(getMessage(), new Integer( 161 ));
1237          case 9: return new CE(getMessage());
1238          case 10: return new NM(getMessage());
1239          case 11: return new CE(getMessage());
1240          case 12: return new NM(getMessage());
1241          case 13: return new XCN(getMessage());
1242          case 14: return new XCN(getMessage());
1243          case 15: return new ID(getMessage(), new Integer( 136 ));
1244          case 16: return new ST(getMessage());
1245          case 17: return new NM(getMessage());
1246          case 18: return new CE(getMessage());
1247          case 19: return new CE(getMessage());
1248          case 20: return new ST(getMessage());
1249          case 21: return new CE(getMessage());
1250          case 22: return new CQ(getMessage());
1251          case 23: return new CE(getMessage());
1252          case 24: return new NM(getMessage());
1253          case 25: return new CWE(getMessage());
1254          case 26: return new ID(getMessage(), new Integer( 480 ));
1255          case 27: return new NM(getMessage());
1256          default: return null;
1257       }
1258   }
1259
1260
1261}
1262