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.v23.segment;
035
036// import ca.uhn.hl7v2.model.v23.group.*;
037import ca.uhn.hl7v2.model.v23.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 administration segment). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>RXA-1: Give Sub-ID Counter (ID) <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 </b>
061     * <li>RXA-11: Administered-at Location (CM_LA1) <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 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 * </ul>
074 */
075@SuppressWarnings("unused")
076public class RXA extends AbstractSegment {
077
078    /** 
079     * Creates a new RXA segment
080     */
081    public RXA(Group parent, ModelClassFactory factory) {
082       super(parent, factory);
083       init(factory);
084    }
085
086    private void init(ModelClassFactory factory) {
087       try {
088                                              this.add(ID.class, true, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "Give Sub-ID Counter");
089                                  this.add(NM.class, true, 1, 4, new Object[]{ getMessage() }, "Administration Sub-ID Counter");
090                                  this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Date/Time Start of Administration");
091                                  this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Date/Time End of Administration");
092                                  this.add(CE.class, true, 1, 100, new Object[]{ getMessage() }, "Administered Code");
093                                  this.add(NM.class, true, 1, 20, new Object[]{ getMessage() }, "Administered Amount");
094                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Administered Units");
095                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Administered Dosage Form");
096                                  this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Administration Notes");
097                                  this.add(XCN.class, false, 1, 200, new Object[]{ getMessage() }, "Administering Provider");
098                                  this.add(CM_LA1.class, false, 1, 200, new Object[]{ getMessage() }, "Administered-at Location");
099                                  this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Administered Per (Time Unit)");
100                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Administered Strength");
101                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Administered Strength Units");
102                                  this.add(ST.class, false, 0, 20, new Object[]{ getMessage() }, "Substance Lot Number");
103                                  this.add(TS.class, false, 0, 26, new Object[]{ getMessage() }, "Substance Expiration Date");
104                                  this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Substance Manufacturer Name");
105                                  this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Substance Refusal Reason");
106                                  this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Indication");
107                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(322) }, "Completion Status");
108                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(323) }, "Action Code-RXA");
109                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "System Entry Date/Time");
110       } catch(HL7Exception e) {
111          log.error("Unexpected error creating RXA - this is probably a bug in the source code generator.", e);
112       }
113    }
114
115
116
117    /**
118     * Returns
119     * RXA-1: "Give Sub-ID Counter" - creates it if necessary
120     */
121    public ID getGiveSubIDCounter() { 
122                ID retVal = this.getTypedField(1, 0);
123                return retVal;
124    }
125    
126    /**
127     * Returns
128     * RXA-1: "Give Sub-ID Counter" - creates it if necessary
129     */
130    public ID getRxa1_GiveSubIDCounter() { 
131                ID retVal = this.getTypedField(1, 0);
132                return retVal;
133    }
134
135
136
137    /**
138     * Returns
139     * RXA-2: "Administration Sub-ID Counter" - creates it if necessary
140     */
141    public NM getAdministrationSubIDCounter() { 
142                NM retVal = this.getTypedField(2, 0);
143                return retVal;
144    }
145    
146    /**
147     * Returns
148     * RXA-2: "Administration Sub-ID Counter" - creates it if necessary
149     */
150    public NM getRxa2_AdministrationSubIDCounter() { 
151                NM retVal = this.getTypedField(2, 0);
152                return retVal;
153    }
154
155
156
157    /**
158     * Returns
159     * RXA-3: "Date/Time Start of Administration" - creates it if necessary
160     */
161    public TS getDateTimeStartOfAdministration() { 
162                TS retVal = this.getTypedField(3, 0);
163                return retVal;
164    }
165    
166    /**
167     * Returns
168     * RXA-3: "Date/Time Start of Administration" - creates it if necessary
169     */
170    public TS getRxa3_DateTimeStartOfAdministration() { 
171                TS retVal = this.getTypedField(3, 0);
172                return retVal;
173    }
174
175
176
177    /**
178     * Returns
179     * RXA-4: "Date/Time End of Administration" - creates it if necessary
180     */
181    public TS getDateTimeEndOfAdministration() { 
182                TS retVal = this.getTypedField(4, 0);
183                return retVal;
184    }
185    
186    /**
187     * Returns
188     * RXA-4: "Date/Time End of Administration" - creates it if necessary
189     */
190    public TS getRxa4_DateTimeEndOfAdministration() { 
191                TS retVal = this.getTypedField(4, 0);
192                return retVal;
193    }
194
195
196
197    /**
198     * Returns
199     * RXA-5: "Administered Code" - creates it if necessary
200     */
201    public CE getAdministeredCode() { 
202                CE retVal = this.getTypedField(5, 0);
203                return retVal;
204    }
205    
206    /**
207     * Returns
208     * RXA-5: "Administered Code" - creates it if necessary
209     */
210    public CE getRxa5_AdministeredCode() { 
211                CE retVal = this.getTypedField(5, 0);
212                return retVal;
213    }
214
215
216
217    /**
218     * Returns
219     * RXA-6: "Administered Amount" - creates it if necessary
220     */
221    public NM getAdministeredAmount() { 
222                NM retVal = this.getTypedField(6, 0);
223                return retVal;
224    }
225    
226    /**
227     * Returns
228     * RXA-6: "Administered Amount" - creates it if necessary
229     */
230    public NM getRxa6_AdministeredAmount() { 
231                NM retVal = this.getTypedField(6, 0);
232                return retVal;
233    }
234
235
236
237    /**
238     * Returns
239     * RXA-7: "Administered Units" - creates it if necessary
240     */
241    public CE getAdministeredUnits() { 
242                CE retVal = this.getTypedField(7, 0);
243                return retVal;
244    }
245    
246    /**
247     * Returns
248     * RXA-7: "Administered Units" - creates it if necessary
249     */
250    public CE getRxa7_AdministeredUnits() { 
251                CE retVal = this.getTypedField(7, 0);
252                return retVal;
253    }
254
255
256
257    /**
258     * Returns
259     * RXA-8: "Administered Dosage Form" - creates it if necessary
260     */
261    public CE getAdministeredDosageForm() { 
262                CE retVal = this.getTypedField(8, 0);
263                return retVal;
264    }
265    
266    /**
267     * Returns
268     * RXA-8: "Administered Dosage Form" - creates it if necessary
269     */
270    public CE getRxa8_AdministeredDosageForm() { 
271                CE retVal = this.getTypedField(8, 0);
272                return retVal;
273    }
274
275
276    /**
277     * Returns all repetitions of Administration Notes (RXA-9).
278     */
279    public CE[] getAdministrationNotes() {
280        CE[] retVal = this.getTypedField(9, new CE[0]);
281        return retVal;
282    }
283
284
285    /**
286     * Returns all repetitions of Administration Notes (RXA-9).
287     */
288    public CE[] getRxa9_AdministrationNotes() {
289        CE[] retVal = this.getTypedField(9, new CE[0]);
290        return retVal;
291    }
292
293
294    /**
295     * Returns a count of the current number of repetitions of Administration Notes (RXA-9).
296     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
297     * it will return zero.
298     */
299    public int getAdministrationNotesReps() {
300        return this.getReps(9);
301    }
302
303
304    /**
305     * Returns a specific repetition of
306     * RXA-9: "Administration Notes" - creates it if necessary
307     *
308     * @param rep The repetition index (0-indexed)
309     */
310    public CE getAdministrationNotes(int rep) { 
311                CE retVal = this.getTypedField(9, rep);
312                return retVal;
313    }
314
315    /**
316     * Returns a specific repetition of
317     * RXA-9: "Administration Notes" - creates it if necessary
318     *
319     * @param rep The repetition index (0-indexed)
320     */
321    public CE getRxa9_AdministrationNotes(int rep) { 
322                CE retVal = this.getTypedField(9, rep);
323                return retVal;
324    }
325
326    /**
327     * Returns a count of the current number of repetitions of Administration Notes (RXA-9).
328     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
329     * it will return zero.
330     */
331    public int getRxa9_AdministrationNotesReps() {
332        return this.getReps(9);
333    }
334
335
336    /**
337     * Inserts a repetition of
338     * RXA-9: "Administration Notes" at a specific index
339     *
340     * @param rep The repetition index (0-indexed)
341     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
342     */
343    public CE insertAdministrationNotes(int rep) throws HL7Exception { 
344        return (CE) super.insertRepetition(9, rep);
345    }
346
347
348    /**
349     * Inserts a repetition of
350     * 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 CE insertRxa9_AdministrationNotes(int rep) throws HL7Exception { 
356        return (CE) super.insertRepetition(9, rep);
357    }
358
359
360    /**
361     * Removes 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 CE removeAdministrationNotes(int rep) throws HL7Exception { 
368        return (CE) super.removeRepetition(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 CE removeRxa9_AdministrationNotes(int rep) throws HL7Exception { 
380        return (CE) super.removeRepetition(9, rep);
381    }
382
383
384
385
386    /**
387     * Returns
388     * RXA-10: "Administering Provider" - creates it if necessary
389     */
390    public XCN getAdministeringProvider() { 
391                XCN retVal = this.getTypedField(10, 0);
392                return retVal;
393    }
394    
395    /**
396     * Returns
397     * RXA-10: "Administering Provider" - creates it if necessary
398     */
399    public XCN getRxa10_AdministeringProvider() { 
400                XCN retVal = this.getTypedField(10, 0);
401                return retVal;
402    }
403
404
405
406    /**
407     * Returns
408     * RXA-11: "Administered-at Location" - creates it if necessary
409     */
410    public CM_LA1 getAdministeredAtLocation() { 
411                CM_LA1 retVal = this.getTypedField(11, 0);
412                return retVal;
413    }
414    
415    /**
416     * Returns
417     * RXA-11: "Administered-at Location" - creates it if necessary
418     */
419    public CM_LA1 getRxa11_AdministeredAtLocation() { 
420                CM_LA1 retVal = this.getTypedField(11, 0);
421                return retVal;
422    }
423
424
425
426    /**
427     * Returns
428     * RXA-12: "Administered Per (Time Unit)" - creates it if necessary
429     */
430    public ST getAdministeredPerTimeUnit() { 
431                ST retVal = this.getTypedField(12, 0);
432                return retVal;
433    }
434    
435    /**
436     * Returns
437     * RXA-12: "Administered Per (Time Unit)" - creates it if necessary
438     */
439    public ST getRxa12_AdministeredPerTimeUnit() { 
440                ST retVal = this.getTypedField(12, 0);
441                return retVal;
442    }
443
444
445
446    /**
447     * Returns
448     * RXA-13: "Administered Strength" - creates it if necessary
449     */
450    public NM getAdministeredStrength() { 
451                NM retVal = this.getTypedField(13, 0);
452                return retVal;
453    }
454    
455    /**
456     * Returns
457     * RXA-13: "Administered Strength" - creates it if necessary
458     */
459    public NM getRxa13_AdministeredStrength() { 
460                NM retVal = this.getTypedField(13, 0);
461                return retVal;
462    }
463
464
465
466    /**
467     * Returns
468     * RXA-14: "Administered Strength Units" - creates it if necessary
469     */
470    public CE getAdministeredStrengthUnits() { 
471                CE retVal = this.getTypedField(14, 0);
472                return retVal;
473    }
474    
475    /**
476     * Returns
477     * RXA-14: "Administered Strength Units" - creates it if necessary
478     */
479    public CE getRxa14_AdministeredStrengthUnits() { 
480                CE retVal = this.getTypedField(14, 0);
481                return retVal;
482    }
483
484
485    /**
486     * Returns all repetitions of Substance Lot Number (RXA-15).
487     */
488    public ST[] getSubstanceLotNumber() {
489        ST[] retVal = this.getTypedField(15, new ST[0]);
490        return retVal;
491    }
492
493
494    /**
495     * Returns all repetitions of Substance Lot Number (RXA-15).
496     */
497    public ST[] getRxa15_SubstanceLotNumber() {
498        ST[] retVal = this.getTypedField(15, new ST[0]);
499        return retVal;
500    }
501
502
503    /**
504     * Returns a count of the current number of repetitions of Substance Lot Number (RXA-15).
505     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
506     * it will return zero.
507     */
508    public int getSubstanceLotNumberReps() {
509        return this.getReps(15);
510    }
511
512
513    /**
514     * Returns a specific repetition of
515     * RXA-15: "Substance Lot Number" - creates it if necessary
516     *
517     * @param rep The repetition index (0-indexed)
518     */
519    public ST getSubstanceLotNumber(int rep) { 
520                ST retVal = this.getTypedField(15, rep);
521                return retVal;
522    }
523
524    /**
525     * Returns a specific repetition of
526     * RXA-15: "Substance Lot Number" - creates it if necessary
527     *
528     * @param rep The repetition index (0-indexed)
529     */
530    public ST getRxa15_SubstanceLotNumber(int rep) { 
531                ST retVal = this.getTypedField(15, rep);
532                return retVal;
533    }
534
535    /**
536     * Returns a count of the current number of repetitions of Substance Lot Number (RXA-15).
537     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
538     * it will return zero.
539     */
540    public int getRxa15_SubstanceLotNumberReps() {
541        return this.getReps(15);
542    }
543
544
545    /**
546     * Inserts a repetition of
547     * RXA-15: "Substance Lot Number" at a specific index
548     *
549     * @param rep The repetition index (0-indexed)
550     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
551     */
552    public ST insertSubstanceLotNumber(int rep) throws HL7Exception { 
553        return (ST) super.insertRepetition(15, rep);
554    }
555
556
557    /**
558     * Inserts a repetition of
559     * RXA-15: "Substance Lot Number" at a specific index
560     *
561     * @param rep The repetition index (0-indexed)
562     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
563     */
564    public ST insertRxa15_SubstanceLotNumber(int rep) throws HL7Exception { 
565        return (ST) super.insertRepetition(15, rep);
566    }
567
568
569    /**
570     * Removes a repetition of
571     * RXA-15: "Substance Lot Number" at a specific index
572     *
573     * @param rep The repetition index (0-indexed)
574     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
575     */
576    public ST removeSubstanceLotNumber(int rep) throws HL7Exception { 
577        return (ST) super.removeRepetition(15, rep);
578    }
579
580
581    /**
582     * Removes a repetition of
583     * RXA-15: "Substance Lot Number" at a specific index
584     *
585     * @param rep The repetition index (0-indexed)
586     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
587     */
588    public ST removeRxa15_SubstanceLotNumber(int rep) throws HL7Exception { 
589        return (ST) super.removeRepetition(15, rep);
590    }
591
592
593
594    /**
595     * Returns all repetitions of Substance Expiration Date (RXA-16).
596     */
597    public TS[] getSubstanceExpirationDate() {
598        TS[] retVal = this.getTypedField(16, new TS[0]);
599        return retVal;
600    }
601
602
603    /**
604     * Returns all repetitions of Substance Expiration Date (RXA-16).
605     */
606    public TS[] getRxa16_SubstanceExpirationDate() {
607        TS[] retVal = this.getTypedField(16, new TS[0]);
608        return retVal;
609    }
610
611
612    /**
613     * Returns a count of the current number of repetitions of Substance Expiration Date (RXA-16).
614     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
615     * it will return zero.
616     */
617    public int getSubstanceExpirationDateReps() {
618        return this.getReps(16);
619    }
620
621
622    /**
623     * Returns a specific repetition of
624     * RXA-16: "Substance Expiration Date" - creates it if necessary
625     *
626     * @param rep The repetition index (0-indexed)
627     */
628    public TS getSubstanceExpirationDate(int rep) { 
629                TS retVal = this.getTypedField(16, rep);
630                return retVal;
631    }
632
633    /**
634     * Returns a specific repetition of
635     * RXA-16: "Substance Expiration Date" - creates it if necessary
636     *
637     * @param rep The repetition index (0-indexed)
638     */
639    public TS getRxa16_SubstanceExpirationDate(int rep) { 
640                TS retVal = this.getTypedField(16, rep);
641                return retVal;
642    }
643
644    /**
645     * Returns a count of the current number of repetitions of Substance Expiration Date (RXA-16).
646     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
647     * it will return zero.
648     */
649    public int getRxa16_SubstanceExpirationDateReps() {
650        return this.getReps(16);
651    }
652
653
654    /**
655     * Inserts a repetition of
656     * RXA-16: "Substance Expiration Date" 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 TS insertSubstanceExpirationDate(int rep) throws HL7Exception { 
662        return (TS) super.insertRepetition(16, rep);
663    }
664
665
666    /**
667     * Inserts a repetition of
668     * RXA-16: "Substance Expiration Date" 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 TS insertRxa16_SubstanceExpirationDate(int rep) throws HL7Exception { 
674        return (TS) super.insertRepetition(16, rep);
675    }
676
677
678    /**
679     * Removes a repetition of
680     * RXA-16: "Substance Expiration Date" 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 TS removeSubstanceExpirationDate(int rep) throws HL7Exception { 
686        return (TS) super.removeRepetition(16, rep);
687    }
688
689
690    /**
691     * Removes a repetition of
692     * RXA-16: "Substance Expiration Date" at a specific index
693     *
694     * @param rep The repetition index (0-indexed)
695     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
696     */
697    public TS removeRxa16_SubstanceExpirationDate(int rep) throws HL7Exception { 
698        return (TS) super.removeRepetition(16, rep);
699    }
700
701
702
703    /**
704     * Returns all repetitions of Substance Manufacturer Name (RXA-17).
705     */
706    public CE[] getSubstanceManufacturerName() {
707        CE[] retVal = this.getTypedField(17, new CE[0]);
708        return retVal;
709    }
710
711
712    /**
713     * Returns all repetitions of Substance Manufacturer Name (RXA-17).
714     */
715    public CE[] getRxa17_SubstanceManufacturerName() {
716        CE[] retVal = this.getTypedField(17, new CE[0]);
717        return retVal;
718    }
719
720
721    /**
722     * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXA-17).
723     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
724     * it will return zero.
725     */
726    public int getSubstanceManufacturerNameReps() {
727        return this.getReps(17);
728    }
729
730
731    /**
732     * Returns a specific repetition of
733     * RXA-17: "Substance Manufacturer Name" - creates it if necessary
734     *
735     * @param rep The repetition index (0-indexed)
736     */
737    public CE getSubstanceManufacturerName(int rep) { 
738                CE retVal = this.getTypedField(17, rep);
739                return retVal;
740    }
741
742    /**
743     * Returns a specific repetition of
744     * RXA-17: "Substance Manufacturer Name" - creates it if necessary
745     *
746     * @param rep The repetition index (0-indexed)
747     */
748    public CE getRxa17_SubstanceManufacturerName(int rep) { 
749                CE retVal = this.getTypedField(17, rep);
750                return retVal;
751    }
752
753    /**
754     * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXA-17).
755     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
756     * it will return zero.
757     */
758    public int getRxa17_SubstanceManufacturerNameReps() {
759        return this.getReps(17);
760    }
761
762
763    /**
764     * Inserts a repetition of
765     * RXA-17: "Substance Manufacturer Name" 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 CE insertSubstanceManufacturerName(int rep) throws HL7Exception { 
771        return (CE) super.insertRepetition(17, rep);
772    }
773
774
775    /**
776     * Inserts a repetition of
777     * RXA-17: "Substance Manufacturer Name" 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 CE insertRxa17_SubstanceManufacturerName(int rep) throws HL7Exception { 
783        return (CE) super.insertRepetition(17, rep);
784    }
785
786
787    /**
788     * Removes a repetition of
789     * RXA-17: "Substance Manufacturer Name" 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 CE removeSubstanceManufacturerName(int rep) throws HL7Exception { 
795        return (CE) super.removeRepetition(17, rep);
796    }
797
798
799    /**
800     * Removes a repetition of
801     * RXA-17: "Substance Manufacturer Name" at a specific index
802     *
803     * @param rep The repetition index (0-indexed)
804     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
805     */
806    public CE removeRxa17_SubstanceManufacturerName(int rep) throws HL7Exception { 
807        return (CE) super.removeRepetition(17, rep);
808    }
809
810
811
812    /**
813     * Returns all repetitions of Substance Refusal Reason (RXA-18).
814     */
815    public CE[] getSubstanceRefusalReason() {
816        CE[] retVal = this.getTypedField(18, new CE[0]);
817        return retVal;
818    }
819
820
821    /**
822     * Returns all repetitions of Substance Refusal Reason (RXA-18).
823     */
824    public CE[] getRxa18_SubstanceRefusalReason() {
825        CE[] retVal = this.getTypedField(18, new CE[0]);
826        return retVal;
827    }
828
829
830    /**
831     * Returns a count of the current number of repetitions of Substance Refusal Reason (RXA-18).
832     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
833     * it will return zero.
834     */
835    public int getSubstanceRefusalReasonReps() {
836        return this.getReps(18);
837    }
838
839
840    /**
841     * Returns a specific repetition of
842     * RXA-18: "Substance Refusal Reason" - creates it if necessary
843     *
844     * @param rep The repetition index (0-indexed)
845     */
846    public CE getSubstanceRefusalReason(int rep) { 
847                CE retVal = this.getTypedField(18, rep);
848                return retVal;
849    }
850
851    /**
852     * Returns a specific repetition of
853     * RXA-18: "Substance Refusal Reason" - creates it if necessary
854     *
855     * @param rep The repetition index (0-indexed)
856     */
857    public CE getRxa18_SubstanceRefusalReason(int rep) { 
858                CE retVal = this.getTypedField(18, rep);
859                return retVal;
860    }
861
862    /**
863     * Returns a count of the current number of repetitions of Substance Refusal Reason (RXA-18).
864     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
865     * it will return zero.
866     */
867    public int getRxa18_SubstanceRefusalReasonReps() {
868        return this.getReps(18);
869    }
870
871
872    /**
873     * Inserts a repetition of
874     * RXA-18: "Substance Refusal Reason" 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 insertSubstanceRefusalReason(int rep) throws HL7Exception { 
880        return (CE) super.insertRepetition(18, rep);
881    }
882
883
884    /**
885     * Inserts a repetition of
886     * RXA-18: "Substance Refusal Reason" 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 insertRxa18_SubstanceRefusalReason(int rep) throws HL7Exception { 
892        return (CE) super.insertRepetition(18, rep);
893    }
894
895
896    /**
897     * Removes a repetition of
898     * RXA-18: "Substance Refusal Reason" 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 removeSubstanceRefusalReason(int rep) throws HL7Exception { 
904        return (CE) super.removeRepetition(18, rep);
905    }
906
907
908    /**
909     * Removes a repetition of
910     * RXA-18: "Substance Refusal Reason" at a specific index
911     *
912     * @param rep The repetition index (0-indexed)
913     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
914     */
915    public CE removeRxa18_SubstanceRefusalReason(int rep) throws HL7Exception { 
916        return (CE) super.removeRepetition(18, rep);
917    }
918
919
920
921    /**
922     * Returns all repetitions of Indication (RXA-19).
923     */
924    public CE[] getIndication() {
925        CE[] retVal = this.getTypedField(19, new CE[0]);
926        return retVal;
927    }
928
929
930    /**
931     * Returns all repetitions of Indication (RXA-19).
932     */
933    public CE[] getRxa19_Indication() {
934        CE[] retVal = this.getTypedField(19, new CE[0]);
935        return retVal;
936    }
937
938
939    /**
940     * Returns a count of the current number of repetitions of Indication (RXA-19).
941     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
942     * it will return zero.
943     */
944    public int getIndicationReps() {
945        return this.getReps(19);
946    }
947
948
949    /**
950     * Returns a specific repetition of
951     * RXA-19: "Indication" - creates it if necessary
952     *
953     * @param rep The repetition index (0-indexed)
954     */
955    public CE getIndication(int rep) { 
956                CE retVal = this.getTypedField(19, rep);
957                return retVal;
958    }
959
960    /**
961     * Returns a specific repetition of
962     * RXA-19: "Indication" - creates it if necessary
963     *
964     * @param rep The repetition index (0-indexed)
965     */
966    public CE getRxa19_Indication(int rep) { 
967                CE retVal = this.getTypedField(19, rep);
968                return retVal;
969    }
970
971    /**
972     * Returns a count of the current number of repetitions of Indication (RXA-19).
973     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
974     * it will return zero.
975     */
976    public int getRxa19_IndicationReps() {
977        return this.getReps(19);
978    }
979
980
981    /**
982     * Inserts a repetition of
983     * RXA-19: "Indication" 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 insertIndication(int rep) throws HL7Exception { 
989        return (CE) super.insertRepetition(19, rep);
990    }
991
992
993    /**
994     * Inserts a repetition of
995     * RXA-19: "Indication" 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 insertRxa19_Indication(int rep) throws HL7Exception { 
1001        return (CE) super.insertRepetition(19, rep);
1002    }
1003
1004
1005    /**
1006     * Removes a repetition of
1007     * RXA-19: "Indication" 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 removeIndication(int rep) throws HL7Exception { 
1013        return (CE) super.removeRepetition(19, rep);
1014    }
1015
1016
1017    /**
1018     * Removes a repetition of
1019     * RXA-19: "Indication" at a specific index
1020     *
1021     * @param rep The repetition index (0-indexed)
1022     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1023     */
1024    public CE removeRxa19_Indication(int rep) throws HL7Exception { 
1025        return (CE) super.removeRepetition(19, rep);
1026    }
1027
1028
1029
1030
1031    /**
1032     * Returns
1033     * RXA-20: "Completion Status" - creates it if necessary
1034     */
1035    public ID getCompletionStatus() { 
1036                ID retVal = this.getTypedField(20, 0);
1037                return retVal;
1038    }
1039    
1040    /**
1041     * Returns
1042     * RXA-20: "Completion Status" - creates it if necessary
1043     */
1044    public ID getRxa20_CompletionStatus() { 
1045                ID retVal = this.getTypedField(20, 0);
1046                return retVal;
1047    }
1048
1049
1050
1051    /**
1052     * Returns
1053     * RXA-21: "Action Code-RXA" - creates it if necessary
1054     */
1055    public ID getActionCodeRXA() { 
1056                ID retVal = this.getTypedField(21, 0);
1057                return retVal;
1058    }
1059    
1060    /**
1061     * Returns
1062     * RXA-21: "Action Code-RXA" - creates it if necessary
1063     */
1064    public ID getRxa21_ActionCodeRXA() { 
1065                ID retVal = this.getTypedField(21, 0);
1066                return retVal;
1067    }
1068
1069
1070
1071    /**
1072     * Returns
1073     * RXA-22: "System Entry Date/Time" - creates it if necessary
1074     */
1075    public TS getSystemEntryDateTime() { 
1076                TS retVal = this.getTypedField(22, 0);
1077                return retVal;
1078    }
1079    
1080    /**
1081     * Returns
1082     * RXA-22: "System Entry Date/Time" - creates it if necessary
1083     */
1084    public TS getRxa22_SystemEntryDateTime() { 
1085                TS retVal = this.getTypedField(22, 0);
1086                return retVal;
1087    }
1088
1089
1090
1091
1092
1093    /** {@inheritDoc} */   
1094    protected Type createNewTypeWithoutReflection(int field) {
1095       switch (field) {
1096          case 0: return new ID(getMessage(), new Integer( 0 ));
1097          case 1: return new NM(getMessage());
1098          case 2: return new TS(getMessage());
1099          case 3: return new TS(getMessage());
1100          case 4: return new CE(getMessage());
1101          case 5: return new NM(getMessage());
1102          case 6: return new CE(getMessage());
1103          case 7: return new CE(getMessage());
1104          case 8: return new CE(getMessage());
1105          case 9: return new XCN(getMessage());
1106          case 10: return new CM_LA1(getMessage());
1107          case 11: return new ST(getMessage());
1108          case 12: return new NM(getMessage());
1109          case 13: return new CE(getMessage());
1110          case 14: return new ST(getMessage());
1111          case 15: return new TS(getMessage());
1112          case 16: return new CE(getMessage());
1113          case 17: return new CE(getMessage());
1114          case 18: return new CE(getMessage());
1115          case 19: return new ID(getMessage(), new Integer( 322 ));
1116          case 20: return new ID(getMessage(), new Integer( 323 ));
1117          case 21: return new TS(getMessage());
1118          default: return null;
1119       }
1120   }
1121
1122
1123}
1124