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.v231.segment; 035 036// import ca.uhn.hl7v2.model.v231.group.*; 037import ca.uhn.hl7v2.model.v231.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 PID message segment (PID - patient identification segment). 050 * This segment has the following fields:</p> 051 * <ul> 052 * <li>PID-1: Set ID - PID (SI) <b>optional </b> 053 * <li>PID-2: Patient ID (CX) <b>optional </b> 054 * <li>PID-3: Patient Identifier List (CX) <b> repeating</b> 055 * <li>PID-4: Alternate Patient ID - PID (CX) <b>optional repeating</b> 056 * <li>PID-5: Patient Name (XPN) <b> repeating</b> 057 * <li>PID-6: Mother’s Maiden Name (XPN) <b>optional repeating</b> 058 * <li>PID-7: Date/Time Of Birth (TS) <b>optional </b> 059 * <li>PID-8: Sex (IS) <b>optional </b> 060 * <li>PID-9: Patient Alias (XPN) <b>optional repeating</b> 061 * <li>PID-10: Race (CE) <b>optional repeating</b> 062 * <li>PID-11: Patient Address (XAD) <b>optional repeating</b> 063 * <li>PID-12: County Code (IS) <b>optional </b> 064 * <li>PID-13: Phone Number - Home (XTN) <b>optional repeating</b> 065 * <li>PID-14: Phone Number - Business (XTN) <b>optional repeating</b> 066 * <li>PID-15: Primary Language (CE) <b>optional </b> 067 * <li>PID-16: Marital Status (CE) <b>optional </b> 068 * <li>PID-17: Religion (CE) <b>optional </b> 069 * <li>PID-18: Patient Account Number (CX) <b>optional </b> 070 * <li>PID-19: SSN Number - Patient (ST) <b>optional </b> 071 * <li>PID-20: Driver's License Number - Patient (DLN) <b>optional </b> 072 * <li>PID-21: Mother's Identifier (CX) <b>optional repeating</b> 073 * <li>PID-22: Ethnic Group (CE) <b>optional repeating</b> 074 * <li>PID-23: Birth Place (ST) <b>optional </b> 075 * <li>PID-24: Multiple Birth Indicator (ID) <b>optional </b> 076 * <li>PID-25: Birth Order (NM) <b>optional </b> 077 * <li>PID-26: Citizenship (CE) <b>optional repeating</b> 078 * <li>PID-27: Veterans Military Status (CE) <b>optional </b> 079 * <li>PID-28: Nationality (CE) <b>optional </b> 080 * <li>PID-29: Patient Death Date and Time (TS) <b>optional </b> 081 * <li>PID-30: Patient Death Indicator (ID) <b>optional </b> 082 * </ul> 083 */ 084@SuppressWarnings("unused") 085public class PID extends AbstractSegment { 086 087 /** 088 * Creates a new PID segment 089 */ 090 public PID(Group parent, ModelClassFactory factory) { 091 super(parent, factory); 092 init(factory); 093 } 094 095 private void init(ModelClassFactory factory) { 096 try { 097 this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID - PID"); 098 this.add(CX.class, false, 1, 20, new Object[]{ getMessage() }, "Patient ID"); 099 this.add(CX.class, true, 0, 20, new Object[]{ getMessage() }, "Patient Identifier List"); 100 this.add(CX.class, false, 0, 20, new Object[]{ getMessage() }, "Alternate Patient ID - PID"); 101 this.add(XPN.class, true, 0, 48, new Object[]{ getMessage() }, "Patient Name"); 102 this.add(XPN.class, false, 0, 48, new Object[]{ getMessage() }, "Mother’s Maiden Name"); 103 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Date/Time Of Birth"); 104 this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(1) }, "Sex"); 105 this.add(XPN.class, false, 0, 48, new Object[]{ getMessage() }, "Patient Alias"); 106 this.add(CE.class, false, 0, 80, new Object[]{ getMessage() }, "Race"); 107 this.add(XAD.class, false, 0, 106, new Object[]{ getMessage() }, "Patient Address"); 108 this.add(IS.class, false, 1, 4, new Object[]{ getMessage(), new Integer(289) }, "County Code"); 109 this.add(XTN.class, false, 0, 40, new Object[]{ getMessage() }, "Phone Number - Home"); 110 this.add(XTN.class, false, 0, 40, new Object[]{ getMessage() }, "Phone Number - Business"); 111 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Primary Language"); 112 this.add(CE.class, false, 1, 80, new Object[]{ getMessage() }, "Marital Status"); 113 this.add(CE.class, false, 1, 80, new Object[]{ getMessage() }, "Religion"); 114 this.add(CX.class, false, 1, 20, new Object[]{ getMessage() }, "Patient Account Number"); 115 this.add(ST.class, false, 1, 16, new Object[]{ getMessage() }, "SSN Number - Patient"); 116 this.add(DLN.class, false, 1, 25, new Object[]{ getMessage() }, "Driver's License Number - Patient"); 117 this.add(CX.class, false, 0, 20, new Object[]{ getMessage() }, "Mother's Identifier"); 118 this.add(CE.class, false, 0, 80, new Object[]{ getMessage() }, "Ethnic Group"); 119 this.add(ST.class, false, 1, 60, new Object[]{ getMessage() }, "Birth Place"); 120 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Multiple Birth Indicator"); 121 this.add(NM.class, false, 1, 2, new Object[]{ getMessage() }, "Birth Order"); 122 this.add(CE.class, false, 0, 80, new Object[]{ getMessage() }, "Citizenship"); 123 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Veterans Military Status"); 124 this.add(CE.class, false, 1, 80, new Object[]{ getMessage() }, "Nationality"); 125 this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "Patient Death Date and Time"); 126 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Patient Death Indicator"); 127 } catch(HL7Exception e) { 128 log.error("Unexpected error creating PID - this is probably a bug in the source code generator.", e); 129 } 130 } 131 132 133 134 /** 135 * Returns 136 * PID-1: "Set ID - PID" - creates it if necessary 137 */ 138 public SI getSetIDPID() { 139 SI retVal = this.getTypedField(1, 0); 140 return retVal; 141 } 142 143 /** 144 * Returns 145 * PID-1: "Set ID - PID" - creates it if necessary 146 */ 147 public SI getPid1_SetIDPID() { 148 SI retVal = this.getTypedField(1, 0); 149 return retVal; 150 } 151 152 153 154 /** 155 * Returns 156 * PID-2: "Patient ID" - creates it if necessary 157 */ 158 public CX getPatientID() { 159 CX retVal = this.getTypedField(2, 0); 160 return retVal; 161 } 162 163 /** 164 * Returns 165 * PID-2: "Patient ID" - creates it if necessary 166 */ 167 public CX getPid2_PatientID() { 168 CX retVal = this.getTypedField(2, 0); 169 return retVal; 170 } 171 172 173 /** 174 * Returns all repetitions of Patient Identifier List (PID-3). 175 */ 176 public CX[] getPatientIdentifierList() { 177 CX[] retVal = this.getTypedField(3, new CX[0]); 178 return retVal; 179 } 180 181 182 /** 183 * Returns all repetitions of Patient Identifier List (PID-3). 184 */ 185 public CX[] getPid3_PatientIdentifierList() { 186 CX[] retVal = this.getTypedField(3, new CX[0]); 187 return retVal; 188 } 189 190 191 /** 192 * Returns a count of the current number of repetitions of Patient Identifier List (PID-3). 193 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 194 * it will return zero. 195 */ 196 public int getPatientIdentifierListReps() { 197 return this.getReps(3); 198 } 199 200 201 /** 202 * Returns a specific repetition of 203 * PID-3: "Patient Identifier List" - creates it if necessary 204 * 205 * @param rep The repetition index (0-indexed) 206 */ 207 public CX getPatientIdentifierList(int rep) { 208 CX retVal = this.getTypedField(3, rep); 209 return retVal; 210 } 211 212 /** 213 * Returns a specific repetition of 214 * PID-3: "Patient Identifier List" - creates it if necessary 215 * 216 * @param rep The repetition index (0-indexed) 217 */ 218 public CX getPid3_PatientIdentifierList(int rep) { 219 CX retVal = this.getTypedField(3, rep); 220 return retVal; 221 } 222 223 /** 224 * Returns a count of the current number of repetitions of Patient Identifier List (PID-3). 225 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 226 * it will return zero. 227 */ 228 public int getPid3_PatientIdentifierListReps() { 229 return this.getReps(3); 230 } 231 232 233 /** 234 * Inserts a repetition of 235 * PID-3: "Patient Identifier List" at a specific index 236 * 237 * @param rep The repetition index (0-indexed) 238 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 239 */ 240 public CX insertPatientIdentifierList(int rep) throws HL7Exception { 241 return (CX) super.insertRepetition(3, rep); 242 } 243 244 245 /** 246 * Inserts a repetition of 247 * PID-3: "Patient Identifier List" at a specific index 248 * 249 * @param rep The repetition index (0-indexed) 250 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 251 */ 252 public CX insertPid3_PatientIdentifierList(int rep) throws HL7Exception { 253 return (CX) super.insertRepetition(3, rep); 254 } 255 256 257 /** 258 * Removes a repetition of 259 * PID-3: "Patient Identifier List" at a specific index 260 * 261 * @param rep The repetition index (0-indexed) 262 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 263 */ 264 public CX removePatientIdentifierList(int rep) throws HL7Exception { 265 return (CX) super.removeRepetition(3, rep); 266 } 267 268 269 /** 270 * Removes a repetition of 271 * PID-3: "Patient Identifier List" at a specific index 272 * 273 * @param rep The repetition index (0-indexed) 274 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 275 */ 276 public CX removePid3_PatientIdentifierList(int rep) throws HL7Exception { 277 return (CX) super.removeRepetition(3, rep); 278 } 279 280 281 282 /** 283 * Returns all repetitions of Alternate Patient ID - PID (PID-4). 284 */ 285 public CX[] getAlternatePatientIDPID() { 286 CX[] retVal = this.getTypedField(4, new CX[0]); 287 return retVal; 288 } 289 290 291 /** 292 * Returns all repetitions of Alternate Patient ID - PID (PID-4). 293 */ 294 public CX[] getPid4_AlternatePatientIDPID() { 295 CX[] retVal = this.getTypedField(4, new CX[0]); 296 return retVal; 297 } 298 299 300 /** 301 * Returns a count of the current number of repetitions of Alternate Patient ID - PID (PID-4). 302 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 303 * it will return zero. 304 */ 305 public int getAlternatePatientIDPIDReps() { 306 return this.getReps(4); 307 } 308 309 310 /** 311 * Returns a specific repetition of 312 * PID-4: "Alternate Patient ID - PID" - creates it if necessary 313 * 314 * @param rep The repetition index (0-indexed) 315 */ 316 public CX getAlternatePatientIDPID(int rep) { 317 CX retVal = this.getTypedField(4, rep); 318 return retVal; 319 } 320 321 /** 322 * Returns a specific repetition of 323 * PID-4: "Alternate Patient ID - PID" - creates it if necessary 324 * 325 * @param rep The repetition index (0-indexed) 326 */ 327 public CX getPid4_AlternatePatientIDPID(int rep) { 328 CX retVal = this.getTypedField(4, rep); 329 return retVal; 330 } 331 332 /** 333 * Returns a count of the current number of repetitions of Alternate Patient ID - PID (PID-4). 334 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 335 * it will return zero. 336 */ 337 public int getPid4_AlternatePatientIDPIDReps() { 338 return this.getReps(4); 339 } 340 341 342 /** 343 * Inserts a repetition of 344 * PID-4: "Alternate Patient ID - PID" 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 CX insertAlternatePatientIDPID(int rep) throws HL7Exception { 350 return (CX) super.insertRepetition(4, rep); 351 } 352 353 354 /** 355 * Inserts a repetition of 356 * PID-4: "Alternate Patient ID - PID" at a specific index 357 * 358 * @param rep The repetition index (0-indexed) 359 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 360 */ 361 public CX insertPid4_AlternatePatientIDPID(int rep) throws HL7Exception { 362 return (CX) super.insertRepetition(4, rep); 363 } 364 365 366 /** 367 * Removes a repetition of 368 * PID-4: "Alternate Patient ID - PID" at a specific index 369 * 370 * @param rep The repetition index (0-indexed) 371 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 372 */ 373 public CX removeAlternatePatientIDPID(int rep) throws HL7Exception { 374 return (CX) super.removeRepetition(4, rep); 375 } 376 377 378 /** 379 * Removes a repetition of 380 * PID-4: "Alternate Patient ID - PID" at a specific index 381 * 382 * @param rep The repetition index (0-indexed) 383 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 384 */ 385 public CX removePid4_AlternatePatientIDPID(int rep) throws HL7Exception { 386 return (CX) super.removeRepetition(4, rep); 387 } 388 389 390 391 /** 392 * Returns all repetitions of Patient Name (PID-5). 393 */ 394 public XPN[] getPatientName() { 395 XPN[] retVal = this.getTypedField(5, new XPN[0]); 396 return retVal; 397 } 398 399 400 /** 401 * Returns all repetitions of Patient Name (PID-5). 402 */ 403 public XPN[] getPid5_PatientName() { 404 XPN[] retVal = this.getTypedField(5, new XPN[0]); 405 return retVal; 406 } 407 408 409 /** 410 * Returns a count of the current number of repetitions of Patient Name (PID-5). 411 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 412 * it will return zero. 413 */ 414 public int getPatientNameReps() { 415 return this.getReps(5); 416 } 417 418 419 /** 420 * Returns a specific repetition of 421 * PID-5: "Patient Name" - creates it if necessary 422 * 423 * @param rep The repetition index (0-indexed) 424 */ 425 public XPN getPatientName(int rep) { 426 XPN retVal = this.getTypedField(5, rep); 427 return retVal; 428 } 429 430 /** 431 * Returns a specific repetition of 432 * PID-5: "Patient Name" - creates it if necessary 433 * 434 * @param rep The repetition index (0-indexed) 435 */ 436 public XPN getPid5_PatientName(int rep) { 437 XPN retVal = this.getTypedField(5, rep); 438 return retVal; 439 } 440 441 /** 442 * Returns a count of the current number of repetitions of Patient Name (PID-5). 443 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 444 * it will return zero. 445 */ 446 public int getPid5_PatientNameReps() { 447 return this.getReps(5); 448 } 449 450 451 /** 452 * Inserts a repetition of 453 * PID-5: "Patient Name" at a specific index 454 * 455 * @param rep The repetition index (0-indexed) 456 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 457 */ 458 public XPN insertPatientName(int rep) throws HL7Exception { 459 return (XPN) super.insertRepetition(5, rep); 460 } 461 462 463 /** 464 * Inserts a repetition of 465 * PID-5: "Patient Name" at a specific index 466 * 467 * @param rep The repetition index (0-indexed) 468 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 469 */ 470 public XPN insertPid5_PatientName(int rep) throws HL7Exception { 471 return (XPN) super.insertRepetition(5, rep); 472 } 473 474 475 /** 476 * Removes a repetition of 477 * PID-5: "Patient Name" at a specific index 478 * 479 * @param rep The repetition index (0-indexed) 480 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 481 */ 482 public XPN removePatientName(int rep) throws HL7Exception { 483 return (XPN) super.removeRepetition(5, rep); 484 } 485 486 487 /** 488 * Removes a repetition of 489 * PID-5: "Patient Name" at a specific index 490 * 491 * @param rep The repetition index (0-indexed) 492 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 493 */ 494 public XPN removePid5_PatientName(int rep) throws HL7Exception { 495 return (XPN) super.removeRepetition(5, rep); 496 } 497 498 499 500 /** 501 * Returns all repetitions of Mother’s Maiden Name (PID-6). 502 */ 503 public XPN[] getMotherSMaidenName() { 504 XPN[] retVal = this.getTypedField(6, new XPN[0]); 505 return retVal; 506 } 507 508 509 /** 510 * Returns all repetitions of Mother’s Maiden Name (PID-6). 511 */ 512 public XPN[] getPid6_MotherSMaidenName() { 513 XPN[] retVal = this.getTypedField(6, new XPN[0]); 514 return retVal; 515 } 516 517 518 /** 519 * Returns a count of the current number of repetitions of Mother’s Maiden Name (PID-6). 520 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 521 * it will return zero. 522 */ 523 public int getMotherSMaidenNameReps() { 524 return this.getReps(6); 525 } 526 527 528 /** 529 * Returns a specific repetition of 530 * PID-6: "Mother’s Maiden Name" - creates it if necessary 531 * 532 * @param rep The repetition index (0-indexed) 533 */ 534 public XPN getMotherSMaidenName(int rep) { 535 XPN retVal = this.getTypedField(6, rep); 536 return retVal; 537 } 538 539 /** 540 * Returns a specific repetition of 541 * PID-6: "Mother’s Maiden Name" - creates it if necessary 542 * 543 * @param rep The repetition index (0-indexed) 544 */ 545 public XPN getPid6_MotherSMaidenName(int rep) { 546 XPN retVal = this.getTypedField(6, rep); 547 return retVal; 548 } 549 550 /** 551 * Returns a count of the current number of repetitions of Mother’s Maiden Name (PID-6). 552 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 553 * it will return zero. 554 */ 555 public int getPid6_MotherSMaidenNameReps() { 556 return this.getReps(6); 557 } 558 559 560 /** 561 * Inserts a repetition of 562 * PID-6: "Mother’s Maiden Name" at a specific index 563 * 564 * @param rep The repetition index (0-indexed) 565 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 566 */ 567 public XPN insertMotherSMaidenName(int rep) throws HL7Exception { 568 return (XPN) super.insertRepetition(6, rep); 569 } 570 571 572 /** 573 * Inserts a repetition of 574 * PID-6: "Mother’s Maiden Name" at a specific index 575 * 576 * @param rep The repetition index (0-indexed) 577 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 578 */ 579 public XPN insertPid6_MotherSMaidenName(int rep) throws HL7Exception { 580 return (XPN) super.insertRepetition(6, rep); 581 } 582 583 584 /** 585 * Removes a repetition of 586 * PID-6: "Mother’s Maiden Name" at a specific index 587 * 588 * @param rep The repetition index (0-indexed) 589 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 590 */ 591 public XPN removeMotherSMaidenName(int rep) throws HL7Exception { 592 return (XPN) super.removeRepetition(6, rep); 593 } 594 595 596 /** 597 * Removes a repetition of 598 * PID-6: "Mother’s Maiden Name" at a specific index 599 * 600 * @param rep The repetition index (0-indexed) 601 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 602 */ 603 public XPN removePid6_MotherSMaidenName(int rep) throws HL7Exception { 604 return (XPN) super.removeRepetition(6, rep); 605 } 606 607 608 609 610 /** 611 * Returns 612 * PID-7: "Date/Time Of Birth" - creates it if necessary 613 */ 614 public TS getDateTimeOfBirth() { 615 TS retVal = this.getTypedField(7, 0); 616 return retVal; 617 } 618 619 /** 620 * Returns 621 * PID-7: "Date/Time Of Birth" - creates it if necessary 622 */ 623 public TS getPid7_DateTimeOfBirth() { 624 TS retVal = this.getTypedField(7, 0); 625 return retVal; 626 } 627 628 629 630 /** 631 * Returns 632 * PID-8: "Sex" - creates it if necessary 633 */ 634 public IS getSex() { 635 IS retVal = this.getTypedField(8, 0); 636 return retVal; 637 } 638 639 /** 640 * Returns 641 * PID-8: "Sex" - creates it if necessary 642 */ 643 public IS getPid8_Sex() { 644 IS retVal = this.getTypedField(8, 0); 645 return retVal; 646 } 647 648 649 /** 650 * Returns all repetitions of Patient Alias (PID-9). 651 */ 652 public XPN[] getPatientAlias() { 653 XPN[] retVal = this.getTypedField(9, new XPN[0]); 654 return retVal; 655 } 656 657 658 /** 659 * Returns all repetitions of Patient Alias (PID-9). 660 */ 661 public XPN[] getPid9_PatientAlias() { 662 XPN[] retVal = this.getTypedField(9, new XPN[0]); 663 return retVal; 664 } 665 666 667 /** 668 * Returns a count of the current number of repetitions of Patient Alias (PID-9). 669 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 670 * it will return zero. 671 */ 672 public int getPatientAliasReps() { 673 return this.getReps(9); 674 } 675 676 677 /** 678 * Returns a specific repetition of 679 * PID-9: "Patient Alias" - creates it if necessary 680 * 681 * @param rep The repetition index (0-indexed) 682 */ 683 public XPN getPatientAlias(int rep) { 684 XPN retVal = this.getTypedField(9, rep); 685 return retVal; 686 } 687 688 /** 689 * Returns a specific repetition of 690 * PID-9: "Patient Alias" - creates it if necessary 691 * 692 * @param rep The repetition index (0-indexed) 693 */ 694 public XPN getPid9_PatientAlias(int rep) { 695 XPN retVal = this.getTypedField(9, rep); 696 return retVal; 697 } 698 699 /** 700 * Returns a count of the current number of repetitions of Patient Alias (PID-9). 701 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 702 * it will return zero. 703 */ 704 public int getPid9_PatientAliasReps() { 705 return this.getReps(9); 706 } 707 708 709 /** 710 * Inserts a repetition of 711 * PID-9: "Patient Alias" at a specific index 712 * 713 * @param rep The repetition index (0-indexed) 714 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 715 */ 716 public XPN insertPatientAlias(int rep) throws HL7Exception { 717 return (XPN) super.insertRepetition(9, rep); 718 } 719 720 721 /** 722 * Inserts a repetition of 723 * PID-9: "Patient Alias" at a specific index 724 * 725 * @param rep The repetition index (0-indexed) 726 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 727 */ 728 public XPN insertPid9_PatientAlias(int rep) throws HL7Exception { 729 return (XPN) super.insertRepetition(9, rep); 730 } 731 732 733 /** 734 * Removes a repetition of 735 * PID-9: "Patient Alias" at a specific index 736 * 737 * @param rep The repetition index (0-indexed) 738 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 739 */ 740 public XPN removePatientAlias(int rep) throws HL7Exception { 741 return (XPN) super.removeRepetition(9, rep); 742 } 743 744 745 /** 746 * Removes a repetition of 747 * PID-9: "Patient Alias" at a specific index 748 * 749 * @param rep The repetition index (0-indexed) 750 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 751 */ 752 public XPN removePid9_PatientAlias(int rep) throws HL7Exception { 753 return (XPN) super.removeRepetition(9, rep); 754 } 755 756 757 758 /** 759 * Returns all repetitions of Race (PID-10). 760 */ 761 public CE[] getRace() { 762 CE[] retVal = this.getTypedField(10, new CE[0]); 763 return retVal; 764 } 765 766 767 /** 768 * Returns all repetitions of Race (PID-10). 769 */ 770 public CE[] getPid10_Race() { 771 CE[] retVal = this.getTypedField(10, new CE[0]); 772 return retVal; 773 } 774 775 776 /** 777 * Returns a count of the current number of repetitions of Race (PID-10). 778 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 779 * it will return zero. 780 */ 781 public int getRaceReps() { 782 return this.getReps(10); 783 } 784 785 786 /** 787 * Returns a specific repetition of 788 * PID-10: "Race" - creates it if necessary 789 * 790 * @param rep The repetition index (0-indexed) 791 */ 792 public CE getRace(int rep) { 793 CE retVal = this.getTypedField(10, rep); 794 return retVal; 795 } 796 797 /** 798 * Returns a specific repetition of 799 * PID-10: "Race" - creates it if necessary 800 * 801 * @param rep The repetition index (0-indexed) 802 */ 803 public CE getPid10_Race(int rep) { 804 CE retVal = this.getTypedField(10, rep); 805 return retVal; 806 } 807 808 /** 809 * Returns a count of the current number of repetitions of Race (PID-10). 810 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 811 * it will return zero. 812 */ 813 public int getPid10_RaceReps() { 814 return this.getReps(10); 815 } 816 817 818 /** 819 * Inserts a repetition of 820 * PID-10: "Race" at a specific index 821 * 822 * @param rep The repetition index (0-indexed) 823 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 824 */ 825 public CE insertRace(int rep) throws HL7Exception { 826 return (CE) super.insertRepetition(10, rep); 827 } 828 829 830 /** 831 * Inserts a repetition of 832 * PID-10: "Race" at a specific index 833 * 834 * @param rep The repetition index (0-indexed) 835 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 836 */ 837 public CE insertPid10_Race(int rep) throws HL7Exception { 838 return (CE) super.insertRepetition(10, rep); 839 } 840 841 842 /** 843 * Removes a repetition of 844 * PID-10: "Race" at a specific index 845 * 846 * @param rep The repetition index (0-indexed) 847 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 848 */ 849 public CE removeRace(int rep) throws HL7Exception { 850 return (CE) super.removeRepetition(10, rep); 851 } 852 853 854 /** 855 * Removes a repetition of 856 * PID-10: "Race" at a specific index 857 * 858 * @param rep The repetition index (0-indexed) 859 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 860 */ 861 public CE removePid10_Race(int rep) throws HL7Exception { 862 return (CE) super.removeRepetition(10, rep); 863 } 864 865 866 867 /** 868 * Returns all repetitions of Patient Address (PID-11). 869 */ 870 public XAD[] getPatientAddress() { 871 XAD[] retVal = this.getTypedField(11, new XAD[0]); 872 return retVal; 873 } 874 875 876 /** 877 * Returns all repetitions of Patient Address (PID-11). 878 */ 879 public XAD[] getPid11_PatientAddress() { 880 XAD[] retVal = this.getTypedField(11, new XAD[0]); 881 return retVal; 882 } 883 884 885 /** 886 * Returns a count of the current number of repetitions of Patient Address (PID-11). 887 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 888 * it will return zero. 889 */ 890 public int getPatientAddressReps() { 891 return this.getReps(11); 892 } 893 894 895 /** 896 * Returns a specific repetition of 897 * PID-11: "Patient Address" - creates it if necessary 898 * 899 * @param rep The repetition index (0-indexed) 900 */ 901 public XAD getPatientAddress(int rep) { 902 XAD retVal = this.getTypedField(11, rep); 903 return retVal; 904 } 905 906 /** 907 * Returns a specific repetition of 908 * PID-11: "Patient Address" - creates it if necessary 909 * 910 * @param rep The repetition index (0-indexed) 911 */ 912 public XAD getPid11_PatientAddress(int rep) { 913 XAD retVal = this.getTypedField(11, rep); 914 return retVal; 915 } 916 917 /** 918 * Returns a count of the current number of repetitions of Patient Address (PID-11). 919 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 920 * it will return zero. 921 */ 922 public int getPid11_PatientAddressReps() { 923 return this.getReps(11); 924 } 925 926 927 /** 928 * Inserts a repetition of 929 * PID-11: "Patient Address" at a specific index 930 * 931 * @param rep The repetition index (0-indexed) 932 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 933 */ 934 public XAD insertPatientAddress(int rep) throws HL7Exception { 935 return (XAD) super.insertRepetition(11, rep); 936 } 937 938 939 /** 940 * Inserts a repetition of 941 * PID-11: "Patient Address" at a specific index 942 * 943 * @param rep The repetition index (0-indexed) 944 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 945 */ 946 public XAD insertPid11_PatientAddress(int rep) throws HL7Exception { 947 return (XAD) super.insertRepetition(11, rep); 948 } 949 950 951 /** 952 * Removes a repetition of 953 * PID-11: "Patient Address" at a specific index 954 * 955 * @param rep The repetition index (0-indexed) 956 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 957 */ 958 public XAD removePatientAddress(int rep) throws HL7Exception { 959 return (XAD) super.removeRepetition(11, rep); 960 } 961 962 963 /** 964 * Removes a repetition of 965 * PID-11: "Patient Address" at a specific index 966 * 967 * @param rep The repetition index (0-indexed) 968 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 969 */ 970 public XAD removePid11_PatientAddress(int rep) throws HL7Exception { 971 return (XAD) super.removeRepetition(11, rep); 972 } 973 974 975 976 977 /** 978 * Returns 979 * PID-12: "County Code" - creates it if necessary 980 */ 981 public IS getCountyCode() { 982 IS retVal = this.getTypedField(12, 0); 983 return retVal; 984 } 985 986 /** 987 * Returns 988 * PID-12: "County Code" - creates it if necessary 989 */ 990 public IS getPid12_CountyCode() { 991 IS retVal = this.getTypedField(12, 0); 992 return retVal; 993 } 994 995 996 /** 997 * Returns all repetitions of Phone Number - Home (PID-13). 998 */ 999 public XTN[] getPhoneNumberHome() { 1000 XTN[] retVal = this.getTypedField(13, new XTN[0]); 1001 return retVal; 1002 } 1003 1004 1005 /** 1006 * Returns all repetitions of Phone Number - Home (PID-13). 1007 */ 1008 public XTN[] getPid13_PhoneNumberHome() { 1009 XTN[] retVal = this.getTypedField(13, new XTN[0]); 1010 return retVal; 1011 } 1012 1013 1014 /** 1015 * Returns a count of the current number of repetitions of Phone Number - Home (PID-13). 1016 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1017 * it will return zero. 1018 */ 1019 public int getPhoneNumberHomeReps() { 1020 return this.getReps(13); 1021 } 1022 1023 1024 /** 1025 * Returns a specific repetition of 1026 * PID-13: "Phone Number - Home" - creates it if necessary 1027 * 1028 * @param rep The repetition index (0-indexed) 1029 */ 1030 public XTN getPhoneNumberHome(int rep) { 1031 XTN retVal = this.getTypedField(13, rep); 1032 return retVal; 1033 } 1034 1035 /** 1036 * Returns a specific repetition of 1037 * PID-13: "Phone Number - Home" - creates it if necessary 1038 * 1039 * @param rep The repetition index (0-indexed) 1040 */ 1041 public XTN getPid13_PhoneNumberHome(int rep) { 1042 XTN retVal = this.getTypedField(13, rep); 1043 return retVal; 1044 } 1045 1046 /** 1047 * Returns a count of the current number of repetitions of Phone Number - Home (PID-13). 1048 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1049 * it will return zero. 1050 */ 1051 public int getPid13_PhoneNumberHomeReps() { 1052 return this.getReps(13); 1053 } 1054 1055 1056 /** 1057 * Inserts a repetition of 1058 * PID-13: "Phone Number - Home" at a specific index 1059 * 1060 * @param rep The repetition index (0-indexed) 1061 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1062 */ 1063 public XTN insertPhoneNumberHome(int rep) throws HL7Exception { 1064 return (XTN) super.insertRepetition(13, rep); 1065 } 1066 1067 1068 /** 1069 * Inserts a repetition of 1070 * PID-13: "Phone Number - Home" at a specific index 1071 * 1072 * @param rep The repetition index (0-indexed) 1073 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1074 */ 1075 public XTN insertPid13_PhoneNumberHome(int rep) throws HL7Exception { 1076 return (XTN) super.insertRepetition(13, rep); 1077 } 1078 1079 1080 /** 1081 * Removes a repetition of 1082 * PID-13: "Phone Number - Home" at a specific index 1083 * 1084 * @param rep The repetition index (0-indexed) 1085 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1086 */ 1087 public XTN removePhoneNumberHome(int rep) throws HL7Exception { 1088 return (XTN) super.removeRepetition(13, rep); 1089 } 1090 1091 1092 /** 1093 * Removes a repetition of 1094 * PID-13: "Phone Number - Home" at a specific index 1095 * 1096 * @param rep The repetition index (0-indexed) 1097 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1098 */ 1099 public XTN removePid13_PhoneNumberHome(int rep) throws HL7Exception { 1100 return (XTN) super.removeRepetition(13, rep); 1101 } 1102 1103 1104 1105 /** 1106 * Returns all repetitions of Phone Number - Business (PID-14). 1107 */ 1108 public XTN[] getPhoneNumberBusiness() { 1109 XTN[] retVal = this.getTypedField(14, new XTN[0]); 1110 return retVal; 1111 } 1112 1113 1114 /** 1115 * Returns all repetitions of Phone Number - Business (PID-14). 1116 */ 1117 public XTN[] getPid14_PhoneNumberBusiness() { 1118 XTN[] retVal = this.getTypedField(14, new XTN[0]); 1119 return retVal; 1120 } 1121 1122 1123 /** 1124 * Returns a count of the current number of repetitions of Phone Number - Business (PID-14). 1125 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1126 * it will return zero. 1127 */ 1128 public int getPhoneNumberBusinessReps() { 1129 return this.getReps(14); 1130 } 1131 1132 1133 /** 1134 * Returns a specific repetition of 1135 * PID-14: "Phone Number - Business" - creates it if necessary 1136 * 1137 * @param rep The repetition index (0-indexed) 1138 */ 1139 public XTN getPhoneNumberBusiness(int rep) { 1140 XTN retVal = this.getTypedField(14, rep); 1141 return retVal; 1142 } 1143 1144 /** 1145 * Returns a specific repetition of 1146 * PID-14: "Phone Number - Business" - creates it if necessary 1147 * 1148 * @param rep The repetition index (0-indexed) 1149 */ 1150 public XTN getPid14_PhoneNumberBusiness(int rep) { 1151 XTN retVal = this.getTypedField(14, rep); 1152 return retVal; 1153 } 1154 1155 /** 1156 * Returns a count of the current number of repetitions of Phone Number - Business (PID-14). 1157 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1158 * it will return zero. 1159 */ 1160 public int getPid14_PhoneNumberBusinessReps() { 1161 return this.getReps(14); 1162 } 1163 1164 1165 /** 1166 * Inserts a repetition of 1167 * PID-14: "Phone Number - Business" at a specific index 1168 * 1169 * @param rep The repetition index (0-indexed) 1170 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1171 */ 1172 public XTN insertPhoneNumberBusiness(int rep) throws HL7Exception { 1173 return (XTN) super.insertRepetition(14, rep); 1174 } 1175 1176 1177 /** 1178 * Inserts a repetition of 1179 * PID-14: "Phone Number - Business" at a specific index 1180 * 1181 * @param rep The repetition index (0-indexed) 1182 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1183 */ 1184 public XTN insertPid14_PhoneNumberBusiness(int rep) throws HL7Exception { 1185 return (XTN) super.insertRepetition(14, rep); 1186 } 1187 1188 1189 /** 1190 * Removes a repetition of 1191 * PID-14: "Phone Number - Business" at a specific index 1192 * 1193 * @param rep The repetition index (0-indexed) 1194 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1195 */ 1196 public XTN removePhoneNumberBusiness(int rep) throws HL7Exception { 1197 return (XTN) super.removeRepetition(14, rep); 1198 } 1199 1200 1201 /** 1202 * Removes a repetition of 1203 * PID-14: "Phone Number - Business" at a specific index 1204 * 1205 * @param rep The repetition index (0-indexed) 1206 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1207 */ 1208 public XTN removePid14_PhoneNumberBusiness(int rep) throws HL7Exception { 1209 return (XTN) super.removeRepetition(14, rep); 1210 } 1211 1212 1213 1214 1215 /** 1216 * Returns 1217 * PID-15: "Primary Language" - creates it if necessary 1218 */ 1219 public CE getPrimaryLanguage() { 1220 CE retVal = this.getTypedField(15, 0); 1221 return retVal; 1222 } 1223 1224 /** 1225 * Returns 1226 * PID-15: "Primary Language" - creates it if necessary 1227 */ 1228 public CE getPid15_PrimaryLanguage() { 1229 CE retVal = this.getTypedField(15, 0); 1230 return retVal; 1231 } 1232 1233 1234 1235 /** 1236 * Returns 1237 * PID-16: "Marital Status" - creates it if necessary 1238 */ 1239 public CE getMaritalStatus() { 1240 CE retVal = this.getTypedField(16, 0); 1241 return retVal; 1242 } 1243 1244 /** 1245 * Returns 1246 * PID-16: "Marital Status" - creates it if necessary 1247 */ 1248 public CE getPid16_MaritalStatus() { 1249 CE retVal = this.getTypedField(16, 0); 1250 return retVal; 1251 } 1252 1253 1254 1255 /** 1256 * Returns 1257 * PID-17: "Religion" - creates it if necessary 1258 */ 1259 public CE getReligion() { 1260 CE retVal = this.getTypedField(17, 0); 1261 return retVal; 1262 } 1263 1264 /** 1265 * Returns 1266 * PID-17: "Religion" - creates it if necessary 1267 */ 1268 public CE getPid17_Religion() { 1269 CE retVal = this.getTypedField(17, 0); 1270 return retVal; 1271 } 1272 1273 1274 1275 /** 1276 * Returns 1277 * PID-18: "Patient Account Number" - creates it if necessary 1278 */ 1279 public CX getPatientAccountNumber() { 1280 CX retVal = this.getTypedField(18, 0); 1281 return retVal; 1282 } 1283 1284 /** 1285 * Returns 1286 * PID-18: "Patient Account Number" - creates it if necessary 1287 */ 1288 public CX getPid18_PatientAccountNumber() { 1289 CX retVal = this.getTypedField(18, 0); 1290 return retVal; 1291 } 1292 1293 1294 1295 /** 1296 * Returns 1297 * PID-19: "SSN Number - Patient" - creates it if necessary 1298 */ 1299 public ST getSSNNumberPatient() { 1300 ST retVal = this.getTypedField(19, 0); 1301 return retVal; 1302 } 1303 1304 /** 1305 * Returns 1306 * PID-19: "SSN Number - Patient" - creates it if necessary 1307 */ 1308 public ST getPid19_SSNNumberPatient() { 1309 ST retVal = this.getTypedField(19, 0); 1310 return retVal; 1311 } 1312 1313 1314 1315 /** 1316 * Returns 1317 * PID-20: "Driver's License Number - Patient" - creates it if necessary 1318 */ 1319 public DLN getDriverSLicenseNumberPatient() { 1320 DLN retVal = this.getTypedField(20, 0); 1321 return retVal; 1322 } 1323 1324 /** 1325 * Returns 1326 * PID-20: "Driver's License Number - Patient" - creates it if necessary 1327 */ 1328 public DLN getPid20_DriverSLicenseNumberPatient() { 1329 DLN retVal = this.getTypedField(20, 0); 1330 return retVal; 1331 } 1332 1333 1334 /** 1335 * Returns all repetitions of Mother's Identifier (PID-21). 1336 */ 1337 public CX[] getMotherSIdentifier() { 1338 CX[] retVal = this.getTypedField(21, new CX[0]); 1339 return retVal; 1340 } 1341 1342 1343 /** 1344 * Returns all repetitions of Mother's Identifier (PID-21). 1345 */ 1346 public CX[] getPid21_MotherSIdentifier() { 1347 CX[] retVal = this.getTypedField(21, new CX[0]); 1348 return retVal; 1349 } 1350 1351 1352 /** 1353 * Returns a count of the current number of repetitions of Mother's Identifier (PID-21). 1354 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1355 * it will return zero. 1356 */ 1357 public int getMotherSIdentifierReps() { 1358 return this.getReps(21); 1359 } 1360 1361 1362 /** 1363 * Returns a specific repetition of 1364 * PID-21: "Mother's Identifier" - creates it if necessary 1365 * 1366 * @param rep The repetition index (0-indexed) 1367 */ 1368 public CX getMotherSIdentifier(int rep) { 1369 CX retVal = this.getTypedField(21, rep); 1370 return retVal; 1371 } 1372 1373 /** 1374 * Returns a specific repetition of 1375 * PID-21: "Mother's Identifier" - creates it if necessary 1376 * 1377 * @param rep The repetition index (0-indexed) 1378 */ 1379 public CX getPid21_MotherSIdentifier(int rep) { 1380 CX retVal = this.getTypedField(21, rep); 1381 return retVal; 1382 } 1383 1384 /** 1385 * Returns a count of the current number of repetitions of Mother's Identifier (PID-21). 1386 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1387 * it will return zero. 1388 */ 1389 public int getPid21_MotherSIdentifierReps() { 1390 return this.getReps(21); 1391 } 1392 1393 1394 /** 1395 * Inserts a repetition of 1396 * PID-21: "Mother's Identifier" at a specific index 1397 * 1398 * @param rep The repetition index (0-indexed) 1399 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1400 */ 1401 public CX insertMotherSIdentifier(int rep) throws HL7Exception { 1402 return (CX) super.insertRepetition(21, rep); 1403 } 1404 1405 1406 /** 1407 * Inserts a repetition of 1408 * PID-21: "Mother's Identifier" at a specific index 1409 * 1410 * @param rep The repetition index (0-indexed) 1411 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1412 */ 1413 public CX insertPid21_MotherSIdentifier(int rep) throws HL7Exception { 1414 return (CX) super.insertRepetition(21, rep); 1415 } 1416 1417 1418 /** 1419 * Removes a repetition of 1420 * PID-21: "Mother's Identifier" at a specific index 1421 * 1422 * @param rep The repetition index (0-indexed) 1423 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1424 */ 1425 public CX removeMotherSIdentifier(int rep) throws HL7Exception { 1426 return (CX) super.removeRepetition(21, rep); 1427 } 1428 1429 1430 /** 1431 * Removes a repetition of 1432 * PID-21: "Mother's Identifier" at a specific index 1433 * 1434 * @param rep The repetition index (0-indexed) 1435 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1436 */ 1437 public CX removePid21_MotherSIdentifier(int rep) throws HL7Exception { 1438 return (CX) super.removeRepetition(21, rep); 1439 } 1440 1441 1442 1443 /** 1444 * Returns all repetitions of Ethnic Group (PID-22). 1445 */ 1446 public CE[] getEthnicGroup() { 1447 CE[] retVal = this.getTypedField(22, new CE[0]); 1448 return retVal; 1449 } 1450 1451 1452 /** 1453 * Returns all repetitions of Ethnic Group (PID-22). 1454 */ 1455 public CE[] getPid22_EthnicGroup() { 1456 CE[] retVal = this.getTypedField(22, new CE[0]); 1457 return retVal; 1458 } 1459 1460 1461 /** 1462 * Returns a count of the current number of repetitions of Ethnic Group (PID-22). 1463 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1464 * it will return zero. 1465 */ 1466 public int getEthnicGroupReps() { 1467 return this.getReps(22); 1468 } 1469 1470 1471 /** 1472 * Returns a specific repetition of 1473 * PID-22: "Ethnic Group" - creates it if necessary 1474 * 1475 * @param rep The repetition index (0-indexed) 1476 */ 1477 public CE getEthnicGroup(int rep) { 1478 CE retVal = this.getTypedField(22, rep); 1479 return retVal; 1480 } 1481 1482 /** 1483 * Returns a specific repetition of 1484 * PID-22: "Ethnic Group" - creates it if necessary 1485 * 1486 * @param rep The repetition index (0-indexed) 1487 */ 1488 public CE getPid22_EthnicGroup(int rep) { 1489 CE retVal = this.getTypedField(22, rep); 1490 return retVal; 1491 } 1492 1493 /** 1494 * Returns a count of the current number of repetitions of Ethnic Group (PID-22). 1495 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1496 * it will return zero. 1497 */ 1498 public int getPid22_EthnicGroupReps() { 1499 return this.getReps(22); 1500 } 1501 1502 1503 /** 1504 * Inserts a repetition of 1505 * PID-22: "Ethnic Group" at a specific index 1506 * 1507 * @param rep The repetition index (0-indexed) 1508 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1509 */ 1510 public CE insertEthnicGroup(int rep) throws HL7Exception { 1511 return (CE) super.insertRepetition(22, rep); 1512 } 1513 1514 1515 /** 1516 * Inserts a repetition of 1517 * PID-22: "Ethnic Group" at a specific index 1518 * 1519 * @param rep The repetition index (0-indexed) 1520 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1521 */ 1522 public CE insertPid22_EthnicGroup(int rep) throws HL7Exception { 1523 return (CE) super.insertRepetition(22, rep); 1524 } 1525 1526 1527 /** 1528 * Removes a repetition of 1529 * PID-22: "Ethnic Group" at a specific index 1530 * 1531 * @param rep The repetition index (0-indexed) 1532 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1533 */ 1534 public CE removeEthnicGroup(int rep) throws HL7Exception { 1535 return (CE) super.removeRepetition(22, rep); 1536 } 1537 1538 1539 /** 1540 * Removes a repetition of 1541 * PID-22: "Ethnic Group" at a specific index 1542 * 1543 * @param rep The repetition index (0-indexed) 1544 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1545 */ 1546 public CE removePid22_EthnicGroup(int rep) throws HL7Exception { 1547 return (CE) super.removeRepetition(22, rep); 1548 } 1549 1550 1551 1552 1553 /** 1554 * Returns 1555 * PID-23: "Birth Place" - creates it if necessary 1556 */ 1557 public ST getBirthPlace() { 1558 ST retVal = this.getTypedField(23, 0); 1559 return retVal; 1560 } 1561 1562 /** 1563 * Returns 1564 * PID-23: "Birth Place" - creates it if necessary 1565 */ 1566 public ST getPid23_BirthPlace() { 1567 ST retVal = this.getTypedField(23, 0); 1568 return retVal; 1569 } 1570 1571 1572 1573 /** 1574 * Returns 1575 * PID-24: "Multiple Birth Indicator" - creates it if necessary 1576 */ 1577 public ID getMultipleBirthIndicator() { 1578 ID retVal = this.getTypedField(24, 0); 1579 return retVal; 1580 } 1581 1582 /** 1583 * Returns 1584 * PID-24: "Multiple Birth Indicator" - creates it if necessary 1585 */ 1586 public ID getPid24_MultipleBirthIndicator() { 1587 ID retVal = this.getTypedField(24, 0); 1588 return retVal; 1589 } 1590 1591 1592 1593 /** 1594 * Returns 1595 * PID-25: "Birth Order" - creates it if necessary 1596 */ 1597 public NM getBirthOrder() { 1598 NM retVal = this.getTypedField(25, 0); 1599 return retVal; 1600 } 1601 1602 /** 1603 * Returns 1604 * PID-25: "Birth Order" - creates it if necessary 1605 */ 1606 public NM getPid25_BirthOrder() { 1607 NM retVal = this.getTypedField(25, 0); 1608 return retVal; 1609 } 1610 1611 1612 /** 1613 * Returns all repetitions of Citizenship (PID-26). 1614 */ 1615 public CE[] getCitizenship() { 1616 CE[] retVal = this.getTypedField(26, new CE[0]); 1617 return retVal; 1618 } 1619 1620 1621 /** 1622 * Returns all repetitions of Citizenship (PID-26). 1623 */ 1624 public CE[] getPid26_Citizenship() { 1625 CE[] retVal = this.getTypedField(26, new CE[0]); 1626 return retVal; 1627 } 1628 1629 1630 /** 1631 * Returns a count of the current number of repetitions of Citizenship (PID-26). 1632 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1633 * it will return zero. 1634 */ 1635 public int getCitizenshipReps() { 1636 return this.getReps(26); 1637 } 1638 1639 1640 /** 1641 * Returns a specific repetition of 1642 * PID-26: "Citizenship" - creates it if necessary 1643 * 1644 * @param rep The repetition index (0-indexed) 1645 */ 1646 public CE getCitizenship(int rep) { 1647 CE retVal = this.getTypedField(26, rep); 1648 return retVal; 1649 } 1650 1651 /** 1652 * Returns a specific repetition of 1653 * PID-26: "Citizenship" - creates it if necessary 1654 * 1655 * @param rep The repetition index (0-indexed) 1656 */ 1657 public CE getPid26_Citizenship(int rep) { 1658 CE retVal = this.getTypedField(26, rep); 1659 return retVal; 1660 } 1661 1662 /** 1663 * Returns a count of the current number of repetitions of Citizenship (PID-26). 1664 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 1665 * it will return zero. 1666 */ 1667 public int getPid26_CitizenshipReps() { 1668 return this.getReps(26); 1669 } 1670 1671 1672 /** 1673 * Inserts a repetition of 1674 * PID-26: "Citizenship" at a specific index 1675 * 1676 * @param rep The repetition index (0-indexed) 1677 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1678 */ 1679 public CE insertCitizenship(int rep) throws HL7Exception { 1680 return (CE) super.insertRepetition(26, rep); 1681 } 1682 1683 1684 /** 1685 * Inserts a repetition of 1686 * PID-26: "Citizenship" at a specific index 1687 * 1688 * @param rep The repetition index (0-indexed) 1689 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1690 */ 1691 public CE insertPid26_Citizenship(int rep) throws HL7Exception { 1692 return (CE) super.insertRepetition(26, rep); 1693 } 1694 1695 1696 /** 1697 * Removes a repetition of 1698 * PID-26: "Citizenship" at a specific index 1699 * 1700 * @param rep The repetition index (0-indexed) 1701 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1702 */ 1703 public CE removeCitizenship(int rep) throws HL7Exception { 1704 return (CE) super.removeRepetition(26, rep); 1705 } 1706 1707 1708 /** 1709 * Removes a repetition of 1710 * PID-26: "Citizenship" at a specific index 1711 * 1712 * @param rep The repetition index (0-indexed) 1713 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 1714 */ 1715 public CE removePid26_Citizenship(int rep) throws HL7Exception { 1716 return (CE) super.removeRepetition(26, rep); 1717 } 1718 1719 1720 1721 1722 /** 1723 * Returns 1724 * PID-27: "Veterans Military Status" - creates it if necessary 1725 */ 1726 public CE getVeteransMilitaryStatus() { 1727 CE retVal = this.getTypedField(27, 0); 1728 return retVal; 1729 } 1730 1731 /** 1732 * Returns 1733 * PID-27: "Veterans Military Status" - creates it if necessary 1734 */ 1735 public CE getPid27_VeteransMilitaryStatus() { 1736 CE retVal = this.getTypedField(27, 0); 1737 return retVal; 1738 } 1739 1740 1741 1742 /** 1743 * Returns 1744 * PID-28: "Nationality" - creates it if necessary 1745 */ 1746 public CE getNationality() { 1747 CE retVal = this.getTypedField(28, 0); 1748 return retVal; 1749 } 1750 1751 /** 1752 * Returns 1753 * PID-28: "Nationality" - creates it if necessary 1754 */ 1755 public CE getPid28_Nationality() { 1756 CE retVal = this.getTypedField(28, 0); 1757 return retVal; 1758 } 1759 1760 1761 1762 /** 1763 * Returns 1764 * PID-29: "Patient Death Date and Time" - creates it if necessary 1765 */ 1766 public TS getPatientDeathDateAndTime() { 1767 TS retVal = this.getTypedField(29, 0); 1768 return retVal; 1769 } 1770 1771 /** 1772 * Returns 1773 * PID-29: "Patient Death Date and Time" - creates it if necessary 1774 */ 1775 public TS getPid29_PatientDeathDateAndTime() { 1776 TS retVal = this.getTypedField(29, 0); 1777 return retVal; 1778 } 1779 1780 1781 1782 /** 1783 * Returns 1784 * PID-30: "Patient Death Indicator" - creates it if necessary 1785 */ 1786 public ID getPatientDeathIndicator() { 1787 ID retVal = this.getTypedField(30, 0); 1788 return retVal; 1789 } 1790 1791 /** 1792 * Returns 1793 * PID-30: "Patient Death Indicator" - creates it if necessary 1794 */ 1795 public ID getPid30_PatientDeathIndicator() { 1796 ID retVal = this.getTypedField(30, 0); 1797 return retVal; 1798 } 1799 1800 1801 1802 1803 1804 /** {@inheritDoc} */ 1805 protected Type createNewTypeWithoutReflection(int field) { 1806 switch (field) { 1807 case 0: return new SI(getMessage()); 1808 case 1: return new CX(getMessage()); 1809 case 2: return new CX(getMessage()); 1810 case 3: return new CX(getMessage()); 1811 case 4: return new XPN(getMessage()); 1812 case 5: return new XPN(getMessage()); 1813 case 6: return new TS(getMessage()); 1814 case 7: return new IS(getMessage(), new Integer( 1 )); 1815 case 8: return new XPN(getMessage()); 1816 case 9: return new CE(getMessage()); 1817 case 10: return new XAD(getMessage()); 1818 case 11: return new IS(getMessage(), new Integer( 289 )); 1819 case 12: return new XTN(getMessage()); 1820 case 13: return new XTN(getMessage()); 1821 case 14: return new CE(getMessage()); 1822 case 15: return new CE(getMessage()); 1823 case 16: return new CE(getMessage()); 1824 case 17: return new CX(getMessage()); 1825 case 18: return new ST(getMessage()); 1826 case 19: return new DLN(getMessage()); 1827 case 20: return new CX(getMessage()); 1828 case 21: return new CE(getMessage()); 1829 case 22: return new ST(getMessage()); 1830 case 23: return new ID(getMessage(), new Integer( 136 )); 1831 case 24: return new NM(getMessage()); 1832 case 25: return new CE(getMessage()); 1833 case 26: return new CE(getMessage()); 1834 case 27: return new CE(getMessage()); 1835 case 28: return new TS(getMessage()); 1836 case 29: return new ID(getMessage(), new Integer( 136 )); 1837 default: return null; 1838 } 1839 } 1840 1841 1842} 1843