View Javadoc
1   /*
2    * This class is an auto-generated source file for a HAPI
3    * HL7 v2.x standard structure class.
4    *
5    * For more information, visit: http://hl7api.sourceforge.net/
6    * 
7    * The contents of this file are subject to the Mozilla Public License Version 1.1 
8    * (the "License"); you may not use this file except in compliance with the License. 
9    * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
10   * Software distributed under the License is distributed on an "AS IS" basis, 
11   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
12   * specific language governing rights and limitations under the License. 
13   * 
14   * The Original Code is "[file_name]".  Description: 
15   * "[one_line_description]" 
16   * 
17   * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
18   * 2012.  All Rights Reserved. 
19   * 
20   * Contributor(s): ______________________________________. 
21   * 
22   * Alternatively, the contents of this file may be used under the terms of the 
23   * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
24   * applicable instead of those above.  If you wish to allow use of your version of this 
25   * file only under the terms of the GPL and not to allow others to use your version 
26   * of this file under the MPL, indicate your decision by deleting  the provisions above 
27   * and replace  them with the notice and other provisions required by the GPL License.  
28   * If you do not delete the provisions above, a recipient may use your version of 
29   * this file under either the MPL or the GPL. 
30   * 
31   */
32  
33  
34  package ca.uhn.hl7v2.model.v251.segment;
35  
36  // import ca.uhn.hl7v2.model.v251.group.*;
37  import ca.uhn.hl7v2.model.v251.datatype.*;
38  import ca.uhn.hl7v2.HL7Exception;
39  import ca.uhn.hl7v2.parser.ModelClassFactory;
40  import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
41  import ca.uhn.hl7v2.model.AbstractMessage;
42  import ca.uhn.hl7v2.model.Group;
43  import ca.uhn.hl7v2.model.Type;
44  import ca.uhn.hl7v2.model.AbstractSegment;
45  import ca.uhn.hl7v2.model.Varies;
46  
47  
48  /**
49   *<p>Represents an HL7 TCC message segment (Test Code Configuration). 
50   * This segment has the following fields:</p>
51   * <ul>
52       * <li>TCC-1: Universal Service Identifier (CE) <b> </b>
53       * <li>TCC-2: Test Application Identifier (EI) <b> </b>
54       * <li>TCC-3: Specimen Source (SPS) <b>optional </b>
55       * <li>TCC-4: Auto-Dilution Factor Default (SN) <b>optional </b>
56       * <li>TCC-5: Rerun Dilution Factor Default (SN) <b>optional </b>
57       * <li>TCC-6: Pre-Dilution Factor Default (SN) <b>optional </b>
58       * <li>TCC-7: Endogenous Content of Pre-Dilution Diluent (SN) <b>optional </b>
59       * <li>TCC-8: Inventory Limits Warning Level (NM) <b>optional </b>
60       * <li>TCC-9: Automatic Rerun Allowed (ID) <b>optional </b>
61       * <li>TCC-10: Automatic Repeat Allowed (ID) <b>optional </b>
62       * <li>TCC-11: Automatic Reflex Allowed (ID) <b>optional </b>
63       * <li>TCC-12: Equipment Dynamic Range (SN) <b>optional </b>
64       * <li>TCC-13: Units (CE) <b>optional </b>
65       * <li>TCC-14: Processing Type (CE) <b>optional </b>
66   * </ul>
67   */
68  @SuppressWarnings("unused")
69  public class TCC extends AbstractSegment {
70  
71      /** 
72       * Creates a new TCC segment
73       */
74      public TCC(Group parent, ModelClassFactory factory) {
75         super(parent, factory);
76         init(factory);
77      }
78  
79      private void init(ModelClassFactory factory) {
80         try {
81                                    this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Universal Service Identifier");
82                                    this.add(EI.class, true, 1, 80, new Object[]{ getMessage() }, "Test Application Identifier");
83                                    this.add(SPS.class, false, 1, 300, new Object[]{ getMessage() }, "Specimen Source");
84                                    this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Auto-Dilution Factor Default");
85                                    this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Rerun Dilution Factor Default");
86                                    this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Pre-Dilution Factor Default");
87                                    this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Endogenous Content of Pre-Dilution Diluent");
88                                    this.add(NM.class, false, 1, 10, new Object[]{ getMessage() }, "Inventory Limits Warning Level");
89                                                this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Automatic Rerun Allowed");
90                                                this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Automatic Repeat Allowed");
91                                                this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Automatic Reflex Allowed");
92                                    this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Equipment Dynamic Range");
93                                    this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Units");
94                                    this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Processing Type");
95         } catch(HL7Exception e) {
96            log.error("Unexpected error creating TCC - this is probably a bug in the source code generator.", e);
97         }
98      }
99  
100 
101 
102     /**
103      * Returns
104      * TCC-1: "Universal Service Identifier" - creates it if necessary
105      */
106     public CE getUniversalServiceIdentifier() { 
107 		CE retVal = this.getTypedField(1, 0);
108 		return retVal;
109     }
110     
111     /**
112      * Returns
113      * TCC-1: "Universal Service Identifier" - creates it if necessary
114      */
115     public CE getTcc1_UniversalServiceIdentifier() { 
116 		CE retVal = this.getTypedField(1, 0);
117 		return retVal;
118     }
119 
120 
121 
122     /**
123      * Returns
124      * TCC-2: "Test Application Identifier" - creates it if necessary
125      */
126     public EI getTestApplicationIdentifier() { 
127 		EI retVal = this.getTypedField(2, 0);
128 		return retVal;
129     }
130     
131     /**
132      * Returns
133      * TCC-2: "Test Application Identifier" - creates it if necessary
134      */
135     public EI getTcc2_TestApplicationIdentifier() { 
136 		EI retVal = this.getTypedField(2, 0);
137 		return retVal;
138     }
139 
140 
141 
142     /**
143      * Returns
144      * TCC-3: "Specimen Source" - creates it if necessary
145      */
146     public SPS getSpecimenSource() { 
147 		SPS retVal = this.getTypedField(3, 0);
148 		return retVal;
149     }
150     
151     /**
152      * Returns
153      * TCC-3: "Specimen Source" - creates it if necessary
154      */
155     public SPS getTcc3_SpecimenSource() { 
156 		SPS retVal = this.getTypedField(3, 0);
157 		return retVal;
158     }
159 
160 
161 
162     /**
163      * Returns
164      * TCC-4: "Auto-Dilution Factor Default" - creates it if necessary
165      */
166     public SN getAutoDilutionFactorDefault() { 
167 		SN retVal = this.getTypedField(4, 0);
168 		return retVal;
169     }
170     
171     /**
172      * Returns
173      * TCC-4: "Auto-Dilution Factor Default" - creates it if necessary
174      */
175     public SN getTcc4_AutoDilutionFactorDefault() { 
176 		SN retVal = this.getTypedField(4, 0);
177 		return retVal;
178     }
179 
180 
181 
182     /**
183      * Returns
184      * TCC-5: "Rerun Dilution Factor Default" - creates it if necessary
185      */
186     public SN getRerunDilutionFactorDefault() { 
187 		SN retVal = this.getTypedField(5, 0);
188 		return retVal;
189     }
190     
191     /**
192      * Returns
193      * TCC-5: "Rerun Dilution Factor Default" - creates it if necessary
194      */
195     public SN getTcc5_RerunDilutionFactorDefault() { 
196 		SN retVal = this.getTypedField(5, 0);
197 		return retVal;
198     }
199 
200 
201 
202     /**
203      * Returns
204      * TCC-6: "Pre-Dilution Factor Default" - creates it if necessary
205      */
206     public SN getPreDilutionFactorDefault() { 
207 		SN retVal = this.getTypedField(6, 0);
208 		return retVal;
209     }
210     
211     /**
212      * Returns
213      * TCC-6: "Pre-Dilution Factor Default" - creates it if necessary
214      */
215     public SN getTcc6_PreDilutionFactorDefault() { 
216 		SN retVal = this.getTypedField(6, 0);
217 		return retVal;
218     }
219 
220 
221 
222     /**
223      * Returns
224      * TCC-7: "Endogenous Content of Pre-Dilution Diluent" - creates it if necessary
225      */
226     public SN getEndogenousContentOfPreDilutionDiluent() { 
227 		SN retVal = this.getTypedField(7, 0);
228 		return retVal;
229     }
230     
231     /**
232      * Returns
233      * TCC-7: "Endogenous Content of Pre-Dilution Diluent" - creates it if necessary
234      */
235     public SN getTcc7_EndogenousContentOfPreDilutionDiluent() { 
236 		SN retVal = this.getTypedField(7, 0);
237 		return retVal;
238     }
239 
240 
241 
242     /**
243      * Returns
244      * TCC-8: "Inventory Limits Warning Level" - creates it if necessary
245      */
246     public NM getInventoryLimitsWarningLevel() { 
247 		NM retVal = this.getTypedField(8, 0);
248 		return retVal;
249     }
250     
251     /**
252      * Returns
253      * TCC-8: "Inventory Limits Warning Level" - creates it if necessary
254      */
255     public NM getTcc8_InventoryLimitsWarningLevel() { 
256 		NM retVal = this.getTypedField(8, 0);
257 		return retVal;
258     }
259 
260 
261 
262     /**
263      * Returns
264      * TCC-9: "Automatic Rerun Allowed" - creates it if necessary
265      */
266     public ID getAutomaticRerunAllowed() { 
267 		ID retVal = this.getTypedField(9, 0);
268 		return retVal;
269     }
270     
271     /**
272      * Returns
273      * TCC-9: "Automatic Rerun Allowed" - creates it if necessary
274      */
275     public ID getTcc9_AutomaticRerunAllowed() { 
276 		ID retVal = this.getTypedField(9, 0);
277 		return retVal;
278     }
279 
280 
281 
282     /**
283      * Returns
284      * TCC-10: "Automatic Repeat Allowed" - creates it if necessary
285      */
286     public ID getAutomaticRepeatAllowed() { 
287 		ID retVal = this.getTypedField(10, 0);
288 		return retVal;
289     }
290     
291     /**
292      * Returns
293      * TCC-10: "Automatic Repeat Allowed" - creates it if necessary
294      */
295     public ID getTcc10_AutomaticRepeatAllowed() { 
296 		ID retVal = this.getTypedField(10, 0);
297 		return retVal;
298     }
299 
300 
301 
302     /**
303      * Returns
304      * TCC-11: "Automatic Reflex Allowed" - creates it if necessary
305      */
306     public ID getAutomaticReflexAllowed() { 
307 		ID retVal = this.getTypedField(11, 0);
308 		return retVal;
309     }
310     
311     /**
312      * Returns
313      * TCC-11: "Automatic Reflex Allowed" - creates it if necessary
314      */
315     public ID getTcc11_AutomaticReflexAllowed() { 
316 		ID retVal = this.getTypedField(11, 0);
317 		return retVal;
318     }
319 
320 
321 
322     /**
323      * Returns
324      * TCC-12: "Equipment Dynamic Range" - creates it if necessary
325      */
326     public SN getEquipmentDynamicRange() { 
327 		SN retVal = this.getTypedField(12, 0);
328 		return retVal;
329     }
330     
331     /**
332      * Returns
333      * TCC-12: "Equipment Dynamic Range" - creates it if necessary
334      */
335     public SN getTcc12_EquipmentDynamicRange() { 
336 		SN retVal = this.getTypedField(12, 0);
337 		return retVal;
338     }
339 
340 
341 
342     /**
343      * Returns
344      * TCC-13: "Units" - creates it if necessary
345      */
346     public CE getUnits() { 
347 		CE retVal = this.getTypedField(13, 0);
348 		return retVal;
349     }
350     
351     /**
352      * Returns
353      * TCC-13: "Units" - creates it if necessary
354      */
355     public CE getTcc13_Units() { 
356 		CE retVal = this.getTypedField(13, 0);
357 		return retVal;
358     }
359 
360 
361 
362     /**
363      * Returns
364      * TCC-14: "Processing Type" - creates it if necessary
365      */
366     public CE getProcessingType() { 
367 		CE retVal = this.getTypedField(14, 0);
368 		return retVal;
369     }
370     
371     /**
372      * Returns
373      * TCC-14: "Processing Type" - creates it if necessary
374      */
375     public CE getTcc14_ProcessingType() { 
376 		CE retVal = this.getTypedField(14, 0);
377 		return retVal;
378     }
379 
380 
381 
382 
383 
384     /** {@inheritDoc} */   
385     protected Type createNewTypeWithoutReflection(int field) {
386        switch (field) {
387           case 0: return new CE(getMessage());
388           case 1: return new EI(getMessage());
389           case 2: return new SPS(getMessage());
390           case 3: return new SN(getMessage());
391           case 4: return new SN(getMessage());
392           case 5: return new SN(getMessage());
393           case 6: return new SN(getMessage());
394           case 7: return new NM(getMessage());
395           case 8: return new ID(getMessage(), new Integer( 136 ));
396           case 9: return new ID(getMessage(), new Integer( 136 ));
397           case 10: return new ID(getMessage(), new Integer( 136 ));
398           case 11: return new SN(getMessage());
399           case 12: return new CE(getMessage());
400           case 13: return new CE(getMessage());
401           default: return null;
402        }
403    }
404 
405 
406 }
407