001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import org.hl7.fhir.dstu3.model.Enumerations.*; 038import ca.uhn.fhir.model.api.annotation.ResourceDef; 039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.ChildOrder; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.Block; 044import org.hl7.fhir.instance.model.api.*; 045import org.hl7.fhir.exceptions.FHIRException; 046/** 047 * The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. 048 */ 049@ResourceDef(name="MessageHeader", profile="http://hl7.org/fhir/Profile/MessageHeader") 050public class MessageHeader extends DomainResource { 051 052 public enum ResponseType { 053 /** 054 * The message was accepted and processed without error. 055 */ 056 OK, 057 /** 058 * Some internal unexpected error occurred - wait and try again. Note - this is usually used for things like database unavailable, which may be expected to resolve, though human intervention may be required. 059 */ 060 TRANSIENTERROR, 061 /** 062 * The message was rejected because of a problem with the content. There is no point in re-sending without change. The response narrative SHALL describe the issue. 063 */ 064 FATALERROR, 065 /** 066 * added to help the parsers with the generic types 067 */ 068 NULL; 069 public static ResponseType fromCode(String codeString) throws FHIRException { 070 if (codeString == null || "".equals(codeString)) 071 return null; 072 if ("ok".equals(codeString)) 073 return OK; 074 if ("transient-error".equals(codeString)) 075 return TRANSIENTERROR; 076 if ("fatal-error".equals(codeString)) 077 return FATALERROR; 078 if (Configuration.isAcceptInvalidEnums()) 079 return null; 080 else 081 throw new FHIRException("Unknown ResponseType code '"+codeString+"'"); 082 } 083 public String toCode() { 084 switch (this) { 085 case OK: return "ok"; 086 case TRANSIENTERROR: return "transient-error"; 087 case FATALERROR: return "fatal-error"; 088 default: return "?"; 089 } 090 } 091 public String getSystem() { 092 switch (this) { 093 case OK: return "http://hl7.org/fhir/response-code"; 094 case TRANSIENTERROR: return "http://hl7.org/fhir/response-code"; 095 case FATALERROR: return "http://hl7.org/fhir/response-code"; 096 default: return "?"; 097 } 098 } 099 public String getDefinition() { 100 switch (this) { 101 case OK: return "The message was accepted and processed without error."; 102 case TRANSIENTERROR: return "Some internal unexpected error occurred - wait and try again. Note - this is usually used for things like database unavailable, which may be expected to resolve, though human intervention may be required."; 103 case FATALERROR: return "The message was rejected because of a problem with the content. There is no point in re-sending without change. The response narrative SHALL describe the issue."; 104 default: return "?"; 105 } 106 } 107 public String getDisplay() { 108 switch (this) { 109 case OK: return "OK"; 110 case TRANSIENTERROR: return "Transient Error"; 111 case FATALERROR: return "Fatal Error"; 112 default: return "?"; 113 } 114 } 115 } 116 117 public static class ResponseTypeEnumFactory implements EnumFactory<ResponseType> { 118 public ResponseType fromCode(String codeString) throws IllegalArgumentException { 119 if (codeString == null || "".equals(codeString)) 120 if (codeString == null || "".equals(codeString)) 121 return null; 122 if ("ok".equals(codeString)) 123 return ResponseType.OK; 124 if ("transient-error".equals(codeString)) 125 return ResponseType.TRANSIENTERROR; 126 if ("fatal-error".equals(codeString)) 127 return ResponseType.FATALERROR; 128 throw new IllegalArgumentException("Unknown ResponseType code '"+codeString+"'"); 129 } 130 public Enumeration<ResponseType> fromType(Base code) throws FHIRException { 131 if (code == null) 132 return null; 133 if (code.isEmpty()) 134 return new Enumeration<ResponseType>(this); 135 String codeString = ((PrimitiveType) code).asStringValue(); 136 if (codeString == null || "".equals(codeString)) 137 return null; 138 if ("ok".equals(codeString)) 139 return new Enumeration<ResponseType>(this, ResponseType.OK); 140 if ("transient-error".equals(codeString)) 141 return new Enumeration<ResponseType>(this, ResponseType.TRANSIENTERROR); 142 if ("fatal-error".equals(codeString)) 143 return new Enumeration<ResponseType>(this, ResponseType.FATALERROR); 144 throw new FHIRException("Unknown ResponseType code '"+codeString+"'"); 145 } 146 public String toCode(ResponseType code) { 147 if (code == ResponseType.OK) 148 return "ok"; 149 if (code == ResponseType.TRANSIENTERROR) 150 return "transient-error"; 151 if (code == ResponseType.FATALERROR) 152 return "fatal-error"; 153 return "?"; 154 } 155 public String toSystem(ResponseType code) { 156 return code.getSystem(); 157 } 158 } 159 160 @Block() 161 public static class MessageDestinationComponent extends BackboneElement implements IBaseBackboneElement { 162 /** 163 * Human-readable name for the target system. 164 */ 165 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 166 @Description(shortDefinition="Name of system", formalDefinition="Human-readable name for the target system." ) 167 protected StringType name; 168 169 /** 170 * Identifies the target end system in situations where the initial message transmission is to an intermediary system. 171 */ 172 @Child(name = "target", type = {Device.class}, order=2, min=0, max=1, modifier=false, summary=true) 173 @Description(shortDefinition="Particular delivery destination within the destination", formalDefinition="Identifies the target end system in situations where the initial message transmission is to an intermediary system." ) 174 protected Reference target; 175 176 /** 177 * The actual object that is the target of the reference (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) 178 */ 179 protected Device targetTarget; 180 181 /** 182 * Indicates where the message should be routed to. 183 */ 184 @Child(name = "endpoint", type = {UriType.class}, order=3, min=1, max=1, modifier=false, summary=true) 185 @Description(shortDefinition="Actual destination address or id", formalDefinition="Indicates where the message should be routed to." ) 186 protected UriType endpoint; 187 188 private static final long serialVersionUID = -2097633309L; 189 190 /** 191 * Constructor 192 */ 193 public MessageDestinationComponent() { 194 super(); 195 } 196 197 /** 198 * Constructor 199 */ 200 public MessageDestinationComponent(UriType endpoint) { 201 super(); 202 this.endpoint = endpoint; 203 } 204 205 /** 206 * @return {@link #name} (Human-readable name for the target system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 207 */ 208 public StringType getNameElement() { 209 if (this.name == null) 210 if (Configuration.errorOnAutoCreate()) 211 throw new Error("Attempt to auto-create MessageDestinationComponent.name"); 212 else if (Configuration.doAutoCreate()) 213 this.name = new StringType(); // bb 214 return this.name; 215 } 216 217 public boolean hasNameElement() { 218 return this.name != null && !this.name.isEmpty(); 219 } 220 221 public boolean hasName() { 222 return this.name != null && !this.name.isEmpty(); 223 } 224 225 /** 226 * @param value {@link #name} (Human-readable name for the target system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 227 */ 228 public MessageDestinationComponent setNameElement(StringType value) { 229 this.name = value; 230 return this; 231 } 232 233 /** 234 * @return Human-readable name for the target system. 235 */ 236 public String getName() { 237 return this.name == null ? null : this.name.getValue(); 238 } 239 240 /** 241 * @param value Human-readable name for the target system. 242 */ 243 public MessageDestinationComponent setName(String value) { 244 if (Utilities.noString(value)) 245 this.name = null; 246 else { 247 if (this.name == null) 248 this.name = new StringType(); 249 this.name.setValue(value); 250 } 251 return this; 252 } 253 254 /** 255 * @return {@link #target} (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) 256 */ 257 public Reference getTarget() { 258 if (this.target == null) 259 if (Configuration.errorOnAutoCreate()) 260 throw new Error("Attempt to auto-create MessageDestinationComponent.target"); 261 else if (Configuration.doAutoCreate()) 262 this.target = new Reference(); // cc 263 return this.target; 264 } 265 266 public boolean hasTarget() { 267 return this.target != null && !this.target.isEmpty(); 268 } 269 270 /** 271 * @param value {@link #target} (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) 272 */ 273 public MessageDestinationComponent setTarget(Reference value) { 274 this.target = value; 275 return this; 276 } 277 278 /** 279 * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) 280 */ 281 public Device getTargetTarget() { 282 if (this.targetTarget == null) 283 if (Configuration.errorOnAutoCreate()) 284 throw new Error("Attempt to auto-create MessageDestinationComponent.target"); 285 else if (Configuration.doAutoCreate()) 286 this.targetTarget = new Device(); // aa 287 return this.targetTarget; 288 } 289 290 /** 291 * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the target end system in situations where the initial message transmission is to an intermediary system.) 292 */ 293 public MessageDestinationComponent setTargetTarget(Device value) { 294 this.targetTarget = value; 295 return this; 296 } 297 298 /** 299 * @return {@link #endpoint} (Indicates where the message should be routed to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value 300 */ 301 public UriType getEndpointElement() { 302 if (this.endpoint == null) 303 if (Configuration.errorOnAutoCreate()) 304 throw new Error("Attempt to auto-create MessageDestinationComponent.endpoint"); 305 else if (Configuration.doAutoCreate()) 306 this.endpoint = new UriType(); // bb 307 return this.endpoint; 308 } 309 310 public boolean hasEndpointElement() { 311 return this.endpoint != null && !this.endpoint.isEmpty(); 312 } 313 314 public boolean hasEndpoint() { 315 return this.endpoint != null && !this.endpoint.isEmpty(); 316 } 317 318 /** 319 * @param value {@link #endpoint} (Indicates where the message should be routed to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value 320 */ 321 public MessageDestinationComponent setEndpointElement(UriType value) { 322 this.endpoint = value; 323 return this; 324 } 325 326 /** 327 * @return Indicates where the message should be routed to. 328 */ 329 public String getEndpoint() { 330 return this.endpoint == null ? null : this.endpoint.getValue(); 331 } 332 333 /** 334 * @param value Indicates where the message should be routed to. 335 */ 336 public MessageDestinationComponent setEndpoint(String value) { 337 if (this.endpoint == null) 338 this.endpoint = new UriType(); 339 this.endpoint.setValue(value); 340 return this; 341 } 342 343 protected void listChildren(List<Property> childrenList) { 344 super.listChildren(childrenList); 345 childrenList.add(new Property("name", "string", "Human-readable name for the target system.", 0, java.lang.Integer.MAX_VALUE, name)); 346 childrenList.add(new Property("target", "Reference(Device)", "Identifies the target end system in situations where the initial message transmission is to an intermediary system.", 0, java.lang.Integer.MAX_VALUE, target)); 347 childrenList.add(new Property("endpoint", "uri", "Indicates where the message should be routed to.", 0, java.lang.Integer.MAX_VALUE, endpoint)); 348 } 349 350 @Override 351 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 352 switch (hash) { 353 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 354 case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Reference 355 case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : new Base[] {this.endpoint}; // UriType 356 default: return super.getProperty(hash, name, checkValid); 357 } 358 359 } 360 361 @Override 362 public Base setProperty(int hash, String name, Base value) throws FHIRException { 363 switch (hash) { 364 case 3373707: // name 365 this.name = castToString(value); // StringType 366 return value; 367 case -880905839: // target 368 this.target = castToReference(value); // Reference 369 return value; 370 case 1741102485: // endpoint 371 this.endpoint = castToUri(value); // UriType 372 return value; 373 default: return super.setProperty(hash, name, value); 374 } 375 376 } 377 378 @Override 379 public Base setProperty(String name, Base value) throws FHIRException { 380 if (name.equals("name")) { 381 this.name = castToString(value); // StringType 382 } else if (name.equals("target")) { 383 this.target = castToReference(value); // Reference 384 } else if (name.equals("endpoint")) { 385 this.endpoint = castToUri(value); // UriType 386 } else 387 return super.setProperty(name, value); 388 return value; 389 } 390 391 @Override 392 public Base makeProperty(int hash, String name) throws FHIRException { 393 switch (hash) { 394 case 3373707: return getNameElement(); 395 case -880905839: return getTarget(); 396 case 1741102485: return getEndpointElement(); 397 default: return super.makeProperty(hash, name); 398 } 399 400 } 401 402 @Override 403 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 404 switch (hash) { 405 case 3373707: /*name*/ return new String[] {"string"}; 406 case -880905839: /*target*/ return new String[] {"Reference"}; 407 case 1741102485: /*endpoint*/ return new String[] {"uri"}; 408 default: return super.getTypesForProperty(hash, name); 409 } 410 411 } 412 413 @Override 414 public Base addChild(String name) throws FHIRException { 415 if (name.equals("name")) { 416 throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.name"); 417 } 418 else if (name.equals("target")) { 419 this.target = new Reference(); 420 return this.target; 421 } 422 else if (name.equals("endpoint")) { 423 throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.endpoint"); 424 } 425 else 426 return super.addChild(name); 427 } 428 429 public MessageDestinationComponent copy() { 430 MessageDestinationComponent dst = new MessageDestinationComponent(); 431 copyValues(dst); 432 dst.name = name == null ? null : name.copy(); 433 dst.target = target == null ? null : target.copy(); 434 dst.endpoint = endpoint == null ? null : endpoint.copy(); 435 return dst; 436 } 437 438 @Override 439 public boolean equalsDeep(Base other) { 440 if (!super.equalsDeep(other)) 441 return false; 442 if (!(other instanceof MessageDestinationComponent)) 443 return false; 444 MessageDestinationComponent o = (MessageDestinationComponent) other; 445 return compareDeep(name, o.name, true) && compareDeep(target, o.target, true) && compareDeep(endpoint, o.endpoint, true) 446 ; 447 } 448 449 @Override 450 public boolean equalsShallow(Base other) { 451 if (!super.equalsShallow(other)) 452 return false; 453 if (!(other instanceof MessageDestinationComponent)) 454 return false; 455 MessageDestinationComponent o = (MessageDestinationComponent) other; 456 return compareValues(name, o.name, true) && compareValues(endpoint, o.endpoint, true); 457 } 458 459 public boolean isEmpty() { 460 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, target, endpoint); 461 } 462 463 public String fhirType() { 464 return "MessageHeader.destination"; 465 466 } 467 468 } 469 470 @Block() 471 public static class MessageSourceComponent extends BackboneElement implements IBaseBackboneElement { 472 /** 473 * Human-readable name for the source system. 474 */ 475 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 476 @Description(shortDefinition="Name of system", formalDefinition="Human-readable name for the source system." ) 477 protected StringType name; 478 479 /** 480 * May include configuration or other information useful in debugging. 481 */ 482 @Child(name = "software", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 483 @Description(shortDefinition="Name of software running the system", formalDefinition="May include configuration or other information useful in debugging." ) 484 protected StringType software; 485 486 /** 487 * Can convey versions of multiple systems in situations where a message passes through multiple hands. 488 */ 489 @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 490 @Description(shortDefinition="Version of software running", formalDefinition="Can convey versions of multiple systems in situations where a message passes through multiple hands." ) 491 protected StringType version; 492 493 /** 494 * An e-mail, phone, website or other contact point to use to resolve issues with message communications. 495 */ 496 @Child(name = "contact", type = {ContactPoint.class}, order=4, min=0, max=1, modifier=false, summary=true) 497 @Description(shortDefinition="Human contact for problems", formalDefinition="An e-mail, phone, website or other contact point to use to resolve issues with message communications." ) 498 protected ContactPoint contact; 499 500 /** 501 * Identifies the routing target to send acknowledgements to. 502 */ 503 @Child(name = "endpoint", type = {UriType.class}, order=5, min=1, max=1, modifier=false, summary=true) 504 @Description(shortDefinition="Actual message source address or id", formalDefinition="Identifies the routing target to send acknowledgements to." ) 505 protected UriType endpoint; 506 507 private static final long serialVersionUID = -115878196L; 508 509 /** 510 * Constructor 511 */ 512 public MessageSourceComponent() { 513 super(); 514 } 515 516 /** 517 * Constructor 518 */ 519 public MessageSourceComponent(UriType endpoint) { 520 super(); 521 this.endpoint = endpoint; 522 } 523 524 /** 525 * @return {@link #name} (Human-readable name for the source system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 526 */ 527 public StringType getNameElement() { 528 if (this.name == null) 529 if (Configuration.errorOnAutoCreate()) 530 throw new Error("Attempt to auto-create MessageSourceComponent.name"); 531 else if (Configuration.doAutoCreate()) 532 this.name = new StringType(); // bb 533 return this.name; 534 } 535 536 public boolean hasNameElement() { 537 return this.name != null && !this.name.isEmpty(); 538 } 539 540 public boolean hasName() { 541 return this.name != null && !this.name.isEmpty(); 542 } 543 544 /** 545 * @param value {@link #name} (Human-readable name for the source system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 546 */ 547 public MessageSourceComponent setNameElement(StringType value) { 548 this.name = value; 549 return this; 550 } 551 552 /** 553 * @return Human-readable name for the source system. 554 */ 555 public String getName() { 556 return this.name == null ? null : this.name.getValue(); 557 } 558 559 /** 560 * @param value Human-readable name for the source system. 561 */ 562 public MessageSourceComponent setName(String value) { 563 if (Utilities.noString(value)) 564 this.name = null; 565 else { 566 if (this.name == null) 567 this.name = new StringType(); 568 this.name.setValue(value); 569 } 570 return this; 571 } 572 573 /** 574 * @return {@link #software} (May include configuration or other information useful in debugging.). This is the underlying object with id, value and extensions. The accessor "getSoftware" gives direct access to the value 575 */ 576 public StringType getSoftwareElement() { 577 if (this.software == null) 578 if (Configuration.errorOnAutoCreate()) 579 throw new Error("Attempt to auto-create MessageSourceComponent.software"); 580 else if (Configuration.doAutoCreate()) 581 this.software = new StringType(); // bb 582 return this.software; 583 } 584 585 public boolean hasSoftwareElement() { 586 return this.software != null && !this.software.isEmpty(); 587 } 588 589 public boolean hasSoftware() { 590 return this.software != null && !this.software.isEmpty(); 591 } 592 593 /** 594 * @param value {@link #software} (May include configuration or other information useful in debugging.). This is the underlying object with id, value and extensions. The accessor "getSoftware" gives direct access to the value 595 */ 596 public MessageSourceComponent setSoftwareElement(StringType value) { 597 this.software = value; 598 return this; 599 } 600 601 /** 602 * @return May include configuration or other information useful in debugging. 603 */ 604 public String getSoftware() { 605 return this.software == null ? null : this.software.getValue(); 606 } 607 608 /** 609 * @param value May include configuration or other information useful in debugging. 610 */ 611 public MessageSourceComponent setSoftware(String value) { 612 if (Utilities.noString(value)) 613 this.software = null; 614 else { 615 if (this.software == null) 616 this.software = new StringType(); 617 this.software.setValue(value); 618 } 619 return this; 620 } 621 622 /** 623 * @return {@link #version} (Can convey versions of multiple systems in situations where a message passes through multiple hands.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 624 */ 625 public StringType getVersionElement() { 626 if (this.version == null) 627 if (Configuration.errorOnAutoCreate()) 628 throw new Error("Attempt to auto-create MessageSourceComponent.version"); 629 else if (Configuration.doAutoCreate()) 630 this.version = new StringType(); // bb 631 return this.version; 632 } 633 634 public boolean hasVersionElement() { 635 return this.version != null && !this.version.isEmpty(); 636 } 637 638 public boolean hasVersion() { 639 return this.version != null && !this.version.isEmpty(); 640 } 641 642 /** 643 * @param value {@link #version} (Can convey versions of multiple systems in situations where a message passes through multiple hands.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 644 */ 645 public MessageSourceComponent setVersionElement(StringType value) { 646 this.version = value; 647 return this; 648 } 649 650 /** 651 * @return Can convey versions of multiple systems in situations where a message passes through multiple hands. 652 */ 653 public String getVersion() { 654 return this.version == null ? null : this.version.getValue(); 655 } 656 657 /** 658 * @param value Can convey versions of multiple systems in situations where a message passes through multiple hands. 659 */ 660 public MessageSourceComponent setVersion(String value) { 661 if (Utilities.noString(value)) 662 this.version = null; 663 else { 664 if (this.version == null) 665 this.version = new StringType(); 666 this.version.setValue(value); 667 } 668 return this; 669 } 670 671 /** 672 * @return {@link #contact} (An e-mail, phone, website or other contact point to use to resolve issues with message communications.) 673 */ 674 public ContactPoint getContact() { 675 if (this.contact == null) 676 if (Configuration.errorOnAutoCreate()) 677 throw new Error("Attempt to auto-create MessageSourceComponent.contact"); 678 else if (Configuration.doAutoCreate()) 679 this.contact = new ContactPoint(); // cc 680 return this.contact; 681 } 682 683 public boolean hasContact() { 684 return this.contact != null && !this.contact.isEmpty(); 685 } 686 687 /** 688 * @param value {@link #contact} (An e-mail, phone, website or other contact point to use to resolve issues with message communications.) 689 */ 690 public MessageSourceComponent setContact(ContactPoint value) { 691 this.contact = value; 692 return this; 693 } 694 695 /** 696 * @return {@link #endpoint} (Identifies the routing target to send acknowledgements to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value 697 */ 698 public UriType getEndpointElement() { 699 if (this.endpoint == null) 700 if (Configuration.errorOnAutoCreate()) 701 throw new Error("Attempt to auto-create MessageSourceComponent.endpoint"); 702 else if (Configuration.doAutoCreate()) 703 this.endpoint = new UriType(); // bb 704 return this.endpoint; 705 } 706 707 public boolean hasEndpointElement() { 708 return this.endpoint != null && !this.endpoint.isEmpty(); 709 } 710 711 public boolean hasEndpoint() { 712 return this.endpoint != null && !this.endpoint.isEmpty(); 713 } 714 715 /** 716 * @param value {@link #endpoint} (Identifies the routing target to send acknowledgements to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value 717 */ 718 public MessageSourceComponent setEndpointElement(UriType value) { 719 this.endpoint = value; 720 return this; 721 } 722 723 /** 724 * @return Identifies the routing target to send acknowledgements to. 725 */ 726 public String getEndpoint() { 727 return this.endpoint == null ? null : this.endpoint.getValue(); 728 } 729 730 /** 731 * @param value Identifies the routing target to send acknowledgements to. 732 */ 733 public MessageSourceComponent setEndpoint(String value) { 734 if (this.endpoint == null) 735 this.endpoint = new UriType(); 736 this.endpoint.setValue(value); 737 return this; 738 } 739 740 protected void listChildren(List<Property> childrenList) { 741 super.listChildren(childrenList); 742 childrenList.add(new Property("name", "string", "Human-readable name for the source system.", 0, java.lang.Integer.MAX_VALUE, name)); 743 childrenList.add(new Property("software", "string", "May include configuration or other information useful in debugging.", 0, java.lang.Integer.MAX_VALUE, software)); 744 childrenList.add(new Property("version", "string", "Can convey versions of multiple systems in situations where a message passes through multiple hands.", 0, java.lang.Integer.MAX_VALUE, version)); 745 childrenList.add(new Property("contact", "ContactPoint", "An e-mail, phone, website or other contact point to use to resolve issues with message communications.", 0, java.lang.Integer.MAX_VALUE, contact)); 746 childrenList.add(new Property("endpoint", "uri", "Identifies the routing target to send acknowledgements to.", 0, java.lang.Integer.MAX_VALUE, endpoint)); 747 } 748 749 @Override 750 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 751 switch (hash) { 752 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 753 case 1319330215: /*software*/ return this.software == null ? new Base[0] : new Base[] {this.software}; // StringType 754 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 755 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : new Base[] {this.contact}; // ContactPoint 756 case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : new Base[] {this.endpoint}; // UriType 757 default: return super.getProperty(hash, name, checkValid); 758 } 759 760 } 761 762 @Override 763 public Base setProperty(int hash, String name, Base value) throws FHIRException { 764 switch (hash) { 765 case 3373707: // name 766 this.name = castToString(value); // StringType 767 return value; 768 case 1319330215: // software 769 this.software = castToString(value); // StringType 770 return value; 771 case 351608024: // version 772 this.version = castToString(value); // StringType 773 return value; 774 case 951526432: // contact 775 this.contact = castToContactPoint(value); // ContactPoint 776 return value; 777 case 1741102485: // endpoint 778 this.endpoint = castToUri(value); // UriType 779 return value; 780 default: return super.setProperty(hash, name, value); 781 } 782 783 } 784 785 @Override 786 public Base setProperty(String name, Base value) throws FHIRException { 787 if (name.equals("name")) { 788 this.name = castToString(value); // StringType 789 } else if (name.equals("software")) { 790 this.software = castToString(value); // StringType 791 } else if (name.equals("version")) { 792 this.version = castToString(value); // StringType 793 } else if (name.equals("contact")) { 794 this.contact = castToContactPoint(value); // ContactPoint 795 } else if (name.equals("endpoint")) { 796 this.endpoint = castToUri(value); // UriType 797 } else 798 return super.setProperty(name, value); 799 return value; 800 } 801 802 @Override 803 public Base makeProperty(int hash, String name) throws FHIRException { 804 switch (hash) { 805 case 3373707: return getNameElement(); 806 case 1319330215: return getSoftwareElement(); 807 case 351608024: return getVersionElement(); 808 case 951526432: return getContact(); 809 case 1741102485: return getEndpointElement(); 810 default: return super.makeProperty(hash, name); 811 } 812 813 } 814 815 @Override 816 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 817 switch (hash) { 818 case 3373707: /*name*/ return new String[] {"string"}; 819 case 1319330215: /*software*/ return new String[] {"string"}; 820 case 351608024: /*version*/ return new String[] {"string"}; 821 case 951526432: /*contact*/ return new String[] {"ContactPoint"}; 822 case 1741102485: /*endpoint*/ return new String[] {"uri"}; 823 default: return super.getTypesForProperty(hash, name); 824 } 825 826 } 827 828 @Override 829 public Base addChild(String name) throws FHIRException { 830 if (name.equals("name")) { 831 throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.name"); 832 } 833 else if (name.equals("software")) { 834 throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.software"); 835 } 836 else if (name.equals("version")) { 837 throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.version"); 838 } 839 else if (name.equals("contact")) { 840 this.contact = new ContactPoint(); 841 return this.contact; 842 } 843 else if (name.equals("endpoint")) { 844 throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.endpoint"); 845 } 846 else 847 return super.addChild(name); 848 } 849 850 public MessageSourceComponent copy() { 851 MessageSourceComponent dst = new MessageSourceComponent(); 852 copyValues(dst); 853 dst.name = name == null ? null : name.copy(); 854 dst.software = software == null ? null : software.copy(); 855 dst.version = version == null ? null : version.copy(); 856 dst.contact = contact == null ? null : contact.copy(); 857 dst.endpoint = endpoint == null ? null : endpoint.copy(); 858 return dst; 859 } 860 861 @Override 862 public boolean equalsDeep(Base other) { 863 if (!super.equalsDeep(other)) 864 return false; 865 if (!(other instanceof MessageSourceComponent)) 866 return false; 867 MessageSourceComponent o = (MessageSourceComponent) other; 868 return compareDeep(name, o.name, true) && compareDeep(software, o.software, true) && compareDeep(version, o.version, true) 869 && compareDeep(contact, o.contact, true) && compareDeep(endpoint, o.endpoint, true); 870 } 871 872 @Override 873 public boolean equalsShallow(Base other) { 874 if (!super.equalsShallow(other)) 875 return false; 876 if (!(other instanceof MessageSourceComponent)) 877 return false; 878 MessageSourceComponent o = (MessageSourceComponent) other; 879 return compareValues(name, o.name, true) && compareValues(software, o.software, true) && compareValues(version, o.version, true) 880 && compareValues(endpoint, o.endpoint, true); 881 } 882 883 public boolean isEmpty() { 884 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, software, version 885 , contact, endpoint); 886 } 887 888 public String fhirType() { 889 return "MessageHeader.source"; 890 891 } 892 893 } 894 895 @Block() 896 public static class MessageHeaderResponseComponent extends BackboneElement implements IBaseBackboneElement { 897 /** 898 * The MessageHeader.id of the message to which this message is a response. 899 */ 900 @Child(name = "identifier", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) 901 @Description(shortDefinition="Id of original message", formalDefinition="The MessageHeader.id of the message to which this message is a response." ) 902 protected IdType identifier; 903 904 /** 905 * Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not. 906 */ 907 @Child(name = "code", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) 908 @Description(shortDefinition="ok | transient-error | fatal-error", formalDefinition="Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not." ) 909 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/response-code") 910 protected Enumeration<ResponseType> code; 911 912 /** 913 * Full details of any issues found in the message. 914 */ 915 @Child(name = "details", type = {OperationOutcome.class}, order=3, min=0, max=1, modifier=false, summary=true) 916 @Description(shortDefinition="Specific list of hints/warnings/errors", formalDefinition="Full details of any issues found in the message." ) 917 protected Reference details; 918 919 /** 920 * The actual object that is the target of the reference (Full details of any issues found in the message.) 921 */ 922 protected OperationOutcome detailsTarget; 923 924 private static final long serialVersionUID = -1008716838L; 925 926 /** 927 * Constructor 928 */ 929 public MessageHeaderResponseComponent() { 930 super(); 931 } 932 933 /** 934 * Constructor 935 */ 936 public MessageHeaderResponseComponent(IdType identifier, Enumeration<ResponseType> code) { 937 super(); 938 this.identifier = identifier; 939 this.code = code; 940 } 941 942 /** 943 * @return {@link #identifier} (The MessageHeader.id of the message to which this message is a response.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value 944 */ 945 public IdType getIdentifierElement() { 946 if (this.identifier == null) 947 if (Configuration.errorOnAutoCreate()) 948 throw new Error("Attempt to auto-create MessageHeaderResponseComponent.identifier"); 949 else if (Configuration.doAutoCreate()) 950 this.identifier = new IdType(); // bb 951 return this.identifier; 952 } 953 954 public boolean hasIdentifierElement() { 955 return this.identifier != null && !this.identifier.isEmpty(); 956 } 957 958 public boolean hasIdentifier() { 959 return this.identifier != null && !this.identifier.isEmpty(); 960 } 961 962 /** 963 * @param value {@link #identifier} (The MessageHeader.id of the message to which this message is a response.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value 964 */ 965 public MessageHeaderResponseComponent setIdentifierElement(IdType value) { 966 this.identifier = value; 967 return this; 968 } 969 970 /** 971 * @return The MessageHeader.id of the message to which this message is a response. 972 */ 973 public String getIdentifier() { 974 return this.identifier == null ? null : this.identifier.getValue(); 975 } 976 977 /** 978 * @param value The MessageHeader.id of the message to which this message is a response. 979 */ 980 public MessageHeaderResponseComponent setIdentifier(String value) { 981 if (this.identifier == null) 982 this.identifier = new IdType(); 983 this.identifier.setValue(value); 984 return this; 985 } 986 987 /** 988 * @return {@link #code} (Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 989 */ 990 public Enumeration<ResponseType> getCodeElement() { 991 if (this.code == null) 992 if (Configuration.errorOnAutoCreate()) 993 throw new Error("Attempt to auto-create MessageHeaderResponseComponent.code"); 994 else if (Configuration.doAutoCreate()) 995 this.code = new Enumeration<ResponseType>(new ResponseTypeEnumFactory()); // bb 996 return this.code; 997 } 998 999 public boolean hasCodeElement() { 1000 return this.code != null && !this.code.isEmpty(); 1001 } 1002 1003 public boolean hasCode() { 1004 return this.code != null && !this.code.isEmpty(); 1005 } 1006 1007 /** 1008 * @param value {@link #code} (Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1009 */ 1010 public MessageHeaderResponseComponent setCodeElement(Enumeration<ResponseType> value) { 1011 this.code = value; 1012 return this; 1013 } 1014 1015 /** 1016 * @return Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not. 1017 */ 1018 public ResponseType getCode() { 1019 return this.code == null ? null : this.code.getValue(); 1020 } 1021 1022 /** 1023 * @param value Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not. 1024 */ 1025 public MessageHeaderResponseComponent setCode(ResponseType value) { 1026 if (this.code == null) 1027 this.code = new Enumeration<ResponseType>(new ResponseTypeEnumFactory()); 1028 this.code.setValue(value); 1029 return this; 1030 } 1031 1032 /** 1033 * @return {@link #details} (Full details of any issues found in the message.) 1034 */ 1035 public Reference getDetails() { 1036 if (this.details == null) 1037 if (Configuration.errorOnAutoCreate()) 1038 throw new Error("Attempt to auto-create MessageHeaderResponseComponent.details"); 1039 else if (Configuration.doAutoCreate()) 1040 this.details = new Reference(); // cc 1041 return this.details; 1042 } 1043 1044 public boolean hasDetails() { 1045 return this.details != null && !this.details.isEmpty(); 1046 } 1047 1048 /** 1049 * @param value {@link #details} (Full details of any issues found in the message.) 1050 */ 1051 public MessageHeaderResponseComponent setDetails(Reference value) { 1052 this.details = value; 1053 return this; 1054 } 1055 1056 /** 1057 * @return {@link #details} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Full details of any issues found in the message.) 1058 */ 1059 public OperationOutcome getDetailsTarget() { 1060 if (this.detailsTarget == null) 1061 if (Configuration.errorOnAutoCreate()) 1062 throw new Error("Attempt to auto-create MessageHeaderResponseComponent.details"); 1063 else if (Configuration.doAutoCreate()) 1064 this.detailsTarget = new OperationOutcome(); // aa 1065 return this.detailsTarget; 1066 } 1067 1068 /** 1069 * @param value {@link #details} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Full details of any issues found in the message.) 1070 */ 1071 public MessageHeaderResponseComponent setDetailsTarget(OperationOutcome value) { 1072 this.detailsTarget = value; 1073 return this; 1074 } 1075 1076 protected void listChildren(List<Property> childrenList) { 1077 super.listChildren(childrenList); 1078 childrenList.add(new Property("identifier", "id", "The MessageHeader.id of the message to which this message is a response.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1079 childrenList.add(new Property("code", "code", "Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.", 0, java.lang.Integer.MAX_VALUE, code)); 1080 childrenList.add(new Property("details", "Reference(OperationOutcome)", "Full details of any issues found in the message.", 0, java.lang.Integer.MAX_VALUE, details)); 1081 } 1082 1083 @Override 1084 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1085 switch (hash) { 1086 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // IdType 1087 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<ResponseType> 1088 case 1557721666: /*details*/ return this.details == null ? new Base[0] : new Base[] {this.details}; // Reference 1089 default: return super.getProperty(hash, name, checkValid); 1090 } 1091 1092 } 1093 1094 @Override 1095 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1096 switch (hash) { 1097 case -1618432855: // identifier 1098 this.identifier = castToId(value); // IdType 1099 return value; 1100 case 3059181: // code 1101 value = new ResponseTypeEnumFactory().fromType(castToCode(value)); 1102 this.code = (Enumeration) value; // Enumeration<ResponseType> 1103 return value; 1104 case 1557721666: // details 1105 this.details = castToReference(value); // Reference 1106 return value; 1107 default: return super.setProperty(hash, name, value); 1108 } 1109 1110 } 1111 1112 @Override 1113 public Base setProperty(String name, Base value) throws FHIRException { 1114 if (name.equals("identifier")) { 1115 this.identifier = castToId(value); // IdType 1116 } else if (name.equals("code")) { 1117 value = new ResponseTypeEnumFactory().fromType(castToCode(value)); 1118 this.code = (Enumeration) value; // Enumeration<ResponseType> 1119 } else if (name.equals("details")) { 1120 this.details = castToReference(value); // Reference 1121 } else 1122 return super.setProperty(name, value); 1123 return value; 1124 } 1125 1126 @Override 1127 public Base makeProperty(int hash, String name) throws FHIRException { 1128 switch (hash) { 1129 case -1618432855: return getIdentifierElement(); 1130 case 3059181: return getCodeElement(); 1131 case 1557721666: return getDetails(); 1132 default: return super.makeProperty(hash, name); 1133 } 1134 1135 } 1136 1137 @Override 1138 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1139 switch (hash) { 1140 case -1618432855: /*identifier*/ return new String[] {"id"}; 1141 case 3059181: /*code*/ return new String[] {"code"}; 1142 case 1557721666: /*details*/ return new String[] {"Reference"}; 1143 default: return super.getTypesForProperty(hash, name); 1144 } 1145 1146 } 1147 1148 @Override 1149 public Base addChild(String name) throws FHIRException { 1150 if (name.equals("identifier")) { 1151 throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.identifier"); 1152 } 1153 else if (name.equals("code")) { 1154 throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.code"); 1155 } 1156 else if (name.equals("details")) { 1157 this.details = new Reference(); 1158 return this.details; 1159 } 1160 else 1161 return super.addChild(name); 1162 } 1163 1164 public MessageHeaderResponseComponent copy() { 1165 MessageHeaderResponseComponent dst = new MessageHeaderResponseComponent(); 1166 copyValues(dst); 1167 dst.identifier = identifier == null ? null : identifier.copy(); 1168 dst.code = code == null ? null : code.copy(); 1169 dst.details = details == null ? null : details.copy(); 1170 return dst; 1171 } 1172 1173 @Override 1174 public boolean equalsDeep(Base other) { 1175 if (!super.equalsDeep(other)) 1176 return false; 1177 if (!(other instanceof MessageHeaderResponseComponent)) 1178 return false; 1179 MessageHeaderResponseComponent o = (MessageHeaderResponseComponent) other; 1180 return compareDeep(identifier, o.identifier, true) && compareDeep(code, o.code, true) && compareDeep(details, o.details, true) 1181 ; 1182 } 1183 1184 @Override 1185 public boolean equalsShallow(Base other) { 1186 if (!super.equalsShallow(other)) 1187 return false; 1188 if (!(other instanceof MessageHeaderResponseComponent)) 1189 return false; 1190 MessageHeaderResponseComponent o = (MessageHeaderResponseComponent) other; 1191 return compareValues(identifier, o.identifier, true) && compareValues(code, o.code, true); 1192 } 1193 1194 public boolean isEmpty() { 1195 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, code, details 1196 ); 1197 } 1198 1199 public String fhirType() { 1200 return "MessageHeader.response"; 1201 1202 } 1203 1204 } 1205 1206 /** 1207 * Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-events". 1208 */ 1209 @Child(name = "event", type = {Coding.class}, order=0, min=1, max=1, modifier=false, summary=true) 1210 @Description(shortDefinition="Code for the event this message represents", formalDefinition="Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value \"http://hl7.org/fhir/message-events\"." ) 1211 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/message-events") 1212 protected Coding event; 1213 1214 /** 1215 * The destination application which the message is intended for. 1216 */ 1217 @Child(name = "destination", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1218 @Description(shortDefinition="Message destination application(s)", formalDefinition="The destination application which the message is intended for." ) 1219 protected List<MessageDestinationComponent> destination; 1220 1221 /** 1222 * Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient. 1223 */ 1224 @Child(name = "receiver", type = {Practitioner.class, Organization.class}, order=2, min=0, max=1, modifier=false, summary=true) 1225 @Description(shortDefinition="Intended \"real-world\" recipient for the data", formalDefinition="Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient." ) 1226 protected Reference receiver; 1227 1228 /** 1229 * The actual object that is the target of the reference (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) 1230 */ 1231 protected Resource receiverTarget; 1232 1233 /** 1234 * Identifies the sending system to allow the use of a trust relationship. 1235 */ 1236 @Child(name = "sender", type = {Practitioner.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) 1237 @Description(shortDefinition="Real world sender of the message", formalDefinition="Identifies the sending system to allow the use of a trust relationship." ) 1238 protected Reference sender; 1239 1240 /** 1241 * The actual object that is the target of the reference (Identifies the sending system to allow the use of a trust relationship.) 1242 */ 1243 protected Resource senderTarget; 1244 1245 /** 1246 * The time that the message was sent. 1247 */ 1248 @Child(name = "timestamp", type = {InstantType.class}, order=4, min=1, max=1, modifier=false, summary=true) 1249 @Description(shortDefinition="Time that the message was sent", formalDefinition="The time that the message was sent." ) 1250 protected InstantType timestamp; 1251 1252 /** 1253 * The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions. 1254 */ 1255 @Child(name = "enterer", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) 1256 @Description(shortDefinition="The source of the data entry", formalDefinition="The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions." ) 1257 protected Reference enterer; 1258 1259 /** 1260 * The actual object that is the target of the reference (The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) 1261 */ 1262 protected Practitioner entererTarget; 1263 1264 /** 1265 * The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions. 1266 */ 1267 @Child(name = "author", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) 1268 @Description(shortDefinition="The source of the decision", formalDefinition="The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions." ) 1269 protected Reference author; 1270 1271 /** 1272 * The actual object that is the target of the reference (The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) 1273 */ 1274 protected Practitioner authorTarget; 1275 1276 /** 1277 * The source application from which this message originated. 1278 */ 1279 @Child(name = "source", type = {}, order=7, min=1, max=1, modifier=false, summary=true) 1280 @Description(shortDefinition="Message source application", formalDefinition="The source application from which this message originated." ) 1281 protected MessageSourceComponent source; 1282 1283 /** 1284 * The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party. 1285 */ 1286 @Child(name = "responsible", type = {Practitioner.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) 1287 @Description(shortDefinition="Final responsibility for event", formalDefinition="The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party." ) 1288 protected Reference responsible; 1289 1290 /** 1291 * The actual object that is the target of the reference (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) 1292 */ 1293 protected Resource responsibleTarget; 1294 1295 /** 1296 * Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message. 1297 */ 1298 @Child(name = "reason", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) 1299 @Description(shortDefinition="Cause of event", formalDefinition="Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message." ) 1300 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/message-reason-encounter") 1301 protected CodeableConcept reason; 1302 1303 /** 1304 * Information about the message that this message is a response to. Only present if this message is a response. 1305 */ 1306 @Child(name = "response", type = {}, order=10, min=0, max=1, modifier=false, summary=true) 1307 @Description(shortDefinition="If this is a reply to prior message", formalDefinition="Information about the message that this message is a response to. Only present if this message is a response." ) 1308 protected MessageHeaderResponseComponent response; 1309 1310 /** 1311 * The actual data of the message - a reference to the root/focus class of the event. 1312 */ 1313 @Child(name = "focus", type = {Reference.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1314 @Description(shortDefinition="The actual content of the message", formalDefinition="The actual data of the message - a reference to the root/focus class of the event." ) 1315 protected List<Reference> focus; 1316 /** 1317 * The actual objects that are the target of the reference (The actual data of the message - a reference to the root/focus class of the event.) 1318 */ 1319 protected List<Resource> focusTarget; 1320 1321 1322 private static final long serialVersionUID = 1142547869L; 1323 1324 /** 1325 * Constructor 1326 */ 1327 public MessageHeader() { 1328 super(); 1329 } 1330 1331 /** 1332 * Constructor 1333 */ 1334 public MessageHeader(Coding event, InstantType timestamp, MessageSourceComponent source) { 1335 super(); 1336 this.event = event; 1337 this.timestamp = timestamp; 1338 this.source = source; 1339 } 1340 1341 /** 1342 * @return {@link #event} (Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-events".) 1343 */ 1344 public Coding getEvent() { 1345 if (this.event == null) 1346 if (Configuration.errorOnAutoCreate()) 1347 throw new Error("Attempt to auto-create MessageHeader.event"); 1348 else if (Configuration.doAutoCreate()) 1349 this.event = new Coding(); // cc 1350 return this.event; 1351 } 1352 1353 public boolean hasEvent() { 1354 return this.event != null && !this.event.isEmpty(); 1355 } 1356 1357 /** 1358 * @param value {@link #event} (Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://hl7.org/fhir/message-events".) 1359 */ 1360 public MessageHeader setEvent(Coding value) { 1361 this.event = value; 1362 return this; 1363 } 1364 1365 /** 1366 * @return {@link #destination} (The destination application which the message is intended for.) 1367 */ 1368 public List<MessageDestinationComponent> getDestination() { 1369 if (this.destination == null) 1370 this.destination = new ArrayList<MessageDestinationComponent>(); 1371 return this.destination; 1372 } 1373 1374 /** 1375 * @return Returns a reference to <code>this</code> for easy method chaining 1376 */ 1377 public MessageHeader setDestination(List<MessageDestinationComponent> theDestination) { 1378 this.destination = theDestination; 1379 return this; 1380 } 1381 1382 public boolean hasDestination() { 1383 if (this.destination == null) 1384 return false; 1385 for (MessageDestinationComponent item : this.destination) 1386 if (!item.isEmpty()) 1387 return true; 1388 return false; 1389 } 1390 1391 public MessageDestinationComponent addDestination() { //3 1392 MessageDestinationComponent t = new MessageDestinationComponent(); 1393 if (this.destination == null) 1394 this.destination = new ArrayList<MessageDestinationComponent>(); 1395 this.destination.add(t); 1396 return t; 1397 } 1398 1399 public MessageHeader addDestination(MessageDestinationComponent t) { //3 1400 if (t == null) 1401 return this; 1402 if (this.destination == null) 1403 this.destination = new ArrayList<MessageDestinationComponent>(); 1404 this.destination.add(t); 1405 return this; 1406 } 1407 1408 /** 1409 * @return The first repetition of repeating field {@link #destination}, creating it if it does not already exist 1410 */ 1411 public MessageDestinationComponent getDestinationFirstRep() { 1412 if (getDestination().isEmpty()) { 1413 addDestination(); 1414 } 1415 return getDestination().get(0); 1416 } 1417 1418 /** 1419 * @return {@link #receiver} (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) 1420 */ 1421 public Reference getReceiver() { 1422 if (this.receiver == null) 1423 if (Configuration.errorOnAutoCreate()) 1424 throw new Error("Attempt to auto-create MessageHeader.receiver"); 1425 else if (Configuration.doAutoCreate()) 1426 this.receiver = new Reference(); // cc 1427 return this.receiver; 1428 } 1429 1430 public boolean hasReceiver() { 1431 return this.receiver != null && !this.receiver.isEmpty(); 1432 } 1433 1434 /** 1435 * @param value {@link #receiver} (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) 1436 */ 1437 public MessageHeader setReceiver(Reference value) { 1438 this.receiver = value; 1439 return this; 1440 } 1441 1442 /** 1443 * @return {@link #receiver} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) 1444 */ 1445 public Resource getReceiverTarget() { 1446 return this.receiverTarget; 1447 } 1448 1449 /** 1450 * @param value {@link #receiver} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.) 1451 */ 1452 public MessageHeader setReceiverTarget(Resource value) { 1453 this.receiverTarget = value; 1454 return this; 1455 } 1456 1457 /** 1458 * @return {@link #sender} (Identifies the sending system to allow the use of a trust relationship.) 1459 */ 1460 public Reference getSender() { 1461 if (this.sender == null) 1462 if (Configuration.errorOnAutoCreate()) 1463 throw new Error("Attempt to auto-create MessageHeader.sender"); 1464 else if (Configuration.doAutoCreate()) 1465 this.sender = new Reference(); // cc 1466 return this.sender; 1467 } 1468 1469 public boolean hasSender() { 1470 return this.sender != null && !this.sender.isEmpty(); 1471 } 1472 1473 /** 1474 * @param value {@link #sender} (Identifies the sending system to allow the use of a trust relationship.) 1475 */ 1476 public MessageHeader setSender(Reference value) { 1477 this.sender = value; 1478 return this; 1479 } 1480 1481 /** 1482 * @return {@link #sender} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the sending system to allow the use of a trust relationship.) 1483 */ 1484 public Resource getSenderTarget() { 1485 return this.senderTarget; 1486 } 1487 1488 /** 1489 * @param value {@link #sender} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the sending system to allow the use of a trust relationship.) 1490 */ 1491 public MessageHeader setSenderTarget(Resource value) { 1492 this.senderTarget = value; 1493 return this; 1494 } 1495 1496 /** 1497 * @return {@link #timestamp} (The time that the message was sent.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value 1498 */ 1499 public InstantType getTimestampElement() { 1500 if (this.timestamp == null) 1501 if (Configuration.errorOnAutoCreate()) 1502 throw new Error("Attempt to auto-create MessageHeader.timestamp"); 1503 else if (Configuration.doAutoCreate()) 1504 this.timestamp = new InstantType(); // bb 1505 return this.timestamp; 1506 } 1507 1508 public boolean hasTimestampElement() { 1509 return this.timestamp != null && !this.timestamp.isEmpty(); 1510 } 1511 1512 public boolean hasTimestamp() { 1513 return this.timestamp != null && !this.timestamp.isEmpty(); 1514 } 1515 1516 /** 1517 * @param value {@link #timestamp} (The time that the message was sent.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value 1518 */ 1519 public MessageHeader setTimestampElement(InstantType value) { 1520 this.timestamp = value; 1521 return this; 1522 } 1523 1524 /** 1525 * @return The time that the message was sent. 1526 */ 1527 public Date getTimestamp() { 1528 return this.timestamp == null ? null : this.timestamp.getValue(); 1529 } 1530 1531 /** 1532 * @param value The time that the message was sent. 1533 */ 1534 public MessageHeader setTimestamp(Date value) { 1535 if (this.timestamp == null) 1536 this.timestamp = new InstantType(); 1537 this.timestamp.setValue(value); 1538 return this; 1539 } 1540 1541 /** 1542 * @return {@link #enterer} (The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) 1543 */ 1544 public Reference getEnterer() { 1545 if (this.enterer == null) 1546 if (Configuration.errorOnAutoCreate()) 1547 throw new Error("Attempt to auto-create MessageHeader.enterer"); 1548 else if (Configuration.doAutoCreate()) 1549 this.enterer = new Reference(); // cc 1550 return this.enterer; 1551 } 1552 1553 public boolean hasEnterer() { 1554 return this.enterer != null && !this.enterer.isEmpty(); 1555 } 1556 1557 /** 1558 * @param value {@link #enterer} (The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) 1559 */ 1560 public MessageHeader setEnterer(Reference value) { 1561 this.enterer = value; 1562 return this; 1563 } 1564 1565 /** 1566 * @return {@link #enterer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) 1567 */ 1568 public Practitioner getEntererTarget() { 1569 if (this.entererTarget == null) 1570 if (Configuration.errorOnAutoCreate()) 1571 throw new Error("Attempt to auto-create MessageHeader.enterer"); 1572 else if (Configuration.doAutoCreate()) 1573 this.entererTarget = new Practitioner(); // aa 1574 return this.entererTarget; 1575 } 1576 1577 /** 1578 * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.) 1579 */ 1580 public MessageHeader setEntererTarget(Practitioner value) { 1581 this.entererTarget = value; 1582 return this; 1583 } 1584 1585 /** 1586 * @return {@link #author} (The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) 1587 */ 1588 public Reference getAuthor() { 1589 if (this.author == null) 1590 if (Configuration.errorOnAutoCreate()) 1591 throw new Error("Attempt to auto-create MessageHeader.author"); 1592 else if (Configuration.doAutoCreate()) 1593 this.author = new Reference(); // cc 1594 return this.author; 1595 } 1596 1597 public boolean hasAuthor() { 1598 return this.author != null && !this.author.isEmpty(); 1599 } 1600 1601 /** 1602 * @param value {@link #author} (The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) 1603 */ 1604 public MessageHeader setAuthor(Reference value) { 1605 this.author = value; 1606 return this; 1607 } 1608 1609 /** 1610 * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) 1611 */ 1612 public Practitioner getAuthorTarget() { 1613 if (this.authorTarget == null) 1614 if (Configuration.errorOnAutoCreate()) 1615 throw new Error("Attempt to auto-create MessageHeader.author"); 1616 else if (Configuration.doAutoCreate()) 1617 this.authorTarget = new Practitioner(); // aa 1618 return this.authorTarget; 1619 } 1620 1621 /** 1622 * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.) 1623 */ 1624 public MessageHeader setAuthorTarget(Practitioner value) { 1625 this.authorTarget = value; 1626 return this; 1627 } 1628 1629 /** 1630 * @return {@link #source} (The source application from which this message originated.) 1631 */ 1632 public MessageSourceComponent getSource() { 1633 if (this.source == null) 1634 if (Configuration.errorOnAutoCreate()) 1635 throw new Error("Attempt to auto-create MessageHeader.source"); 1636 else if (Configuration.doAutoCreate()) 1637 this.source = new MessageSourceComponent(); // cc 1638 return this.source; 1639 } 1640 1641 public boolean hasSource() { 1642 return this.source != null && !this.source.isEmpty(); 1643 } 1644 1645 /** 1646 * @param value {@link #source} (The source application from which this message originated.) 1647 */ 1648 public MessageHeader setSource(MessageSourceComponent value) { 1649 this.source = value; 1650 return this; 1651 } 1652 1653 /** 1654 * @return {@link #responsible} (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) 1655 */ 1656 public Reference getResponsible() { 1657 if (this.responsible == null) 1658 if (Configuration.errorOnAutoCreate()) 1659 throw new Error("Attempt to auto-create MessageHeader.responsible"); 1660 else if (Configuration.doAutoCreate()) 1661 this.responsible = new Reference(); // cc 1662 return this.responsible; 1663 } 1664 1665 public boolean hasResponsible() { 1666 return this.responsible != null && !this.responsible.isEmpty(); 1667 } 1668 1669 /** 1670 * @param value {@link #responsible} (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) 1671 */ 1672 public MessageHeader setResponsible(Reference value) { 1673 this.responsible = value; 1674 return this; 1675 } 1676 1677 /** 1678 * @return {@link #responsible} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) 1679 */ 1680 public Resource getResponsibleTarget() { 1681 return this.responsibleTarget; 1682 } 1683 1684 /** 1685 * @param value {@link #responsible} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.) 1686 */ 1687 public MessageHeader setResponsibleTarget(Resource value) { 1688 this.responsibleTarget = value; 1689 return this; 1690 } 1691 1692 /** 1693 * @return {@link #reason} (Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.) 1694 */ 1695 public CodeableConcept getReason() { 1696 if (this.reason == null) 1697 if (Configuration.errorOnAutoCreate()) 1698 throw new Error("Attempt to auto-create MessageHeader.reason"); 1699 else if (Configuration.doAutoCreate()) 1700 this.reason = new CodeableConcept(); // cc 1701 return this.reason; 1702 } 1703 1704 public boolean hasReason() { 1705 return this.reason != null && !this.reason.isEmpty(); 1706 } 1707 1708 /** 1709 * @param value {@link #reason} (Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.) 1710 */ 1711 public MessageHeader setReason(CodeableConcept value) { 1712 this.reason = value; 1713 return this; 1714 } 1715 1716 /** 1717 * @return {@link #response} (Information about the message that this message is a response to. Only present if this message is a response.) 1718 */ 1719 public MessageHeaderResponseComponent getResponse() { 1720 if (this.response == null) 1721 if (Configuration.errorOnAutoCreate()) 1722 throw new Error("Attempt to auto-create MessageHeader.response"); 1723 else if (Configuration.doAutoCreate()) 1724 this.response = new MessageHeaderResponseComponent(); // cc 1725 return this.response; 1726 } 1727 1728 public boolean hasResponse() { 1729 return this.response != null && !this.response.isEmpty(); 1730 } 1731 1732 /** 1733 * @param value {@link #response} (Information about the message that this message is a response to. Only present if this message is a response.) 1734 */ 1735 public MessageHeader setResponse(MessageHeaderResponseComponent value) { 1736 this.response = value; 1737 return this; 1738 } 1739 1740 /** 1741 * @return {@link #focus} (The actual data of the message - a reference to the root/focus class of the event.) 1742 */ 1743 public List<Reference> getFocus() { 1744 if (this.focus == null) 1745 this.focus = new ArrayList<Reference>(); 1746 return this.focus; 1747 } 1748 1749 /** 1750 * @return Returns a reference to <code>this</code> for easy method chaining 1751 */ 1752 public MessageHeader setFocus(List<Reference> theFocus) { 1753 this.focus = theFocus; 1754 return this; 1755 } 1756 1757 public boolean hasFocus() { 1758 if (this.focus == null) 1759 return false; 1760 for (Reference item : this.focus) 1761 if (!item.isEmpty()) 1762 return true; 1763 return false; 1764 } 1765 1766 public Reference addFocus() { //3 1767 Reference t = new Reference(); 1768 if (this.focus == null) 1769 this.focus = new ArrayList<Reference>(); 1770 this.focus.add(t); 1771 return t; 1772 } 1773 1774 public MessageHeader addFocus(Reference t) { //3 1775 if (t == null) 1776 return this; 1777 if (this.focus == null) 1778 this.focus = new ArrayList<Reference>(); 1779 this.focus.add(t); 1780 return this; 1781 } 1782 1783 /** 1784 * @return The first repetition of repeating field {@link #focus}, creating it if it does not already exist 1785 */ 1786 public Reference getFocusFirstRep() { 1787 if (getFocus().isEmpty()) { 1788 addFocus(); 1789 } 1790 return getFocus().get(0); 1791 } 1792 1793 /** 1794 * @deprecated Use Reference#setResource(IBaseResource) instead 1795 */ 1796 @Deprecated 1797 public List<Resource> getFocusTarget() { 1798 if (this.focusTarget == null) 1799 this.focusTarget = new ArrayList<Resource>(); 1800 return this.focusTarget; 1801 } 1802 1803 protected void listChildren(List<Property> childrenList) { 1804 super.listChildren(childrenList); 1805 childrenList.add(new Property("event", "Coding", "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value \"http://hl7.org/fhir/message-events\".", 0, java.lang.Integer.MAX_VALUE, event)); 1806 childrenList.add(new Property("destination", "", "The destination application which the message is intended for.", 0, java.lang.Integer.MAX_VALUE, destination)); 1807 childrenList.add(new Property("receiver", "Reference(Practitioner|Organization)", "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", 0, java.lang.Integer.MAX_VALUE, receiver)); 1808 childrenList.add(new Property("sender", "Reference(Practitioner|Organization)", "Identifies the sending system to allow the use of a trust relationship.", 0, java.lang.Integer.MAX_VALUE, sender)); 1809 childrenList.add(new Property("timestamp", "instant", "The time that the message was sent.", 0, java.lang.Integer.MAX_VALUE, timestamp)); 1810 childrenList.add(new Property("enterer", "Reference(Practitioner)", "The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.", 0, java.lang.Integer.MAX_VALUE, enterer)); 1811 childrenList.add(new Property("author", "Reference(Practitioner)", "The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.", 0, java.lang.Integer.MAX_VALUE, author)); 1812 childrenList.add(new Property("source", "", "The source application from which this message originated.", 0, java.lang.Integer.MAX_VALUE, source)); 1813 childrenList.add(new Property("responsible", "Reference(Practitioner|Organization)", "The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.", 0, java.lang.Integer.MAX_VALUE, responsible)); 1814 childrenList.add(new Property("reason", "CodeableConcept", "Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.", 0, java.lang.Integer.MAX_VALUE, reason)); 1815 childrenList.add(new Property("response", "", "Information about the message that this message is a response to. Only present if this message is a response.", 0, java.lang.Integer.MAX_VALUE, response)); 1816 childrenList.add(new Property("focus", "Reference(Any)", "The actual data of the message - a reference to the root/focus class of the event.", 0, java.lang.Integer.MAX_VALUE, focus)); 1817 } 1818 1819 @Override 1820 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1821 switch (hash) { 1822 case 96891546: /*event*/ return this.event == null ? new Base[0] : new Base[] {this.event}; // Coding 1823 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // MessageDestinationComponent 1824 case -808719889: /*receiver*/ return this.receiver == null ? new Base[0] : new Base[] {this.receiver}; // Reference 1825 case -905962955: /*sender*/ return this.sender == null ? new Base[0] : new Base[] {this.sender}; // Reference 1826 case 55126294: /*timestamp*/ return this.timestamp == null ? new Base[0] : new Base[] {this.timestamp}; // InstantType 1827 case -1591951995: /*enterer*/ return this.enterer == null ? new Base[0] : new Base[] {this.enterer}; // Reference 1828 case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference 1829 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // MessageSourceComponent 1830 case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // Reference 1831 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept 1832 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // MessageHeaderResponseComponent 1833 case 97604824: /*focus*/ return this.focus == null ? new Base[0] : this.focus.toArray(new Base[this.focus.size()]); // Reference 1834 default: return super.getProperty(hash, name, checkValid); 1835 } 1836 1837 } 1838 1839 @Override 1840 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1841 switch (hash) { 1842 case 96891546: // event 1843 this.event = castToCoding(value); // Coding 1844 return value; 1845 case -1429847026: // destination 1846 this.getDestination().add((MessageDestinationComponent) value); // MessageDestinationComponent 1847 return value; 1848 case -808719889: // receiver 1849 this.receiver = castToReference(value); // Reference 1850 return value; 1851 case -905962955: // sender 1852 this.sender = castToReference(value); // Reference 1853 return value; 1854 case 55126294: // timestamp 1855 this.timestamp = castToInstant(value); // InstantType 1856 return value; 1857 case -1591951995: // enterer 1858 this.enterer = castToReference(value); // Reference 1859 return value; 1860 case -1406328437: // author 1861 this.author = castToReference(value); // Reference 1862 return value; 1863 case -896505829: // source 1864 this.source = (MessageSourceComponent) value; // MessageSourceComponent 1865 return value; 1866 case 1847674614: // responsible 1867 this.responsible = castToReference(value); // Reference 1868 return value; 1869 case -934964668: // reason 1870 this.reason = castToCodeableConcept(value); // CodeableConcept 1871 return value; 1872 case -340323263: // response 1873 this.response = (MessageHeaderResponseComponent) value; // MessageHeaderResponseComponent 1874 return value; 1875 case 97604824: // focus 1876 this.getFocus().add(castToReference(value)); // Reference 1877 return value; 1878 default: return super.setProperty(hash, name, value); 1879 } 1880 1881 } 1882 1883 @Override 1884 public Base setProperty(String name, Base value) throws FHIRException { 1885 if (name.equals("event")) { 1886 this.event = castToCoding(value); // Coding 1887 } else if (name.equals("destination")) { 1888 this.getDestination().add((MessageDestinationComponent) value); 1889 } else if (name.equals("receiver")) { 1890 this.receiver = castToReference(value); // Reference 1891 } else if (name.equals("sender")) { 1892 this.sender = castToReference(value); // Reference 1893 } else if (name.equals("timestamp")) { 1894 this.timestamp = castToInstant(value); // InstantType 1895 } else if (name.equals("enterer")) { 1896 this.enterer = castToReference(value); // Reference 1897 } else if (name.equals("author")) { 1898 this.author = castToReference(value); // Reference 1899 } else if (name.equals("source")) { 1900 this.source = (MessageSourceComponent) value; // MessageSourceComponent 1901 } else if (name.equals("responsible")) { 1902 this.responsible = castToReference(value); // Reference 1903 } else if (name.equals("reason")) { 1904 this.reason = castToCodeableConcept(value); // CodeableConcept 1905 } else if (name.equals("response")) { 1906 this.response = (MessageHeaderResponseComponent) value; // MessageHeaderResponseComponent 1907 } else if (name.equals("focus")) { 1908 this.getFocus().add(castToReference(value)); 1909 } else 1910 return super.setProperty(name, value); 1911 return value; 1912 } 1913 1914 @Override 1915 public Base makeProperty(int hash, String name) throws FHIRException { 1916 switch (hash) { 1917 case 96891546: return getEvent(); 1918 case -1429847026: return addDestination(); 1919 case -808719889: return getReceiver(); 1920 case -905962955: return getSender(); 1921 case 55126294: return getTimestampElement(); 1922 case -1591951995: return getEnterer(); 1923 case -1406328437: return getAuthor(); 1924 case -896505829: return getSource(); 1925 case 1847674614: return getResponsible(); 1926 case -934964668: return getReason(); 1927 case -340323263: return getResponse(); 1928 case 97604824: return addFocus(); 1929 default: return super.makeProperty(hash, name); 1930 } 1931 1932 } 1933 1934 @Override 1935 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1936 switch (hash) { 1937 case 96891546: /*event*/ return new String[] {"Coding"}; 1938 case -1429847026: /*destination*/ return new String[] {}; 1939 case -808719889: /*receiver*/ return new String[] {"Reference"}; 1940 case -905962955: /*sender*/ return new String[] {"Reference"}; 1941 case 55126294: /*timestamp*/ return new String[] {"instant"}; 1942 case -1591951995: /*enterer*/ return new String[] {"Reference"}; 1943 case -1406328437: /*author*/ return new String[] {"Reference"}; 1944 case -896505829: /*source*/ return new String[] {}; 1945 case 1847674614: /*responsible*/ return new String[] {"Reference"}; 1946 case -934964668: /*reason*/ return new String[] {"CodeableConcept"}; 1947 case -340323263: /*response*/ return new String[] {}; 1948 case 97604824: /*focus*/ return new String[] {"Reference"}; 1949 default: return super.getTypesForProperty(hash, name); 1950 } 1951 1952 } 1953 1954 @Override 1955 public Base addChild(String name) throws FHIRException { 1956 if (name.equals("event")) { 1957 this.event = new Coding(); 1958 return this.event; 1959 } 1960 else if (name.equals("destination")) { 1961 return addDestination(); 1962 } 1963 else if (name.equals("receiver")) { 1964 this.receiver = new Reference(); 1965 return this.receiver; 1966 } 1967 else if (name.equals("sender")) { 1968 this.sender = new Reference(); 1969 return this.sender; 1970 } 1971 else if (name.equals("timestamp")) { 1972 throw new FHIRException("Cannot call addChild on a primitive type MessageHeader.timestamp"); 1973 } 1974 else if (name.equals("enterer")) { 1975 this.enterer = new Reference(); 1976 return this.enterer; 1977 } 1978 else if (name.equals("author")) { 1979 this.author = new Reference(); 1980 return this.author; 1981 } 1982 else if (name.equals("source")) { 1983 this.source = new MessageSourceComponent(); 1984 return this.source; 1985 } 1986 else if (name.equals("responsible")) { 1987 this.responsible = new Reference(); 1988 return this.responsible; 1989 } 1990 else if (name.equals("reason")) { 1991 this.reason = new CodeableConcept(); 1992 return this.reason; 1993 } 1994 else if (name.equals("response")) { 1995 this.response = new MessageHeaderResponseComponent(); 1996 return this.response; 1997 } 1998 else if (name.equals("focus")) { 1999 return addFocus(); 2000 } 2001 else 2002 return super.addChild(name); 2003 } 2004 2005 public String fhirType() { 2006 return "MessageHeader"; 2007 2008 } 2009 2010 public MessageHeader copy() { 2011 MessageHeader dst = new MessageHeader(); 2012 copyValues(dst); 2013 dst.event = event == null ? null : event.copy(); 2014 if (destination != null) { 2015 dst.destination = new ArrayList<MessageDestinationComponent>(); 2016 for (MessageDestinationComponent i : destination) 2017 dst.destination.add(i.copy()); 2018 }; 2019 dst.receiver = receiver == null ? null : receiver.copy(); 2020 dst.sender = sender == null ? null : sender.copy(); 2021 dst.timestamp = timestamp == null ? null : timestamp.copy(); 2022 dst.enterer = enterer == null ? null : enterer.copy(); 2023 dst.author = author == null ? null : author.copy(); 2024 dst.source = source == null ? null : source.copy(); 2025 dst.responsible = responsible == null ? null : responsible.copy(); 2026 dst.reason = reason == null ? null : reason.copy(); 2027 dst.response = response == null ? null : response.copy(); 2028 if (focus != null) { 2029 dst.focus = new ArrayList<Reference>(); 2030 for (Reference i : focus) 2031 dst.focus.add(i.copy()); 2032 }; 2033 return dst; 2034 } 2035 2036 protected MessageHeader typedCopy() { 2037 return copy(); 2038 } 2039 2040 @Override 2041 public boolean equalsDeep(Base other) { 2042 if (!super.equalsDeep(other)) 2043 return false; 2044 if (!(other instanceof MessageHeader)) 2045 return false; 2046 MessageHeader o = (MessageHeader) other; 2047 return compareDeep(event, o.event, true) && compareDeep(destination, o.destination, true) && compareDeep(receiver, o.receiver, true) 2048 && compareDeep(sender, o.sender, true) && compareDeep(timestamp, o.timestamp, true) && compareDeep(enterer, o.enterer, true) 2049 && compareDeep(author, o.author, true) && compareDeep(source, o.source, true) && compareDeep(responsible, o.responsible, true) 2050 && compareDeep(reason, o.reason, true) && compareDeep(response, o.response, true) && compareDeep(focus, o.focus, true) 2051 ; 2052 } 2053 2054 @Override 2055 public boolean equalsShallow(Base other) { 2056 if (!super.equalsShallow(other)) 2057 return false; 2058 if (!(other instanceof MessageHeader)) 2059 return false; 2060 MessageHeader o = (MessageHeader) other; 2061 return compareValues(timestamp, o.timestamp, true); 2062 } 2063 2064 public boolean isEmpty() { 2065 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(event, destination, receiver 2066 , sender, timestamp, enterer, author, source, responsible, reason, response 2067 , focus); 2068 } 2069 2070 @Override 2071 public ResourceType getResourceType() { 2072 return ResourceType.MessageHeader; 2073 } 2074 2075 /** 2076 * Search parameter: <b>code</b> 2077 * <p> 2078 * Description: <b>ok | transient-error | fatal-error</b><br> 2079 * Type: <b>token</b><br> 2080 * Path: <b>MessageHeader.response.code</b><br> 2081 * </p> 2082 */ 2083 @SearchParamDefinition(name="code", path="MessageHeader.response.code", description="ok | transient-error | fatal-error", type="token" ) 2084 public static final String SP_CODE = "code"; 2085 /** 2086 * <b>Fluent Client</b> search parameter constant for <b>code</b> 2087 * <p> 2088 * Description: <b>ok | transient-error | fatal-error</b><br> 2089 * Type: <b>token</b><br> 2090 * Path: <b>MessageHeader.response.code</b><br> 2091 * </p> 2092 */ 2093 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 2094 2095 /** 2096 * Search parameter: <b>receiver</b> 2097 * <p> 2098 * Description: <b>Intended "real-world" recipient for the data</b><br> 2099 * Type: <b>reference</b><br> 2100 * Path: <b>MessageHeader.receiver</b><br> 2101 * </p> 2102 */ 2103 @SearchParamDefinition(name="receiver", path="MessageHeader.receiver", description="Intended \"real-world\" recipient for the data", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Practitioner.class } ) 2104 public static final String SP_RECEIVER = "receiver"; 2105 /** 2106 * <b>Fluent Client</b> search parameter constant for <b>receiver</b> 2107 * <p> 2108 * Description: <b>Intended "real-world" recipient for the data</b><br> 2109 * Type: <b>reference</b><br> 2110 * Path: <b>MessageHeader.receiver</b><br> 2111 * </p> 2112 */ 2113 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECEIVER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECEIVER); 2114 2115/** 2116 * Constant for fluent queries to be used to add include statements. Specifies 2117 * the path value of "<b>MessageHeader:receiver</b>". 2118 */ 2119 public static final ca.uhn.fhir.model.api.Include INCLUDE_RECEIVER = new ca.uhn.fhir.model.api.Include("MessageHeader:receiver").toLocked(); 2120 2121 /** 2122 * Search parameter: <b>author</b> 2123 * <p> 2124 * Description: <b>The source of the decision</b><br> 2125 * Type: <b>reference</b><br> 2126 * Path: <b>MessageHeader.author</b><br> 2127 * </p> 2128 */ 2129 @SearchParamDefinition(name="author", path="MessageHeader.author", description="The source of the decision", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class } ) 2130 public static final String SP_AUTHOR = "author"; 2131 /** 2132 * <b>Fluent Client</b> search parameter constant for <b>author</b> 2133 * <p> 2134 * Description: <b>The source of the decision</b><br> 2135 * Type: <b>reference</b><br> 2136 * Path: <b>MessageHeader.author</b><br> 2137 * </p> 2138 */ 2139 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); 2140 2141/** 2142 * Constant for fluent queries to be used to add include statements. Specifies 2143 * the path value of "<b>MessageHeader:author</b>". 2144 */ 2145 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("MessageHeader:author").toLocked(); 2146 2147 /** 2148 * Search parameter: <b>destination</b> 2149 * <p> 2150 * Description: <b>Name of system</b><br> 2151 * Type: <b>string</b><br> 2152 * Path: <b>MessageHeader.destination.name</b><br> 2153 * </p> 2154 */ 2155 @SearchParamDefinition(name="destination", path="MessageHeader.destination.name", description="Name of system", type="string" ) 2156 public static final String SP_DESTINATION = "destination"; 2157 /** 2158 * <b>Fluent Client</b> search parameter constant for <b>destination</b> 2159 * <p> 2160 * Description: <b>Name of system</b><br> 2161 * Type: <b>string</b><br> 2162 * Path: <b>MessageHeader.destination.name</b><br> 2163 * </p> 2164 */ 2165 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESTINATION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESTINATION); 2166 2167 /** 2168 * Search parameter: <b>focus</b> 2169 * <p> 2170 * Description: <b>The actual content of the message</b><br> 2171 * Type: <b>reference</b><br> 2172 * Path: <b>MessageHeader.focus</b><br> 2173 * </p> 2174 */ 2175 @SearchParamDefinition(name="focus", path="MessageHeader.focus", description="The actual content of the message", type="reference" ) 2176 public static final String SP_FOCUS = "focus"; 2177 /** 2178 * <b>Fluent Client</b> search parameter constant for <b>focus</b> 2179 * <p> 2180 * Description: <b>The actual content of the message</b><br> 2181 * Type: <b>reference</b><br> 2182 * Path: <b>MessageHeader.focus</b><br> 2183 * </p> 2184 */ 2185 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FOCUS = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FOCUS); 2186 2187/** 2188 * Constant for fluent queries to be used to add include statements. Specifies 2189 * the path value of "<b>MessageHeader:focus</b>". 2190 */ 2191 public static final ca.uhn.fhir.model.api.Include INCLUDE_FOCUS = new ca.uhn.fhir.model.api.Include("MessageHeader:focus").toLocked(); 2192 2193 /** 2194 * Search parameter: <b>source</b> 2195 * <p> 2196 * Description: <b>Name of system</b><br> 2197 * Type: <b>string</b><br> 2198 * Path: <b>MessageHeader.source.name</b><br> 2199 * </p> 2200 */ 2201 @SearchParamDefinition(name="source", path="MessageHeader.source.name", description="Name of system", type="string" ) 2202 public static final String SP_SOURCE = "source"; 2203 /** 2204 * <b>Fluent Client</b> search parameter constant for <b>source</b> 2205 * <p> 2206 * Description: <b>Name of system</b><br> 2207 * Type: <b>string</b><br> 2208 * Path: <b>MessageHeader.source.name</b><br> 2209 * </p> 2210 */ 2211 public static final ca.uhn.fhir.rest.gclient.StringClientParam SOURCE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_SOURCE); 2212 2213 /** 2214 * Search parameter: <b>target</b> 2215 * <p> 2216 * Description: <b>Particular delivery destination within the destination</b><br> 2217 * Type: <b>reference</b><br> 2218 * Path: <b>MessageHeader.destination.target</b><br> 2219 * </p> 2220 */ 2221 @SearchParamDefinition(name="target", path="MessageHeader.destination.target", description="Particular delivery destination within the destination", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") }, target={Device.class } ) 2222 public static final String SP_TARGET = "target"; 2223 /** 2224 * <b>Fluent Client</b> search parameter constant for <b>target</b> 2225 * <p> 2226 * Description: <b>Particular delivery destination within the destination</b><br> 2227 * Type: <b>reference</b><br> 2228 * Path: <b>MessageHeader.destination.target</b><br> 2229 * </p> 2230 */ 2231 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGET = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TARGET); 2232 2233/** 2234 * Constant for fluent queries to be used to add include statements. Specifies 2235 * the path value of "<b>MessageHeader:target</b>". 2236 */ 2237 public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET = new ca.uhn.fhir.model.api.Include("MessageHeader:target").toLocked(); 2238 2239 /** 2240 * Search parameter: <b>destination-uri</b> 2241 * <p> 2242 * Description: <b>Actual destination address or id</b><br> 2243 * Type: <b>uri</b><br> 2244 * Path: <b>MessageHeader.destination.endpoint</b><br> 2245 * </p> 2246 */ 2247 @SearchParamDefinition(name="destination-uri", path="MessageHeader.destination.endpoint", description="Actual destination address or id", type="uri" ) 2248 public static final String SP_DESTINATION_URI = "destination-uri"; 2249 /** 2250 * <b>Fluent Client</b> search parameter constant for <b>destination-uri</b> 2251 * <p> 2252 * Description: <b>Actual destination address or id</b><br> 2253 * Type: <b>uri</b><br> 2254 * Path: <b>MessageHeader.destination.endpoint</b><br> 2255 * </p> 2256 */ 2257 public static final ca.uhn.fhir.rest.gclient.UriClientParam DESTINATION_URI = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_DESTINATION_URI); 2258 2259 /** 2260 * Search parameter: <b>source-uri</b> 2261 * <p> 2262 * Description: <b>Actual message source address or id</b><br> 2263 * Type: <b>uri</b><br> 2264 * Path: <b>MessageHeader.source.endpoint</b><br> 2265 * </p> 2266 */ 2267 @SearchParamDefinition(name="source-uri", path="MessageHeader.source.endpoint", description="Actual message source address or id", type="uri" ) 2268 public static final String SP_SOURCE_URI = "source-uri"; 2269 /** 2270 * <b>Fluent Client</b> search parameter constant for <b>source-uri</b> 2271 * <p> 2272 * Description: <b>Actual message source address or id</b><br> 2273 * Type: <b>uri</b><br> 2274 * Path: <b>MessageHeader.source.endpoint</b><br> 2275 * </p> 2276 */ 2277 public static final ca.uhn.fhir.rest.gclient.UriClientParam SOURCE_URI = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SOURCE_URI); 2278 2279 /** 2280 * Search parameter: <b>sender</b> 2281 * <p> 2282 * Description: <b>Real world sender of the message</b><br> 2283 * Type: <b>reference</b><br> 2284 * Path: <b>MessageHeader.sender</b><br> 2285 * </p> 2286 */ 2287 @SearchParamDefinition(name="sender", path="MessageHeader.sender", description="Real world sender of the message", type="reference", target={Organization.class, Practitioner.class } ) 2288 public static final String SP_SENDER = "sender"; 2289 /** 2290 * <b>Fluent Client</b> search parameter constant for <b>sender</b> 2291 * <p> 2292 * Description: <b>Real world sender of the message</b><br> 2293 * Type: <b>reference</b><br> 2294 * Path: <b>MessageHeader.sender</b><br> 2295 * </p> 2296 */ 2297 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SENDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SENDER); 2298 2299/** 2300 * Constant for fluent queries to be used to add include statements. Specifies 2301 * the path value of "<b>MessageHeader:sender</b>". 2302 */ 2303 public static final ca.uhn.fhir.model.api.Include INCLUDE_SENDER = new ca.uhn.fhir.model.api.Include("MessageHeader:sender").toLocked(); 2304 2305 /** 2306 * Search parameter: <b>responsible</b> 2307 * <p> 2308 * Description: <b>Final responsibility for event</b><br> 2309 * Type: <b>reference</b><br> 2310 * Path: <b>MessageHeader.responsible</b><br> 2311 * </p> 2312 */ 2313 @SearchParamDefinition(name="responsible", path="MessageHeader.responsible", description="Final responsibility for event", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Practitioner.class } ) 2314 public static final String SP_RESPONSIBLE = "responsible"; 2315 /** 2316 * <b>Fluent Client</b> search parameter constant for <b>responsible</b> 2317 * <p> 2318 * Description: <b>Final responsibility for event</b><br> 2319 * Type: <b>reference</b><br> 2320 * Path: <b>MessageHeader.responsible</b><br> 2321 * </p> 2322 */ 2323 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESPONSIBLE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESPONSIBLE); 2324 2325/** 2326 * Constant for fluent queries to be used to add include statements. Specifies 2327 * the path value of "<b>MessageHeader:responsible</b>". 2328 */ 2329 public static final ca.uhn.fhir.model.api.Include INCLUDE_RESPONSIBLE = new ca.uhn.fhir.model.api.Include("MessageHeader:responsible").toLocked(); 2330 2331 /** 2332 * Search parameter: <b>enterer</b> 2333 * <p> 2334 * Description: <b>The source of the data entry</b><br> 2335 * Type: <b>reference</b><br> 2336 * Path: <b>MessageHeader.enterer</b><br> 2337 * </p> 2338 */ 2339 @SearchParamDefinition(name="enterer", path="MessageHeader.enterer", description="The source of the data entry", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class } ) 2340 public static final String SP_ENTERER = "enterer"; 2341 /** 2342 * <b>Fluent Client</b> search parameter constant for <b>enterer</b> 2343 * <p> 2344 * Description: <b>The source of the data entry</b><br> 2345 * Type: <b>reference</b><br> 2346 * Path: <b>MessageHeader.enterer</b><br> 2347 * </p> 2348 */ 2349 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTERER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENTERER); 2350 2351/** 2352 * Constant for fluent queries to be used to add include statements. Specifies 2353 * the path value of "<b>MessageHeader:enterer</b>". 2354 */ 2355 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTERER = new ca.uhn.fhir.model.api.Include("MessageHeader:enterer").toLocked(); 2356 2357 /** 2358 * Search parameter: <b>response-id</b> 2359 * <p> 2360 * Description: <b>Id of original message</b><br> 2361 * Type: <b>token</b><br> 2362 * Path: <b>MessageHeader.response.identifier</b><br> 2363 * </p> 2364 */ 2365 @SearchParamDefinition(name="response-id", path="MessageHeader.response.identifier", description="Id of original message", type="token" ) 2366 public static final String SP_RESPONSE_ID = "response-id"; 2367 /** 2368 * <b>Fluent Client</b> search parameter constant for <b>response-id</b> 2369 * <p> 2370 * Description: <b>Id of original message</b><br> 2371 * Type: <b>token</b><br> 2372 * Path: <b>MessageHeader.response.identifier</b><br> 2373 * </p> 2374 */ 2375 public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESPONSE_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESPONSE_ID); 2376 2377 /** 2378 * Search parameter: <b>event</b> 2379 * <p> 2380 * Description: <b>Code for the event this message represents</b><br> 2381 * Type: <b>token</b><br> 2382 * Path: <b>MessageHeader.event</b><br> 2383 * </p> 2384 */ 2385 @SearchParamDefinition(name="event", path="MessageHeader.event", description="Code for the event this message represents", type="token" ) 2386 public static final String SP_EVENT = "event"; 2387 /** 2388 * <b>Fluent Client</b> search parameter constant for <b>event</b> 2389 * <p> 2390 * Description: <b>Code for the event this message represents</b><br> 2391 * Type: <b>token</b><br> 2392 * Path: <b>MessageHeader.event</b><br> 2393 * </p> 2394 */ 2395 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EVENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EVENT); 2396 2397 /** 2398 * Search parameter: <b>timestamp</b> 2399 * <p> 2400 * Description: <b>Time that the message was sent</b><br> 2401 * Type: <b>date</b><br> 2402 * Path: <b>MessageHeader.timestamp</b><br> 2403 * </p> 2404 */ 2405 @SearchParamDefinition(name="timestamp", path="MessageHeader.timestamp", description="Time that the message was sent", type="date" ) 2406 public static final String SP_TIMESTAMP = "timestamp"; 2407 /** 2408 * <b>Fluent Client</b> search parameter constant for <b>timestamp</b> 2409 * <p> 2410 * Description: <b>Time that the message was sent</b><br> 2411 * Type: <b>date</b><br> 2412 * Path: <b>MessageHeader.timestamp</b><br> 2413 * </p> 2414 */ 2415 public static final ca.uhn.fhir.rest.gclient.DateClientParam TIMESTAMP = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_TIMESTAMP); 2416 2417 2418} 2419