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.v26.segment;
035
036// import ca.uhn.hl7v2.model.v26.group.*;
037import ca.uhn.hl7v2.model.v26.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 ITM message segment (Material Item). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>ITM-1: Item Identifier (EI) <b> </b>
052     * <li>ITM-2: Item Description (ST) <b>optional </b>
053     * <li>ITM-3: Item Status (CWE) <b>optional </b>
054     * <li>ITM-4: Item Type (CWE) <b>optional </b>
055     * <li>ITM-5: Item Category (CWE) <b>optional </b>
056     * <li>ITM-6: Subject to Expiration Indicator (CNE) <b>optional </b>
057     * <li>ITM-7: Manufacturer Identifier (EI) <b>optional </b>
058     * <li>ITM-8: Manufacturer Name (ST) <b>optional </b>
059     * <li>ITM-9: Manufacturer Catalog Number (ST) <b>optional </b>
060     * <li>ITM-10: Manufacturer Labeler Identification Code (CWE) <b>optional </b>
061     * <li>ITM-11: Patient Chargeable Indicator (CNE) <b>optional </b>
062     * <li>ITM-12: Transaction Code (CWE) <b>optional </b>
063     * <li>ITM-13: Transaction amount - unit (CP) <b>optional </b>
064     * <li>ITM-14: Stocked Item Indicator (CNE) <b>optional </b>
065     * <li>ITM-15: Supply Risk Codes (CWE) <b>optional </b>
066     * <li>ITM-16: Approving Regulatory Agency (XON) <b>optional repeating</b>
067     * <li>ITM-17: Latex Indicator (CNE) <b>optional </b>
068     * <li>ITM-18: Ruling Act (CWE) <b>optional repeating</b>
069     * <li>ITM-19: Item Natural Account Code (IS) <b>optional </b>
070     * <li>ITM-20: Approved To Buy Quantity (NM) <b>optional </b>
071     * <li>ITM-21: Approved To Buy Price (MO) <b>optional </b>
072     * <li>ITM-22: Taxable Item Indicator (CNE) <b>optional </b>
073     * <li>ITM-23: Freight Charge Indicator (CNE) <b>optional </b>
074     * <li>ITM-24: Item Set Indicator (CNE) <b>optional </b>
075     * <li>ITM-25: Item Set Identifier (EI) <b>optional </b>
076     * <li>ITM-26: Track Department Usage Indicator (CNE) <b>optional </b>
077     * <li>ITM-27: Procedure Code (CNE) <b>optional </b>
078     * <li>ITM-28: Procedure Code Modifier (CNE) <b>optional repeating</b>
079     * <li>ITM-29: Special Handling Code (CWE) <b>optional </b>
080 * </ul>
081 */
082@SuppressWarnings("unused")
083public class ITM extends AbstractSegment {
084
085    /** 
086     * Creates a new ITM segment
087     */
088    public ITM(Group parent, ModelClassFactory factory) {
089       super(parent, factory);
090       init(factory);
091    }
092
093    private void init(ModelClassFactory factory) {
094       try {
095                                  this.add(EI.class, true, 1, 250, new Object[]{ getMessage() }, "Item Identifier");
096                                  this.add(ST.class, false, 1, 999, new Object[]{ getMessage() }, "Item Description");
097                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Item Status");
098                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Item Type");
099                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Item Category");
100                                  this.add(CNE.class, false, 1, 4, new Object[]{ getMessage() }, "Subject to Expiration Indicator");
101                                  this.add(EI.class, false, 1, 250, new Object[]{ getMessage() }, "Manufacturer Identifier");
102                                  this.add(ST.class, false, 1, 999, new Object[]{ getMessage() }, "Manufacturer Name");
103                                  this.add(ST.class, false, 1, 20, new Object[]{ getMessage() }, "Manufacturer Catalog Number");
104                                  this.add(CWE.class, false, 1, 4, new Object[]{ getMessage() }, "Manufacturer Labeler Identification Code");
105                                  this.add(CNE.class, false, 1, 4, new Object[]{ getMessage() }, "Patient Chargeable Indicator");
106                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Transaction Code");
107                                  this.add(CP.class, false, 1, 12, new Object[]{ getMessage() }, "Transaction amount - unit");
108                                  this.add(CNE.class, false, 1, 4, new Object[]{ getMessage() }, "Stocked Item Indicator");
109                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Supply Risk Codes");
110                                  this.add(XON.class, false, 0, 250, new Object[]{ getMessage() }, "Approving Regulatory Agency");
111                                  this.add(CNE.class, false, 1, 4, new Object[]{ getMessage() }, "Latex Indicator");
112                                  this.add(CWE.class, false, 0, 250, new Object[]{ getMessage() }, "Ruling Act");
113                                              this.add(IS.class, false, 1, 30, new Object[]{ getMessage(), new Integer(320) }, "Item Natural Account Code");
114                                  this.add(NM.class, false, 1, 6, new Object[]{ getMessage() }, "Approved To Buy Quantity");
115                                  this.add(MO.class, false, 1, 10, new Object[]{ getMessage() }, "Approved To Buy Price");
116                                  this.add(CNE.class, false, 1, 4, new Object[]{ getMessage() }, "Taxable Item Indicator");
117                                  this.add(CNE.class, false, 1, 4, new Object[]{ getMessage() }, "Freight Charge Indicator");
118                                  this.add(CNE.class, false, 1, 4, new Object[]{ getMessage() }, "Item Set Indicator");
119                                  this.add(EI.class, false, 1, 250, new Object[]{ getMessage() }, "Item Set Identifier");
120                                  this.add(CNE.class, false, 1, 4, new Object[]{ getMessage() }, "Track Department Usage Indicator");
121                                  this.add(CNE.class, false, 1, 705, new Object[]{ getMessage() }, "Procedure Code");
122                                  this.add(CNE.class, false, 0, 705, new Object[]{ getMessage() }, "Procedure Code Modifier");
123                                  this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Special Handling Code");
124       } catch(HL7Exception e) {
125          log.error("Unexpected error creating ITM - this is probably a bug in the source code generator.", e);
126       }
127    }
128
129
130
131    /**
132     * Returns
133     * ITM-1: "Item Identifier" - creates it if necessary
134     */
135    public EI getItemIdentifier() { 
136                EI retVal = this.getTypedField(1, 0);
137                return retVal;
138    }
139    
140    /**
141     * Returns
142     * ITM-1: "Item Identifier" - creates it if necessary
143     */
144    public EI getItm1_ItemIdentifier() { 
145                EI retVal = this.getTypedField(1, 0);
146                return retVal;
147    }
148
149
150
151    /**
152     * Returns
153     * ITM-2: "Item Description" - creates it if necessary
154     */
155    public ST getItemDescription() { 
156                ST retVal = this.getTypedField(2, 0);
157                return retVal;
158    }
159    
160    /**
161     * Returns
162     * ITM-2: "Item Description" - creates it if necessary
163     */
164    public ST getItm2_ItemDescription() { 
165                ST retVal = this.getTypedField(2, 0);
166                return retVal;
167    }
168
169
170
171    /**
172     * Returns
173     * ITM-3: "Item Status" - creates it if necessary
174     */
175    public CWE getItemStatus() { 
176                CWE retVal = this.getTypedField(3, 0);
177                return retVal;
178    }
179    
180    /**
181     * Returns
182     * ITM-3: "Item Status" - creates it if necessary
183     */
184    public CWE getItm3_ItemStatus() { 
185                CWE retVal = this.getTypedField(3, 0);
186                return retVal;
187    }
188
189
190
191    /**
192     * Returns
193     * ITM-4: "Item Type" - creates it if necessary
194     */
195    public CWE getItemType() { 
196                CWE retVal = this.getTypedField(4, 0);
197                return retVal;
198    }
199    
200    /**
201     * Returns
202     * ITM-4: "Item Type" - creates it if necessary
203     */
204    public CWE getItm4_ItemType() { 
205                CWE retVal = this.getTypedField(4, 0);
206                return retVal;
207    }
208
209
210
211    /**
212     * Returns
213     * ITM-5: "Item Category" - creates it if necessary
214     */
215    public CWE getItemCategory() { 
216                CWE retVal = this.getTypedField(5, 0);
217                return retVal;
218    }
219    
220    /**
221     * Returns
222     * ITM-5: "Item Category" - creates it if necessary
223     */
224    public CWE getItm5_ItemCategory() { 
225                CWE retVal = this.getTypedField(5, 0);
226                return retVal;
227    }
228
229
230
231    /**
232     * Returns
233     * ITM-6: "Subject to Expiration Indicator" - creates it if necessary
234     */
235    public CNE getSubjectToExpirationIndicator() { 
236                CNE retVal = this.getTypedField(6, 0);
237                return retVal;
238    }
239    
240    /**
241     * Returns
242     * ITM-6: "Subject to Expiration Indicator" - creates it if necessary
243     */
244    public CNE getItm6_SubjectToExpirationIndicator() { 
245                CNE retVal = this.getTypedField(6, 0);
246                return retVal;
247    }
248
249
250
251    /**
252     * Returns
253     * ITM-7: "Manufacturer Identifier" - creates it if necessary
254     */
255    public EI getManufacturerIdentifier() { 
256                EI retVal = this.getTypedField(7, 0);
257                return retVal;
258    }
259    
260    /**
261     * Returns
262     * ITM-7: "Manufacturer Identifier" - creates it if necessary
263     */
264    public EI getItm7_ManufacturerIdentifier() { 
265                EI retVal = this.getTypedField(7, 0);
266                return retVal;
267    }
268
269
270
271    /**
272     * Returns
273     * ITM-8: "Manufacturer Name" - creates it if necessary
274     */
275    public ST getManufacturerName() { 
276                ST retVal = this.getTypedField(8, 0);
277                return retVal;
278    }
279    
280    /**
281     * Returns
282     * ITM-8: "Manufacturer Name" - creates it if necessary
283     */
284    public ST getItm8_ManufacturerName() { 
285                ST retVal = this.getTypedField(8, 0);
286                return retVal;
287    }
288
289
290
291    /**
292     * Returns
293     * ITM-9: "Manufacturer Catalog Number" - creates it if necessary
294     */
295    public ST getManufacturerCatalogNumber() { 
296                ST retVal = this.getTypedField(9, 0);
297                return retVal;
298    }
299    
300    /**
301     * Returns
302     * ITM-9: "Manufacturer Catalog Number" - creates it if necessary
303     */
304    public ST getItm9_ManufacturerCatalogNumber() { 
305                ST retVal = this.getTypedField(9, 0);
306                return retVal;
307    }
308
309
310
311    /**
312     * Returns
313     * ITM-10: "Manufacturer Labeler Identification Code" - creates it if necessary
314     */
315    public CWE getManufacturerLabelerIdentificationCode() { 
316                CWE retVal = this.getTypedField(10, 0);
317                return retVal;
318    }
319    
320    /**
321     * Returns
322     * ITM-10: "Manufacturer Labeler Identification Code" - creates it if necessary
323     */
324    public CWE getItm10_ManufacturerLabelerIdentificationCode() { 
325                CWE retVal = this.getTypedField(10, 0);
326                return retVal;
327    }
328
329
330
331    /**
332     * Returns
333     * ITM-11: "Patient Chargeable Indicator" - creates it if necessary
334     */
335    public CNE getPatientChargeableIndicator() { 
336                CNE retVal = this.getTypedField(11, 0);
337                return retVal;
338    }
339    
340    /**
341     * Returns
342     * ITM-11: "Patient Chargeable Indicator" - creates it if necessary
343     */
344    public CNE getItm11_PatientChargeableIndicator() { 
345                CNE retVal = this.getTypedField(11, 0);
346                return retVal;
347    }
348
349
350
351    /**
352     * Returns
353     * ITM-12: "Transaction Code" - creates it if necessary
354     */
355    public CWE getTransactionCode() { 
356                CWE retVal = this.getTypedField(12, 0);
357                return retVal;
358    }
359    
360    /**
361     * Returns
362     * ITM-12: "Transaction Code" - creates it if necessary
363     */
364    public CWE getItm12_TransactionCode() { 
365                CWE retVal = this.getTypedField(12, 0);
366                return retVal;
367    }
368
369
370
371    /**
372     * Returns
373     * ITM-13: "Transaction amount - unit" - creates it if necessary
374     */
375    public CP getTransactionAmountUnit() { 
376                CP retVal = this.getTypedField(13, 0);
377                return retVal;
378    }
379    
380    /**
381     * Returns
382     * ITM-13: "Transaction amount - unit" - creates it if necessary
383     */
384    public CP getItm13_TransactionAmountUnit() { 
385                CP retVal = this.getTypedField(13, 0);
386                return retVal;
387    }
388
389
390
391    /**
392     * Returns
393     * ITM-14: "Stocked Item Indicator" - creates it if necessary
394     */
395    public CNE getStockedItemIndicator() { 
396                CNE retVal = this.getTypedField(14, 0);
397                return retVal;
398    }
399    
400    /**
401     * Returns
402     * ITM-14: "Stocked Item Indicator" - creates it if necessary
403     */
404    public CNE getItm14_StockedItemIndicator() { 
405                CNE retVal = this.getTypedField(14, 0);
406                return retVal;
407    }
408
409
410
411    /**
412     * Returns
413     * ITM-15: "Supply Risk Codes" - creates it if necessary
414     */
415    public CWE getSupplyRiskCodes() { 
416                CWE retVal = this.getTypedField(15, 0);
417                return retVal;
418    }
419    
420    /**
421     * Returns
422     * ITM-15: "Supply Risk Codes" - creates it if necessary
423     */
424    public CWE getItm15_SupplyRiskCodes() { 
425                CWE retVal = this.getTypedField(15, 0);
426                return retVal;
427    }
428
429
430    /**
431     * Returns all repetitions of Approving Regulatory Agency (ITM-16).
432     */
433    public XON[] getApprovingRegulatoryAgency() {
434        XON[] retVal = this.getTypedField(16, new XON[0]);
435        return retVal;
436    }
437
438
439    /**
440     * Returns all repetitions of Approving Regulatory Agency (ITM-16).
441     */
442    public XON[] getItm16_ApprovingRegulatoryAgency() {
443        XON[] retVal = this.getTypedField(16, new XON[0]);
444        return retVal;
445    }
446
447
448    /**
449     * Returns a count of the current number of repetitions of Approving Regulatory Agency (ITM-16).
450     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
451     * it will return zero.
452     */
453    public int getApprovingRegulatoryAgencyReps() {
454        return this.getReps(16);
455    }
456
457
458    /**
459     * Returns a specific repetition of
460     * ITM-16: "Approving Regulatory Agency" - creates it if necessary
461     *
462     * @param rep The repetition index (0-indexed)
463     */
464    public XON getApprovingRegulatoryAgency(int rep) { 
465                XON retVal = this.getTypedField(16, rep);
466                return retVal;
467    }
468
469    /**
470     * Returns a specific repetition of
471     * ITM-16: "Approving Regulatory Agency" - creates it if necessary
472     *
473     * @param rep The repetition index (0-indexed)
474     */
475    public XON getItm16_ApprovingRegulatoryAgency(int rep) { 
476                XON retVal = this.getTypedField(16, rep);
477                return retVal;
478    }
479
480    /**
481     * Returns a count of the current number of repetitions of Approving Regulatory Agency (ITM-16).
482     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
483     * it will return zero.
484     */
485    public int getItm16_ApprovingRegulatoryAgencyReps() {
486        return this.getReps(16);
487    }
488
489
490    /**
491     * Inserts a repetition of
492     * ITM-16: "Approving Regulatory Agency" at a specific index
493     *
494     * @param rep The repetition index (0-indexed)
495     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
496     */
497    public XON insertApprovingRegulatoryAgency(int rep) throws HL7Exception { 
498        return (XON) super.insertRepetition(16, rep);
499    }
500
501
502    /**
503     * Inserts a repetition of
504     * ITM-16: "Approving Regulatory Agency" at a specific index
505     *
506     * @param rep The repetition index (0-indexed)
507     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
508     */
509    public XON insertItm16_ApprovingRegulatoryAgency(int rep) throws HL7Exception { 
510        return (XON) super.insertRepetition(16, rep);
511    }
512
513
514    /**
515     * Removes a repetition of
516     * ITM-16: "Approving Regulatory Agency" at a specific index
517     *
518     * @param rep The repetition index (0-indexed)
519     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
520     */
521    public XON removeApprovingRegulatoryAgency(int rep) throws HL7Exception { 
522        return (XON) super.removeRepetition(16, rep);
523    }
524
525
526    /**
527     * Removes a repetition of
528     * ITM-16: "Approving Regulatory Agency" at a specific index
529     *
530     * @param rep The repetition index (0-indexed)
531     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
532     */
533    public XON removeItm16_ApprovingRegulatoryAgency(int rep) throws HL7Exception { 
534        return (XON) super.removeRepetition(16, rep);
535    }
536
537
538
539
540    /**
541     * Returns
542     * ITM-17: "Latex Indicator" - creates it if necessary
543     */
544    public CNE getLatexIndicator() { 
545                CNE retVal = this.getTypedField(17, 0);
546                return retVal;
547    }
548    
549    /**
550     * Returns
551     * ITM-17: "Latex Indicator" - creates it if necessary
552     */
553    public CNE getItm17_LatexIndicator() { 
554                CNE retVal = this.getTypedField(17, 0);
555                return retVal;
556    }
557
558
559    /**
560     * Returns all repetitions of Ruling Act (ITM-18).
561     */
562    public CWE[] getRulingAct() {
563        CWE[] retVal = this.getTypedField(18, new CWE[0]);
564        return retVal;
565    }
566
567
568    /**
569     * Returns all repetitions of Ruling Act (ITM-18).
570     */
571    public CWE[] getItm18_RulingAct() {
572        CWE[] retVal = this.getTypedField(18, new CWE[0]);
573        return retVal;
574    }
575
576
577    /**
578     * Returns a count of the current number of repetitions of Ruling Act (ITM-18).
579     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
580     * it will return zero.
581     */
582    public int getRulingActReps() {
583        return this.getReps(18);
584    }
585
586
587    /**
588     * Returns a specific repetition of
589     * ITM-18: "Ruling Act" - creates it if necessary
590     *
591     * @param rep The repetition index (0-indexed)
592     */
593    public CWE getRulingAct(int rep) { 
594                CWE retVal = this.getTypedField(18, rep);
595                return retVal;
596    }
597
598    /**
599     * Returns a specific repetition of
600     * ITM-18: "Ruling Act" - creates it if necessary
601     *
602     * @param rep The repetition index (0-indexed)
603     */
604    public CWE getItm18_RulingAct(int rep) { 
605                CWE retVal = this.getTypedField(18, rep);
606                return retVal;
607    }
608
609    /**
610     * Returns a count of the current number of repetitions of Ruling Act (ITM-18).
611     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
612     * it will return zero.
613     */
614    public int getItm18_RulingActReps() {
615        return this.getReps(18);
616    }
617
618
619    /**
620     * Inserts a repetition of
621     * ITM-18: "Ruling Act" at a specific index
622     *
623     * @param rep The repetition index (0-indexed)
624     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
625     */
626    public CWE insertRulingAct(int rep) throws HL7Exception { 
627        return (CWE) super.insertRepetition(18, rep);
628    }
629
630
631    /**
632     * Inserts a repetition of
633     * ITM-18: "Ruling Act" at a specific index
634     *
635     * @param rep The repetition index (0-indexed)
636     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
637     */
638    public CWE insertItm18_RulingAct(int rep) throws HL7Exception { 
639        return (CWE) super.insertRepetition(18, rep);
640    }
641
642
643    /**
644     * Removes a repetition of
645     * ITM-18: "Ruling Act" at a specific index
646     *
647     * @param rep The repetition index (0-indexed)
648     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
649     */
650    public CWE removeRulingAct(int rep) throws HL7Exception { 
651        return (CWE) super.removeRepetition(18, rep);
652    }
653
654
655    /**
656     * Removes a repetition of
657     * ITM-18: "Ruling Act" at a specific index
658     *
659     * @param rep The repetition index (0-indexed)
660     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
661     */
662    public CWE removeItm18_RulingAct(int rep) throws HL7Exception { 
663        return (CWE) super.removeRepetition(18, rep);
664    }
665
666
667
668
669    /**
670     * Returns
671     * ITM-19: "Item Natural Account Code" - creates it if necessary
672     */
673    public IS getItemNaturalAccountCode() { 
674                IS retVal = this.getTypedField(19, 0);
675                return retVal;
676    }
677    
678    /**
679     * Returns
680     * ITM-19: "Item Natural Account Code" - creates it if necessary
681     */
682    public IS getItm19_ItemNaturalAccountCode() { 
683                IS retVal = this.getTypedField(19, 0);
684                return retVal;
685    }
686
687
688
689    /**
690     * Returns
691     * ITM-20: "Approved To Buy Quantity" - creates it if necessary
692     */
693    public NM getApprovedToBuyQuantity() { 
694                NM retVal = this.getTypedField(20, 0);
695                return retVal;
696    }
697    
698    /**
699     * Returns
700     * ITM-20: "Approved To Buy Quantity" - creates it if necessary
701     */
702    public NM getItm20_ApprovedToBuyQuantity() { 
703                NM retVal = this.getTypedField(20, 0);
704                return retVal;
705    }
706
707
708
709    /**
710     * Returns
711     * ITM-21: "Approved To Buy Price" - creates it if necessary
712     */
713    public MO getApprovedToBuyPrice() { 
714                MO retVal = this.getTypedField(21, 0);
715                return retVal;
716    }
717    
718    /**
719     * Returns
720     * ITM-21: "Approved To Buy Price" - creates it if necessary
721     */
722    public MO getItm21_ApprovedToBuyPrice() { 
723                MO retVal = this.getTypedField(21, 0);
724                return retVal;
725    }
726
727
728
729    /**
730     * Returns
731     * ITM-22: "Taxable Item Indicator" - creates it if necessary
732     */
733    public CNE getTaxableItemIndicator() { 
734                CNE retVal = this.getTypedField(22, 0);
735                return retVal;
736    }
737    
738    /**
739     * Returns
740     * ITM-22: "Taxable Item Indicator" - creates it if necessary
741     */
742    public CNE getItm22_TaxableItemIndicator() { 
743                CNE retVal = this.getTypedField(22, 0);
744                return retVal;
745    }
746
747
748
749    /**
750     * Returns
751     * ITM-23: "Freight Charge Indicator" - creates it if necessary
752     */
753    public CNE getFreightChargeIndicator() { 
754                CNE retVal = this.getTypedField(23, 0);
755                return retVal;
756    }
757    
758    /**
759     * Returns
760     * ITM-23: "Freight Charge Indicator" - creates it if necessary
761     */
762    public CNE getItm23_FreightChargeIndicator() { 
763                CNE retVal = this.getTypedField(23, 0);
764                return retVal;
765    }
766
767
768
769    /**
770     * Returns
771     * ITM-24: "Item Set Indicator" - creates it if necessary
772     */
773    public CNE getItemSetIndicator() { 
774                CNE retVal = this.getTypedField(24, 0);
775                return retVal;
776    }
777    
778    /**
779     * Returns
780     * ITM-24: "Item Set Indicator" - creates it if necessary
781     */
782    public CNE getItm24_ItemSetIndicator() { 
783                CNE retVal = this.getTypedField(24, 0);
784                return retVal;
785    }
786
787
788
789    /**
790     * Returns
791     * ITM-25: "Item Set Identifier" - creates it if necessary
792     */
793    public EI getItemSetIdentifier() { 
794                EI retVal = this.getTypedField(25, 0);
795                return retVal;
796    }
797    
798    /**
799     * Returns
800     * ITM-25: "Item Set Identifier" - creates it if necessary
801     */
802    public EI getItm25_ItemSetIdentifier() { 
803                EI retVal = this.getTypedField(25, 0);
804                return retVal;
805    }
806
807
808
809    /**
810     * Returns
811     * ITM-26: "Track Department Usage Indicator" - creates it if necessary
812     */
813    public CNE getTrackDepartmentUsageIndicator() { 
814                CNE retVal = this.getTypedField(26, 0);
815                return retVal;
816    }
817    
818    /**
819     * Returns
820     * ITM-26: "Track Department Usage Indicator" - creates it if necessary
821     */
822    public CNE getItm26_TrackDepartmentUsageIndicator() { 
823                CNE retVal = this.getTypedField(26, 0);
824                return retVal;
825    }
826
827
828
829    /**
830     * Returns
831     * ITM-27: "Procedure Code" - creates it if necessary
832     */
833    public CNE getProcedureCode() { 
834                CNE retVal = this.getTypedField(27, 0);
835                return retVal;
836    }
837    
838    /**
839     * Returns
840     * ITM-27: "Procedure Code" - creates it if necessary
841     */
842    public CNE getItm27_ProcedureCode() { 
843                CNE retVal = this.getTypedField(27, 0);
844                return retVal;
845    }
846
847
848    /**
849     * Returns all repetitions of Procedure Code Modifier (ITM-28).
850     */
851    public CNE[] getProcedureCodeModifier() {
852        CNE[] retVal = this.getTypedField(28, new CNE[0]);
853        return retVal;
854    }
855
856
857    /**
858     * Returns all repetitions of Procedure Code Modifier (ITM-28).
859     */
860    public CNE[] getItm28_ProcedureCodeModifier() {
861        CNE[] retVal = this.getTypedField(28, new CNE[0]);
862        return retVal;
863    }
864
865
866    /**
867     * Returns a count of the current number of repetitions of Procedure Code Modifier (ITM-28).
868     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
869     * it will return zero.
870     */
871    public int getProcedureCodeModifierReps() {
872        return this.getReps(28);
873    }
874
875
876    /**
877     * Returns a specific repetition of
878     * ITM-28: "Procedure Code Modifier" - creates it if necessary
879     *
880     * @param rep The repetition index (0-indexed)
881     */
882    public CNE getProcedureCodeModifier(int rep) { 
883                CNE retVal = this.getTypedField(28, rep);
884                return retVal;
885    }
886
887    /**
888     * Returns a specific repetition of
889     * ITM-28: "Procedure Code Modifier" - creates it if necessary
890     *
891     * @param rep The repetition index (0-indexed)
892     */
893    public CNE getItm28_ProcedureCodeModifier(int rep) { 
894                CNE retVal = this.getTypedField(28, rep);
895                return retVal;
896    }
897
898    /**
899     * Returns a count of the current number of repetitions of Procedure Code Modifier (ITM-28).
900     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
901     * it will return zero.
902     */
903    public int getItm28_ProcedureCodeModifierReps() {
904        return this.getReps(28);
905    }
906
907
908    /**
909     * Inserts a repetition of
910     * ITM-28: "Procedure Code Modifier" at a specific index
911     *
912     * @param rep The repetition index (0-indexed)
913     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
914     */
915    public CNE insertProcedureCodeModifier(int rep) throws HL7Exception { 
916        return (CNE) super.insertRepetition(28, rep);
917    }
918
919
920    /**
921     * Inserts a repetition of
922     * ITM-28: "Procedure Code Modifier" at a specific index
923     *
924     * @param rep The repetition index (0-indexed)
925     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
926     */
927    public CNE insertItm28_ProcedureCodeModifier(int rep) throws HL7Exception { 
928        return (CNE) super.insertRepetition(28, rep);
929    }
930
931
932    /**
933     * Removes a repetition of
934     * ITM-28: "Procedure Code Modifier" at a specific index
935     *
936     * @param rep The repetition index (0-indexed)
937     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
938     */
939    public CNE removeProcedureCodeModifier(int rep) throws HL7Exception { 
940        return (CNE) super.removeRepetition(28, rep);
941    }
942
943
944    /**
945     * Removes a repetition of
946     * ITM-28: "Procedure Code Modifier" at a specific index
947     *
948     * @param rep The repetition index (0-indexed)
949     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
950     */
951    public CNE removeItm28_ProcedureCodeModifier(int rep) throws HL7Exception { 
952        return (CNE) super.removeRepetition(28, rep);
953    }
954
955
956
957
958    /**
959     * Returns
960     * ITM-29: "Special Handling Code" - creates it if necessary
961     */
962    public CWE getSpecialHandlingCode() { 
963                CWE retVal = this.getTypedField(29, 0);
964                return retVal;
965    }
966    
967    /**
968     * Returns
969     * ITM-29: "Special Handling Code" - creates it if necessary
970     */
971    public CWE getItm29_SpecialHandlingCode() { 
972                CWE retVal = this.getTypedField(29, 0);
973                return retVal;
974    }
975
976
977
978
979
980    /** {@inheritDoc} */   
981    protected Type createNewTypeWithoutReflection(int field) {
982       switch (field) {
983          case 0: return new EI(getMessage());
984          case 1: return new ST(getMessage());
985          case 2: return new CWE(getMessage());
986          case 3: return new CWE(getMessage());
987          case 4: return new CWE(getMessage());
988          case 5: return new CNE(getMessage());
989          case 6: return new EI(getMessage());
990          case 7: return new ST(getMessage());
991          case 8: return new ST(getMessage());
992          case 9: return new CWE(getMessage());
993          case 10: return new CNE(getMessage());
994          case 11: return new CWE(getMessage());
995          case 12: return new CP(getMessage());
996          case 13: return new CNE(getMessage());
997          case 14: return new CWE(getMessage());
998          case 15: return new XON(getMessage());
999          case 16: return new CNE(getMessage());
1000          case 17: return new CWE(getMessage());
1001          case 18: return new IS(getMessage(), new Integer( 320 ));
1002          case 19: return new NM(getMessage());
1003          case 20: return new MO(getMessage());
1004          case 21: return new CNE(getMessage());
1005          case 22: return new CNE(getMessage());
1006          case 23: return new CNE(getMessage());
1007          case 24: return new EI(getMessage());
1008          case 25: return new CNE(getMessage());
1009          case 26: return new CNE(getMessage());
1010          case 27: return new CNE(getMessage());
1011          case 28: return new CWE(getMessage());
1012          default: return null;
1013       }
1014   }
1015
1016
1017}
1018