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