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