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