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