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