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