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