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.v21.segment; 035 036// import ca.uhn.hl7v2.model.v21.group.*; 037import ca.uhn.hl7v2.model.v21.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 FT1 message segment (FINANCIAL TRANSACTION). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>FT1-1: SET ID - FINANCIAL TRANSACTION (SI) <b>optional </b> 052 * <li>FT1-2: TRANSACTION ID (ST) <b>optional </b> 053 * <li>FT1-3: TRANSACTION BATCH ID (ST) <b>optional </b> 054 * <li>FT1-4: TRANSACTION DATE (DT) <b> </b> 055 * <li>FT1-5: TRANSACTION POSTING DATE (DT) <b>optional </b> 056 * <li>FT1-6: TRANSACTION TYPE (ID) <b> </b> 057 * <li>FT1-7: TRANSACTION CODE (ID) <b> </b> 058 * <li>FT1-8: TRANSACTION DESCRIPTION (ST) <b>optional </b> 059 * <li>FT1-9: TRANSACTION DESCRIPTION - ALT (ST) <b>optional </b> 060 * <li>FT1-10: TRANSACTION AMOUNT - EXTENDED (NM) <b>optional </b> 061 * <li>FT1-11: TRANSACTION QUANTITY (NM) <b>optional </b> 062 * <li>FT1-12: TRANSACTION AMOUNT - UNIT (NM) <b>optional </b> 063 * <li>FT1-13: DEPARTMENT CODE (ST) <b>optional </b> 064 * <li>FT1-14: INSURANCE PLAN ID (ID) <b>optional </b> 065 * <li>FT1-15: INSURANCE AMOUNT (NM) <b>optional </b> 066 * <li>FT1-16: PATIENT LOCATION (ST) <b>optional </b> 067 * <li>FT1-17: FEE SCHEDULE (ID) <b>optional </b> 068 * <li>FT1-18: PATIENT TYPE (ID) <b>optional </b> 069 * <li>FT1-19: DIAGNOSIS CODE (ID) <b>optional </b> 070 * <li>FT1-20: PERFORMED BY CODE (CN) <b>optional </b> 071 * <li>FT1-21: ORDERED BY CODE (CN) <b>optional </b> 072 * <li>FT1-22: UNIT COST (NM) <b>optional </b> 073 * </ul> 074 */ 075@SuppressWarnings("unused") 076public class FT1 extends AbstractSegment { 077 078 /** 079 * Creates a new FT1 segment 080 */ 081 public FT1(Group parent, ModelClassFactory factory) { 082 super(parent, factory); 083 init(factory); 084 } 085 086 private void init(ModelClassFactory factory) { 087 try { 088 this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "SET ID - FINANCIAL TRANSACTION"); 089 this.add(ST.class, false, 1, 12, new Object[]{ getMessage() }, "TRANSACTION ID"); 090 this.add(ST.class, false, 1, 5, new Object[]{ getMessage() }, "TRANSACTION BATCH ID"); 091 this.add(DT.class, true, 1, 8, new Object[]{ getMessage() }, "TRANSACTION DATE"); 092 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "TRANSACTION POSTING DATE"); 093 this.add(ID.class, true, 1, 8, new Object[]{ getMessage(), new Integer(17) }, "TRANSACTION TYPE"); 094 this.add(ID.class, true, 1, 20, new Object[]{ getMessage(), new Integer(96) }, "TRANSACTION CODE"); 095 this.add(ST.class, false, 1, 40, new Object[]{ getMessage() }, "TRANSACTION DESCRIPTION"); 096 this.add(ST.class, false, 1, 40, new Object[]{ getMessage() }, "TRANSACTION DESCRIPTION - ALT"); 097 this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "TRANSACTION AMOUNT - EXTENDED"); 098 this.add(NM.class, false, 1, 4, new Object[]{ getMessage() }, "TRANSACTION QUANTITY"); 099 this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "TRANSACTION AMOUNT - UNIT"); 100 this.add(ST.class, false, 1, 16, new Object[]{ getMessage() }, "DEPARTMENT CODE"); 101 this.add(ID.class, false, 1, 8, new Object[]{ getMessage(), new Integer(72) }, "INSURANCE PLAN ID"); 102 this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "INSURANCE AMOUNT"); 103 this.add(ST.class, false, 1, 12, new Object[]{ getMessage() }, "PATIENT LOCATION"); 104 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(24) }, "FEE SCHEDULE"); 105 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(18) }, "PATIENT TYPE"); 106 this.add(ID.class, false, 1, 8, new Object[]{ getMessage(), new Integer(51) }, "DIAGNOSIS CODE"); 107 this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "PERFORMED BY CODE"); 108 this.add(CN.class, false, 1, 60, new Object[]{ getMessage() }, "ORDERED BY CODE"); 109 this.add(NM.class, false, 1, 12, new Object[]{ getMessage() }, "UNIT COST"); 110 } catch(HL7Exception e) { 111 log.error("Unexpected error creating FT1 - this is probably a bug in the source code generator.", e); 112 } 113 } 114 115 116 117 /** 118 * Returns 119 * FT1-1: "SET ID - FINANCIAL TRANSACTION" - creates it if necessary 120 */ 121 public SI getSETIDFINANCIALTRANSACTION() { 122 SI retVal = this.getTypedField(1, 0); 123 return retVal; 124 } 125 126 /** 127 * Returns 128 * FT1-1: "SET ID - FINANCIAL TRANSACTION" - creates it if necessary 129 */ 130 public SI getFt11_SETIDFINANCIALTRANSACTION() { 131 SI retVal = this.getTypedField(1, 0); 132 return retVal; 133 } 134 135 136 137 /** 138 * Returns 139 * FT1-2: "TRANSACTION ID" - creates it if necessary 140 */ 141 public ST getTRANSACTIONID() { 142 ST retVal = this.getTypedField(2, 0); 143 return retVal; 144 } 145 146 /** 147 * Returns 148 * FT1-2: "TRANSACTION ID" - creates it if necessary 149 */ 150 public ST getFt12_TRANSACTIONID() { 151 ST retVal = this.getTypedField(2, 0); 152 return retVal; 153 } 154 155 156 157 /** 158 * Returns 159 * FT1-3: "TRANSACTION BATCH ID" - creates it if necessary 160 */ 161 public ST getTRANSACTIONBATCHID() { 162 ST retVal = this.getTypedField(3, 0); 163 return retVal; 164 } 165 166 /** 167 * Returns 168 * FT1-3: "TRANSACTION BATCH ID" - creates it if necessary 169 */ 170 public ST getFt13_TRANSACTIONBATCHID() { 171 ST retVal = this.getTypedField(3, 0); 172 return retVal; 173 } 174 175 176 177 /** 178 * Returns 179 * FT1-4: "TRANSACTION DATE" - creates it if necessary 180 */ 181 public DT getTRANSACTIONDATE() { 182 DT retVal = this.getTypedField(4, 0); 183 return retVal; 184 } 185 186 /** 187 * Returns 188 * FT1-4: "TRANSACTION DATE" - creates it if necessary 189 */ 190 public DT getFt14_TRANSACTIONDATE() { 191 DT retVal = this.getTypedField(4, 0); 192 return retVal; 193 } 194 195 196 197 /** 198 * Returns 199 * FT1-5: "TRANSACTION POSTING DATE" - creates it if necessary 200 */ 201 public DT getTRANSACTIONPOSTINGDATE() { 202 DT retVal = this.getTypedField(5, 0); 203 return retVal; 204 } 205 206 /** 207 * Returns 208 * FT1-5: "TRANSACTION POSTING DATE" - creates it if necessary 209 */ 210 public DT getFt15_TRANSACTIONPOSTINGDATE() { 211 DT retVal = this.getTypedField(5, 0); 212 return retVal; 213 } 214 215 216 217 /** 218 * Returns 219 * FT1-6: "TRANSACTION TYPE" - creates it if necessary 220 */ 221 public ID getTRANSACTIONTYPE() { 222 ID retVal = this.getTypedField(6, 0); 223 return retVal; 224 } 225 226 /** 227 * Returns 228 * FT1-6: "TRANSACTION TYPE" - creates it if necessary 229 */ 230 public ID getFt16_TRANSACTIONTYPE() { 231 ID retVal = this.getTypedField(6, 0); 232 return retVal; 233 } 234 235 236 237 /** 238 * Returns 239 * FT1-7: "TRANSACTION CODE" - creates it if necessary 240 */ 241 public ID getTRANSACTIONCODE() { 242 ID retVal = this.getTypedField(7, 0); 243 return retVal; 244 } 245 246 /** 247 * Returns 248 * FT1-7: "TRANSACTION CODE" - creates it if necessary 249 */ 250 public ID getFt17_TRANSACTIONCODE() { 251 ID retVal = this.getTypedField(7, 0); 252 return retVal; 253 } 254 255 256 257 /** 258 * Returns 259 * FT1-8: "TRANSACTION DESCRIPTION" - creates it if necessary 260 */ 261 public ST getTRANSACTIONDESCRIPTION() { 262 ST retVal = this.getTypedField(8, 0); 263 return retVal; 264 } 265 266 /** 267 * Returns 268 * FT1-8: "TRANSACTION DESCRIPTION" - creates it if necessary 269 */ 270 public ST getFt18_TRANSACTIONDESCRIPTION() { 271 ST retVal = this.getTypedField(8, 0); 272 return retVal; 273 } 274 275 276 277 /** 278 * Returns 279 * FT1-9: "TRANSACTION DESCRIPTION - ALT" - creates it if necessary 280 */ 281 public ST getTRANSACTIONDESCRIPTIONALT() { 282 ST retVal = this.getTypedField(9, 0); 283 return retVal; 284 } 285 286 /** 287 * Returns 288 * FT1-9: "TRANSACTION DESCRIPTION - ALT" - creates it if necessary 289 */ 290 public ST getFt19_TRANSACTIONDESCRIPTIONALT() { 291 ST retVal = this.getTypedField(9, 0); 292 return retVal; 293 } 294 295 296 297 /** 298 * Returns 299 * FT1-10: "TRANSACTION AMOUNT - EXTENDED" - creates it if necessary 300 */ 301 public NM getTRANSACTIONAMOUNTEXTENDED() { 302 NM retVal = this.getTypedField(10, 0); 303 return retVal; 304 } 305 306 /** 307 * Returns 308 * FT1-10: "TRANSACTION AMOUNT - EXTENDED" - creates it if necessary 309 */ 310 public NM getFt110_TRANSACTIONAMOUNTEXTENDED() { 311 NM retVal = this.getTypedField(10, 0); 312 return retVal; 313 } 314 315 316 317 /** 318 * Returns 319 * FT1-11: "TRANSACTION QUANTITY" - creates it if necessary 320 */ 321 public NM getTRANSACTIONQUANTITY() { 322 NM retVal = this.getTypedField(11, 0); 323 return retVal; 324 } 325 326 /** 327 * Returns 328 * FT1-11: "TRANSACTION QUANTITY" - creates it if necessary 329 */ 330 public NM getFt111_TRANSACTIONQUANTITY() { 331 NM retVal = this.getTypedField(11, 0); 332 return retVal; 333 } 334 335 336 337 /** 338 * Returns 339 * FT1-12: "TRANSACTION AMOUNT - UNIT" - creates it if necessary 340 */ 341 public NM getTRANSACTIONAMOUNTUNIT() { 342 NM retVal = this.getTypedField(12, 0); 343 return retVal; 344 } 345 346 /** 347 * Returns 348 * FT1-12: "TRANSACTION AMOUNT - UNIT" - creates it if necessary 349 */ 350 public NM getFt112_TRANSACTIONAMOUNTUNIT() { 351 NM retVal = this.getTypedField(12, 0); 352 return retVal; 353 } 354 355 356 357 /** 358 * Returns 359 * FT1-13: "DEPARTMENT CODE" - creates it if necessary 360 */ 361 public ST getDEPARTMENTCODE() { 362 ST retVal = this.getTypedField(13, 0); 363 return retVal; 364 } 365 366 /** 367 * Returns 368 * FT1-13: "DEPARTMENT CODE" - creates it if necessary 369 */ 370 public ST getFt113_DEPARTMENTCODE() { 371 ST retVal = this.getTypedField(13, 0); 372 return retVal; 373 } 374 375 376 377 /** 378 * Returns 379 * FT1-14: "INSURANCE PLAN ID" - creates it if necessary 380 */ 381 public ID getINSURANCEPLANID() { 382 ID retVal = this.getTypedField(14, 0); 383 return retVal; 384 } 385 386 /** 387 * Returns 388 * FT1-14: "INSURANCE PLAN ID" - creates it if necessary 389 */ 390 public ID getFt114_INSURANCEPLANID() { 391 ID retVal = this.getTypedField(14, 0); 392 return retVal; 393 } 394 395 396 397 /** 398 * Returns 399 * FT1-15: "INSURANCE AMOUNT" - creates it if necessary 400 */ 401 public NM getINSURANCEAMOUNT() { 402 NM retVal = this.getTypedField(15, 0); 403 return retVal; 404 } 405 406 /** 407 * Returns 408 * FT1-15: "INSURANCE AMOUNT" - creates it if necessary 409 */ 410 public NM getFt115_INSURANCEAMOUNT() { 411 NM retVal = this.getTypedField(15, 0); 412 return retVal; 413 } 414 415 416 417 /** 418 * Returns 419 * FT1-16: "PATIENT LOCATION" - creates it if necessary 420 */ 421 public ST getPATIENTLOCATION() { 422 ST retVal = this.getTypedField(16, 0); 423 return retVal; 424 } 425 426 /** 427 * Returns 428 * FT1-16: "PATIENT LOCATION" - creates it if necessary 429 */ 430 public ST getFt116_PATIENTLOCATION() { 431 ST retVal = this.getTypedField(16, 0); 432 return retVal; 433 } 434 435 436 437 /** 438 * Returns 439 * FT1-17: "FEE SCHEDULE" - creates it if necessary 440 */ 441 public ID getFEESCHEDULE() { 442 ID retVal = this.getTypedField(17, 0); 443 return retVal; 444 } 445 446 /** 447 * Returns 448 * FT1-17: "FEE SCHEDULE" - creates it if necessary 449 */ 450 public ID getFt117_FEESCHEDULE() { 451 ID retVal = this.getTypedField(17, 0); 452 return retVal; 453 } 454 455 456 457 /** 458 * Returns 459 * FT1-18: "PATIENT TYPE" - creates it if necessary 460 */ 461 public ID getPATIENTTYPE() { 462 ID retVal = this.getTypedField(18, 0); 463 return retVal; 464 } 465 466 /** 467 * Returns 468 * FT1-18: "PATIENT TYPE" - creates it if necessary 469 */ 470 public ID getFt118_PATIENTTYPE() { 471 ID retVal = this.getTypedField(18, 0); 472 return retVal; 473 } 474 475 476 477 /** 478 * Returns 479 * FT1-19: "DIAGNOSIS CODE" - creates it if necessary 480 */ 481 public ID getDIAGNOSISCODE() { 482 ID retVal = this.getTypedField(19, 0); 483 return retVal; 484 } 485 486 /** 487 * Returns 488 * FT1-19: "DIAGNOSIS CODE" - creates it if necessary 489 */ 490 public ID getFt119_DIAGNOSISCODE() { 491 ID retVal = this.getTypedField(19, 0); 492 return retVal; 493 } 494 495 496 497 /** 498 * Returns 499 * FT1-20: "PERFORMED BY CODE" - creates it if necessary 500 */ 501 public CN getPERFORMEDBYCODE() { 502 CN retVal = this.getTypedField(20, 0); 503 return retVal; 504 } 505 506 /** 507 * Returns 508 * FT1-20: "PERFORMED BY CODE" - creates it if necessary 509 */ 510 public CN getFt120_PERFORMEDBYCODE() { 511 CN retVal = this.getTypedField(20, 0); 512 return retVal; 513 } 514 515 516 517 /** 518 * Returns 519 * FT1-21: "ORDERED BY CODE" - creates it if necessary 520 */ 521 public CN getORDEREDBYCODE() { 522 CN retVal = this.getTypedField(21, 0); 523 return retVal; 524 } 525 526 /** 527 * Returns 528 * FT1-21: "ORDERED BY CODE" - creates it if necessary 529 */ 530 public CN getFt121_ORDEREDBYCODE() { 531 CN retVal = this.getTypedField(21, 0); 532 return retVal; 533 } 534 535 536 537 /** 538 * Returns 539 * FT1-22: "UNIT COST" - creates it if necessary 540 */ 541 public NM getUNITCOST() { 542 NM retVal = this.getTypedField(22, 0); 543 return retVal; 544 } 545 546 /** 547 * Returns 548 * FT1-22: "UNIT COST" - creates it if necessary 549 */ 550 public NM getFt122_UNITCOST() { 551 NM retVal = this.getTypedField(22, 0); 552 return retVal; 553 } 554 555 556 557 558 559 /** {@inheritDoc} */ 560 protected Type createNewTypeWithoutReflection(int field) { 561 switch (field) { 562 case 0: return new SI(getMessage()); 563 case 1: return new ST(getMessage()); 564 case 2: return new ST(getMessage()); 565 case 3: return new DT(getMessage()); 566 case 4: return new DT(getMessage()); 567 case 5: return new ID(getMessage(), new Integer( 17 )); 568 case 6: return new ID(getMessage(), new Integer( 96 )); 569 case 7: return new ST(getMessage()); 570 case 8: return new ST(getMessage()); 571 case 9: return new NM(getMessage()); 572 case 10: return new NM(getMessage()); 573 case 11: return new NM(getMessage()); 574 case 12: return new ST(getMessage()); 575 case 13: return new ID(getMessage(), new Integer( 72 )); 576 case 14: return new NM(getMessage()); 577 case 15: return new ST(getMessage()); 578 case 16: return new ID(getMessage(), new Integer( 24 )); 579 case 17: return new ID(getMessage(), new Integer( 18 )); 580 case 18: return new ID(getMessage(), new Integer( 51 )); 581 case 19: return new CN(getMessage()); 582 case 20: return new CN(getMessage()); 583 case 21: return new NM(getMessage()); 584 default: return null; 585 } 586 } 587 588 589} 590