View Javadoc
1   /*
2    * This class is an auto-generated source file for a HAPI
3    * HL7 v2.x standard structure class.
4    *
5    * For more information, visit: http://hl7api.sourceforge.net/
6    * 
7    * The contents of this file are subject to the Mozilla Public License Version 1.1 
8    * (the "License"); you may not use this file except in compliance with the License. 
9    * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
10   * Software distributed under the License is distributed on an "AS IS" basis, 
11   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
12   * specific language governing rights and limitations under the License. 
13   * 
14   * The Original Code is "[file_name]".  Description: 
15   * "[one_line_description]" 
16   * 
17   * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
18   * 2012.  All Rights Reserved. 
19   * 
20   * Contributor(s): ______________________________________. 
21   * 
22   * Alternatively, the contents of this file may be used under the terms of the 
23   * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
24   * applicable instead of those above.  If you wish to allow use of your version of this 
25   * file only under the terms of the GPL and not to allow others to use your version 
26   * of this file under the MPL, indicate your decision by deleting  the provisions above 
27   * and replace  them with the notice and other provisions required by the GPL License.  
28   * If you do not delete the provisions above, a recipient may use your version of 
29   * this file under either the MPL or the GPL. 
30   * 
31   */
32  
33  
34  package ca.uhn.hl7v2.model.v27.segment;
35  
36  // import ca.uhn.hl7v2.model.v27.group.*;
37  import ca.uhn.hl7v2.model.v27.datatype.*;
38  import ca.uhn.hl7v2.HL7Exception;
39  import ca.uhn.hl7v2.parser.ModelClassFactory;
40  import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
41  import ca.uhn.hl7v2.model.AbstractMessage;
42  import ca.uhn.hl7v2.model.Group;
43  import ca.uhn.hl7v2.model.Type;
44  import ca.uhn.hl7v2.model.AbstractSegment;
45  import ca.uhn.hl7v2.model.Varies;
46  
47  
48  /**
49   *<p>Represents an HL7 RXG message segment (Pharmacy/Treatment Give). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>RXG-1: Give Sub-ID Counter (NM) <b> </b>
53       * <li>RXG-2: Dispense Sub-ID Counter (NM) <b>optional </b>
54       * <li>RXG-3: Quantity/Timing (NULLDT) <b>optional </b>
55       * <li>RXG-4: Give Code (CWE) <b> </b>
56       * <li>RXG-5: Give Amount - Minimum (NM) <b> </b>
57       * <li>RXG-6: Give Amount - Maximum (NM) <b>optional </b>
58       * <li>RXG-7: Give Units (CWE) <b> </b>
59       * <li>RXG-8: Give Dosage Form (CWE) <b>optional </b>
60       * <li>RXG-9: Administration Notes (CWE) <b>optional repeating</b>
61       * <li>RXG-10: Substitution Status (ID) <b>optional </b>
62       * <li>RXG-11: Dispense-to Location (LA2) <b>optional </b>
63       * <li>RXG-12: Needs Human Review (ID) <b>optional </b>
64       * <li>RXG-13: Pharmacy/Treatment Supplier's Special Administration Instructions (CWE) <b>optional repeating</b>
65       * <li>RXG-14: Give Per (Time Unit) (ST) <b>optional </b>
66       * <li>RXG-15: Give Rate Amount (ST) <b>optional </b>
67       * <li>RXG-16: Give Rate Units (CWE) <b>optional </b>
68       * <li>RXG-17: Give Strength (NM) <b>optional </b>
69       * <li>RXG-18: Give Strength Units (CWE) <b>optional </b>
70       * <li>RXG-19: Substance Lot Number (ST) <b>optional repeating</b>
71       * <li>RXG-20: Substance Expiration Date (DTM) <b>optional repeating</b>
72       * <li>RXG-21: Substance Manufacturer Name (CWE) <b>optional repeating</b>
73       * <li>RXG-22: Indication (CWE) <b>optional repeating</b>
74       * <li>RXG-23: Give Drug Strength Volume (NM) <b>optional </b>
75       * <li>RXG-24: Give Drug Strength Volume Units (CWE) <b>optional </b>
76       * <li>RXG-25: Give Barcode Identifier (CWE) <b>optional </b>
77       * <li>RXG-26: Pharmacy Order Type (ID) <b>optional </b>
78       * <li>RXG-27: Dispense to Pharmacy (CWE) <b>optional </b>
79       * <li>RXG-28: Dispense to Pharmacy Address (XAD) <b>optional </b>
80       * <li>RXG-29: Deliver-to Patient Location (PL) <b>optional </b>
81       * <li>RXG-30: Deliver-to Address (XAD) <b>optional </b>
82   * </ul>
83   */
84  @SuppressWarnings("unused")
85  public class RXG extends AbstractSegment {
86  
87      /** 
88       * Creates a new RXG segment
89       */
90      public RXG(Group parent, ModelClassFactory factory) {
91         super(parent, factory);
92         init(factory);
93      }
94  
95      private void init(ModelClassFactory factory) {
96         try {
97                                    this.add(NM.class, true, 1, 0, new Object[]{ getMessage() }, "Give Sub-ID Counter");
98                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Dispense Sub-ID Counter");
99                                    this.add(NULLDT.class, false, 1, 0, new Object[]{ getMessage() }, "Quantity/Timing");
100                                   this.add(CWE.class, true, 1, 0, new Object[]{ getMessage() }, "Give Code");
101                                   this.add(NM.class, true, 1, 0, new Object[]{ getMessage() }, "Give Amount - Minimum");
102                                   this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Give Amount - Maximum");
103                                   this.add(CWE.class, true, 1, 0, new Object[]{ getMessage() }, "Give Units");
104                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Give Dosage Form");
105                                   this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Administration Notes");
106                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(167) }, "Substitution Status");
107                                   this.add(LA2.class, false, 1, 0, new Object[]{ getMessage() }, "Dispense-to Location");
108                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Needs Human Review");
109                                   this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Pharmacy/Treatment Supplier's Special Administration Instructions");
110                                   this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Give Per (Time Unit)");
111                                   this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Give Rate Amount");
112                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Give Rate Units");
113                                   this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Give Strength");
114                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Give Strength Units");
115                                   this.add(ST.class, false, 0, 0, new Object[]{ getMessage() }, "Substance Lot Number");
116                                   this.add(DTM.class, false, 0, 0, new Object[]{ getMessage() }, "Substance Expiration Date");
117                                   this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Substance Manufacturer Name");
118                                   this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Indication");
119                                   this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Give Drug Strength Volume");
120                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Give Drug Strength Volume Units");
121                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Give Barcode Identifier");
122                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(480) }, "Pharmacy Order Type");
123                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Dispense to Pharmacy");
124                                   this.add(XAD.class, false, 1, 0, new Object[]{ getMessage() }, "Dispense to Pharmacy Address");
125                                   this.add(PL.class, false, 1, 0, new Object[]{ getMessage() }, "Deliver-to Patient Location");
126                                   this.add(XAD.class, false, 1, 0, new Object[]{ getMessage() }, "Deliver-to Address");
127        } catch(HL7Exception e) {
128           log.error("Unexpected error creating RXG - this is probably a bug in the source code generator.", e);
129        }
130     }
131 
132 
133 
134     /**
135      * Returns
136      * RXG-1: "Give Sub-ID Counter" - creates it if necessary
137      */
138     public NM getGiveSubIDCounter() { 
139 		NM retVal = this.getTypedField(1, 0);
140 		return retVal;
141     }
142     
143     /**
144      * Returns
145      * RXG-1: "Give Sub-ID Counter" - creates it if necessary
146      */
147     public NM getRxg1_GiveSubIDCounter() { 
148 		NM retVal = this.getTypedField(1, 0);
149 		return retVal;
150     }
151 
152 
153 
154     /**
155      * Returns
156      * RXG-2: "Dispense Sub-ID Counter" - creates it if necessary
157      */
158     public NM getDispenseSubIDCounter() { 
159 		NM retVal = this.getTypedField(2, 0);
160 		return retVal;
161     }
162     
163     /**
164      * Returns
165      * RXG-2: "Dispense Sub-ID Counter" - creates it if necessary
166      */
167     public NM getRxg2_DispenseSubIDCounter() { 
168 		NM retVal = this.getTypedField(2, 0);
169 		return retVal;
170     }
171 
172 
173 
174     /**
175      * Returns
176      * RXG-3: "Quantity/Timing" - creates it if necessary
177      */
178     public NULLDT getQuantityTiming() { 
179 		NULLDT retVal = this.getTypedField(3, 0);
180 		return retVal;
181     }
182     
183     /**
184      * Returns
185      * RXG-3: "Quantity/Timing" - creates it if necessary
186      */
187     public NULLDT getRxg3_QuantityTiming() { 
188 		NULLDT retVal = this.getTypedField(3, 0);
189 		return retVal;
190     }
191 
192 
193 
194     /**
195      * Returns
196      * RXG-4: "Give Code" - creates it if necessary
197      */
198     public CWE getGiveCode() { 
199 		CWE retVal = this.getTypedField(4, 0);
200 		return retVal;
201     }
202     
203     /**
204      * Returns
205      * RXG-4: "Give Code" - creates it if necessary
206      */
207     public CWE getRxg4_GiveCode() { 
208 		CWE retVal = this.getTypedField(4, 0);
209 		return retVal;
210     }
211 
212 
213 
214     /**
215      * Returns
216      * RXG-5: "Give Amount - Minimum" - creates it if necessary
217      */
218     public NM getGiveAmountMinimum() { 
219 		NM retVal = this.getTypedField(5, 0);
220 		return retVal;
221     }
222     
223     /**
224      * Returns
225      * RXG-5: "Give Amount - Minimum" - creates it if necessary
226      */
227     public NM getRxg5_GiveAmountMinimum() { 
228 		NM retVal = this.getTypedField(5, 0);
229 		return retVal;
230     }
231 
232 
233 
234     /**
235      * Returns
236      * RXG-6: "Give Amount - Maximum" - creates it if necessary
237      */
238     public NM getGiveAmountMaximum() { 
239 		NM retVal = this.getTypedField(6, 0);
240 		return retVal;
241     }
242     
243     /**
244      * Returns
245      * RXG-6: "Give Amount - Maximum" - creates it if necessary
246      */
247     public NM getRxg6_GiveAmountMaximum() { 
248 		NM retVal = this.getTypedField(6, 0);
249 		return retVal;
250     }
251 
252 
253 
254     /**
255      * Returns
256      * RXG-7: "Give Units" - creates it if necessary
257      */
258     public CWE getGiveUnits() { 
259 		CWE retVal = this.getTypedField(7, 0);
260 		return retVal;
261     }
262     
263     /**
264      * Returns
265      * RXG-7: "Give Units" - creates it if necessary
266      */
267     public CWE getRxg7_GiveUnits() { 
268 		CWE retVal = this.getTypedField(7, 0);
269 		return retVal;
270     }
271 
272 
273 
274     /**
275      * Returns
276      * RXG-8: "Give Dosage Form" - creates it if necessary
277      */
278     public CWE getGiveDosageForm() { 
279 		CWE retVal = this.getTypedField(8, 0);
280 		return retVal;
281     }
282     
283     /**
284      * Returns
285      * RXG-8: "Give Dosage Form" - creates it if necessary
286      */
287     public CWE getRxg8_GiveDosageForm() { 
288 		CWE retVal = this.getTypedField(8, 0);
289 		return retVal;
290     }
291 
292 
293     /**
294      * Returns all repetitions of Administration Notes (RXG-9).
295      */
296     public CWE[] getAdministrationNotes() {
297     	CWE[] retVal = this.getTypedField(9, new CWE[0]);
298     	return retVal;
299     }
300 
301 
302     /**
303      * Returns all repetitions of Administration Notes (RXG-9).
304      */
305     public CWE[] getRxg9_AdministrationNotes() {
306     	CWE[] retVal = this.getTypedField(9, new CWE[0]);
307     	return retVal;
308     }
309 
310 
311     /**
312      * Returns a count of the current number of repetitions of Administration Notes (RXG-9).
313      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
314      * it will return zero.
315      */
316     public int getAdministrationNotesReps() {
317     	return this.getReps(9);
318     }
319 
320 
321     /**
322      * Returns a specific repetition of
323      * RXG-9: "Administration Notes" - creates it if necessary
324      *
325      * @param rep The repetition index (0-indexed)
326      */
327     public CWE getAdministrationNotes(int rep) { 
328 		CWE retVal = this.getTypedField(9, rep);
329 		return retVal;
330     }
331 
332     /**
333      * Returns a specific repetition of
334      * RXG-9: "Administration Notes" - creates it if necessary
335      *
336      * @param rep The repetition index (0-indexed)
337      */
338     public CWE getRxg9_AdministrationNotes(int rep) { 
339 		CWE retVal = this.getTypedField(9, rep);
340 		return retVal;
341     }
342 
343     /**
344      * Returns a count of the current number of repetitions of Administration Notes (RXG-9).
345      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
346      * it will return zero.
347      */
348     public int getRxg9_AdministrationNotesReps() {
349     	return this.getReps(9);
350     }
351 
352 
353     /**
354      * Inserts a repetition of
355      * RXG-9: "Administration Notes" at a specific index
356      *
357      * @param rep The repetition index (0-indexed)
358      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
359      */
360     public CWE insertAdministrationNotes(int rep) throws HL7Exception { 
361         return (CWE) super.insertRepetition(9, rep);
362     }
363 
364 
365     /**
366      * Inserts a repetition of
367      * RXG-9: "Administration Notes" at a specific index
368      *
369      * @param rep The repetition index (0-indexed)
370      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
371      */
372     public CWE insertRxg9_AdministrationNotes(int rep) throws HL7Exception { 
373         return (CWE) super.insertRepetition(9, rep);
374     }
375 
376 
377     /**
378      * Removes a repetition of
379      * RXG-9: "Administration Notes" at a specific index
380      *
381      * @param rep The repetition index (0-indexed)
382      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
383      */
384     public CWE removeAdministrationNotes(int rep) throws HL7Exception { 
385         return (CWE) super.removeRepetition(9, rep);
386     }
387 
388 
389     /**
390      * Removes a repetition of
391      * RXG-9: "Administration Notes" at a specific index
392      *
393      * @param rep The repetition index (0-indexed)
394      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
395      */
396     public CWE removeRxg9_AdministrationNotes(int rep) throws HL7Exception { 
397         return (CWE) super.removeRepetition(9, rep);
398     }
399 
400 
401 
402 
403     /**
404      * Returns
405      * RXG-10: "Substitution Status" - creates it if necessary
406      */
407     public ID getSubstitutionStatus() { 
408 		ID retVal = this.getTypedField(10, 0);
409 		return retVal;
410     }
411     
412     /**
413      * Returns
414      * RXG-10: "Substitution Status" - creates it if necessary
415      */
416     public ID getRxg10_SubstitutionStatus() { 
417 		ID retVal = this.getTypedField(10, 0);
418 		return retVal;
419     }
420 
421 
422 
423     /**
424      * Returns
425      * RXG-11: "Dispense-to Location" - creates it if necessary
426      */
427     public LA2 getDispenseToLocation() { 
428 		LA2 retVal = this.getTypedField(11, 0);
429 		return retVal;
430     }
431     
432     /**
433      * Returns
434      * RXG-11: "Dispense-to Location" - creates it if necessary
435      */
436     public LA2 getRxg11_DispenseToLocation() { 
437 		LA2 retVal = this.getTypedField(11, 0);
438 		return retVal;
439     }
440 
441 
442 
443     /**
444      * Returns
445      * RXG-12: "Needs Human Review" - creates it if necessary
446      */
447     public ID getNeedsHumanReview() { 
448 		ID retVal = this.getTypedField(12, 0);
449 		return retVal;
450     }
451     
452     /**
453      * Returns
454      * RXG-12: "Needs Human Review" - creates it if necessary
455      */
456     public ID getRxg12_NeedsHumanReview() { 
457 		ID retVal = this.getTypedField(12, 0);
458 		return retVal;
459     }
460 
461 
462     /**
463      * Returns all repetitions of Pharmacy/Treatment Supplier's Special Administration Instructions (RXG-13).
464      */
465     public CWE[] getPharmacyTreatmentSupplierSSpecialAdministrationInstructions() {
466     	CWE[] retVal = this.getTypedField(13, new CWE[0]);
467     	return retVal;
468     }
469 
470 
471     /**
472      * Returns all repetitions of Pharmacy/Treatment Supplier's Special Administration Instructions (RXG-13).
473      */
474     public CWE[] getRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructions() {
475     	CWE[] retVal = this.getTypedField(13, new CWE[0]);
476     	return retVal;
477     }
478 
479 
480     /**
481      * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Administration Instructions (RXG-13).
482      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
483      * it will return zero.
484      */
485     public int getPharmacyTreatmentSupplierSSpecialAdministrationInstructionsReps() {
486     	return this.getReps(13);
487     }
488 
489 
490     /**
491      * Returns a specific repetition of
492      * RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" - creates it if necessary
493      *
494      * @param rep The repetition index (0-indexed)
495      */
496     public CWE getPharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) { 
497 		CWE retVal = this.getTypedField(13, rep);
498 		return retVal;
499     }
500 
501     /**
502      * Returns a specific repetition of
503      * RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" - creates it if necessary
504      *
505      * @param rep The repetition index (0-indexed)
506      */
507     public CWE getRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) { 
508 		CWE retVal = this.getTypedField(13, rep);
509 		return retVal;
510     }
511 
512     /**
513      * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Administration Instructions (RXG-13).
514      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
515      * it will return zero.
516      */
517     public int getRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructionsReps() {
518     	return this.getReps(13);
519     }
520 
521 
522     /**
523      * Inserts a repetition of
524      * RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" at a specific index
525      *
526      * @param rep The repetition index (0-indexed)
527      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
528      */
529     public CWE insertPharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) throws HL7Exception { 
530         return (CWE) super.insertRepetition(13, rep);
531     }
532 
533 
534     /**
535      * Inserts a repetition of
536      * RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" at a specific index
537      *
538      * @param rep The repetition index (0-indexed)
539      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
540      */
541     public CWE insertRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) throws HL7Exception { 
542         return (CWE) super.insertRepetition(13, rep);
543     }
544 
545 
546     /**
547      * Removes a repetition of
548      * RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" at a specific index
549      *
550      * @param rep The repetition index (0-indexed)
551      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
552      */
553     public CWE removePharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) throws HL7Exception { 
554         return (CWE) super.removeRepetition(13, rep);
555     }
556 
557 
558     /**
559      * Removes a repetition of
560      * RXG-13: "Pharmacy/Treatment Supplier's Special Administration Instructions" at a specific index
561      *
562      * @param rep The repetition index (0-indexed)
563      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
564      */
565     public CWE removeRxg13_PharmacyTreatmentSupplierSSpecialAdministrationInstructions(int rep) throws HL7Exception { 
566         return (CWE) super.removeRepetition(13, rep);
567     }
568 
569 
570 
571 
572     /**
573      * Returns
574      * RXG-14: "Give Per (Time Unit)" - creates it if necessary
575      */
576     public ST getGivePerTimeUnit() { 
577 		ST retVal = this.getTypedField(14, 0);
578 		return retVal;
579     }
580     
581     /**
582      * Returns
583      * RXG-14: "Give Per (Time Unit)" - creates it if necessary
584      */
585     public ST getRxg14_GivePerTimeUnit() { 
586 		ST retVal = this.getTypedField(14, 0);
587 		return retVal;
588     }
589 
590 
591 
592     /**
593      * Returns
594      * RXG-15: "Give Rate Amount" - creates it if necessary
595      */
596     public ST getGiveRateAmount() { 
597 		ST retVal = this.getTypedField(15, 0);
598 		return retVal;
599     }
600     
601     /**
602      * Returns
603      * RXG-15: "Give Rate Amount" - creates it if necessary
604      */
605     public ST getRxg15_GiveRateAmount() { 
606 		ST retVal = this.getTypedField(15, 0);
607 		return retVal;
608     }
609 
610 
611 
612     /**
613      * Returns
614      * RXG-16: "Give Rate Units" - creates it if necessary
615      */
616     public CWE getGiveRateUnits() { 
617 		CWE retVal = this.getTypedField(16, 0);
618 		return retVal;
619     }
620     
621     /**
622      * Returns
623      * RXG-16: "Give Rate Units" - creates it if necessary
624      */
625     public CWE getRxg16_GiveRateUnits() { 
626 		CWE retVal = this.getTypedField(16, 0);
627 		return retVal;
628     }
629 
630 
631 
632     /**
633      * Returns
634      * RXG-17: "Give Strength" - creates it if necessary
635      */
636     public NM getGiveStrength() { 
637 		NM retVal = this.getTypedField(17, 0);
638 		return retVal;
639     }
640     
641     /**
642      * Returns
643      * RXG-17: "Give Strength" - creates it if necessary
644      */
645     public NM getRxg17_GiveStrength() { 
646 		NM retVal = this.getTypedField(17, 0);
647 		return retVal;
648     }
649 
650 
651 
652     /**
653      * Returns
654      * RXG-18: "Give Strength Units" - creates it if necessary
655      */
656     public CWE getGiveStrengthUnits() { 
657 		CWE retVal = this.getTypedField(18, 0);
658 		return retVal;
659     }
660     
661     /**
662      * Returns
663      * RXG-18: "Give Strength Units" - creates it if necessary
664      */
665     public CWE getRxg18_GiveStrengthUnits() { 
666 		CWE retVal = this.getTypedField(18, 0);
667 		return retVal;
668     }
669 
670 
671     /**
672      * Returns all repetitions of Substance Lot Number (RXG-19).
673      */
674     public ST[] getSubstanceLotNumber() {
675     	ST[] retVal = this.getTypedField(19, new ST[0]);
676     	return retVal;
677     }
678 
679 
680     /**
681      * Returns all repetitions of Substance Lot Number (RXG-19).
682      */
683     public ST[] getRxg19_SubstanceLotNumber() {
684     	ST[] retVal = this.getTypedField(19, new ST[0]);
685     	return retVal;
686     }
687 
688 
689     /**
690      * Returns a count of the current number of repetitions of Substance Lot Number (RXG-19).
691      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
692      * it will return zero.
693      */
694     public int getSubstanceLotNumberReps() {
695     	return this.getReps(19);
696     }
697 
698 
699     /**
700      * Returns a specific repetition of
701      * RXG-19: "Substance Lot Number" - creates it if necessary
702      *
703      * @param rep The repetition index (0-indexed)
704      */
705     public ST getSubstanceLotNumber(int rep) { 
706 		ST retVal = this.getTypedField(19, rep);
707 		return retVal;
708     }
709 
710     /**
711      * Returns a specific repetition of
712      * RXG-19: "Substance Lot Number" - creates it if necessary
713      *
714      * @param rep The repetition index (0-indexed)
715      */
716     public ST getRxg19_SubstanceLotNumber(int rep) { 
717 		ST retVal = this.getTypedField(19, rep);
718 		return retVal;
719     }
720 
721     /**
722      * Returns a count of the current number of repetitions of Substance Lot Number (RXG-19).
723      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
724      * it will return zero.
725      */
726     public int getRxg19_SubstanceLotNumberReps() {
727     	return this.getReps(19);
728     }
729 
730 
731     /**
732      * Inserts a repetition of
733      * RXG-19: "Substance Lot Number" at a specific index
734      *
735      * @param rep The repetition index (0-indexed)
736      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
737      */
738     public ST insertSubstanceLotNumber(int rep) throws HL7Exception { 
739         return (ST) super.insertRepetition(19, rep);
740     }
741 
742 
743     /**
744      * Inserts a repetition of
745      * RXG-19: "Substance Lot Number" at a specific index
746      *
747      * @param rep The repetition index (0-indexed)
748      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
749      */
750     public ST insertRxg19_SubstanceLotNumber(int rep) throws HL7Exception { 
751         return (ST) super.insertRepetition(19, rep);
752     }
753 
754 
755     /**
756      * Removes a repetition of
757      * RXG-19: "Substance Lot Number" at a specific index
758      *
759      * @param rep The repetition index (0-indexed)
760      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
761      */
762     public ST removeSubstanceLotNumber(int rep) throws HL7Exception { 
763         return (ST) super.removeRepetition(19, rep);
764     }
765 
766 
767     /**
768      * Removes a repetition of
769      * RXG-19: "Substance Lot Number" at a specific index
770      *
771      * @param rep The repetition index (0-indexed)
772      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
773      */
774     public ST removeRxg19_SubstanceLotNumber(int rep) throws HL7Exception { 
775         return (ST) super.removeRepetition(19, rep);
776     }
777 
778 
779 
780     /**
781      * Returns all repetitions of Substance Expiration Date (RXG-20).
782      */
783     public DTM[] getSubstanceExpirationDate() {
784     	DTM[] retVal = this.getTypedField(20, new DTM[0]);
785     	return retVal;
786     }
787 
788 
789     /**
790      * Returns all repetitions of Substance Expiration Date (RXG-20).
791      */
792     public DTM[] getRxg20_SubstanceExpirationDate() {
793     	DTM[] retVal = this.getTypedField(20, new DTM[0]);
794     	return retVal;
795     }
796 
797 
798     /**
799      * Returns a count of the current number of repetitions of Substance Expiration Date (RXG-20).
800      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
801      * it will return zero.
802      */
803     public int getSubstanceExpirationDateReps() {
804     	return this.getReps(20);
805     }
806 
807 
808     /**
809      * Returns a specific repetition of
810      * RXG-20: "Substance Expiration Date" - creates it if necessary
811      *
812      * @param rep The repetition index (0-indexed)
813      */
814     public DTM getSubstanceExpirationDate(int rep) { 
815 		DTM retVal = this.getTypedField(20, rep);
816 		return retVal;
817     }
818 
819     /**
820      * Returns a specific repetition of
821      * RXG-20: "Substance Expiration Date" - creates it if necessary
822      *
823      * @param rep The repetition index (0-indexed)
824      */
825     public DTM getRxg20_SubstanceExpirationDate(int rep) { 
826 		DTM retVal = this.getTypedField(20, rep);
827 		return retVal;
828     }
829 
830     /**
831      * Returns a count of the current number of repetitions of Substance Expiration Date (RXG-20).
832      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
833      * it will return zero.
834      */
835     public int getRxg20_SubstanceExpirationDateReps() {
836     	return this.getReps(20);
837     }
838 
839 
840     /**
841      * Inserts a repetition of
842      * RXG-20: "Substance Expiration Date" at a specific index
843      *
844      * @param rep The repetition index (0-indexed)
845      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
846      */
847     public DTM insertSubstanceExpirationDate(int rep) throws HL7Exception { 
848         return (DTM) super.insertRepetition(20, rep);
849     }
850 
851 
852     /**
853      * Inserts a repetition of
854      * RXG-20: "Substance Expiration Date" at a specific index
855      *
856      * @param rep The repetition index (0-indexed)
857      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
858      */
859     public DTM insertRxg20_SubstanceExpirationDate(int rep) throws HL7Exception { 
860         return (DTM) super.insertRepetition(20, rep);
861     }
862 
863 
864     /**
865      * Removes a repetition of
866      * RXG-20: "Substance Expiration Date" at a specific index
867      *
868      * @param rep The repetition index (0-indexed)
869      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
870      */
871     public DTM removeSubstanceExpirationDate(int rep) throws HL7Exception { 
872         return (DTM) super.removeRepetition(20, rep);
873     }
874 
875 
876     /**
877      * Removes a repetition of
878      * RXG-20: "Substance Expiration Date" at a specific index
879      *
880      * @param rep The repetition index (0-indexed)
881      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
882      */
883     public DTM removeRxg20_SubstanceExpirationDate(int rep) throws HL7Exception { 
884         return (DTM) super.removeRepetition(20, rep);
885     }
886 
887 
888 
889     /**
890      * Returns all repetitions of Substance Manufacturer Name (RXG-21).
891      */
892     public CWE[] getSubstanceManufacturerName() {
893     	CWE[] retVal = this.getTypedField(21, new CWE[0]);
894     	return retVal;
895     }
896 
897 
898     /**
899      * Returns all repetitions of Substance Manufacturer Name (RXG-21).
900      */
901     public CWE[] getRxg21_SubstanceManufacturerName() {
902     	CWE[] retVal = this.getTypedField(21, new CWE[0]);
903     	return retVal;
904     }
905 
906 
907     /**
908      * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXG-21).
909      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
910      * it will return zero.
911      */
912     public int getSubstanceManufacturerNameReps() {
913     	return this.getReps(21);
914     }
915 
916 
917     /**
918      * Returns a specific repetition of
919      * RXG-21: "Substance Manufacturer Name" - creates it if necessary
920      *
921      * @param rep The repetition index (0-indexed)
922      */
923     public CWE getSubstanceManufacturerName(int rep) { 
924 		CWE retVal = this.getTypedField(21, rep);
925 		return retVal;
926     }
927 
928     /**
929      * Returns a specific repetition of
930      * RXG-21: "Substance Manufacturer Name" - creates it if necessary
931      *
932      * @param rep The repetition index (0-indexed)
933      */
934     public CWE getRxg21_SubstanceManufacturerName(int rep) { 
935 		CWE retVal = this.getTypedField(21, rep);
936 		return retVal;
937     }
938 
939     /**
940      * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXG-21).
941      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
942      * it will return zero.
943      */
944     public int getRxg21_SubstanceManufacturerNameReps() {
945     	return this.getReps(21);
946     }
947 
948 
949     /**
950      * Inserts a repetition of
951      * RXG-21: "Substance Manufacturer Name" at a specific index
952      *
953      * @param rep The repetition index (0-indexed)
954      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
955      */
956     public CWE insertSubstanceManufacturerName(int rep) throws HL7Exception { 
957         return (CWE) super.insertRepetition(21, rep);
958     }
959 
960 
961     /**
962      * Inserts a repetition of
963      * RXG-21: "Substance Manufacturer Name" at a specific index
964      *
965      * @param rep The repetition index (0-indexed)
966      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
967      */
968     public CWE insertRxg21_SubstanceManufacturerName(int rep) throws HL7Exception { 
969         return (CWE) super.insertRepetition(21, rep);
970     }
971 
972 
973     /**
974      * Removes a repetition of
975      * RXG-21: "Substance Manufacturer Name" at a specific index
976      *
977      * @param rep The repetition index (0-indexed)
978      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
979      */
980     public CWE removeSubstanceManufacturerName(int rep) throws HL7Exception { 
981         return (CWE) super.removeRepetition(21, rep);
982     }
983 
984 
985     /**
986      * Removes a repetition of
987      * RXG-21: "Substance Manufacturer Name" at a specific index
988      *
989      * @param rep The repetition index (0-indexed)
990      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
991      */
992     public CWE removeRxg21_SubstanceManufacturerName(int rep) throws HL7Exception { 
993         return (CWE) super.removeRepetition(21, rep);
994     }
995 
996 
997 
998     /**
999      * Returns all repetitions of Indication (RXG-22).
1000      */
1001     public CWE[] getIndication() {
1002     	CWE[] retVal = this.getTypedField(22, new CWE[0]);
1003     	return retVal;
1004     }
1005 
1006 
1007     /**
1008      * Returns all repetitions of Indication (RXG-22).
1009      */
1010     public CWE[] getRxg22_Indication() {
1011     	CWE[] retVal = this.getTypedField(22, new CWE[0]);
1012     	return retVal;
1013     }
1014 
1015 
1016     /**
1017      * Returns a count of the current number of repetitions of Indication (RXG-22).
1018      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1019      * it will return zero.
1020      */
1021     public int getIndicationReps() {
1022     	return this.getReps(22);
1023     }
1024 
1025 
1026     /**
1027      * Returns a specific repetition of
1028      * RXG-22: "Indication" - creates it if necessary
1029      *
1030      * @param rep The repetition index (0-indexed)
1031      */
1032     public CWE getIndication(int rep) { 
1033 		CWE retVal = this.getTypedField(22, rep);
1034 		return retVal;
1035     }
1036 
1037     /**
1038      * Returns a specific repetition of
1039      * RXG-22: "Indication" - creates it if necessary
1040      *
1041      * @param rep The repetition index (0-indexed)
1042      */
1043     public CWE getRxg22_Indication(int rep) { 
1044 		CWE retVal = this.getTypedField(22, rep);
1045 		return retVal;
1046     }
1047 
1048     /**
1049      * Returns a count of the current number of repetitions of Indication (RXG-22).
1050      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1051      * it will return zero.
1052      */
1053     public int getRxg22_IndicationReps() {
1054     	return this.getReps(22);
1055     }
1056 
1057 
1058     /**
1059      * Inserts a repetition of
1060      * RXG-22: "Indication" at a specific index
1061      *
1062      * @param rep The repetition index (0-indexed)
1063      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1064      */
1065     public CWE insertIndication(int rep) throws HL7Exception { 
1066         return (CWE) super.insertRepetition(22, rep);
1067     }
1068 
1069 
1070     /**
1071      * Inserts a repetition of
1072      * RXG-22: "Indication" at a specific index
1073      *
1074      * @param rep The repetition index (0-indexed)
1075      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1076      */
1077     public CWE insertRxg22_Indication(int rep) throws HL7Exception { 
1078         return (CWE) super.insertRepetition(22, rep);
1079     }
1080 
1081 
1082     /**
1083      * Removes a repetition of
1084      * RXG-22: "Indication" at a specific index
1085      *
1086      * @param rep The repetition index (0-indexed)
1087      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1088      */
1089     public CWE removeIndication(int rep) throws HL7Exception { 
1090         return (CWE) super.removeRepetition(22, rep);
1091     }
1092 
1093 
1094     /**
1095      * Removes a repetition of
1096      * RXG-22: "Indication" at a specific index
1097      *
1098      * @param rep The repetition index (0-indexed)
1099      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1100      */
1101     public CWE removeRxg22_Indication(int rep) throws HL7Exception { 
1102         return (CWE) super.removeRepetition(22, rep);
1103     }
1104 
1105 
1106 
1107 
1108     /**
1109      * Returns
1110      * RXG-23: "Give Drug Strength Volume" - creates it if necessary
1111      */
1112     public NM getGiveDrugStrengthVolume() { 
1113 		NM retVal = this.getTypedField(23, 0);
1114 		return retVal;
1115     }
1116     
1117     /**
1118      * Returns
1119      * RXG-23: "Give Drug Strength Volume" - creates it if necessary
1120      */
1121     public NM getRxg23_GiveDrugStrengthVolume() { 
1122 		NM retVal = this.getTypedField(23, 0);
1123 		return retVal;
1124     }
1125 
1126 
1127 
1128     /**
1129      * Returns
1130      * RXG-24: "Give Drug Strength Volume Units" - creates it if necessary
1131      */
1132     public CWE getGiveDrugStrengthVolumeUnits() { 
1133 		CWE retVal = this.getTypedField(24, 0);
1134 		return retVal;
1135     }
1136     
1137     /**
1138      * Returns
1139      * RXG-24: "Give Drug Strength Volume Units" - creates it if necessary
1140      */
1141     public CWE getRxg24_GiveDrugStrengthVolumeUnits() { 
1142 		CWE retVal = this.getTypedField(24, 0);
1143 		return retVal;
1144     }
1145 
1146 
1147 
1148     /**
1149      * Returns
1150      * RXG-25: "Give Barcode Identifier" - creates it if necessary
1151      */
1152     public CWE getGiveBarcodeIdentifier() { 
1153 		CWE retVal = this.getTypedField(25, 0);
1154 		return retVal;
1155     }
1156     
1157     /**
1158      * Returns
1159      * RXG-25: "Give Barcode Identifier" - creates it if necessary
1160      */
1161     public CWE getRxg25_GiveBarcodeIdentifier() { 
1162 		CWE retVal = this.getTypedField(25, 0);
1163 		return retVal;
1164     }
1165 
1166 
1167 
1168     /**
1169      * Returns
1170      * RXG-26: "Pharmacy Order Type" - creates it if necessary
1171      */
1172     public ID getPharmacyOrderType() { 
1173 		ID retVal = this.getTypedField(26, 0);
1174 		return retVal;
1175     }
1176     
1177     /**
1178      * Returns
1179      * RXG-26: "Pharmacy Order Type" - creates it if necessary
1180      */
1181     public ID getRxg26_PharmacyOrderType() { 
1182 		ID retVal = this.getTypedField(26, 0);
1183 		return retVal;
1184     }
1185 
1186 
1187 
1188     /**
1189      * Returns
1190      * RXG-27: "Dispense to Pharmacy" - creates it if necessary
1191      */
1192     public CWE getDispenseToPharmacy() { 
1193 		CWE retVal = this.getTypedField(27, 0);
1194 		return retVal;
1195     }
1196     
1197     /**
1198      * Returns
1199      * RXG-27: "Dispense to Pharmacy" - creates it if necessary
1200      */
1201     public CWE getRxg27_DispenseToPharmacy() { 
1202 		CWE retVal = this.getTypedField(27, 0);
1203 		return retVal;
1204     }
1205 
1206 
1207 
1208     /**
1209      * Returns
1210      * RXG-28: "Dispense to Pharmacy Address" - creates it if necessary
1211      */
1212     public XAD getDispenseToPharmacyAddress() { 
1213 		XAD retVal = this.getTypedField(28, 0);
1214 		return retVal;
1215     }
1216     
1217     /**
1218      * Returns
1219      * RXG-28: "Dispense to Pharmacy Address" - creates it if necessary
1220      */
1221     public XAD getRxg28_DispenseToPharmacyAddress() { 
1222 		XAD retVal = this.getTypedField(28, 0);
1223 		return retVal;
1224     }
1225 
1226 
1227 
1228     /**
1229      * Returns
1230      * RXG-29: "Deliver-to Patient Location" - creates it if necessary
1231      */
1232     public PL getDeliverToPatientLocation() { 
1233 		PL retVal = this.getTypedField(29, 0);
1234 		return retVal;
1235     }
1236     
1237     /**
1238      * Returns
1239      * RXG-29: "Deliver-to Patient Location" - creates it if necessary
1240      */
1241     public PL getRxg29_DeliverToPatientLocation() { 
1242 		PL retVal = this.getTypedField(29, 0);
1243 		return retVal;
1244     }
1245 
1246 
1247 
1248     /**
1249      * Returns
1250      * RXG-30: "Deliver-to Address" - creates it if necessary
1251      */
1252     public XAD getDeliverToAddress() { 
1253 		XAD retVal = this.getTypedField(30, 0);
1254 		return retVal;
1255     }
1256     
1257     /**
1258      * Returns
1259      * RXG-30: "Deliver-to Address" - creates it if necessary
1260      */
1261     public XAD getRxg30_DeliverToAddress() { 
1262 		XAD retVal = this.getTypedField(30, 0);
1263 		return retVal;
1264     }
1265 
1266 
1267 
1268 
1269 
1270     /** {@inheritDoc} */   
1271     protected Type createNewTypeWithoutReflection(int field) {
1272        switch (field) {
1273           case 0: return new NM(getMessage());
1274           case 1: return new NM(getMessage());
1275           case 2: return new NULLDT(getMessage());
1276           case 3: return new CWE(getMessage());
1277           case 4: return new NM(getMessage());
1278           case 5: return new NM(getMessage());
1279           case 6: return new CWE(getMessage());
1280           case 7: return new CWE(getMessage());
1281           case 8: return new CWE(getMessage());
1282           case 9: return new ID(getMessage(), new Integer( 167 ));
1283           case 10: return new LA2(getMessage());
1284           case 11: return new ID(getMessage(), new Integer( 136 ));
1285           case 12: return new CWE(getMessage());
1286           case 13: return new ST(getMessage());
1287           case 14: return new ST(getMessage());
1288           case 15: return new CWE(getMessage());
1289           case 16: return new NM(getMessage());
1290           case 17: return new CWE(getMessage());
1291           case 18: return new ST(getMessage());
1292           case 19: return new DTM(getMessage());
1293           case 20: return new CWE(getMessage());
1294           case 21: return new CWE(getMessage());
1295           case 22: return new NM(getMessage());
1296           case 23: return new CWE(getMessage());
1297           case 24: return new CWE(getMessage());
1298           case 25: return new ID(getMessage(), new Integer( 480 ));
1299           case 26: return new CWE(getMessage());
1300           case 27: return new XAD(getMessage());
1301           case 28: return new PL(getMessage());
1302           case 29: return new XAD(getMessage());
1303           default: return null;
1304        }
1305    }
1306 
1307 
1308 }
1309