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