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.v23.segment; 035 036// import ca.uhn.hl7v2.model.v23.group.*; 037import ca.uhn.hl7v2.model.v23.datatype.*; 038import ca.uhn.hl7v2.HL7Exception; 039import ca.uhn.hl7v2.parser.ModelClassFactory; 040import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 041import ca.uhn.hl7v2.model.AbstractMessage; 042import ca.uhn.hl7v2.model.Group; 043import ca.uhn.hl7v2.model.Type; 044import ca.uhn.hl7v2.model.AbstractSegment; 045import ca.uhn.hl7v2.model.Varies; 046 047/** 048 *<p>Represents an HL7 PID message segment (Patient Identification). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>PID-1: Set ID - Patient ID (SI) <b>optional </b> 052 * <li>PID-2: Patient ID (External ID) (CX) <b>optional </b> 053 * <li>PID-3: Patient ID (Internal ID) (CX) <b> repeating</b> 054 * <li>PID-4: Alternate Patient ID (CX) <b>optional </b> 055 * <li>PID-5: Patient Name (XPN) <b> repeating</b> 056 * <li>PID-6: Mother's Maiden Name (XPN) <b>optional </b> 057 * <li>PID-7: Date of Birth (TS) <b>optional </b> 058 * <li>PID-8: Sex (IS) <b>optional </b> 059 * <li>PID-9: Patient Alias (XPN) <b>optional repeating</b> 060 * <li>PID-10: Race (IS) <b>optional </b> 061 * <li>PID-11: Patient Address (XAD) <b>optional repeating</b> 062 * <li>PID-12: County Code (IS) <b>optional </b> 063 * <li>PID-13: Phone Number - Home (XTN) <b>optional repeating</b> 064 * <li>PID-14: Phone Number - Business (XTN) <b>optional repeating</b> 065 * <li>PID-15: Primary Language (CE) <b>optional </b> 066 * <li>PID-16: Marital Status (IS) <b>optional repeating</b> 067 * <li>PID-17: Religion (IS) <b>optional </b> 068 * <li>PID-18: Patient Account Number (CX) <b>optional </b> 069 * <li>PID-19: SSN Number - Patient (ST) <b>optional </b> 070 * <li>PID-20: Driver's License Number (DLN) <b>optional </b> 071 * <li>PID-21: Mother's Identifier (CX) <b>optional </b> 072 * <li>PID-22: Ethnic Group (IS) <b>optional </b> 073 * <li>PID-23: Birth Place (ST) <b>optional </b> 074 * <li>PID-24: Multiple Birth Indicator (ID) <b>optional </b> 075 * <li>PID-25: Birth Order (NM) <b>optional </b> 076 * <li>PID-26: Citizenship (IS) <b>optional </b> 077 * <li>PID-27: Veterans Military Status (CE) <b>optional </b> 078 * <li>PID-28: Nationality Code (CE) <b>optional </b> 079 * <li>PID-29: Patient Death Date and Time (TS) <b>optional </b> 080 * <li>PID-30: Patient Death Indicator (ID) <b>optional </b> 081 * </ul> 082 */ 083@SuppressWarnings("unused") 084public class PID extends AbstractSegment { 085 086 /** 087 * Creates a new PID segment 088 */ 089 public PID(Group parent, ModelClassFactory factory) { 090 super(parent, factory); 091 init(factory); 092 } 093 094 private void init(ModelClassFactory factory) { 095 try { 096 this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - Patient ID"); 097 this.add(CX.class, false, 1, 16, new Object[]{ getMessage() }, "Patient ID (External ID)"); 098 this.add(CX.class, true, 0, 20, new Object[]{ getMessage() }, "Patient ID (Internal ID)"); 099 this.add(CX.class, false, 1, 12, new Object[]{ getMessage() }, "Alternate Patient ID"); 100 this.add(XPN.class, true, -1, 48, new Object[]{ getMessage() }, "Patient Name"); 101 this.add(XPN.class, false, 1, 48, new Object[]{ getMessage() }, "Mother's Maiden Name"); 102 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date of Birth"); 103 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(1) }, "Sex"); 104 this.add(XPN.class, false, 0, 48, new Object[]{ getMessage() }, "Patient Alias"); 105 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(5) }, "Race"); 106 this.add(XAD.class, false, 0, 106, new Object[]{ getMessage() }, "Patient Address"); 107 this.add(IS.class, false, 1, 4, new Object[]{ getMessage(), new Integer(0) }, "County Code"); 108 this.add(XTN.class, false, 0, 40, new Object[]{ getMessage() }, "Phone Number - Home"); 109 this.add(XTN.class, false, 0, 40, new Object[]{ getMessage() }, "Phone Number - Business"); 110 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Primary Language"); 111 this.add(IS.class, false, 0, 1, new Object[]{ getMessage(), new Integer(2) }, "Marital Status"); 112 this.add(IS.class, false, 1, 3, new Object[]{ getMessage(), new Integer(6) }, "Religion"); 113 this.add(CX.class, false, 1, 20, new Object[]{ getMessage() }, "Patient Account Number"); 114 this.add(ST.class, false, 1, 16, new Object[]{ getMessage() }, "SSN Number - Patient"); 115 this.add(DLN.class, false, 1, 25, new Object[]{ getMessage() }, "Driver's License Number"); 116 this.add(CX.class, false, 1, 20, new Object[]{ getMessage() }, "Mother's Identifier"); 117 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(189) }, "Ethnic Group"); 118 this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "Birth Place"); 119 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(136) }, "Multiple Birth Indicator"); 120 this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Birth Order"); 121 this.add(IS.class, false, 1, 4, new Object[]{ getMessage(), new Integer(171) }, "Citizenship"); 122 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Veterans Military Status"); 123 this.add(CE.class, false, 1, 80, new Object[]{ getMessage() }, "Nationality Code"); 124 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Patient Death Date and Time"); 125 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Patient Death Indicator"); 126 } catch(HL7Exception e) { 127 log.error("Unexpected error creating PID - this is probably a bug in the source code generator.", e); 128 } 129 } 130 131 132 133 /** 134 * Returns 135 * PID-1: "Set ID - Patient ID" - creates it if necessary 136 */ 137 public SI getSetIDPatientID() { 138 SI retVal = this.getTypedField(1, 0); 139 return retVal; 140 } 141 142 /** 143 * Returns 144 * PID-1: "Set ID - Patient ID" - creates it if necessary 145 */ 146 public SI getPid1_SetIDPatientID() { 147 SI retVal = this.getTypedField(1, 0); 148 return retVal; 149 } 150 151 152 153 /** 154 * Returns 155 * PID-2: "Patient ID (External ID)" - creates it if necessary 156 */ 157 public CX getPatientIDExternalID() { 158 CX retVal = this.getTypedField(2, 0); 159 return retVal; 160 } 161 162 /** 163 * Returns 164 * PID-2: "Patient ID (External ID)" - creates it if necessary 165 */ 166 public CX getPid2_PatientIDExternalID() { 167 CX retVal = this.getTypedField(2, 0); 168 return retVal; 169 } 170 171 172 /** 173 * Returns all repetitions of Patient ID (Internal ID) (PID-3). 174 */ 175 public CX[] getPatientIDInternalID() { 176 CX[] retVal = this.getTypedField(3, new CX[0]); 177 return retVal; 178 } 179 180 181 /** 182 * Returns all repetitions of Patient ID (Internal ID) (PID-3). 183 */ 184 public CX[] getPid3_PatientIDInternalID() { 185 CX[] retVal = this.getTypedField(3, new CX[0]); 186 return retVal; 187 } 188 189 190 /** 191 * Returns a count of the current number of repetitions of Patient ID (Internal ID) (PID-3). 192 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 193 * it will return zero. 194 */ 195 public int getPatientIDInternalIDReps() { 196 return this.getReps(3); 197 } 198 199 200 /** 201 * Returns a specific repetition of 202 * PID-3: "Patient ID (Internal ID)" - creates it if necessary 203 * 204 * @param rep The repetition index (0-indexed) 205 */ 206 public CX getPatientIDInternalID(int rep) { 207 CX retVal = this.getTypedField(3, rep); 208 return retVal; 209 } 210 211 /** 212 * Returns a specific repetition of 213 * PID-3: "Patient ID (Internal ID)" - creates it if necessary 214 * 215 * @param rep The repetition index (0-indexed) 216 */ 217 public CX getPid3_PatientIDInternalID(int rep) { 218 CX retVal = this.getTypedField(3, rep); 219 return retVal; 220 } 221 222 /** 223 * Returns a count of the current number of repetitions of Patient ID (Internal ID) (PID-3). 224 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 225 * it will return zero. 226 */ 227 public int getPid3_PatientIDInternalIDReps() { 228 return this.getReps(3); 229 } 230 231 232 /** 233 * Inserts a repetition of 234 * PID-3: "Patient ID (Internal ID)" at a specific index 235 * 236 * @param rep The repetition index (0-indexed) 237 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 238 */ 239 public CX insertPatientIDInternalID(int rep) throws HL7Exception { 240 return (CX) super.insertRepetition(3, rep); 241 } 242 243 244 /** 245 * Inserts a repetition of 246 * PID-3: "Patient ID (Internal ID)" at a specific index 247 * 248 * @param rep The repetition index (0-indexed) 249 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 250 */ 251 public CX insertPid3_PatientIDInternalID(int rep) throws HL7Exception { 252 return (CX) super.insertRepetition(3, rep); 253 } 254 255 256 /** 257 * Removes a repetition of 258 * PID-3: "Patient ID (Internal ID)" at a specific index 259 * 260 * @param rep The repetition index (0-indexed) 261 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 262 */ 263 public CX removePatientIDInternalID(int rep) throws HL7Exception { 264 return (CX) super.removeRepetition(3, rep); 265 } 266 267 268 /** 269 * Removes a repetition of 270 * PID-3: "Patient ID (Internal ID)" at a specific index 271 * 272 * @param rep The repetition index (0-indexed) 273 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 274 */ 275 public CX removePid3_PatientIDInternalID(int rep) throws HL7Exception { 276 return (CX) super.removeRepetition(3, rep); 277 } 278 279 280 281 282 /** 283 * Returns 284 * PID-4: "Alternate Patient ID" - creates it if necessary 285 */ 286 public CX getAlternatePatientID() { 287 CX retVal = this.getTypedField(4, 0); 288 return retVal; 289 } 290 291 /** 292 * Returns 293 * PID-4: "Alternate Patient ID" - creates it if necessary 294 */ 295 public CX getPid4_AlternatePatientID() { 296 CX retVal = this.getTypedField(4, 0); 297 return retVal; 298 } 299 300 301 /** 302 * Returns all repetitions of Patient Name (PID-5). 303 */ 304 public XPN[] getPatientName() { 305 XPN[] retVal = this.getTypedField(5, new XPN[0]); 306 return retVal; 307 } 308 309 310 /** 311 * Returns all repetitions of Patient Name (PID-5). 312 */ 313 public XPN[] getPid5_PatientName() { 314 XPN[] retVal = this.getTypedField(5, new XPN[0]); 315 return retVal; 316 } 317 318 319 /** 320 * Returns a count of the current number of repetitions of Patient Name (PID-5). 321 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 322 * it will return zero. 323 */ 324 public int getPatientNameReps() { 325 return this.getReps(5); 326 } 327 328 329 /** 330 * Returns a specific repetition of 331 * PID-5: "Patient Name" - creates it if necessary 332 * 333 * @param rep The repetition index (0-indexed) 334 */ 335 public XPN getPatientName(int rep) { 336 XPN retVal = this.getTypedField(5, rep); 337 return retVal; 338 } 339 340 /** 341 * Returns a specific repetition of 342 * PID-5: "Patient Name" - creates it if necessary 343 * 344 * @param rep The repetition index (0-indexed) 345 */ 346 public XPN getPid5_PatientName(int rep) { 347 XPN retVal = this.getTypedField(5, rep); 348 return retVal; 349 } 350 351 /** 352 * Returns a count of the current number of repetitions of Patient Name (PID-5). 353 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 354 * it will return zero. 355 */ 356 public int getPid5_PatientNameReps() { 357 return this.getReps(5); 358 } 359 360 361 /** 362 * Inserts a repetition of 363 * PID-5: "Patient Name" at a specific index 364 * 365 * @param rep The repetition index (0-indexed) 366 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 367 */ 368 public XPN insertPatientName(int rep) throws HL7Exception { 369 return (XPN) super.insertRepetition(5, rep); 370 } 371 372 373 /** 374 * Inserts a repetition of 375 * PID-5: "Patient Name" at a specific index 376 * 377 * @param rep The repetition index (0-indexed) 378 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 379 */ 380 public XPN insertPid5_PatientName(int rep) throws HL7Exception { 381 return (XPN) super.insertRepetition(5, rep); 382 } 383 384 385 /** 386 * Removes a repetition of 387 * PID-5: "Patient Name" at a specific index 388 * 389 * @param rep The repetition index (0-indexed) 390 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 391 */ 392 public XPN removePatientName(int rep) throws HL7Exception { 393 return (XPN) super.removeRepetition(5, rep); 394 } 395 396 397 /** 398 * Removes a repetition of 399 * PID-5: "Patient Name" at a specific index 400 * 401 * @param rep The repetition index (0-indexed) 402 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 403 */ 404 public XPN removePid5_PatientName(int rep) throws HL7Exception { 405 return (XPN) super.removeRepetition(5, rep); 406 } 407 408 409 410 411 /** 412 * Returns 413 * PID-6: "Mother's Maiden Name" - creates it if necessary 414 */ 415 public XPN getMotherSMaidenName() { 416 XPN retVal = this.getTypedField(6, 0); 417 return retVal; 418 } 419 420 /** 421 * Returns 422 * PID-6: "Mother's Maiden Name" - creates it if necessary 423 */ 424 public XPN getPid6_MotherSMaidenName() { 425 XPN retVal = this.getTypedField(6, 0); 426 return retVal; 427 } 428 429 430 431 /** 432 * Returns 433 * PID-7: "Date of Birth" - creates it if necessary 434 */ 435 public TS getDateOfBirth() { 436 TS retVal = this.getTypedField(7, 0); 437 return retVal; 438 } 439 440 /** 441 * Returns 442 * PID-7: "Date of Birth" - creates it if necessary 443 */ 444 public TS getPid7_DateOfBirth() { 445 TS retVal = this.getTypedField(7, 0); 446 return retVal; 447 } 448 449 450 451 /** 452 * Returns 453 * PID-8: "Sex" - creates it if necessary 454 */ 455 public IS getSex() { 456 IS retVal = this.getTypedField(8, 0); 457 return retVal; 458 } 459 460 /** 461 * Returns 462 * PID-8: "Sex" - creates it if necessary 463 */ 464 public IS getPid8_Sex() { 465 IS retVal = this.getTypedField(8, 0); 466 return retVal; 467 } 468 469 470 /** 471 * Returns all repetitions of Patient Alias (PID-9). 472 */ 473 public XPN[] getPatientAlias() { 474 XPN[] retVal = this.getTypedField(9, new XPN[0]); 475 return retVal; 476 } 477 478 479 /** 480 * Returns all repetitions of Patient Alias (PID-9). 481 */ 482 public XPN[] getPid9_PatientAlias() { 483 XPN[] retVal = this.getTypedField(9, new XPN[0]); 484 return retVal; 485 } 486 487 488 /** 489 * Returns a count of the current number of repetitions of Patient Alias (PID-9). 490 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 491 * it will return zero. 492 */ 493 public int getPatientAliasReps() { 494 return this.getReps(9); 495 } 496 497 498 /** 499 * Returns a specific repetition of 500 * PID-9: "Patient Alias" - creates it if necessary 501 * 502 * @param rep The repetition index (0-indexed) 503 */ 504 public XPN getPatientAlias(int rep) { 505 XPN retVal = this.getTypedField(9, rep); 506 return retVal; 507 } 508 509 /** 510 * Returns a specific repetition of 511 * PID-9: "Patient Alias" - creates it if necessary 512 * 513 * @param rep The repetition index (0-indexed) 514 */ 515 public XPN getPid9_PatientAlias(int rep) { 516 XPN retVal = this.getTypedField(9, rep); 517 return retVal; 518 } 519 520 /** 521 * Returns a count of the current number of repetitions of Patient Alias (PID-9). 522 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 523 * it will return zero. 524 */ 525 public int getPid9_PatientAliasReps() { 526 return this.getReps(9); 527 } 528 529 530 /** 531 * Inserts a repetition of 532 * PID-9: "Patient Alias" at a specific index 533 * 534 * @param rep The repetition index (0-indexed) 535 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 536 */ 537 public XPN insertPatientAlias(int rep) throws HL7Exception { 538 return (XPN) super.insertRepetition(9, rep); 539 } 540 541 542 /** 543 * Inserts a repetition of 544 * PID-9: "Patient Alias" at a specific index 545 * 546 * @param rep The repetition index (0-indexed) 547 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 548 */ 549 public XPN insertPid9_PatientAlias(int rep) throws HL7Exception { 550 return (XPN) super.insertRepetition(9, rep); 551 } 552 553 554 /** 555 * Removes a repetition of 556 * PID-9: "Patient Alias" at a specific index 557 * 558 * @param rep The repetition index (0-indexed) 559 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 560 */ 561 public XPN removePatientAlias(int rep) throws HL7Exception { 562 return (XPN) super.removeRepetition(9, rep); 563 } 564 565 566 /** 567 * Removes a repetition of 568 * PID-9: "Patient Alias" at a specific index 569 * 570 * @param rep The repetition index (0-indexed) 571 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 572 */ 573 public XPN removePid9_PatientAlias(int rep) throws HL7Exception { 574 return (XPN) super.removeRepetition(9, rep); 575 } 576 577 578 579 580 /** 581 * Returns 582 * PID-10: "Race" - creates it if necessary 583 */ 584 public IS getRace() { 585 IS retVal = this.getTypedField(10, 0); 586 return retVal; 587 } 588 589 /** 590 * Returns 591 * PID-10: "Race" - creates it if necessary 592 */ 593 public IS getPid10_Race() { 594 IS retVal = this.getTypedField(10, 0); 595 return retVal; 596 } 597 598 599 /** 600 * Returns all repetitions of Patient Address (PID-11). 601 */ 602 public XAD[] getPatientAddress() { 603 XAD[] retVal = this.getTypedField(11, new XAD[0]); 604 return retVal; 605 } 606 607 608 /** 609 * Returns all repetitions of Patient Address (PID-11). 610 */ 611 public XAD[] getPid11_PatientAddress() { 612 XAD[] retVal = this.getTypedField(11, new XAD[0]); 613 return retVal; 614 } 615 616 617 /** 618 * Returns a count of the current number of repetitions of Patient Address (PID-11). 619 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 620 * it will return zero. 621 */ 622 public int getPatientAddressReps() { 623 return this.getReps(11); 624 } 625 626 627 /** 628 * Returns a specific repetition of 629 * PID-11: "Patient Address" - creates it if necessary 630 * 631 * @param rep The repetition index (0-indexed) 632 */ 633 public XAD getPatientAddress(int rep) { 634 XAD retVal = this.getTypedField(11, rep); 635 return retVal; 636 } 637 638 /** 639 * Returns a specific repetition of 640 * PID-11: "Patient Address" - creates it if necessary 641 * 642 * @param rep The repetition index (0-indexed) 643 */ 644 public XAD getPid11_PatientAddress(int rep) { 645 XAD retVal = this.getTypedField(11, rep); 646 return retVal; 647 } 648 649 /** 650 * Returns a count of the current number of repetitions of Patient Address (PID-11). 651 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 652 * it will return zero. 653 */ 654 public int getPid11_PatientAddressReps() { 655 return this.getReps(11); 656 } 657 658 659 /** 660 * Inserts a repetition of 661 * PID-11: "Patient Address" at a specific index 662 * 663 * @param rep The repetition index (0-indexed) 664 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 665 */ 666 public XAD insertPatientAddress(int rep) throws HL7Exception { 667 return (XAD) super.insertRepetition(11, rep); 668 } 669 670 671 /** 672 * Inserts a repetition of 673 * PID-11: "Patient Address" at a specific index 674 * 675 * @param rep The repetition index (0-indexed) 676 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 677 */ 678 public XAD insertPid11_PatientAddress(int rep) throws HL7Exception { 679 return (XAD) super.insertRepetition(11, rep); 680 } 681 682 683 /** 684 * Removes a repetition of 685 * PID-11: "Patient Address" at a specific index 686 * 687 * @param rep The repetition index (0-indexed) 688 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 689 */ 690 public XAD removePatientAddress(int rep) throws HL7Exception { 691 return (XAD) super.removeRepetition(11, rep); 692 } 693 694 695 /** 696 * Removes a repetition of 697 * PID-11: "Patient Address" at a specific index 698 * 699 * @param rep The repetition index (0-indexed) 700 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 701 */ 702 public XAD removePid11_PatientAddress(int rep) throws HL7Exception { 703 return (XAD) super.removeRepetition(11, rep); 704 } 705 706 707 708 709 /** 710 * Returns 711 * PID-12: "County Code" - creates it if necessary 712 */ 713 public IS getCountyCode() { 714 IS retVal = this.getTypedField(12, 0); 715 return retVal; 716 } 717 718 /** 719 * Returns 720 * PID-12: "County Code" - creates it if necessary 721 */ 722 public IS getPid12_CountyCode() { 723 IS retVal = this.getTypedField(12, 0); 724 return retVal; 725 } 726 727 728 /** 729 * Returns all repetitions of Phone Number - Home (PID-13). 730 */ 731 public XTN[] getPhoneNumberHome() { 732 XTN[] retVal = this.getTypedField(13, new XTN[0]); 733 return retVal; 734 } 735 736 737 /** 738 * Returns all repetitions of Phone Number - Home (PID-13). 739 */ 740 public XTN[] getPid13_PhoneNumberHome() { 741 XTN[] retVal = this.getTypedField(13, new XTN[0]); 742 return retVal; 743 } 744 745 746 /** 747 * Returns a count of the current number of repetitions of Phone Number - Home (PID-13). 748 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 749 * it will return zero. 750 */ 751 public int getPhoneNumberHomeReps() { 752 return this.getReps(13); 753 } 754 755 756 /** 757 * Returns a specific repetition of 758 * PID-13: "Phone Number - Home" - creates it if necessary 759 * 760 * @param rep The repetition index (0-indexed) 761 */ 762 public XTN getPhoneNumberHome(int rep) { 763 XTN retVal = this.getTypedField(13, rep); 764 return retVal; 765 } 766 767 /** 768 * Returns a specific repetition of 769 * PID-13: "Phone Number - Home" - creates it if necessary 770 * 771 * @param rep The repetition index (0-indexed) 772 */ 773 public XTN getPid13_PhoneNumberHome(int rep) { 774 XTN retVal = this.getTypedField(13, rep); 775 return retVal; 776 } 777 778 /** 779 * Returns a count of the current number of repetitions of Phone Number - Home (PID-13). 780 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 781 * it will return zero. 782 */ 783 public int getPid13_PhoneNumberHomeReps() { 784 return this.getReps(13); 785 } 786 787 788 /** 789 * Inserts a repetition of 790 * PID-13: "Phone Number - Home" at a specific index 791 * 792 * @param rep The repetition index (0-indexed) 793 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 794 */ 795 public XTN insertPhoneNumberHome(int rep) throws HL7Exception { 796 return (XTN) super.insertRepetition(13, rep); 797 } 798 799 800 /** 801 * Inserts a repetition of 802 * PID-13: "Phone Number - Home" at a specific index 803 * 804 * @param rep The repetition index (0-indexed) 805 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 806 */ 807 public XTN insertPid13_PhoneNumberHome(int rep) throws HL7Exception { 808 return (XTN) super.insertRepetition(13, rep); 809 } 810 811 812 /** 813 * Removes a repetition of 814 * PID-13: "Phone Number - Home" at a specific index 815 * 816 * @param rep The repetition index (0-indexed) 817 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 818 */ 819 public XTN removePhoneNumberHome(int rep) throws HL7Exception { 820 return (XTN) super.removeRepetition(13, rep); 821 } 822 823 824 /** 825 * Removes a repetition of 826 * PID-13: "Phone Number - Home" at a specific index 827 * 828 * @param rep The repetition index (0-indexed) 829 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 830 */ 831 public XTN removePid13_PhoneNumberHome(int rep) throws HL7Exception { 832 return (XTN) super.removeRepetition(13, rep); 833 } 834 835 836 837 /** 838 * Returns all repetitions of Phone Number - Business (PID-14). 839 */ 840 public XTN[] getPhoneNumberBusiness() { 841 XTN[] retVal = this.getTypedField(14, new XTN[0]); 842 return retVal; 843 } 844 845 846 /** 847 * Returns all repetitions of Phone Number - Business (PID-14). 848 */ 849 public XTN[] getPid14_PhoneNumberBusiness() { 850 XTN[] retVal = this.getTypedField(14, new XTN[0]); 851 return retVal; 852 } 853 854 855 /** 856 * Returns a count of the current number of repetitions of Phone Number - Business (PID-14). 857 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 858 * it will return zero. 859 */ 860 public int getPhoneNumberBusinessReps() { 861 return this.getReps(14); 862 } 863 864 865 /** 866 * Returns a specific repetition of 867 * PID-14: "Phone Number - Business" - creates it if necessary 868 * 869 * @param rep The repetition index (0-indexed) 870 */ 871 public XTN getPhoneNumberBusiness(int rep) { 872 XTN retVal = this.getTypedField(14, rep); 873 return retVal; 874 } 875 876 /** 877 * Returns a specific repetition of 878 * PID-14: "Phone Number - Business" - creates it if necessary 879 * 880 * @param rep The repetition index (0-indexed) 881 */ 882 public XTN getPid14_PhoneNumberBusiness(int rep) { 883 XTN retVal = this.getTypedField(14, rep); 884 return retVal; 885 } 886 887 /** 888 * Returns a count of the current number of repetitions of Phone Number - Business (PID-14). 889 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 890 * it will return zero. 891 */ 892 public int getPid14_PhoneNumberBusinessReps() { 893 return this.getReps(14); 894 } 895 896 897 /** 898 * Inserts a repetition of 899 * PID-14: "Phone Number - Business" at a specific index 900 * 901 * @param rep The repetition index (0-indexed) 902 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 903 */ 904 public XTN insertPhoneNumberBusiness(int rep) throws HL7Exception { 905 return (XTN) super.insertRepetition(14, rep); 906 } 907 908 909 /** 910 * Inserts a repetition of 911 * PID-14: "Phone Number - Business" at a specific index 912 * 913 * @param rep The repetition index (0-indexed) 914 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 915 */ 916 public XTN insertPid14_PhoneNumberBusiness(int rep) throws HL7Exception { 917 return (XTN) super.insertRepetition(14, rep); 918 } 919 920 921 /** 922 * Removes a repetition of 923 * PID-14: "Phone Number - Business" at a specific index 924 * 925 * @param rep The repetition index (0-indexed) 926 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 927 */ 928 public XTN removePhoneNumberBusiness(int rep) throws HL7Exception { 929 return (XTN) super.removeRepetition(14, rep); 930 } 931 932 933 /** 934 * Removes a repetition of 935 * PID-14: "Phone Number - Business" at a specific index 936 * 937 * @param rep The repetition index (0-indexed) 938 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 939 */ 940 public XTN removePid14_PhoneNumberBusiness(int rep) throws HL7Exception { 941 return (XTN) super.removeRepetition(14, rep); 942 } 943 944 945 946 947 /** 948 * Returns 949 * PID-15: "Primary Language" - creates it if necessary 950 */ 951 public CE getPrimaryLanguage() { 952 CE retVal = this.getTypedField(15, 0); 953 return retVal; 954 } 955 956 /** 957 * Returns 958 * PID-15: "Primary Language" - creates it if necessary 959 */ 960 public CE getPid15_PrimaryLanguage() { 961 CE retVal = this.getTypedField(15, 0); 962 return retVal; 963 } 964 965 966 /** 967 * Returns all repetitions of Marital Status (PID-16). 968 */ 969 public IS[] getMaritalStatus() { 970 IS[] retVal = this.getTypedField(16, new IS[0]); 971 return retVal; 972 } 973 974 975 /** 976 * Returns all repetitions of Marital Status (PID-16). 977 */ 978 public IS[] getPid16_MaritalStatus() { 979 IS[] retVal = this.getTypedField(16, new IS[0]); 980 return retVal; 981 } 982 983 984 /** 985 * Returns a count of the current number of repetitions of Marital Status (PID-16). 986 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 987 * it will return zero. 988 */ 989 public int getMaritalStatusReps() { 990 return this.getReps(16); 991 } 992 993 994 /** 995 * Returns a specific repetition of 996 * PID-16: "Marital Status" - creates it if necessary 997 * 998 * @param rep The repetition index (0-indexed) 999 */ 1000 public IS getMaritalStatus(int rep) { 1001 IS retVal = this.getTypedField(16, rep); 1002 return retVal; 1003 } 1004 1005 /** 1006 * Returns a specific repetition of 1007 * PID-16: "Marital Status" - creates it if necessary 1008 * 1009 * @param rep The repetition index (0-indexed) 1010 */ 1011 public IS getPid16_MaritalStatus(int rep) { 1012 IS retVal = this.getTypedField(16, rep); 1013 return retVal; 1014 } 1015 1016 /** 1017 * Returns a count of the current number of repetitions of Marital Status (PID-16). 1018 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1019 * it will return zero. 1020 */ 1021 public int getPid16_MaritalStatusReps() { 1022 return this.getReps(16); 1023 } 1024 1025 1026 /** 1027 * Inserts a repetition of 1028 * PID-16: "Marital Status" at a specific index 1029 * 1030 * @param rep The repetition index (0-indexed) 1031 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1032 */ 1033 public IS insertMaritalStatus(int rep) throws HL7Exception { 1034 return (IS) super.insertRepetition(16, rep); 1035 } 1036 1037 1038 /** 1039 * Inserts a repetition of 1040 * PID-16: "Marital Status" at a specific index 1041 * 1042 * @param rep The repetition index (0-indexed) 1043 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1044 */ 1045 public IS insertPid16_MaritalStatus(int rep) throws HL7Exception { 1046 return (IS) super.insertRepetition(16, rep); 1047 } 1048 1049 1050 /** 1051 * Removes a repetition of 1052 * PID-16: "Marital Status" at a specific index 1053 * 1054 * @param rep The repetition index (0-indexed) 1055 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1056 */ 1057 public IS removeMaritalStatus(int rep) throws HL7Exception { 1058 return (IS) super.removeRepetition(16, rep); 1059 } 1060 1061 1062 /** 1063 * Removes a repetition of 1064 * PID-16: "Marital Status" at a specific index 1065 * 1066 * @param rep The repetition index (0-indexed) 1067 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1068 */ 1069 public IS removePid16_MaritalStatus(int rep) throws HL7Exception { 1070 return (IS) super.removeRepetition(16, rep); 1071 } 1072 1073 1074 1075 1076 /** 1077 * Returns 1078 * PID-17: "Religion" - creates it if necessary 1079 */ 1080 public IS getReligion() { 1081 IS retVal = this.getTypedField(17, 0); 1082 return retVal; 1083 } 1084 1085 /** 1086 * Returns 1087 * PID-17: "Religion" - creates it if necessary 1088 */ 1089 public IS getPid17_Religion() { 1090 IS retVal = this.getTypedField(17, 0); 1091 return retVal; 1092 } 1093 1094 1095 1096 /** 1097 * Returns 1098 * PID-18: "Patient Account Number" - creates it if necessary 1099 */ 1100 public CX getPatientAccountNumber() { 1101 CX retVal = this.getTypedField(18, 0); 1102 return retVal; 1103 } 1104 1105 /** 1106 * Returns 1107 * PID-18: "Patient Account Number" - creates it if necessary 1108 */ 1109 public CX getPid18_PatientAccountNumber() { 1110 CX retVal = this.getTypedField(18, 0); 1111 return retVal; 1112 } 1113 1114 1115 1116 /** 1117 * Returns 1118 * PID-19: "SSN Number - Patient" - creates it if necessary 1119 */ 1120 public ST getSSNNumberPatient() { 1121 ST retVal = this.getTypedField(19, 0); 1122 return retVal; 1123 } 1124 1125 /** 1126 * Returns 1127 * PID-19: "SSN Number - Patient" - creates it if necessary 1128 */ 1129 public ST getPid19_SSNNumberPatient() { 1130 ST retVal = this.getTypedField(19, 0); 1131 return retVal; 1132 } 1133 1134 1135 1136 /** 1137 * Returns 1138 * PID-20: "Driver's License Number" - creates it if necessary 1139 */ 1140 public DLN getDriverSLicenseNumber() { 1141 DLN retVal = this.getTypedField(20, 0); 1142 return retVal; 1143 } 1144 1145 /** 1146 * Returns 1147 * PID-20: "Driver's License Number" - creates it if necessary 1148 */ 1149 public DLN getPid20_DriverSLicenseNumber() { 1150 DLN retVal = this.getTypedField(20, 0); 1151 return retVal; 1152 } 1153 1154 1155 1156 /** 1157 * Returns 1158 * PID-21: "Mother's Identifier" - creates it if necessary 1159 */ 1160 public CX getMotherSIdentifier() { 1161 CX retVal = this.getTypedField(21, 0); 1162 return retVal; 1163 } 1164 1165 /** 1166 * Returns 1167 * PID-21: "Mother's Identifier" - creates it if necessary 1168 */ 1169 public CX getPid21_MotherSIdentifier() { 1170 CX retVal = this.getTypedField(21, 0); 1171 return retVal; 1172 } 1173 1174 1175 1176 /** 1177 * Returns 1178 * PID-22: "Ethnic Group" - creates it if necessary 1179 */ 1180 public IS getEthnicGroup() { 1181 IS retVal = this.getTypedField(22, 0); 1182 return retVal; 1183 } 1184 1185 /** 1186 * Returns 1187 * PID-22: "Ethnic Group" - creates it if necessary 1188 */ 1189 public IS getPid22_EthnicGroup() { 1190 IS retVal = this.getTypedField(22, 0); 1191 return retVal; 1192 } 1193 1194 1195 1196 /** 1197 * Returns 1198 * PID-23: "Birth Place" - creates it if necessary 1199 */ 1200 public ST getBirthPlace() { 1201 ST retVal = this.getTypedField(23, 0); 1202 return retVal; 1203 } 1204 1205 /** 1206 * Returns 1207 * PID-23: "Birth Place" - creates it if necessary 1208 */ 1209 public ST getPid23_BirthPlace() { 1210 ST retVal = this.getTypedField(23, 0); 1211 return retVal; 1212 } 1213 1214 1215 1216 /** 1217 * Returns 1218 * PID-24: "Multiple Birth Indicator" - creates it if necessary 1219 */ 1220 public ID getMultipleBirthIndicator() { 1221 ID retVal = this.getTypedField(24, 0); 1222 return retVal; 1223 } 1224 1225 /** 1226 * Returns 1227 * PID-24: "Multiple Birth Indicator" - creates it if necessary 1228 */ 1229 public ID getPid24_MultipleBirthIndicator() { 1230 ID retVal = this.getTypedField(24, 0); 1231 return retVal; 1232 } 1233 1234 1235 1236 /** 1237 * Returns 1238 * PID-25: "Birth Order" - creates it if necessary 1239 */ 1240 public NM getBirthOrder() { 1241 NM retVal = this.getTypedField(25, 0); 1242 return retVal; 1243 } 1244 1245 /** 1246 * Returns 1247 * PID-25: "Birth Order" - creates it if necessary 1248 */ 1249 public NM getPid25_BirthOrder() { 1250 NM retVal = this.getTypedField(25, 0); 1251 return retVal; 1252 } 1253 1254 1255 1256 /** 1257 * Returns 1258 * PID-26: "Citizenship" - creates it if necessary 1259 */ 1260 public IS getCitizenship() { 1261 IS retVal = this.getTypedField(26, 0); 1262 return retVal; 1263 } 1264 1265 /** 1266 * Returns 1267 * PID-26: "Citizenship" - creates it if necessary 1268 */ 1269 public IS getPid26_Citizenship() { 1270 IS retVal = this.getTypedField(26, 0); 1271 return retVal; 1272 } 1273 1274 1275 1276 /** 1277 * Returns 1278 * PID-27: "Veterans Military Status" - creates it if necessary 1279 */ 1280 public CE getVeteransMilitaryStatus() { 1281 CE retVal = this.getTypedField(27, 0); 1282 return retVal; 1283 } 1284 1285 /** 1286 * Returns 1287 * PID-27: "Veterans Military Status" - creates it if necessary 1288 */ 1289 public CE getPid27_VeteransMilitaryStatus() { 1290 CE retVal = this.getTypedField(27, 0); 1291 return retVal; 1292 } 1293 1294 1295 1296 /** 1297 * Returns 1298 * PID-28: "Nationality Code" - creates it if necessary 1299 */ 1300 public CE getNationalityCode() { 1301 CE retVal = this.getTypedField(28, 0); 1302 return retVal; 1303 } 1304 1305 /** 1306 * Returns 1307 * PID-28: "Nationality Code" - creates it if necessary 1308 */ 1309 public CE getPid28_NationalityCode() { 1310 CE retVal = this.getTypedField(28, 0); 1311 return retVal; 1312 } 1313 1314 1315 1316 /** 1317 * Returns 1318 * PID-29: "Patient Death Date and Time" - creates it if necessary 1319 */ 1320 public TS getPatientDeathDateAndTime() { 1321 TS retVal = this.getTypedField(29, 0); 1322 return retVal; 1323 } 1324 1325 /** 1326 * Returns 1327 * PID-29: "Patient Death Date and Time" - creates it if necessary 1328 */ 1329 public TS getPid29_PatientDeathDateAndTime() { 1330 TS retVal = this.getTypedField(29, 0); 1331 return retVal; 1332 } 1333 1334 1335 1336 /** 1337 * Returns 1338 * PID-30: "Patient Death Indicator" - creates it if necessary 1339 */ 1340 public ID getPatientDeathIndicator() { 1341 ID retVal = this.getTypedField(30, 0); 1342 return retVal; 1343 } 1344 1345 /** 1346 * Returns 1347 * PID-30: "Patient Death Indicator" - creates it if necessary 1348 */ 1349 public ID getPid30_PatientDeathIndicator() { 1350 ID retVal = this.getTypedField(30, 0); 1351 return retVal; 1352 } 1353 1354 1355 1356 1357 1358 /** {@inheritDoc} */ 1359 protected Type createNewTypeWithoutReflection(int field) { 1360 switch (field) { 1361 case 0: return new SI(getMessage()); 1362 case 1: return new CX(getMessage()); 1363 case 2: return new CX(getMessage()); 1364 case 3: return new CX(getMessage()); 1365 case 4: return new XPN(getMessage()); 1366 case 5: return new XPN(getMessage()); 1367 case 6: return new TS(getMessage()); 1368 case 7: return new IS(getMessage(), new Integer( 1 )); 1369 case 8: return new XPN(getMessage()); 1370 case 9: return new IS(getMessage(), new Integer( 5 )); 1371 case 10: return new XAD(getMessage()); 1372 case 11: return new IS(getMessage(), new Integer( 0 )); 1373 case 12: return new XTN(getMessage()); 1374 case 13: return new XTN(getMessage()); 1375 case 14: return new CE(getMessage()); 1376 case 15: return new IS(getMessage(), new Integer( 2 )); 1377 case 16: return new IS(getMessage(), new Integer( 6 )); 1378 case 17: return new CX(getMessage()); 1379 case 18: return new ST(getMessage()); 1380 case 19: return new DLN(getMessage()); 1381 case 20: return new CX(getMessage()); 1382 case 21: return new IS(getMessage(), new Integer( 189 )); 1383 case 22: return new ST(getMessage()); 1384 case 23: return new ID(getMessage(), new Integer( 136 )); 1385 case 24: return new NM(getMessage()); 1386 case 25: return new IS(getMessage(), new Integer( 171 )); 1387 case 26: return new CE(getMessage()); 1388 case 27: return new CE(getMessage()); 1389 case 28: return new TS(getMessage()); 1390 case 29: return new ID(getMessage(), new Integer( 136 )); 1391 default: return null; 1392 } 1393 } 1394 1395 1396} 1397