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