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