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 RXA message segment (Pharmacy/Treatment Administration). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>RXA-1: Give Sub-ID Counter (NM) <b> </b>
53       * <li>RXA-2: Administration Sub-ID Counter (NM) <b> </b>
54       * <li>RXA-3: Date/Time Start of Administration (DTM) <b> </b>
55       * <li>RXA-4: Date/Time End of Administration (DTM) <b> </b>
56       * <li>RXA-5: Administered Code (CWE) <b> </b>
57       * <li>RXA-6: Administered Amount (NM) <b> </b>
58       * <li>RXA-7: Administered Units (CWE) <b>optional </b>
59       * <li>RXA-8: Administered Dosage Form (CWE) <b>optional </b>
60       * <li>RXA-9: Administration Notes (CWE) <b>optional repeating</b>
61       * <li>RXA-10: Administering Provider (XCN) <b>optional repeating</b>
62       * <li>RXA-11: Administered-at Location (LA2) <b>optional </b>
63       * <li>RXA-12: Administered Per (Time Unit) (ST) <b>optional </b>
64       * <li>RXA-13: Administered Strength (NM) <b>optional </b>
65       * <li>RXA-14: Administered Strength Units (CWE) <b>optional </b>
66       * <li>RXA-15: Substance Lot Number (ST) <b>optional repeating</b>
67       * <li>RXA-16: Substance Expiration Date (DTM) <b>optional repeating</b>
68       * <li>RXA-17: Substance Manufacturer Name (CWE) <b>optional repeating</b>
69       * <li>RXA-18: Substance/Treatment Refusal Reason (CWE) <b>optional repeating</b>
70       * <li>RXA-19: Indication (CWE) <b>optional repeating</b>
71       * <li>RXA-20: Completion Status (ID) <b>optional </b>
72       * <li>RXA-21: Action Code - RXA (ID) <b>optional </b>
73       * <li>RXA-22: System Entry Date/Time (DTM) <b>optional </b>
74       * <li>RXA-23: Administered Drug Strength Volume (NM) <b>optional </b>
75       * <li>RXA-24: Administered Drug Strength Volume Units (CWE) <b>optional </b>
76       * <li>RXA-25: Administered Barcode Identifier (CWE) <b>optional </b>
77       * <li>RXA-26: Pharmacy Order Type (ID) <b>optional </b>
78       * <li>RXA-27: Administer-at (PL) <b>optional </b>
79       * <li>RXA-28: Administered-at Address (XAD) <b>optional </b>
80   * </ul>
81   */
82  @SuppressWarnings("unused")
83  public class RXA extends AbstractSegment {
84  
85      /** 
86       * Creates a new RXA segment
87       */
88      public RXA(Group parent, ModelClassFactory factory) {
89         super(parent, factory);
90         init(factory);
91      }
92  
93      private void init(ModelClassFactory factory) {
94         try {
95                                    this.add(NM.class, true, 1, 0, new Object[]{ getMessage() }, "Give Sub-ID Counter");
96                                    this.add(NM.class, true, 1, 0, new Object[]{ getMessage() }, "Administration Sub-ID Counter");
97                                    this.add(DTM.class, true, 1, 0, new Object[]{ getMessage() }, "Date/Time Start of Administration");
98                                    this.add(DTM.class, true, 1, 0, new Object[]{ getMessage() }, "Date/Time End of Administration");
99                                    this.add(CWE.class, true, 1, 0, new Object[]{ getMessage() }, "Administered Code");
100                                   this.add(NM.class, true, 1, 0, new Object[]{ getMessage() }, "Administered Amount");
101                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Administered Units");
102                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Administered Dosage Form");
103                                   this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Administration Notes");
104                                   this.add(XCN.class, false, 0, 0, new Object[]{ getMessage() }, "Administering Provider");
105                                   this.add(LA2.class, false, 1, 0, new Object[]{ getMessage() }, "Administered-at Location");
106                                   this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Administered Per (Time Unit)");
107                                   this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Administered Strength");
108                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Administered Strength Units");
109                                   this.add(ST.class, false, 0, 0, new Object[]{ getMessage() }, "Substance Lot Number");
110                                   this.add(DTM.class, false, 0, 0, new Object[]{ getMessage() }, "Substance Expiration Date");
111                                   this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Substance Manufacturer Name");
112                                   this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Substance/Treatment Refusal Reason");
113                                   this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Indication");
114                                               this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(322) }, "Completion Status");
115                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(206) }, "Action Code - RXA");
116                                   this.add(DTM.class, false, 1, 0, new Object[]{ getMessage() }, "System Entry Date/Time");
117                                   this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Administered Drug Strength Volume");
118                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Administered Drug Strength Volume Units");
119                                   this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Administered Barcode Identifier");
120                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(480) }, "Pharmacy Order Type");
121                                   this.add(PL.class, false, 1, 0, new Object[]{ getMessage() }, "Administer-at");
122                                   this.add(XAD.class, false, 1, 0, new Object[]{ getMessage() }, "Administered-at Address");
123        } catch(HL7Exception e) {
124           log.error("Unexpected error creating RXA - this is probably a bug in the source code generator.", e);
125        }
126     }
127 
128 
129 
130     /**
131      * Returns
132      * RXA-1: "Give Sub-ID Counter" - creates it if necessary
133      */
134     public NM getGiveSubIDCounter() { 
135 		NM retVal = this.getTypedField(1, 0);
136 		return retVal;
137     }
138     
139     /**
140      * Returns
141      * RXA-1: "Give Sub-ID Counter" - creates it if necessary
142      */
143     public NM getRxa1_GiveSubIDCounter() { 
144 		NM retVal = this.getTypedField(1, 0);
145 		return retVal;
146     }
147 
148 
149 
150     /**
151      * Returns
152      * RXA-2: "Administration Sub-ID Counter" - creates it if necessary
153      */
154     public NM getAdministrationSubIDCounter() { 
155 		NM retVal = this.getTypedField(2, 0);
156 		return retVal;
157     }
158     
159     /**
160      * Returns
161      * RXA-2: "Administration Sub-ID Counter" - creates it if necessary
162      */
163     public NM getRxa2_AdministrationSubIDCounter() { 
164 		NM retVal = this.getTypedField(2, 0);
165 		return retVal;
166     }
167 
168 
169 
170     /**
171      * Returns
172      * RXA-3: "Date/Time Start of Administration" - creates it if necessary
173      */
174     public DTM getDateTimeStartOfAdministration() { 
175 		DTM retVal = this.getTypedField(3, 0);
176 		return retVal;
177     }
178     
179     /**
180      * Returns
181      * RXA-3: "Date/Time Start of Administration" - creates it if necessary
182      */
183     public DTM getRxa3_DateTimeStartOfAdministration() { 
184 		DTM retVal = this.getTypedField(3, 0);
185 		return retVal;
186     }
187 
188 
189 
190     /**
191      * Returns
192      * RXA-4: "Date/Time End of Administration" - creates it if necessary
193      */
194     public DTM getDateTimeEndOfAdministration() { 
195 		DTM retVal = this.getTypedField(4, 0);
196 		return retVal;
197     }
198     
199     /**
200      * Returns
201      * RXA-4: "Date/Time End of Administration" - creates it if necessary
202      */
203     public DTM getRxa4_DateTimeEndOfAdministration() { 
204 		DTM retVal = this.getTypedField(4, 0);
205 		return retVal;
206     }
207 
208 
209 
210     /**
211      * Returns
212      * RXA-5: "Administered Code" - creates it if necessary
213      */
214     public CWE getAdministeredCode() { 
215 		CWE retVal = this.getTypedField(5, 0);
216 		return retVal;
217     }
218     
219     /**
220      * Returns
221      * RXA-5: "Administered Code" - creates it if necessary
222      */
223     public CWE getRxa5_AdministeredCode() { 
224 		CWE retVal = this.getTypedField(5, 0);
225 		return retVal;
226     }
227 
228 
229 
230     /**
231      * Returns
232      * RXA-6: "Administered Amount" - creates it if necessary
233      */
234     public NM getAdministeredAmount() { 
235 		NM retVal = this.getTypedField(6, 0);
236 		return retVal;
237     }
238     
239     /**
240      * Returns
241      * RXA-6: "Administered Amount" - creates it if necessary
242      */
243     public NM getRxa6_AdministeredAmount() { 
244 		NM retVal = this.getTypedField(6, 0);
245 		return retVal;
246     }
247 
248 
249 
250     /**
251      * Returns
252      * RXA-7: "Administered Units" - creates it if necessary
253      */
254     public CWE getAdministeredUnits() { 
255 		CWE retVal = this.getTypedField(7, 0);
256 		return retVal;
257     }
258     
259     /**
260      * Returns
261      * RXA-7: "Administered Units" - creates it if necessary
262      */
263     public CWE getRxa7_AdministeredUnits() { 
264 		CWE retVal = this.getTypedField(7, 0);
265 		return retVal;
266     }
267 
268 
269 
270     /**
271      * Returns
272      * RXA-8: "Administered Dosage Form" - creates it if necessary
273      */
274     public CWE getAdministeredDosageForm() { 
275 		CWE retVal = this.getTypedField(8, 0);
276 		return retVal;
277     }
278     
279     /**
280      * Returns
281      * RXA-8: "Administered Dosage Form" - creates it if necessary
282      */
283     public CWE getRxa8_AdministeredDosageForm() { 
284 		CWE retVal = this.getTypedField(8, 0);
285 		return retVal;
286     }
287 
288 
289     /**
290      * Returns all repetitions of Administration Notes (RXA-9).
291      */
292     public CWE[] getAdministrationNotes() {
293     	CWE[] retVal = this.getTypedField(9, new CWE[0]);
294     	return retVal;
295     }
296 
297 
298     /**
299      * Returns all repetitions of Administration Notes (RXA-9).
300      */
301     public CWE[] getRxa9_AdministrationNotes() {
302     	CWE[] retVal = this.getTypedField(9, new CWE[0]);
303     	return retVal;
304     }
305 
306 
307     /**
308      * Returns a count of the current number of repetitions of Administration Notes (RXA-9).
309      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
310      * it will return zero.
311      */
312     public int getAdministrationNotesReps() {
313     	return this.getReps(9);
314     }
315 
316 
317     /**
318      * Returns a specific repetition of
319      * RXA-9: "Administration Notes" - creates it if necessary
320      *
321      * @param rep The repetition index (0-indexed)
322      */
323     public CWE getAdministrationNotes(int rep) { 
324 		CWE retVal = this.getTypedField(9, rep);
325 		return retVal;
326     }
327 
328     /**
329      * Returns a specific repetition of
330      * RXA-9: "Administration Notes" - creates it if necessary
331      *
332      * @param rep The repetition index (0-indexed)
333      */
334     public CWE getRxa9_AdministrationNotes(int rep) { 
335 		CWE retVal = this.getTypedField(9, rep);
336 		return retVal;
337     }
338 
339     /**
340      * Returns a count of the current number of repetitions of Administration Notes (RXA-9).
341      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
342      * it will return zero.
343      */
344     public int getRxa9_AdministrationNotesReps() {
345     	return this.getReps(9);
346     }
347 
348 
349     /**
350      * Inserts a repetition of
351      * RXA-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 CWE insertAdministrationNotes(int rep) throws HL7Exception { 
357         return (CWE) super.insertRepetition(9, rep);
358     }
359 
360 
361     /**
362      * Inserts a repetition of
363      * RXA-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 CWE insertRxa9_AdministrationNotes(int rep) throws HL7Exception { 
369         return (CWE) super.insertRepetition(9, rep);
370     }
371 
372 
373     /**
374      * Removes a repetition of
375      * RXA-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 CWE removeAdministrationNotes(int rep) throws HL7Exception { 
381         return (CWE) super.removeRepetition(9, rep);
382     }
383 
384 
385     /**
386      * Removes a repetition of
387      * RXA-9: "Administration Notes" at a specific index
388      *
389      * @param rep The repetition index (0-indexed)
390      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
391      */
392     public CWE removeRxa9_AdministrationNotes(int rep) throws HL7Exception { 
393         return (CWE) super.removeRepetition(9, rep);
394     }
395 
396 
397 
398     /**
399      * Returns all repetitions of Administering Provider (RXA-10).
400      */
401     public XCN[] getAdministeringProvider() {
402     	XCN[] retVal = this.getTypedField(10, new XCN[0]);
403     	return retVal;
404     }
405 
406 
407     /**
408      * Returns all repetitions of Administering Provider (RXA-10).
409      */
410     public XCN[] getRxa10_AdministeringProvider() {
411     	XCN[] retVal = this.getTypedField(10, new XCN[0]);
412     	return retVal;
413     }
414 
415 
416     /**
417      * Returns a count of the current number of repetitions of Administering Provider (RXA-10).
418      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
419      * it will return zero.
420      */
421     public int getAdministeringProviderReps() {
422     	return this.getReps(10);
423     }
424 
425 
426     /**
427      * Returns a specific repetition of
428      * RXA-10: "Administering Provider" - creates it if necessary
429      *
430      * @param rep The repetition index (0-indexed)
431      */
432     public XCN getAdministeringProvider(int rep) { 
433 		XCN retVal = this.getTypedField(10, rep);
434 		return retVal;
435     }
436 
437     /**
438      * Returns a specific repetition of
439      * RXA-10: "Administering Provider" - creates it if necessary
440      *
441      * @param rep The repetition index (0-indexed)
442      */
443     public XCN getRxa10_AdministeringProvider(int rep) { 
444 		XCN retVal = this.getTypedField(10, rep);
445 		return retVal;
446     }
447 
448     /**
449      * Returns a count of the current number of repetitions of Administering Provider (RXA-10).
450      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
451      * it will return zero.
452      */
453     public int getRxa10_AdministeringProviderReps() {
454     	return this.getReps(10);
455     }
456 
457 
458     /**
459      * Inserts a repetition of
460      * RXA-10: "Administering Provider" at a specific index
461      *
462      * @param rep The repetition index (0-indexed)
463      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
464      */
465     public XCN insertAdministeringProvider(int rep) throws HL7Exception { 
466         return (XCN) super.insertRepetition(10, rep);
467     }
468 
469 
470     /**
471      * Inserts a repetition of
472      * RXA-10: "Administering Provider" at a specific index
473      *
474      * @param rep The repetition index (0-indexed)
475      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
476      */
477     public XCN insertRxa10_AdministeringProvider(int rep) throws HL7Exception { 
478         return (XCN) super.insertRepetition(10, rep);
479     }
480 
481 
482     /**
483      * Removes a repetition of
484      * RXA-10: "Administering Provider" at a specific index
485      *
486      * @param rep The repetition index (0-indexed)
487      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
488      */
489     public XCN removeAdministeringProvider(int rep) throws HL7Exception { 
490         return (XCN) super.removeRepetition(10, rep);
491     }
492 
493 
494     /**
495      * Removes a repetition of
496      * RXA-10: "Administering Provider" at a specific index
497      *
498      * @param rep The repetition index (0-indexed)
499      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
500      */
501     public XCN removeRxa10_AdministeringProvider(int rep) throws HL7Exception { 
502         return (XCN) super.removeRepetition(10, rep);
503     }
504 
505 
506 
507 
508     /**
509      * Returns
510      * RXA-11: "Administered-at Location" - creates it if necessary
511      */
512     public LA2 getAdministeredAtLocation() { 
513 		LA2 retVal = this.getTypedField(11, 0);
514 		return retVal;
515     }
516     
517     /**
518      * Returns
519      * RXA-11: "Administered-at Location" - creates it if necessary
520      */
521     public LA2 getRxa11_AdministeredAtLocation() { 
522 		LA2 retVal = this.getTypedField(11, 0);
523 		return retVal;
524     }
525 
526 
527 
528     /**
529      * Returns
530      * RXA-12: "Administered Per (Time Unit)" - creates it if necessary
531      */
532     public ST getAdministeredPerTimeUnit() { 
533 		ST retVal = this.getTypedField(12, 0);
534 		return retVal;
535     }
536     
537     /**
538      * Returns
539      * RXA-12: "Administered Per (Time Unit)" - creates it if necessary
540      */
541     public ST getRxa12_AdministeredPerTimeUnit() { 
542 		ST retVal = this.getTypedField(12, 0);
543 		return retVal;
544     }
545 
546 
547 
548     /**
549      * Returns
550      * RXA-13: "Administered Strength" - creates it if necessary
551      */
552     public NM getAdministeredStrength() { 
553 		NM retVal = this.getTypedField(13, 0);
554 		return retVal;
555     }
556     
557     /**
558      * Returns
559      * RXA-13: "Administered Strength" - creates it if necessary
560      */
561     public NM getRxa13_AdministeredStrength() { 
562 		NM retVal = this.getTypedField(13, 0);
563 		return retVal;
564     }
565 
566 
567 
568     /**
569      * Returns
570      * RXA-14: "Administered Strength Units" - creates it if necessary
571      */
572     public CWE getAdministeredStrengthUnits() { 
573 		CWE retVal = this.getTypedField(14, 0);
574 		return retVal;
575     }
576     
577     /**
578      * Returns
579      * RXA-14: "Administered Strength Units" - creates it if necessary
580      */
581     public CWE getRxa14_AdministeredStrengthUnits() { 
582 		CWE retVal = this.getTypedField(14, 0);
583 		return retVal;
584     }
585 
586 
587     /**
588      * Returns all repetitions of Substance Lot Number (RXA-15).
589      */
590     public ST[] getSubstanceLotNumber() {
591     	ST[] retVal = this.getTypedField(15, new ST[0]);
592     	return retVal;
593     }
594 
595 
596     /**
597      * Returns all repetitions of Substance Lot Number (RXA-15).
598      */
599     public ST[] getRxa15_SubstanceLotNumber() {
600     	ST[] retVal = this.getTypedField(15, new ST[0]);
601     	return retVal;
602     }
603 
604 
605     /**
606      * Returns a count of the current number of repetitions of Substance Lot Number (RXA-15).
607      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
608      * it will return zero.
609      */
610     public int getSubstanceLotNumberReps() {
611     	return this.getReps(15);
612     }
613 
614 
615     /**
616      * Returns a specific repetition of
617      * RXA-15: "Substance Lot Number" - creates it if necessary
618      *
619      * @param rep The repetition index (0-indexed)
620      */
621     public ST getSubstanceLotNumber(int rep) { 
622 		ST retVal = this.getTypedField(15, rep);
623 		return retVal;
624     }
625 
626     /**
627      * Returns a specific repetition of
628      * RXA-15: "Substance Lot Number" - creates it if necessary
629      *
630      * @param rep The repetition index (0-indexed)
631      */
632     public ST getRxa15_SubstanceLotNumber(int rep) { 
633 		ST retVal = this.getTypedField(15, rep);
634 		return retVal;
635     }
636 
637     /**
638      * Returns a count of the current number of repetitions of Substance Lot Number (RXA-15).
639      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
640      * it will return zero.
641      */
642     public int getRxa15_SubstanceLotNumberReps() {
643     	return this.getReps(15);
644     }
645 
646 
647     /**
648      * Inserts a repetition of
649      * RXA-15: "Substance Lot Number" at a specific index
650      *
651      * @param rep The repetition index (0-indexed)
652      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
653      */
654     public ST insertSubstanceLotNumber(int rep) throws HL7Exception { 
655         return (ST) super.insertRepetition(15, rep);
656     }
657 
658 
659     /**
660      * Inserts a repetition of
661      * RXA-15: "Substance Lot Number" at a specific index
662      *
663      * @param rep The repetition index (0-indexed)
664      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
665      */
666     public ST insertRxa15_SubstanceLotNumber(int rep) throws HL7Exception { 
667         return (ST) super.insertRepetition(15, rep);
668     }
669 
670 
671     /**
672      * Removes a repetition of
673      * RXA-15: "Substance Lot Number" at a specific index
674      *
675      * @param rep The repetition index (0-indexed)
676      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
677      */
678     public ST removeSubstanceLotNumber(int rep) throws HL7Exception { 
679         return (ST) super.removeRepetition(15, rep);
680     }
681 
682 
683     /**
684      * Removes a repetition of
685      * RXA-15: "Substance Lot Number" at a specific index
686      *
687      * @param rep The repetition index (0-indexed)
688      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
689      */
690     public ST removeRxa15_SubstanceLotNumber(int rep) throws HL7Exception { 
691         return (ST) super.removeRepetition(15, rep);
692     }
693 
694 
695 
696     /**
697      * Returns all repetitions of Substance Expiration Date (RXA-16).
698      */
699     public DTM[] getSubstanceExpirationDate() {
700     	DTM[] retVal = this.getTypedField(16, new DTM[0]);
701     	return retVal;
702     }
703 
704 
705     /**
706      * Returns all repetitions of Substance Expiration Date (RXA-16).
707      */
708     public DTM[] getRxa16_SubstanceExpirationDate() {
709     	DTM[] retVal = this.getTypedField(16, new DTM[0]);
710     	return retVal;
711     }
712 
713 
714     /**
715      * Returns a count of the current number of repetitions of Substance Expiration Date (RXA-16).
716      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
717      * it will return zero.
718      */
719     public int getSubstanceExpirationDateReps() {
720     	return this.getReps(16);
721     }
722 
723 
724     /**
725      * Returns a specific repetition of
726      * RXA-16: "Substance Expiration Date" - creates it if necessary
727      *
728      * @param rep The repetition index (0-indexed)
729      */
730     public DTM getSubstanceExpirationDate(int rep) { 
731 		DTM retVal = this.getTypedField(16, rep);
732 		return retVal;
733     }
734 
735     /**
736      * Returns a specific repetition of
737      * RXA-16: "Substance Expiration Date" - creates it if necessary
738      *
739      * @param rep The repetition index (0-indexed)
740      */
741     public DTM getRxa16_SubstanceExpirationDate(int rep) { 
742 		DTM retVal = this.getTypedField(16, rep);
743 		return retVal;
744     }
745 
746     /**
747      * Returns a count of the current number of repetitions of Substance Expiration Date (RXA-16).
748      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
749      * it will return zero.
750      */
751     public int getRxa16_SubstanceExpirationDateReps() {
752     	return this.getReps(16);
753     }
754 
755 
756     /**
757      * Inserts a repetition of
758      * RXA-16: "Substance Expiration Date" at a specific index
759      *
760      * @param rep The repetition index (0-indexed)
761      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
762      */
763     public DTM insertSubstanceExpirationDate(int rep) throws HL7Exception { 
764         return (DTM) super.insertRepetition(16, rep);
765     }
766 
767 
768     /**
769      * Inserts a repetition of
770      * RXA-16: "Substance Expiration Date" at a specific index
771      *
772      * @param rep The repetition index (0-indexed)
773      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
774      */
775     public DTM insertRxa16_SubstanceExpirationDate(int rep) throws HL7Exception { 
776         return (DTM) super.insertRepetition(16, rep);
777     }
778 
779 
780     /**
781      * Removes a repetition of
782      * RXA-16: "Substance Expiration Date" at a specific index
783      *
784      * @param rep The repetition index (0-indexed)
785      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
786      */
787     public DTM removeSubstanceExpirationDate(int rep) throws HL7Exception { 
788         return (DTM) super.removeRepetition(16, rep);
789     }
790 
791 
792     /**
793      * Removes a repetition of
794      * RXA-16: "Substance Expiration Date" at a specific index
795      *
796      * @param rep The repetition index (0-indexed)
797      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
798      */
799     public DTM removeRxa16_SubstanceExpirationDate(int rep) throws HL7Exception { 
800         return (DTM) super.removeRepetition(16, rep);
801     }
802 
803 
804 
805     /**
806      * Returns all repetitions of Substance Manufacturer Name (RXA-17).
807      */
808     public CWE[] getSubstanceManufacturerName() {
809     	CWE[] retVal = this.getTypedField(17, new CWE[0]);
810     	return retVal;
811     }
812 
813 
814     /**
815      * Returns all repetitions of Substance Manufacturer Name (RXA-17).
816      */
817     public CWE[] getRxa17_SubstanceManufacturerName() {
818     	CWE[] retVal = this.getTypedField(17, new CWE[0]);
819     	return retVal;
820     }
821 
822 
823     /**
824      * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXA-17).
825      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
826      * it will return zero.
827      */
828     public int getSubstanceManufacturerNameReps() {
829     	return this.getReps(17);
830     }
831 
832 
833     /**
834      * Returns a specific repetition of
835      * RXA-17: "Substance Manufacturer Name" - creates it if necessary
836      *
837      * @param rep The repetition index (0-indexed)
838      */
839     public CWE getSubstanceManufacturerName(int rep) { 
840 		CWE retVal = this.getTypedField(17, rep);
841 		return retVal;
842     }
843 
844     /**
845      * Returns a specific repetition of
846      * RXA-17: "Substance Manufacturer Name" - creates it if necessary
847      *
848      * @param rep The repetition index (0-indexed)
849      */
850     public CWE getRxa17_SubstanceManufacturerName(int rep) { 
851 		CWE retVal = this.getTypedField(17, rep);
852 		return retVal;
853     }
854 
855     /**
856      * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXA-17).
857      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
858      * it will return zero.
859      */
860     public int getRxa17_SubstanceManufacturerNameReps() {
861     	return this.getReps(17);
862     }
863 
864 
865     /**
866      * Inserts a repetition of
867      * RXA-17: "Substance Manufacturer Name" at a specific index
868      *
869      * @param rep The repetition index (0-indexed)
870      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
871      */
872     public CWE insertSubstanceManufacturerName(int rep) throws HL7Exception { 
873         return (CWE) super.insertRepetition(17, rep);
874     }
875 
876 
877     /**
878      * Inserts a repetition of
879      * RXA-17: "Substance Manufacturer Name" at a specific index
880      *
881      * @param rep The repetition index (0-indexed)
882      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
883      */
884     public CWE insertRxa17_SubstanceManufacturerName(int rep) throws HL7Exception { 
885         return (CWE) super.insertRepetition(17, rep);
886     }
887 
888 
889     /**
890      * Removes a repetition of
891      * RXA-17: "Substance Manufacturer Name" at a specific index
892      *
893      * @param rep The repetition index (0-indexed)
894      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
895      */
896     public CWE removeSubstanceManufacturerName(int rep) throws HL7Exception { 
897         return (CWE) super.removeRepetition(17, rep);
898     }
899 
900 
901     /**
902      * Removes a repetition of
903      * RXA-17: "Substance Manufacturer Name" at a specific index
904      *
905      * @param rep The repetition index (0-indexed)
906      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
907      */
908     public CWE removeRxa17_SubstanceManufacturerName(int rep) throws HL7Exception { 
909         return (CWE) super.removeRepetition(17, rep);
910     }
911 
912 
913 
914     /**
915      * Returns all repetitions of Substance/Treatment Refusal Reason (RXA-18).
916      */
917     public CWE[] getSubstanceTreatmentRefusalReason() {
918     	CWE[] retVal = this.getTypedField(18, new CWE[0]);
919     	return retVal;
920     }
921 
922 
923     /**
924      * Returns all repetitions of Substance/Treatment Refusal Reason (RXA-18).
925      */
926     public CWE[] getRxa18_SubstanceTreatmentRefusalReason() {
927     	CWE[] retVal = this.getTypedField(18, new CWE[0]);
928     	return retVal;
929     }
930 
931 
932     /**
933      * Returns a count of the current number of repetitions of Substance/Treatment Refusal Reason (RXA-18).
934      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
935      * it will return zero.
936      */
937     public int getSubstanceTreatmentRefusalReasonReps() {
938     	return this.getReps(18);
939     }
940 
941 
942     /**
943      * Returns a specific repetition of
944      * RXA-18: "Substance/Treatment Refusal Reason" - creates it if necessary
945      *
946      * @param rep The repetition index (0-indexed)
947      */
948     public CWE getSubstanceTreatmentRefusalReason(int rep) { 
949 		CWE retVal = this.getTypedField(18, rep);
950 		return retVal;
951     }
952 
953     /**
954      * Returns a specific repetition of
955      * RXA-18: "Substance/Treatment Refusal Reason" - creates it if necessary
956      *
957      * @param rep The repetition index (0-indexed)
958      */
959     public CWE getRxa18_SubstanceTreatmentRefusalReason(int rep) { 
960 		CWE retVal = this.getTypedField(18, rep);
961 		return retVal;
962     }
963 
964     /**
965      * Returns a count of the current number of repetitions of Substance/Treatment Refusal Reason (RXA-18).
966      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
967      * it will return zero.
968      */
969     public int getRxa18_SubstanceTreatmentRefusalReasonReps() {
970     	return this.getReps(18);
971     }
972 
973 
974     /**
975      * Inserts a repetition of
976      * RXA-18: "Substance/Treatment Refusal Reason" at a specific index
977      *
978      * @param rep The repetition index (0-indexed)
979      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
980      */
981     public CWE insertSubstanceTreatmentRefusalReason(int rep) throws HL7Exception { 
982         return (CWE) super.insertRepetition(18, rep);
983     }
984 
985 
986     /**
987      * Inserts a repetition of
988      * RXA-18: "Substance/Treatment Refusal Reason" at a specific index
989      *
990      * @param rep The repetition index (0-indexed)
991      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
992      */
993     public CWE insertRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception { 
994         return (CWE) super.insertRepetition(18, rep);
995     }
996 
997 
998     /**
999      * Removes a repetition of
1000      * RXA-18: "Substance/Treatment Refusal Reason" at a specific index
1001      *
1002      * @param rep The repetition index (0-indexed)
1003      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1004      */
1005     public CWE removeSubstanceTreatmentRefusalReason(int rep) throws HL7Exception { 
1006         return (CWE) super.removeRepetition(18, rep);
1007     }
1008 
1009 
1010     /**
1011      * Removes a repetition of
1012      * RXA-18: "Substance/Treatment Refusal Reason" at a specific index
1013      *
1014      * @param rep The repetition index (0-indexed)
1015      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1016      */
1017     public CWE removeRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception { 
1018         return (CWE) super.removeRepetition(18, rep);
1019     }
1020 
1021 
1022 
1023     /**
1024      * Returns all repetitions of Indication (RXA-19).
1025      */
1026     public CWE[] getIndication() {
1027     	CWE[] retVal = this.getTypedField(19, new CWE[0]);
1028     	return retVal;
1029     }
1030 
1031 
1032     /**
1033      * Returns all repetitions of Indication (RXA-19).
1034      */
1035     public CWE[] getRxa19_Indication() {
1036     	CWE[] retVal = this.getTypedField(19, new CWE[0]);
1037     	return retVal;
1038     }
1039 
1040 
1041     /**
1042      * Returns a count of the current number of repetitions of Indication (RXA-19).
1043      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1044      * it will return zero.
1045      */
1046     public int getIndicationReps() {
1047     	return this.getReps(19);
1048     }
1049 
1050 
1051     /**
1052      * Returns a specific repetition of
1053      * RXA-19: "Indication" - creates it if necessary
1054      *
1055      * @param rep The repetition index (0-indexed)
1056      */
1057     public CWE getIndication(int rep) { 
1058 		CWE retVal = this.getTypedField(19, rep);
1059 		return retVal;
1060     }
1061 
1062     /**
1063      * Returns a specific repetition of
1064      * RXA-19: "Indication" - creates it if necessary
1065      *
1066      * @param rep The repetition index (0-indexed)
1067      */
1068     public CWE getRxa19_Indication(int rep) { 
1069 		CWE retVal = this.getTypedField(19, rep);
1070 		return retVal;
1071     }
1072 
1073     /**
1074      * Returns a count of the current number of repetitions of Indication (RXA-19).
1075      * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1076      * it will return zero.
1077      */
1078     public int getRxa19_IndicationReps() {
1079     	return this.getReps(19);
1080     }
1081 
1082 
1083     /**
1084      * Inserts a repetition of
1085      * RXA-19: "Indication" at a specific index
1086      *
1087      * @param rep The repetition index (0-indexed)
1088      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1089      */
1090     public CWE insertIndication(int rep) throws HL7Exception { 
1091         return (CWE) super.insertRepetition(19, rep);
1092     }
1093 
1094 
1095     /**
1096      * Inserts a repetition of
1097      * RXA-19: "Indication" at a specific index
1098      *
1099      * @param rep The repetition index (0-indexed)
1100      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1101      */
1102     public CWE insertRxa19_Indication(int rep) throws HL7Exception { 
1103         return (CWE) super.insertRepetition(19, rep);
1104     }
1105 
1106 
1107     /**
1108      * Removes a repetition of
1109      * RXA-19: "Indication" at a specific index
1110      *
1111      * @param rep The repetition index (0-indexed)
1112      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1113      */
1114     public CWE removeIndication(int rep) throws HL7Exception { 
1115         return (CWE) super.removeRepetition(19, rep);
1116     }
1117 
1118 
1119     /**
1120      * Removes a repetition of
1121      * RXA-19: "Indication" at a specific index
1122      *
1123      * @param rep The repetition index (0-indexed)
1124      * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1125      */
1126     public CWE removeRxa19_Indication(int rep) throws HL7Exception { 
1127         return (CWE) super.removeRepetition(19, rep);
1128     }
1129 
1130 
1131 
1132 
1133     /**
1134      * Returns
1135      * RXA-20: "Completion Status" - creates it if necessary
1136      */
1137     public ID getCompletionStatus() { 
1138 		ID retVal = this.getTypedField(20, 0);
1139 		return retVal;
1140     }
1141     
1142     /**
1143      * Returns
1144      * RXA-20: "Completion Status" - creates it if necessary
1145      */
1146     public ID getRxa20_CompletionStatus() { 
1147 		ID retVal = this.getTypedField(20, 0);
1148 		return retVal;
1149     }
1150 
1151 
1152 
1153     /**
1154      * Returns
1155      * RXA-21: "Action Code - RXA" - creates it if necessary
1156      */
1157     public ID getActionCodeRXA() { 
1158 		ID retVal = this.getTypedField(21, 0);
1159 		return retVal;
1160     }
1161     
1162     /**
1163      * Returns
1164      * RXA-21: "Action Code - RXA" - creates it if necessary
1165      */
1166     public ID getRxa21_ActionCodeRXA() { 
1167 		ID retVal = this.getTypedField(21, 0);
1168 		return retVal;
1169     }
1170 
1171 
1172 
1173     /**
1174      * Returns
1175      * RXA-22: "System Entry Date/Time" - creates it if necessary
1176      */
1177     public DTM getSystemEntryDateTime() { 
1178 		DTM retVal = this.getTypedField(22, 0);
1179 		return retVal;
1180     }
1181     
1182     /**
1183      * Returns
1184      * RXA-22: "System Entry Date/Time" - creates it if necessary
1185      */
1186     public DTM getRxa22_SystemEntryDateTime() { 
1187 		DTM retVal = this.getTypedField(22, 0);
1188 		return retVal;
1189     }
1190 
1191 
1192 
1193     /**
1194      * Returns
1195      * RXA-23: "Administered Drug Strength Volume" - creates it if necessary
1196      */
1197     public NM getAdministeredDrugStrengthVolume() { 
1198 		NM retVal = this.getTypedField(23, 0);
1199 		return retVal;
1200     }
1201     
1202     /**
1203      * Returns
1204      * RXA-23: "Administered Drug Strength Volume" - creates it if necessary
1205      */
1206     public NM getRxa23_AdministeredDrugStrengthVolume() { 
1207 		NM retVal = this.getTypedField(23, 0);
1208 		return retVal;
1209     }
1210 
1211 
1212 
1213     /**
1214      * Returns
1215      * RXA-24: "Administered Drug Strength Volume Units" - creates it if necessary
1216      */
1217     public CWE getAdministeredDrugStrengthVolumeUnits() { 
1218 		CWE retVal = this.getTypedField(24, 0);
1219 		return retVal;
1220     }
1221     
1222     /**
1223      * Returns
1224      * RXA-24: "Administered Drug Strength Volume Units" - creates it if necessary
1225      */
1226     public CWE getRxa24_AdministeredDrugStrengthVolumeUnits() { 
1227 		CWE retVal = this.getTypedField(24, 0);
1228 		return retVal;
1229     }
1230 
1231 
1232 
1233     /**
1234      * Returns
1235      * RXA-25: "Administered Barcode Identifier" - creates it if necessary
1236      */
1237     public CWE getAdministeredBarcodeIdentifier() { 
1238 		CWE retVal = this.getTypedField(25, 0);
1239 		return retVal;
1240     }
1241     
1242     /**
1243      * Returns
1244      * RXA-25: "Administered Barcode Identifier" - creates it if necessary
1245      */
1246     public CWE getRxa25_AdministeredBarcodeIdentifier() { 
1247 		CWE retVal = this.getTypedField(25, 0);
1248 		return retVal;
1249     }
1250 
1251 
1252 
1253     /**
1254      * Returns
1255      * RXA-26: "Pharmacy Order Type" - creates it if necessary
1256      */
1257     public ID getPharmacyOrderType() { 
1258 		ID retVal = this.getTypedField(26, 0);
1259 		return retVal;
1260     }
1261     
1262     /**
1263      * Returns
1264      * RXA-26: "Pharmacy Order Type" - creates it if necessary
1265      */
1266     public ID getRxa26_PharmacyOrderType() { 
1267 		ID retVal = this.getTypedField(26, 0);
1268 		return retVal;
1269     }
1270 
1271 
1272 
1273     /**
1274      * Returns
1275      * RXA-27: "Administer-at" - creates it if necessary
1276      */
1277     public PL getAdministerAt() { 
1278 		PL retVal = this.getTypedField(27, 0);
1279 		return retVal;
1280     }
1281     
1282     /**
1283      * Returns
1284      * RXA-27: "Administer-at" - creates it if necessary
1285      */
1286     public PL getRxa27_AdministerAt() { 
1287 		PL retVal = this.getTypedField(27, 0);
1288 		return retVal;
1289     }
1290 
1291 
1292 
1293     /**
1294      * Returns
1295      * RXA-28: "Administered-at Address" - creates it if necessary
1296      */
1297     public XAD getAdministeredAtAddress() { 
1298 		XAD retVal = this.getTypedField(28, 0);
1299 		return retVal;
1300     }
1301     
1302     /**
1303      * Returns
1304      * RXA-28: "Administered-at Address" - creates it if necessary
1305      */
1306     public XAD getRxa28_AdministeredAtAddress() { 
1307 		XAD retVal = this.getTypedField(28, 0);
1308 		return retVal;
1309     }
1310 
1311 
1312 
1313 
1314 
1315     /** {@inheritDoc} */   
1316     protected Type createNewTypeWithoutReflection(int field) {
1317        switch (field) {
1318           case 0: return new NM(getMessage());
1319           case 1: return new NM(getMessage());
1320           case 2: return new DTM(getMessage());
1321           case 3: return new DTM(getMessage());
1322           case 4: return new CWE(getMessage());
1323           case 5: return new NM(getMessage());
1324           case 6: return new CWE(getMessage());
1325           case 7: return new CWE(getMessage());
1326           case 8: return new CWE(getMessage());
1327           case 9: return new XCN(getMessage());
1328           case 10: return new LA2(getMessage());
1329           case 11: return new ST(getMessage());
1330           case 12: return new NM(getMessage());
1331           case 13: return new CWE(getMessage());
1332           case 14: return new ST(getMessage());
1333           case 15: return new DTM(getMessage());
1334           case 16: return new CWE(getMessage());
1335           case 17: return new CWE(getMessage());
1336           case 18: return new CWE(getMessage());
1337           case 19: return new ID(getMessage(), new Integer( 322 ));
1338           case 20: return new ID(getMessage(), new Integer( 206 ));
1339           case 21: return new DTM(getMessage());
1340           case 22: return new NM(getMessage());
1341           case 23: return new CWE(getMessage());
1342           case 24: return new CWE(getMessage());
1343           case 25: return new ID(getMessage(), new Integer( 480 ));
1344           case 26: return new PL(getMessage());
1345           case 27: return new XAD(getMessage());
1346           default: return null;
1347        }
1348    }
1349 
1350 
1351 }
1352