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