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