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.v25.segment; 035 036// import ca.uhn.hl7v2.model.v25.group.*; 037import ca.uhn.hl7v2.model.v25.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 TCC message segment (Test Code Configuration). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>TCC-1: Universal Service Identifier (CE) <b> </b> 052 * <li>TCC-2: Test Application Identifier (EI) <b> </b> 053 * <li>TCC-3: Specimen Source (SPS) <b>optional </b> 054 * <li>TCC-4: Auto-Dilution Factor Default (SN) <b>optional </b> 055 * <li>TCC-5: Rerun Dilution Factor Default (SN) <b>optional </b> 056 * <li>TCC-6: Pre-Dilution Factor Default (SN) <b>optional </b> 057 * <li>TCC-7: Endogenous Content of Pre-Dilution Diluent (SN) <b>optional </b> 058 * <li>TCC-8: Inventory Limits Warning Level (NM) <b>optional </b> 059 * <li>TCC-9: Automatic Rerun Allowed (ID) <b>optional </b> 060 * <li>TCC-10: Automatic Repeat Allowed (ID) <b>optional </b> 061 * <li>TCC-11: Automatic Reflex Allowed (ID) <b>optional </b> 062 * <li>TCC-12: Equipment Dynamic Range (SN) <b>optional </b> 063 * <li>TCC-13: Units (CE) <b>optional </b> 064 * <li>TCC-14: Processing Type (CE) <b>optional </b> 065 * </ul> 066 */ 067@SuppressWarnings("unused") 068public class TCC extends AbstractSegment { 069 070 /** 071 * Creates a new TCC segment 072 */ 073 public TCC(Group parent, ModelClassFactory factory) { 074 super(parent, factory); 075 init(factory); 076 } 077 078 private void init(ModelClassFactory factory) { 079 try { 080 this.add(CE.class, true, 1, 250, new Object[]{ getMessage() }, "Universal Service Identifier"); 081 this.add(EI.class, true, 1, 80, new Object[]{ getMessage() }, "Test Application Identifier"); 082 this.add(SPS.class, false, 1, 300, new Object[]{ getMessage() }, "Specimen Source"); 083 this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Auto-Dilution Factor Default"); 084 this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Rerun Dilution Factor Default"); 085 this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Pre-Dilution Factor Default"); 086 this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Endogenous Content of Pre-Dilution Diluent"); 087 this.add(NM.class, false, 1, 10, new Object[]{ getMessage() }, "Inventory Limits Warning Level"); 088 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Automatic Rerun Allowed"); 089 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Automatic Repeat Allowed"); 090 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Automatic Reflex Allowed"); 091 this.add(SN.class, false, 1, 20, new Object[]{ getMessage() }, "Equipment Dynamic Range"); 092 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Units"); 093 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Processing Type"); 094 } catch(HL7Exception e) { 095 log.error("Unexpected error creating TCC - this is probably a bug in the source code generator.", e); 096 } 097 } 098 099 100 101 /** 102 * Returns 103 * TCC-1: "Universal Service Identifier" - creates it if necessary 104 */ 105 public CE getUniversalServiceIdentifier() { 106 CE retVal = this.getTypedField(1, 0); 107 return retVal; 108 } 109 110 /** 111 * Returns 112 * TCC-1: "Universal Service Identifier" - creates it if necessary 113 */ 114 public CE getTcc1_UniversalServiceIdentifier() { 115 CE retVal = this.getTypedField(1, 0); 116 return retVal; 117 } 118 119 120 121 /** 122 * Returns 123 * TCC-2: "Test Application Identifier" - creates it if necessary 124 */ 125 public EI getTestApplicationIdentifier() { 126 EI retVal = this.getTypedField(2, 0); 127 return retVal; 128 } 129 130 /** 131 * Returns 132 * TCC-2: "Test Application Identifier" - creates it if necessary 133 */ 134 public EI getTcc2_TestApplicationIdentifier() { 135 EI retVal = this.getTypedField(2, 0); 136 return retVal; 137 } 138 139 140 141 /** 142 * Returns 143 * TCC-3: "Specimen Source" - creates it if necessary 144 */ 145 public SPS getSpecimenSource() { 146 SPS retVal = this.getTypedField(3, 0); 147 return retVal; 148 } 149 150 /** 151 * Returns 152 * TCC-3: "Specimen Source" - creates it if necessary 153 */ 154 public SPS getTcc3_SpecimenSource() { 155 SPS retVal = this.getTypedField(3, 0); 156 return retVal; 157 } 158 159 160 161 /** 162 * Returns 163 * TCC-4: "Auto-Dilution Factor Default" - creates it if necessary 164 */ 165 public SN getAutoDilutionFactorDefault() { 166 SN retVal = this.getTypedField(4, 0); 167 return retVal; 168 } 169 170 /** 171 * Returns 172 * TCC-4: "Auto-Dilution Factor Default" - creates it if necessary 173 */ 174 public SN getTcc4_AutoDilutionFactorDefault() { 175 SN retVal = this.getTypedField(4, 0); 176 return retVal; 177 } 178 179 180 181 /** 182 * Returns 183 * TCC-5: "Rerun Dilution Factor Default" - creates it if necessary 184 */ 185 public SN getRerunDilutionFactorDefault() { 186 SN retVal = this.getTypedField(5, 0); 187 return retVal; 188 } 189 190 /** 191 * Returns 192 * TCC-5: "Rerun Dilution Factor Default" - creates it if necessary 193 */ 194 public SN getTcc5_RerunDilutionFactorDefault() { 195 SN retVal = this.getTypedField(5, 0); 196 return retVal; 197 } 198 199 200 201 /** 202 * Returns 203 * TCC-6: "Pre-Dilution Factor Default" - creates it if necessary 204 */ 205 public SN getPreDilutionFactorDefault() { 206 SN retVal = this.getTypedField(6, 0); 207 return retVal; 208 } 209 210 /** 211 * Returns 212 * TCC-6: "Pre-Dilution Factor Default" - creates it if necessary 213 */ 214 public SN getTcc6_PreDilutionFactorDefault() { 215 SN retVal = this.getTypedField(6, 0); 216 return retVal; 217 } 218 219 220 221 /** 222 * Returns 223 * TCC-7: "Endogenous Content of Pre-Dilution Diluent" - creates it if necessary 224 */ 225 public SN getEndogenousContentOfPreDilutionDiluent() { 226 SN retVal = this.getTypedField(7, 0); 227 return retVal; 228 } 229 230 /** 231 * Returns 232 * TCC-7: "Endogenous Content of Pre-Dilution Diluent" - creates it if necessary 233 */ 234 public SN getTcc7_EndogenousContentOfPreDilutionDiluent() { 235 SN retVal = this.getTypedField(7, 0); 236 return retVal; 237 } 238 239 240 241 /** 242 * Returns 243 * TCC-8: "Inventory Limits Warning Level" - creates it if necessary 244 */ 245 public NM getInventoryLimitsWarningLevel() { 246 NM retVal = this.getTypedField(8, 0); 247 return retVal; 248 } 249 250 /** 251 * Returns 252 * TCC-8: "Inventory Limits Warning Level" - creates it if necessary 253 */ 254 public NM getTcc8_InventoryLimitsWarningLevel() { 255 NM retVal = this.getTypedField(8, 0); 256 return retVal; 257 } 258 259 260 261 /** 262 * Returns 263 * TCC-9: "Automatic Rerun Allowed" - creates it if necessary 264 */ 265 public ID getAutomaticRerunAllowed() { 266 ID retVal = this.getTypedField(9, 0); 267 return retVal; 268 } 269 270 /** 271 * Returns 272 * TCC-9: "Automatic Rerun Allowed" - creates it if necessary 273 */ 274 public ID getTcc9_AutomaticRerunAllowed() { 275 ID retVal = this.getTypedField(9, 0); 276 return retVal; 277 } 278 279 280 281 /** 282 * Returns 283 * TCC-10: "Automatic Repeat Allowed" - creates it if necessary 284 */ 285 public ID getAutomaticRepeatAllowed() { 286 ID retVal = this.getTypedField(10, 0); 287 return retVal; 288 } 289 290 /** 291 * Returns 292 * TCC-10: "Automatic Repeat Allowed" - creates it if necessary 293 */ 294 public ID getTcc10_AutomaticRepeatAllowed() { 295 ID retVal = this.getTypedField(10, 0); 296 return retVal; 297 } 298 299 300 301 /** 302 * Returns 303 * TCC-11: "Automatic Reflex Allowed" - creates it if necessary 304 */ 305 public ID getAutomaticReflexAllowed() { 306 ID retVal = this.getTypedField(11, 0); 307 return retVal; 308 } 309 310 /** 311 * Returns 312 * TCC-11: "Automatic Reflex Allowed" - creates it if necessary 313 */ 314 public ID getTcc11_AutomaticReflexAllowed() { 315 ID retVal = this.getTypedField(11, 0); 316 return retVal; 317 } 318 319 320 321 /** 322 * Returns 323 * TCC-12: "Equipment Dynamic Range" - creates it if necessary 324 */ 325 public SN getEquipmentDynamicRange() { 326 SN retVal = this.getTypedField(12, 0); 327 return retVal; 328 } 329 330 /** 331 * Returns 332 * TCC-12: "Equipment Dynamic Range" - creates it if necessary 333 */ 334 public SN getTcc12_EquipmentDynamicRange() { 335 SN retVal = this.getTypedField(12, 0); 336 return retVal; 337 } 338 339 340 341 /** 342 * Returns 343 * TCC-13: "Units" - creates it if necessary 344 */ 345 public CE getUnits() { 346 CE retVal = this.getTypedField(13, 0); 347 return retVal; 348 } 349 350 /** 351 * Returns 352 * TCC-13: "Units" - creates it if necessary 353 */ 354 public CE getTcc13_Units() { 355 CE retVal = this.getTypedField(13, 0); 356 return retVal; 357 } 358 359 360 361 /** 362 * Returns 363 * TCC-14: "Processing Type" - creates it if necessary 364 */ 365 public CE getProcessingType() { 366 CE retVal = this.getTypedField(14, 0); 367 return retVal; 368 } 369 370 /** 371 * Returns 372 * TCC-14: "Processing Type" - creates it if necessary 373 */ 374 public CE getTcc14_ProcessingType() { 375 CE retVal = this.getTypedField(14, 0); 376 return retVal; 377 } 378 379 380 381 382 383 /** {@inheritDoc} */ 384 protected Type createNewTypeWithoutReflection(int field) { 385 switch (field) { 386 case 0: return new CE(getMessage()); 387 case 1: return new EI(getMessage()); 388 case 2: return new SPS(getMessage()); 389 case 3: return new SN(getMessage()); 390 case 4: return new SN(getMessage()); 391 case 5: return new SN(getMessage()); 392 case 6: return new SN(getMessage()); 393 case 7: return new NM(getMessage()); 394 case 8: return new ID(getMessage(), new Integer( 136 )); 395 case 9: return new ID(getMessage(), new Integer( 136 )); 396 case 10: return new ID(getMessage(), new Integer( 136 )); 397 case 11: return new SN(getMessage()); 398 case 12: return new CE(getMessage()); 399 case 13: return new CE(getMessage()); 400 default: return null; 401 } 402 } 403 404 405} 406