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.v26.segment; 035 036// import ca.uhn.hl7v2.model.v26.group.*; 037import ca.uhn.hl7v2.model.v26.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 MSH message segment (Message Header). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>MSH-1: Field Separator (ST) <b> </b> 052 * <li>MSH-2: Encoding Characters (ST) <b> </b> 053 * <li>MSH-3: Sending Application (HD) <b>optional </b> 054 * <li>MSH-4: Sending Facility (HD) <b>optional </b> 055 * <li>MSH-5: Receiving Application (HD) <b>optional </b> 056 * <li>MSH-6: Receiving Facility (HD) <b>optional </b> 057 * <li>MSH-7: Date/Time of Message (DTM) <b> </b> 058 * <li>MSH-8: Security (ST) <b>optional </b> 059 * <li>MSH-9: Message Type (MSG) <b> </b> 060 * <li>MSH-10: Message Control ID (ST) <b> </b> 061 * <li>MSH-11: Processing ID (PT) <b> </b> 062 * <li>MSH-12: Version ID (VID) <b> </b> 063 * <li>MSH-13: Sequence Number (NM) <b>optional </b> 064 * <li>MSH-14: Continuation Pointer (ST) <b>optional </b> 065 * <li>MSH-15: Accept Acknowledgment Type (ID) <b>optional </b> 066 * <li>MSH-16: Application Acknowledgment Type (ID) <b>optional </b> 067 * <li>MSH-17: Country Code (ID) <b>optional </b> 068 * <li>MSH-18: Character Set (ID) <b>optional repeating</b> 069 * <li>MSH-19: Principal Language Of Message (CWE) <b>optional </b> 070 * <li>MSH-20: Alternate Character Set Handling Scheme (ID) <b>optional </b> 071 * <li>MSH-21: Message Profile Identifier (EI) <b>optional repeating</b> 072 * <li>MSH-22: Sending Responsible Organization (XON) <b>optional </b> 073 * <li>MSH-23: Receiving Responsible Organization (XON) <b>optional </b> 074 * <li>MSH-24: Sending Network Address (HD) <b>optional </b> 075 * <li>MSH-25: Receiving Network Address (HD) <b>optional </b> 076 * </ul> 077 */ 078@SuppressWarnings("unused") 079public class MSH extends AbstractSegment { 080 081 /** 082 * Creates a new MSH segment 083 */ 084 public MSH(Group parent, ModelClassFactory factory) { 085 super(parent, factory); 086 init(factory); 087 } 088 089 private void init(ModelClassFactory factory) { 090 try { 091 this.add(ST.class, true, 1, 1, new Object[]{ getMessage() }, "Field Separator"); 092 this.add(ST.class, true, 1, 4, new Object[]{ getMessage() }, "Encoding Characters"); 093 this.add(HD.class, false, 1, 227, new Object[]{ getMessage() }, "Sending Application"); 094 this.add(HD.class, false, 1, 227, new Object[]{ getMessage() }, "Sending Facility"); 095 this.add(HD.class, false, 1, 227, new Object[]{ getMessage() }, "Receiving Application"); 096 this.add(HD.class, false, 1, 227, new Object[]{ getMessage() }, "Receiving Facility"); 097 this.add(DTM.class, true, 1, 24, new Object[]{ getMessage() }, "Date/Time of Message"); 098 this.add(ST.class, false, 1, 40, new Object[]{ getMessage() }, "Security"); 099 this.add(MSG.class, true, 1, 15, new Object[]{ getMessage() }, "Message Type"); 100 this.add(ST.class, true, 1, 199, new Object[]{ getMessage() }, "Message Control ID"); 101 this.add(PT.class, true, 1, 3, new Object[]{ getMessage() }, "Processing ID"); 102 this.add(VID.class, true, 1, 60, new Object[]{ getMessage() }, "Version ID"); 103 this.add(NM.class, false, 1, 15, new Object[]{ getMessage() }, "Sequence Number"); 104 this.add(ST.class, false, 1, 180, new Object[]{ getMessage() }, "Continuation Pointer"); 105 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(155) }, "Accept Acknowledgment Type"); 106 this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(155) }, "Application Acknowledgment Type"); 107 this.add(ID.class, false, 1, 3, new Object[]{ getMessage(), new Integer(399) }, "Country Code"); 108 this.add(ID.class, false, 0, 16, new Object[]{ getMessage(), new Integer(211) }, "Character Set"); 109 this.add(CWE.class, false, 1, 250, new Object[]{ getMessage() }, "Principal Language Of Message"); 110 this.add(ID.class, false, 1, 20, new Object[]{ getMessage(), new Integer(356) }, "Alternate Character Set Handling Scheme"); 111 this.add(EI.class, false, 0, 427, new Object[]{ getMessage() }, "Message Profile Identifier"); 112 this.add(XON.class, false, 1, 567, new Object[]{ getMessage() }, "Sending Responsible Organization"); 113 this.add(XON.class, false, 1, 567, new Object[]{ getMessage() }, "Receiving Responsible Organization"); 114 this.add(HD.class, false, 1, 227, new Object[]{ getMessage() }, "Sending Network Address"); 115 this.add(HD.class, false, 1, 227, new Object[]{ getMessage() }, "Receiving Network Address"); 116 } catch(HL7Exception e) { 117 log.error("Unexpected error creating MSH - this is probably a bug in the source code generator.", e); 118 } 119 } 120 121 122 123 /** 124 * Returns 125 * MSH-1: "Field Separator" - creates it if necessary 126 */ 127 public ST getFieldSeparator() { 128 ST retVal = this.getTypedField(1, 0); 129 return retVal; 130 } 131 132 /** 133 * Returns 134 * MSH-1: "Field Separator" - creates it if necessary 135 */ 136 public ST getMsh1_FieldSeparator() { 137 ST retVal = this.getTypedField(1, 0); 138 return retVal; 139 } 140 141 142 143 /** 144 * Returns 145 * MSH-2: "Encoding Characters" - creates it if necessary 146 */ 147 public ST getEncodingCharacters() { 148 ST retVal = this.getTypedField(2, 0); 149 return retVal; 150 } 151 152 /** 153 * Returns 154 * MSH-2: "Encoding Characters" - creates it if necessary 155 */ 156 public ST getMsh2_EncodingCharacters() { 157 ST retVal = this.getTypedField(2, 0); 158 return retVal; 159 } 160 161 162 163 /** 164 * Returns 165 * MSH-3: "Sending Application" - creates it if necessary 166 */ 167 public HD getSendingApplication() { 168 HD retVal = this.getTypedField(3, 0); 169 return retVal; 170 } 171 172 /** 173 * Returns 174 * MSH-3: "Sending Application" - creates it if necessary 175 */ 176 public HD getMsh3_SendingApplication() { 177 HD retVal = this.getTypedField(3, 0); 178 return retVal; 179 } 180 181 182 183 /** 184 * Returns 185 * MSH-4: "Sending Facility" - creates it if necessary 186 */ 187 public HD getSendingFacility() { 188 HD retVal = this.getTypedField(4, 0); 189 return retVal; 190 } 191 192 /** 193 * Returns 194 * MSH-4: "Sending Facility" - creates it if necessary 195 */ 196 public HD getMsh4_SendingFacility() { 197 HD retVal = this.getTypedField(4, 0); 198 return retVal; 199 } 200 201 202 203 /** 204 * Returns 205 * MSH-5: "Receiving Application" - creates it if necessary 206 */ 207 public HD getReceivingApplication() { 208 HD retVal = this.getTypedField(5, 0); 209 return retVal; 210 } 211 212 /** 213 * Returns 214 * MSH-5: "Receiving Application" - creates it if necessary 215 */ 216 public HD getMsh5_ReceivingApplication() { 217 HD retVal = this.getTypedField(5, 0); 218 return retVal; 219 } 220 221 222 223 /** 224 * Returns 225 * MSH-6: "Receiving Facility" - creates it if necessary 226 */ 227 public HD getReceivingFacility() { 228 HD retVal = this.getTypedField(6, 0); 229 return retVal; 230 } 231 232 /** 233 * Returns 234 * MSH-6: "Receiving Facility" - creates it if necessary 235 */ 236 public HD getMsh6_ReceivingFacility() { 237 HD retVal = this.getTypedField(6, 0); 238 return retVal; 239 } 240 241 242 243 /** 244 * Returns 245 * MSH-7: "Date/Time of Message" - creates it if necessary 246 */ 247 public DTM getDateTimeOfMessage() { 248 DTM retVal = this.getTypedField(7, 0); 249 return retVal; 250 } 251 252 /** 253 * Returns 254 * MSH-7: "Date/Time of Message" - creates it if necessary 255 */ 256 public DTM getMsh7_DateTimeOfMessage() { 257 DTM retVal = this.getTypedField(7, 0); 258 return retVal; 259 } 260 261 262 263 /** 264 * Returns 265 * MSH-8: "Security" - creates it if necessary 266 */ 267 public ST getSecurity() { 268 ST retVal = this.getTypedField(8, 0); 269 return retVal; 270 } 271 272 /** 273 * Returns 274 * MSH-8: "Security" - creates it if necessary 275 */ 276 public ST getMsh8_Security() { 277 ST retVal = this.getTypedField(8, 0); 278 return retVal; 279 } 280 281 282 283 /** 284 * Returns 285 * MSH-9: "Message Type" - creates it if necessary 286 */ 287 public MSG getMessageType() { 288 MSG retVal = this.getTypedField(9, 0); 289 return retVal; 290 } 291 292 /** 293 * Returns 294 * MSH-9: "Message Type" - creates it if necessary 295 */ 296 public MSG getMsh9_MessageType() { 297 MSG retVal = this.getTypedField(9, 0); 298 return retVal; 299 } 300 301 302 303 /** 304 * Returns 305 * MSH-10: "Message Control ID" - creates it if necessary 306 */ 307 public ST getMessageControlID() { 308 ST retVal = this.getTypedField(10, 0); 309 return retVal; 310 } 311 312 /** 313 * Returns 314 * MSH-10: "Message Control ID" - creates it if necessary 315 */ 316 public ST getMsh10_MessageControlID() { 317 ST retVal = this.getTypedField(10, 0); 318 return retVal; 319 } 320 321 322 323 /** 324 * Returns 325 * MSH-11: "Processing ID" - creates it if necessary 326 */ 327 public PT getProcessingID() { 328 PT retVal = this.getTypedField(11, 0); 329 return retVal; 330 } 331 332 /** 333 * Returns 334 * MSH-11: "Processing ID" - creates it if necessary 335 */ 336 public PT getMsh11_ProcessingID() { 337 PT retVal = this.getTypedField(11, 0); 338 return retVal; 339 } 340 341 342 343 /** 344 * Returns 345 * MSH-12: "Version ID" - creates it if necessary 346 */ 347 public VID getVersionID() { 348 VID retVal = this.getTypedField(12, 0); 349 return retVal; 350 } 351 352 /** 353 * Returns 354 * MSH-12: "Version ID" - creates it if necessary 355 */ 356 public VID getMsh12_VersionID() { 357 VID retVal = this.getTypedField(12, 0); 358 return retVal; 359 } 360 361 362 363 /** 364 * Returns 365 * MSH-13: "Sequence Number" - creates it if necessary 366 */ 367 public NM getSequenceNumber() { 368 NM retVal = this.getTypedField(13, 0); 369 return retVal; 370 } 371 372 /** 373 * Returns 374 * MSH-13: "Sequence Number" - creates it if necessary 375 */ 376 public NM getMsh13_SequenceNumber() { 377 NM retVal = this.getTypedField(13, 0); 378 return retVal; 379 } 380 381 382 383 /** 384 * Returns 385 * MSH-14: "Continuation Pointer" - creates it if necessary 386 */ 387 public ST getContinuationPointer() { 388 ST retVal = this.getTypedField(14, 0); 389 return retVal; 390 } 391 392 /** 393 * Returns 394 * MSH-14: "Continuation Pointer" - creates it if necessary 395 */ 396 public ST getMsh14_ContinuationPointer() { 397 ST retVal = this.getTypedField(14, 0); 398 return retVal; 399 } 400 401 402 403 /** 404 * Returns 405 * MSH-15: "Accept Acknowledgment Type" - creates it if necessary 406 */ 407 public ID getAcceptAcknowledgmentType() { 408 ID retVal = this.getTypedField(15, 0); 409 return retVal; 410 } 411 412 /** 413 * Returns 414 * MSH-15: "Accept Acknowledgment Type" - creates it if necessary 415 */ 416 public ID getMsh15_AcceptAcknowledgmentType() { 417 ID retVal = this.getTypedField(15, 0); 418 return retVal; 419 } 420 421 422 423 /** 424 * Returns 425 * MSH-16: "Application Acknowledgment Type" - creates it if necessary 426 */ 427 public ID getApplicationAcknowledgmentType() { 428 ID retVal = this.getTypedField(16, 0); 429 return retVal; 430 } 431 432 /** 433 * Returns 434 * MSH-16: "Application Acknowledgment Type" - creates it if necessary 435 */ 436 public ID getMsh16_ApplicationAcknowledgmentType() { 437 ID retVal = this.getTypedField(16, 0); 438 return retVal; 439 } 440 441 442 443 /** 444 * Returns 445 * MSH-17: "Country Code" - creates it if necessary 446 */ 447 public ID getCountryCode() { 448 ID retVal = this.getTypedField(17, 0); 449 return retVal; 450 } 451 452 /** 453 * Returns 454 * MSH-17: "Country Code" - creates it if necessary 455 */ 456 public ID getMsh17_CountryCode() { 457 ID retVal = this.getTypedField(17, 0); 458 return retVal; 459 } 460 461 462 /** 463 * Returns all repetitions of Character Set (MSH-18). 464 */ 465 public ID[] getCharacterSet() { 466 ID[] retVal = this.getTypedField(18, new ID[0]); 467 return retVal; 468 } 469 470 471 /** 472 * Returns all repetitions of Character Set (MSH-18). 473 */ 474 public ID[] getMsh18_CharacterSet() { 475 ID[] retVal = this.getTypedField(18, new ID[0]); 476 return retVal; 477 } 478 479 480 /** 481 * Returns a count of the current number of repetitions of Character Set (MSH-18). 482 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 483 * it will return zero. 484 */ 485 public int getCharacterSetReps() { 486 return this.getReps(18); 487 } 488 489 490 /** 491 * Returns a specific repetition of 492 * MSH-18: "Character Set" - creates it if necessary 493 * 494 * @param rep The repetition index (0-indexed) 495 */ 496 public ID getCharacterSet(int rep) { 497 ID retVal = this.getTypedField(18, rep); 498 return retVal; 499 } 500 501 /** 502 * Returns a specific repetition of 503 * MSH-18: "Character Set" - creates it if necessary 504 * 505 * @param rep The repetition index (0-indexed) 506 */ 507 public ID getMsh18_CharacterSet(int rep) { 508 ID retVal = this.getTypedField(18, rep); 509 return retVal; 510 } 511 512 /** 513 * Returns a count of the current number of repetitions of Character Set (MSH-18). 514 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 515 * it will return zero. 516 */ 517 public int getMsh18_CharacterSetReps() { 518 return this.getReps(18); 519 } 520 521 522 /** 523 * Inserts a repetition of 524 * MSH-18: "Character Set" at a specific index 525 * 526 * @param rep The repetition index (0-indexed) 527 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 528 */ 529 public ID insertCharacterSet(int rep) throws HL7Exception { 530 return (ID) super.insertRepetition(18, rep); 531 } 532 533 534 /** 535 * Inserts a repetition of 536 * MSH-18: "Character Set" at a specific index 537 * 538 * @param rep The repetition index (0-indexed) 539 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 540 */ 541 public ID insertMsh18_CharacterSet(int rep) throws HL7Exception { 542 return (ID) super.insertRepetition(18, rep); 543 } 544 545 546 /** 547 * Removes a repetition of 548 * MSH-18: "Character Set" at a specific index 549 * 550 * @param rep The repetition index (0-indexed) 551 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 552 */ 553 public ID removeCharacterSet(int rep) throws HL7Exception { 554 return (ID) super.removeRepetition(18, rep); 555 } 556 557 558 /** 559 * Removes a repetition of 560 * MSH-18: "Character Set" at a specific index 561 * 562 * @param rep The repetition index (0-indexed) 563 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 564 */ 565 public ID removeMsh18_CharacterSet(int rep) throws HL7Exception { 566 return (ID) super.removeRepetition(18, rep); 567 } 568 569 570 571 572 /** 573 * Returns 574 * MSH-19: "Principal Language Of Message" - creates it if necessary 575 */ 576 public CWE getPrincipalLanguageOfMessage() { 577 CWE retVal = this.getTypedField(19, 0); 578 return retVal; 579 } 580 581 /** 582 * Returns 583 * MSH-19: "Principal Language Of Message" - creates it if necessary 584 */ 585 public CWE getMsh19_PrincipalLanguageOfMessage() { 586 CWE retVal = this.getTypedField(19, 0); 587 return retVal; 588 } 589 590 591 592 /** 593 * Returns 594 * MSH-20: "Alternate Character Set Handling Scheme" - creates it if necessary 595 */ 596 public ID getAlternateCharacterSetHandlingScheme() { 597 ID retVal = this.getTypedField(20, 0); 598 return retVal; 599 } 600 601 /** 602 * Returns 603 * MSH-20: "Alternate Character Set Handling Scheme" - creates it if necessary 604 */ 605 public ID getMsh20_AlternateCharacterSetHandlingScheme() { 606 ID retVal = this.getTypedField(20, 0); 607 return retVal; 608 } 609 610 611 /** 612 * Returns all repetitions of Message Profile Identifier (MSH-21). 613 */ 614 public EI[] getMessageProfileIdentifier() { 615 EI[] retVal = this.getTypedField(21, new EI[0]); 616 return retVal; 617 } 618 619 620 /** 621 * Returns all repetitions of Message Profile Identifier (MSH-21). 622 */ 623 public EI[] getMsh21_MessageProfileIdentifier() { 624 EI[] retVal = this.getTypedField(21, new EI[0]); 625 return retVal; 626 } 627 628 629 /** 630 * Returns a count of the current number of repetitions of Message Profile Identifier (MSH-21). 631 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 632 * it will return zero. 633 */ 634 public int getMessageProfileIdentifierReps() { 635 return this.getReps(21); 636 } 637 638 639 /** 640 * Returns a specific repetition of 641 * MSH-21: "Message Profile Identifier" - creates it if necessary 642 * 643 * @param rep The repetition index (0-indexed) 644 */ 645 public EI getMessageProfileIdentifier(int rep) { 646 EI retVal = this.getTypedField(21, rep); 647 return retVal; 648 } 649 650 /** 651 * Returns a specific repetition of 652 * MSH-21: "Message Profile Identifier" - creates it if necessary 653 * 654 * @param rep The repetition index (0-indexed) 655 */ 656 public EI getMsh21_MessageProfileIdentifier(int rep) { 657 EI retVal = this.getTypedField(21, rep); 658 return retVal; 659 } 660 661 /** 662 * Returns a count of the current number of repetitions of Message Profile Identifier (MSH-21). 663 * This method does not create a repetition, so if no repetitions have currently been defined or accessed, 664 * it will return zero. 665 */ 666 public int getMsh21_MessageProfileIdentifierReps() { 667 return this.getReps(21); 668 } 669 670 671 /** 672 * Inserts a repetition of 673 * MSH-21: "Message Profile Identifier" at a specific index 674 * 675 * @param rep The repetition index (0-indexed) 676 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 677 */ 678 public EI insertMessageProfileIdentifier(int rep) throws HL7Exception { 679 return (EI) super.insertRepetition(21, rep); 680 } 681 682 683 /** 684 * Inserts a repetition of 685 * MSH-21: "Message Profile Identifier" at a specific index 686 * 687 * @param rep The repetition index (0-indexed) 688 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 689 */ 690 public EI insertMsh21_MessageProfileIdentifier(int rep) throws HL7Exception { 691 return (EI) super.insertRepetition(21, rep); 692 } 693 694 695 /** 696 * Removes a repetition of 697 * MSH-21: "Message Profile Identifier" at a specific index 698 * 699 * @param rep The repetition index (0-indexed) 700 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 701 */ 702 public EI removeMessageProfileIdentifier(int rep) throws HL7Exception { 703 return (EI) super.removeRepetition(21, rep); 704 } 705 706 707 /** 708 * Removes a repetition of 709 * MSH-21: "Message Profile Identifier" at a specific index 710 * 711 * @param rep The repetition index (0-indexed) 712 * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions) 713 */ 714 public EI removeMsh21_MessageProfileIdentifier(int rep) throws HL7Exception { 715 return (EI) super.removeRepetition(21, rep); 716 } 717 718 719 720 721 /** 722 * Returns 723 * MSH-22: "Sending Responsible Organization" - creates it if necessary 724 */ 725 public XON getSendingResponsibleOrganization() { 726 XON retVal = this.getTypedField(22, 0); 727 return retVal; 728 } 729 730 /** 731 * Returns 732 * MSH-22: "Sending Responsible Organization" - creates it if necessary 733 */ 734 public XON getMsh22_SendingResponsibleOrganization() { 735 XON retVal = this.getTypedField(22, 0); 736 return retVal; 737 } 738 739 740 741 /** 742 * Returns 743 * MSH-23: "Receiving Responsible Organization" - creates it if necessary 744 */ 745 public XON getReceivingResponsibleOrganization() { 746 XON retVal = this.getTypedField(23, 0); 747 return retVal; 748 } 749 750 /** 751 * Returns 752 * MSH-23: "Receiving Responsible Organization" - creates it if necessary 753 */ 754 public XON getMsh23_ReceivingResponsibleOrganization() { 755 XON retVal = this.getTypedField(23, 0); 756 return retVal; 757 } 758 759 760 761 /** 762 * Returns 763 * MSH-24: "Sending Network Address" - creates it if necessary 764 */ 765 public HD getSendingNetworkAddress() { 766 HD retVal = this.getTypedField(24, 0); 767 return retVal; 768 } 769 770 /** 771 * Returns 772 * MSH-24: "Sending Network Address" - creates it if necessary 773 */ 774 public HD getMsh24_SendingNetworkAddress() { 775 HD retVal = this.getTypedField(24, 0); 776 return retVal; 777 } 778 779 780 781 /** 782 * Returns 783 * MSH-25: "Receiving Network Address" - creates it if necessary 784 */ 785 public HD getReceivingNetworkAddress() { 786 HD retVal = this.getTypedField(25, 0); 787 return retVal; 788 } 789 790 /** 791 * Returns 792 * MSH-25: "Receiving Network Address" - creates it if necessary 793 */ 794 public HD getMsh25_ReceivingNetworkAddress() { 795 HD retVal = this.getTypedField(25, 0); 796 return retVal; 797 } 798 799 800 801 802 803 /** {@inheritDoc} */ 804 protected Type createNewTypeWithoutReflection(int field) { 805 switch (field) { 806 case 0: return new ST(getMessage()); 807 case 1: return new ST(getMessage()); 808 case 2: return new HD(getMessage()); 809 case 3: return new HD(getMessage()); 810 case 4: return new HD(getMessage()); 811 case 5: return new HD(getMessage()); 812 case 6: return new DTM(getMessage()); 813 case 7: return new ST(getMessage()); 814 case 8: return new MSG(getMessage()); 815 case 9: return new ST(getMessage()); 816 case 10: return new PT(getMessage()); 817 case 11: return new VID(getMessage()); 818 case 12: return new NM(getMessage()); 819 case 13: return new ST(getMessage()); 820 case 14: return new ID(getMessage(), new Integer( 155 )); 821 case 15: return new ID(getMessage(), new Integer( 155 )); 822 case 16: return new ID(getMessage(), new Integer( 399 )); 823 case 17: return new ID(getMessage(), new Integer( 211 )); 824 case 18: return new CWE(getMessage()); 825 case 19: return new ID(getMessage(), new Integer( 356 )); 826 case 20: return new EI(getMessage()); 827 case 21: return new XON(getMessage()); 828 case 22: return new XON(getMessage()); 829 case 23: return new HD(getMessage()); 830 case 24: return new HD(getMessage()); 831 default: return null; 832 } 833 } 834 835 836} 837