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