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