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