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