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