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