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.v231.segment; 035 036// import ca.uhn.hl7v2.model.v231.group.*; 037import ca.uhn.hl7v2.model.v231.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 PV2 message segment (PV2 - patient visit - additional information segment). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>PV2-1: Prior Pending Location (PL) <b>optional </b> 052 * <li>PV2-2: Accommodation Code (CE) <b>optional </b> 053 * <li>PV2-3: Admit Reason (CE) <b>optional </b> 054 * <li>PV2-4: Transfer Reason (CE) <b>optional </b> 055 * <li>PV2-5: Patient Valuables (ST) <b>optional repeating</b> 056 * <li>PV2-6: Patient Valuables Location (ST) <b>optional </b> 057 * <li>PV2-7: Visit User Code (IS) <b>optional </b> 058 * <li>PV2-8: Expected Admit Date/Time (TS) <b>optional </b> 059 * <li>PV2-9: Expected Discharge Date/Time (TS) <b>optional </b> 060 * <li>PV2-10: Estimated Length of Inpatient Stay (NM) <b>optional </b> 061 * <li>PV2-11: Actual Length of Inpatient Stay (NM) <b>optional </b> 062 * <li>PV2-12: Visit Description (ST) <b>optional </b> 063 * <li>PV2-13: Referral Source Code (XCN) <b>optional repeating</b> 064 * <li>PV2-14: Previous Service Date (DT) <b>optional </b> 065 * <li>PV2-15: Employment Illness Related Indicator (ID) <b>optional </b> 066 * <li>PV2-16: Purge Status Code (IS) <b>optional </b> 067 * <li>PV2-17: Purge Status Date (DT) <b>optional </b> 068 * <li>PV2-18: Special Program Code (IS) <b>optional </b> 069 * <li>PV2-19: Retention Indicator (ID) <b>optional </b> 070 * <li>PV2-20: Expected Number of Insurance Plans (NM) <b>optional </b> 071 * <li>PV2-21: Visit Publicity Code (IS) <b>optional </b> 072 * <li>PV2-22: Visit Protection Indicator (ID) <b>optional </b> 073 * <li>PV2-23: Clinic Organization Name (XON) <b>optional repeating</b> 074 * <li>PV2-24: Patient Status Code (IS) <b>optional </b> 075 * <li>PV2-25: Visit Priority Code (IS) <b>optional </b> 076 * <li>PV2-26: Previous Treatment Date (DT) <b>optional </b> 077 * <li>PV2-27: Expected Discharge Disposition (IS) <b>optional </b> 078 * <li>PV2-28: Signature on File Date (DT) <b>optional </b> 079 * <li>PV2-29: First Similar Illness Date (DT) <b>optional </b> 080 * <li>PV2-30: Patient Charge Adjustment Code (CE) <b>optional </b> 081 * <li>PV2-31: Recurring Service Code (IS) <b>optional </b> 082 * <li>PV2-32: Billing Media Code (ID) <b>optional </b> 083 * <li>PV2-33: Expected Surgery Date & Time (TS) <b>optional </b> 084 * <li>PV2-34: Military Partnership Code (ID) <b>optional </b> 085 * <li>PV2-35: Military Non-Availability Code (ID) <b>optional </b> 086 * <li>PV2-36: Newborn Baby Indicator (ID) <b>optional </b> 087 * <li>PV2-37: Baby Detained Indicator (ID) <b>optional </b> 088 * </ul> 089 */ 090@SuppressWarnings("unused") 091public class PV2 extends AbstractSegment { 092 093 /** 094 * Creates a new PV2 segment 095 */ 096 public PV2(Group parent, ModelClassFactory factory) { 097 super(parent, factory); 098 init(factory); 099 } 100 101 private void init(ModelClassFactory factory) { 102 try { 103 this.add(PL.class, false, 1, 80, new Object[]{ getMessage() }, "Prior Pending Location"); 104 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Accommodation Code"); 105 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Admit Reason"); 106 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Transfer Reason"); 107 this.add(ST.class, false, 0, 25, new Object[]{ getMessage() }, "Patient Valuables"); 108 this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Patient Valuables Location"); 109 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(130) }, "Visit User Code"); 110 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Admit Date/Time"); 111 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Discharge Date/Time"); 112 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Estimated Length of Inpatient Stay"); 113 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Actual Length of Inpatient Stay"); 114 this.add(ST.class, false, 1, 50, new Object[]{ getMessage() }, "Visit Description"); 115 this.add(XCN.class, false, 0, 90, new Object[]{ getMessage() }, "Referral Source Code"); 116 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Service Date"); 117 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Employment Illness Related Indicator"); 118 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(213) }, "Purge Status Code"); 119 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Purge Status Date"); 120 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(214) }, "Special Program Code"); 121 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Retention Indicator"); 122 this.add(NM.class, false, 1, 1, new Object[]{ getMessage() }, "Expected Number of Insurance Plans"); 123 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(215) }, "Visit Publicity Code"); 124 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Visit Protection Indicator"); 125 this.add(XON.class, false, 0, 90, new Object[]{ getMessage() }, "Clinic Organization Name"); 126 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(216) }, "Patient Status Code"); 127 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(217) }, "Visit Priority Code"); 128 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Treatment Date"); 129 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(112) }, "Expected Discharge Disposition"); 130 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Signature on File Date"); 131 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "First Similar Illness Date"); 132 this.add(CE.class, false, 1, 80, new Object[]{ getMessage() }, "Patient Charge Adjustment Code"); 133 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(219) }, "Recurring Service Code"); 134 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Billing Media Code"); 135 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Surgery Date & Time"); 136 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Partnership Code"); 137 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Non-Availability Code"); 138 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Newborn Baby Indicator"); 139 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Baby Detained Indicator"); 140 } catch(HL7Exception e) { 141 log.error("Unexpected error creating PV2 - this is probably a bug in the source code generator.", e); 142 } 143 } 144 145 146 147 /** 148 * Returns 149 * PV2-1: "Prior Pending Location" - creates it if necessary 150 */ 151 public PL getPriorPendingLocation() { 152 PL retVal = this.getTypedField(1, 0); 153 return retVal; 154 } 155 156 /** 157 * Returns 158 * PV2-1: "Prior Pending Location" - creates it if necessary 159 */ 160 public PL getPv21_PriorPendingLocation() { 161 PL retVal = this.getTypedField(1, 0); 162 return retVal; 163 } 164 165 166 167 /** 168 * Returns 169 * PV2-2: "Accommodation Code" - creates it if necessary 170 */ 171 public CE getAccommodationCode() { 172 CE retVal = this.getTypedField(2, 0); 173 return retVal; 174 } 175 176 /** 177 * Returns 178 * PV2-2: "Accommodation Code" - creates it if necessary 179 */ 180 public CE getPv22_AccommodationCode() { 181 CE retVal = this.getTypedField(2, 0); 182 return retVal; 183 } 184 185 186 187 /** 188 * Returns 189 * PV2-3: "Admit Reason" - creates it if necessary 190 */ 191 public CE getAdmitReason() { 192 CE retVal = this.getTypedField(3, 0); 193 return retVal; 194 } 195 196 /** 197 * Returns 198 * PV2-3: "Admit Reason" - creates it if necessary 199 */ 200 public CE getPv23_AdmitReason() { 201 CE retVal = this.getTypedField(3, 0); 202 return retVal; 203 } 204 205 206 207 /** 208 * Returns 209 * PV2-4: "Transfer Reason" - creates it if necessary 210 */ 211 public CE getTransferReason() { 212 CE retVal = this.getTypedField(4, 0); 213 return retVal; 214 } 215 216 /** 217 * Returns 218 * PV2-4: "Transfer Reason" - creates it if necessary 219 */ 220 public CE getPv24_TransferReason() { 221 CE retVal = this.getTypedField(4, 0); 222 return retVal; 223 } 224 225 226 /** 227 * Returns all repetitions of Patient Valuables (PV2-5). 228 */ 229 public ST[] getPatientValuables() { 230 ST[] retVal = this.getTypedField(5, new ST[0]); 231 return retVal; 232 } 233 234 235 /** 236 * Returns all repetitions of Patient Valuables (PV2-5). 237 */ 238 public ST[] getPv25_PatientValuables() { 239 ST[] retVal = this.getTypedField(5, new ST[0]); 240 return retVal; 241 } 242 243 244 /** 245 * Returns a count of the current number of repetitions of Patient Valuables (PV2-5). 246 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 247 * it will return zero. 248 */ 249 public int getPatientValuablesReps() { 250 return this.getReps(5); 251 } 252 253 254 /** 255 * Returns a specific repetition of 256 * PV2-5: "Patient Valuables" - creates it if necessary 257 * 258 * @param rep The repetition index (0-indexed) 259 */ 260 public ST getPatientValuables(int rep) { 261 ST retVal = this.getTypedField(5, rep); 262 return retVal; 263 } 264 265 /** 266 * Returns a specific repetition of 267 * PV2-5: "Patient Valuables" - creates it if necessary 268 * 269 * @param rep The repetition index (0-indexed) 270 */ 271 public ST getPv25_PatientValuables(int rep) { 272 ST retVal = this.getTypedField(5, rep); 273 return retVal; 274 } 275 276 /** 277 * Returns a count of the current number of repetitions of Patient Valuables (PV2-5). 278 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 279 * it will return zero. 280 */ 281 public int getPv25_PatientValuablesReps() { 282 return this.getReps(5); 283 } 284 285 286 /** 287 * Inserts a repetition of 288 * PV2-5: "Patient Valuables" at a specific index 289 * 290 * @param rep The repetition index (0-indexed) 291 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 292 */ 293 public ST insertPatientValuables(int rep) throws HL7Exception { 294 return (ST) super.insertRepetition(5, rep); 295 } 296 297 298 /** 299 * Inserts a repetition of 300 * PV2-5: "Patient Valuables" at a specific index 301 * 302 * @param rep The repetition index (0-indexed) 303 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 304 */ 305 public ST insertPv25_PatientValuables(int rep) throws HL7Exception { 306 return (ST) super.insertRepetition(5, rep); 307 } 308 309 310 /** 311 * Removes a repetition of 312 * PV2-5: "Patient Valuables" at a specific index 313 * 314 * @param rep The repetition index (0-indexed) 315 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 316 */ 317 public ST removePatientValuables(int rep) throws HL7Exception { 318 return (ST) super.removeRepetition(5, rep); 319 } 320 321 322 /** 323 * Removes a repetition of 324 * PV2-5: "Patient Valuables" at a specific index 325 * 326 * @param rep The repetition index (0-indexed) 327 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 328 */ 329 public ST removePv25_PatientValuables(int rep) throws HL7Exception { 330 return (ST) super.removeRepetition(5, rep); 331 } 332 333 334 335 336 /** 337 * Returns 338 * PV2-6: "Patient Valuables Location" - creates it if necessary 339 */ 340 public ST getPatientValuablesLocation() { 341 ST retVal = this.getTypedField(6, 0); 342 return retVal; 343 } 344 345 /** 346 * Returns 347 * PV2-6: "Patient Valuables Location" - creates it if necessary 348 */ 349 public ST getPv26_PatientValuablesLocation() { 350 ST retVal = this.getTypedField(6, 0); 351 return retVal; 352 } 353 354 355 356 /** 357 * Returns 358 * PV2-7: "Visit User Code" - creates it if necessary 359 */ 360 public IS getVisitUserCode() { 361 IS retVal = this.getTypedField(7, 0); 362 return retVal; 363 } 364 365 /** 366 * Returns 367 * PV2-7: "Visit User Code" - creates it if necessary 368 */ 369 public IS getPv27_VisitUserCode() { 370 IS retVal = this.getTypedField(7, 0); 371 return retVal; 372 } 373 374 375 376 /** 377 * Returns 378 * PV2-8: "Expected Admit Date/Time" - creates it if necessary 379 */ 380 public TS getExpectedAdmitDateTime() { 381 TS retVal = this.getTypedField(8, 0); 382 return retVal; 383 } 384 385 /** 386 * Returns 387 * PV2-8: "Expected Admit Date/Time" - creates it if necessary 388 */ 389 public TS getPv28_ExpectedAdmitDateTime() { 390 TS retVal = this.getTypedField(8, 0); 391 return retVal; 392 } 393 394 395 396 /** 397 * Returns 398 * PV2-9: "Expected Discharge Date/Time" - creates it if necessary 399 */ 400 public TS getExpectedDischargeDateTime() { 401 TS retVal = this.getTypedField(9, 0); 402 return retVal; 403 } 404 405 /** 406 * Returns 407 * PV2-9: "Expected Discharge Date/Time" - creates it if necessary 408 */ 409 public TS getPv29_ExpectedDischargeDateTime() { 410 TS retVal = this.getTypedField(9, 0); 411 return retVal; 412 } 413 414 415 416 /** 417 * Returns 418 * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary 419 */ 420 public NM getEstimatedLengthOfInpatientStay() { 421 NM retVal = this.getTypedField(10, 0); 422 return retVal; 423 } 424 425 /** 426 * Returns 427 * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary 428 */ 429 public NM getPv210_EstimatedLengthOfInpatientStay() { 430 NM retVal = this.getTypedField(10, 0); 431 return retVal; 432 } 433 434 435 436 /** 437 * Returns 438 * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary 439 */ 440 public NM getActualLengthOfInpatientStay() { 441 NM retVal = this.getTypedField(11, 0); 442 return retVal; 443 } 444 445 /** 446 * Returns 447 * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary 448 */ 449 public NM getPv211_ActualLengthOfInpatientStay() { 450 NM retVal = this.getTypedField(11, 0); 451 return retVal; 452 } 453 454 455 456 /** 457 * Returns 458 * PV2-12: "Visit Description" - creates it if necessary 459 */ 460 public ST getVisitDescription() { 461 ST retVal = this.getTypedField(12, 0); 462 return retVal; 463 } 464 465 /** 466 * Returns 467 * PV2-12: "Visit Description" - creates it if necessary 468 */ 469 public ST getPv212_VisitDescription() { 470 ST retVal = this.getTypedField(12, 0); 471 return retVal; 472 } 473 474 475 /** 476 * Returns all repetitions of Referral Source Code (PV2-13). 477 */ 478 public XCN[] getReferralSourceCode() { 479 XCN[] retVal = this.getTypedField(13, new XCN[0]); 480 return retVal; 481 } 482 483 484 /** 485 * Returns all repetitions of Referral Source Code (PV2-13). 486 */ 487 public XCN[] getPv213_ReferralSourceCode() { 488 XCN[] retVal = this.getTypedField(13, new XCN[0]); 489 return retVal; 490 } 491 492 493 /** 494 * Returns a count of the current number of repetitions of Referral Source Code (PV2-13). 495 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 496 * it will return zero. 497 */ 498 public int getReferralSourceCodeReps() { 499 return this.getReps(13); 500 } 501 502 503 /** 504 * Returns a specific repetition of 505 * PV2-13: "Referral Source Code" - creates it if necessary 506 * 507 * @param rep The repetition index (0-indexed) 508 */ 509 public XCN getReferralSourceCode(int rep) { 510 XCN retVal = this.getTypedField(13, rep); 511 return retVal; 512 } 513 514 /** 515 * Returns a specific repetition of 516 * PV2-13: "Referral Source Code" - creates it if necessary 517 * 518 * @param rep The repetition index (0-indexed) 519 */ 520 public XCN getPv213_ReferralSourceCode(int rep) { 521 XCN retVal = this.getTypedField(13, rep); 522 return retVal; 523 } 524 525 /** 526 * Returns a count of the current number of repetitions of Referral Source Code (PV2-13). 527 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 528 * it will return zero. 529 */ 530 public int getPv213_ReferralSourceCodeReps() { 531 return this.getReps(13); 532 } 533 534 535 /** 536 * Inserts a repetition of 537 * PV2-13: "Referral Source Code" at a specific index 538 * 539 * @param rep The repetition index (0-indexed) 540 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 541 */ 542 public XCN insertReferralSourceCode(int rep) throws HL7Exception { 543 return (XCN) super.insertRepetition(13, rep); 544 } 545 546 547 /** 548 * Inserts a repetition of 549 * PV2-13: "Referral Source Code" at a specific index 550 * 551 * @param rep The repetition index (0-indexed) 552 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 553 */ 554 public XCN insertPv213_ReferralSourceCode(int rep) throws HL7Exception { 555 return (XCN) super.insertRepetition(13, rep); 556 } 557 558 559 /** 560 * Removes a repetition of 561 * PV2-13: "Referral Source Code" at a specific index 562 * 563 * @param rep The repetition index (0-indexed) 564 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 565 */ 566 public XCN removeReferralSourceCode(int rep) throws HL7Exception { 567 return (XCN) super.removeRepetition(13, rep); 568 } 569 570 571 /** 572 * Removes a repetition of 573 * PV2-13: "Referral Source Code" at a specific index 574 * 575 * @param rep The repetition index (0-indexed) 576 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 577 */ 578 public XCN removePv213_ReferralSourceCode(int rep) throws HL7Exception { 579 return (XCN) super.removeRepetition(13, rep); 580 } 581 582 583 584 585 /** 586 * Returns 587 * PV2-14: "Previous Service Date" - creates it if necessary 588 */ 589 public DT getPreviousServiceDate() { 590 DT retVal = this.getTypedField(14, 0); 591 return retVal; 592 } 593 594 /** 595 * Returns 596 * PV2-14: "Previous Service Date" - creates it if necessary 597 */ 598 public DT getPv214_PreviousServiceDate() { 599 DT retVal = this.getTypedField(14, 0); 600 return retVal; 601 } 602 603 604 605 /** 606 * Returns 607 * PV2-15: "Employment Illness Related Indicator" - creates it if necessary 608 */ 609 public ID getEmploymentIllnessRelatedIndicator() { 610 ID retVal = this.getTypedField(15, 0); 611 return retVal; 612 } 613 614 /** 615 * Returns 616 * PV2-15: "Employment Illness Related Indicator" - creates it if necessary 617 */ 618 public ID getPv215_EmploymentIllnessRelatedIndicator() { 619 ID retVal = this.getTypedField(15, 0); 620 return retVal; 621 } 622 623 624 625 /** 626 * Returns 627 * PV2-16: "Purge Status Code" - creates it if necessary 628 */ 629 public IS getPurgeStatusCode() { 630 IS retVal = this.getTypedField(16, 0); 631 return retVal; 632 } 633 634 /** 635 * Returns 636 * PV2-16: "Purge Status Code" - creates it if necessary 637 */ 638 public IS getPv216_PurgeStatusCode() { 639 IS retVal = this.getTypedField(16, 0); 640 return retVal; 641 } 642 643 644 645 /** 646 * Returns 647 * PV2-17: "Purge Status Date" - creates it if necessary 648 */ 649 public DT getPurgeStatusDate() { 650 DT retVal = this.getTypedField(17, 0); 651 return retVal; 652 } 653 654 /** 655 * Returns 656 * PV2-17: "Purge Status Date" - creates it if necessary 657 */ 658 public DT getPv217_PurgeStatusDate() { 659 DT retVal = this.getTypedField(17, 0); 660 return retVal; 661 } 662 663 664 665 /** 666 * Returns 667 * PV2-18: "Special Program Code" - creates it if necessary 668 */ 669 public IS getSpecialProgramCode() { 670 IS retVal = this.getTypedField(18, 0); 671 return retVal; 672 } 673 674 /** 675 * Returns 676 * PV2-18: "Special Program Code" - creates it if necessary 677 */ 678 public IS getPv218_SpecialProgramCode() { 679 IS retVal = this.getTypedField(18, 0); 680 return retVal; 681 } 682 683 684 685 /** 686 * Returns 687 * PV2-19: "Retention Indicator" - creates it if necessary 688 */ 689 public ID getRetentionIndicator() { 690 ID retVal = this.getTypedField(19, 0); 691 return retVal; 692 } 693 694 /** 695 * Returns 696 * PV2-19: "Retention Indicator" - creates it if necessary 697 */ 698 public ID getPv219_RetentionIndicator() { 699 ID retVal = this.getTypedField(19, 0); 700 return retVal; 701 } 702 703 704 705 /** 706 * Returns 707 * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary 708 */ 709 public NM getExpectedNumberOfInsurancePlans() { 710 NM retVal = this.getTypedField(20, 0); 711 return retVal; 712 } 713 714 /** 715 * Returns 716 * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary 717 */ 718 public NM getPv220_ExpectedNumberOfInsurancePlans() { 719 NM retVal = this.getTypedField(20, 0); 720 return retVal; 721 } 722 723 724 725 /** 726 * Returns 727 * PV2-21: "Visit Publicity Code" - creates it if necessary 728 */ 729 public IS getVisitPublicityCode() { 730 IS retVal = this.getTypedField(21, 0); 731 return retVal; 732 } 733 734 /** 735 * Returns 736 * PV2-21: "Visit Publicity Code" - creates it if necessary 737 */ 738 public IS getPv221_VisitPublicityCode() { 739 IS retVal = this.getTypedField(21, 0); 740 return retVal; 741 } 742 743 744 745 /** 746 * Returns 747 * PV2-22: "Visit Protection Indicator" - creates it if necessary 748 */ 749 public ID getVisitProtectionIndicator() { 750 ID retVal = this.getTypedField(22, 0); 751 return retVal; 752 } 753 754 /** 755 * Returns 756 * PV2-22: "Visit Protection Indicator" - creates it if necessary 757 */ 758 public ID getPv222_VisitProtectionIndicator() { 759 ID retVal = this.getTypedField(22, 0); 760 return retVal; 761 } 762 763 764 /** 765 * Returns all repetitions of Clinic Organization Name (PV2-23). 766 */ 767 public XON[] getClinicOrganizationName() { 768 XON[] retVal = this.getTypedField(23, new XON[0]); 769 return retVal; 770 } 771 772 773 /** 774 * Returns all repetitions of Clinic Organization Name (PV2-23). 775 */ 776 public XON[] getPv223_ClinicOrganizationName() { 777 XON[] retVal = this.getTypedField(23, new XON[0]); 778 return retVal; 779 } 780 781 782 /** 783 * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23). 784 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 785 * it will return zero. 786 */ 787 public int getClinicOrganizationNameReps() { 788 return this.getReps(23); 789 } 790 791 792 /** 793 * Returns a specific repetition of 794 * PV2-23: "Clinic Organization Name" - creates it if necessary 795 * 796 * @param rep The repetition index (0-indexed) 797 */ 798 public XON getClinicOrganizationName(int rep) { 799 XON retVal = this.getTypedField(23, rep); 800 return retVal; 801 } 802 803 /** 804 * Returns a specific repetition of 805 * PV2-23: "Clinic Organization Name" - creates it if necessary 806 * 807 * @param rep The repetition index (0-indexed) 808 */ 809 public XON getPv223_ClinicOrganizationName(int rep) { 810 XON retVal = this.getTypedField(23, rep); 811 return retVal; 812 } 813 814 /** 815 * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23). 816 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 817 * it will return zero. 818 */ 819 public int getPv223_ClinicOrganizationNameReps() { 820 return this.getReps(23); 821 } 822 823 824 /** 825 * Inserts a repetition of 826 * PV2-23: "Clinic Organization Name" at a specific index 827 * 828 * @param rep The repetition index (0-indexed) 829 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 830 */ 831 public XON insertClinicOrganizationName(int rep) throws HL7Exception { 832 return (XON) super.insertRepetition(23, rep); 833 } 834 835 836 /** 837 * Inserts a repetition of 838 * PV2-23: "Clinic Organization Name" at a specific index 839 * 840 * @param rep The repetition index (0-indexed) 841 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 842 */ 843 public XON insertPv223_ClinicOrganizationName(int rep) throws HL7Exception { 844 return (XON) super.insertRepetition(23, rep); 845 } 846 847 848 /** 849 * Removes a repetition of 850 * PV2-23: "Clinic Organization Name" at a specific index 851 * 852 * @param rep The repetition index (0-indexed) 853 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 854 */ 855 public XON removeClinicOrganizationName(int rep) throws HL7Exception { 856 return (XON) super.removeRepetition(23, rep); 857 } 858 859 860 /** 861 * Removes a repetition of 862 * PV2-23: "Clinic Organization Name" at a specific index 863 * 864 * @param rep The repetition index (0-indexed) 865 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 866 */ 867 public XON removePv223_ClinicOrganizationName(int rep) throws HL7Exception { 868 return (XON) super.removeRepetition(23, rep); 869 } 870 871 872 873 874 /** 875 * Returns 876 * PV2-24: "Patient Status Code" - creates it if necessary 877 */ 878 public IS getPatientStatusCode() { 879 IS retVal = this.getTypedField(24, 0); 880 return retVal; 881 } 882 883 /** 884 * Returns 885 * PV2-24: "Patient Status Code" - creates it if necessary 886 */ 887 public IS getPv224_PatientStatusCode() { 888 IS retVal = this.getTypedField(24, 0); 889 return retVal; 890 } 891 892 893 894 /** 895 * Returns 896 * PV2-25: "Visit Priority Code" - creates it if necessary 897 */ 898 public IS getVisitPriorityCode() { 899 IS retVal = this.getTypedField(25, 0); 900 return retVal; 901 } 902 903 /** 904 * Returns 905 * PV2-25: "Visit Priority Code" - creates it if necessary 906 */ 907 public IS getPv225_VisitPriorityCode() { 908 IS retVal = this.getTypedField(25, 0); 909 return retVal; 910 } 911 912 913 914 /** 915 * Returns 916 * PV2-26: "Previous Treatment Date" - creates it if necessary 917 */ 918 public DT getPreviousTreatmentDate() { 919 DT retVal = this.getTypedField(26, 0); 920 return retVal; 921 } 922 923 /** 924 * Returns 925 * PV2-26: "Previous Treatment Date" - creates it if necessary 926 */ 927 public DT getPv226_PreviousTreatmentDate() { 928 DT retVal = this.getTypedField(26, 0); 929 return retVal; 930 } 931 932 933 934 /** 935 * Returns 936 * PV2-27: "Expected Discharge Disposition" - creates it if necessary 937 */ 938 public IS getExpectedDischargeDisposition() { 939 IS retVal = this.getTypedField(27, 0); 940 return retVal; 941 } 942 943 /** 944 * Returns 945 * PV2-27: "Expected Discharge Disposition" - creates it if necessary 946 */ 947 public IS getPv227_ExpectedDischargeDisposition() { 948 IS retVal = this.getTypedField(27, 0); 949 return retVal; 950 } 951 952 953 954 /** 955 * Returns 956 * PV2-28: "Signature on File Date" - creates it if necessary 957 */ 958 public DT getSignatureOnFileDate() { 959 DT retVal = this.getTypedField(28, 0); 960 return retVal; 961 } 962 963 /** 964 * Returns 965 * PV2-28: "Signature on File Date" - creates it if necessary 966 */ 967 public DT getPv228_SignatureOnFileDate() { 968 DT retVal = this.getTypedField(28, 0); 969 return retVal; 970 } 971 972 973 974 /** 975 * Returns 976 * PV2-29: "First Similar Illness Date" - creates it if necessary 977 */ 978 public DT getFirstSimilarIllnessDate() { 979 DT retVal = this.getTypedField(29, 0); 980 return retVal; 981 } 982 983 /** 984 * Returns 985 * PV2-29: "First Similar Illness Date" - creates it if necessary 986 */ 987 public DT getPv229_FirstSimilarIllnessDate() { 988 DT retVal = this.getTypedField(29, 0); 989 return retVal; 990 } 991 992 993 994 /** 995 * Returns 996 * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary 997 */ 998 public CE getPatientChargeAdjustmentCode() { 999 CE retVal = this.getTypedField(30, 0); 1000 return retVal; 1001 } 1002 1003 /** 1004 * Returns 1005 * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary 1006 */ 1007 public CE getPv230_PatientChargeAdjustmentCode() { 1008 CE retVal = this.getTypedField(30, 0); 1009 return retVal; 1010 } 1011 1012 1013 1014 /** 1015 * Returns 1016 * PV2-31: "Recurring Service Code" - creates it if necessary 1017 */ 1018 public IS getRecurringServiceCode() { 1019 IS retVal = this.getTypedField(31, 0); 1020 return retVal; 1021 } 1022 1023 /** 1024 * Returns 1025 * PV2-31: "Recurring Service Code" - creates it if necessary 1026 */ 1027 public IS getPv231_RecurringServiceCode() { 1028 IS retVal = this.getTypedField(31, 0); 1029 return retVal; 1030 } 1031 1032 1033 1034 /** 1035 * Returns 1036 * PV2-32: "Billing Media Code" - creates it if necessary 1037 */ 1038 public ID getBillingMediaCode() { 1039 ID retVal = this.getTypedField(32, 0); 1040 return retVal; 1041 } 1042 1043 /** 1044 * Returns 1045 * PV2-32: "Billing Media Code" - creates it if necessary 1046 */ 1047 public ID getPv232_BillingMediaCode() { 1048 ID retVal = this.getTypedField(32, 0); 1049 return retVal; 1050 } 1051 1052 1053 1054 /** 1055 * Returns 1056 * PV2-33: "Expected Surgery Date & Time" - creates it if necessary 1057 */ 1058 public TS getExpectedSurgeryDateTime() { 1059 TS retVal = this.getTypedField(33, 0); 1060 return retVal; 1061 } 1062 1063 /** 1064 * Returns 1065 * PV2-33: "Expected Surgery Date & Time" - creates it if necessary 1066 */ 1067 public TS getPv233_ExpectedSurgeryDateTime() { 1068 TS retVal = this.getTypedField(33, 0); 1069 return retVal; 1070 } 1071 1072 1073 1074 /** 1075 * Returns 1076 * PV2-34: "Military Partnership Code" - creates it if necessary 1077 */ 1078 public ID getMilitaryPartnershipCode() { 1079 ID retVal = this.getTypedField(34, 0); 1080 return retVal; 1081 } 1082 1083 /** 1084 * Returns 1085 * PV2-34: "Military Partnership Code" - creates it if necessary 1086 */ 1087 public ID getPv234_MilitaryPartnershipCode() { 1088 ID retVal = this.getTypedField(34, 0); 1089 return retVal; 1090 } 1091 1092 1093 1094 /** 1095 * Returns 1096 * PV2-35: "Military Non-Availability Code" - creates it if necessary 1097 */ 1098 public ID getMilitaryNonAvailabilityCode() { 1099 ID retVal = this.getTypedField(35, 0); 1100 return retVal; 1101 } 1102 1103 /** 1104 * Returns 1105 * PV2-35: "Military Non-Availability Code" - creates it if necessary 1106 */ 1107 public ID getPv235_MilitaryNonAvailabilityCode() { 1108 ID retVal = this.getTypedField(35, 0); 1109 return retVal; 1110 } 1111 1112 1113 1114 /** 1115 * Returns 1116 * PV2-36: "Newborn Baby Indicator" - creates it if necessary 1117 */ 1118 public ID getNewbornBabyIndicator() { 1119 ID retVal = this.getTypedField(36, 0); 1120 return retVal; 1121 } 1122 1123 /** 1124 * Returns 1125 * PV2-36: "Newborn Baby Indicator" - creates it if necessary 1126 */ 1127 public ID getPv236_NewbornBabyIndicator() { 1128 ID retVal = this.getTypedField(36, 0); 1129 return retVal; 1130 } 1131 1132 1133 1134 /** 1135 * Returns 1136 * PV2-37: "Baby Detained Indicator" - creates it if necessary 1137 */ 1138 public ID getBabyDetainedIndicator() { 1139 ID retVal = this.getTypedField(37, 0); 1140 return retVal; 1141 } 1142 1143 /** 1144 * Returns 1145 * PV2-37: "Baby Detained Indicator" - creates it if necessary 1146 */ 1147 public ID getPv237_BabyDetainedIndicator() { 1148 ID retVal = this.getTypedField(37, 0); 1149 return retVal; 1150 } 1151 1152 1153 1154 1155 1156 /** {@inheritDoc} */ 1157 protected Type createNewTypeWithoutReflection(int field) { 1158 switch (field) { 1159 case 0: return new PL(getMessage()); 1160 case 1: return new CE(getMessage()); 1161 case 2: return new CE(getMessage()); 1162 case 3: return new CE(getMessage()); 1163 case 4: return new ST(getMessage()); 1164 case 5: return new ST(getMessage()); 1165 case 6: return new IS(getMessage(), new Integer( 130 )); 1166 case 7: return new TS(getMessage()); 1167 case 8: return new TS(getMessage()); 1168 case 9: return new NM(getMessage()); 1169 case 10: return new NM(getMessage()); 1170 case 11: return new ST(getMessage()); 1171 case 12: return new XCN(getMessage()); 1172 case 13: return new DT(getMessage()); 1173 case 14: return new ID(getMessage(), new Integer( 136 )); 1174 case 15: return new IS(getMessage(), new Integer( 213 )); 1175 case 16: return new DT(getMessage()); 1176 case 17: return new IS(getMessage(), new Integer( 214 )); 1177 case 18: return new ID(getMessage(), new Integer( 136 )); 1178 case 19: return new NM(getMessage()); 1179 case 20: return new IS(getMessage(), new Integer( 215 )); 1180 case 21: return new ID(getMessage(), new Integer( 136 )); 1181 case 22: return new XON(getMessage()); 1182 case 23: return new IS(getMessage(), new Integer( 216 )); 1183 case 24: return new IS(getMessage(), new Integer( 217 )); 1184 case 25: return new DT(getMessage()); 1185 case 26: return new IS(getMessage(), new Integer( 112 )); 1186 case 27: return new DT(getMessage()); 1187 case 28: return new DT(getMessage()); 1188 case 29: return new CE(getMessage()); 1189 case 30: return new IS(getMessage(), new Integer( 219 )); 1190 case 31: return new ID(getMessage(), new Integer( 136 )); 1191 case 32: return new TS(getMessage()); 1192 case 33: return new ID(getMessage(), new Integer( 136 )); 1193 case 34: return new ID(getMessage(), new Integer( 136 )); 1194 case 35: return new ID(getMessage(), new Integer( 136 )); 1195 case 36: return new ID(getMessage(), new Integer( 136 )); 1196 default: return null; 1197 } 1198 } 1199 1200 1201} 1202