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