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/**
049 *<p>Represents an HL7 RXD message segment (Pharmacy 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 (CE) <b>optional repeating</b>
061     * <li>RXD-10: Dispensing Provider (XCN) <b>optional </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 (CM_LA1) <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 </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(CE.class, false, 0, 200, new Object[]{ getMessage() }, "Dispense Notes");
100                                  this.add(XCN.class, false, 1, 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(CM_LA1.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, 1, 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 CE[] getDispenseNotes() {
285        CE[] retVal = this.getTypedField(9, new CE[0]);
286        return retVal;
287    }
288
289
290    /**
291     * Returns all repetitions of Dispense Notes (RXD-9).
292     */
293    public CE[] getRxd9_DispenseNotes() {
294        CE[] retVal = this.getTypedField(9, new CE[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 CE getDispenseNotes(int rep) { 
316                CE 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 CE getRxd9_DispenseNotes(int rep) { 
327                CE 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 CE insertDispenseNotes(int rep) throws HL7Exception { 
349        return (CE) 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 CE insertRxd9_DispenseNotes(int rep) throws HL7Exception { 
361        return (CE) 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 CE removeDispenseNotes(int rep) throws HL7Exception { 
373        return (CE) 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 CE removeRxd9_DispenseNotes(int rep) throws HL7Exception { 
385        return (CE) super.removeRepetition(9, rep);
386    }
387
388
389
390
391    /**
392     * Returns
393     * RXD-10: "Dispensing Provider" - creates it if necessary
394     */
395    public XCN getDispensingProvider() { 
396                XCN retVal = this.getTypedField(10, 0);
397                return retVal;
398    }
399    
400    /**
401     * Returns
402     * RXD-10: "Dispensing Provider" - creates it if necessary
403     */
404    public XCN getRxd10_DispensingProvider() { 
405                XCN retVal = this.getTypedField(10, 0);
406                return retVal;
407    }
408
409
410
411    /**
412     * Returns
413     * RXD-11: "Substitution Status" - creates it if necessary
414     */
415    public ID getSubstitutionStatus() { 
416                ID retVal = this.getTypedField(11, 0);
417                return retVal;
418    }
419    
420    /**
421     * Returns
422     * RXD-11: "Substitution Status" - creates it if necessary
423     */
424    public ID getRxd11_SubstitutionStatus() { 
425                ID retVal = this.getTypedField(11, 0);
426                return retVal;
427    }
428
429
430
431    /**
432     * Returns
433     * RXD-12: "Total Daily Dose" - creates it if necessary
434     */
435    public CQ getTotalDailyDose() { 
436                CQ retVal = this.getTypedField(12, 0);
437                return retVal;
438    }
439    
440    /**
441     * Returns
442     * RXD-12: "Total Daily Dose" - creates it if necessary
443     */
444    public CQ getRxd12_TotalDailyDose() { 
445                CQ retVal = this.getTypedField(12, 0);
446                return retVal;
447    }
448
449
450
451    /**
452     * Returns
453     * RXD-13: "Dispense-To Location" - creates it if necessary
454     */
455    public CM_LA1 getDispenseToLocation() { 
456                CM_LA1 retVal = this.getTypedField(13, 0);
457                return retVal;
458    }
459    
460    /**
461     * Returns
462     * RXD-13: "Dispense-To Location" - creates it if necessary
463     */
464    public CM_LA1 getRxd13_DispenseToLocation() { 
465                CM_LA1 retVal = this.getTypedField(13, 0);
466                return retVal;
467    }
468
469
470
471    /**
472     * Returns
473     * RXD-14: "Needs Human Review" - creates it if necessary
474     */
475    public ID getNeedsHumanReview() { 
476                ID retVal = this.getTypedField(14, 0);
477                return retVal;
478    }
479    
480    /**
481     * Returns
482     * RXD-14: "Needs Human Review" - creates it if necessary
483     */
484    public ID getRxd14_NeedsHumanReview() { 
485                ID retVal = this.getTypedField(14, 0);
486                return retVal;
487    }
488
489
490    /**
491     * Returns all repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15).
492     */
493    public CE[] getPharmacyTreatmentSupplierSSpecialDispensingInstructions() {
494        CE[] retVal = this.getTypedField(15, new CE[0]);
495        return retVal;
496    }
497
498
499    /**
500     * Returns all repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15).
501     */
502    public CE[] getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions() {
503        CE[] retVal = this.getTypedField(15, new CE[0]);
504        return retVal;
505    }
506
507
508    /**
509     * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15).
510     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
511     * it will return zero.
512     */
513    public int getPharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() {
514        return this.getReps(15);
515    }
516
517
518    /**
519     * Returns a specific repetition of
520     * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary
521     *
522     * @param rep The repetition index (0-indexed)
523     */
524    public CE getPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) { 
525                CE retVal = this.getTypedField(15, rep);
526                return retVal;
527    }
528
529    /**
530     * Returns a specific repetition of
531     * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" - creates it if necessary
532     *
533     * @param rep The repetition index (0-indexed)
534     */
535    public CE getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) { 
536                CE retVal = this.getTypedField(15, rep);
537                return retVal;
538    }
539
540    /**
541     * Returns a count of the current number of repetitions of Pharmacy/Treatment Supplier's Special Dispensing Instructions (RXD-15).
542     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
543     * it will return zero.
544     */
545    public int getRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructionsReps() {
546        return this.getReps(15);
547    }
548
549
550    /**
551     * Inserts a repetition of
552     * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
553     *
554     * @param rep The repetition index (0-indexed)
555     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
556     */
557    public CE insertPharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 
558        return (CE) super.insertRepetition(15, rep);
559    }
560
561
562    /**
563     * Inserts a repetition of
564     * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
565     *
566     * @param rep The repetition index (0-indexed)
567     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
568     */
569    public CE insertRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 
570        return (CE) super.insertRepetition(15, rep);
571    }
572
573
574    /**
575     * Removes a repetition of
576     * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
577     *
578     * @param rep The repetition index (0-indexed)
579     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
580     */
581    public CE removePharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 
582        return (CE) super.removeRepetition(15, rep);
583    }
584
585
586    /**
587     * Removes a repetition of
588     * RXD-15: "Pharmacy/Treatment Supplier's Special Dispensing Instructions" at a specific index
589     *
590     * @param rep The repetition index (0-indexed)
591     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
592     */
593    public CE removeRxd15_PharmacyTreatmentSupplierSSpecialDispensingInstructions(int rep) throws HL7Exception { 
594        return (CE) super.removeRepetition(15, rep);
595    }
596
597
598
599
600    /**
601     * Returns
602     * RXD-16: "Actual Strength" - creates it if necessary
603     */
604    public NM getActualStrength() { 
605                NM retVal = this.getTypedField(16, 0);
606                return retVal;
607    }
608    
609    /**
610     * Returns
611     * RXD-16: "Actual Strength" - creates it if necessary
612     */
613    public NM getRxd16_ActualStrength() { 
614                NM retVal = this.getTypedField(16, 0);
615                return retVal;
616    }
617
618
619
620    /**
621     * Returns
622     * RXD-17: "Actual Strength Unit" - creates it if necessary
623     */
624    public CE getActualStrengthUnit() { 
625                CE retVal = this.getTypedField(17, 0);
626                return retVal;
627    }
628    
629    /**
630     * Returns
631     * RXD-17: "Actual Strength Unit" - creates it if necessary
632     */
633    public CE getRxd17_ActualStrengthUnit() { 
634                CE retVal = this.getTypedField(17, 0);
635                return retVal;
636    }
637
638
639    /**
640     * Returns all repetitions of Substance Lot Number (RXD-18).
641     */
642    public ST[] getSubstanceLotNumber() {
643        ST[] retVal = this.getTypedField(18, new ST[0]);
644        return retVal;
645    }
646
647
648    /**
649     * Returns all repetitions of Substance Lot Number (RXD-18).
650     */
651    public ST[] getRxd18_SubstanceLotNumber() {
652        ST[] retVal = this.getTypedField(18, new ST[0]);
653        return retVal;
654    }
655
656
657    /**
658     * Returns a count of the current number of repetitions of Substance Lot Number (RXD-18).
659     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
660     * it will return zero.
661     */
662    public int getSubstanceLotNumberReps() {
663        return this.getReps(18);
664    }
665
666
667    /**
668     * Returns a specific repetition of
669     * RXD-18: "Substance Lot Number" - creates it if necessary
670     *
671     * @param rep The repetition index (0-indexed)
672     */
673    public ST getSubstanceLotNumber(int rep) { 
674                ST retVal = this.getTypedField(18, rep);
675                return retVal;
676    }
677
678    /**
679     * Returns a specific repetition of
680     * RXD-18: "Substance Lot Number" - creates it if necessary
681     *
682     * @param rep The repetition index (0-indexed)
683     */
684    public ST getRxd18_SubstanceLotNumber(int rep) { 
685                ST retVal = this.getTypedField(18, rep);
686                return retVal;
687    }
688
689    /**
690     * Returns a count of the current number of repetitions of Substance Lot Number (RXD-18).
691     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
692     * it will return zero.
693     */
694    public int getRxd18_SubstanceLotNumberReps() {
695        return this.getReps(18);
696    }
697
698
699    /**
700     * Inserts a repetition of
701     * RXD-18: "Substance Lot Number" at a specific index
702     *
703     * @param rep The repetition index (0-indexed)
704     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
705     */
706    public ST insertSubstanceLotNumber(int rep) throws HL7Exception { 
707        return (ST) super.insertRepetition(18, rep);
708    }
709
710
711    /**
712     * Inserts a repetition of
713     * RXD-18: "Substance Lot Number" at a specific index
714     *
715     * @param rep The repetition index (0-indexed)
716     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
717     */
718    public ST insertRxd18_SubstanceLotNumber(int rep) throws HL7Exception { 
719        return (ST) super.insertRepetition(18, rep);
720    }
721
722
723    /**
724     * Removes a repetition of
725     * RXD-18: "Substance Lot Number" at a specific index
726     *
727     * @param rep The repetition index (0-indexed)
728     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
729     */
730    public ST removeSubstanceLotNumber(int rep) throws HL7Exception { 
731        return (ST) super.removeRepetition(18, rep);
732    }
733
734
735    /**
736     * Removes a repetition of
737     * RXD-18: "Substance Lot Number" at a specific index
738     *
739     * @param rep The repetition index (0-indexed)
740     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
741     */
742    public ST removeRxd18_SubstanceLotNumber(int rep) throws HL7Exception { 
743        return (ST) super.removeRepetition(18, rep);
744    }
745
746
747
748    /**
749     * Returns all repetitions of Substance Expiration Date (RXD-19).
750     */
751    public TS[] getSubstanceExpirationDate() {
752        TS[] retVal = this.getTypedField(19, new TS[0]);
753        return retVal;
754    }
755
756
757    /**
758     * Returns all repetitions of Substance Expiration Date (RXD-19).
759     */
760    public TS[] getRxd19_SubstanceExpirationDate() {
761        TS[] retVal = this.getTypedField(19, new TS[0]);
762        return retVal;
763    }
764
765
766    /**
767     * Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19).
768     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
769     * it will return zero.
770     */
771    public int getSubstanceExpirationDateReps() {
772        return this.getReps(19);
773    }
774
775
776    /**
777     * Returns a specific repetition of
778     * RXD-19: "Substance Expiration Date" - creates it if necessary
779     *
780     * @param rep The repetition index (0-indexed)
781     */
782    public TS getSubstanceExpirationDate(int rep) { 
783                TS retVal = this.getTypedField(19, rep);
784                return retVal;
785    }
786
787    /**
788     * Returns a specific repetition of
789     * RXD-19: "Substance Expiration Date" - creates it if necessary
790     *
791     * @param rep The repetition index (0-indexed)
792     */
793    public TS getRxd19_SubstanceExpirationDate(int rep) { 
794                TS retVal = this.getTypedField(19, rep);
795                return retVal;
796    }
797
798    /**
799     * Returns a count of the current number of repetitions of Substance Expiration Date (RXD-19).
800     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
801     * it will return zero.
802     */
803    public int getRxd19_SubstanceExpirationDateReps() {
804        return this.getReps(19);
805    }
806
807
808    /**
809     * Inserts a repetition of
810     * RXD-19: "Substance Expiration Date" at a specific index
811     *
812     * @param rep The repetition index (0-indexed)
813     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
814     */
815    public TS insertSubstanceExpirationDate(int rep) throws HL7Exception { 
816        return (TS) super.insertRepetition(19, rep);
817    }
818
819
820    /**
821     * Inserts a repetition of
822     * RXD-19: "Substance Expiration Date" at a specific index
823     *
824     * @param rep The repetition index (0-indexed)
825     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
826     */
827    public TS insertRxd19_SubstanceExpirationDate(int rep) throws HL7Exception { 
828        return (TS) super.insertRepetition(19, rep);
829    }
830
831
832    /**
833     * Removes a repetition of
834     * RXD-19: "Substance Expiration Date" at a specific index
835     *
836     * @param rep The repetition index (0-indexed)
837     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
838     */
839    public TS removeSubstanceExpirationDate(int rep) throws HL7Exception { 
840        return (TS) super.removeRepetition(19, rep);
841    }
842
843
844    /**
845     * Removes a repetition of
846     * RXD-19: "Substance Expiration Date" at a specific index
847     *
848     * @param rep The repetition index (0-indexed)
849     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
850     */
851    public TS removeRxd19_SubstanceExpirationDate(int rep) throws HL7Exception { 
852        return (TS) super.removeRepetition(19, rep);
853    }
854
855
856
857    /**
858     * Returns all repetitions of Substance Manufacturer Name (RXD-20).
859     */
860    public CE[] getSubstanceManufacturerName() {
861        CE[] retVal = this.getTypedField(20, new CE[0]);
862        return retVal;
863    }
864
865
866    /**
867     * Returns all repetitions of Substance Manufacturer Name (RXD-20).
868     */
869    public CE[] getRxd20_SubstanceManufacturerName() {
870        CE[] retVal = this.getTypedField(20, new CE[0]);
871        return retVal;
872    }
873
874
875    /**
876     * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20).
877     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
878     * it will return zero.
879     */
880    public int getSubstanceManufacturerNameReps() {
881        return this.getReps(20);
882    }
883
884
885    /**
886     * Returns a specific repetition of
887     * RXD-20: "Substance Manufacturer Name" - creates it if necessary
888     *
889     * @param rep The repetition index (0-indexed)
890     */
891    public CE getSubstanceManufacturerName(int rep) { 
892                CE retVal = this.getTypedField(20, rep);
893                return retVal;
894    }
895
896    /**
897     * Returns a specific repetition of
898     * RXD-20: "Substance Manufacturer Name" - creates it if necessary
899     *
900     * @param rep The repetition index (0-indexed)
901     */
902    public CE getRxd20_SubstanceManufacturerName(int rep) { 
903                CE retVal = this.getTypedField(20, rep);
904                return retVal;
905    }
906
907    /**
908     * Returns a count of the current number of repetitions of Substance Manufacturer Name (RXD-20).
909     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
910     * it will return zero.
911     */
912    public int getRxd20_SubstanceManufacturerNameReps() {
913        return this.getReps(20);
914    }
915
916
917    /**
918     * Inserts a repetition of
919     * RXD-20: "Substance Manufacturer Name" at a specific index
920     *
921     * @param rep The repetition index (0-indexed)
922     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
923     */
924    public CE insertSubstanceManufacturerName(int rep) throws HL7Exception { 
925        return (CE) super.insertRepetition(20, rep);
926    }
927
928
929    /**
930     * Inserts a repetition of
931     * RXD-20: "Substance Manufacturer Name" at a specific index
932     *
933     * @param rep The repetition index (0-indexed)
934     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
935     */
936    public CE insertRxd20_SubstanceManufacturerName(int rep) throws HL7Exception { 
937        return (CE) super.insertRepetition(20, rep);
938    }
939
940
941    /**
942     * Removes a repetition of
943     * RXD-20: "Substance Manufacturer Name" at a specific index
944     *
945     * @param rep The repetition index (0-indexed)
946     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
947     */
948    public CE removeSubstanceManufacturerName(int rep) throws HL7Exception { 
949        return (CE) super.removeRepetition(20, rep);
950    }
951
952
953    /**
954     * Removes a repetition of
955     * RXD-20: "Substance Manufacturer Name" at a specific index
956     *
957     * @param rep The repetition index (0-indexed)
958     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
959     */
960    public CE removeRxd20_SubstanceManufacturerName(int rep) throws HL7Exception { 
961        return (CE) super.removeRepetition(20, rep);
962    }
963
964
965
966
967    /**
968     * Returns
969     * RXD-21: "Indication" - creates it if necessary
970     */
971    public CE getIndication() { 
972                CE retVal = this.getTypedField(21, 0);
973                return retVal;
974    }
975    
976    /**
977     * Returns
978     * RXD-21: "Indication" - creates it if necessary
979     */
980    public CE getRxd21_Indication() { 
981                CE retVal = this.getTypedField(21, 0);
982                return retVal;
983    }
984
985
986
987    /**
988     * Returns
989     * RXD-22: "Dispense Package Size" - creates it if necessary
990     */
991    public NM getDispensePackageSize() { 
992                NM retVal = this.getTypedField(22, 0);
993                return retVal;
994    }
995    
996    /**
997     * Returns
998     * RXD-22: "Dispense Package Size" - creates it if necessary
999     */
1000    public NM getRxd22_DispensePackageSize() { 
1001                NM retVal = this.getTypedField(22, 0);
1002                return retVal;
1003    }
1004
1005
1006
1007    /**
1008     * Returns
1009     * RXD-23: "Dispense Package Size Unit" - creates it if necessary
1010     */
1011    public CE getDispensePackageSizeUnit() { 
1012                CE retVal = this.getTypedField(23, 0);
1013                return retVal;
1014    }
1015    
1016    /**
1017     * Returns
1018     * RXD-23: "Dispense Package Size Unit" - creates it if necessary
1019     */
1020    public CE getRxd23_DispensePackageSizeUnit() { 
1021                CE retVal = this.getTypedField(23, 0);
1022                return retVal;
1023    }
1024
1025
1026
1027    /**
1028     * Returns
1029     * RXD-24: "Dispense Package Method" - creates it if necessary
1030     */
1031    public ID getDispensePackageMethod() { 
1032                ID retVal = this.getTypedField(24, 0);
1033                return retVal;
1034    }
1035    
1036    /**
1037     * Returns
1038     * RXD-24: "Dispense Package Method" - creates it if necessary
1039     */
1040    public ID getRxd24_DispensePackageMethod() { 
1041                ID retVal = this.getTypedField(24, 0);
1042                return retVal;
1043    }
1044
1045
1046
1047
1048
1049    /** {@inheritDoc} */   
1050    protected Type createNewTypeWithoutReflection(int field) {
1051       switch (field) {
1052          case 0: return new NM(getMessage());
1053          case 1: return new CE(getMessage());
1054          case 2: return new TS(getMessage());
1055          case 3: return new NM(getMessage());
1056          case 4: return new CE(getMessage());
1057          case 5: return new CE(getMessage());
1058          case 6: return new ST(getMessage());
1059          case 7: return new NM(getMessage());
1060          case 8: return new CE(getMessage());
1061          case 9: return new XCN(getMessage());
1062          case 10: return new ID(getMessage(), new Integer( 167 ));
1063          case 11: return new CQ(getMessage());
1064          case 12: return new CM_LA1(getMessage());
1065          case 13: return new ID(getMessage(), new Integer( 136 ));
1066          case 14: return new CE(getMessage());
1067          case 15: return new NM(getMessage());
1068          case 16: return new CE(getMessage());
1069          case 17: return new ST(getMessage());
1070          case 18: return new TS(getMessage());
1071          case 19: return new CE(getMessage());
1072          case 20: return new CE(getMessage());
1073          case 21: return new NM(getMessage());
1074          case 22: return new CE(getMessage());
1075          case 23: return new ID(getMessage(), new Integer( 321 ));
1076          default: return null;
1077       }
1078   }
1079
1080
1081}
1082