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.v24.segment; 035 036// import ca.uhn.hl7v2.model.v24.group.*; 037import ca.uhn.hl7v2.model.v24.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 (Patient visit - additional information). 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 repeating</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 and 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 * <li>PV2-38: Mode of Arrival Code (CE) <b>optional </b> 089 * <li>PV2-39: Recreational Drug Use Code (CE) <b>optional repeating</b> 090 * <li>PV2-40: Admission Level of Care Code (CE) <b>optional </b> 091 * <li>PV2-41: Precaution Code (CE) <b>optional repeating</b> 092 * <li>PV2-42: Patient Condition Code (CE) <b>optional </b> 093 * <li>PV2-43: Living Will Code (IS) <b>optional </b> 094 * <li>PV2-44: Organ Donor Code (IS) <b>optional </b> 095 * <li>PV2-45: Advance Directive Code (CE) <b>optional repeating</b> 096 * <li>PV2-46: Patient Status Effective Date (DT) <b>optional </b> 097 * <li>PV2-47: Expected LOA Return Date/Time (TS) <b>optional </b> 098 * </ul> 099 */ 100@SuppressWarnings("unused") 101public class PV2 extends AbstractSegment { 102 103 /** 104 * Creates a new PV2 segment 105 */ 106 public PV2(Group parent, ModelClassFactory factory) { 107 super(parent, factory); 108 init(factory); 109 } 110 111 private void init(ModelClassFactory factory) { 112 try { 113 this.add(PL.class, false, 1, 80, new Object[]{ getMessage() }, "Prior Pending Location"); 114 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Accommodation Code"); 115 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Admit Reason"); 116 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Transfer Reason"); 117 this.add(ST.class, false, 0, 25, new Object[]{ getMessage() }, "Patient Valuables"); 118 this.add(ST.class, false, 1, 25, new Object[]{ getMessage() }, "Patient Valuables Location"); 119 this.add(IS.class, false, 0, 2, new Object[]{ getMessage(), new Integer(130) }, "Visit User Code"); 120 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Admit Date/Time"); 121 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Discharge Date/Time"); 122 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Estimated Length of Inpatient Stay"); 123 this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Actual Length of Inpatient Stay"); 124 this.add(ST.class, false, 1, 50, new Object[]{ getMessage() }, "Visit Description"); 125 this.add(XCN.class, false, 0, 250, new Object[]{ getMessage() }, "Referral Source Code"); 126 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Service Date"); 127 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Employment Illness Related Indicator"); 128 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(213) }, "Purge Status Code"); 129 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Purge Status Date"); 130 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(214) }, "Special Program Code"); 131 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Retention Indicator"); 132 this.add(NM.class, false, 1, 1, new Object[]{ getMessage() }, "Expected Number of Insurance Plans"); 133 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(215) }, "Visit Publicity Code"); 134 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Visit Protection Indicator"); 135 this.add(XON.class, false, 0, 250, new Object[]{ getMessage() }, "Clinic Organization Name"); 136 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(216) }, "Patient Status Code"); 137 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(217) }, "Visit Priority Code"); 138 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Previous Treatment Date"); 139 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(112) }, "Expected Discharge Disposition"); 140 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Signature on File Date"); 141 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "First Similar Illness Date"); 142 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Patient Charge Adjustment Code"); 143 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(219) }, "Recurring Service Code"); 144 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Billing Media Code"); 145 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected Surgery Date and Time"); 146 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Partnership Code"); 147 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Military Non-Availability Code"); 148 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Newborn Baby Indicator"); 149 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Baby Detained Indicator"); 150 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Mode of Arrival Code"); 151 this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Recreational Drug Use Code"); 152 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Admission Level of Care Code"); 153 this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Precaution Code"); 154 this.add(CE.class, false, 1, 250, new Object[]{ getMessage() }, "Patient Condition Code"); 155 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(315) }, "Living Will Code"); 156 this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(316) }, "Organ Donor Code"); 157 this.add(CE.class, false, 0, 250, new Object[]{ getMessage() }, "Advance Directive Code"); 158 this.add(DT.class, false, 1, 8, new Object[]{ getMessage() }, "Patient Status Effective Date"); 159 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Expected LOA Return Date/Time"); 160 } catch(HL7Exception e) { 161 log.error("Unexpected error creating PV2 - this is probably a bug in the source code generator.", e); 162 } 163 } 164 165 166 167 /** 168 * Returns 169 * PV2-1: "Prior Pending Location" - creates it if necessary 170 */ 171 public PL getPriorPendingLocation() { 172 PL retVal = this.getTypedField(1, 0); 173 return retVal; 174 } 175 176 /** 177 * Returns 178 * PV2-1: "Prior Pending Location" - creates it if necessary 179 */ 180 public PL getPv21_PriorPendingLocation() { 181 PL retVal = this.getTypedField(1, 0); 182 return retVal; 183 } 184 185 186 187 /** 188 * Returns 189 * PV2-2: "Accommodation Code" - creates it if necessary 190 */ 191 public CE getAccommodationCode() { 192 CE retVal = this.getTypedField(2, 0); 193 return retVal; 194 } 195 196 /** 197 * Returns 198 * PV2-2: "Accommodation Code" - creates it if necessary 199 */ 200 public CE getPv22_AccommodationCode() { 201 CE retVal = this.getTypedField(2, 0); 202 return retVal; 203 } 204 205 206 207 /** 208 * Returns 209 * PV2-3: "Admit Reason" - creates it if necessary 210 */ 211 public CE getAdmitReason() { 212 CE retVal = this.getTypedField(3, 0); 213 return retVal; 214 } 215 216 /** 217 * Returns 218 * PV2-3: "Admit Reason" - creates it if necessary 219 */ 220 public CE getPv23_AdmitReason() { 221 CE retVal = this.getTypedField(3, 0); 222 return retVal; 223 } 224 225 226 227 /** 228 * Returns 229 * PV2-4: "Transfer Reason" - creates it if necessary 230 */ 231 public CE getTransferReason() { 232 CE retVal = this.getTypedField(4, 0); 233 return retVal; 234 } 235 236 /** 237 * Returns 238 * PV2-4: "Transfer Reason" - creates it if necessary 239 */ 240 public CE getPv24_TransferReason() { 241 CE retVal = this.getTypedField(4, 0); 242 return retVal; 243 } 244 245 246 /** 247 * Returns all repetitions of Patient Valuables (PV2-5). 248 */ 249 public ST[] getPatientValuables() { 250 ST[] retVal = this.getTypedField(5, new ST[0]); 251 return retVal; 252 } 253 254 255 /** 256 * Returns all repetitions of Patient Valuables (PV2-5). 257 */ 258 public ST[] getPv25_PatientValuables() { 259 ST[] retVal = this.getTypedField(5, new ST[0]); 260 return retVal; 261 } 262 263 264 /** 265 * Returns a count of the current number of repetitions of Patient Valuables (PV2-5). 266 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 267 * it will return zero. 268 */ 269 public int getPatientValuablesReps() { 270 return this.getReps(5); 271 } 272 273 274 /** 275 * Returns a specific repetition of 276 * PV2-5: "Patient Valuables" - creates it if necessary 277 * 278 * @param rep The repetition index (0-indexed) 279 */ 280 public ST getPatientValuables(int rep) { 281 ST retVal = this.getTypedField(5, rep); 282 return retVal; 283 } 284 285 /** 286 * Returns a specific repetition of 287 * PV2-5: "Patient Valuables" - creates it if necessary 288 * 289 * @param rep The repetition index (0-indexed) 290 */ 291 public ST getPv25_PatientValuables(int rep) { 292 ST retVal = this.getTypedField(5, rep); 293 return retVal; 294 } 295 296 /** 297 * Returns a count of the current number of repetitions of Patient Valuables (PV2-5). 298 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 299 * it will return zero. 300 */ 301 public int getPv25_PatientValuablesReps() { 302 return this.getReps(5); 303 } 304 305 306 /** 307 * Inserts a repetition of 308 * PV2-5: "Patient Valuables" at a specific index 309 * 310 * @param rep The repetition index (0-indexed) 311 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 312 */ 313 public ST insertPatientValuables(int rep) throws HL7Exception { 314 return (ST) super.insertRepetition(5, rep); 315 } 316 317 318 /** 319 * Inserts a repetition of 320 * PV2-5: "Patient Valuables" at a specific index 321 * 322 * @param rep The repetition index (0-indexed) 323 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 324 */ 325 public ST insertPv25_PatientValuables(int rep) throws HL7Exception { 326 return (ST) super.insertRepetition(5, rep); 327 } 328 329 330 /** 331 * Removes a repetition of 332 * PV2-5: "Patient Valuables" at a specific index 333 * 334 * @param rep The repetition index (0-indexed) 335 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 336 */ 337 public ST removePatientValuables(int rep) throws HL7Exception { 338 return (ST) super.removeRepetition(5, rep); 339 } 340 341 342 /** 343 * Removes a repetition of 344 * PV2-5: "Patient Valuables" at a specific index 345 * 346 * @param rep The repetition index (0-indexed) 347 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 348 */ 349 public ST removePv25_PatientValuables(int rep) throws HL7Exception { 350 return (ST) super.removeRepetition(5, rep); 351 } 352 353 354 355 356 /** 357 * Returns 358 * PV2-6: "Patient Valuables Location" - creates it if necessary 359 */ 360 public ST getPatientValuablesLocation() { 361 ST retVal = this.getTypedField(6, 0); 362 return retVal; 363 } 364 365 /** 366 * Returns 367 * PV2-6: "Patient Valuables Location" - creates it if necessary 368 */ 369 public ST getPv26_PatientValuablesLocation() { 370 ST retVal = this.getTypedField(6, 0); 371 return retVal; 372 } 373 374 375 /** 376 * Returns all repetitions of Visit User Code (PV2-7). 377 */ 378 public IS[] getVisitUserCode() { 379 IS[] retVal = this.getTypedField(7, new IS[0]); 380 return retVal; 381 } 382 383 384 /** 385 * Returns all repetitions of Visit User Code (PV2-7). 386 */ 387 public IS[] getPv27_VisitUserCode() { 388 IS[] retVal = this.getTypedField(7, new IS[0]); 389 return retVal; 390 } 391 392 393 /** 394 * Returns a count of the current number of repetitions of Visit User Code (PV2-7). 395 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 396 * it will return zero. 397 */ 398 public int getVisitUserCodeReps() { 399 return this.getReps(7); 400 } 401 402 403 /** 404 * Returns a specific repetition of 405 * PV2-7: "Visit User Code" - creates it if necessary 406 * 407 * @param rep The repetition index (0-indexed) 408 */ 409 public IS getVisitUserCode(int rep) { 410 IS retVal = this.getTypedField(7, rep); 411 return retVal; 412 } 413 414 /** 415 * Returns a specific repetition of 416 * PV2-7: "Visit User Code" - creates it if necessary 417 * 418 * @param rep The repetition index (0-indexed) 419 */ 420 public IS getPv27_VisitUserCode(int rep) { 421 IS retVal = this.getTypedField(7, rep); 422 return retVal; 423 } 424 425 /** 426 * Returns a count of the current number of repetitions of Visit User Code (PV2-7). 427 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 428 * it will return zero. 429 */ 430 public int getPv27_VisitUserCodeReps() { 431 return this.getReps(7); 432 } 433 434 435 /** 436 * Inserts a repetition of 437 * PV2-7: "Visit User Code" at a specific index 438 * 439 * @param rep The repetition index (0-indexed) 440 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 441 */ 442 public IS insertVisitUserCode(int rep) throws HL7Exception { 443 return (IS) super.insertRepetition(7, rep); 444 } 445 446 447 /** 448 * Inserts a repetition of 449 * PV2-7: "Visit User Code" at a specific index 450 * 451 * @param rep The repetition index (0-indexed) 452 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 453 */ 454 public IS insertPv27_VisitUserCode(int rep) throws HL7Exception { 455 return (IS) super.insertRepetition(7, rep); 456 } 457 458 459 /** 460 * Removes a repetition of 461 * PV2-7: "Visit User Code" at a specific index 462 * 463 * @param rep The repetition index (0-indexed) 464 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 465 */ 466 public IS removeVisitUserCode(int rep) throws HL7Exception { 467 return (IS) super.removeRepetition(7, rep); 468 } 469 470 471 /** 472 * Removes a repetition of 473 * PV2-7: "Visit User Code" at a specific index 474 * 475 * @param rep The repetition index (0-indexed) 476 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 477 */ 478 public IS removePv27_VisitUserCode(int rep) throws HL7Exception { 479 return (IS) super.removeRepetition(7, rep); 480 } 481 482 483 484 485 /** 486 * Returns 487 * PV2-8: "Expected Admit Date/Time" - creates it if necessary 488 */ 489 public TS getExpectedAdmitDateTime() { 490 TS retVal = this.getTypedField(8, 0); 491 return retVal; 492 } 493 494 /** 495 * Returns 496 * PV2-8: "Expected Admit Date/Time" - creates it if necessary 497 */ 498 public TS getPv28_ExpectedAdmitDateTime() { 499 TS retVal = this.getTypedField(8, 0); 500 return retVal; 501 } 502 503 504 505 /** 506 * Returns 507 * PV2-9: "Expected Discharge Date/Time" - creates it if necessary 508 */ 509 public TS getExpectedDischargeDateTime() { 510 TS retVal = this.getTypedField(9, 0); 511 return retVal; 512 } 513 514 /** 515 * Returns 516 * PV2-9: "Expected Discharge Date/Time" - creates it if necessary 517 */ 518 public TS getPv29_ExpectedDischargeDateTime() { 519 TS retVal = this.getTypedField(9, 0); 520 return retVal; 521 } 522 523 524 525 /** 526 * Returns 527 * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary 528 */ 529 public NM getEstimatedLengthOfInpatientStay() { 530 NM retVal = this.getTypedField(10, 0); 531 return retVal; 532 } 533 534 /** 535 * Returns 536 * PV2-10: "Estimated Length of Inpatient Stay" - creates it if necessary 537 */ 538 public NM getPv210_EstimatedLengthOfInpatientStay() { 539 NM retVal = this.getTypedField(10, 0); 540 return retVal; 541 } 542 543 544 545 /** 546 * Returns 547 * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary 548 */ 549 public NM getActualLengthOfInpatientStay() { 550 NM retVal = this.getTypedField(11, 0); 551 return retVal; 552 } 553 554 /** 555 * Returns 556 * PV2-11: "Actual Length of Inpatient Stay" - creates it if necessary 557 */ 558 public NM getPv211_ActualLengthOfInpatientStay() { 559 NM retVal = this.getTypedField(11, 0); 560 return retVal; 561 } 562 563 564 565 /** 566 * Returns 567 * PV2-12: "Visit Description" - creates it if necessary 568 */ 569 public ST getVisitDescription() { 570 ST retVal = this.getTypedField(12, 0); 571 return retVal; 572 } 573 574 /** 575 * Returns 576 * PV2-12: "Visit Description" - creates it if necessary 577 */ 578 public ST getPv212_VisitDescription() { 579 ST retVal = this.getTypedField(12, 0); 580 return retVal; 581 } 582 583 584 /** 585 * Returns all repetitions of Referral Source Code (PV2-13). 586 */ 587 public XCN[] getReferralSourceCode() { 588 XCN[] retVal = this.getTypedField(13, new XCN[0]); 589 return retVal; 590 } 591 592 593 /** 594 * Returns all repetitions of Referral Source Code (PV2-13). 595 */ 596 public XCN[] getPv213_ReferralSourceCode() { 597 XCN[] retVal = this.getTypedField(13, new XCN[0]); 598 return retVal; 599 } 600 601 602 /** 603 * Returns a count of the current number of repetitions of Referral Source Code (PV2-13). 604 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 605 * it will return zero. 606 */ 607 public int getReferralSourceCodeReps() { 608 return this.getReps(13); 609 } 610 611 612 /** 613 * Returns a specific repetition of 614 * PV2-13: "Referral Source Code" - creates it if necessary 615 * 616 * @param rep The repetition index (0-indexed) 617 */ 618 public XCN getReferralSourceCode(int rep) { 619 XCN retVal = this.getTypedField(13, rep); 620 return retVal; 621 } 622 623 /** 624 * Returns a specific repetition of 625 * PV2-13: "Referral Source Code" - creates it if necessary 626 * 627 * @param rep The repetition index (0-indexed) 628 */ 629 public XCN getPv213_ReferralSourceCode(int rep) { 630 XCN retVal = this.getTypedField(13, rep); 631 return retVal; 632 } 633 634 /** 635 * Returns a count of the current number of repetitions of Referral Source Code (PV2-13). 636 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 637 * it will return zero. 638 */ 639 public int getPv213_ReferralSourceCodeReps() { 640 return this.getReps(13); 641 } 642 643 644 /** 645 * Inserts a repetition of 646 * PV2-13: "Referral Source Code" at a specific index 647 * 648 * @param rep The repetition index (0-indexed) 649 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 650 */ 651 public XCN insertReferralSourceCode(int rep) throws HL7Exception { 652 return (XCN) super.insertRepetition(13, rep); 653 } 654 655 656 /** 657 * Inserts a repetition of 658 * PV2-13: "Referral Source Code" at a specific index 659 * 660 * @param rep The repetition index (0-indexed) 661 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 662 */ 663 public XCN insertPv213_ReferralSourceCode(int rep) throws HL7Exception { 664 return (XCN) super.insertRepetition(13, rep); 665 } 666 667 668 /** 669 * Removes a repetition of 670 * PV2-13: "Referral Source Code" at a specific index 671 * 672 * @param rep The repetition index (0-indexed) 673 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 674 */ 675 public XCN removeReferralSourceCode(int rep) throws HL7Exception { 676 return (XCN) super.removeRepetition(13, rep); 677 } 678 679 680 /** 681 * Removes a repetition of 682 * PV2-13: "Referral Source Code" at a specific index 683 * 684 * @param rep The repetition index (0-indexed) 685 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 686 */ 687 public XCN removePv213_ReferralSourceCode(int rep) throws HL7Exception { 688 return (XCN) super.removeRepetition(13, rep); 689 } 690 691 692 693 694 /** 695 * Returns 696 * PV2-14: "Previous Service Date" - creates it if necessary 697 */ 698 public DT getPreviousServiceDate() { 699 DT retVal = this.getTypedField(14, 0); 700 return retVal; 701 } 702 703 /** 704 * Returns 705 * PV2-14: "Previous Service Date" - creates it if necessary 706 */ 707 public DT getPv214_PreviousServiceDate() { 708 DT retVal = this.getTypedField(14, 0); 709 return retVal; 710 } 711 712 713 714 /** 715 * Returns 716 * PV2-15: "Employment Illness Related Indicator" - creates it if necessary 717 */ 718 public ID getEmploymentIllnessRelatedIndicator() { 719 ID retVal = this.getTypedField(15, 0); 720 return retVal; 721 } 722 723 /** 724 * Returns 725 * PV2-15: "Employment Illness Related Indicator" - creates it if necessary 726 */ 727 public ID getPv215_EmploymentIllnessRelatedIndicator() { 728 ID retVal = this.getTypedField(15, 0); 729 return retVal; 730 } 731 732 733 734 /** 735 * Returns 736 * PV2-16: "Purge Status Code" - creates it if necessary 737 */ 738 public IS getPurgeStatusCode() { 739 IS retVal = this.getTypedField(16, 0); 740 return retVal; 741 } 742 743 /** 744 * Returns 745 * PV2-16: "Purge Status Code" - creates it if necessary 746 */ 747 public IS getPv216_PurgeStatusCode() { 748 IS retVal = this.getTypedField(16, 0); 749 return retVal; 750 } 751 752 753 754 /** 755 * Returns 756 * PV2-17: "Purge Status Date" - creates it if necessary 757 */ 758 public DT getPurgeStatusDate() { 759 DT retVal = this.getTypedField(17, 0); 760 return retVal; 761 } 762 763 /** 764 * Returns 765 * PV2-17: "Purge Status Date" - creates it if necessary 766 */ 767 public DT getPv217_PurgeStatusDate() { 768 DT retVal = this.getTypedField(17, 0); 769 return retVal; 770 } 771 772 773 774 /** 775 * Returns 776 * PV2-18: "Special Program Code" - creates it if necessary 777 */ 778 public IS getSpecialProgramCode() { 779 IS retVal = this.getTypedField(18, 0); 780 return retVal; 781 } 782 783 /** 784 * Returns 785 * PV2-18: "Special Program Code" - creates it if necessary 786 */ 787 public IS getPv218_SpecialProgramCode() { 788 IS retVal = this.getTypedField(18, 0); 789 return retVal; 790 } 791 792 793 794 /** 795 * Returns 796 * PV2-19: "Retention Indicator" - creates it if necessary 797 */ 798 public ID getRetentionIndicator() { 799 ID retVal = this.getTypedField(19, 0); 800 return retVal; 801 } 802 803 /** 804 * Returns 805 * PV2-19: "Retention Indicator" - creates it if necessary 806 */ 807 public ID getPv219_RetentionIndicator() { 808 ID retVal = this.getTypedField(19, 0); 809 return retVal; 810 } 811 812 813 814 /** 815 * Returns 816 * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary 817 */ 818 public NM getExpectedNumberOfInsurancePlans() { 819 NM retVal = this.getTypedField(20, 0); 820 return retVal; 821 } 822 823 /** 824 * Returns 825 * PV2-20: "Expected Number of Insurance Plans" - creates it if necessary 826 */ 827 public NM getPv220_ExpectedNumberOfInsurancePlans() { 828 NM retVal = this.getTypedField(20, 0); 829 return retVal; 830 } 831 832 833 834 /** 835 * Returns 836 * PV2-21: "Visit Publicity Code" - creates it if necessary 837 */ 838 public IS getVisitPublicityCode() { 839 IS retVal = this.getTypedField(21, 0); 840 return retVal; 841 } 842 843 /** 844 * Returns 845 * PV2-21: "Visit Publicity Code" - creates it if necessary 846 */ 847 public IS getPv221_VisitPublicityCode() { 848 IS retVal = this.getTypedField(21, 0); 849 return retVal; 850 } 851 852 853 854 /** 855 * Returns 856 * PV2-22: "Visit Protection Indicator" - creates it if necessary 857 */ 858 public ID getVisitProtectionIndicator() { 859 ID retVal = this.getTypedField(22, 0); 860 return retVal; 861 } 862 863 /** 864 * Returns 865 * PV2-22: "Visit Protection Indicator" - creates it if necessary 866 */ 867 public ID getPv222_VisitProtectionIndicator() { 868 ID retVal = this.getTypedField(22, 0); 869 return retVal; 870 } 871 872 873 /** 874 * Returns all repetitions of Clinic Organization Name (PV2-23). 875 */ 876 public XON[] getClinicOrganizationName() { 877 XON[] retVal = this.getTypedField(23, new XON[0]); 878 return retVal; 879 } 880 881 882 /** 883 * Returns all repetitions of Clinic Organization Name (PV2-23). 884 */ 885 public XON[] getPv223_ClinicOrganizationName() { 886 XON[] retVal = this.getTypedField(23, new XON[0]); 887 return retVal; 888 } 889 890 891 /** 892 * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23). 893 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 894 * it will return zero. 895 */ 896 public int getClinicOrganizationNameReps() { 897 return this.getReps(23); 898 } 899 900 901 /** 902 * Returns a specific repetition of 903 * PV2-23: "Clinic Organization Name" - creates it if necessary 904 * 905 * @param rep The repetition index (0-indexed) 906 */ 907 public XON getClinicOrganizationName(int rep) { 908 XON retVal = this.getTypedField(23, rep); 909 return retVal; 910 } 911 912 /** 913 * Returns a specific repetition of 914 * PV2-23: "Clinic Organization Name" - creates it if necessary 915 * 916 * @param rep The repetition index (0-indexed) 917 */ 918 public XON getPv223_ClinicOrganizationName(int rep) { 919 XON retVal = this.getTypedField(23, rep); 920 return retVal; 921 } 922 923 /** 924 * Returns a count of the current number of repetitions of Clinic Organization Name (PV2-23). 925 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 926 * it will return zero. 927 */ 928 public int getPv223_ClinicOrganizationNameReps() { 929 return this.getReps(23); 930 } 931 932 933 /** 934 * Inserts a repetition of 935 * PV2-23: "Clinic Organization Name" at a specific index 936 * 937 * @param rep The repetition index (0-indexed) 938 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 939 */ 940 public XON insertClinicOrganizationName(int rep) throws HL7Exception { 941 return (XON) super.insertRepetition(23, rep); 942 } 943 944 945 /** 946 * Inserts a repetition of 947 * PV2-23: "Clinic Organization Name" at a specific index 948 * 949 * @param rep The repetition index (0-indexed) 950 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 951 */ 952 public XON insertPv223_ClinicOrganizationName(int rep) throws HL7Exception { 953 return (XON) super.insertRepetition(23, rep); 954 } 955 956 957 /** 958 * Removes a repetition of 959 * PV2-23: "Clinic Organization Name" at a specific index 960 * 961 * @param rep The repetition index (0-indexed) 962 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 963 */ 964 public XON removeClinicOrganizationName(int rep) throws HL7Exception { 965 return (XON) super.removeRepetition(23, rep); 966 } 967 968 969 /** 970 * Removes a repetition of 971 * PV2-23: "Clinic Organization Name" at a specific index 972 * 973 * @param rep The repetition index (0-indexed) 974 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 975 */ 976 public XON removePv223_ClinicOrganizationName(int rep) throws HL7Exception { 977 return (XON) super.removeRepetition(23, rep); 978 } 979 980 981 982 983 /** 984 * Returns 985 * PV2-24: "Patient Status Code" - creates it if necessary 986 */ 987 public IS getPatientStatusCode() { 988 IS retVal = this.getTypedField(24, 0); 989 return retVal; 990 } 991 992 /** 993 * Returns 994 * PV2-24: "Patient Status Code" - creates it if necessary 995 */ 996 public IS getPv224_PatientStatusCode() { 997 IS retVal = this.getTypedField(24, 0); 998 return retVal; 999 } 1000 1001 1002 1003 /** 1004 * Returns 1005 * PV2-25: "Visit Priority Code" - creates it if necessary 1006 */ 1007 public IS getVisitPriorityCode() { 1008 IS retVal = this.getTypedField(25, 0); 1009 return retVal; 1010 } 1011 1012 /** 1013 * Returns 1014 * PV2-25: "Visit Priority Code" - creates it if necessary 1015 */ 1016 public IS getPv225_VisitPriorityCode() { 1017 IS retVal = this.getTypedField(25, 0); 1018 return retVal; 1019 } 1020 1021 1022 1023 /** 1024 * Returns 1025 * PV2-26: "Previous Treatment Date" - creates it if necessary 1026 */ 1027 public DT getPreviousTreatmentDate() { 1028 DT retVal = this.getTypedField(26, 0); 1029 return retVal; 1030 } 1031 1032 /** 1033 * Returns 1034 * PV2-26: "Previous Treatment Date" - creates it if necessary 1035 */ 1036 public DT getPv226_PreviousTreatmentDate() { 1037 DT retVal = this.getTypedField(26, 0); 1038 return retVal; 1039 } 1040 1041 1042 1043 /** 1044 * Returns 1045 * PV2-27: "Expected Discharge Disposition" - creates it if necessary 1046 */ 1047 public IS getExpectedDischargeDisposition() { 1048 IS retVal = this.getTypedField(27, 0); 1049 return retVal; 1050 } 1051 1052 /** 1053 * Returns 1054 * PV2-27: "Expected Discharge Disposition" - creates it if necessary 1055 */ 1056 public IS getPv227_ExpectedDischargeDisposition() { 1057 IS retVal = this.getTypedField(27, 0); 1058 return retVal; 1059 } 1060 1061 1062 1063 /** 1064 * Returns 1065 * PV2-28: "Signature on File Date" - creates it if necessary 1066 */ 1067 public DT getSignatureOnFileDate() { 1068 DT retVal = this.getTypedField(28, 0); 1069 return retVal; 1070 } 1071 1072 /** 1073 * Returns 1074 * PV2-28: "Signature on File Date" - creates it if necessary 1075 */ 1076 public DT getPv228_SignatureOnFileDate() { 1077 DT retVal = this.getTypedField(28, 0); 1078 return retVal; 1079 } 1080 1081 1082 1083 /** 1084 * Returns 1085 * PV2-29: "First Similar Illness Date" - creates it if necessary 1086 */ 1087 public DT getFirstSimilarIllnessDate() { 1088 DT retVal = this.getTypedField(29, 0); 1089 return retVal; 1090 } 1091 1092 /** 1093 * Returns 1094 * PV2-29: "First Similar Illness Date" - creates it if necessary 1095 */ 1096 public DT getPv229_FirstSimilarIllnessDate() { 1097 DT retVal = this.getTypedField(29, 0); 1098 return retVal; 1099 } 1100 1101 1102 1103 /** 1104 * Returns 1105 * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary 1106 */ 1107 public CE getPatientChargeAdjustmentCode() { 1108 CE retVal = this.getTypedField(30, 0); 1109 return retVal; 1110 } 1111 1112 /** 1113 * Returns 1114 * PV2-30: "Patient Charge Adjustment Code" - creates it if necessary 1115 */ 1116 public CE getPv230_PatientChargeAdjustmentCode() { 1117 CE retVal = this.getTypedField(30, 0); 1118 return retVal; 1119 } 1120 1121 1122 1123 /** 1124 * Returns 1125 * PV2-31: "Recurring Service Code" - creates it if necessary 1126 */ 1127 public IS getRecurringServiceCode() { 1128 IS retVal = this.getTypedField(31, 0); 1129 return retVal; 1130 } 1131 1132 /** 1133 * Returns 1134 * PV2-31: "Recurring Service Code" - creates it if necessary 1135 */ 1136 public IS getPv231_RecurringServiceCode() { 1137 IS retVal = this.getTypedField(31, 0); 1138 return retVal; 1139 } 1140 1141 1142 1143 /** 1144 * Returns 1145 * PV2-32: "Billing Media Code" - creates it if necessary 1146 */ 1147 public ID getBillingMediaCode() { 1148 ID retVal = this.getTypedField(32, 0); 1149 return retVal; 1150 } 1151 1152 /** 1153 * Returns 1154 * PV2-32: "Billing Media Code" - creates it if necessary 1155 */ 1156 public ID getPv232_BillingMediaCode() { 1157 ID retVal = this.getTypedField(32, 0); 1158 return retVal; 1159 } 1160 1161 1162 1163 /** 1164 * Returns 1165 * PV2-33: "Expected Surgery Date and Time" - creates it if necessary 1166 */ 1167 public TS getExpectedSurgeryDateAndTime() { 1168 TS retVal = this.getTypedField(33, 0); 1169 return retVal; 1170 } 1171 1172 /** 1173 * Returns 1174 * PV2-33: "Expected Surgery Date and Time" - creates it if necessary 1175 */ 1176 public TS getPv233_ExpectedSurgeryDateAndTime() { 1177 TS retVal = this.getTypedField(33, 0); 1178 return retVal; 1179 } 1180 1181 1182 1183 /** 1184 * Returns 1185 * PV2-34: "Military Partnership Code" - creates it if necessary 1186 */ 1187 public ID getMilitaryPartnershipCode() { 1188 ID retVal = this.getTypedField(34, 0); 1189 return retVal; 1190 } 1191 1192 /** 1193 * Returns 1194 * PV2-34: "Military Partnership Code" - creates it if necessary 1195 */ 1196 public ID getPv234_MilitaryPartnershipCode() { 1197 ID retVal = this.getTypedField(34, 0); 1198 return retVal; 1199 } 1200 1201 1202 1203 /** 1204 * Returns 1205 * PV2-35: "Military Non-Availability Code" - creates it if necessary 1206 */ 1207 public ID getMilitaryNonAvailabilityCode() { 1208 ID retVal = this.getTypedField(35, 0); 1209 return retVal; 1210 } 1211 1212 /** 1213 * Returns 1214 * PV2-35: "Military Non-Availability Code" - creates it if necessary 1215 */ 1216 public ID getPv235_MilitaryNonAvailabilityCode() { 1217 ID retVal = this.getTypedField(35, 0); 1218 return retVal; 1219 } 1220 1221 1222 1223 /** 1224 * Returns 1225 * PV2-36: "Newborn Baby Indicator" - creates it if necessary 1226 */ 1227 public ID getNewbornBabyIndicator() { 1228 ID retVal = this.getTypedField(36, 0); 1229 return retVal; 1230 } 1231 1232 /** 1233 * Returns 1234 * PV2-36: "Newborn Baby Indicator" - creates it if necessary 1235 */ 1236 public ID getPv236_NewbornBabyIndicator() { 1237 ID retVal = this.getTypedField(36, 0); 1238 return retVal; 1239 } 1240 1241 1242 1243 /** 1244 * Returns 1245 * PV2-37: "Baby Detained Indicator" - creates it if necessary 1246 */ 1247 public ID getBabyDetainedIndicator() { 1248 ID retVal = this.getTypedField(37, 0); 1249 return retVal; 1250 } 1251 1252 /** 1253 * Returns 1254 * PV2-37: "Baby Detained Indicator" - creates it if necessary 1255 */ 1256 public ID getPv237_BabyDetainedIndicator() { 1257 ID retVal = this.getTypedField(37, 0); 1258 return retVal; 1259 } 1260 1261 1262 1263 /** 1264 * Returns 1265 * PV2-38: "Mode of Arrival Code" - creates it if necessary 1266 */ 1267 public CE getModeOfArrivalCode() { 1268 CE retVal = this.getTypedField(38, 0); 1269 return retVal; 1270 } 1271 1272 /** 1273 * Returns 1274 * PV2-38: "Mode of Arrival Code" - creates it if necessary 1275 */ 1276 public CE getPv238_ModeOfArrivalCode() { 1277 CE retVal = this.getTypedField(38, 0); 1278 return retVal; 1279 } 1280 1281 1282 /** 1283 * Returns all repetitions of Recreational Drug Use Code (PV2-39). 1284 */ 1285 public CE[] getRecreationalDrugUseCode() { 1286 CE[] retVal = this.getTypedField(39, new CE[0]); 1287 return retVal; 1288 } 1289 1290 1291 /** 1292 * Returns all repetitions of Recreational Drug Use Code (PV2-39). 1293 */ 1294 public CE[] getPv239_RecreationalDrugUseCode() { 1295 CE[] retVal = this.getTypedField(39, new CE[0]); 1296 return retVal; 1297 } 1298 1299 1300 /** 1301 * Returns a count of the current number of repetitions of Recreational Drug Use Code (PV2-39). 1302 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1303 * it will return zero. 1304 */ 1305 public int getRecreationalDrugUseCodeReps() { 1306 return this.getReps(39); 1307 } 1308 1309 1310 /** 1311 * Returns a specific repetition of 1312 * PV2-39: "Recreational Drug Use Code" - creates it if necessary 1313 * 1314 * @param rep The repetition index (0-indexed) 1315 */ 1316 public CE getRecreationalDrugUseCode(int rep) { 1317 CE retVal = this.getTypedField(39, rep); 1318 return retVal; 1319 } 1320 1321 /** 1322 * Returns a specific repetition of 1323 * PV2-39: "Recreational Drug Use Code" - creates it if necessary 1324 * 1325 * @param rep The repetition index (0-indexed) 1326 */ 1327 public CE getPv239_RecreationalDrugUseCode(int rep) { 1328 CE retVal = this.getTypedField(39, rep); 1329 return retVal; 1330 } 1331 1332 /** 1333 * Returns a count of the current number of repetitions of Recreational Drug Use Code (PV2-39). 1334 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1335 * it will return zero. 1336 */ 1337 public int getPv239_RecreationalDrugUseCodeReps() { 1338 return this.getReps(39); 1339 } 1340 1341 1342 /** 1343 * Inserts a repetition of 1344 * PV2-39: "Recreational Drug Use Code" at a specific index 1345 * 1346 * @param rep The repetition index (0-indexed) 1347 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1348 */ 1349 public CE insertRecreationalDrugUseCode(int rep) throws HL7Exception { 1350 return (CE) super.insertRepetition(39, rep); 1351 } 1352 1353 1354 /** 1355 * Inserts a repetition of 1356 * PV2-39: "Recreational Drug Use Code" at a specific index 1357 * 1358 * @param rep The repetition index (0-indexed) 1359 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1360 */ 1361 public CE insertPv239_RecreationalDrugUseCode(int rep) throws HL7Exception { 1362 return (CE) super.insertRepetition(39, rep); 1363 } 1364 1365 1366 /** 1367 * Removes a repetition of 1368 * PV2-39: "Recreational Drug Use Code" at a specific index 1369 * 1370 * @param rep The repetition index (0-indexed) 1371 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1372 */ 1373 public CE removeRecreationalDrugUseCode(int rep) throws HL7Exception { 1374 return (CE) super.removeRepetition(39, rep); 1375 } 1376 1377 1378 /** 1379 * Removes a repetition of 1380 * PV2-39: "Recreational Drug Use Code" at a specific index 1381 * 1382 * @param rep The repetition index (0-indexed) 1383 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1384 */ 1385 public CE removePv239_RecreationalDrugUseCode(int rep) throws HL7Exception { 1386 return (CE) super.removeRepetition(39, rep); 1387 } 1388 1389 1390 1391 1392 /** 1393 * Returns 1394 * PV2-40: "Admission Level of Care Code" - creates it if necessary 1395 */ 1396 public CE getAdmissionLevelOfCareCode() { 1397 CE retVal = this.getTypedField(40, 0); 1398 return retVal; 1399 } 1400 1401 /** 1402 * Returns 1403 * PV2-40: "Admission Level of Care Code" - creates it if necessary 1404 */ 1405 public CE getPv240_AdmissionLevelOfCareCode() { 1406 CE retVal = this.getTypedField(40, 0); 1407 return retVal; 1408 } 1409 1410 1411 /** 1412 * Returns all repetitions of Precaution Code (PV2-41). 1413 */ 1414 public CE[] getPrecautionCode() { 1415 CE[] retVal = this.getTypedField(41, new CE[0]); 1416 return retVal; 1417 } 1418 1419 1420 /** 1421 * Returns all repetitions of Precaution Code (PV2-41). 1422 */ 1423 public CE[] getPv241_PrecautionCode() { 1424 CE[] retVal = this.getTypedField(41, new CE[0]); 1425 return retVal; 1426 } 1427 1428 1429 /** 1430 * Returns a count of the current number of repetitions of Precaution Code (PV2-41). 1431 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1432 * it will return zero. 1433 */ 1434 public int getPrecautionCodeReps() { 1435 return this.getReps(41); 1436 } 1437 1438 1439 /** 1440 * Returns a specific repetition of 1441 * PV2-41: "Precaution Code" - creates it if necessary 1442 * 1443 * @param rep The repetition index (0-indexed) 1444 */ 1445 public CE getPrecautionCode(int rep) { 1446 CE retVal = this.getTypedField(41, rep); 1447 return retVal; 1448 } 1449 1450 /** 1451 * Returns a specific repetition of 1452 * PV2-41: "Precaution Code" - creates it if necessary 1453 * 1454 * @param rep The repetition index (0-indexed) 1455 */ 1456 public CE getPv241_PrecautionCode(int rep) { 1457 CE retVal = this.getTypedField(41, rep); 1458 return retVal; 1459 } 1460 1461 /** 1462 * Returns a count of the current number of repetitions of Precaution Code (PV2-41). 1463 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1464 * it will return zero. 1465 */ 1466 public int getPv241_PrecautionCodeReps() { 1467 return this.getReps(41); 1468 } 1469 1470 1471 /** 1472 * Inserts a repetition of 1473 * PV2-41: "Precaution Code" at a specific index 1474 * 1475 * @param rep The repetition index (0-indexed) 1476 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1477 */ 1478 public CE insertPrecautionCode(int rep) throws HL7Exception { 1479 return (CE) super.insertRepetition(41, rep); 1480 } 1481 1482 1483 /** 1484 * Inserts a repetition of 1485 * PV2-41: "Precaution Code" at a specific index 1486 * 1487 * @param rep The repetition index (0-indexed) 1488 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1489 */ 1490 public CE insertPv241_PrecautionCode(int rep) throws HL7Exception { 1491 return (CE) super.insertRepetition(41, rep); 1492 } 1493 1494 1495 /** 1496 * Removes a repetition of 1497 * PV2-41: "Precaution Code" at a specific index 1498 * 1499 * @param rep The repetition index (0-indexed) 1500 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1501 */ 1502 public CE removePrecautionCode(int rep) throws HL7Exception { 1503 return (CE) super.removeRepetition(41, rep); 1504 } 1505 1506 1507 /** 1508 * Removes a repetition of 1509 * PV2-41: "Precaution Code" at a specific index 1510 * 1511 * @param rep The repetition index (0-indexed) 1512 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1513 */ 1514 public CE removePv241_PrecautionCode(int rep) throws HL7Exception { 1515 return (CE) super.removeRepetition(41, rep); 1516 } 1517 1518 1519 1520 1521 /** 1522 * Returns 1523 * PV2-42: "Patient Condition Code" - creates it if necessary 1524 */ 1525 public CE getPatientConditionCode() { 1526 CE retVal = this.getTypedField(42, 0); 1527 return retVal; 1528 } 1529 1530 /** 1531 * Returns 1532 * PV2-42: "Patient Condition Code" - creates it if necessary 1533 */ 1534 public CE getPv242_PatientConditionCode() { 1535 CE retVal = this.getTypedField(42, 0); 1536 return retVal; 1537 } 1538 1539 1540 1541 /** 1542 * Returns 1543 * PV2-43: "Living Will Code" - creates it if necessary 1544 */ 1545 public IS getLivingWillCode() { 1546 IS retVal = this.getTypedField(43, 0); 1547 return retVal; 1548 } 1549 1550 /** 1551 * Returns 1552 * PV2-43: "Living Will Code" - creates it if necessary 1553 */ 1554 public IS getPv243_LivingWillCode() { 1555 IS retVal = this.getTypedField(43, 0); 1556 return retVal; 1557 } 1558 1559 1560 1561 /** 1562 * Returns 1563 * PV2-44: "Organ Donor Code" - creates it if necessary 1564 */ 1565 public IS getOrganDonorCode() { 1566 IS retVal = this.getTypedField(44, 0); 1567 return retVal; 1568 } 1569 1570 /** 1571 * Returns 1572 * PV2-44: "Organ Donor Code" - creates it if necessary 1573 */ 1574 public IS getPv244_OrganDonorCode() { 1575 IS retVal = this.getTypedField(44, 0); 1576 return retVal; 1577 } 1578 1579 1580 /** 1581 * Returns all repetitions of Advance Directive Code (PV2-45). 1582 */ 1583 public CE[] getAdvanceDirectiveCode() { 1584 CE[] retVal = this.getTypedField(45, new CE[0]); 1585 return retVal; 1586 } 1587 1588 1589 /** 1590 * Returns all repetitions of Advance Directive Code (PV2-45). 1591 */ 1592 public CE[] getPv245_AdvanceDirectiveCode() { 1593 CE[] retVal = this.getTypedField(45, new CE[0]); 1594 return retVal; 1595 } 1596 1597 1598 /** 1599 * Returns a count of the current number of repetitions of Advance Directive Code (PV2-45). 1600 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1601 * it will return zero. 1602 */ 1603 public int getAdvanceDirectiveCodeReps() { 1604 return this.getReps(45); 1605 } 1606 1607 1608 /** 1609 * Returns a specific repetition of 1610 * PV2-45: "Advance Directive Code" - creates it if necessary 1611 * 1612 * @param rep The repetition index (0-indexed) 1613 */ 1614 public CE getAdvanceDirectiveCode(int rep) { 1615 CE retVal = this.getTypedField(45, rep); 1616 return retVal; 1617 } 1618 1619 /** 1620 * Returns a specific repetition of 1621 * PV2-45: "Advance Directive Code" - creates it if necessary 1622 * 1623 * @param rep The repetition index (0-indexed) 1624 */ 1625 public CE getPv245_AdvanceDirectiveCode(int rep) { 1626 CE retVal = this.getTypedField(45, rep); 1627 return retVal; 1628 } 1629 1630 /** 1631 * Returns a count of the current number of repetitions of Advance Directive Code (PV2-45). 1632 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1633 * it will return zero. 1634 */ 1635 public int getPv245_AdvanceDirectiveCodeReps() { 1636 return this.getReps(45); 1637 } 1638 1639 1640 /** 1641 * Inserts a repetition of 1642 * PV2-45: "Advance Directive Code" at a specific index 1643 * 1644 * @param rep The repetition index (0-indexed) 1645 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1646 */ 1647 public CE insertAdvanceDirectiveCode(int rep) throws HL7Exception { 1648 return (CE) super.insertRepetition(45, rep); 1649 } 1650 1651 1652 /** 1653 * Inserts a repetition of 1654 * PV2-45: "Advance Directive Code" at a specific index 1655 * 1656 * @param rep The repetition index (0-indexed) 1657 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1658 */ 1659 public CE insertPv245_AdvanceDirectiveCode(int rep) throws HL7Exception { 1660 return (CE) super.insertRepetition(45, rep); 1661 } 1662 1663 1664 /** 1665 * Removes a repetition of 1666 * PV2-45: "Advance Directive Code" at a specific index 1667 * 1668 * @param rep The repetition index (0-indexed) 1669 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1670 */ 1671 public CE removeAdvanceDirectiveCode(int rep) throws HL7Exception { 1672 return (CE) super.removeRepetition(45, rep); 1673 } 1674 1675 1676 /** 1677 * Removes a repetition of 1678 * PV2-45: "Advance Directive Code" at a specific index 1679 * 1680 * @param rep The repetition index (0-indexed) 1681 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1682 */ 1683 public CE removePv245_AdvanceDirectiveCode(int rep) throws HL7Exception { 1684 return (CE) super.removeRepetition(45, rep); 1685 } 1686 1687 1688 1689 1690 /** 1691 * Returns 1692 * PV2-46: "Patient Status Effective Date" - creates it if necessary 1693 */ 1694 public DT getPatientStatusEffectiveDate() { 1695 DT retVal = this.getTypedField(46, 0); 1696 return retVal; 1697 } 1698 1699 /** 1700 * Returns 1701 * PV2-46: "Patient Status Effective Date" - creates it if necessary 1702 */ 1703 public DT getPv246_PatientStatusEffectiveDate() { 1704 DT retVal = this.getTypedField(46, 0); 1705 return retVal; 1706 } 1707 1708 1709 1710 /** 1711 * Returns 1712 * PV2-47: "Expected LOA Return Date/Time" - creates it if necessary 1713 */ 1714 public TS getExpectedLOAReturnDateTime() { 1715 TS retVal = this.getTypedField(47, 0); 1716 return retVal; 1717 } 1718 1719 /** 1720 * Returns 1721 * PV2-47: "Expected LOA Return Date/Time" - creates it if necessary 1722 */ 1723 public TS getPv247_ExpectedLOAReturnDateTime() { 1724 TS retVal = this.getTypedField(47, 0); 1725 return retVal; 1726 } 1727 1728 1729 1730 1731 1732 /** {@inheritDoc} */ 1733 protected Type createNewTypeWithoutReflection(int field) { 1734 switch (field) { 1735 case 0: return new PL(getMessage()); 1736 case 1: return new CE(getMessage()); 1737 case 2: return new CE(getMessage()); 1738 case 3: return new CE(getMessage()); 1739 case 4: return new ST(getMessage()); 1740 case 5: return new ST(getMessage()); 1741 case 6: return new IS(getMessage(), new Integer( 130 )); 1742 case 7: return new TS(getMessage()); 1743 case 8: return new TS(getMessage()); 1744 case 9: return new NM(getMessage()); 1745 case 10: return new NM(getMessage()); 1746 case 11: return new ST(getMessage()); 1747 case 12: return new XCN(getMessage()); 1748 case 13: return new DT(getMessage()); 1749 case 14: return new ID(getMessage(), new Integer( 136 )); 1750 case 15: return new IS(getMessage(), new Integer( 213 )); 1751 case 16: return new DT(getMessage()); 1752 case 17: return new IS(getMessage(), new Integer( 214 )); 1753 case 18: return new ID(getMessage(), new Integer( 136 )); 1754 case 19: return new NM(getMessage()); 1755 case 20: return new IS(getMessage(), new Integer( 215 )); 1756 case 21: return new ID(getMessage(), new Integer( 136 )); 1757 case 22: return new XON(getMessage()); 1758 case 23: return new IS(getMessage(), new Integer( 216 )); 1759 case 24: return new IS(getMessage(), new Integer( 217 )); 1760 case 25: return new DT(getMessage()); 1761 case 26: return new IS(getMessage(), new Integer( 112 )); 1762 case 27: return new DT(getMessage()); 1763 case 28: return new DT(getMessage()); 1764 case 29: return new CE(getMessage()); 1765 case 30: return new IS(getMessage(), new Integer( 219 )); 1766 case 31: return new ID(getMessage(), new Integer( 136 )); 1767 case 32: return new TS(getMessage()); 1768 case 33: return new ID(getMessage(), new Integer( 136 )); 1769 case 34: return new ID(getMessage(), new Integer( 136 )); 1770 case 35: return new ID(getMessage(), new Integer( 136 )); 1771 case 36: return new ID(getMessage(), new Integer( 136 )); 1772 case 37: return new CE(getMessage()); 1773 case 38: return new CE(getMessage()); 1774 case 39: return new CE(getMessage()); 1775 case 40: return new CE(getMessage()); 1776 case 41: return new CE(getMessage()); 1777 case 42: return new IS(getMessage(), new Integer( 315 )); 1778 case 43: return new IS(getMessage(), new Integer( 316 )); 1779 case 44: return new CE(getMessage()); 1780 case 45: return new DT(getMessage()); 1781 case 46: return new TS(getMessage()); 1782 default: return null; 1783 } 1784 } 1785 1786 1787} 1788