001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v25.segment;
035
036// import ca.uhn.hl7v2.model.v25.group.*;
037import ca.uhn.hl7v2.model.v25.datatype.*;
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
041import ca.uhn.hl7v2.model.AbstractMessage;
042import ca.uhn.hl7v2.model.Group;
043import ca.uhn.hl7v2.model.Type;
044import ca.uhn.hl7v2.model.AbstractSegment;
045import ca.uhn.hl7v2.model.Varies;
046
047/**
048 *<p>Represents an HL7 RXA message segment (Pharmacy/Treatment Administration). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>RXA-1: Give Sub-ID Counter (NM) <b> </b>
052     * <li>RXA-2: Administration Sub-ID Counter (NM) <b> </b>
053     * <li>RXA-3: Date/Time Start of Administration (TS) <b> </b>
054     * <li>RXA-4: Date/Time End of Administration (TS) <b> </b>
055     * <li>RXA-5: Administered Code (CE) <b> </b>
056     * <li>RXA-6: Administered Amount (NM) <b> </b>
057     * <li>RXA-7: Administered Units (CE) <b>optional </b>
058     * <li>RXA-8: Administered Dosage Form (CE) <b>optional </b>
059     * <li>RXA-9: Administration Notes (CE) <b>optional repeating</b>
060     * <li>RXA-10: Administering Provider (XCN) <b>optional repeating</b>
061     * <li>RXA-11: Administered-at Location (LA2) <b>optional </b>
062     * <li>RXA-12: Administered Per (Time Unit) (ST) <b>optional </b>
063     * <li>RXA-13: Administered Strength (NM) <b>optional </b>
064     * <li>RXA-14: Administered Strength Units (CE) <b>optional </b>
065     * <li>RXA-15: Substance Lot Number (ST) <b>optional repeating</b>
066     * <li>RXA-16: Substance Expiration Date (TS) <b>optional repeating</b>
067     * <li>RXA-17: Substance Manufacturer Name (CE) <b>optional repeating</b>
068     * <li>RXA-18: Substance/Treatment Refusal Reason (CE) <b>optional repeating</b>
069     * <li>RXA-19: Indication (CE) <b>optional repeating</b>
070     * <li>RXA-20: Completion Status (ID) <b>optional </b>
071     * <li>RXA-21: Action Code - RXA (ID) <b>optional </b>
072     * <li>RXA-22: System Entry Date/Time (TS) <b>optional </b>
073     * <li>RXA-23: Administered Drug Strength Volume (NM) <b>optional </b>
074     * <li>RXA-24: Administered Drug Strength Volume Units (CWE) <b>optional </b>
075     * <li>RXA-25: Administered Barcode Identifier (CWE) <b>optional </b>
076     * <li>RXA-26: Pharmacy Order Type (ID) <b>optional </b>
077 * </ul>
078 */
079@SuppressWarnings("unused")
080public class RXA extends AbstractSegment {
081
082    /** 
083     * Creates a new RXA segment
084     */
085    public RXA(Group parent, ModelClassFactory factory) {
086       super(parent, factory);
087       init(factory);
088    }
089
090    private void init(ModelClassFactory factory) {
091       try {
092                                  this.add(NM.class, true, 1, 4, new Object[]{ getMessage() }, "Give Sub-ID Counter");
093                                  this.add(NM.class, true, 1, 4, new Object[]{ getMessage() }, "Administration Sub-ID Counter");
094                                  this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Date/Time Start of Administration");
095                                  this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Date/Time End of Administration");
096                                  this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Administered Code");
097                                  this.add(NM.class, true, 1, 20, new Object[]{ getMessage() }, "Administered Amount");
098                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Administered Units");
099                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Administered Dosage Form");
100                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Administration Notes");
101                                  this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Administering Provider");
102                                  this.add(LA2.class, false, 1, 200, new Object[]{ getMessage() }, "Administered-at Location");
103                                  this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Administered Per (Time Unit)");
104                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Administered Strength");
105                                  this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Administered Strength Units");
106                                  this.add(ST.class, false, 0, 20, new Object[]{ getMessage() }, "Substance Lot Number");
107                                  this.add(TS.class, false, 0, 26, new Object[]{ getMessage() }, "Substance Expiration Date");
108                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Substance Manufacturer Name");
109                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Substance/Treatment Refusal Reason");
110                                  this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Indication");
111                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(322) }, "Completion Status");
112                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(323) }, "Action Code - RXA");
113                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "System Entry Date/Time");
114                                  this.add(NM.class, false, 1, 5, new Object[]{ getMessage() }, "Administered Drug Strength Volume");
115                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Administered Drug Strength Volume Units");
116                                  this.add(CWE.class, false, 1, 60, new Object[]{ getMessage() }, "Administered Barcode Identifier");
117                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(480) }, "Pharmacy Order Type");
118       } catch(HL7Exception e) {
119          log.error("Unexpected error creating RXA - this is probably a bug in the source code generator.", e);
120       }
121    }
122
123
124
125    /**
126     * Returns
127     * RXA-1: "Give Sub-ID Counter" - creates it if necessary
128     */
129    public NM getGiveSubIDCounter() { 
130                NM retVal = this.getTypedField(1, 0);
131                return retVal;
132    }
133    
134    /**
135     * Returns
136     * RXA-1: "Give Sub-ID Counter" - creates it if necessary
137     */
138    public NM getRxa1_GiveSubIDCounter() { 
139                NM retVal = this.getTypedField(1, 0);
140                return retVal;
141    }
142
143
144
145    /**
146     * Returns
147     * RXA-2: "Administration Sub-ID Counter" - creates it if necessary
148     */
149    public NM getAdministrationSubIDCounter() { 
150                NM retVal = this.getTypedField(2, 0);
151                return retVal;
152    }
153    
154    /**
155     * Returns
156     * RXA-2: "Administration Sub-ID Counter" - creates it if necessary
157     */
158    public NM getRxa2_AdministrationSubIDCounter() { 
159                NM retVal = this.getTypedField(2, 0);
160                return retVal;
161    }
162
163
164
165    /**
166     * Returns
167     * RXA-3: "Date/Time Start of Administration" - creates it if necessary
168     */
169    public TS getDateTimeStartOfAdministration() { 
170                TS retVal = this.getTypedField(3, 0);
171                return retVal;
172    }
173    
174    /**
175     * Returns
176     * RXA-3: "Date/Time Start of Administration" - creates it if necessary
177     */
178    public TS getRxa3_DateTimeStartOfAdministration() { 
179                TS retVal = this.getTypedField(3, 0);
180                return retVal;
181    }
182
183
184
185    /**
186     * Returns
187     * RXA-4: "Date/Time End of Administration" - creates it if necessary
188     */
189    public TS getDateTimeEndOfAdministration() { 
190                TS retVal = this.getTypedField(4, 0);
191                return retVal;
192    }
193    
194    /**
195     * Returns
196     * RXA-4: "Date/Time End of Administration" - creates it if necessary
197     */
198    public TS getRxa4_DateTimeEndOfAdministration() { 
199                TS retVal = this.getTypedField(4, 0);
200                return retVal;
201    }
202
203
204
205    /**
206     * Returns
207     * RXA-5: "Administered Code" - creates it if necessary
208     */
209    public CE getAdministeredCode() { 
210                CE retVal = this.getTypedField(5, 0);
211                return retVal;
212    }
213    
214    /**
215     * Returns
216     * RXA-5: "Administered Code" - creates it if necessary
217     */
218    public CE getRxa5_AdministeredCode() { 
219                CE retVal = this.getTypedField(5, 0);
220                return retVal;
221    }
222
223
224
225    /**
226     * Returns
227     * RXA-6: "Administered Amount" - creates it if necessary
228     */
229    public NM getAdministeredAmount() { 
230                NM retVal = this.getTypedField(6, 0);
231                return retVal;
232    }
233    
234    /**
235     * Returns
236     * RXA-6: "Administered Amount" - creates it if necessary
237     */
238    public NM getRxa6_AdministeredAmount() { 
239                NM retVal = this.getTypedField(6, 0);
240                return retVal;
241    }
242
243
244
245    /**
246     * Returns
247     * RXA-7: "Administered Units" - creates it if necessary
248     */
249    public CE getAdministeredUnits() { 
250                CE retVal = this.getTypedField(7, 0);
251                return retVal;
252    }
253    
254    /**
255     * Returns
256     * RXA-7: "Administered Units" - creates it if necessary
257     */
258    public CE getRxa7_AdministeredUnits() { 
259                CE retVal = this.getTypedField(7, 0);
260                return retVal;
261    }
262
263
264
265    /**
266     * Returns
267     * RXA-8: "Administered Dosage Form" - creates it if necessary
268     */
269    public CE getAdministeredDosageForm() { 
270                CE retVal = this.getTypedField(8, 0);
271                return retVal;
272    }
273    
274    /**
275     * Returns
276     * RXA-8: "Administered Dosage Form" - creates it if necessary
277     */
278    public CE getRxa8_AdministeredDosageForm() { 
279                CE retVal = this.getTypedField(8, 0);
280                return retVal;
281    }
282
283
284    /**
285     * Returns all repetitions of Administration Notes (RXA-9).
286     */
287    public CE[] getAdministrationNotes() {
288        CE[] retVal = this.getTypedField(9, new CE[0]);
289        return retVal;
290    }
291
292
293    /**
294     * Returns all repetitions of Administration Notes (RXA-9).
295     */
296    public CE[] getRxa9_AdministrationNotes() {
297        CE[] retVal = this.getTypedField(9, new CE[0]);
298        return retVal;
299    }
300
301
302    /**
303     * Returns a count of the current number of repetitions of Administration Notes (RXA-9).
304     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
305     * it will return zero.
306     */
307    public int getAdministrationNotesReps() {
308        return this.getReps(9);
309    }
310
311
312    /**
313     * Returns a specific repetition of
314     * RXA-9: "Administration Notes" - creates it if necessary
315     *
316     * @param rep The repetition index (0-indexed)
317     */
318    public CE getAdministrationNotes(int rep) { 
319                CE retVal = this.getTypedField(9, rep);
320                return retVal;
321    }
322
323    /**
324     * Returns a specific repetition of
325     * RXA-9: "Administration Notes" - creates it if necessary
326     *
327     * @param rep The repetition index (0-indexed)
328     */
329    public CE getRxa9_AdministrationNotes(int rep) { 
330                CE retVal = this.getTypedField(9, rep);
331                return retVal;
332    }
333
334    /**
335     * Returns a count of the current number of repetitions of Administration Notes (RXA-9).
336     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
337     * it will return zero.
338     */
339    public int getRxa9_AdministrationNotesReps() {
340        return this.getReps(9);
341    }
342
343
344    /**
345     * Inserts a repetition of
346     * RXA-9: "Administration Notes" at a specific index
347     *
348     * @param rep The repetition index (0-indexed)
349     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
350     */
351    public CE insertAdministrationNotes(int rep) throws HL7Exception { 
352        return (CE) super.insertRepetition(9, rep);
353    }
354
355
356    /**
357     * Inserts a repetition of
358     * RXA-9: "Administration Notes" at a specific index
359     *
360     * @param rep The repetition index (0-indexed)
361     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
362     */
363    public CE insertRxa9_AdministrationNotes(int rep) throws HL7Exception { 
364        return (CE) super.insertRepetition(9, rep);
365    }
366
367
368    /**
369     * Removes a repetition of
370     * RXA-9: "Administration Notes" at a specific index
371     *
372     * @param rep The repetition index (0-indexed)
373     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
374     */
375    public CE removeAdministrationNotes(int rep) throws HL7Exception { 
376        return (CE) super.removeRepetition(9, rep);
377    }
378
379
380    /**
381     * Removes a repetition of
382     * RXA-9: "Administration Notes" at a specific index
383     *
384     * @param rep The repetition index (0-indexed)
385     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
386     */
387    public CE removeRxa9_AdministrationNotes(int rep) throws HL7Exception { 
388        return (CE) super.removeRepetition(9, rep);
389    }
390
391
392
393    /**
394     * Returns all repetitions of Administering Provider (RXA-10).
395     */
396    public XCN[] getAdministeringProvider() {
397        XCN[] retVal = this.getTypedField(10, new XCN[0]);
398        return retVal;
399    }
400
401
402    /**
403     * Returns all repetitions of Administering Provider (RXA-10).
404     */
405    public XCN[] getRxa10_AdministeringProvider() {
406        XCN[] retVal = this.getTypedField(10, new XCN[0]);
407        return retVal;
408    }
409
410
411    /**
412     * Returns a count of the current number of repetitions of Administering Provider (RXA-10).
413     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
414     * it will return zero.
415     */
416    public int getAdministeringProviderReps() {
417        return this.getReps(10);
418    }
419
420
421    /**
422     * Returns a specific repetition of
423     * RXA-10: "Administering Provider" - creates it if necessary
424     *
425     * @param rep The repetition index (0-indexed)
426     */
427    public XCN getAdministeringProvider(int rep) { 
428                XCN retVal = this.getTypedField(10, rep);
429                return retVal;
430    }
431
432    /**
433     * Returns a specific repetition of
434     * RXA-10: "Administering Provider" - creates it if necessary
435     *
436     * @param rep The repetition index (0-indexed)
437     */
438    public XCN getRxa10_AdministeringProvider(int rep) { 
439                XCN retVal = this.getTypedField(10, rep);
440                return retVal;
441    }
442
443    /**
444     * Returns a count of the current number of repetitions of Administering Provider (RXA-10).
445     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
446     * it will return zero.
447     */
448    public int getRxa10_AdministeringProviderReps() {
449        return this.getReps(10);
450    }
451
452
453    /**
454     * Inserts a repetition of
455     * RXA-10: "Administering Provider" at a specific index
456     *
457     * @param rep The repetition index (0-indexed)
458     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
459     */
460    public XCN insertAdministeringProvider(int rep) throws HL7Exception { 
461        return (XCN) super.insertRepetition(10, rep);
462    }
463
464
465    /**
466     * Inserts a repetition of
467     * RXA-10: "Administering Provider" at a specific index
468     *
469     * @param rep The repetition index (0-indexed)
470     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
471     */
472    public XCN insertRxa10_AdministeringProvider(int rep) throws HL7Exception { 
473        return (XCN) super.insertRepetition(10, rep);
474    }
475
476
477    /**
478     * Removes a repetition of
479     * RXA-10: "Administering Provider" at a specific index
480     *
481     * @param rep The repetition index (0-indexed)
482     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
483     */
484    public XCN removeAdministeringProvider(int rep) throws HL7Exception { 
485        return (XCN) super.removeRepetition(10, rep);
486    }
487
488
489    /**
490     * Removes a repetition of
491     * RXA-10: "Administering Provider" at a specific index
492     *
493     * @param rep The repetition index (0-indexed)
494     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
495     */
496    public XCN removeRxa10_AdministeringProvider(int rep) throws HL7Exception { 
497        return (XCN) super.removeRepetition(10, rep);
498    }
499
500
501
502
503    /**
504     * Returns
505     * RXA-11: "Administered-at Location" - creates it if necessary
506     */
507    public LA2 getAdministeredAtLocation() { 
508                LA2 retVal = this.getTypedField(11, 0);
509                return retVal;
510    }
511    
512    /**
513     * Returns
514     * RXA-11: "Administered-at Location" - creates it if necessary
515     */
516    public LA2 getRxa11_AdministeredAtLocation() { 
517                LA2 retVal = this.getTypedField(11, 0);
518                return retVal;
519    }
520
521
522
523    /**
524     * Returns
525     * RXA-12: "Administered Per (Time Unit)" - creates it if necessary
526     */
527    public ST getAdministeredPerTimeUnit() { 
528                ST retVal = this.getTypedField(12, 0);
529                return retVal;
530    }
531    
532    /**
533     * Returns
534     * RXA-12: "Administered Per (Time Unit)" - creates it if necessary
535     */
536    public ST getRxa12_AdministeredPerTimeUnit() { 
537                ST retVal = this.getTypedField(12, 0);
538                return retVal;
539    }
540
541
542
543    /**
544     * Returns
545     * RXA-13: "Administered Strength" - creates it if necessary
546     */
547    public NM getAdministeredStrength() { 
548                NM retVal = this.getTypedField(13, 0);
549                return retVal;
550    }
551    
552    /**
553     * Returns
554     * RXA-13: "Administered Strength" - creates it if necessary
555     */
556    public NM getRxa13_AdministeredStrength() { 
557                NM retVal = this.getTypedField(13, 0);
558                return retVal;
559    }
560
561
562
563    /**
564     * Returns
565     * RXA-14: "Administered Strength Units" - creates it if necessary
566     */
567    public CE getAdministeredStrengthUnits() { 
568                CE retVal = this.getTypedField(14, 0);
569                return retVal;
570    }
571    
572    /**
573     * Returns
574     * RXA-14: "Administered Strength Units" - creates it if necessary
575     */
576    public CE getRxa14_AdministeredStrengthUnits() { 
577                CE retVal = this.getTypedField(14, 0);
578                return retVal;
579    }
580
581
582    /**
583     * Returns all repetitions of Substance Lot Number (RXA-15).
584     */
585    public ST[] getSubstanceLotNumber() {
586        ST[] retVal = this.getTypedField(15, new ST[0]);
587        return retVal;
588    }
589
590
591    /**
592     * Returns all repetitions of Substance Lot Number (RXA-15).
593     */
594    public ST[] getRxa15_SubstanceLotNumber() {
595        ST[] retVal = this.getTypedField(15, new ST[0]);
596        return retVal;
597    }
598
599
600    /**
601     * Returns a count of the current number of repetitions of Substance Lot Number (RXA-15).
602     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
603     * it will return zero.
604     */
605    public int getSubstanceLotNumberReps() {
606        return this.getReps(15);
607    }
608
609
610    /**
611     * Returns a specific repetition of
612     * RXA-15: "Substance Lot Number" - creates it if necessary
613     *
614     * @param rep The repetition index (0-indexed)
615     */
616    public ST getSubstanceLotNumber(int rep) { 
617                ST retVal = this.getTypedField(15, rep);
618                return retVal;
619    }
620
621    /**
622     * Returns a specific repetition of
623     * RXA-15: "Substance Lot Number" - creates it if necessary
624     *
625     * @param rep The repetition index (0-indexed)
626     */
627    public ST getRxa15_SubstanceLotNumber(int rep) { 
628                ST retVal = this.getTypedField(15, rep);
629                return retVal;
630    }
631
632    /**
633     * Returns a count of the current number of repetitions of Substance Lot Number (RXA-15).
634     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
635     * it will return zero.
636     */
637    public int getRxa15_SubstanceLotNumberReps() {
638        return this.getReps(15);
639    }
640
641
642    /**
643     * Inserts a repetition of
644     * RXA-15: "Substance Lot Number" at a specific index
645     *
646     * @param rep The repetition index (0-indexed)
647     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
648     */
649    public ST insertSubstanceLotNumber(int rep) throws HL7Exception { 
650        return (ST) super.insertRepetition(15, rep);
651    }
652
653
654    /**
655     * Inserts a repetition of
656     * RXA-15: "Substance Lot Number" at a specific index
657     *
658     * @param rep The repetition index (0-indexed)
659     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
660     */
661    public ST insertRxa15_SubstanceLotNumber(int rep) throws HL7Exception { 
662        return (ST) super.insertRepetition(15, rep);
663    }
664
665
666    /**
667     * Removes a repetition of
668     * RXA-15: "Substance Lot Number" at a specific index
669     *
670     * @param rep The repetition index (0-indexed)
671     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
672     */
673    public ST removeSubstanceLotNumber(int rep) throws HL7Exception { 
674        return (ST) super.removeRepetition(15, rep);
675    }
676
677
678    /**
679     * Removes a repetition of
680     * RXA-15: "Substance Lot Number" at a specific index
681     *
682     * @param rep The repetition index (0-indexed)
683     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
684     */
685    public ST removeRxa15_SubstanceLotNumber(int rep) throws HL7Exception { 
686        return (ST) super.removeRepetition(15, rep);
687    }
688
689
690
691    /**
692     * Returns all repetitions of Substance Expiration Date (RXA-16).
693     */
694    public TS[] getSubstanceExpirationDate() {
695        TS[] retVal = this.getTypedField(16, new TS[0]);
696        return retVal;
697    }
698
699
700    /**
701     * Returns all repetitions of Substance Expiration Date (RXA-16).
702     */
703    public TS[] getRxa16_SubstanceExpirationDate() {
704        TS[] retVal = this.getTypedField(16, new TS[0]);
705        return retVal;
706    }
707
708
709    /**
710     * Returns a count of the current number of repetitions of Substance Expiration Date (RXA-16).
711     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
712     * it will return zero.
713     */
714    public int getSubstanceExpirationDateReps() {
715        return this.getReps(16);
716    }
717
718
719    /**
720     * Returns a specific repetition of
721     * RXA-16: "Substance Expiration Date" - creates it if necessary
722     *
723     * @param rep The repetition index (0-indexed)
724     */
725    public TS getSubstanceExpirationDate(int rep) { 
726                TS retVal = this.getTypedField(16, rep);
727                return retVal;
728    }
729
730    /**
731     * Returns a specific repetition of
732     * RXA-16: "Substance Expiration Date" - creates it if necessary
733     *
734     * @param rep The repetition index (0-indexed)
735     */
736    public TS getRxa16_SubstanceExpirationDate(int rep) { 
737                TS retVal = this.getTypedField(16, rep);
738                return retVal;
739    }
740
741    /**
742     * Returns a count of the current number of repetitions of Substance Expiration Date (RXA-16).
743     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
744     * it will return zero.
745     */
746    public int getRxa16_SubstanceExpirationDateReps() {
747        return this.getReps(16);
748    }
749
750
751    /**
752     * Inserts a repetition of
753     * RXA-16: "Substance Expiration Date" at a specific index
754     *
755     * @param rep The repetition index (0-indexed)
756     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
757     */
758    public TS insertSubstanceExpirationDate(int rep) throws HL7Exception { 
759        return (TS) super.insertRepetition(16, rep);
760    }
761
762
763    /**
764     * Inserts a repetition of
765     * RXA-16: "Substance Expiration Date" at a specific index
766     *
767     * @param rep The repetition index (0-indexed)
768     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
769     */
770    public TS insertRxa16_SubstanceExpirationDate(int rep) throws HL7Exception { 
771        return (TS) super.insertRepetition(16, rep);
772    }
773
774
775    /**
776     * Removes a repetition of
777     * RXA-16: "Substance Expiration Date" at a specific index
778     *
779     * @param rep The repetition index (0-indexed)
780     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
781     */
782    public TS removeSubstanceExpirationDate(int rep) throws HL7Exception { 
783        return (TS) super.removeRepetition(16, rep);
784    }
785
786
787    /**
788     * Removes a repetition of
789     * RXA-16: "Substance Expiration Date" at a specific index
790     *
791     * @param rep The repetition index (0-indexed)
792     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
793     */
794    public TS removeRxa16_SubstanceExpirationDate(int rep) throws HL7Exception { 
795        return (TS) super.removeRepetition(16, rep);
796    }
797
798
799
800    /**
801     * Returns all repetitions of Substance Manufacturer Name (RXA-17).
802     */
803    public CE[] getSubstanceManufacturerName() {
804        CE[] retVal = this.getTypedField(17, new CE[0]);
805        return retVal;
806    }
807
808
809    /**
810     * Returns all repetitions of Substance Manufacturer Name (RXA-17).
811     */
812    public CE[] getRxa17_SubstanceManufacturerName() {
813        CE[] retVal = this.getTypedField(17, new CE[0]);
814        return retVal;
815    }
816
817
818    /**
819     * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXA-17).
820     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
821     * it will return zero.
822     */
823    public int getSubstanceManufacturerNameReps() {
824        return this.getReps(17);
825    }
826
827
828    /**
829     * Returns a specific repetition of
830     * RXA-17: "Substance Manufacturer Name" - creates it if necessary
831     *
832     * @param rep The repetition index (0-indexed)
833     */
834    public CE getSubstanceManufacturerName(int rep) { 
835                CE retVal = this.getTypedField(17, rep);
836                return retVal;
837    }
838
839    /**
840     * Returns a specific repetition of
841     * RXA-17: "Substance Manufacturer Name" - creates it if necessary
842     *
843     * @param rep The repetition index (0-indexed)
844     */
845    public CE getRxa17_SubstanceManufacturerName(int rep) { 
846                CE retVal = this.getTypedField(17, rep);
847                return retVal;
848    }
849
850    /**
851     * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXA-17).
852     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
853     * it will return zero.
854     */
855    public int getRxa17_SubstanceManufacturerNameReps() {
856        return this.getReps(17);
857    }
858
859
860    /**
861     * Inserts a repetition of
862     * RXA-17: "Substance Manufacturer Name" at a specific index
863     *
864     * @param rep The repetition index (0-indexed)
865     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
866     */
867    public CE insertSubstanceManufacturerName(int rep) throws HL7Exception { 
868        return (CE) super.insertRepetition(17, rep);
869    }
870
871
872    /**
873     * Inserts a repetition of
874     * RXA-17: "Substance Manufacturer Name" at a specific index
875     *
876     * @param rep The repetition index (0-indexed)
877     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
878     */
879    public CE insertRxa17_SubstanceManufacturerName(int rep) throws HL7Exception { 
880        return (CE) super.insertRepetition(17, rep);
881    }
882
883
884    /**
885     * Removes a repetition of
886     * RXA-17: "Substance Manufacturer Name" at a specific index
887     *
888     * @param rep The repetition index (0-indexed)
889     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
890     */
891    public CE removeSubstanceManufacturerName(int rep) throws HL7Exception { 
892        return (CE) super.removeRepetition(17, rep);
893    }
894
895
896    /**
897     * Removes a repetition of
898     * RXA-17: "Substance Manufacturer Name" at a specific index
899     *
900     * @param rep The repetition index (0-indexed)
901     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
902     */
903    public CE removeRxa17_SubstanceManufacturerName(int rep) throws HL7Exception { 
904        return (CE) super.removeRepetition(17, rep);
905    }
906
907
908
909    /**
910     * Returns all repetitions of Substance/Treatment Refusal Reason (RXA-18).
911     */
912    public CE[] getSubstanceTreatmentRefusalReason() {
913        CE[] retVal = this.getTypedField(18, new CE[0]);
914        return retVal;
915    }
916
917
918    /**
919     * Returns all repetitions of Substance/Treatment Refusal Reason (RXA-18).
920     */
921    public CE[] getRxa18_SubstanceTreatmentRefusalReason() {
922        CE[] retVal = this.getTypedField(18, new CE[0]);
923        return retVal;
924    }
925
926
927    /**
928     * Returns a count of the current number of repetitions of Substance/Treatment Refusal Reason (RXA-18).
929     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
930     * it will return zero.
931     */
932    public int getSubstanceTreatmentRefusalReasonReps() {
933        return this.getReps(18);
934    }
935
936
937    /**
938     * Returns a specific repetition of
939     * RXA-18: "Substance/Treatment Refusal Reason" - creates it if necessary
940     *
941     * @param rep The repetition index (0-indexed)
942     */
943    public CE getSubstanceTreatmentRefusalReason(int rep) { 
944                CE retVal = this.getTypedField(18, rep);
945                return retVal;
946    }
947
948    /**
949     * Returns a specific repetition of
950     * RXA-18: "Substance/Treatment Refusal Reason" - creates it if necessary
951     *
952     * @param rep The repetition index (0-indexed)
953     */
954    public CE getRxa18_SubstanceTreatmentRefusalReason(int rep) { 
955                CE retVal = this.getTypedField(18, rep);
956                return retVal;
957    }
958
959    /**
960     * Returns a count of the current number of repetitions of Substance/Treatment Refusal Reason (RXA-18).
961     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
962     * it will return zero.
963     */
964    public int getRxa18_SubstanceTreatmentRefusalReasonReps() {
965        return this.getReps(18);
966    }
967
968
969    /**
970     * Inserts a repetition of
971     * RXA-18: "Substance/Treatment Refusal Reason" at a specific index
972     *
973     * @param rep The repetition index (0-indexed)
974     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
975     */
976    public CE insertSubstanceTreatmentRefusalReason(int rep) throws HL7Exception { 
977        return (CE) super.insertRepetition(18, rep);
978    }
979
980
981    /**
982     * Inserts a repetition of
983     * RXA-18: "Substance/Treatment Refusal Reason" at a specific index
984     *
985     * @param rep The repetition index (0-indexed)
986     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
987     */
988    public CE insertRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception { 
989        return (CE) super.insertRepetition(18, rep);
990    }
991
992
993    /**
994     * Removes a repetition of
995     * RXA-18: "Substance/Treatment Refusal Reason" at a specific index
996     *
997     * @param rep The repetition index (0-indexed)
998     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
999     */
1000    public CE removeSubstanceTreatmentRefusalReason(int rep) throws HL7Exception { 
1001        return (CE) super.removeRepetition(18, rep);
1002    }
1003
1004
1005    /**
1006     * Removes a repetition of
1007     * RXA-18: "Substance/Treatment Refusal Reason" at a specific index
1008     *
1009     * @param rep The repetition index (0-indexed)
1010     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1011     */
1012    public CE removeRxa18_SubstanceTreatmentRefusalReason(int rep) throws HL7Exception { 
1013        return (CE) super.removeRepetition(18, rep);
1014    }
1015
1016
1017
1018    /**
1019     * Returns all repetitions of Indication (RXA-19).
1020     */
1021    public CE[] getIndication() {
1022        CE[] retVal = this.getTypedField(19, new CE[0]);
1023        return retVal;
1024    }
1025
1026
1027    /**
1028     * Returns all repetitions of Indication (RXA-19).
1029     */
1030    public CE[] getRxa19_Indication() {
1031        CE[] retVal = this.getTypedField(19, new CE[0]);
1032        return retVal;
1033    }
1034
1035
1036    /**
1037     * Returns a count of the current number of repetitions of Indication (RXA-19).
1038     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1039     * it will return zero.
1040     */
1041    public int getIndicationReps() {
1042        return this.getReps(19);
1043    }
1044
1045
1046    /**
1047     * Returns a specific repetition of
1048     * RXA-19: "Indication" - creates it if necessary
1049     *
1050     * @param rep The repetition index (0-indexed)
1051     */
1052    public CE getIndication(int rep) { 
1053                CE retVal = this.getTypedField(19, rep);
1054                return retVal;
1055    }
1056
1057    /**
1058     * Returns a specific repetition of
1059     * RXA-19: "Indication" - creates it if necessary
1060     *
1061     * @param rep The repetition index (0-indexed)
1062     */
1063    public CE getRxa19_Indication(int rep) { 
1064                CE retVal = this.getTypedField(19, rep);
1065                return retVal;
1066    }
1067
1068    /**
1069     * Returns a count of the current number of repetitions of Indication (RXA-19).
1070     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1071     * it will return zero.
1072     */
1073    public int getRxa19_IndicationReps() {
1074        return this.getReps(19);
1075    }
1076
1077
1078    /**
1079     * Inserts a repetition of
1080     * RXA-19: "Indication" at a specific index
1081     *
1082     * @param rep The repetition index (0-indexed)
1083     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1084     */
1085    public CE insertIndication(int rep) throws HL7Exception { 
1086        return (CE) super.insertRepetition(19, rep);
1087    }
1088
1089
1090    /**
1091     * Inserts a repetition of
1092     * RXA-19: "Indication" at a specific index
1093     *
1094     * @param rep The repetition index (0-indexed)
1095     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1096     */
1097    public CE insertRxa19_Indication(int rep) throws HL7Exception { 
1098        return (CE) super.insertRepetition(19, rep);
1099    }
1100
1101
1102    /**
1103     * Removes a repetition of
1104     * RXA-19: "Indication" at a specific index
1105     *
1106     * @param rep The repetition index (0-indexed)
1107     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1108     */
1109    public CE removeIndication(int rep) throws HL7Exception { 
1110        return (CE) super.removeRepetition(19, rep);
1111    }
1112
1113
1114    /**
1115     * Removes a repetition of
1116     * RXA-19: "Indication" at a specific index
1117     *
1118     * @param rep The repetition index (0-indexed)
1119     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1120     */
1121    public CE removeRxa19_Indication(int rep) throws HL7Exception { 
1122        return (CE) super.removeRepetition(19, rep);
1123    }
1124
1125
1126
1127
1128    /**
1129     * Returns
1130     * RXA-20: "Completion Status" - creates it if necessary
1131     */
1132    public ID getCompletionStatus() { 
1133                ID retVal = this.getTypedField(20, 0);
1134                return retVal;
1135    }
1136    
1137    /**
1138     * Returns
1139     * RXA-20: "Completion Status" - creates it if necessary
1140     */
1141    public ID getRxa20_CompletionStatus() { 
1142                ID retVal = this.getTypedField(20, 0);
1143                return retVal;
1144    }
1145
1146
1147
1148    /**
1149     * Returns
1150     * RXA-21: "Action Code - RXA" - creates it if necessary
1151     */
1152    public ID getActionCodeRXA() { 
1153                ID retVal = this.getTypedField(21, 0);
1154                return retVal;
1155    }
1156    
1157    /**
1158     * Returns
1159     * RXA-21: "Action Code - RXA" - creates it if necessary
1160     */
1161    public ID getRxa21_ActionCodeRXA() { 
1162                ID retVal = this.getTypedField(21, 0);
1163                return retVal;
1164    }
1165
1166
1167
1168    /**
1169     * Returns
1170     * RXA-22: "System Entry Date/Time" - creates it if necessary
1171     */
1172    public TS getSystemEntryDateTime() { 
1173                TS retVal = this.getTypedField(22, 0);
1174                return retVal;
1175    }
1176    
1177    /**
1178     * Returns
1179     * RXA-22: "System Entry Date/Time" - creates it if necessary
1180     */
1181    public TS getRxa22_SystemEntryDateTime() { 
1182                TS retVal = this.getTypedField(22, 0);
1183                return retVal;
1184    }
1185
1186
1187
1188    /**
1189     * Returns
1190     * RXA-23: "Administered Drug Strength Volume" - creates it if necessary
1191     */
1192    public NM getAdministeredDrugStrengthVolume() { 
1193                NM retVal = this.getTypedField(23, 0);
1194                return retVal;
1195    }
1196    
1197    /**
1198     * Returns
1199     * RXA-23: "Administered Drug Strength Volume" - creates it if necessary
1200     */
1201    public NM getRxa23_AdministeredDrugStrengthVolume() { 
1202                NM retVal = this.getTypedField(23, 0);
1203                return retVal;
1204    }
1205
1206
1207
1208    /**
1209     * Returns
1210     * RXA-24: "Administered Drug Strength Volume Units" - creates it if necessary
1211     */
1212    public CWE getAdministeredDrugStrengthVolumeUnits() { 
1213                CWE retVal = this.getTypedField(24, 0);
1214                return retVal;
1215    }
1216    
1217    /**
1218     * Returns
1219     * RXA-24: "Administered Drug Strength Volume Units" - creates it if necessary
1220     */
1221    public CWE getRxa24_AdministeredDrugStrengthVolumeUnits() { 
1222                CWE retVal = this.getTypedField(24, 0);
1223                return retVal;
1224    }
1225
1226
1227
1228    /**
1229     * Returns
1230     * RXA-25: "Administered Barcode Identifier" - creates it if necessary
1231     */
1232    public CWE getAdministeredBarcodeIdentifier() { 
1233                CWE retVal = this.getTypedField(25, 0);
1234                return retVal;
1235    }
1236    
1237    /**
1238     * Returns
1239     * RXA-25: "Administered Barcode Identifier" - creates it if necessary
1240     */
1241    public CWE getRxa25_AdministeredBarcodeIdentifier() { 
1242                CWE retVal = this.getTypedField(25, 0);
1243                return retVal;
1244    }
1245
1246
1247
1248    /**
1249     * Returns
1250     * RXA-26: "Pharmacy Order Type" - creates it if necessary
1251     */
1252    public ID getPharmacyOrderType() { 
1253                ID retVal = this.getTypedField(26, 0);
1254                return retVal;
1255    }
1256    
1257    /**
1258     * Returns
1259     * RXA-26: "Pharmacy Order Type" - creates it if necessary
1260     */
1261    public ID getRxa26_PharmacyOrderType() { 
1262                ID retVal = this.getTypedField(26, 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 TS(getMessage());
1276          case 3: return new TS(getMessage());
1277          case 4: return new CE(getMessage());
1278          case 5: return new NM(getMessage());
1279          case 6: return new CE(getMessage());
1280          case 7: return new CE(getMessage());
1281          case 8: return new CE(getMessage());
1282          case 9: return new XCN(getMessage());
1283          case 10: return new LA2(getMessage());
1284          case 11: return new ST(getMessage());
1285          case 12: return new NM(getMessage());
1286          case 13: return new CE(getMessage());
1287          case 14: return new ST(getMessage());
1288          case 15: return new TS(getMessage());
1289          case 16: return new CE(getMessage());
1290          case 17: return new CE(getMessage());
1291          case 18: return new CE(getMessage());
1292          case 19: return new ID(getMessage(), new Integer( 322 ));
1293          case 20: return new ID(getMessage(), new Integer( 323 ));
1294          case 21: return new TS(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          default: return null;
1300       }
1301   }
1302
1303
1304}
1305