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