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