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 033package ca.uhn.hl7v2.model.v251.datatype; 034 035import ca.uhn.hl7v2.model.DataTypeException; 036import ca.uhn.hl7v2.model.Message; 037import ca.uhn.hl7v2.model.Type; 038import ca.uhn.hl7v2.model.AbstractComposite; 039 040/** 041 * <p>Represents an HL7 PPN (Performing Person Time Stamp) data type. 042 * This type consists of the following components:</p> 043 * <ul> 044 * <li>ID Number (ST) 045 * <li>Family Name (FN) 046 * <li>Given Name (ST) 047 * <li>Second and Further Given Names or Initials Thereof (ST) 048 * <li>Suffix (e.g., JR or III) (ST) 049 * <li>Prefix (e.g., DR) (ST) 050 * <li>Degree (e.g., MD) (IS) 051 * <li>Source Table (IS) 052 * <li>Assigning Authority (HD) 053 * <li>Name Type Code (ID) 054 * <li>Identifier Check Digit (ST) 055 * <li>Check Digit Scheme (ID) 056 * <li>Identifier Type Code (ID) 057 * <li>Assigning Facility (HD) 058 * <li>Date/Time Action Performed (TS) 059 * <li>Name Representation Code (ID) 060 * <li>Name Context (CE) 061 * <li>Name Validity Range (DR) 062 * <li>Name Assembly Order (ID) 063 * <li>Effective Date (TS) 064 * <li>Expiration Date (TS) 065 * <li>Professional Suffix (ST) 066 * <li>Assigning Jurisdiction (CWE) 067 * <li>Assigning Agency or Department (CWE) 068 * </ul> 069 */ 070@SuppressWarnings("unused") 071public class PPN extends AbstractComposite { 072 073 private Type[] data; 074 075 /** 076 * Creates a new PPN type 077 */ 078 public PPN(Message message) { 079 super(message); 080 init(); 081 } 082 083 private void init() { 084 data = new Type[24]; 085 data[0] = new ST(getMessage()); 086 data[1] = new FN(getMessage()); 087 data[2] = new ST(getMessage()); 088 data[3] = new ST(getMessage()); 089 data[4] = new ST(getMessage()); 090 data[5] = new ST(getMessage()); 091 data[6] = new IS(getMessage(), 360); 092 data[7] = new IS(getMessage(), 297); 093 data[8] = new HD(getMessage()); 094 data[9] = new ID(getMessage(), 200); 095 data[10] = new ST(getMessage()); 096 data[11] = new ID(getMessage(), 61); 097 data[12] = new ID(getMessage(), 203); 098 data[13] = new HD(getMessage()); 099 data[14] = new TS(getMessage()); 100 data[15] = new ID(getMessage(), 465); 101 data[16] = new CE(getMessage()); 102 data[17] = new DR(getMessage()); 103 data[18] = new ID(getMessage(), 444); 104 data[19] = new TS(getMessage()); 105 data[20] = new TS(getMessage()); 106 data[21] = new ST(getMessage()); 107 data[22] = new CWE(getMessage()); 108 data[23] = new CWE(getMessage()); 109 } 110 111 112 /** 113 * Returns an array containing the data elements. 114 */ 115 public Type[] getComponents() { 116 return this.data; 117 } 118 119 /** 120 * Returns an individual data component. 121 * 122 * @param number The component number (0-indexed) 123 * @throws DataTypeException if the given element number is out of range. 124 */ 125 public Type getComponent(int number) throws DataTypeException { 126 127 try { 128 return this.data[number]; 129 } catch (ArrayIndexOutOfBoundsException e) { 130 throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)"); 131 } 132 } 133 134 135 /** 136 * Returns ID Number (component 1). This is a convenience method that saves you from 137 * casting and handling an exception. 138 */ 139 public ST getIDNumber() { 140 return getTyped(0, ST.class); 141 } 142 143 144 /** 145 * Returns ID Number (component 1). This is a convenience method that saves you from 146 * casting and handling an exception. 147 */ 148 public ST getPpn1_IDNumber() { 149 return getTyped(0, ST.class); 150 } 151 152 153 /** 154 * Returns Family Name (component 2). This is a convenience method that saves you from 155 * casting and handling an exception. 156 */ 157 public FN getFamilyName() { 158 return getTyped(1, FN.class); 159 } 160 161 162 /** 163 * Returns Family Name (component 2). This is a convenience method that saves you from 164 * casting and handling an exception. 165 */ 166 public FN getPpn2_FamilyName() { 167 return getTyped(1, FN.class); 168 } 169 170 171 /** 172 * Returns Given Name (component 3). This is a convenience method that saves you from 173 * casting and handling an exception. 174 */ 175 public ST getGivenName() { 176 return getTyped(2, ST.class); 177 } 178 179 180 /** 181 * Returns Given Name (component 3). This is a convenience method that saves you from 182 * casting and handling an exception. 183 */ 184 public ST getPpn3_GivenName() { 185 return getTyped(2, ST.class); 186 } 187 188 189 /** 190 * Returns Second and Further Given Names or Initials Thereof (component 4). This is a convenience method that saves you from 191 * casting and handling an exception. 192 */ 193 public ST getSecondAndFurtherGivenNamesOrInitialsThereof() { 194 return getTyped(3, ST.class); 195 } 196 197 198 /** 199 * Returns Second and Further Given Names or Initials Thereof (component 4). This is a convenience method that saves you from 200 * casting and handling an exception. 201 */ 202 public ST getPpn4_SecondAndFurtherGivenNamesOrInitialsThereof() { 203 return getTyped(3, ST.class); 204 } 205 206 207 /** 208 * Returns Suffix (e.g., JR or III) (component 5). This is a convenience method that saves you from 209 * casting and handling an exception. 210 */ 211 public ST getSuffixEgJRorIII() { 212 return getTyped(4, ST.class); 213 } 214 215 216 /** 217 * Returns Suffix (e.g., JR or III) (component 5). This is a convenience method that saves you from 218 * casting and handling an exception. 219 */ 220 public ST getPpn5_SuffixEgJRorIII() { 221 return getTyped(4, ST.class); 222 } 223 224 225 /** 226 * Returns Prefix (e.g., DR) (component 6). This is a convenience method that saves you from 227 * casting and handling an exception. 228 */ 229 public ST getPrefixEgDR() { 230 return getTyped(5, ST.class); 231 } 232 233 234 /** 235 * Returns Prefix (e.g., DR) (component 6). This is a convenience method that saves you from 236 * casting and handling an exception. 237 */ 238 public ST getPpn6_PrefixEgDR() { 239 return getTyped(5, ST.class); 240 } 241 242 243 /** 244 * Returns Degree (e.g., MD) (component 7). This is a convenience method that saves you from 245 * casting and handling an exception. 246 */ 247 public IS getDegreeEgMD() { 248 return getTyped(6, IS.class); 249 } 250 251 252 /** 253 * Returns Degree (e.g., MD) (component 7). This is a convenience method that saves you from 254 * casting and handling an exception. 255 */ 256 public IS getPpn7_DegreeEgMD() { 257 return getTyped(6, IS.class); 258 } 259 260 261 /** 262 * Returns Source Table (component 8). This is a convenience method that saves you from 263 * casting and handling an exception. 264 */ 265 public IS getSourceTable() { 266 return getTyped(7, IS.class); 267 } 268 269 270 /** 271 * Returns Source Table (component 8). This is a convenience method that saves you from 272 * casting and handling an exception. 273 */ 274 public IS getPpn8_SourceTable() { 275 return getTyped(7, IS.class); 276 } 277 278 279 /** 280 * Returns Assigning Authority (component 9). This is a convenience method that saves you from 281 * casting and handling an exception. 282 */ 283 public HD getAssigningAuthority() { 284 return getTyped(8, HD.class); 285 } 286 287 288 /** 289 * Returns Assigning Authority (component 9). This is a convenience method that saves you from 290 * casting and handling an exception. 291 */ 292 public HD getPpn9_AssigningAuthority() { 293 return getTyped(8, HD.class); 294 } 295 296 297 /** 298 * Returns Name Type Code (component 10). This is a convenience method that saves you from 299 * casting and handling an exception. 300 */ 301 public ID getNameTypeCode() { 302 return getTyped(9, ID.class); 303 } 304 305 306 /** 307 * Returns Name Type Code (component 10). This is a convenience method that saves you from 308 * casting and handling an exception. 309 */ 310 public ID getPpn10_NameTypeCode() { 311 return getTyped(9, ID.class); 312 } 313 314 315 /** 316 * Returns Identifier Check Digit (component 11). This is a convenience method that saves you from 317 * casting and handling an exception. 318 */ 319 public ST getIdentifierCheckDigit() { 320 return getTyped(10, ST.class); 321 } 322 323 324 /** 325 * Returns Identifier Check Digit (component 11). This is a convenience method that saves you from 326 * casting and handling an exception. 327 */ 328 public ST getPpn11_IdentifierCheckDigit() { 329 return getTyped(10, ST.class); 330 } 331 332 333 /** 334 * Returns Check Digit Scheme (component 12). This is a convenience method that saves you from 335 * casting and handling an exception. 336 */ 337 public ID getCheckDigitScheme() { 338 return getTyped(11, ID.class); 339 } 340 341 342 /** 343 * Returns Check Digit Scheme (component 12). This is a convenience method that saves you from 344 * casting and handling an exception. 345 */ 346 public ID getPpn12_CheckDigitScheme() { 347 return getTyped(11, ID.class); 348 } 349 350 351 /** 352 * Returns Identifier Type Code (component 13). This is a convenience method that saves you from 353 * casting and handling an exception. 354 */ 355 public ID getIdentifierTypeCode() { 356 return getTyped(12, ID.class); 357 } 358 359 360 /** 361 * Returns Identifier Type Code (component 13). This is a convenience method that saves you from 362 * casting and handling an exception. 363 */ 364 public ID getPpn13_IdentifierTypeCode() { 365 return getTyped(12, ID.class); 366 } 367 368 369 /** 370 * Returns Assigning Facility (component 14). This is a convenience method that saves you from 371 * casting and handling an exception. 372 */ 373 public HD getAssigningFacility() { 374 return getTyped(13, HD.class); 375 } 376 377 378 /** 379 * Returns Assigning Facility (component 14). This is a convenience method that saves you from 380 * casting and handling an exception. 381 */ 382 public HD getPpn14_AssigningFacility() { 383 return getTyped(13, HD.class); 384 } 385 386 387 /** 388 * Returns Date/Time Action Performed (component 15). This is a convenience method that saves you from 389 * casting and handling an exception. 390 */ 391 public TS getDateTimeActionPerformed() { 392 return getTyped(14, TS.class); 393 } 394 395 396 /** 397 * Returns Date/Time Action Performed (component 15). This is a convenience method that saves you from 398 * casting and handling an exception. 399 */ 400 public TS getPpn15_DateTimeActionPerformed() { 401 return getTyped(14, TS.class); 402 } 403 404 405 /** 406 * Returns Name Representation Code (component 16). This is a convenience method that saves you from 407 * casting and handling an exception. 408 */ 409 public ID getNameRepresentationCode() { 410 return getTyped(15, ID.class); 411 } 412 413 414 /** 415 * Returns Name Representation Code (component 16). This is a convenience method that saves you from 416 * casting and handling an exception. 417 */ 418 public ID getPpn16_NameRepresentationCode() { 419 return getTyped(15, ID.class); 420 } 421 422 423 /** 424 * Returns Name Context (component 17). This is a convenience method that saves you from 425 * casting and handling an exception. 426 */ 427 public CE getNameContext() { 428 return getTyped(16, CE.class); 429 } 430 431 432 /** 433 * Returns Name Context (component 17). This is a convenience method that saves you from 434 * casting and handling an exception. 435 */ 436 public CE getPpn17_NameContext() { 437 return getTyped(16, CE.class); 438 } 439 440 441 /** 442 * Returns Name Validity Range (component 18). This is a convenience method that saves you from 443 * casting and handling an exception. 444 */ 445 public DR getNameValidityRange() { 446 return getTyped(17, DR.class); 447 } 448 449 450 /** 451 * Returns Name Validity Range (component 18). This is a convenience method that saves you from 452 * casting and handling an exception. 453 */ 454 public DR getPpn18_NameValidityRange() { 455 return getTyped(17, DR.class); 456 } 457 458 459 /** 460 * Returns Name Assembly Order (component 19). This is a convenience method that saves you from 461 * casting and handling an exception. 462 */ 463 public ID getNameAssemblyOrder() { 464 return getTyped(18, ID.class); 465 } 466 467 468 /** 469 * Returns Name Assembly Order (component 19). This is a convenience method that saves you from 470 * casting and handling an exception. 471 */ 472 public ID getPpn19_NameAssemblyOrder() { 473 return getTyped(18, ID.class); 474 } 475 476 477 /** 478 * Returns Effective Date (component 20). This is a convenience method that saves you from 479 * casting and handling an exception. 480 */ 481 public TS getEffectiveDate() { 482 return getTyped(19, TS.class); 483 } 484 485 486 /** 487 * Returns Effective Date (component 20). This is a convenience method that saves you from 488 * casting and handling an exception. 489 */ 490 public TS getPpn20_EffectiveDate() { 491 return getTyped(19, TS.class); 492 } 493 494 495 /** 496 * Returns Expiration Date (component 21). This is a convenience method that saves you from 497 * casting and handling an exception. 498 */ 499 public TS getExpirationDate() { 500 return getTyped(20, TS.class); 501 } 502 503 504 /** 505 * Returns Expiration Date (component 21). This is a convenience method that saves you from 506 * casting and handling an exception. 507 */ 508 public TS getPpn21_ExpirationDate() { 509 return getTyped(20, TS.class); 510 } 511 512 513 /** 514 * Returns Professional Suffix (component 22). This is a convenience method that saves you from 515 * casting and handling an exception. 516 */ 517 public ST getProfessionalSuffix() { 518 return getTyped(21, ST.class); 519 } 520 521 522 /** 523 * Returns Professional Suffix (component 22). This is a convenience method that saves you from 524 * casting and handling an exception. 525 */ 526 public ST getPpn22_ProfessionalSuffix() { 527 return getTyped(21, ST.class); 528 } 529 530 531 /** 532 * Returns Assigning Jurisdiction (component 23). This is a convenience method that saves you from 533 * casting and handling an exception. 534 */ 535 public CWE getAssigningJurisdiction() { 536 return getTyped(22, CWE.class); 537 } 538 539 540 /** 541 * Returns Assigning Jurisdiction (component 23). This is a convenience method that saves you from 542 * casting and handling an exception. 543 */ 544 public CWE getPpn23_AssigningJurisdiction() { 545 return getTyped(22, CWE.class); 546 } 547 548 549 /** 550 * Returns Assigning Agency or Department (component 24). This is a convenience method that saves you from 551 * casting and handling an exception. 552 */ 553 public CWE getAssigningAgencyOrDepartment() { 554 return getTyped(23, CWE.class); 555 } 556 557 558 /** 559 * Returns Assigning Agency or Department (component 24). This is a convenience method that saves you from 560 * casting and handling an exception. 561 */ 562 public CWE getPpn24_AssigningAgencyOrDepartment() { 563 return getTyped(23, CWE.class); 564 } 565 566 567 568} 569