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.v22.segment; 035 036// import ca.uhn.hl7v2.model.v22.group.*; 037import ca.uhn.hl7v2.model.v22.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 DG1 message segment (DIAGNOSIS). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>DG1-1: Set ID - diagnosis (SI) <b> </b> 052 * <li>DG1-2: Diagnosis coding method (ID) <b> </b> 053 * <li>DG1-3: Diagnosis code (ID) <b>optional </b> 054 * <li>DG1-4: Diagnosis description (ST) <b>optional </b> 055 * <li>DG1-5: Diagnosis date / time (TS) <b>optional </b> 056 * <li>DG1-6: Diagnosis / DRG type (ID) <b> </b> 057 * <li>DG1-7: Major diagnostic category (CE) <b>optional </b> 058 * <li>DG1-8: Diagnostic related group (ID) <b>optional </b> 059 * <li>DG1-9: DRG approval indicator (ID) <b>optional </b> 060 * <li>DG1-10: DRG grouper review code (ID) <b>optional </b> 061 * <li>DG1-11: Outlier type (ID) <b>optional </b> 062 * <li>DG1-12: Outlier days (NM) <b>optional </b> 063 * <li>DG1-13: Outlier cost (NM) <b>optional </b> 064 * <li>DG1-14: Grouper version and type (ST) <b>optional </b> 065 * <li>DG1-15: Diagnosis / DRG priority (NM) <b>optional </b> 066 * <li>DG1-16: Diagnosing clinician (CN) <b>optional </b> 067 * </ul> 068 */ 069@SuppressWarnings("unused") 070public class DG1 extends AbstractSegment { 071 072 /** 073 * Creates a new DG1 segment 074 */ 075 public DG1(Group parent, ModelClassFactory factory) { 076 super(parent, factory); 077 init(factory); 078 } 079 080 private void init(ModelClassFactory factory) { 081 try { 082 this.add(SI.class, true, 1, 4, new Object[]{ getMessage() }, "Set ID - diagnosis"); 083 this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(53) }, "Diagnosis coding method"); 084 this.add(ID.class, false, 1, 8, new Object[]{ getMessage(), new Integer(51) }, "Diagnosis code"); 085 this.add(ST.class, false, 1, 40, new Object[]{ getMessage() }, "Diagnosis description"); 086 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Diagnosis date / time"); 087 this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(52) }, "Diagnosis / DRG type"); 088 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Major diagnostic category"); 089 this.add(ID.class, false, 1, 4, new Object[]{ getMessage(), new Integer(55) }, "Diagnostic related group"); 090 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(0) }, "DRG approval indicator"); 091 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(56) }, "DRG grouper review code"); 092 this.add(ID.class, false, 1, 60, new Object[]{ getMessage(), new Integer(83) }, "Outlier type"); 093 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Outlier days"); 094 this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "Outlier cost"); 095 this.add(ST.class, false, 1, 4, new Object[]{ getMessage() }, "Grouper version and type"); 096 this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Diagnosis / DRG priority"); 097 this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "Diagnosing clinician"); 098 } catch(HL7Exception e) { 099 log.error("Unexpected error creating DG1 - this is probably a bug in the source code generator.", e); 100 } 101 } 102 103 104 105 /** 106 * Returns 107 * DG1-1: "Set ID - diagnosis" - creates it if necessary 108 */ 109 public SI getSetIDDiagnosis() { 110 SI retVal = this.getTypedField(1, 0); 111 return retVal; 112 } 113 114 /** 115 * Returns 116 * DG1-1: "Set ID - diagnosis" - creates it if necessary 117 */ 118 public SI getDg11_SetIDDiagnosis() { 119 SI retVal = this.getTypedField(1, 0); 120 return retVal; 121 } 122 123 124 125 /** 126 * Returns 127 * DG1-2: "Diagnosis coding method" - creates it if necessary 128 */ 129 public ID getDiagnosisCodingMethod() { 130 ID retVal = this.getTypedField(2, 0); 131 return retVal; 132 } 133 134 /** 135 * Returns 136 * DG1-2: "Diagnosis coding method" - creates it if necessary 137 */ 138 public ID getDg12_DiagnosisCodingMethod() { 139 ID retVal = this.getTypedField(2, 0); 140 return retVal; 141 } 142 143 144 145 /** 146 * Returns 147 * DG1-3: "Diagnosis code" - creates it if necessary 148 */ 149 public ID getDiagnosisCode() { 150 ID retVal = this.getTypedField(3, 0); 151 return retVal; 152 } 153 154 /** 155 * Returns 156 * DG1-3: "Diagnosis code" - creates it if necessary 157 */ 158 public ID getDg13_DiagnosisCode() { 159 ID retVal = this.getTypedField(3, 0); 160 return retVal; 161 } 162 163 164 165 /** 166 * Returns 167 * DG1-4: "Diagnosis description" - creates it if necessary 168 */ 169 public ST getDiagnosisDescription() { 170 ST retVal = this.getTypedField(4, 0); 171 return retVal; 172 } 173 174 /** 175 * Returns 176 * DG1-4: "Diagnosis description" - creates it if necessary 177 */ 178 public ST getDg14_DiagnosisDescription() { 179 ST retVal = this.getTypedField(4, 0); 180 return retVal; 181 } 182 183 184 185 /** 186 * Returns 187 * DG1-5: "Diagnosis date / time" - creates it if necessary 188 */ 189 public TS getDiagnosisDateTime() { 190 TS retVal = this.getTypedField(5, 0); 191 return retVal; 192 } 193 194 /** 195 * Returns 196 * DG1-5: "Diagnosis date / time" - creates it if necessary 197 */ 198 public TS getDg15_DiagnosisDateTime() { 199 TS retVal = this.getTypedField(5, 0); 200 return retVal; 201 } 202 203 204 205 /** 206 * Returns 207 * DG1-6: "Diagnosis / DRG type" - creates it if necessary 208 */ 209 public ID getDiagnosisDRGType() { 210 ID retVal = this.getTypedField(6, 0); 211 return retVal; 212 } 213 214 /** 215 * Returns 216 * DG1-6: "Diagnosis / DRG type" - creates it if necessary 217 */ 218 public ID getDg16_DiagnosisDRGType() { 219 ID retVal = this.getTypedField(6, 0); 220 return retVal; 221 } 222 223 224 225 /** 226 * Returns 227 * DG1-7: "Major diagnostic category" - creates it if necessary 228 */ 229 public CE getMajorDiagnosticCategory() { 230 CE retVal = this.getTypedField(7, 0); 231 return retVal; 232 } 233 234 /** 235 * Returns 236 * DG1-7: "Major diagnostic category" - creates it if necessary 237 */ 238 public CE getDg17_MajorDiagnosticCategory() { 239 CE retVal = this.getTypedField(7, 0); 240 return retVal; 241 } 242 243 244 245 /** 246 * Returns 247 * DG1-8: "Diagnostic related group" - creates it if necessary 248 */ 249 public ID getDiagnosticRelatedGroup() { 250 ID retVal = this.getTypedField(8, 0); 251 return retVal; 252 } 253 254 /** 255 * Returns 256 * DG1-8: "Diagnostic related group" - creates it if necessary 257 */ 258 public ID getDg18_DiagnosticRelatedGroup() { 259 ID retVal = this.getTypedField(8, 0); 260 return retVal; 261 } 262 263 264 265 /** 266 * Returns 267 * DG1-9: "DRG approval indicator" - creates it if necessary 268 */ 269 public ID getDRGApprovalIndicator() { 270 ID retVal = this.getTypedField(9, 0); 271 return retVal; 272 } 273 274 /** 275 * Returns 276 * DG1-9: "DRG approval indicator" - creates it if necessary 277 */ 278 public ID getDg19_DRGApprovalIndicator() { 279 ID retVal = this.getTypedField(9, 0); 280 return retVal; 281 } 282 283 284 285 /** 286 * Returns 287 * DG1-10: "DRG grouper review code" - creates it if necessary 288 */ 289 public ID getDRGGrouperReviewCode() { 290 ID retVal = this.getTypedField(10, 0); 291 return retVal; 292 } 293 294 /** 295 * Returns 296 * DG1-10: "DRG grouper review code" - creates it if necessary 297 */ 298 public ID getDg110_DRGGrouperReviewCode() { 299 ID retVal = this.getTypedField(10, 0); 300 return retVal; 301 } 302 303 304 305 /** 306 * Returns 307 * DG1-11: "Outlier type" - creates it if necessary 308 */ 309 public ID getOutlierType() { 310 ID retVal = this.getTypedField(11, 0); 311 return retVal; 312 } 313 314 /** 315 * Returns 316 * DG1-11: "Outlier type" - creates it if necessary 317 */ 318 public ID getDg111_OutlierType() { 319 ID retVal = this.getTypedField(11, 0); 320 return retVal; 321 } 322 323 324 325 /** 326 * Returns 327 * DG1-12: "Outlier days" - creates it if necessary 328 */ 329 public NM getOutlierDays() { 330 NM retVal = this.getTypedField(12, 0); 331 return retVal; 332 } 333 334 /** 335 * Returns 336 * DG1-12: "Outlier days" - creates it if necessary 337 */ 338 public NM getDg112_OutlierDays() { 339 NM retVal = this.getTypedField(12, 0); 340 return retVal; 341 } 342 343 344 345 /** 346 * Returns 347 * DG1-13: "Outlier cost" - creates it if necessary 348 */ 349 public NM getOutlierCost() { 350 NM retVal = this.getTypedField(13, 0); 351 return retVal; 352 } 353 354 /** 355 * Returns 356 * DG1-13: "Outlier cost" - creates it if necessary 357 */ 358 public NM getDg113_OutlierCost() { 359 NM retVal = this.getTypedField(13, 0); 360 return retVal; 361 } 362 363 364 365 /** 366 * Returns 367 * DG1-14: "Grouper version and type" - creates it if necessary 368 */ 369 public ST getGrouperVersionAndType() { 370 ST retVal = this.getTypedField(14, 0); 371 return retVal; 372 } 373 374 /** 375 * Returns 376 * DG1-14: "Grouper version and type" - creates it if necessary 377 */ 378 public ST getDg114_GrouperVersionAndType() { 379 ST retVal = this.getTypedField(14, 0); 380 return retVal; 381 } 382 383 384 385 /** 386 * Returns 387 * DG1-15: "Diagnosis / DRG priority" - creates it if necessary 388 */ 389 public NM getDiagnosisDRGPriority() { 390 NM retVal = this.getTypedField(15, 0); 391 return retVal; 392 } 393 394 /** 395 * Returns 396 * DG1-15: "Diagnosis / DRG priority" - creates it if necessary 397 */ 398 public NM getDg115_DiagnosisDRGPriority() { 399 NM retVal = this.getTypedField(15, 0); 400 return retVal; 401 } 402 403 404 405 /** 406 * Returns 407 * DG1-16: "Diagnosing clinician" - creates it if necessary 408 */ 409 public CN getDiagnosingClinician() { 410 CN retVal = this.getTypedField(16, 0); 411 return retVal; 412 } 413 414 /** 415 * Returns 416 * DG1-16: "Diagnosing clinician" - creates it if necessary 417 */ 418 public CN getDg116_DiagnosingClinician() { 419 CN retVal = this.getTypedField(16, 0); 420 return retVal; 421 } 422 423 424 425 426 427 /** {@inheritDoc} */ 428 protected Type createNewTypeWithoutReflection(int field) { 429 switch (field) { 430 case 0: return new SI(getMessage()); 431 case 1: return new ID(getMessage(), new Integer( 53 )); 432 case 2: return new ID(getMessage(), new Integer( 51 )); 433 case 3: return new ST(getMessage()); 434 case 4: return new TS(getMessage()); 435 case 5: return new ID(getMessage(), new Integer( 52 )); 436 case 6: return new CE(getMessage()); 437 case 7: return new ID(getMessage(), new Integer( 55 )); 438 case 8: return new ID(getMessage(), new Integer( 0 )); 439 case 9: return new ID(getMessage(), new Integer( 56 )); 440 case 10: return new ID(getMessage(), new Integer( 83 )); 441 case 11: return new NM(getMessage()); 442 case 12: return new NM(getMessage()); 443 case 13: return new ST(getMessage()); 444 case 14: return new NM(getMessage()); 445 case 15: return new CN(getMessage()); 446 default: return null; 447 } 448 } 449 450 451} 452