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 FT1 message segment (FT1 - financial transaction segment). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>FT1-1: Set ID - FT1 (SI) <b>optional </b>
052     * <li>FT1-2: Transaction ID (ST) <b>optional </b>
053     * <li>FT1-3: Transaction Batch ID (ST) <b>optional </b>
054     * <li>FT1-4: Transaction Date (TS) <b> </b>
055     * <li>FT1-5: Transaction Posting Date (TS) <b>optional </b>
056     * <li>FT1-6: Transaction Type (IS) <b> </b>
057     * <li>FT1-7: Transaction Code (CE) <b> </b>
058     * <li>FT1-8: Transaction Description (ST) <b>optional </b>
059     * <li>FT1-9: Transaction Description - Alt (ST) <b>optional </b>
060     * <li>FT1-10: Transaction Quantity (NM) <b>optional </b>
061     * <li>FT1-11: Transaction Amount - Extended (CP) <b>optional </b>
062     * <li>FT1-12: Transaction Amount - Unit (CP) <b>optional </b>
063     * <li>FT1-13: Department Code (CE) <b>optional </b>
064     * <li>FT1-14: Insurance Plan ID (CE) <b>optional </b>
065     * <li>FT1-15: Insurance Amount (CP) <b>optional </b>
066     * <li>FT1-16: Assigned Patient Location (PL) <b>optional </b>
067     * <li>FT1-17: Fee Schedule (IS) <b>optional </b>
068     * <li>FT1-18: Patient Type (IS) <b>optional </b>
069     * <li>FT1-19: Diagnosis Code - FT1 (CE) <b>optional repeating</b>
070     * <li>FT1-20: Performed By Code (XCN) <b>optional repeating</b>
071     * <li>FT1-21: Ordered By Code (XCN) <b>optional repeating</b>
072     * <li>FT1-22: Unit Cost (CP) <b>optional </b>
073     * <li>FT1-23: Filler Order Number (EI) <b>optional </b>
074     * <li>FT1-24: Entered By Code (XCN) <b>optional repeating</b>
075     * <li>FT1-25: Procedure Code (CE) <b>optional </b>
076     * <li>FT1-26: Procedure Code Modifier (CE) <b>optional repeating</b>
077 * </ul>
078 */
079@SuppressWarnings("unused")
080public class FT1 extends AbstractSegment {
081
082    /** 
083     * Creates a new FT1 segment
084     */
085    public FT1(Group parent, ModelClassFactory factory) {
086       super(parent, factory);
087       init(factory);
088    }
089
090    private void init(ModelClassFactory factory) {
091       try {
092                                  this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - FT1");
093                                  this.add(ST.class, false, 1, 12, new Object[]{ getMessage() }, "Transaction ID");
094                                  this.add(ST.class, false, 1, 10, new Object[]{ getMessage() }, "Transaction Batch ID");
095                                  this.add(TS.class, true, 1, 26, new Object[]{ getMessage() }, "Transaction Date");
096                                  this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Transaction Posting Date");
097                                              this.add(IS.class, true, 1, 8, new Object[]{ getMessage(), new Integer(17) }, "Transaction Type");
098                                  this.add(CE.class, true, 1, 80, new Object[]{ getMessage() }, "Transaction Code");
099                                  this.add(ST.class, false, 1, 40, new Object[]{ getMessage() }, "Transaction Description");
100                                  this.add(ST.class, false, 1, 40, new Object[]{ getMessage() }, "Transaction Description - Alt");
101                                  this.add(NM.class, false, 1, 6, new Object[]{ getMessage() }, "Transaction Quantity");
102                                  this.add(CP.class, false, 1, 12, new Object[]{ getMessage() }, "Transaction Amount - Extended");
103                                  this.add(CP.class, false, 1, 12, new Object[]{ getMessage() }, "Transaction Amount - Unit");
104                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Department Code");
105                                  this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Insurance Plan ID");
106                                  this.add(CP.class, false, 1, 12, new Object[]{ getMessage() }, "Insurance Amount");
107                                  this.add(PL.class, false, 1, 80, new Object[]{ getMessage() }, "Assigned Patient Location");
108                                              this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(24) }, "Fee Schedule");
109                                              this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(18) }, "Patient Type");
110                                  this.add(CE.class, false, 0, 60, new Object[]{ getMessage() }, "Diagnosis Code - FT1");
111                                  this.add(XCN.class, false, 0, 120, new Object[]{ getMessage() }, "Performed By Code");
112                                  this.add(XCN.class, false, 0, 120, new Object[]{ getMessage() }, "Ordered By Code");
113                                  this.add(CP.class, false, 1, 12, new Object[]{ getMessage() }, "Unit Cost");
114                                  this.add(EI.class, false, 1, 22, new Object[]{ getMessage() }, "Filler Order Number");
115                                  this.add(XCN.class, false, 0, 120, new Object[]{ getMessage() }, "Entered By Code");
116                                  this.add(CE.class, false, 1, 80, new Object[]{ getMessage() }, "Procedure Code");
117                                  this.add(CE.class, false, 0, 80, new Object[]{ getMessage() }, "Procedure Code Modifier");
118       } catch(HL7Exception e) {
119          log.error("Unexpected error creating FT1 - this is probably a bug in the source code generator.", e);
120       }
121    }
122
123
124
125    /**
126     * Returns
127     * FT1-1: "Set ID - FT1" - creates it if necessary
128     */
129    public SI getSetIDFT1() { 
130                SI retVal = this.getTypedField(1, 0);
131                return retVal;
132    }
133    
134    /**
135     * Returns
136     * FT1-1: "Set ID - FT1" - creates it if necessary
137     */
138    public SI getFt11_SetIDFT1() { 
139                SI retVal = this.getTypedField(1, 0);
140                return retVal;
141    }
142
143
144
145    /**
146     * Returns
147     * FT1-2: "Transaction ID" - creates it if necessary
148     */
149    public ST getTransactionID() { 
150                ST retVal = this.getTypedField(2, 0);
151                return retVal;
152    }
153    
154    /**
155     * Returns
156     * FT1-2: "Transaction ID" - creates it if necessary
157     */
158    public ST getFt12_TransactionID() { 
159                ST retVal = this.getTypedField(2, 0);
160                return retVal;
161    }
162
163
164
165    /**
166     * Returns
167     * FT1-3: "Transaction Batch ID" - creates it if necessary
168     */
169    public ST getTransactionBatchID() { 
170                ST retVal = this.getTypedField(3, 0);
171                return retVal;
172    }
173    
174    /**
175     * Returns
176     * FT1-3: "Transaction Batch ID" - creates it if necessary
177     */
178    public ST getFt13_TransactionBatchID() { 
179                ST retVal = this.getTypedField(3, 0);
180                return retVal;
181    }
182
183
184
185    /**
186     * Returns
187     * FT1-4: "Transaction Date" - creates it if necessary
188     */
189    public TS getTransactionDate() { 
190                TS retVal = this.getTypedField(4, 0);
191                return retVal;
192    }
193    
194    /**
195     * Returns
196     * FT1-4: "Transaction Date" - creates it if necessary
197     */
198    public TS getFt14_TransactionDate() { 
199                TS retVal = this.getTypedField(4, 0);
200                return retVal;
201    }
202
203
204
205    /**
206     * Returns
207     * FT1-5: "Transaction Posting Date" - creates it if necessary
208     */
209    public TS getTransactionPostingDate() { 
210                TS retVal = this.getTypedField(5, 0);
211                return retVal;
212    }
213    
214    /**
215     * Returns
216     * FT1-5: "Transaction Posting Date" - creates it if necessary
217     */
218    public TS getFt15_TransactionPostingDate() { 
219                TS retVal = this.getTypedField(5, 0);
220                return retVal;
221    }
222
223
224
225    /**
226     * Returns
227     * FT1-6: "Transaction Type" - creates it if necessary
228     */
229    public IS getTransactionType() { 
230                IS retVal = this.getTypedField(6, 0);
231                return retVal;
232    }
233    
234    /**
235     * Returns
236     * FT1-6: "Transaction Type" - creates it if necessary
237     */
238    public IS getFt16_TransactionType() { 
239                IS retVal = this.getTypedField(6, 0);
240                return retVal;
241    }
242
243
244
245    /**
246     * Returns
247     * FT1-7: "Transaction Code" - creates it if necessary
248     */
249    public CE getTransactionCode() { 
250                CE retVal = this.getTypedField(7, 0);
251                return retVal;
252    }
253    
254    /**
255     * Returns
256     * FT1-7: "Transaction Code" - creates it if necessary
257     */
258    public CE getFt17_TransactionCode() { 
259                CE retVal = this.getTypedField(7, 0);
260                return retVal;
261    }
262
263
264
265    /**
266     * Returns
267     * FT1-8: "Transaction Description" - creates it if necessary
268     */
269    public ST getTransactionDescription() { 
270                ST retVal = this.getTypedField(8, 0);
271                return retVal;
272    }
273    
274    /**
275     * Returns
276     * FT1-8: "Transaction Description" - creates it if necessary
277     */
278    public ST getFt18_TransactionDescription() { 
279                ST retVal = this.getTypedField(8, 0);
280                return retVal;
281    }
282
283
284
285    /**
286     * Returns
287     * FT1-9: "Transaction Description - Alt" - creates it if necessary
288     */
289    public ST getTransactionDescriptionAlt() { 
290                ST retVal = this.getTypedField(9, 0);
291                return retVal;
292    }
293    
294    /**
295     * Returns
296     * FT1-9: "Transaction Description - Alt" - creates it if necessary
297     */
298    public ST getFt19_TransactionDescriptionAlt() { 
299                ST retVal = this.getTypedField(9, 0);
300                return retVal;
301    }
302
303
304
305    /**
306     * Returns
307     * FT1-10: "Transaction Quantity" - creates it if necessary
308     */
309    public NM getTransactionQuantity() { 
310                NM retVal = this.getTypedField(10, 0);
311                return retVal;
312    }
313    
314    /**
315     * Returns
316     * FT1-10: "Transaction Quantity" - creates it if necessary
317     */
318    public NM getFt110_TransactionQuantity() { 
319                NM retVal = this.getTypedField(10, 0);
320                return retVal;
321    }
322
323
324
325    /**
326     * Returns
327     * FT1-11: "Transaction Amount - Extended" - creates it if necessary
328     */
329    public CP getTransactionAmountExtended() { 
330                CP retVal = this.getTypedField(11, 0);
331                return retVal;
332    }
333    
334    /**
335     * Returns
336     * FT1-11: "Transaction Amount - Extended" - creates it if necessary
337     */
338    public CP getFt111_TransactionAmountExtended() { 
339                CP retVal = this.getTypedField(11, 0);
340                return retVal;
341    }
342
343
344
345    /**
346     * Returns
347     * FT1-12: "Transaction Amount - Unit" - creates it if necessary
348     */
349    public CP getTransactionAmountUnit() { 
350                CP retVal = this.getTypedField(12, 0);
351                return retVal;
352    }
353    
354    /**
355     * Returns
356     * FT1-12: "Transaction Amount - Unit" - creates it if necessary
357     */
358    public CP getFt112_TransactionAmountUnit() { 
359                CP retVal = this.getTypedField(12, 0);
360                return retVal;
361    }
362
363
364
365    /**
366     * Returns
367     * FT1-13: "Department Code" - creates it if necessary
368     */
369    public CE getDepartmentCode() { 
370                CE retVal = this.getTypedField(13, 0);
371                return retVal;
372    }
373    
374    /**
375     * Returns
376     * FT1-13: "Department Code" - creates it if necessary
377     */
378    public CE getFt113_DepartmentCode() { 
379                CE retVal = this.getTypedField(13, 0);
380                return retVal;
381    }
382
383
384
385    /**
386     * Returns
387     * FT1-14: "Insurance Plan ID" - creates it if necessary
388     */
389    public CE getInsurancePlanID() { 
390                CE retVal = this.getTypedField(14, 0);
391                return retVal;
392    }
393    
394    /**
395     * Returns
396     * FT1-14: "Insurance Plan ID" - creates it if necessary
397     */
398    public CE getFt114_InsurancePlanID() { 
399                CE retVal = this.getTypedField(14, 0);
400                return retVal;
401    }
402
403
404
405    /**
406     * Returns
407     * FT1-15: "Insurance Amount" - creates it if necessary
408     */
409    public CP getInsuranceAmount() { 
410                CP retVal = this.getTypedField(15, 0);
411                return retVal;
412    }
413    
414    /**
415     * Returns
416     * FT1-15: "Insurance Amount" - creates it if necessary
417     */
418    public CP getFt115_InsuranceAmount() { 
419                CP retVal = this.getTypedField(15, 0);
420                return retVal;
421    }
422
423
424
425    /**
426     * Returns
427     * FT1-16: "Assigned Patient Location" - creates it if necessary
428     */
429    public PL getAssignedPatientLocation() { 
430                PL retVal = this.getTypedField(16, 0);
431                return retVal;
432    }
433    
434    /**
435     * Returns
436     * FT1-16: "Assigned Patient Location" - creates it if necessary
437     */
438    public PL getFt116_AssignedPatientLocation() { 
439                PL retVal = this.getTypedField(16, 0);
440                return retVal;
441    }
442
443
444
445    /**
446     * Returns
447     * FT1-17: "Fee Schedule" - creates it if necessary
448     */
449    public IS getFeeSchedule() { 
450                IS retVal = this.getTypedField(17, 0);
451                return retVal;
452    }
453    
454    /**
455     * Returns
456     * FT1-17: "Fee Schedule" - creates it if necessary
457     */
458    public IS getFt117_FeeSchedule() { 
459                IS retVal = this.getTypedField(17, 0);
460                return retVal;
461    }
462
463
464
465    /**
466     * Returns
467     * FT1-18: "Patient Type" - creates it if necessary
468     */
469    public IS getPatientType() { 
470                IS retVal = this.getTypedField(18, 0);
471                return retVal;
472    }
473    
474    /**
475     * Returns
476     * FT1-18: "Patient Type" - creates it if necessary
477     */
478    public IS getFt118_PatientType() { 
479                IS retVal = this.getTypedField(18, 0);
480                return retVal;
481    }
482
483
484    /**
485     * Returns all repetitions of Diagnosis Code - FT1 (FT1-19).
486     */
487    public CE[] getDiagnosisCodeFT1() {
488        CE[] retVal = this.getTypedField(19, new CE[0]);
489        return retVal;
490    }
491
492
493    /**
494     * Returns all repetitions of Diagnosis Code - FT1 (FT1-19).
495     */
496    public CE[] getFt119_DiagnosisCodeFT1() {
497        CE[] retVal = this.getTypedField(19, new CE[0]);
498        return retVal;
499    }
500
501
502    /**
503     * Returns a count of the current number of repetitions of Diagnosis Code - FT1 (FT1-19).
504     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
505     * it will return zero.
506     */
507    public int getDiagnosisCodeFT1Reps() {
508        return this.getReps(19);
509    }
510
511
512    /**
513     * Returns a specific repetition of
514     * FT1-19: "Diagnosis Code - FT1" - creates it if necessary
515     *
516     * @param rep The repetition index (0-indexed)
517     */
518    public CE getDiagnosisCodeFT1(int rep) { 
519                CE retVal = this.getTypedField(19, rep);
520                return retVal;
521    }
522
523    /**
524     * Returns a specific repetition of
525     * FT1-19: "Diagnosis Code - FT1" - creates it if necessary
526     *
527     * @param rep The repetition index (0-indexed)
528     */
529    public CE getFt119_DiagnosisCodeFT1(int rep) { 
530                CE retVal = this.getTypedField(19, rep);
531                return retVal;
532    }
533
534    /**
535     * Returns a count of the current number of repetitions of Diagnosis Code - FT1 (FT1-19).
536     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
537     * it will return zero.
538     */
539    public int getFt119_DiagnosisCodeFT1Reps() {
540        return this.getReps(19);
541    }
542
543
544    /**
545     * Inserts a repetition of
546     * FT1-19: "Diagnosis Code - FT1" at a specific index
547     *
548     * @param rep The repetition index (0-indexed)
549     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
550     */
551    public CE insertDiagnosisCodeFT1(int rep) throws HL7Exception { 
552        return (CE) super.insertRepetition(19, rep);
553    }
554
555
556    /**
557     * Inserts a repetition of
558     * FT1-19: "Diagnosis Code - FT1" at a specific index
559     *
560     * @param rep The repetition index (0-indexed)
561     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
562     */
563    public CE insertFt119_DiagnosisCodeFT1(int rep) throws HL7Exception { 
564        return (CE) super.insertRepetition(19, rep);
565    }
566
567
568    /**
569     * Removes a repetition of
570     * FT1-19: "Diagnosis Code - FT1" at a specific index
571     *
572     * @param rep The repetition index (0-indexed)
573     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
574     */
575    public CE removeDiagnosisCodeFT1(int rep) throws HL7Exception { 
576        return (CE) super.removeRepetition(19, rep);
577    }
578
579
580    /**
581     * Removes a repetition of
582     * FT1-19: "Diagnosis Code - FT1" at a specific index
583     *
584     * @param rep The repetition index (0-indexed)
585     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
586     */
587    public CE removeFt119_DiagnosisCodeFT1(int rep) throws HL7Exception { 
588        return (CE) super.removeRepetition(19, rep);
589    }
590
591
592
593    /**
594     * Returns all repetitions of Performed By Code (FT1-20).
595     */
596    public XCN[] getPerformedByCode() {
597        XCN[] retVal = this.getTypedField(20, new XCN[0]);
598        return retVal;
599    }
600
601
602    /**
603     * Returns all repetitions of Performed By Code (FT1-20).
604     */
605    public XCN[] getFt120_PerformedByCode() {
606        XCN[] retVal = this.getTypedField(20, new XCN[0]);
607        return retVal;
608    }
609
610
611    /**
612     * Returns a count of the current number of repetitions of Performed By Code (FT1-20).
613     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
614     * it will return zero.
615     */
616    public int getPerformedByCodeReps() {
617        return this.getReps(20);
618    }
619
620
621    /**
622     * Returns a specific repetition of
623     * FT1-20: "Performed By Code" - creates it if necessary
624     *
625     * @param rep The repetition index (0-indexed)
626     */
627    public XCN getPerformedByCode(int rep) { 
628                XCN retVal = this.getTypedField(20, rep);
629                return retVal;
630    }
631
632    /**
633     * Returns a specific repetition of
634     * FT1-20: "Performed By Code" - creates it if necessary
635     *
636     * @param rep The repetition index (0-indexed)
637     */
638    public XCN getFt120_PerformedByCode(int rep) { 
639                XCN retVal = this.getTypedField(20, rep);
640                return retVal;
641    }
642
643    /**
644     * Returns a count of the current number of repetitions of Performed By Code (FT1-20).
645     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
646     * it will return zero.
647     */
648    public int getFt120_PerformedByCodeReps() {
649        return this.getReps(20);
650    }
651
652
653    /**
654     * Inserts a repetition of
655     * FT1-20: "Performed By Code" at a specific index
656     *
657     * @param rep The repetition index (0-indexed)
658     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
659     */
660    public XCN insertPerformedByCode(int rep) throws HL7Exception { 
661        return (XCN) super.insertRepetition(20, rep);
662    }
663
664
665    /**
666     * Inserts a repetition of
667     * FT1-20: "Performed By Code" at a specific index
668     *
669     * @param rep The repetition index (0-indexed)
670     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
671     */
672    public XCN insertFt120_PerformedByCode(int rep) throws HL7Exception { 
673        return (XCN) super.insertRepetition(20, rep);
674    }
675
676
677    /**
678     * Removes a repetition of
679     * FT1-20: "Performed By Code" at a specific index
680     *
681     * @param rep The repetition index (0-indexed)
682     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
683     */
684    public XCN removePerformedByCode(int rep) throws HL7Exception { 
685        return (XCN) super.removeRepetition(20, rep);
686    }
687
688
689    /**
690     * Removes a repetition of
691     * FT1-20: "Performed By Code" at a specific index
692     *
693     * @param rep The repetition index (0-indexed)
694     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
695     */
696    public XCN removeFt120_PerformedByCode(int rep) throws HL7Exception { 
697        return (XCN) super.removeRepetition(20, rep);
698    }
699
700
701
702    /**
703     * Returns all repetitions of Ordered By Code (FT1-21).
704     */
705    public XCN[] getOrderedByCode() {
706        XCN[] retVal = this.getTypedField(21, new XCN[0]);
707        return retVal;
708    }
709
710
711    /**
712     * Returns all repetitions of Ordered By Code (FT1-21).
713     */
714    public XCN[] getFt121_OrderedByCode() {
715        XCN[] retVal = this.getTypedField(21, new XCN[0]);
716        return retVal;
717    }
718
719
720    /**
721     * Returns a count of the current number of repetitions of Ordered By Code (FT1-21).
722     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
723     * it will return zero.
724     */
725    public int getOrderedByCodeReps() {
726        return this.getReps(21);
727    }
728
729
730    /**
731     * Returns a specific repetition of
732     * FT1-21: "Ordered By Code" - creates it if necessary
733     *
734     * @param rep The repetition index (0-indexed)
735     */
736    public XCN getOrderedByCode(int rep) { 
737                XCN retVal = this.getTypedField(21, rep);
738                return retVal;
739    }
740
741    /**
742     * Returns a specific repetition of
743     * FT1-21: "Ordered By Code" - creates it if necessary
744     *
745     * @param rep The repetition index (0-indexed)
746     */
747    public XCN getFt121_OrderedByCode(int rep) { 
748                XCN retVal = this.getTypedField(21, rep);
749                return retVal;
750    }
751
752    /**
753     * Returns a count of the current number of repetitions of Ordered By Code (FT1-21).
754     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
755     * it will return zero.
756     */
757    public int getFt121_OrderedByCodeReps() {
758        return this.getReps(21);
759    }
760
761
762    /**
763     * Inserts a repetition of
764     * FT1-21: "Ordered By Code" at a specific index
765     *
766     * @param rep The repetition index (0-indexed)
767     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
768     */
769    public XCN insertOrderedByCode(int rep) throws HL7Exception { 
770        return (XCN) super.insertRepetition(21, rep);
771    }
772
773
774    /**
775     * Inserts a repetition of
776     * FT1-21: "Ordered By Code" at a specific index
777     *
778     * @param rep The repetition index (0-indexed)
779     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
780     */
781    public XCN insertFt121_OrderedByCode(int rep) throws HL7Exception { 
782        return (XCN) super.insertRepetition(21, rep);
783    }
784
785
786    /**
787     * Removes a repetition of
788     * FT1-21: "Ordered By Code" at a specific index
789     *
790     * @param rep The repetition index (0-indexed)
791     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
792     */
793    public XCN removeOrderedByCode(int rep) throws HL7Exception { 
794        return (XCN) super.removeRepetition(21, rep);
795    }
796
797
798    /**
799     * Removes a repetition of
800     * FT1-21: "Ordered By Code" at a specific index
801     *
802     * @param rep The repetition index (0-indexed)
803     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
804     */
805    public XCN removeFt121_OrderedByCode(int rep) throws HL7Exception { 
806        return (XCN) super.removeRepetition(21, rep);
807    }
808
809
810
811
812    /**
813     * Returns
814     * FT1-22: "Unit Cost" - creates it if necessary
815     */
816    public CP getUnitCost() { 
817                CP retVal = this.getTypedField(22, 0);
818                return retVal;
819    }
820    
821    /**
822     * Returns
823     * FT1-22: "Unit Cost" - creates it if necessary
824     */
825    public CP getFt122_UnitCost() { 
826                CP retVal = this.getTypedField(22, 0);
827                return retVal;
828    }
829
830
831
832    /**
833     * Returns
834     * FT1-23: "Filler Order Number" - creates it if necessary
835     */
836    public EI getFillerOrderNumber() { 
837                EI retVal = this.getTypedField(23, 0);
838                return retVal;
839    }
840    
841    /**
842     * Returns
843     * FT1-23: "Filler Order Number" - creates it if necessary
844     */
845    public EI getFt123_FillerOrderNumber() { 
846                EI retVal = this.getTypedField(23, 0);
847                return retVal;
848    }
849
850
851    /**
852     * Returns all repetitions of Entered By Code (FT1-24).
853     */
854    public XCN[] getEnteredByCode() {
855        XCN[] retVal = this.getTypedField(24, new XCN[0]);
856        return retVal;
857    }
858
859
860    /**
861     * Returns all repetitions of Entered By Code (FT1-24).
862     */
863    public XCN[] getFt124_EnteredByCode() {
864        XCN[] retVal = this.getTypedField(24, new XCN[0]);
865        return retVal;
866    }
867
868
869    /**
870     * Returns a count of the current number of repetitions of Entered By Code (FT1-24).
871     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
872     * it will return zero.
873     */
874    public int getEnteredByCodeReps() {
875        return this.getReps(24);
876    }
877
878
879    /**
880     * Returns a specific repetition of
881     * FT1-24: "Entered By Code" - creates it if necessary
882     *
883     * @param rep The repetition index (0-indexed)
884     */
885    public XCN getEnteredByCode(int rep) { 
886                XCN retVal = this.getTypedField(24, rep);
887                return retVal;
888    }
889
890    /**
891     * Returns a specific repetition of
892     * FT1-24: "Entered By Code" - creates it if necessary
893     *
894     * @param rep The repetition index (0-indexed)
895     */
896    public XCN getFt124_EnteredByCode(int rep) { 
897                XCN retVal = this.getTypedField(24, rep);
898                return retVal;
899    }
900
901    /**
902     * Returns a count of the current number of repetitions of Entered By Code (FT1-24).
903     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
904     * it will return zero.
905     */
906    public int getFt124_EnteredByCodeReps() {
907        return this.getReps(24);
908    }
909
910
911    /**
912     * Inserts a repetition of
913     * FT1-24: "Entered By Code" at a specific index
914     *
915     * @param rep The repetition index (0-indexed)
916     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
917     */
918    public XCN insertEnteredByCode(int rep) throws HL7Exception { 
919        return (XCN) super.insertRepetition(24, rep);
920    }
921
922
923    /**
924     * Inserts a repetition of
925     * FT1-24: "Entered By Code" at a specific index
926     *
927     * @param rep The repetition index (0-indexed)
928     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
929     */
930    public XCN insertFt124_EnteredByCode(int rep) throws HL7Exception { 
931        return (XCN) super.insertRepetition(24, rep);
932    }
933
934
935    /**
936     * Removes a repetition of
937     * FT1-24: "Entered By Code" at a specific index
938     *
939     * @param rep The repetition index (0-indexed)
940     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
941     */
942    public XCN removeEnteredByCode(int rep) throws HL7Exception { 
943        return (XCN) super.removeRepetition(24, rep);
944    }
945
946
947    /**
948     * Removes a repetition of
949     * FT1-24: "Entered By Code" at a specific index
950     *
951     * @param rep The repetition index (0-indexed)
952     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
953     */
954    public XCN removeFt124_EnteredByCode(int rep) throws HL7Exception { 
955        return (XCN) super.removeRepetition(24, rep);
956    }
957
958
959
960
961    /**
962     * Returns
963     * FT1-25: "Procedure Code" - creates it if necessary
964     */
965    public CE getProcedureCode() { 
966                CE retVal = this.getTypedField(25, 0);
967                return retVal;
968    }
969    
970    /**
971     * Returns
972     * FT1-25: "Procedure Code" - creates it if necessary
973     */
974    public CE getFt125_ProcedureCode() { 
975                CE retVal = this.getTypedField(25, 0);
976                return retVal;
977    }
978
979
980    /**
981     * Returns all repetitions of Procedure Code Modifier (FT1-26).
982     */
983    public CE[] getProcedureCodeModifier() {
984        CE[] retVal = this.getTypedField(26, new CE[0]);
985        return retVal;
986    }
987
988
989    /**
990     * Returns all repetitions of Procedure Code Modifier (FT1-26).
991     */
992    public CE[] getFt126_ProcedureCodeModifier() {
993        CE[] retVal = this.getTypedField(26, new CE[0]);
994        return retVal;
995    }
996
997
998    /**
999     * Returns a count of the current number of repetitions of Procedure Code Modifier (FT1-26).
1000     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1001     * it will return zero.
1002     */
1003    public int getProcedureCodeModifierReps() {
1004        return this.getReps(26);
1005    }
1006
1007
1008    /**
1009     * Returns a specific repetition of
1010     * FT1-26: "Procedure Code Modifier" - creates it if necessary
1011     *
1012     * @param rep The repetition index (0-indexed)
1013     */
1014    public CE getProcedureCodeModifier(int rep) { 
1015                CE retVal = this.getTypedField(26, rep);
1016                return retVal;
1017    }
1018
1019    /**
1020     * Returns a specific repetition of
1021     * FT1-26: "Procedure Code Modifier" - creates it if necessary
1022     *
1023     * @param rep The repetition index (0-indexed)
1024     */
1025    public CE getFt126_ProcedureCodeModifier(int rep) { 
1026                CE retVal = this.getTypedField(26, rep);
1027                return retVal;
1028    }
1029
1030    /**
1031     * Returns a count of the current number of repetitions of Procedure Code Modifier (FT1-26).
1032     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
1033     * it will return zero.
1034     */
1035    public int getFt126_ProcedureCodeModifierReps() {
1036        return this.getReps(26);
1037    }
1038
1039
1040    /**
1041     * Inserts a repetition of
1042     * FT1-26: "Procedure Code Modifier" at a specific index
1043     *
1044     * @param rep The repetition index (0-indexed)
1045     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1046     */
1047    public CE insertProcedureCodeModifier(int rep) throws HL7Exception { 
1048        return (CE) super.insertRepetition(26, rep);
1049    }
1050
1051
1052    /**
1053     * Inserts a repetition of
1054     * FT1-26: "Procedure Code Modifier" at a specific index
1055     *
1056     * @param rep The repetition index (0-indexed)
1057     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1058     */
1059    public CE insertFt126_ProcedureCodeModifier(int rep) throws HL7Exception { 
1060        return (CE) super.insertRepetition(26, rep);
1061    }
1062
1063
1064    /**
1065     * Removes a repetition of
1066     * FT1-26: "Procedure Code Modifier" at a specific index
1067     *
1068     * @param rep The repetition index (0-indexed)
1069     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1070     */
1071    public CE removeProcedureCodeModifier(int rep) throws HL7Exception { 
1072        return (CE) super.removeRepetition(26, rep);
1073    }
1074
1075
1076    /**
1077     * Removes a repetition of
1078     * FT1-26: "Procedure Code Modifier" at a specific index
1079     *
1080     * @param rep The repetition index (0-indexed)
1081     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
1082     */
1083    public CE removeFt126_ProcedureCodeModifier(int rep) throws HL7Exception { 
1084        return (CE) super.removeRepetition(26, rep);
1085    }
1086
1087
1088
1089
1090
1091
1092    /** {@inheritDoc} */   
1093    protected Type createNewTypeWithoutReflection(int field) {
1094       switch (field) {
1095          case 0: return new SI(getMessage());
1096          case 1: return new ST(getMessage());
1097          case 2: return new ST(getMessage());
1098          case 3: return new TS(getMessage());
1099          case 4: return new TS(getMessage());
1100          case 5: return new IS(getMessage(), new Integer( 17 ));
1101          case 6: return new CE(getMessage());
1102          case 7: return new ST(getMessage());
1103          case 8: return new ST(getMessage());
1104          case 9: return new NM(getMessage());
1105          case 10: return new CP(getMessage());
1106          case 11: return new CP(getMessage());
1107          case 12: return new CE(getMessage());
1108          case 13: return new CE(getMessage());
1109          case 14: return new CP(getMessage());
1110          case 15: return new PL(getMessage());
1111          case 16: return new IS(getMessage(), new Integer( 24 ));
1112          case 17: return new IS(getMessage(), new Integer( 18 ));
1113          case 18: return new CE(getMessage());
1114          case 19: return new XCN(getMessage());
1115          case 20: return new XCN(getMessage());
1116          case 21: return new CP(getMessage());
1117          case 22: return new EI(getMessage());
1118          case 23: return new XCN(getMessage());
1119          case 24: return new CE(getMessage());
1120          case 25: return new CE(getMessage());
1121          default: return null;
1122       }
1123   }
1124
1125
1126}
1127