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 ILT message segment (Material Lot). 
049 * This segment has the following fields:</p>
050 * <ul>
051     * <li>ILT-1: Set Id - ILT (SI) <b> </b>
052     * <li>ILT-2: Inventory Lot Number (ST) <b> </b>
053     * <li>ILT-3: Inventory Expiration Date (DTM) <b>optional </b>
054     * <li>ILT-4: Inventory Received Date (DTM) <b>optional </b>
055     * <li>ILT-5: Inventory Received Quantity (NM) <b>optional </b>
056     * <li>ILT-6: Inventory Received Quantity Unit (CWE) <b>optional </b>
057     * <li>ILT-7: Inventory Received Item Cost (MO) <b>optional </b>
058     * <li>ILT-8: Inventory On Hand Date (DTM) <b>optional </b>
059     * <li>ILT-9: Inventory On Hand Quantity (NM) <b>optional </b>
060     * <li>ILT-10: Inventory On Hand Quantity Unit (CWE) <b>optional </b>
061 * </ul>
062 */
063@SuppressWarnings("unused")
064public class ILT extends AbstractSegment {
065
066    /** 
067     * Creates a new ILT segment
068     */
069    public ILT(Group parent, ModelClassFactory factory) {
070       super(parent, factory);
071       init(factory);
072    }
073
074    private void init(ModelClassFactory factory) {
075       try {
076                                  this.add(SI.class, true, 1, 4, new Object[]{ getMessage() }, "Set Id - ILT");
077                                  this.add(ST.class, true, 1, 250, new Object[]{ getMessage() }, "Inventory Lot Number");
078                                  this.add(DTM.class, false, 1, 24, new Object[]{ getMessage() }, "Inventory Expiration Date");
079                                  this.add(DTM.class, false, 1, 24, new Object[]{ getMessage() }, "Inventory Received Date");
080                                  this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "Inventory Received Quantity");
081                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Inventory Received Quantity Unit");
082                                  this.add(MO.class, false, 1, 12, new Object[]{ getMessage() }, "Inventory Received Item Cost");
083                                  this.add(DTM.class, false, 1, 24, new Object[]{ getMessage() }, "Inventory On Hand Date");
084                                  this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "Inventory On Hand Quantity");
085                                  this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Inventory On Hand Quantity Unit");
086       } catch(HL7Exception e) {
087          log.error("Unexpected error creating ILT - this is probably a bug in the source code generator.", e);
088       }
089    }
090
091
092
093    /**
094     * Returns
095     * ILT-1: "Set Id - ILT" - creates it if necessary
096     */
097    public SI getSetIdILT() { 
098                SI retVal = this.getTypedField(1, 0);
099                return retVal;
100    }
101    
102    /**
103     * Returns
104     * ILT-1: "Set Id - ILT" - creates it if necessary
105     */
106    public SI getIlt1_SetIdILT() { 
107                SI retVal = this.getTypedField(1, 0);
108                return retVal;
109    }
110
111
112
113    /**
114     * Returns
115     * ILT-2: "Inventory Lot Number" - creates it if necessary
116     */
117    public ST getInventoryLotNumber() { 
118                ST retVal = this.getTypedField(2, 0);
119                return retVal;
120    }
121    
122    /**
123     * Returns
124     * ILT-2: "Inventory Lot Number" - creates it if necessary
125     */
126    public ST getIlt2_InventoryLotNumber() { 
127                ST retVal = this.getTypedField(2, 0);
128                return retVal;
129    }
130
131
132
133    /**
134     * Returns
135     * ILT-3: "Inventory Expiration Date" - creates it if necessary
136     */
137    public DTM getInventoryExpirationDate() { 
138                DTM retVal = this.getTypedField(3, 0);
139                return retVal;
140    }
141    
142    /**
143     * Returns
144     * ILT-3: "Inventory Expiration Date" - creates it if necessary
145     */
146    public DTM getIlt3_InventoryExpirationDate() { 
147                DTM retVal = this.getTypedField(3, 0);
148                return retVal;
149    }
150
151
152
153    /**
154     * Returns
155     * ILT-4: "Inventory Received Date" - creates it if necessary
156     */
157    public DTM getInventoryReceivedDate() { 
158                DTM retVal = this.getTypedField(4, 0);
159                return retVal;
160    }
161    
162    /**
163     * Returns
164     * ILT-4: "Inventory Received Date" - creates it if necessary
165     */
166    public DTM getIlt4_InventoryReceivedDate() { 
167                DTM retVal = this.getTypedField(4, 0);
168                return retVal;
169    }
170
171
172
173    /**
174     * Returns
175     * ILT-5: "Inventory Received Quantity" - creates it if necessary
176     */
177    public NM getInventoryReceivedQuantity() { 
178                NM retVal = this.getTypedField(5, 0);
179                return retVal;
180    }
181    
182    /**
183     * Returns
184     * ILT-5: "Inventory Received Quantity" - creates it if necessary
185     */
186    public NM getIlt5_InventoryReceivedQuantity() { 
187                NM retVal = this.getTypedField(5, 0);
188                return retVal;
189    }
190
191
192
193    /**
194     * Returns
195     * ILT-6: "Inventory Received Quantity Unit" - creates it if necessary
196     */
197    public CWE getInventoryReceivedQuantityUnit() { 
198                CWE retVal = this.getTypedField(6, 0);
199                return retVal;
200    }
201    
202    /**
203     * Returns
204     * ILT-6: "Inventory Received Quantity Unit" - creates it if necessary
205     */
206    public CWE getIlt6_InventoryReceivedQuantityUnit() { 
207                CWE retVal = this.getTypedField(6, 0);
208                return retVal;
209    }
210
211
212
213    /**
214     * Returns
215     * ILT-7: "Inventory Received Item Cost" - creates it if necessary
216     */
217    public MO getInventoryReceivedItemCost() { 
218                MO retVal = this.getTypedField(7, 0);
219                return retVal;
220    }
221    
222    /**
223     * Returns
224     * ILT-7: "Inventory Received Item Cost" - creates it if necessary
225     */
226    public MO getIlt7_InventoryReceivedItemCost() { 
227                MO retVal = this.getTypedField(7, 0);
228                return retVal;
229    }
230
231
232
233    /**
234     * Returns
235     * ILT-8: "Inventory On Hand Date" - creates it if necessary
236     */
237    public DTM getInventoryOnHandDate() { 
238                DTM retVal = this.getTypedField(8, 0);
239                return retVal;
240    }
241    
242    /**
243     * Returns
244     * ILT-8: "Inventory On Hand Date" - creates it if necessary
245     */
246    public DTM getIlt8_InventoryOnHandDate() { 
247                DTM retVal = this.getTypedField(8, 0);
248                return retVal;
249    }
250
251
252
253    /**
254     * Returns
255     * ILT-9: "Inventory On Hand Quantity" - creates it if necessary
256     */
257    public NM getInventoryOnHandQuantity() { 
258                NM retVal = this.getTypedField(9, 0);
259                return retVal;
260    }
261    
262    /**
263     * Returns
264     * ILT-9: "Inventory On Hand Quantity" - creates it if necessary
265     */
266    public NM getIlt9_InventoryOnHandQuantity() { 
267                NM retVal = this.getTypedField(9, 0);
268                return retVal;
269    }
270
271
272
273    /**
274     * Returns
275     * ILT-10: "Inventory On Hand Quantity Unit" - creates it if necessary
276     */
277    public CWE getInventoryOnHandQuantityUnit() { 
278                CWE retVal = this.getTypedField(10, 0);
279                return retVal;
280    }
281    
282    /**
283     * Returns
284     * ILT-10: "Inventory On Hand Quantity Unit" - creates it if necessary
285     */
286    public CWE getIlt10_InventoryOnHandQuantityUnit() { 
287                CWE retVal = this.getTypedField(10, 0);
288                return retVal;
289    }
290
291
292
293
294
295    /** {@inheritDoc} */   
296    protected Type createNewTypeWithoutReflection(int field) {
297       switch (field) {
298          case 0: return new SI(getMessage());
299          case 1: return new ST(getMessage());
300          case 2: return new DTM(getMessage());
301          case 3: return new DTM(getMessage());
302          case 4: return new NM(getMessage());
303          case 5: return new CWE(getMessage());
304          case 6: return new MO(getMessage());
305          case 7: return new DTM(getMessage());
306          case 8: return new NM(getMessage());
307          case 9: return new CWE(getMessage());
308          default: return null;
309       }
310   }
311
312
313}
314