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