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.v28.segment;
35  
36  // import ca.uhn.hl7v2.model.v28.group.*;
37  import ca.uhn.hl7v2.model.v28.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 (CWE) <b> </b>
53       * <li>TCC-2: Equipment Test Application Identifier (EI) <b> </b>
54       * <li>TCC-3: Specimen Source (NULLDT) <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 (CWE) <b>optional </b>
65       * <li>TCC-14: Processing Type (CWE) <b>optional </b>
66       * <li>TCC-15: Test Criticality (CWE) <b>optional </b>
67   * </ul>
68   */
69  @SuppressWarnings("unused")
70  public class TCC extends AbstractSegment {
71  
72      /** 
73       * Creates a new TCC segment
74       */
75      public TCC(Group parent, ModelClassFactory factory) {
76         super(parent, factory);
77         init(factory);
78      }
79  
80      private void init(ModelClassFactory factory) {
81         try {
82                                    this.add(CWE.class, true, 1, 0, new Object[]{ getMessage() }, "Universal Service Identifier");
83                                    this.add(EI.class, true, 1, 0, new Object[]{ getMessage() }, "Equipment Test Application Identifier");
84                                    this.add(NULLDT.class, false, 1, 0, new Object[]{ getMessage() }, "Specimen Source");
85                                    this.add(SN.class, false, 1, 0, new Object[]{ getMessage() }, "Auto-Dilution Factor Default");
86                                    this.add(SN.class, false, 1, 0, new Object[]{ getMessage() }, "Rerun Dilution Factor Default");
87                                    this.add(SN.class, false, 1, 0, new Object[]{ getMessage() }, "Pre-Dilution Factor Default");
88                                    this.add(SN.class, false, 1, 0, new Object[]{ getMessage() }, "Endogenous Content of Pre-Dilution Diluent");
89                                    this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Inventory Limits Warning Level");
90                                                this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Automatic Rerun Allowed");
91                                                this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Automatic Repeat Allowed");
92                                                this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Automatic Reflex Allowed");
93                                    this.add(SN.class, false, 1, 0, new Object[]{ getMessage() }, "Equipment Dynamic Range");
94                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Units");
95                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Processing Type");
96                                    this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Test Criticality");
97         } catch(HL7Exception e) {
98            log.error("Unexpected error creating TCC - this is probably a bug in the source code generator.", e);
99         }
100     }
101 
102 
103 
104     /**
105      * Returns
106      * TCC-1: "Universal Service Identifier" - creates it if necessary
107      */
108     public CWE getUniversalServiceIdentifier() { 
109 		CWE retVal = this.getTypedField(1, 0);
110 		return retVal;
111     }
112     
113     /**
114      * Returns
115      * TCC-1: "Universal Service Identifier" - creates it if necessary
116      */
117     public CWE getTcc1_UniversalServiceIdentifier() { 
118 		CWE retVal = this.getTypedField(1, 0);
119 		return retVal;
120     }
121 
122 
123 
124     /**
125      * Returns
126      * TCC-2: "Equipment Test Application Identifier" - creates it if necessary
127      */
128     public EI getEquipmentTestApplicationIdentifier() { 
129 		EI retVal = this.getTypedField(2, 0);
130 		return retVal;
131     }
132     
133     /**
134      * Returns
135      * TCC-2: "Equipment Test Application Identifier" - creates it if necessary
136      */
137     public EI getTcc2_EquipmentTestApplicationIdentifier() { 
138 		EI retVal = this.getTypedField(2, 0);
139 		return retVal;
140     }
141 
142 
143 
144     /**
145      * Returns
146      * TCC-3: "Specimen Source" - creates it if necessary
147      */
148     public NULLDT getSpecimenSource() { 
149 		NULLDT retVal = this.getTypedField(3, 0);
150 		return retVal;
151     }
152     
153     /**
154      * Returns
155      * TCC-3: "Specimen Source" - creates it if necessary
156      */
157     public NULLDT getTcc3_SpecimenSource() { 
158 		NULLDT retVal = this.getTypedField(3, 0);
159 		return retVal;
160     }
161 
162 
163 
164     /**
165      * Returns
166      * TCC-4: "Auto-Dilution Factor Default" - creates it if necessary
167      */
168     public SN getAutoDilutionFactorDefault() { 
169 		SN retVal = this.getTypedField(4, 0);
170 		return retVal;
171     }
172     
173     /**
174      * Returns
175      * TCC-4: "Auto-Dilution Factor Default" - creates it if necessary
176      */
177     public SN getTcc4_AutoDilutionFactorDefault() { 
178 		SN retVal = this.getTypedField(4, 0);
179 		return retVal;
180     }
181 
182 
183 
184     /**
185      * Returns
186      * TCC-5: "Rerun Dilution Factor Default" - creates it if necessary
187      */
188     public SN getRerunDilutionFactorDefault() { 
189 		SN retVal = this.getTypedField(5, 0);
190 		return retVal;
191     }
192     
193     /**
194      * Returns
195      * TCC-5: "Rerun Dilution Factor Default" - creates it if necessary
196      */
197     public SN getTcc5_RerunDilutionFactorDefault() { 
198 		SN retVal = this.getTypedField(5, 0);
199 		return retVal;
200     }
201 
202 
203 
204     /**
205      * Returns
206      * TCC-6: "Pre-Dilution Factor Default" - creates it if necessary
207      */
208     public SN getPreDilutionFactorDefault() { 
209 		SN retVal = this.getTypedField(6, 0);
210 		return retVal;
211     }
212     
213     /**
214      * Returns
215      * TCC-6: "Pre-Dilution Factor Default" - creates it if necessary
216      */
217     public SN getTcc6_PreDilutionFactorDefault() { 
218 		SN retVal = this.getTypedField(6, 0);
219 		return retVal;
220     }
221 
222 
223 
224     /**
225      * Returns
226      * TCC-7: "Endogenous Content of Pre-Dilution Diluent" - creates it if necessary
227      */
228     public SN getEndogenousContentOfPreDilutionDiluent() { 
229 		SN retVal = this.getTypedField(7, 0);
230 		return retVal;
231     }
232     
233     /**
234      * Returns
235      * TCC-7: "Endogenous Content of Pre-Dilution Diluent" - creates it if necessary
236      */
237     public SN getTcc7_EndogenousContentOfPreDilutionDiluent() { 
238 		SN retVal = this.getTypedField(7, 0);
239 		return retVal;
240     }
241 
242 
243 
244     /**
245      * Returns
246      * TCC-8: "Inventory Limits Warning Level" - creates it if necessary
247      */
248     public NM getInventoryLimitsWarningLevel() { 
249 		NM retVal = this.getTypedField(8, 0);
250 		return retVal;
251     }
252     
253     /**
254      * Returns
255      * TCC-8: "Inventory Limits Warning Level" - creates it if necessary
256      */
257     public NM getTcc8_InventoryLimitsWarningLevel() { 
258 		NM retVal = this.getTypedField(8, 0);
259 		return retVal;
260     }
261 
262 
263 
264     /**
265      * Returns
266      * TCC-9: "Automatic Rerun Allowed" - creates it if necessary
267      */
268     public ID getAutomaticRerunAllowed() { 
269 		ID retVal = this.getTypedField(9, 0);
270 		return retVal;
271     }
272     
273     /**
274      * Returns
275      * TCC-9: "Automatic Rerun Allowed" - creates it if necessary
276      */
277     public ID getTcc9_AutomaticRerunAllowed() { 
278 		ID retVal = this.getTypedField(9, 0);
279 		return retVal;
280     }
281 
282 
283 
284     /**
285      * Returns
286      * TCC-10: "Automatic Repeat Allowed" - creates it if necessary
287      */
288     public ID getAutomaticRepeatAllowed() { 
289 		ID retVal = this.getTypedField(10, 0);
290 		return retVal;
291     }
292     
293     /**
294      * Returns
295      * TCC-10: "Automatic Repeat Allowed" - creates it if necessary
296      */
297     public ID getTcc10_AutomaticRepeatAllowed() { 
298 		ID retVal = this.getTypedField(10, 0);
299 		return retVal;
300     }
301 
302 
303 
304     /**
305      * Returns
306      * TCC-11: "Automatic Reflex Allowed" - creates it if necessary
307      */
308     public ID getAutomaticReflexAllowed() { 
309 		ID retVal = this.getTypedField(11, 0);
310 		return retVal;
311     }
312     
313     /**
314      * Returns
315      * TCC-11: "Automatic Reflex Allowed" - creates it if necessary
316      */
317     public ID getTcc11_AutomaticReflexAllowed() { 
318 		ID retVal = this.getTypedField(11, 0);
319 		return retVal;
320     }
321 
322 
323 
324     /**
325      * Returns
326      * TCC-12: "Equipment Dynamic Range" - creates it if necessary
327      */
328     public SN getEquipmentDynamicRange() { 
329 		SN retVal = this.getTypedField(12, 0);
330 		return retVal;
331     }
332     
333     /**
334      * Returns
335      * TCC-12: "Equipment Dynamic Range" - creates it if necessary
336      */
337     public SN getTcc12_EquipmentDynamicRange() { 
338 		SN retVal = this.getTypedField(12, 0);
339 		return retVal;
340     }
341 
342 
343 
344     /**
345      * Returns
346      * TCC-13: "Units" - creates it if necessary
347      */
348     public CWE getUnits() { 
349 		CWE retVal = this.getTypedField(13, 0);
350 		return retVal;
351     }
352     
353     /**
354      * Returns
355      * TCC-13: "Units" - creates it if necessary
356      */
357     public CWE getTcc13_Units() { 
358 		CWE retVal = this.getTypedField(13, 0);
359 		return retVal;
360     }
361 
362 
363 
364     /**
365      * Returns
366      * TCC-14: "Processing Type" - creates it if necessary
367      */
368     public CWE getProcessingType() { 
369 		CWE retVal = this.getTypedField(14, 0);
370 		return retVal;
371     }
372     
373     /**
374      * Returns
375      * TCC-14: "Processing Type" - creates it if necessary
376      */
377     public CWE getTcc14_ProcessingType() { 
378 		CWE retVal = this.getTypedField(14, 0);
379 		return retVal;
380     }
381 
382 
383 
384     /**
385      * Returns
386      * TCC-15: "Test Criticality" - creates it if necessary
387      */
388     public CWE getTestCriticality() { 
389 		CWE retVal = this.getTypedField(15, 0);
390 		return retVal;
391     }
392     
393     /**
394      * Returns
395      * TCC-15: "Test Criticality" - creates it if necessary
396      */
397     public CWE getTcc15_TestCriticality() { 
398 		CWE retVal = this.getTypedField(15, 0);
399 		return retVal;
400     }
401 
402 
403 
404 
405 
406     /** {@inheritDoc} */   
407     protected Type createNewTypeWithoutReflection(int field) {
408        switch (field) {
409           case 0: return new CWE(getMessage());
410           case 1: return new EI(getMessage());
411           case 2: return new NULLDT(getMessage());
412           case 3: return new SN(getMessage());
413           case 4: return new SN(getMessage());
414           case 5: return new SN(getMessage());
415           case 6: return new SN(getMessage());
416           case 7: return new NM(getMessage());
417           case 8: return new ID(getMessage(), new Integer( 136 ));
418           case 9: return new ID(getMessage(), new Integer( 136 ));
419           case 10: return new ID(getMessage(), new Integer( 136 ));
420           case 11: return new SN(getMessage());
421           case 12: return new CWE(getMessage());
422           case 13: return new CWE(getMessage());
423           case 14: return new CWE(getMessage());
424           default: return null;
425        }
426    }
427 
428 
429 }
430