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