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