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 PD1 message segment (Patient Additional Demographic). 050 * This segment has the following fields:</p> 051 * <ul> 052 * <li>PD1-1: Living Dependency (CWE) <b>optional repeating</b> 053 * <li>PD1-2: Living Arrangement (CWE) <b>optional </b> 054 * <li>PD1-3: Patient Primary Facility (XON) <b>optional repeating</b> 055 * <li>PD1-4: Patient Primary Care Provider Name & ID No. (NULLDT) <b>optional </b> 056 * <li>PD1-5: Student Indicator (CWE) <b>optional </b> 057 * <li>PD1-6: Handicap (CWE) <b>optional </b> 058 * <li>PD1-7: Living Will Code (CWE) <b>optional </b> 059 * <li>PD1-8: Organ Donor Code (CWE) <b>optional </b> 060 * <li>PD1-9: Separate Bill (ID) <b>optional </b> 061 * <li>PD1-10: Duplicate Patient (CX) <b>optional repeating</b> 062 * <li>PD1-11: Publicity Code (CWE) <b>optional </b> 063 * <li>PD1-12: Protection Indicator (ID) <b>optional </b> 064 * <li>PD1-13: Protection Indicator Effective Date (DT) <b>optional </b> 065 * <li>PD1-14: Place of Worship (XON) <b>optional repeating</b> 066 * <li>PD1-15: Advance Directive Code (CWE) <b>optional repeating</b> 067 * <li>PD1-16: Immunization Registry Status (CWE) <b>optional </b> 068 * <li>PD1-17: Immunization Registry Status Effective Date (DT) <b>optional </b> 069 * <li>PD1-18: Publicity Code Effective Date (DT) <b>optional </b> 070 * <li>PD1-19: Military Branch (CWE) <b>optional </b> 071 * <li>PD1-20: Military Rank/Grade (CWE) <b>optional </b> 072 * <li>PD1-21: Military Status (CWE) <b>optional </b> 073 * <li>PD1-22: Advance Directive Last Verified Date (DT) <b>optional </b> 074 * </ul> 075 */ 076@SuppressWarnings("unused") 077public class PD1 extends AbstractSegment { 078 079 /** 080 * Creates a new PD1 segment 081 */ 082 public PD1(Group parent, ModelClassFactory factory) { 083 super(parent, factory); 084 init(factory); 085 } 086 087 private void init(ModelClassFactory factory) { 088 try { 089 this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Living Dependency"); 090 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Living Arrangement"); 091 this.add(XON.class, false, 0, 0, new Object[]{ getMessage() }, "Patient Primary Facility"); 092 this.add(NULLDT.class, false, 1, 0, new Object[]{ getMessage() }, "Patient Primary Care Provider Name & ID No."); 093 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Student Indicator"); 094 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Handicap"); 095 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Living Will Code"); 096 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Organ Donor Code"); 097 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Separate Bill"); 098 this.add(CX.class, false, 0, 0, new Object[]{ getMessage() }, "Duplicate Patient"); 099 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Publicity Code"); 100 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Protection Indicator"); 101 this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Protection Indicator Effective Date"); 102 this.add(XON.class, false, 0, 0, new Object[]{ getMessage() }, "Place of Worship"); 103 this.add(CWE.class, false, 0, 0, new Object[]{ getMessage() }, "Advance Directive Code"); 104 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Immunization Registry Status"); 105 this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Immunization Registry Status Effective Date"); 106 this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Publicity Code Effective Date"); 107 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Military Branch"); 108 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Military Rank/Grade"); 109 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Military Status"); 110 this.add(DT.class, false, 1, 0, new Object[]{ getMessage() }, "Advance Directive Last Verified Date"); 111 } catch(HL7Exception e) { 112 log.error("Unexpected error creating PD1 - this is probably a bug in the source code generator.", e); 113 } 114 } 115 116 117 /** 118 * Returns all repetitions of Living Dependency (PD1-1). 119 */ 120 public CWE[] getLivingDependency() { 121 CWE[] retVal = this.getTypedField(1, new CWE[0]); 122 return retVal; 123 } 124 125 126 /** 127 * Returns all repetitions of Living Dependency (PD1-1). 128 */ 129 public CWE[] getPd11_LivingDependency() { 130 CWE[] retVal = this.getTypedField(1, new CWE[0]); 131 return retVal; 132 } 133 134 135 /** 136 * Returns a count of the current number of repetitions of Living Dependency (PD1-1). 137 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 138 * it will return zero. 139 */ 140 public int getLivingDependencyReps() { 141 return this.getReps(1); 142 } 143 144 145 /** 146 * Returns a specific repetition of 147 * PD1-1: "Living Dependency" - creates it if necessary 148 * 149 * @param rep The repetition index (0-indexed) 150 */ 151 public CWE getLivingDependency(int rep) { 152 CWE retVal = this.getTypedField(1, rep); 153 return retVal; 154 } 155 156 /** 157 * Returns a specific repetition of 158 * PD1-1: "Living Dependency" - creates it if necessary 159 * 160 * @param rep The repetition index (0-indexed) 161 */ 162 public CWE getPd11_LivingDependency(int rep) { 163 CWE retVal = this.getTypedField(1, rep); 164 return retVal; 165 } 166 167 /** 168 * Returns a count of the current number of repetitions of Living Dependency (PD1-1). 169 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 170 * it will return zero. 171 */ 172 public int getPd11_LivingDependencyReps() { 173 return this.getReps(1); 174 } 175 176 177 /** 178 * Inserts a repetition of 179 * PD1-1: "Living Dependency" at a specific index 180 * 181 * @param rep The repetition index (0-indexed) 182 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 183 */ 184 public CWE insertLivingDependency(int rep) throws HL7Exception { 185 return (CWE) super.insertRepetition(1, rep); 186 } 187 188 189 /** 190 * Inserts a repetition of 191 * PD1-1: "Living Dependency" at a specific index 192 * 193 * @param rep The repetition index (0-indexed) 194 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 195 */ 196 public CWE insertPd11_LivingDependency(int rep) throws HL7Exception { 197 return (CWE) super.insertRepetition(1, rep); 198 } 199 200 201 /** 202 * Removes a repetition of 203 * PD1-1: "Living Dependency" at a specific index 204 * 205 * @param rep The repetition index (0-indexed) 206 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 207 */ 208 public CWE removeLivingDependency(int rep) throws HL7Exception { 209 return (CWE) super.removeRepetition(1, rep); 210 } 211 212 213 /** 214 * Removes a repetition of 215 * PD1-1: "Living Dependency" at a specific index 216 * 217 * @param rep The repetition index (0-indexed) 218 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 219 */ 220 public CWE removePd11_LivingDependency(int rep) throws HL7Exception { 221 return (CWE) super.removeRepetition(1, rep); 222 } 223 224 225 226 227 /** 228 * Returns 229 * PD1-2: "Living Arrangement" - creates it if necessary 230 */ 231 public CWE getLivingArrangement() { 232 CWE retVal = this.getTypedField(2, 0); 233 return retVal; 234 } 235 236 /** 237 * Returns 238 * PD1-2: "Living Arrangement" - creates it if necessary 239 */ 240 public CWE getPd12_LivingArrangement() { 241 CWE retVal = this.getTypedField(2, 0); 242 return retVal; 243 } 244 245 246 /** 247 * Returns all repetitions of Patient Primary Facility (PD1-3). 248 */ 249 public XON[] getPatientPrimaryFacility() { 250 XON[] retVal = this.getTypedField(3, new XON[0]); 251 return retVal; 252 } 253 254 255 /** 256 * Returns all repetitions of Patient Primary Facility (PD1-3). 257 */ 258 public XON[] getPd13_PatientPrimaryFacility() { 259 XON[] retVal = this.getTypedField(3, new XON[0]); 260 return retVal; 261 } 262 263 264 /** 265 * Returns a count of the current number of repetitions of Patient Primary Facility (PD1-3). 266 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 267 * it will return zero. 268 */ 269 public int getPatientPrimaryFacilityReps() { 270 return this.getReps(3); 271 } 272 273 274 /** 275 * Returns a specific repetition of 276 * PD1-3: "Patient Primary Facility" - creates it if necessary 277 * 278 * @param rep The repetition index (0-indexed) 279 */ 280 public XON getPatientPrimaryFacility(int rep) { 281 XON retVal = this.getTypedField(3, rep); 282 return retVal; 283 } 284 285 /** 286 * Returns a specific repetition of 287 * PD1-3: "Patient Primary Facility" - creates it if necessary 288 * 289 * @param rep The repetition index (0-indexed) 290 */ 291 public XON getPd13_PatientPrimaryFacility(int rep) { 292 XON retVal = this.getTypedField(3, rep); 293 return retVal; 294 } 295 296 /** 297 * Returns a count of the current number of repetitions of Patient Primary Facility (PD1-3). 298 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 299 * it will return zero. 300 */ 301 public int getPd13_PatientPrimaryFacilityReps() { 302 return this.getReps(3); 303 } 304 305 306 /** 307 * Inserts a repetition of 308 * PD1-3: "Patient Primary Facility" at a specific index 309 * 310 * @param rep The repetition index (0-indexed) 311 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 312 */ 313 public XON insertPatientPrimaryFacility(int rep) throws HL7Exception { 314 return (XON) super.insertRepetition(3, rep); 315 } 316 317 318 /** 319 * Inserts a repetition of 320 * PD1-3: "Patient Primary Facility" at a specific index 321 * 322 * @param rep The repetition index (0-indexed) 323 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 324 */ 325 public XON insertPd13_PatientPrimaryFacility(int rep) throws HL7Exception { 326 return (XON) super.insertRepetition(3, rep); 327 } 328 329 330 /** 331 * Removes a repetition of 332 * PD1-3: "Patient Primary Facility" at a specific index 333 * 334 * @param rep The repetition index (0-indexed) 335 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 336 */ 337 public XON removePatientPrimaryFacility(int rep) throws HL7Exception { 338 return (XON) super.removeRepetition(3, rep); 339 } 340 341 342 /** 343 * Removes a repetition of 344 * PD1-3: "Patient Primary Facility" at a specific index 345 * 346 * @param rep The repetition index (0-indexed) 347 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 348 */ 349 public XON removePd13_PatientPrimaryFacility(int rep) throws HL7Exception { 350 return (XON) super.removeRepetition(3, rep); 351 } 352 353 354 355 356 /** 357 * Returns 358 * PD1-4: "Patient Primary Care Provider Name & ID No." - creates it if necessary 359 */ 360 public NULLDT getPatientPrimaryCareProviderNameIDNo() { 361 NULLDT retVal = this.getTypedField(4, 0); 362 return retVal; 363 } 364 365 /** 366 * Returns 367 * PD1-4: "Patient Primary Care Provider Name & ID No." - creates it if necessary 368 */ 369 public NULLDT getPd14_PatientPrimaryCareProviderNameIDNo() { 370 NULLDT retVal = this.getTypedField(4, 0); 371 return retVal; 372 } 373 374 375 376 /** 377 * Returns 378 * PD1-5: "Student Indicator" - creates it if necessary 379 */ 380 public CWE getStudentIndicator() { 381 CWE retVal = this.getTypedField(5, 0); 382 return retVal; 383 } 384 385 /** 386 * Returns 387 * PD1-5: "Student Indicator" - creates it if necessary 388 */ 389 public CWE getPd15_StudentIndicator() { 390 CWE retVal = this.getTypedField(5, 0); 391 return retVal; 392 } 393 394 395 396 /** 397 * Returns 398 * PD1-6: "Handicap" - creates it if necessary 399 */ 400 public CWE getHandicap() { 401 CWE retVal = this.getTypedField(6, 0); 402 return retVal; 403 } 404 405 /** 406 * Returns 407 * PD1-6: "Handicap" - creates it if necessary 408 */ 409 public CWE getPd16_Handicap() { 410 CWE retVal = this.getTypedField(6, 0); 411 return retVal; 412 } 413 414 415 416 /** 417 * Returns 418 * PD1-7: "Living Will Code" - creates it if necessary 419 */ 420 public CWE getLivingWillCode() { 421 CWE retVal = this.getTypedField(7, 0); 422 return retVal; 423 } 424 425 /** 426 * Returns 427 * PD1-7: "Living Will Code" - creates it if necessary 428 */ 429 public CWE getPd17_LivingWillCode() { 430 CWE retVal = this.getTypedField(7, 0); 431 return retVal; 432 } 433 434 435 436 /** 437 * Returns 438 * PD1-8: "Organ Donor Code" - creates it if necessary 439 */ 440 public CWE getOrganDonorCode() { 441 CWE retVal = this.getTypedField(8, 0); 442 return retVal; 443 } 444 445 /** 446 * Returns 447 * PD1-8: "Organ Donor Code" - creates it if necessary 448 */ 449 public CWE getPd18_OrganDonorCode() { 450 CWE retVal = this.getTypedField(8, 0); 451 return retVal; 452 } 453 454 455 456 /** 457 * Returns 458 * PD1-9: "Separate Bill" - creates it if necessary 459 */ 460 public ID getSeparateBill() { 461 ID retVal = this.getTypedField(9, 0); 462 return retVal; 463 } 464 465 /** 466 * Returns 467 * PD1-9: "Separate Bill" - creates it if necessary 468 */ 469 public ID getPd19_SeparateBill() { 470 ID retVal = this.getTypedField(9, 0); 471 return retVal; 472 } 473 474 475 /** 476 * Returns all repetitions of Duplicate Patient (PD1-10). 477 */ 478 public CX[] getDuplicatePatient() { 479 CX[] retVal = this.getTypedField(10, new CX[0]); 480 return retVal; 481 } 482 483 484 /** 485 * Returns all repetitions of Duplicate Patient (PD1-10). 486 */ 487 public CX[] getPd110_DuplicatePatient() { 488 CX[] retVal = this.getTypedField(10, new CX[0]); 489 return retVal; 490 } 491 492 493 /** 494 * Returns a count of the current number of repetitions of Duplicate Patient (PD1-10). 495 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 496 * it will return zero. 497 */ 498 public int getDuplicatePatientReps() { 499 return this.getReps(10); 500 } 501 502 503 /** 504 * Returns a specific repetition of 505 * PD1-10: "Duplicate Patient" - creates it if necessary 506 * 507 * @param rep The repetition index (0-indexed) 508 */ 509 public CX getDuplicatePatient(int rep) { 510 CX retVal = this.getTypedField(10, rep); 511 return retVal; 512 } 513 514 /** 515 * Returns a specific repetition of 516 * PD1-10: "Duplicate Patient" - creates it if necessary 517 * 518 * @param rep The repetition index (0-indexed) 519 */ 520 public CX getPd110_DuplicatePatient(int rep) { 521 CX retVal = this.getTypedField(10, rep); 522 return retVal; 523 } 524 525 /** 526 * Returns a count of the current number of repetitions of Duplicate Patient (PD1-10). 527 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 528 * it will return zero. 529 */ 530 public int getPd110_DuplicatePatientReps() { 531 return this.getReps(10); 532 } 533 534 535 /** 536 * Inserts a repetition of 537 * PD1-10: "Duplicate Patient" at a specific index 538 * 539 * @param rep The repetition index (0-indexed) 540 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 541 */ 542 public CX insertDuplicatePatient(int rep) throws HL7Exception { 543 return (CX) super.insertRepetition(10, rep); 544 } 545 546 547 /** 548 * Inserts a repetition of 549 * PD1-10: "Duplicate Patient" at a specific index 550 * 551 * @param rep The repetition index (0-indexed) 552 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 553 */ 554 public CX insertPd110_DuplicatePatient(int rep) throws HL7Exception { 555 return (CX) super.insertRepetition(10, rep); 556 } 557 558 559 /** 560 * Removes a repetition of 561 * PD1-10: "Duplicate Patient" at a specific index 562 * 563 * @param rep The repetition index (0-indexed) 564 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 565 */ 566 public CX removeDuplicatePatient(int rep) throws HL7Exception { 567 return (CX) super.removeRepetition(10, rep); 568 } 569 570 571 /** 572 * Removes a repetition of 573 * PD1-10: "Duplicate Patient" at a specific index 574 * 575 * @param rep The repetition index (0-indexed) 576 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 577 */ 578 public CX removePd110_DuplicatePatient(int rep) throws HL7Exception { 579 return (CX) super.removeRepetition(10, rep); 580 } 581 582 583 584 585 /** 586 * Returns 587 * PD1-11: "Publicity Code" - creates it if necessary 588 */ 589 public CWE getPublicityCode() { 590 CWE retVal = this.getTypedField(11, 0); 591 return retVal; 592 } 593 594 /** 595 * Returns 596 * PD1-11: "Publicity Code" - creates it if necessary 597 */ 598 public CWE getPd111_PublicityCode() { 599 CWE retVal = this.getTypedField(11, 0); 600 return retVal; 601 } 602 603 604 605 /** 606 * Returns 607 * PD1-12: "Protection Indicator" - creates it if necessary 608 */ 609 public ID getProtectionIndicator() { 610 ID retVal = this.getTypedField(12, 0); 611 return retVal; 612 } 613 614 /** 615 * Returns 616 * PD1-12: "Protection Indicator" - creates it if necessary 617 */ 618 public ID getPd112_ProtectionIndicator() { 619 ID retVal = this.getTypedField(12, 0); 620 return retVal; 621 } 622 623 624 625 /** 626 * Returns 627 * PD1-13: "Protection Indicator Effective Date" - creates it if necessary 628 */ 629 public DT getProtectionIndicatorEffectiveDate() { 630 DT retVal = this.getTypedField(13, 0); 631 return retVal; 632 } 633 634 /** 635 * Returns 636 * PD1-13: "Protection Indicator Effective Date" - creates it if necessary 637 */ 638 public DT getPd113_ProtectionIndicatorEffectiveDate() { 639 DT retVal = this.getTypedField(13, 0); 640 return retVal; 641 } 642 643 644 /** 645 * Returns all repetitions of Place of Worship (PD1-14). 646 */ 647 public XON[] getPlaceOfWorship() { 648 XON[] retVal = this.getTypedField(14, new XON[0]); 649 return retVal; 650 } 651 652 653 /** 654 * Returns all repetitions of Place of Worship (PD1-14). 655 */ 656 public XON[] getPd114_PlaceOfWorship() { 657 XON[] retVal = this.getTypedField(14, new XON[0]); 658 return retVal; 659 } 660 661 662 /** 663 * Returns a count of the current number of repetitions of Place of Worship (PD1-14). 664 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 665 * it will return zero. 666 */ 667 public int getPlaceOfWorshipReps() { 668 return this.getReps(14); 669 } 670 671 672 /** 673 * Returns a specific repetition of 674 * PD1-14: "Place of Worship" - creates it if necessary 675 * 676 * @param rep The repetition index (0-indexed) 677 */ 678 public XON getPlaceOfWorship(int rep) { 679 XON retVal = this.getTypedField(14, rep); 680 return retVal; 681 } 682 683 /** 684 * Returns a specific repetition of 685 * PD1-14: "Place of Worship" - creates it if necessary 686 * 687 * @param rep The repetition index (0-indexed) 688 */ 689 public XON getPd114_PlaceOfWorship(int rep) { 690 XON retVal = this.getTypedField(14, rep); 691 return retVal; 692 } 693 694 /** 695 * Returns a count of the current number of repetitions of Place of Worship (PD1-14). 696 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 697 * it will return zero. 698 */ 699 public int getPd114_PlaceOfWorshipReps() { 700 return this.getReps(14); 701 } 702 703 704 /** 705 * Inserts a repetition of 706 * PD1-14: "Place of Worship" at a specific index 707 * 708 * @param rep The repetition index (0-indexed) 709 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 710 */ 711 public XON insertPlaceOfWorship(int rep) throws HL7Exception { 712 return (XON) super.insertRepetition(14, rep); 713 } 714 715 716 /** 717 * Inserts a repetition of 718 * PD1-14: "Place of Worship" at a specific index 719 * 720 * @param rep The repetition index (0-indexed) 721 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 722 */ 723 public XON insertPd114_PlaceOfWorship(int rep) throws HL7Exception { 724 return (XON) super.insertRepetition(14, rep); 725 } 726 727 728 /** 729 * Removes a repetition of 730 * PD1-14: "Place of Worship" at a specific index 731 * 732 * @param rep The repetition index (0-indexed) 733 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 734 */ 735 public XON removePlaceOfWorship(int rep) throws HL7Exception { 736 return (XON) super.removeRepetition(14, rep); 737 } 738 739 740 /** 741 * Removes a repetition of 742 * PD1-14: "Place of Worship" at a specific index 743 * 744 * @param rep The repetition index (0-indexed) 745 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 746 */ 747 public XON removePd114_PlaceOfWorship(int rep) throws HL7Exception { 748 return (XON) super.removeRepetition(14, rep); 749 } 750 751 752 753 /** 754 * Returns all repetitions of Advance Directive Code (PD1-15). 755 */ 756 public CWE[] getAdvanceDirectiveCode() { 757 CWE[] retVal = this.getTypedField(15, new CWE[0]); 758 return retVal; 759 } 760 761 762 /** 763 * Returns all repetitions of Advance Directive Code (PD1-15). 764 */ 765 public CWE[] getPd115_AdvanceDirectiveCode() { 766 CWE[] retVal = this.getTypedField(15, new CWE[0]); 767 return retVal; 768 } 769 770 771 /** 772 * Returns a count of the current number of repetitions of Advance Directive Code (PD1-15). 773 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 774 * it will return zero. 775 */ 776 public int getAdvanceDirectiveCodeReps() { 777 return this.getReps(15); 778 } 779 780 781 /** 782 * Returns a specific repetition of 783 * PD1-15: "Advance Directive Code" - creates it if necessary 784 * 785 * @param rep The repetition index (0-indexed) 786 */ 787 public CWE getAdvanceDirectiveCode(int rep) { 788 CWE retVal = this.getTypedField(15, rep); 789 return retVal; 790 } 791 792 /** 793 * Returns a specific repetition of 794 * PD1-15: "Advance Directive Code" - creates it if necessary 795 * 796 * @param rep The repetition index (0-indexed) 797 */ 798 public CWE getPd115_AdvanceDirectiveCode(int rep) { 799 CWE retVal = this.getTypedField(15, rep); 800 return retVal; 801 } 802 803 /** 804 * Returns a count of the current number of repetitions of Advance Directive Code (PD1-15). 805 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 806 * it will return zero. 807 */ 808 public int getPd115_AdvanceDirectiveCodeReps() { 809 return this.getReps(15); 810 } 811 812 813 /** 814 * Inserts a repetition of 815 * PD1-15: "Advance Directive Code" at a specific index 816 * 817 * @param rep The repetition index (0-indexed) 818 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 819 */ 820 public CWE insertAdvanceDirectiveCode(int rep) throws HL7Exception { 821 return (CWE) super.insertRepetition(15, rep); 822 } 823 824 825 /** 826 * Inserts a repetition of 827 * PD1-15: "Advance Directive Code" at a specific index 828 * 829 * @param rep The repetition index (0-indexed) 830 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 831 */ 832 public CWE insertPd115_AdvanceDirectiveCode(int rep) throws HL7Exception { 833 return (CWE) super.insertRepetition(15, rep); 834 } 835 836 837 /** 838 * Removes a repetition of 839 * PD1-15: "Advance Directive Code" at a specific index 840 * 841 * @param rep The repetition index (0-indexed) 842 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 843 */ 844 public CWE removeAdvanceDirectiveCode(int rep) throws HL7Exception { 845 return (CWE) super.removeRepetition(15, rep); 846 } 847 848 849 /** 850 * Removes a repetition of 851 * PD1-15: "Advance Directive Code" at a specific index 852 * 853 * @param rep The repetition index (0-indexed) 854 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 855 */ 856 public CWE removePd115_AdvanceDirectiveCode(int rep) throws HL7Exception { 857 return (CWE) super.removeRepetition(15, rep); 858 } 859 860 861 862 863 /** 864 * Returns 865 * PD1-16: "Immunization Registry Status" - creates it if necessary 866 */ 867 public CWE getImmunizationRegistryStatus() { 868 CWE retVal = this.getTypedField(16, 0); 869 return retVal; 870 } 871 872 /** 873 * Returns 874 * PD1-16: "Immunization Registry Status" - creates it if necessary 875 */ 876 public CWE getPd116_ImmunizationRegistryStatus() { 877 CWE retVal = this.getTypedField(16, 0); 878 return retVal; 879 } 880 881 882 883 /** 884 * Returns 885 * PD1-17: "Immunization Registry Status Effective Date" - creates it if necessary 886 */ 887 public DT getImmunizationRegistryStatusEffectiveDate() { 888 DT retVal = this.getTypedField(17, 0); 889 return retVal; 890 } 891 892 /** 893 * Returns 894 * PD1-17: "Immunization Registry Status Effective Date" - creates it if necessary 895 */ 896 public DT getPd117_ImmunizationRegistryStatusEffectiveDate() { 897 DT retVal = this.getTypedField(17, 0); 898 return retVal; 899 } 900 901 902 903 /** 904 * Returns 905 * PD1-18: "Publicity Code Effective Date" - creates it if necessary 906 */ 907 public DT getPublicityCodeEffectiveDate() { 908 DT retVal = this.getTypedField(18, 0); 909 return retVal; 910 } 911 912 /** 913 * Returns 914 * PD1-18: "Publicity Code Effective Date" - creates it if necessary 915 */ 916 public DT getPd118_PublicityCodeEffectiveDate() { 917 DT retVal = this.getTypedField(18, 0); 918 return retVal; 919 } 920 921 922 923 /** 924 * Returns 925 * PD1-19: "Military Branch" - creates it if necessary 926 */ 927 public CWE getMilitaryBranch() { 928 CWE retVal = this.getTypedField(19, 0); 929 return retVal; 930 } 931 932 /** 933 * Returns 934 * PD1-19: "Military Branch" - creates it if necessary 935 */ 936 public CWE getPd119_MilitaryBranch() { 937 CWE retVal = this.getTypedField(19, 0); 938 return retVal; 939 } 940 941 942 943 /** 944 * Returns 945 * PD1-20: "Military Rank/Grade" - creates it if necessary 946 */ 947 public CWE getMilitaryRankGrade() { 948 CWE retVal = this.getTypedField(20, 0); 949 return retVal; 950 } 951 952 /** 953 * Returns 954 * PD1-20: "Military Rank/Grade" - creates it if necessary 955 */ 956 public CWE getPd120_MilitaryRankGrade() { 957 CWE retVal = this.getTypedField(20, 0); 958 return retVal; 959 } 960 961 962 963 /** 964 * Returns 965 * PD1-21: "Military Status" - creates it if necessary 966 */ 967 public CWE getMilitaryStatus() { 968 CWE retVal = this.getTypedField(21, 0); 969 return retVal; 970 } 971 972 /** 973 * Returns 974 * PD1-21: "Military Status" - creates it if necessary 975 */ 976 public CWE getPd121_MilitaryStatus() { 977 CWE retVal = this.getTypedField(21, 0); 978 return retVal; 979 } 980 981 982 983 /** 984 * Returns 985 * PD1-22: "Advance Directive Last Verified Date" - creates it if necessary 986 */ 987 public DT getAdvanceDirectiveLastVerifiedDate() { 988 DT retVal = this.getTypedField(22, 0); 989 return retVal; 990 } 991 992 /** 993 * Returns 994 * PD1-22: "Advance Directive Last Verified Date" - creates it if necessary 995 */ 996 public DT getPd122_AdvanceDirectiveLastVerifiedDate() { 997 DT retVal = this.getTypedField(22, 0); 998 return retVal; 999 } 1000 1001 1002 1003 1004 1005 /** {@inheritDoc} */ 1006 protected Type createNewTypeWithoutReflection(int field) { 1007 switch (field) { 1008 case 0: return new CWE(getMessage()); 1009 case 1: return new CWE(getMessage()); 1010 case 2: return new XON(getMessage()); 1011 case 3: return new NULLDT(getMessage()); 1012 case 4: return new CWE(getMessage()); 1013 case 5: return new CWE(getMessage()); 1014 case 6: return new CWE(getMessage()); 1015 case 7: return new CWE(getMessage()); 1016 case 8: return new ID(getMessage(), new Integer( 136 )); 1017 case 9: return new CX(getMessage()); 1018 case 10: return new CWE(getMessage()); 1019 case 11: return new ID(getMessage(), new Integer( 136 )); 1020 case 12: return new DT(getMessage()); 1021 case 13: return new XON(getMessage()); 1022 case 14: return new CWE(getMessage()); 1023 case 15: return new CWE(getMessage()); 1024 case 16: return new DT(getMessage()); 1025 case 17: return new DT(getMessage()); 1026 case 18: return new CWE(getMessage()); 1027 case 19: return new CWE(getMessage()); 1028 case 20: return new CWE(getMessage()); 1029 case 21: return new DT(getMessage()); 1030 default: return null; 1031 } 1032 } 1033 1034 1035} 1036