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.v231.segment;
035
036// import ca.uhn.hl7v2.model.v231.group.*;
037import ca.uhn.hl7v2.model.v231.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 RXD message segment (RXD - pharmacy/treatment dispense segment). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>RXD-1: Dispense Sub-ID Counter (NM) <b> </b>
052     * <li>RXD-2: Dispense/Give Code (CE) <b> </b>
053     * <li>RXD-3: Date/Time Dispensed (TS) <b> </b>
054     * <li>RXD-4: Actual Dispense Amount (NM) <b> </b>
055     * <li>RXD-5: Actual Dispense Units (CE) <b>optional </b>
056     * <li>RXD-6: Actual Dosage Form (CE) <b>optional </b>
057     * <li>RXD-7: Prescription Number (ST) <b> </b>
058     * <li>RXD-8: Number of Refills Remaining (NM) <b>optional </b>
059     * <li>RXD-9: Dispense Notes (ST) <b>optional repeating</b>
060     * <li>RXD-10: Dispensing Provider (XCN) <b>optional repeating</b>
061     * <li>RXD-11: Substitution Status (ID) <b>optional </b>
062     * <li>RXD-12: Total Daily Dose (CQ) <b>optional </b>
063     * <li>RXD-13: Dispense-To Location (LA2) <b>optional </b>
064     * <li>RXD-14: Needs Human Review (ID) <b>optional </b>
065     * <li>RXD-15: Pharmacy/Treatment Supplier’s Special Dispensing Instructions (CE) <b>optional repeating</b>
066     * <li>RXD-16: Actual Strength (NM) <b>optional </b>
067     * <li>RXD-17: Actual Strength Unit (CE) <b>optional </b>
068     * <li>RXD-18: Substance Lot Number (ST) <b>optional repeating</b>
069     * <li>RXD-19: Substance Expiration Date (TS) <b>optional repeating</b>
070     * <li>RXD-20: Substance Manufacturer Name (CE) <b>optional repeating</b>
071     * <li>RXD-21: Indication (CE) <b>optional repeating</b>
072     * <li>RXD-22: Dispense Package Size (NM) <b>optional </b>
073     * <li>RXD-23: Dispense Package Size Unit (CE) <b>optional </b>
074     * <li>RXD-24: Dispense Package Method (ID) <b>optional </b>
075 * </ul>
076 */
077@SuppressWarnings("unused")
078public class RXD extends AbstractSegment {
079
080    /** 
081     * Creates a new RXD segment
082     */
083    public RXD(Group parent, ModelClassFactory factory) {
084       super(parent, factory);
085       init(factory);
086    }
087
088    private void init(ModelClassFactory factory) {
089       try {
090                                  this.add(NM.class, true, 1, 4, new Object[]{ getMessage() }, "Dispense Sub-ID Counter");
091                                  this.add(CE.class, true, 1, 100, new Object[]{ getMessage() }, "Dispense/Give Code");
092                                  this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Date/Time Dispensed");
093                                  this.add(NM.class, true, 1, 20, new Object[]{ getMessage() }, "Actual Dispense Amount");
094                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Actual Dispense Units");
095                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Actual Dosage Form");
096                                  this.add(ST.class, true, 1, 20, new Object[]{ getMessage() }, "Prescription Number");
097                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Number of Refills Remaining");
098                                  this.add(ST.class, false, 0, 200, new Object[]{ getMessage() }, "Dispense Notes");
099                                  this.add(XCN.class, false, 0, 200, new Object[]{ getMessage() }, "Dispensing Provider");
100                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(167) }, "Substitution Status");
101                                  this.add(CQ.class, false, 1, 10, new Object[]{ getMessage() }, "Total Daily Dose");
102                                  this.add(LA2.class, false, 1, 200, new Object[]{ getMessage() }, "Dispense-To Location");
103                                              this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Needs Human Review");
104                                  this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Pharmacy/Treatment Supplier’s Special Dispensing Instructions");
105                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Actual Strength");
106                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Actual Strength Unit");
107                                  this.add(ST.class, false, 0, 20, new Object[]{ getMessage() }, "Substance Lot Number");
108                                  this.add(TS.class, false, 0, 26, new Object[]{ getMessage() }, "Substance Expiration Date");
109                                  this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Substance Manufacturer Name");
110                                  this.add(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Indication");
111                                  this.add(NM.class, false, 1, 20, new Object[]{ getMessage() }, "Dispense Package Size");
112                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Dispense Package Size Unit");
113                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(321) }, "Dispense Package Method");
114       } catch(HL7Exception e) {
115          log.error("Unexpected error creating RXD - this is probably a bug in the source code generator.", e);
116       }
117    }
118
119
120
121    /**
122     * Returns
123     * RXD-1: "Dispense Sub-ID Counter" - creates it if necessary
124     */
125    public NM getDispenseSubIDCounter() { 
126                NM retVal = this.getTypedField(1, 0);
127                return retVal;
128    }
129    
130    /**
131     * Returns
132     * RXD-1: "Dispense Sub-ID Counter" - creates it if necessary
133     */
134    public NM getRxd1_DispenseSubIDCounter() { 
135                NM retVal = this.getTypedField(1, 0);
136                return retVal;
137    }
138
139
140
141    /**
142     * Returns
143     * RXD-2: "Dispense/Give Code" - creates it if necessary
144     */
145    public CE getDispenseGiveCode() { 
146                CE retVal = this.getTypedField(2, 0);
147                return retVal;
148    }
149    
150    /**
151     * Returns
152     * RXD-2: "Dispense/Give Code" - creates it if necessary
153     */
154    public CE getRxd2_DispenseGiveCode() { 
155                CE retVal = this.getTypedField(2, 0);
156                return retVal;
157    }
158
159
160
161    /**
162     * Returns
163     * RXD-3: "Date/Time Dispensed" - creates it if necessary
164     */
165    public TS getDateTimeDispensed() { 
166                TS retVal = this.getTypedField(3, 0);
167                return retVal;
168    }
169    
170    /**
171     * Returns
172     * RXD-3: "Date/Time Dispensed" - creates it if necessary
173     */
174    public TS getRxd3_DateTimeDispensed() { 
175                TS retVal = this.getTypedField(3, 0);
176                return retVal;
177    }
178
179
180
181    /**
182     * Returns
183     * RXD-4: "Actual Dispense Amount" - creates it if necessary
184     */
185    public NM getActualDispenseAmount() { 
186                NM retVal = this.getTypedField(4, 0);
187                return retVal;
188    }
189    
190    /**
191     * Returns
192     * RXD-4: "Actual Dispense Amount" - creates it if necessary
193     */
194    public NM getRxd4_ActualDispenseAmount() { 
195                NM retVal = this.getTypedField(4, 0);
196                return retVal;
197    }
198
199
200
201    /**
202     * Returns
203     * RXD-5: "Actual Dispense Units" - creates it if necessary
204     */
205    public CE getActualDispenseUnits() { 
206                CE retVal = this.getTypedField(5, 0);
207                return retVal;
208    }
209    
210    /**
211     * Returns
212     * RXD-5: "Actual Dispense Units" - creates it if necessary
213     */
214    public CE getRxd5_ActualDispenseUnits() { 
215                CE retVal = this.getTypedField(5, 0);
216                return retVal;
217    }
218
219
220
221    /**
222     * Returns
223     * RXD-6: "Actual Dosage Form" - creates it if necessary
224     */
225    public CE getActualDosageForm() { 
226                CE retVal = this.getTypedField(6, 0);
227                return retVal;
228    }
229    
230    /**
231     * Returns
232     * RXD-6: "Actual Dosage Form" - creates it if necessary
233     */
234    public CE getRxd6_ActualDosageForm() { 
235                CE retVal = this.getTypedField(6, 0);
236                return retVal;
237    }
238
239
240
241    /**
242     * Returns
243     * RXD-7: "Prescription Number" - creates it if necessary
244     */
245    public ST getPrescriptionNumber() { 
246                ST retVal = this.getTypedField(7, 0);
247                return retVal;
248    }
249    
250    /**
251     * Returns
252     * RXD-7: "Prescription Number" - creates it if necessary
253     */
254    public ST getRxd7_PrescriptionNumber() { 
255                ST retVal = this.getTypedField(7, 0);
256                return retVal;
257    }
258
259
260
261    /**
262     * Returns
263     * RXD-8: "Number of Refills Remaining" - creates it if necessary
264     */
265    public NM getNumberOfRefillsRemaining() { 
266                NM retVal = this.getTypedField(8, 0);
267                return retVal;
268    }
269    
270    /**
271     * Returns
272     * RXD-8: "Number of Refills Remaining" - creates it if necessary
273     */
274    public NM getRxd8_NumberOfRefillsRemaining() { 
275                NM retVal = this.getTypedField(8, 0);
276                return retVal;
277    }
278
279
280    /**
281     * Returns all repetitions of Dispense Notes (RXD-9).
282     */
283    public ST[] getDispenseNotes() {
284        ST[] retVal = this.getTypedField(9, new ST[0]);
285        return retVal;
286    }
287
288
289    /**
290     * Returns all repetitions of Dispense Notes (RXD-9).
291     */
292    public ST[] getRxd9_DispenseNotes() {
293        ST[] retVal = this.getTypedField(9, new ST[0]);
294        return retVal;
295    }
296
297
298    /**
299     * Returns a count of the current number of repetitions of Dispense Notes (RXD-9).
300     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
301     * it will return zero.
302     */
303    public int getDispenseNotesReps() {
304        return this.getReps(9);
305    }
306
307
308    /**
309     * Returns a specific repetition of
310     * RXD-9: "Dispense Notes" - creates it if necessary
311     *
312     * @param rep The repetition index (0-indexed)
313     */
314    public ST getDispenseNotes(int rep) { 
315                ST retVal = this.getTypedField(9, rep);
316                return retVal;
317    }
318
319    /**
320     * Returns a specific repetition of
321     * RXD-9: "Dispense Notes" - creates it if necessary
322     *
323     * @param rep The repetition index (0-indexed)
324     */
325    public ST getRxd9_DispenseNotes(int rep) { 
326                ST retVal = this.getTypedField(9, rep);
327                return retVal;
328    }
329
330    /**
331     * Returns a count of the current number of repetitions of Dispense Notes (RXD-9).
332     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
333     * it will return zero.
334     */
335    public int getRxd9_DispenseNotesReps() {
336        return this.getReps(9);
337    }
338
339
340    /**
341     * Inserts a repetition of
342     * RXD-9: "Dispense Notes" at a specific index
343     *
344     * @param rep The repetition index (0-indexed)
345     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
346     */
347    public ST insertDispenseNotes(int rep) throws HL7Exception { 
348        return (ST) super.insertRepetition(9, rep);
349    }
350
351
352    /**
353     * Inserts a repetition of
354     * RXD-9: "Dispense Notes" at a specific index
355     *
356     * @param rep The repetition index (0-indexed)
357     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
358     */
359    public ST insertRxd9_DispenseNotes(int rep) throws HL7Exception { 
360        return (ST) super.insertRepetition(9, rep);
361    }
362
363
364    /**
365     * Removes a repetition of
366     * RXD-9: "Dispense Notes" at a specific index
367     *
368     * @param rep The repetition index (0-indexed)
369     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
370     */
371    public ST removeDispenseNotes(int rep) throws HL7Exception { 
372        return (ST) super.removeRepetition(9, rep);
373    }
374
375
376    /**
377     * Removes a repetition of
378     * RXD-9: "Dispense Notes" at a specific index
379     *
380     * @param rep The repetition index (0-indexed)
381     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
382     */
383    public ST removeRxd9_DispenseNotes(int rep) throws HL7Exception { 
384        return (ST) super.removeRepetition(9, rep);
385    }
386
387
388
389    /**
390     * Returns all repetitions of Dispensing Provider (RXD-10).
391     */
392    public XCN[] getDispensingProvider() {
393        XCN[] retVal = this.getTypedField(10, new XCN[0]);
394        return retVal;
395    }
396
397
398    /**
399     * Returns all repetitions of Dispensing Provider (RXD-10).
400     */
401    public XCN[] getRxd10_DispensingProvider() {
402        XCN[] retVal = this.getTypedField(10, new XCN[0]);
403        return retVal;
404    }
405
406
407    /**
408     * Returns a count of the current number of repetitions of Dispensing Provider (RXD-10).
409     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
410     * it will return zero.
411     */
412    public int getDispensingProviderReps() {
413        return this.getReps(10);
414    }
415
416
417    /**
418     * Returns a specific repetition of
419     * RXD-10: "Dispensing Provider" - creates it if necessary
420     *
421     * @param rep The repetition index (0-indexed)
422     */
423    public XCN getDispensingProvider(int rep) { 
424                XCN retVal = this.getTypedField(10, rep);
425                return retVal;
426    }
427
428    /**
429     * Returns a specific repetition of
430     * RXD-10: "Dispensing Provider" - creates it if necessary
431     *
432     * @param rep The repetition index (0-indexed)
433     */
434    public XCN getRxd10_DispensingProvider(int rep) { 
435                XCN retVal = this.getTypedField(10, rep);
436                return retVal;
437    }
438
439    /**
440     * Returns a count of the current number of repetitions of Dispensing Provider (RXD-10).
441     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
442     * it will return zero.
443     */
444    public int getRxd10_DispensingProviderReps() {
445        return this.getReps(10);
446    }
447
448
449    /**
450     * Inserts a repetition of
451     * RXD-10: "Dispensing Provider" at a specific index
452     *
453     * @param rep The repetition index (0-indexed)
454     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
455     */
456    public XCN insertDispensingProvider(int rep) throws HL7Exception { 
457        return (XCN) super.insertRepetition(10, rep);
458    }
459
460
461    /**
462     * Inserts a repetition of
463     * RXD-10: "Dispensing Provider" at a specific index
464     *
465     * @param rep The repetition index (0-indexed)
466     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
467     */
468    public XCN insertRxd10_DispensingProvider(int rep) throws HL7Exception { 
469        return (XCN) super.insertRepetition(10, rep);
470    }
471
472
473    /**
474     * Removes a repetition of
475     * RXD-10: "Dispensing Provider" at a specific index
476     *
477     * @param rep The repetition index (0-indexed)
478     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
479     */
480    public XCN removeDispensingProvider(int rep) throws HL7Exception { 
481        return (XCN) super.removeRepetition(10, rep);
482    }
483
484
485    /**
486     * Removes a repetition of
487     * RXD-10: "Dispensing Provider" at a specific index
488     *
489     * @param rep The repetition index (0-indexed)
490     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
491     */
492    public XCN removeRxd10_DispensingProvider(int rep) throws HL7Exception { 
493        return (XCN) super.removeRepetition(10, rep);
494    }
495
496
497
498
499    /**
500     * Returns
501     * RXD-11: "Substitution Status" - creates it if necessary
502     */
503    public ID getSubstitutionStatus() { 
504                ID retVal = this.getTypedField(11, 0);
505                return retVal;
506    }
507    
508    /**
509     * Returns
510     * RXD-11: "Substitution Status" - creates it if necessary
511     */
512    public ID getRxd11_SubstitutionStatus() { 
513                ID retVal = this.getTypedField(11, 0);
514                return retVal;
515    }
516
517
518
519    /**
520     * Returns
521     * RXD-12: "Total Daily Dose" - creates it if necessary
522     */
523    public CQ getTotalDailyDose() { 
524                CQ retVal = this.getTypedField(12, 0);
525                return retVal;
526    }
527    
528    /**
529     * Returns
530     * RXD-12: "Total Daily Dose" - creates it if necessary
531     */
532    public CQ getRxd12_TotalDailyDose() { 
533                CQ retVal = this.getTypedField(12, 0);
534                return retVal;
535    }
536
537
538
539    /**
540     * Returns
541     * RXD-13: "Dispense-To Location" - creates it if necessary
542     */
543    public LA2 getDispenseToLocation() { 
544                LA2 retVal = this.getTypedField(13, 0);
545                return retVal;
546    }
547    
548    /**
549     * Returns
550     * RXD-13: "Dispense-To Location" - creates it if necessary
551     */
552    public LA2 getRxd13_DispenseToLocation() { 
553                LA2 retVal = this.getTypedField(13, 0);
554                return retVal;
555    }
556
557
558
559    /**
560     * Returns
561     * RXD-14: "Needs Human Review" - creates it if necessary
562     */
563    public ID getNeedsHumanReview() { 
564                ID retVal = this.getTypedField(14, 0);
565                return retVal;
566    }
567    
568    /**
569     * Returns
570     * RXD-14: "Needs Human Review" - creates it if necessary
571     */
572    public ID getRxd14_NeedsHumanReview() { 
573                ID retVal = this.getTypedField(14, 0);
574                return retVal;
575    }
576
577
578    /**
579     * Returns all repetitions of Pharmacy/Treatment Supplier’s Special Dispensing Instructions (RXD-15).
580     */
581    public CE[] getPharmacyTreatmentSupplierSSpecialDispensingInstructions() {
582        CE[] retVal = this.getTypedField(15, new CE[0]);
583        return retVal;
584    }
585
586
587    /**
588     * Returns all repetitions of Pharmacy/Treatment Supplier’s Special Dispensing Instructions (RXD-15).
589     */
590    public CE[] getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions() {
591        CE[] retVal = this.getTypedField(15, new CE[0]);
592        return retVal;
593    }
594
595
596    /**
597     * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier’s Special Dispensing Instructions (RXD-15).
598     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
599     * it will return zero.
600     */
601    public int getPharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() {
602        return this.getReps(15);
603    }
604
605
606    /**
607     * Returns a specific repetition of
608     * RXD-15: "Pharmacy/Treatment Supplier’s Special Dispensing Instructions" - creates it if necessary
609     *
610     * @param rep The repetition index (0-indexed)
611     */
612    public CE getPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) { 
613                CE retVal = this.getTypedField(15, rep);
614                return retVal;
615    }
616
617    /**
618     * Returns a specific repetition of
619     * RXD-15: "Pharmacy/Treatment Supplier’s Special Dispensing Instructions" - creates it if necessary
620     *
621     * @param rep The repetition index (0-indexed)
622     */
623    public CE getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) { 
624                CE retVal = this.getTypedField(15, rep);
625                return retVal;
626    }
627
628    /**
629     * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier’s Special Dispensing Instructions (RXD-15).
630     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
631     * it will return zero.
632     */
633    public int getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() {
634        return this.getReps(15);
635    }
636
637
638    /**
639     * Inserts a repetition of
640     * RXD-15: "Pharmacy/Treatment Supplier’s Special Dispensing Instructions" at a specific index
641     *
642     * @param rep The repetition index (0-indexed)
643     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
644     */
645    public CE insertPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 
646        return (CE) super.insertRepetition(15, rep);
647    }
648
649
650    /**
651     * Inserts a repetition of
652     * RXD-15: "Pharmacy/Treatment Supplier’s Special Dispensing Instructions" at a specific index
653     *
654     * @param rep The repetition index (0-indexed)
655     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
656     */
657    public CE insertRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 
658        return (CE) super.insertRepetition(15, rep);
659    }
660
661
662    /**
663     * Removes a repetition of
664     * RXD-15: "Pharmacy/Treatment Supplier’s Special Dispensing Instructions" at a specific index
665     *
666     * @param rep The repetition index (0-indexed)
667     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
668     */
669    public CE removePharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 
670        return (CE) super.removeRepetition(15, rep);
671    }
672
673
674    /**
675     * Removes a repetition of
676     * RXD-15: "Pharmacy/Treatment Supplier’s Special Dispensing Instructions" at a specific index
677     *
678     * @param rep The repetition index (0-indexed)
679     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
680     */
681    public CE removeRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 
682        return (CE) super.removeRepetition(15, rep);
683    }
684
685
686
687
688    /**
689     * Returns
690     * RXD-16: "Actual Strength" - creates it if necessary
691     */
692    public NM getActualStrength() { 
693                NM retVal = this.getTypedField(16, 0);
694                return retVal;
695    }
696    
697    /**
698     * Returns
699     * RXD-16: "Actual Strength" - creates it if necessary
700     */
701    public NM getRxd16_ActualStrength() { 
702                NM retVal = this.getTypedField(16, 0);
703                return retVal;
704    }
705
706
707
708    /**
709     * Returns
710     * RXD-17: "Actual Strength Unit" - creates it if necessary
711     */
712    public CE getActualStrengthUnit() { 
713                CE retVal = this.getTypedField(17, 0);
714                return retVal;
715    }
716    
717    /**
718     * Returns
719     * RXD-17: "Actual Strength Unit" - creates it if necessary
720     */
721    public CE getRxd17_ActualStrengthUnit() { 
722                CE retVal = this.getTypedField(17, 0);
723                return retVal;
724    }
725
726
727    /**
728     * Returns all repetitions of Substance Lot Number (RXD-18).
729     */
730    public ST[] getSubstanceLotNumber() {
731        ST[] retVal = this.getTypedField(18, new ST[0]);
732        return retVal;
733    }
734
735
736    /**
737     * Returns all repetitions of Substance Lot Number (RXD-18).
738     */
739    public ST[] getRxd18_SubstanceLotNumber() {
740        ST[] retVal = this.getTypedField(18, new ST[0]);
741        return retVal;
742    }
743
744
745    /**
746     * Returns a count of the current number of repetitions of Substance Lot Number (RXD-18).
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 getSubstanceLotNumberReps() {
751        return this.getReps(18);
752    }
753
754
755    /**
756     * Returns a specific repetition of
757     * RXD-18: "Substance Lot Number" - creates it if necessary
758     *
759     * @param rep The repetition index (0-indexed)
760     */
761    public ST getSubstanceLotNumber(int rep) { 
762                ST retVal = this.getTypedField(18, rep);
763                return retVal;
764    }
765
766    /**
767     * Returns a specific repetition of
768     * RXD-18: "Substance Lot Number" - creates it if necessary
769     *
770     * @param rep The repetition index (0-indexed)
771     */
772    public ST getRxd18_SubstanceLotNumber(int rep) { 
773                ST retVal = this.getTypedField(18, rep);
774                return retVal;
775    }
776
777    /**
778     * Returns a count of the current number of repetitions of Substance Lot Number (RXD-18).
779     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
780     * it will return zero.
781     */
782    public int getRxd18_SubstanceLotNumberReps() {
783        return this.getReps(18);
784    }
785
786
787    /**
788     * Inserts a repetition of
789     * RXD-18: "Substance Lot Number" 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 ST insertSubstanceLotNumber(int rep) throws HL7Exception { 
795        return (ST) super.insertRepetition(18, rep);
796    }
797
798
799    /**
800     * Inserts a repetition of
801     * RXD-18: "Substance Lot Number" 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 ST insertRxd18_SubstanceLotNumber(int rep) throws HL7Exception { 
807        return (ST) super.insertRepetition(18, rep);
808    }
809
810
811    /**
812     * Removes a repetition of
813     * RXD-18: "Substance Lot Number" at a specific index
814     *
815     * @param rep The repetition index (0-indexed)
816     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
817     */
818    public ST removeSubstanceLotNumber(int rep) throws HL7Exception { 
819        return (ST) super.removeRepetition(18, rep);
820    }
821
822
823    /**
824     * Removes a repetition of
825     * RXD-18: "Substance Lot Number" at a specific index
826     *
827     * @param rep The repetition index (0-indexed)
828     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
829     */
830    public ST removeRxd18_SubstanceLotNumber(int rep) throws HL7Exception { 
831        return (ST) super.removeRepetition(18, rep);
832    }
833
834
835
836    /**
837     * Returns all repetitions of Substance Expiration Date (RXD-19).
838     */
839    public TS[] getSubstanceExpirationDate() {
840        TS[] retVal = this.getTypedField(19, new TS[0]);
841        return retVal;
842    }
843
844
845    /**
846     * Returns all repetitions of Substance Expiration Date (RXD-19).
847     */
848    public TS[] getRxd19_SubstanceExpirationDate() {
849        TS[] retVal = this.getTypedField(19, new TS[0]);
850        return retVal;
851    }
852
853
854    /**
855     * Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19).
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 getSubstanceExpirationDateReps() {
860        return this.getReps(19);
861    }
862
863
864    /**
865     * Returns a specific repetition of
866     * RXD-19: "Substance Expiration Date" - creates it if necessary
867     *
868     * @param rep The repetition index (0-indexed)
869     */
870    public TS getSubstanceExpirationDate(int rep) { 
871                TS retVal = this.getTypedField(19, rep);
872                return retVal;
873    }
874
875    /**
876     * Returns a specific repetition of
877     * RXD-19: "Substance Expiration Date" - creates it if necessary
878     *
879     * @param rep The repetition index (0-indexed)
880     */
881    public TS getRxd19_SubstanceExpirationDate(int rep) { 
882                TS retVal = this.getTypedField(19, rep);
883                return retVal;
884    }
885
886    /**
887     * Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19).
888     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
889     * it will return zero.
890     */
891    public int getRxd19_SubstanceExpirationDateReps() {
892        return this.getReps(19);
893    }
894
895
896    /**
897     * Inserts a repetition of
898     * RXD-19: "Substance Expiration Date" 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 TS insertSubstanceExpirationDate(int rep) throws HL7Exception { 
904        return (TS) super.insertRepetition(19, rep);
905    }
906
907
908    /**
909     * Inserts a repetition of
910     * RXD-19: "Substance Expiration Date" 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 TS insertRxd19_SubstanceExpirationDate(int rep) throws HL7Exception { 
916        return (TS) super.insertRepetition(19, rep);
917    }
918
919
920    /**
921     * Removes a repetition of
922     * RXD-19: "Substance Expiration Date" at a specific index
923     *
924     * @param rep The repetition index (0-indexed)
925     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
926     */
927    public TS removeSubstanceExpirationDate(int rep) throws HL7Exception { 
928        return (TS) super.removeRepetition(19, rep);
929    }
930
931
932    /**
933     * Removes a repetition of
934     * RXD-19: "Substance Expiration Date" at a specific index
935     *
936     * @param rep The repetition index (0-indexed)
937     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
938     */
939    public TS removeRxd19_SubstanceExpirationDate(int rep) throws HL7Exception { 
940        return (TS) super.removeRepetition(19, rep);
941    }
942
943
944
945    /**
946     * Returns all repetitions of Substance Manufacturer Name (RXD-20).
947     */
948    public CE[] getSubstanceManufacturerName() {
949        CE[] retVal = this.getTypedField(20, new CE[0]);
950        return retVal;
951    }
952
953
954    /**
955     * Returns all repetitions of Substance Manufacturer Name (RXD-20).
956     */
957    public CE[] getRxd20_SubstanceManufacturerName() {
958        CE[] retVal = this.getTypedField(20, new CE[0]);
959        return retVal;
960    }
961
962
963    /**
964     * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20).
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 getSubstanceManufacturerNameReps() {
969        return this.getReps(20);
970    }
971
972
973    /**
974     * Returns a specific repetition of
975     * RXD-20: "Substance Manufacturer Name" - creates it if necessary
976     *
977     * @param rep The repetition index (0-indexed)
978     */
979    public CE getSubstanceManufacturerName(int rep) { 
980                CE retVal = this.getTypedField(20, rep);
981                return retVal;
982    }
983
984    /**
985     * Returns a specific repetition of
986     * RXD-20: "Substance Manufacturer Name" - creates it if necessary
987     *
988     * @param rep The repetition index (0-indexed)
989     */
990    public CE getRxd20_SubstanceManufacturerName(int rep) { 
991                CE retVal = this.getTypedField(20, rep);
992                return retVal;
993    }
994
995    /**
996     * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20).
997     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
998     * it will return zero.
999     */
1000    public int getRxd20_SubstanceManufacturerNameReps() {
1001        return this.getReps(20);
1002    }
1003
1004
1005    /**
1006     * Inserts a repetition of
1007     * RXD-20: "Substance Manufacturer Name" 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 insertSubstanceManufacturerName(int rep) throws HL7Exception { 
1013        return (CE) super.insertRepetition(20, rep);
1014    }
1015
1016
1017    /**
1018     * Inserts a repetition of
1019     * RXD-20: "Substance Manufacturer Name" 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 insertRxd20_SubstanceManufacturerName(int rep) throws HL7Exception { 
1025        return (CE) super.insertRepetition(20, rep);
1026    }
1027
1028
1029    /**
1030     * Removes a repetition of
1031     * RXD-20: "Substance Manufacturer Name" at a specific index
1032     *
1033     * @param rep The repetition index (0-indexed)
1034     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1035     */
1036    public CE removeSubstanceManufacturerName(int rep) throws HL7Exception { 
1037        return (CE) super.removeRepetition(20, rep);
1038    }
1039
1040
1041    /**
1042     * Removes a repetition of
1043     * RXD-20: "Substance Manufacturer Name" at a specific index
1044     *
1045     * @param rep The repetition index (0-indexed)
1046     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1047     */
1048    public CE removeRxd20_SubstanceManufacturerName(int rep) throws HL7Exception { 
1049        return (CE) super.removeRepetition(20, rep);
1050    }
1051
1052
1053
1054    /**
1055     * Returns all repetitions of Indication (RXD-21).
1056     */
1057    public CE[] getIndication() {
1058        CE[] retVal = this.getTypedField(21, new CE[0]);
1059        return retVal;
1060    }
1061
1062
1063    /**
1064     * Returns all repetitions of Indication (RXD-21).
1065     */
1066    public CE[] getRxd21_Indication() {
1067        CE[] retVal = this.getTypedField(21, new CE[0]);
1068        return retVal;
1069    }
1070
1071
1072    /**
1073     * Returns a count of the current number of repetitions of Indication (RXD-21).
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 getIndicationReps() {
1078        return this.getReps(21);
1079    }
1080
1081
1082    /**
1083     * Returns a specific repetition of
1084     * RXD-21: "Indication" - creates it if necessary
1085     *
1086     * @param rep The repetition index (0-indexed)
1087     */
1088    public CE getIndication(int rep) { 
1089                CE retVal = this.getTypedField(21, rep);
1090                return retVal;
1091    }
1092
1093    /**
1094     * Returns a specific repetition of
1095     * RXD-21: "Indication" - creates it if necessary
1096     *
1097     * @param rep The repetition index (0-indexed)
1098     */
1099    public CE getRxd21_Indication(int rep) { 
1100                CE retVal = this.getTypedField(21, rep);
1101                return retVal;
1102    }
1103
1104    /**
1105     * Returns a count of the current number of repetitions of Indication (RXD-21).
1106     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1107     * it will return zero.
1108     */
1109    public int getRxd21_IndicationReps() {
1110        return this.getReps(21);
1111    }
1112
1113
1114    /**
1115     * Inserts a repetition of
1116     * RXD-21: "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 insertIndication(int rep) throws HL7Exception { 
1122        return (CE) super.insertRepetition(21, rep);
1123    }
1124
1125
1126    /**
1127     * Inserts a repetition of
1128     * RXD-21: "Indication" at a specific index
1129     *
1130     * @param rep The repetition index (0-indexed)
1131     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1132     */
1133    public CE insertRxd21_Indication(int rep) throws HL7Exception { 
1134        return (CE) super.insertRepetition(21, rep);
1135    }
1136
1137
1138    /**
1139     * Removes a repetition of
1140     * RXD-21: "Indication" at a specific index
1141     *
1142     * @param rep The repetition index (0-indexed)
1143     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1144     */
1145    public CE removeIndication(int rep) throws HL7Exception { 
1146        return (CE) super.removeRepetition(21, rep);
1147    }
1148
1149
1150    /**
1151     * Removes a repetition of
1152     * RXD-21: "Indication" at a specific index
1153     *
1154     * @param rep The repetition index (0-indexed)
1155     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1156     */
1157    public CE removeRxd21_Indication(int rep) throws HL7Exception { 
1158        return (CE) super.removeRepetition(21, rep);
1159    }
1160
1161
1162
1163
1164    /**
1165     * Returns
1166     * RXD-22: "Dispense Package Size" - creates it if necessary
1167     */
1168    public NM getDispensePackageSize() { 
1169                NM retVal = this.getTypedField(22, 0);
1170                return retVal;
1171    }
1172    
1173    /**
1174     * Returns
1175     * RXD-22: "Dispense Package Size" - creates it if necessary
1176     */
1177    public NM getRxd22_DispensePackageSize() { 
1178                NM retVal = this.getTypedField(22, 0);
1179                return retVal;
1180    }
1181
1182
1183
1184    /**
1185     * Returns
1186     * RXD-23: "Dispense Package Size Unit" - creates it if necessary
1187     */
1188    public CE getDispensePackageSizeUnit() { 
1189                CE retVal = this.getTypedField(23, 0);
1190                return retVal;
1191    }
1192    
1193    /**
1194     * Returns
1195     * RXD-23: "Dispense Package Size Unit" - creates it if necessary
1196     */
1197    public CE getRxd23_DispensePackageSizeUnit() { 
1198                CE retVal = this.getTypedField(23, 0);
1199                return retVal;
1200    }
1201
1202
1203
1204    /**
1205     * Returns
1206     * RXD-24: "Dispense Package Method" - creates it if necessary
1207     */
1208    public ID getDispensePackageMethod() { 
1209                ID retVal = this.getTypedField(24, 0);
1210                return retVal;
1211    }
1212    
1213    /**
1214     * Returns
1215     * RXD-24: "Dispense Package Method" - creates it if necessary
1216     */
1217    public ID getRxd24_DispensePackageMethod() { 
1218                ID retVal = this.getTypedField(24, 0);
1219                return retVal;
1220    }
1221
1222
1223
1224
1225
1226    /** {@inheritDoc} */   
1227    protected Type createNewTypeWithoutReflection(int field) {
1228       switch (field) {
1229          case 0: return new NM(getMessage());
1230          case 1: return new CE(getMessage());
1231          case 2: return new TS(getMessage());
1232          case 3: return new NM(getMessage());
1233          case 4: return new CE(getMessage());
1234          case 5: return new CE(getMessage());
1235          case 6: return new ST(getMessage());
1236          case 7: return new NM(getMessage());
1237          case 8: return new ST(getMessage());
1238          case 9: return new XCN(getMessage());
1239          case 10: return new ID(getMessage(), new Integer( 167 ));
1240          case 11: return new CQ(getMessage());
1241          case 12: return new LA2(getMessage());
1242          case 13: return new ID(getMessage(), new Integer( 136 ));
1243          case 14: return new CE(getMessage());
1244          case 15: return new NM(getMessage());
1245          case 16: return new CE(getMessage());
1246          case 17: return new ST(getMessage());
1247          case 18: return new TS(getMessage());
1248          case 19: return new CE(getMessage());
1249          case 20: return new CE(getMessage());
1250          case 21: return new NM(getMessage());
1251          case 22: return new CE(getMessage());
1252          case 23: return new ID(getMessage(), new Integer( 321 ));
1253          default: return null;
1254       }
1255   }
1256
1257
1258}
1259