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