001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import org.hl7.fhir.utilities.Utilities; 040import org.hl7.fhir.r4.model.Enumerations.*; 041import ca.uhn.fhir.model.api.annotation.ResourceDef; 042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 043import ca.uhn.fhir.model.api.annotation.Child; 044import ca.uhn.fhir.model.api.annotation.ChildOrder; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.Block; 047import org.hl7.fhir.instance.model.api.*; 048import org.hl7.fhir.exceptions.FHIRException; 049/** 050 * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted. 051 */ 052@ResourceDef(name="MessageDefinition", profile="http://hl7.org/fhir/StructureDefinition/MessageDefinition") 053@ChildOrder(names={"url", "identifier", "version", "name", "title", "replaces", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "base", "parent", "event[x]", "category", "focus", "responseRequired", "allowedResponse", "graph"}) 054public class MessageDefinition extends MetadataResource { 055 056 public enum MessageSignificanceCategory { 057 /** 058 * The message represents/requests a change that should not be processed more than once; e.g., making a booking for an appointment. 059 */ 060 CONSEQUENCE, 061 /** 062 * The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful. 063 */ 064 CURRENCY, 065 /** 066 * The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications. 067 */ 068 NOTIFICATION, 069 /** 070 * added to help the parsers with the generic types 071 */ 072 NULL; 073 public static MessageSignificanceCategory fromCode(String codeString) throws FHIRException { 074 if (codeString == null || "".equals(codeString)) 075 return null; 076 if ("consequence".equals(codeString)) 077 return CONSEQUENCE; 078 if ("currency".equals(codeString)) 079 return CURRENCY; 080 if ("notification".equals(codeString)) 081 return NOTIFICATION; 082 if (Configuration.isAcceptInvalidEnums()) 083 return null; 084 else 085 throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); 086 } 087 public String toCode() { 088 switch (this) { 089 case CONSEQUENCE: return "consequence"; 090 case CURRENCY: return "currency"; 091 case NOTIFICATION: return "notification"; 092 case NULL: return null; 093 default: return "?"; 094 } 095 } 096 public String getSystem() { 097 switch (this) { 098 case CONSEQUENCE: return "http://hl7.org/fhir/message-significance-category"; 099 case CURRENCY: return "http://hl7.org/fhir/message-significance-category"; 100 case NOTIFICATION: return "http://hl7.org/fhir/message-significance-category"; 101 case NULL: return null; 102 default: return "?"; 103 } 104 } 105 public String getDefinition() { 106 switch (this) { 107 case CONSEQUENCE: return "The message represents/requests a change that should not be processed more than once; e.g., making a booking for an appointment."; 108 case CURRENCY: return "The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful."; 109 case NOTIFICATION: return "The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications."; 110 case NULL: return null; 111 default: return "?"; 112 } 113 } 114 public String getDisplay() { 115 switch (this) { 116 case CONSEQUENCE: return "Consequence"; 117 case CURRENCY: return "Currency"; 118 case NOTIFICATION: return "Notification"; 119 case NULL: return null; 120 default: return "?"; 121 } 122 } 123 } 124 125 public static class MessageSignificanceCategoryEnumFactory implements EnumFactory<MessageSignificanceCategory> { 126 public MessageSignificanceCategory fromCode(String codeString) throws IllegalArgumentException { 127 if (codeString == null || "".equals(codeString)) 128 if (codeString == null || "".equals(codeString)) 129 return null; 130 if ("consequence".equals(codeString)) 131 return MessageSignificanceCategory.CONSEQUENCE; 132 if ("currency".equals(codeString)) 133 return MessageSignificanceCategory.CURRENCY; 134 if ("notification".equals(codeString)) 135 return MessageSignificanceCategory.NOTIFICATION; 136 throw new IllegalArgumentException("Unknown MessageSignificanceCategory code '"+codeString+"'"); 137 } 138 public Enumeration<MessageSignificanceCategory> fromType(Base code) throws FHIRException { 139 if (code == null) 140 return null; 141 if (code.isEmpty()) 142 return new Enumeration<MessageSignificanceCategory>(this); 143 String codeString = ((PrimitiveType) code).asStringValue(); 144 if (codeString == null || "".equals(codeString)) 145 return null; 146 if ("consequence".equals(codeString)) 147 return new Enumeration<MessageSignificanceCategory>(this, MessageSignificanceCategory.CONSEQUENCE); 148 if ("currency".equals(codeString)) 149 return new Enumeration<MessageSignificanceCategory>(this, MessageSignificanceCategory.CURRENCY); 150 if ("notification".equals(codeString)) 151 return new Enumeration<MessageSignificanceCategory>(this, MessageSignificanceCategory.NOTIFICATION); 152 throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); 153 } 154 public String toCode(MessageSignificanceCategory code) { 155 if (code == MessageSignificanceCategory.CONSEQUENCE) 156 return "consequence"; 157 if (code == MessageSignificanceCategory.CURRENCY) 158 return "currency"; 159 if (code == MessageSignificanceCategory.NOTIFICATION) 160 return "notification"; 161 return "?"; 162 } 163 public String toSystem(MessageSignificanceCategory code) { 164 return code.getSystem(); 165 } 166 } 167 168 public enum MessageheaderResponseRequest { 169 /** 170 * initiator expects a response for this message. 171 */ 172 ALWAYS, 173 /** 174 * initiator expects a response only if in error. 175 */ 176 ONERROR, 177 /** 178 * initiator does not expect a response. 179 */ 180 NEVER, 181 /** 182 * initiator expects a response only if successful. 183 */ 184 ONSUCCESS, 185 /** 186 * added to help the parsers with the generic types 187 */ 188 NULL; 189 public static MessageheaderResponseRequest fromCode(String codeString) throws FHIRException { 190 if (codeString == null || "".equals(codeString)) 191 return null; 192 if ("always".equals(codeString)) 193 return ALWAYS; 194 if ("on-error".equals(codeString)) 195 return ONERROR; 196 if ("never".equals(codeString)) 197 return NEVER; 198 if ("on-success".equals(codeString)) 199 return ONSUCCESS; 200 if (Configuration.isAcceptInvalidEnums()) 201 return null; 202 else 203 throw new FHIRException("Unknown MessageheaderResponseRequest code '"+codeString+"'"); 204 } 205 public String toCode() { 206 switch (this) { 207 case ALWAYS: return "always"; 208 case ONERROR: return "on-error"; 209 case NEVER: return "never"; 210 case ONSUCCESS: return "on-success"; 211 case NULL: return null; 212 default: return "?"; 213 } 214 } 215 public String getSystem() { 216 switch (this) { 217 case ALWAYS: return "http://hl7.org/fhir/messageheader-response-request"; 218 case ONERROR: return "http://hl7.org/fhir/messageheader-response-request"; 219 case NEVER: return "http://hl7.org/fhir/messageheader-response-request"; 220 case ONSUCCESS: return "http://hl7.org/fhir/messageheader-response-request"; 221 case NULL: return null; 222 default: return "?"; 223 } 224 } 225 public String getDefinition() { 226 switch (this) { 227 case ALWAYS: return "initiator expects a response for this message."; 228 case ONERROR: return "initiator expects a response only if in error."; 229 case NEVER: return "initiator does not expect a response."; 230 case ONSUCCESS: return "initiator expects a response only if successful."; 231 case NULL: return null; 232 default: return "?"; 233 } 234 } 235 public String getDisplay() { 236 switch (this) { 237 case ALWAYS: return "Always"; 238 case ONERROR: return "Error/reject conditions only"; 239 case NEVER: return "Never"; 240 case ONSUCCESS: return "Successful completion only"; 241 case NULL: return null; 242 default: return "?"; 243 } 244 } 245 } 246 247 public static class MessageheaderResponseRequestEnumFactory implements EnumFactory<MessageheaderResponseRequest> { 248 public MessageheaderResponseRequest fromCode(String codeString) throws IllegalArgumentException { 249 if (codeString == null || "".equals(codeString)) 250 if (codeString == null || "".equals(codeString)) 251 return null; 252 if ("always".equals(codeString)) 253 return MessageheaderResponseRequest.ALWAYS; 254 if ("on-error".equals(codeString)) 255 return MessageheaderResponseRequest.ONERROR; 256 if ("never".equals(codeString)) 257 return MessageheaderResponseRequest.NEVER; 258 if ("on-success".equals(codeString)) 259 return MessageheaderResponseRequest.ONSUCCESS; 260 throw new IllegalArgumentException("Unknown MessageheaderResponseRequest code '"+codeString+"'"); 261 } 262 public Enumeration<MessageheaderResponseRequest> fromType(Base code) throws FHIRException { 263 if (code == null) 264 return null; 265 if (code.isEmpty()) 266 return new Enumeration<MessageheaderResponseRequest>(this); 267 String codeString = ((PrimitiveType) code).asStringValue(); 268 if (codeString == null || "".equals(codeString)) 269 return null; 270 if ("always".equals(codeString)) 271 return new Enumeration<MessageheaderResponseRequest>(this, MessageheaderResponseRequest.ALWAYS); 272 if ("on-error".equals(codeString)) 273 return new Enumeration<MessageheaderResponseRequest>(this, MessageheaderResponseRequest.ONERROR); 274 if ("never".equals(codeString)) 275 return new Enumeration<MessageheaderResponseRequest>(this, MessageheaderResponseRequest.NEVER); 276 if ("on-success".equals(codeString)) 277 return new Enumeration<MessageheaderResponseRequest>(this, MessageheaderResponseRequest.ONSUCCESS); 278 throw new FHIRException("Unknown MessageheaderResponseRequest code '"+codeString+"'"); 279 } 280 public String toCode(MessageheaderResponseRequest code) { 281 if (code == MessageheaderResponseRequest.ALWAYS) 282 return "always"; 283 if (code == MessageheaderResponseRequest.ONERROR) 284 return "on-error"; 285 if (code == MessageheaderResponseRequest.NEVER) 286 return "never"; 287 if (code == MessageheaderResponseRequest.ONSUCCESS) 288 return "on-success"; 289 return "?"; 290 } 291 public String toSystem(MessageheaderResponseRequest code) { 292 return code.getSystem(); 293 } 294 } 295 296 @Block() 297 public static class MessageDefinitionFocusComponent extends BackboneElement implements IBaseBackboneElement { 298 /** 299 * The kind of resource that must be the focus for this message. 300 */ 301 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 302 @Description(shortDefinition="Type of resource", formalDefinition="The kind of resource that must be the focus for this message." ) 303 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types") 304 protected CodeType code; 305 306 /** 307 * A profile that reflects constraints for the focal resource (and potentially for related resources). 308 */ 309 @Child(name = "profile", type = {CanonicalType.class}, order=2, min=0, max=1, modifier=false, summary=false) 310 @Description(shortDefinition="Profile that must be adhered to by focus", formalDefinition="A profile that reflects constraints for the focal resource (and potentially for related resources)." ) 311 protected CanonicalType profile; 312 313 /** 314 * Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition. 315 */ 316 @Child(name = "min", type = {UnsignedIntType.class}, order=3, min=1, max=1, modifier=false, summary=true) 317 @Description(shortDefinition="Minimum number of focuses of this type", formalDefinition="Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition." ) 318 protected UnsignedIntType min; 319 320 /** 321 * Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition. 322 */ 323 @Child(name = "max", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 324 @Description(shortDefinition="Maximum number of focuses of this type", formalDefinition="Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition." ) 325 protected StringType max; 326 327 private static final long serialVersionUID = -68504836L; 328 329 /** 330 * Constructor 331 */ 332 public MessageDefinitionFocusComponent() { 333 super(); 334 } 335 336 /** 337 * Constructor 338 */ 339 public MessageDefinitionFocusComponent(CodeType code, UnsignedIntType min) { 340 super(); 341 this.code = code; 342 this.min = min; 343 } 344 345 /** 346 * @return {@link #code} (The kind of resource that must be the focus for this message.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 347 */ 348 public CodeType getCodeElement() { 349 if (this.code == null) 350 if (Configuration.errorOnAutoCreate()) 351 throw new Error("Attempt to auto-create MessageDefinitionFocusComponent.code"); 352 else if (Configuration.doAutoCreate()) 353 this.code = new CodeType(); // bb 354 return this.code; 355 } 356 357 public boolean hasCodeElement() { 358 return this.code != null && !this.code.isEmpty(); 359 } 360 361 public boolean hasCode() { 362 return this.code != null && !this.code.isEmpty(); 363 } 364 365 /** 366 * @param value {@link #code} (The kind of resource that must be the focus for this message.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 367 */ 368 public MessageDefinitionFocusComponent setCodeElement(CodeType value) { 369 this.code = value; 370 return this; 371 } 372 373 /** 374 * @return The kind of resource that must be the focus for this message. 375 */ 376 public String getCode() { 377 return this.code == null ? null : this.code.getValue(); 378 } 379 380 /** 381 * @param value The kind of resource that must be the focus for this message. 382 */ 383 public MessageDefinitionFocusComponent setCode(String value) { 384 if (this.code == null) 385 this.code = new CodeType(); 386 this.code.setValue(value); 387 return this; 388 } 389 390 /** 391 * @return {@link #profile} (A profile that reflects constraints for the focal resource (and potentially for related resources).). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value 392 */ 393 public CanonicalType getProfileElement() { 394 if (this.profile == null) 395 if (Configuration.errorOnAutoCreate()) 396 throw new Error("Attempt to auto-create MessageDefinitionFocusComponent.profile"); 397 else if (Configuration.doAutoCreate()) 398 this.profile = new CanonicalType(); // bb 399 return this.profile; 400 } 401 402 public boolean hasProfileElement() { 403 return this.profile != null && !this.profile.isEmpty(); 404 } 405 406 public boolean hasProfile() { 407 return this.profile != null && !this.profile.isEmpty(); 408 } 409 410 /** 411 * @param value {@link #profile} (A profile that reflects constraints for the focal resource (and potentially for related resources).). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value 412 */ 413 public MessageDefinitionFocusComponent setProfileElement(CanonicalType value) { 414 this.profile = value; 415 return this; 416 } 417 418 /** 419 * @return A profile that reflects constraints for the focal resource (and potentially for related resources). 420 */ 421 public String getProfile() { 422 return this.profile == null ? null : this.profile.getValue(); 423 } 424 425 /** 426 * @param value A profile that reflects constraints for the focal resource (and potentially for related resources). 427 */ 428 public MessageDefinitionFocusComponent setProfile(String value) { 429 if (Utilities.noString(value)) 430 this.profile = null; 431 else { 432 if (this.profile == null) 433 this.profile = new CanonicalType(); 434 this.profile.setValue(value); 435 } 436 return this; 437 } 438 439 /** 440 * @return {@link #min} (Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value 441 */ 442 public UnsignedIntType getMinElement() { 443 if (this.min == null) 444 if (Configuration.errorOnAutoCreate()) 445 throw new Error("Attempt to auto-create MessageDefinitionFocusComponent.min"); 446 else if (Configuration.doAutoCreate()) 447 this.min = new UnsignedIntType(); // bb 448 return this.min; 449 } 450 451 public boolean hasMinElement() { 452 return this.min != null && !this.min.isEmpty(); 453 } 454 455 public boolean hasMin() { 456 return this.min != null && !this.min.isEmpty(); 457 } 458 459 /** 460 * @param value {@link #min} (Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value 461 */ 462 public MessageDefinitionFocusComponent setMinElement(UnsignedIntType value) { 463 this.min = value; 464 return this; 465 } 466 467 /** 468 * @return Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition. 469 */ 470 public int getMin() { 471 return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); 472 } 473 474 /** 475 * @param value Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition. 476 */ 477 public MessageDefinitionFocusComponent setMin(int value) { 478 if (this.min == null) 479 this.min = new UnsignedIntType(); 480 this.min.setValue(value); 481 return this; 482 } 483 484 /** 485 * @return {@link #max} (Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value 486 */ 487 public StringType getMaxElement() { 488 if (this.max == null) 489 if (Configuration.errorOnAutoCreate()) 490 throw new Error("Attempt to auto-create MessageDefinitionFocusComponent.max"); 491 else if (Configuration.doAutoCreate()) 492 this.max = new StringType(); // bb 493 return this.max; 494 } 495 496 public boolean hasMaxElement() { 497 return this.max != null && !this.max.isEmpty(); 498 } 499 500 public boolean hasMax() { 501 return this.max != null && !this.max.isEmpty(); 502 } 503 504 /** 505 * @param value {@link #max} (Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value 506 */ 507 public MessageDefinitionFocusComponent setMaxElement(StringType value) { 508 this.max = value; 509 return this; 510 } 511 512 /** 513 * @return Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition. 514 */ 515 public String getMax() { 516 return this.max == null ? null : this.max.getValue(); 517 } 518 519 /** 520 * @param value Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition. 521 */ 522 public MessageDefinitionFocusComponent setMax(String value) { 523 if (Utilities.noString(value)) 524 this.max = null; 525 else { 526 if (this.max == null) 527 this.max = new StringType(); 528 this.max.setValue(value); 529 } 530 return this; 531 } 532 533 protected void listChildren(List<Property> children) { 534 super.listChildren(children); 535 children.add(new Property("code", "code", "The kind of resource that must be the focus for this message.", 0, 1, code)); 536 children.add(new Property("profile", "canonical(StructureDefinition)", "A profile that reflects constraints for the focal resource (and potentially for related resources).", 0, 1, profile)); 537 children.add(new Property("min", "unsignedInt", "Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.", 0, 1, min)); 538 children.add(new Property("max", "string", "Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.", 0, 1, max)); 539 } 540 541 @Override 542 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 543 switch (_hash) { 544 case 3059181: /*code*/ return new Property("code", "code", "The kind of resource that must be the focus for this message.", 0, 1, code); 545 case -309425751: /*profile*/ return new Property("profile", "canonical(StructureDefinition)", "A profile that reflects constraints for the focal resource (and potentially for related resources).", 0, 1, profile); 546 case 108114: /*min*/ return new Property("min", "unsignedInt", "Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.", 0, 1, min); 547 case 107876: /*max*/ return new Property("max", "string", "Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.", 0, 1, max); 548 default: return super.getNamedProperty(_hash, _name, _checkValid); 549 } 550 551 } 552 553 @Override 554 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 555 switch (hash) { 556 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType 557 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // CanonicalType 558 case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // UnsignedIntType 559 case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType 560 default: return super.getProperty(hash, name, checkValid); 561 } 562 563 } 564 565 @Override 566 public Base setProperty(int hash, String name, Base value) throws FHIRException { 567 switch (hash) { 568 case 3059181: // code 569 this.code = castToCode(value); // CodeType 570 return value; 571 case -309425751: // profile 572 this.profile = castToCanonical(value); // CanonicalType 573 return value; 574 case 108114: // min 575 this.min = castToUnsignedInt(value); // UnsignedIntType 576 return value; 577 case 107876: // max 578 this.max = castToString(value); // StringType 579 return value; 580 default: return super.setProperty(hash, name, value); 581 } 582 583 } 584 585 @Override 586 public Base setProperty(String name, Base value) throws FHIRException { 587 if (name.equals("code")) { 588 this.code = castToCode(value); // CodeType 589 } else if (name.equals("profile")) { 590 this.profile = castToCanonical(value); // CanonicalType 591 } else if (name.equals("min")) { 592 this.min = castToUnsignedInt(value); // UnsignedIntType 593 } else if (name.equals("max")) { 594 this.max = castToString(value); // StringType 595 } else 596 return super.setProperty(name, value); 597 return value; 598 } 599 600 @Override 601 public Base makeProperty(int hash, String name) throws FHIRException { 602 switch (hash) { 603 case 3059181: return getCodeElement(); 604 case -309425751: return getProfileElement(); 605 case 108114: return getMinElement(); 606 case 107876: return getMaxElement(); 607 default: return super.makeProperty(hash, name); 608 } 609 610 } 611 612 @Override 613 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 614 switch (hash) { 615 case 3059181: /*code*/ return new String[] {"code"}; 616 case -309425751: /*profile*/ return new String[] {"canonical"}; 617 case 108114: /*min*/ return new String[] {"unsignedInt"}; 618 case 107876: /*max*/ return new String[] {"string"}; 619 default: return super.getTypesForProperty(hash, name); 620 } 621 622 } 623 624 @Override 625 public Base addChild(String name) throws FHIRException { 626 if (name.equals("code")) { 627 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.code"); 628 } 629 else if (name.equals("profile")) { 630 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.profile"); 631 } 632 else if (name.equals("min")) { 633 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.min"); 634 } 635 else if (name.equals("max")) { 636 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.max"); 637 } 638 else 639 return super.addChild(name); 640 } 641 642 public MessageDefinitionFocusComponent copy() { 643 MessageDefinitionFocusComponent dst = new MessageDefinitionFocusComponent(); 644 copyValues(dst); 645 return dst; 646 } 647 648 public void copyValues(MessageDefinitionFocusComponent dst) { 649 super.copyValues(dst); 650 dst.code = code == null ? null : code.copy(); 651 dst.profile = profile == null ? null : profile.copy(); 652 dst.min = min == null ? null : min.copy(); 653 dst.max = max == null ? null : max.copy(); 654 } 655 656 @Override 657 public boolean equalsDeep(Base other_) { 658 if (!super.equalsDeep(other_)) 659 return false; 660 if (!(other_ instanceof MessageDefinitionFocusComponent)) 661 return false; 662 MessageDefinitionFocusComponent o = (MessageDefinitionFocusComponent) other_; 663 return compareDeep(code, o.code, true) && compareDeep(profile, o.profile, true) && compareDeep(min, o.min, true) 664 && compareDeep(max, o.max, true); 665 } 666 667 @Override 668 public boolean equalsShallow(Base other_) { 669 if (!super.equalsShallow(other_)) 670 return false; 671 if (!(other_ instanceof MessageDefinitionFocusComponent)) 672 return false; 673 MessageDefinitionFocusComponent o = (MessageDefinitionFocusComponent) other_; 674 return compareValues(code, o.code, true) && compareValues(min, o.min, true) && compareValues(max, o.max, true) 675 ; 676 } 677 678 public boolean isEmpty() { 679 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, profile, min, max 680 ); 681 } 682 683 public String fhirType() { 684 return "MessageDefinition.focus"; 685 686 } 687 688 } 689 690 @Block() 691 public static class MessageDefinitionAllowedResponseComponent extends BackboneElement implements IBaseBackboneElement { 692 /** 693 * A reference to the message definition that must be adhered to by this supported response. 694 */ 695 @Child(name = "message", type = {CanonicalType.class}, order=1, min=1, max=1, modifier=false, summary=false) 696 @Description(shortDefinition="Reference to allowed message definition response", formalDefinition="A reference to the message definition that must be adhered to by this supported response." ) 697 protected CanonicalType message; 698 699 /** 700 * Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses). 701 */ 702 @Child(name = "situation", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 703 @Description(shortDefinition="When should this response be used", formalDefinition="Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses)." ) 704 protected MarkdownType situation; 705 706 private static final long serialVersionUID = -1943810550L; 707 708 /** 709 * Constructor 710 */ 711 public MessageDefinitionAllowedResponseComponent() { 712 super(); 713 } 714 715 /** 716 * Constructor 717 */ 718 public MessageDefinitionAllowedResponseComponent(CanonicalType message) { 719 super(); 720 this.message = message; 721 } 722 723 /** 724 * @return {@link #message} (A reference to the message definition that must be adhered to by this supported response.). This is the underlying object with id, value and extensions. The accessor "getMessage" gives direct access to the value 725 */ 726 public CanonicalType getMessageElement() { 727 if (this.message == null) 728 if (Configuration.errorOnAutoCreate()) 729 throw new Error("Attempt to auto-create MessageDefinitionAllowedResponseComponent.message"); 730 else if (Configuration.doAutoCreate()) 731 this.message = new CanonicalType(); // bb 732 return this.message; 733 } 734 735 public boolean hasMessageElement() { 736 return this.message != null && !this.message.isEmpty(); 737 } 738 739 public boolean hasMessage() { 740 return this.message != null && !this.message.isEmpty(); 741 } 742 743 /** 744 * @param value {@link #message} (A reference to the message definition that must be adhered to by this supported response.). This is the underlying object with id, value and extensions. The accessor "getMessage" gives direct access to the value 745 */ 746 public MessageDefinitionAllowedResponseComponent setMessageElement(CanonicalType value) { 747 this.message = value; 748 return this; 749 } 750 751 /** 752 * @return A reference to the message definition that must be adhered to by this supported response. 753 */ 754 public String getMessage() { 755 return this.message == null ? null : this.message.getValue(); 756 } 757 758 /** 759 * @param value A reference to the message definition that must be adhered to by this supported response. 760 */ 761 public MessageDefinitionAllowedResponseComponent setMessage(String value) { 762 if (this.message == null) 763 this.message = new CanonicalType(); 764 this.message.setValue(value); 765 return this; 766 } 767 768 /** 769 * @return {@link #situation} (Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).). This is the underlying object with id, value and extensions. The accessor "getSituation" gives direct access to the value 770 */ 771 public MarkdownType getSituationElement() { 772 if (this.situation == null) 773 if (Configuration.errorOnAutoCreate()) 774 throw new Error("Attempt to auto-create MessageDefinitionAllowedResponseComponent.situation"); 775 else if (Configuration.doAutoCreate()) 776 this.situation = new MarkdownType(); // bb 777 return this.situation; 778 } 779 780 public boolean hasSituationElement() { 781 return this.situation != null && !this.situation.isEmpty(); 782 } 783 784 public boolean hasSituation() { 785 return this.situation != null && !this.situation.isEmpty(); 786 } 787 788 /** 789 * @param value {@link #situation} (Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).). This is the underlying object with id, value and extensions. The accessor "getSituation" gives direct access to the value 790 */ 791 public MessageDefinitionAllowedResponseComponent setSituationElement(MarkdownType value) { 792 this.situation = value; 793 return this; 794 } 795 796 /** 797 * @return Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses). 798 */ 799 public String getSituation() { 800 return this.situation == null ? null : this.situation.getValue(); 801 } 802 803 /** 804 * @param value Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses). 805 */ 806 public MessageDefinitionAllowedResponseComponent setSituation(String value) { 807 if (value == null) 808 this.situation = null; 809 else { 810 if (this.situation == null) 811 this.situation = new MarkdownType(); 812 this.situation.setValue(value); 813 } 814 return this; 815 } 816 817 protected void listChildren(List<Property> children) { 818 super.listChildren(children); 819 children.add(new Property("message", "canonical(MessageDefinition)", "A reference to the message definition that must be adhered to by this supported response.", 0, 1, message)); 820 children.add(new Property("situation", "markdown", "Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).", 0, 1, situation)); 821 } 822 823 @Override 824 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 825 switch (_hash) { 826 case 954925063: /*message*/ return new Property("message", "canonical(MessageDefinition)", "A reference to the message definition that must be adhered to by this supported response.", 0, 1, message); 827 case -73377282: /*situation*/ return new Property("situation", "markdown", "Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).", 0, 1, situation); 828 default: return super.getNamedProperty(_hash, _name, _checkValid); 829 } 830 831 } 832 833 @Override 834 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 835 switch (hash) { 836 case 954925063: /*message*/ return this.message == null ? new Base[0] : new Base[] {this.message}; // CanonicalType 837 case -73377282: /*situation*/ return this.situation == null ? new Base[0] : new Base[] {this.situation}; // MarkdownType 838 default: return super.getProperty(hash, name, checkValid); 839 } 840 841 } 842 843 @Override 844 public Base setProperty(int hash, String name, Base value) throws FHIRException { 845 switch (hash) { 846 case 954925063: // message 847 this.message = castToCanonical(value); // CanonicalType 848 return value; 849 case -73377282: // situation 850 this.situation = castToMarkdown(value); // MarkdownType 851 return value; 852 default: return super.setProperty(hash, name, value); 853 } 854 855 } 856 857 @Override 858 public Base setProperty(String name, Base value) throws FHIRException { 859 if (name.equals("message")) { 860 this.message = castToCanonical(value); // CanonicalType 861 } else if (name.equals("situation")) { 862 this.situation = castToMarkdown(value); // MarkdownType 863 } else 864 return super.setProperty(name, value); 865 return value; 866 } 867 868 @Override 869 public Base makeProperty(int hash, String name) throws FHIRException { 870 switch (hash) { 871 case 954925063: return getMessageElement(); 872 case -73377282: return getSituationElement(); 873 default: return super.makeProperty(hash, name); 874 } 875 876 } 877 878 @Override 879 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 880 switch (hash) { 881 case 954925063: /*message*/ return new String[] {"canonical"}; 882 case -73377282: /*situation*/ return new String[] {"markdown"}; 883 default: return super.getTypesForProperty(hash, name); 884 } 885 886 } 887 888 @Override 889 public Base addChild(String name) throws FHIRException { 890 if (name.equals("message")) { 891 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.message"); 892 } 893 else if (name.equals("situation")) { 894 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.situation"); 895 } 896 else 897 return super.addChild(name); 898 } 899 900 public MessageDefinitionAllowedResponseComponent copy() { 901 MessageDefinitionAllowedResponseComponent dst = new MessageDefinitionAllowedResponseComponent(); 902 copyValues(dst); 903 return dst; 904 } 905 906 public void copyValues(MessageDefinitionAllowedResponseComponent dst) { 907 super.copyValues(dst); 908 dst.message = message == null ? null : message.copy(); 909 dst.situation = situation == null ? null : situation.copy(); 910 } 911 912 @Override 913 public boolean equalsDeep(Base other_) { 914 if (!super.equalsDeep(other_)) 915 return false; 916 if (!(other_ instanceof MessageDefinitionAllowedResponseComponent)) 917 return false; 918 MessageDefinitionAllowedResponseComponent o = (MessageDefinitionAllowedResponseComponent) other_; 919 return compareDeep(message, o.message, true) && compareDeep(situation, o.situation, true); 920 } 921 922 @Override 923 public boolean equalsShallow(Base other_) { 924 if (!super.equalsShallow(other_)) 925 return false; 926 if (!(other_ instanceof MessageDefinitionAllowedResponseComponent)) 927 return false; 928 MessageDefinitionAllowedResponseComponent o = (MessageDefinitionAllowedResponseComponent) other_; 929 return compareValues(situation, o.situation, true); 930 } 931 932 public boolean isEmpty() { 933 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(message, situation); 934 } 935 936 public String fhirType() { 937 return "MessageDefinition.allowedResponse"; 938 939 } 940 941 } 942 943 /** 944 * A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance. 945 */ 946 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 947 @Description(shortDefinition="Primary key for the message definition on a given server", formalDefinition="A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 948 protected List<Identifier> identifier; 949 950 /** 951 * A MessageDefinition that is superseded by this definition. 952 */ 953 @Child(name = "replaces", type = {CanonicalType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 954 @Description(shortDefinition="Takes the place of", formalDefinition="A MessageDefinition that is superseded by this definition." ) 955 protected List<CanonicalType> replaces; 956 957 /** 958 * Explanation of why this message definition is needed and why it has been designed as it has. 959 */ 960 @Child(name = "purpose", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=true) 961 @Description(shortDefinition="Why this message definition is defined", formalDefinition="Explanation of why this message definition is needed and why it has been designed as it has." ) 962 protected MarkdownType purpose; 963 964 /** 965 * A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition. 966 */ 967 @Child(name = "copyright", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=false) 968 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition." ) 969 protected MarkdownType copyright; 970 971 /** 972 * The MessageDefinition that is the basis for the contents of this resource. 973 */ 974 @Child(name = "base", type = {CanonicalType.class}, order=4, min=0, max=1, modifier=false, summary=true) 975 @Description(shortDefinition="Definition this one is based on", formalDefinition="The MessageDefinition that is the basis for the contents of this resource." ) 976 protected CanonicalType base; 977 978 /** 979 * Identifies a protocol or workflow that this MessageDefinition represents a step in. 980 */ 981 @Child(name = "parent", type = {CanonicalType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 982 @Description(shortDefinition="Protocol/workflow this is part of", formalDefinition="Identifies a protocol or workflow that this MessageDefinition represents a step in." ) 983 protected List<CanonicalType> parent; 984 985 /** 986 * Event code or link to the EventDefinition. 987 */ 988 @Child(name = "event", type = {Coding.class, UriType.class}, order=6, min=1, max=1, modifier=false, summary=true) 989 @Description(shortDefinition="Event code or link to the EventDefinition", formalDefinition="Event code or link to the EventDefinition." ) 990 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/message-events") 991 protected Type event; 992 993 /** 994 * The impact of the content of the message. 995 */ 996 @Child(name = "category", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=true) 997 @Description(shortDefinition="consequence | currency | notification", formalDefinition="The impact of the content of the message." ) 998 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/message-significance-category") 999 protected Enumeration<MessageSignificanceCategory> category; 1000 1001 /** 1002 * Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge. 1003 */ 1004 @Child(name = "focus", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1005 @Description(shortDefinition="Resource(s) that are the subject of the event", formalDefinition="Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge." ) 1006 protected List<MessageDefinitionFocusComponent> focus; 1007 1008 /** 1009 * Declare at a message definition level whether a response is required or only upon error or success, or never. 1010 */ 1011 @Child(name = "responseRequired", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=false) 1012 @Description(shortDefinition="always | on-error | never | on-success", formalDefinition="Declare at a message definition level whether a response is required or only upon error or success, or never." ) 1013 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/messageheader-response-request") 1014 protected Enumeration<MessageheaderResponseRequest> responseRequired; 1015 1016 /** 1017 * Indicates what types of messages may be sent as an application-level response to this message. 1018 */ 1019 @Child(name = "allowedResponse", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1020 @Description(shortDefinition="Responses to this message", formalDefinition="Indicates what types of messages may be sent as an application-level response to this message." ) 1021 protected List<MessageDefinitionAllowedResponseComponent> allowedResponse; 1022 1023 /** 1024 * Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources. 1025 */ 1026 @Child(name = "graph", type = {CanonicalType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1027 @Description(shortDefinition="Canonical reference to a GraphDefinition", formalDefinition="Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources." ) 1028 protected List<CanonicalType> graph; 1029 1030 private static final long serialVersionUID = 927775347L; 1031 1032 /** 1033 * Constructor 1034 */ 1035 public MessageDefinition() { 1036 super(); 1037 } 1038 1039 /** 1040 * Constructor 1041 */ 1042 public MessageDefinition(Enumeration<PublicationStatus> status, DateTimeType date, Type event) { 1043 super(); 1044 this.status = status; 1045 this.date = date; 1046 this.event = event; 1047 } 1048 1049 /** 1050 * @return {@link #url} (The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1051 */ 1052 public UriType getUrlElement() { 1053 if (this.url == null) 1054 if (Configuration.errorOnAutoCreate()) 1055 throw new Error("Attempt to auto-create MessageDefinition.url"); 1056 else if (Configuration.doAutoCreate()) 1057 this.url = new UriType(); // bb 1058 return this.url; 1059 } 1060 1061 public boolean hasUrlElement() { 1062 return this.url != null && !this.url.isEmpty(); 1063 } 1064 1065 public boolean hasUrl() { 1066 return this.url != null && !this.url.isEmpty(); 1067 } 1068 1069 /** 1070 * @param value {@link #url} (The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1071 */ 1072 public MessageDefinition setUrlElement(UriType value) { 1073 this.url = value; 1074 return this; 1075 } 1076 1077 /** 1078 * @return The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server. 1079 */ 1080 public String getUrl() { 1081 return this.url == null ? null : this.url.getValue(); 1082 } 1083 1084 /** 1085 * @param value The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server. 1086 */ 1087 public MessageDefinition setUrl(String value) { 1088 if (Utilities.noString(value)) 1089 this.url = null; 1090 else { 1091 if (this.url == null) 1092 this.url = new UriType(); 1093 this.url.setValue(value); 1094 } 1095 return this; 1096 } 1097 1098 /** 1099 * @return {@link #identifier} (A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.) 1100 */ 1101 public List<Identifier> getIdentifier() { 1102 if (this.identifier == null) 1103 this.identifier = new ArrayList<Identifier>(); 1104 return this.identifier; 1105 } 1106 1107 /** 1108 * @return Returns a reference to <code>this</code> for easy method chaining 1109 */ 1110 public MessageDefinition setIdentifier(List<Identifier> theIdentifier) { 1111 this.identifier = theIdentifier; 1112 return this; 1113 } 1114 1115 public boolean hasIdentifier() { 1116 if (this.identifier == null) 1117 return false; 1118 for (Identifier item : this.identifier) 1119 if (!item.isEmpty()) 1120 return true; 1121 return false; 1122 } 1123 1124 public Identifier addIdentifier() { //3 1125 Identifier t = new Identifier(); 1126 if (this.identifier == null) 1127 this.identifier = new ArrayList<Identifier>(); 1128 this.identifier.add(t); 1129 return t; 1130 } 1131 1132 public MessageDefinition addIdentifier(Identifier t) { //3 1133 if (t == null) 1134 return this; 1135 if (this.identifier == null) 1136 this.identifier = new ArrayList<Identifier>(); 1137 this.identifier.add(t); 1138 return this; 1139 } 1140 1141 /** 1142 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1143 */ 1144 public Identifier getIdentifierFirstRep() { 1145 if (getIdentifier().isEmpty()) { 1146 addIdentifier(); 1147 } 1148 return getIdentifier().get(0); 1149 } 1150 1151 /** 1152 * @return {@link #version} (The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 1153 */ 1154 public StringType getVersionElement() { 1155 if (this.version == null) 1156 if (Configuration.errorOnAutoCreate()) 1157 throw new Error("Attempt to auto-create MessageDefinition.version"); 1158 else if (Configuration.doAutoCreate()) 1159 this.version = new StringType(); // bb 1160 return this.version; 1161 } 1162 1163 public boolean hasVersionElement() { 1164 return this.version != null && !this.version.isEmpty(); 1165 } 1166 1167 public boolean hasVersion() { 1168 return this.version != null && !this.version.isEmpty(); 1169 } 1170 1171 /** 1172 * @param value {@link #version} (The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 1173 */ 1174 public MessageDefinition setVersionElement(StringType value) { 1175 this.version = value; 1176 return this; 1177 } 1178 1179 /** 1180 * @return The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 1181 */ 1182 public String getVersion() { 1183 return this.version == null ? null : this.version.getValue(); 1184 } 1185 1186 /** 1187 * @param value The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 1188 */ 1189 public MessageDefinition setVersion(String value) { 1190 if (Utilities.noString(value)) 1191 this.version = null; 1192 else { 1193 if (this.version == null) 1194 this.version = new StringType(); 1195 this.version.setValue(value); 1196 } 1197 return this; 1198 } 1199 1200 /** 1201 * @return {@link #name} (A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1202 */ 1203 public StringType getNameElement() { 1204 if (this.name == null) 1205 if (Configuration.errorOnAutoCreate()) 1206 throw new Error("Attempt to auto-create MessageDefinition.name"); 1207 else if (Configuration.doAutoCreate()) 1208 this.name = new StringType(); // bb 1209 return this.name; 1210 } 1211 1212 public boolean hasNameElement() { 1213 return this.name != null && !this.name.isEmpty(); 1214 } 1215 1216 public boolean hasName() { 1217 return this.name != null && !this.name.isEmpty(); 1218 } 1219 1220 /** 1221 * @param value {@link #name} (A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1222 */ 1223 public MessageDefinition setNameElement(StringType value) { 1224 this.name = value; 1225 return this; 1226 } 1227 1228 /** 1229 * @return A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation. 1230 */ 1231 public String getName() { 1232 return this.name == null ? null : this.name.getValue(); 1233 } 1234 1235 /** 1236 * @param value A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation. 1237 */ 1238 public MessageDefinition setName(String value) { 1239 if (Utilities.noString(value)) 1240 this.name = null; 1241 else { 1242 if (this.name == null) 1243 this.name = new StringType(); 1244 this.name.setValue(value); 1245 } 1246 return this; 1247 } 1248 1249 /** 1250 * @return {@link #title} (A short, descriptive, user-friendly title for the message definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1251 */ 1252 public StringType getTitleElement() { 1253 if (this.title == null) 1254 if (Configuration.errorOnAutoCreate()) 1255 throw new Error("Attempt to auto-create MessageDefinition.title"); 1256 else if (Configuration.doAutoCreate()) 1257 this.title = new StringType(); // bb 1258 return this.title; 1259 } 1260 1261 public boolean hasTitleElement() { 1262 return this.title != null && !this.title.isEmpty(); 1263 } 1264 1265 public boolean hasTitle() { 1266 return this.title != null && !this.title.isEmpty(); 1267 } 1268 1269 /** 1270 * @param value {@link #title} (A short, descriptive, user-friendly title for the message definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1271 */ 1272 public MessageDefinition setTitleElement(StringType value) { 1273 this.title = value; 1274 return this; 1275 } 1276 1277 /** 1278 * @return A short, descriptive, user-friendly title for the message definition. 1279 */ 1280 public String getTitle() { 1281 return this.title == null ? null : this.title.getValue(); 1282 } 1283 1284 /** 1285 * @param value A short, descriptive, user-friendly title for the message definition. 1286 */ 1287 public MessageDefinition setTitle(String value) { 1288 if (Utilities.noString(value)) 1289 this.title = null; 1290 else { 1291 if (this.title == null) 1292 this.title = new StringType(); 1293 this.title.setValue(value); 1294 } 1295 return this; 1296 } 1297 1298 /** 1299 * @return {@link #replaces} (A MessageDefinition that is superseded by this definition.) 1300 */ 1301 public List<CanonicalType> getReplaces() { 1302 if (this.replaces == null) 1303 this.replaces = new ArrayList<CanonicalType>(); 1304 return this.replaces; 1305 } 1306 1307 /** 1308 * @return Returns a reference to <code>this</code> for easy method chaining 1309 */ 1310 public MessageDefinition setReplaces(List<CanonicalType> theReplaces) { 1311 this.replaces = theReplaces; 1312 return this; 1313 } 1314 1315 public boolean hasReplaces() { 1316 if (this.replaces == null) 1317 return false; 1318 for (CanonicalType item : this.replaces) 1319 if (!item.isEmpty()) 1320 return true; 1321 return false; 1322 } 1323 1324 /** 1325 * @return {@link #replaces} (A MessageDefinition that is superseded by this definition.) 1326 */ 1327 public CanonicalType addReplacesElement() {//2 1328 CanonicalType t = new CanonicalType(); 1329 if (this.replaces == null) 1330 this.replaces = new ArrayList<CanonicalType>(); 1331 this.replaces.add(t); 1332 return t; 1333 } 1334 1335 /** 1336 * @param value {@link #replaces} (A MessageDefinition that is superseded by this definition.) 1337 */ 1338 public MessageDefinition addReplaces(String value) { //1 1339 CanonicalType t = new CanonicalType(); 1340 t.setValue(value); 1341 if (this.replaces == null) 1342 this.replaces = new ArrayList<CanonicalType>(); 1343 this.replaces.add(t); 1344 return this; 1345 } 1346 1347 /** 1348 * @param value {@link #replaces} (A MessageDefinition that is superseded by this definition.) 1349 */ 1350 public boolean hasReplaces(String value) { 1351 if (this.replaces == null) 1352 return false; 1353 for (CanonicalType v : this.replaces) 1354 if (v.getValue().equals(value)) // canonical(MessageDefinition) 1355 return true; 1356 return false; 1357 } 1358 1359 /** 1360 * @return {@link #status} (The status of this message definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1361 */ 1362 public Enumeration<PublicationStatus> getStatusElement() { 1363 if (this.status == null) 1364 if (Configuration.errorOnAutoCreate()) 1365 throw new Error("Attempt to auto-create MessageDefinition.status"); 1366 else if (Configuration.doAutoCreate()) 1367 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 1368 return this.status; 1369 } 1370 1371 public boolean hasStatusElement() { 1372 return this.status != null && !this.status.isEmpty(); 1373 } 1374 1375 public boolean hasStatus() { 1376 return this.status != null && !this.status.isEmpty(); 1377 } 1378 1379 /** 1380 * @param value {@link #status} (The status of this message definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1381 */ 1382 public MessageDefinition setStatusElement(Enumeration<PublicationStatus> value) { 1383 this.status = value; 1384 return this; 1385 } 1386 1387 /** 1388 * @return The status of this message definition. Enables tracking the life-cycle of the content. 1389 */ 1390 public PublicationStatus getStatus() { 1391 return this.status == null ? null : this.status.getValue(); 1392 } 1393 1394 /** 1395 * @param value The status of this message definition. Enables tracking the life-cycle of the content. 1396 */ 1397 public MessageDefinition setStatus(PublicationStatus value) { 1398 if (this.status == null) 1399 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 1400 this.status.setValue(value); 1401 return this; 1402 } 1403 1404 /** 1405 * @return {@link #experimental} (A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 1406 */ 1407 public BooleanType getExperimentalElement() { 1408 if (this.experimental == null) 1409 if (Configuration.errorOnAutoCreate()) 1410 throw new Error("Attempt to auto-create MessageDefinition.experimental"); 1411 else if (Configuration.doAutoCreate()) 1412 this.experimental = new BooleanType(); // bb 1413 return this.experimental; 1414 } 1415 1416 public boolean hasExperimentalElement() { 1417 return this.experimental != null && !this.experimental.isEmpty(); 1418 } 1419 1420 public boolean hasExperimental() { 1421 return this.experimental != null && !this.experimental.isEmpty(); 1422 } 1423 1424 /** 1425 * @param value {@link #experimental} (A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 1426 */ 1427 public MessageDefinition setExperimentalElement(BooleanType value) { 1428 this.experimental = value; 1429 return this; 1430 } 1431 1432 /** 1433 * @return A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 1434 */ 1435 public boolean getExperimental() { 1436 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 1437 } 1438 1439 /** 1440 * @param value A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 1441 */ 1442 public MessageDefinition setExperimental(boolean value) { 1443 if (this.experimental == null) 1444 this.experimental = new BooleanType(); 1445 this.experimental.setValue(value); 1446 return this; 1447 } 1448 1449 /** 1450 * @return {@link #date} (The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1451 */ 1452 public DateTimeType getDateElement() { 1453 if (this.date == null) 1454 if (Configuration.errorOnAutoCreate()) 1455 throw new Error("Attempt to auto-create MessageDefinition.date"); 1456 else if (Configuration.doAutoCreate()) 1457 this.date = new DateTimeType(); // bb 1458 return this.date; 1459 } 1460 1461 public boolean hasDateElement() { 1462 return this.date != null && !this.date.isEmpty(); 1463 } 1464 1465 public boolean hasDate() { 1466 return this.date != null && !this.date.isEmpty(); 1467 } 1468 1469 /** 1470 * @param value {@link #date} (The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1471 */ 1472 public MessageDefinition setDateElement(DateTimeType value) { 1473 this.date = value; 1474 return this; 1475 } 1476 1477 /** 1478 * @return The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes. 1479 */ 1480 public Date getDate() { 1481 return this.date == null ? null : this.date.getValue(); 1482 } 1483 1484 /** 1485 * @param value The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes. 1486 */ 1487 public MessageDefinition setDate(Date value) { 1488 if (this.date == null) 1489 this.date = new DateTimeType(); 1490 this.date.setValue(value); 1491 return this; 1492 } 1493 1494 /** 1495 * @return {@link #publisher} (The name of the organization or individual that published the message definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 1496 */ 1497 public StringType getPublisherElement() { 1498 if (this.publisher == null) 1499 if (Configuration.errorOnAutoCreate()) 1500 throw new Error("Attempt to auto-create MessageDefinition.publisher"); 1501 else if (Configuration.doAutoCreate()) 1502 this.publisher = new StringType(); // bb 1503 return this.publisher; 1504 } 1505 1506 public boolean hasPublisherElement() { 1507 return this.publisher != null && !this.publisher.isEmpty(); 1508 } 1509 1510 public boolean hasPublisher() { 1511 return this.publisher != null && !this.publisher.isEmpty(); 1512 } 1513 1514 /** 1515 * @param value {@link #publisher} (The name of the organization or individual that published the message definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 1516 */ 1517 public MessageDefinition setPublisherElement(StringType value) { 1518 this.publisher = value; 1519 return this; 1520 } 1521 1522 /** 1523 * @return The name of the organization or individual that published the message definition. 1524 */ 1525 public String getPublisher() { 1526 return this.publisher == null ? null : this.publisher.getValue(); 1527 } 1528 1529 /** 1530 * @param value The name of the organization or individual that published the message definition. 1531 */ 1532 public MessageDefinition setPublisher(String value) { 1533 if (Utilities.noString(value)) 1534 this.publisher = null; 1535 else { 1536 if (this.publisher == null) 1537 this.publisher = new StringType(); 1538 this.publisher.setValue(value); 1539 } 1540 return this; 1541 } 1542 1543 /** 1544 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 1545 */ 1546 public List<ContactDetail> getContact() { 1547 if (this.contact == null) 1548 this.contact = new ArrayList<ContactDetail>(); 1549 return this.contact; 1550 } 1551 1552 /** 1553 * @return Returns a reference to <code>this</code> for easy method chaining 1554 */ 1555 public MessageDefinition setContact(List<ContactDetail> theContact) { 1556 this.contact = theContact; 1557 return this; 1558 } 1559 1560 public boolean hasContact() { 1561 if (this.contact == null) 1562 return false; 1563 for (ContactDetail item : this.contact) 1564 if (!item.isEmpty()) 1565 return true; 1566 return false; 1567 } 1568 1569 public ContactDetail addContact() { //3 1570 ContactDetail t = new ContactDetail(); 1571 if (this.contact == null) 1572 this.contact = new ArrayList<ContactDetail>(); 1573 this.contact.add(t); 1574 return t; 1575 } 1576 1577 public MessageDefinition addContact(ContactDetail t) { //3 1578 if (t == null) 1579 return this; 1580 if (this.contact == null) 1581 this.contact = new ArrayList<ContactDetail>(); 1582 this.contact.add(t); 1583 return this; 1584 } 1585 1586 /** 1587 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 1588 */ 1589 public ContactDetail getContactFirstRep() { 1590 if (getContact().isEmpty()) { 1591 addContact(); 1592 } 1593 return getContact().get(0); 1594 } 1595 1596 /** 1597 * @return {@link #description} (A free text natural language description of the message definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1598 */ 1599 public MarkdownType getDescriptionElement() { 1600 if (this.description == null) 1601 if (Configuration.errorOnAutoCreate()) 1602 throw new Error("Attempt to auto-create MessageDefinition.description"); 1603 else if (Configuration.doAutoCreate()) 1604 this.description = new MarkdownType(); // bb 1605 return this.description; 1606 } 1607 1608 public boolean hasDescriptionElement() { 1609 return this.description != null && !this.description.isEmpty(); 1610 } 1611 1612 public boolean hasDescription() { 1613 return this.description != null && !this.description.isEmpty(); 1614 } 1615 1616 /** 1617 * @param value {@link #description} (A free text natural language description of the message definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1618 */ 1619 public MessageDefinition setDescriptionElement(MarkdownType value) { 1620 this.description = value; 1621 return this; 1622 } 1623 1624 /** 1625 * @return A free text natural language description of the message definition from a consumer's perspective. 1626 */ 1627 public String getDescription() { 1628 return this.description == null ? null : this.description.getValue(); 1629 } 1630 1631 /** 1632 * @param value A free text natural language description of the message definition from a consumer's perspective. 1633 */ 1634 public MessageDefinition setDescription(String value) { 1635 if (value == null) 1636 this.description = null; 1637 else { 1638 if (this.description == null) 1639 this.description = new MarkdownType(); 1640 this.description.setValue(value); 1641 } 1642 return this; 1643 } 1644 1645 /** 1646 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances.) 1647 */ 1648 public List<UsageContext> getUseContext() { 1649 if (this.useContext == null) 1650 this.useContext = new ArrayList<UsageContext>(); 1651 return this.useContext; 1652 } 1653 1654 /** 1655 * @return Returns a reference to <code>this</code> for easy method chaining 1656 */ 1657 public MessageDefinition setUseContext(List<UsageContext> theUseContext) { 1658 this.useContext = theUseContext; 1659 return this; 1660 } 1661 1662 public boolean hasUseContext() { 1663 if (this.useContext == null) 1664 return false; 1665 for (UsageContext item : this.useContext) 1666 if (!item.isEmpty()) 1667 return true; 1668 return false; 1669 } 1670 1671 public UsageContext addUseContext() { //3 1672 UsageContext t = new UsageContext(); 1673 if (this.useContext == null) 1674 this.useContext = new ArrayList<UsageContext>(); 1675 this.useContext.add(t); 1676 return t; 1677 } 1678 1679 public MessageDefinition addUseContext(UsageContext t) { //3 1680 if (t == null) 1681 return this; 1682 if (this.useContext == null) 1683 this.useContext = new ArrayList<UsageContext>(); 1684 this.useContext.add(t); 1685 return this; 1686 } 1687 1688 /** 1689 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 1690 */ 1691 public UsageContext getUseContextFirstRep() { 1692 if (getUseContext().isEmpty()) { 1693 addUseContext(); 1694 } 1695 return getUseContext().get(0); 1696 } 1697 1698 /** 1699 * @return {@link #jurisdiction} (A legal or geographic region in which the message definition is intended to be used.) 1700 */ 1701 public List<CodeableConcept> getJurisdiction() { 1702 if (this.jurisdiction == null) 1703 this.jurisdiction = new ArrayList<CodeableConcept>(); 1704 return this.jurisdiction; 1705 } 1706 1707 /** 1708 * @return Returns a reference to <code>this</code> for easy method chaining 1709 */ 1710 public MessageDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 1711 this.jurisdiction = theJurisdiction; 1712 return this; 1713 } 1714 1715 public boolean hasJurisdiction() { 1716 if (this.jurisdiction == null) 1717 return false; 1718 for (CodeableConcept item : this.jurisdiction) 1719 if (!item.isEmpty()) 1720 return true; 1721 return false; 1722 } 1723 1724 public CodeableConcept addJurisdiction() { //3 1725 CodeableConcept t = new CodeableConcept(); 1726 if (this.jurisdiction == null) 1727 this.jurisdiction = new ArrayList<CodeableConcept>(); 1728 this.jurisdiction.add(t); 1729 return t; 1730 } 1731 1732 public MessageDefinition addJurisdiction(CodeableConcept t) { //3 1733 if (t == null) 1734 return this; 1735 if (this.jurisdiction == null) 1736 this.jurisdiction = new ArrayList<CodeableConcept>(); 1737 this.jurisdiction.add(t); 1738 return this; 1739 } 1740 1741 /** 1742 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 1743 */ 1744 public CodeableConcept getJurisdictionFirstRep() { 1745 if (getJurisdiction().isEmpty()) { 1746 addJurisdiction(); 1747 } 1748 return getJurisdiction().get(0); 1749 } 1750 1751 /** 1752 * @return {@link #purpose} (Explanation of why this message definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 1753 */ 1754 public MarkdownType getPurposeElement() { 1755 if (this.purpose == null) 1756 if (Configuration.errorOnAutoCreate()) 1757 throw new Error("Attempt to auto-create MessageDefinition.purpose"); 1758 else if (Configuration.doAutoCreate()) 1759 this.purpose = new MarkdownType(); // bb 1760 return this.purpose; 1761 } 1762 1763 public boolean hasPurposeElement() { 1764 return this.purpose != null && !this.purpose.isEmpty(); 1765 } 1766 1767 public boolean hasPurpose() { 1768 return this.purpose != null && !this.purpose.isEmpty(); 1769 } 1770 1771 /** 1772 * @param value {@link #purpose} (Explanation of why this message definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 1773 */ 1774 public MessageDefinition setPurposeElement(MarkdownType value) { 1775 this.purpose = value; 1776 return this; 1777 } 1778 1779 /** 1780 * @return Explanation of why this message definition is needed and why it has been designed as it has. 1781 */ 1782 public String getPurpose() { 1783 return this.purpose == null ? null : this.purpose.getValue(); 1784 } 1785 1786 /** 1787 * @param value Explanation of why this message definition is needed and why it has been designed as it has. 1788 */ 1789 public MessageDefinition setPurpose(String value) { 1790 if (value == null) 1791 this.purpose = null; 1792 else { 1793 if (this.purpose == null) 1794 this.purpose = new MarkdownType(); 1795 this.purpose.setValue(value); 1796 } 1797 return this; 1798 } 1799 1800 /** 1801 * @return {@link #copyright} (A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 1802 */ 1803 public MarkdownType getCopyrightElement() { 1804 if (this.copyright == null) 1805 if (Configuration.errorOnAutoCreate()) 1806 throw new Error("Attempt to auto-create MessageDefinition.copyright"); 1807 else if (Configuration.doAutoCreate()) 1808 this.copyright = new MarkdownType(); // bb 1809 return this.copyright; 1810 } 1811 1812 public boolean hasCopyrightElement() { 1813 return this.copyright != null && !this.copyright.isEmpty(); 1814 } 1815 1816 public boolean hasCopyright() { 1817 return this.copyright != null && !this.copyright.isEmpty(); 1818 } 1819 1820 /** 1821 * @param value {@link #copyright} (A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 1822 */ 1823 public MessageDefinition setCopyrightElement(MarkdownType value) { 1824 this.copyright = value; 1825 return this; 1826 } 1827 1828 /** 1829 * @return A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition. 1830 */ 1831 public String getCopyright() { 1832 return this.copyright == null ? null : this.copyright.getValue(); 1833 } 1834 1835 /** 1836 * @param value A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition. 1837 */ 1838 public MessageDefinition setCopyright(String value) { 1839 if (value == null) 1840 this.copyright = null; 1841 else { 1842 if (this.copyright == null) 1843 this.copyright = new MarkdownType(); 1844 this.copyright.setValue(value); 1845 } 1846 return this; 1847 } 1848 1849 /** 1850 * @return {@link #base} (The MessageDefinition that is the basis for the contents of this resource.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value 1851 */ 1852 public CanonicalType getBaseElement() { 1853 if (this.base == null) 1854 if (Configuration.errorOnAutoCreate()) 1855 throw new Error("Attempt to auto-create MessageDefinition.base"); 1856 else if (Configuration.doAutoCreate()) 1857 this.base = new CanonicalType(); // bb 1858 return this.base; 1859 } 1860 1861 public boolean hasBaseElement() { 1862 return this.base != null && !this.base.isEmpty(); 1863 } 1864 1865 public boolean hasBase() { 1866 return this.base != null && !this.base.isEmpty(); 1867 } 1868 1869 /** 1870 * @param value {@link #base} (The MessageDefinition that is the basis for the contents of this resource.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value 1871 */ 1872 public MessageDefinition setBaseElement(CanonicalType value) { 1873 this.base = value; 1874 return this; 1875 } 1876 1877 /** 1878 * @return The MessageDefinition that is the basis for the contents of this resource. 1879 */ 1880 public String getBase() { 1881 return this.base == null ? null : this.base.getValue(); 1882 } 1883 1884 /** 1885 * @param value The MessageDefinition that is the basis for the contents of this resource. 1886 */ 1887 public MessageDefinition setBase(String value) { 1888 if (Utilities.noString(value)) 1889 this.base = null; 1890 else { 1891 if (this.base == null) 1892 this.base = new CanonicalType(); 1893 this.base.setValue(value); 1894 } 1895 return this; 1896 } 1897 1898 /** 1899 * @return {@link #parent} (Identifies a protocol or workflow that this MessageDefinition represents a step in.) 1900 */ 1901 public List<CanonicalType> getParent() { 1902 if (this.parent == null) 1903 this.parent = new ArrayList<CanonicalType>(); 1904 return this.parent; 1905 } 1906 1907 /** 1908 * @return Returns a reference to <code>this</code> for easy method chaining 1909 */ 1910 public MessageDefinition setParent(List<CanonicalType> theParent) { 1911 this.parent = theParent; 1912 return this; 1913 } 1914 1915 public boolean hasParent() { 1916 if (this.parent == null) 1917 return false; 1918 for (CanonicalType item : this.parent) 1919 if (!item.isEmpty()) 1920 return true; 1921 return false; 1922 } 1923 1924 /** 1925 * @return {@link #parent} (Identifies a protocol or workflow that this MessageDefinition represents a step in.) 1926 */ 1927 public CanonicalType addParentElement() {//2 1928 CanonicalType t = new CanonicalType(); 1929 if (this.parent == null) 1930 this.parent = new ArrayList<CanonicalType>(); 1931 this.parent.add(t); 1932 return t; 1933 } 1934 1935 /** 1936 * @param value {@link #parent} (Identifies a protocol or workflow that this MessageDefinition represents a step in.) 1937 */ 1938 public MessageDefinition addParent(String value) { //1 1939 CanonicalType t = new CanonicalType(); 1940 t.setValue(value); 1941 if (this.parent == null) 1942 this.parent = new ArrayList<CanonicalType>(); 1943 this.parent.add(t); 1944 return this; 1945 } 1946 1947 /** 1948 * @param value {@link #parent} (Identifies a protocol or workflow that this MessageDefinition represents a step in.) 1949 */ 1950 public boolean hasParent(String value) { 1951 if (this.parent == null) 1952 return false; 1953 for (CanonicalType v : this.parent) 1954 if (v.getValue().equals(value)) // canonical(ActivityDefinition|PlanDefinition) 1955 return true; 1956 return false; 1957 } 1958 1959 /** 1960 * @return {@link #event} (Event code or link to the EventDefinition.) 1961 */ 1962 public Type getEvent() { 1963 return this.event; 1964 } 1965 1966 /** 1967 * @return {@link #event} (Event code or link to the EventDefinition.) 1968 */ 1969 public Coding getEventCoding() throws FHIRException { 1970 if (this.event == null) 1971 this.event = new Coding(); 1972 if (!(this.event instanceof Coding)) 1973 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.event.getClass().getName()+" was encountered"); 1974 return (Coding) this.event; 1975 } 1976 1977 public boolean hasEventCoding() { 1978 return this != null && this.event instanceof Coding; 1979 } 1980 1981 /** 1982 * @return {@link #event} (Event code or link to the EventDefinition.) 1983 */ 1984 public UriType getEventUriType() throws FHIRException { 1985 if (this.event == null) 1986 this.event = new UriType(); 1987 if (!(this.event instanceof UriType)) 1988 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.event.getClass().getName()+" was encountered"); 1989 return (UriType) this.event; 1990 } 1991 1992 public boolean hasEventUriType() { 1993 return this != null && this.event instanceof UriType; 1994 } 1995 1996 public boolean hasEvent() { 1997 return this.event != null && !this.event.isEmpty(); 1998 } 1999 2000 /** 2001 * @param value {@link #event} (Event code or link to the EventDefinition.) 2002 */ 2003 public MessageDefinition setEvent(Type value) { 2004 if (value != null && !(value instanceof Coding || value instanceof UriType)) 2005 throw new Error("Not the right type for MessageDefinition.event[x]: "+value.fhirType()); 2006 this.event = value; 2007 return this; 2008 } 2009 2010 /** 2011 * @return {@link #category} (The impact of the content of the message.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value 2012 */ 2013 public Enumeration<MessageSignificanceCategory> getCategoryElement() { 2014 if (this.category == null) 2015 if (Configuration.errorOnAutoCreate()) 2016 throw new Error("Attempt to auto-create MessageDefinition.category"); 2017 else if (Configuration.doAutoCreate()) 2018 this.category = new Enumeration<MessageSignificanceCategory>(new MessageSignificanceCategoryEnumFactory()); // bb 2019 return this.category; 2020 } 2021 2022 public boolean hasCategoryElement() { 2023 return this.category != null && !this.category.isEmpty(); 2024 } 2025 2026 public boolean hasCategory() { 2027 return this.category != null && !this.category.isEmpty(); 2028 } 2029 2030 /** 2031 * @param value {@link #category} (The impact of the content of the message.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value 2032 */ 2033 public MessageDefinition setCategoryElement(Enumeration<MessageSignificanceCategory> value) { 2034 this.category = value; 2035 return this; 2036 } 2037 2038 /** 2039 * @return The impact of the content of the message. 2040 */ 2041 public MessageSignificanceCategory getCategory() { 2042 return this.category == null ? null : this.category.getValue(); 2043 } 2044 2045 /** 2046 * @param value The impact of the content of the message. 2047 */ 2048 public MessageDefinition setCategory(MessageSignificanceCategory value) { 2049 if (value == null) 2050 this.category = null; 2051 else { 2052 if (this.category == null) 2053 this.category = new Enumeration<MessageSignificanceCategory>(new MessageSignificanceCategoryEnumFactory()); 2054 this.category.setValue(value); 2055 } 2056 return this; 2057 } 2058 2059 /** 2060 * @return {@link #focus} (Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.) 2061 */ 2062 public List<MessageDefinitionFocusComponent> getFocus() { 2063 if (this.focus == null) 2064 this.focus = new ArrayList<MessageDefinitionFocusComponent>(); 2065 return this.focus; 2066 } 2067 2068 /** 2069 * @return Returns a reference to <code>this</code> for easy method chaining 2070 */ 2071 public MessageDefinition setFocus(List<MessageDefinitionFocusComponent> theFocus) { 2072 this.focus = theFocus; 2073 return this; 2074 } 2075 2076 public boolean hasFocus() { 2077 if (this.focus == null) 2078 return false; 2079 for (MessageDefinitionFocusComponent item : this.focus) 2080 if (!item.isEmpty()) 2081 return true; 2082 return false; 2083 } 2084 2085 public MessageDefinitionFocusComponent addFocus() { //3 2086 MessageDefinitionFocusComponent t = new MessageDefinitionFocusComponent(); 2087 if (this.focus == null) 2088 this.focus = new ArrayList<MessageDefinitionFocusComponent>(); 2089 this.focus.add(t); 2090 return t; 2091 } 2092 2093 public MessageDefinition addFocus(MessageDefinitionFocusComponent t) { //3 2094 if (t == null) 2095 return this; 2096 if (this.focus == null) 2097 this.focus = new ArrayList<MessageDefinitionFocusComponent>(); 2098 this.focus.add(t); 2099 return this; 2100 } 2101 2102 /** 2103 * @return The first repetition of repeating field {@link #focus}, creating it if it does not already exist 2104 */ 2105 public MessageDefinitionFocusComponent getFocusFirstRep() { 2106 if (getFocus().isEmpty()) { 2107 addFocus(); 2108 } 2109 return getFocus().get(0); 2110 } 2111 2112 /** 2113 * @return {@link #responseRequired} (Declare at a message definition level whether a response is required or only upon error or success, or never.). This is the underlying object with id, value and extensions. The accessor "getResponseRequired" gives direct access to the value 2114 */ 2115 public Enumeration<MessageheaderResponseRequest> getResponseRequiredElement() { 2116 if (this.responseRequired == null) 2117 if (Configuration.errorOnAutoCreate()) 2118 throw new Error("Attempt to auto-create MessageDefinition.responseRequired"); 2119 else if (Configuration.doAutoCreate()) 2120 this.responseRequired = new Enumeration<MessageheaderResponseRequest>(new MessageheaderResponseRequestEnumFactory()); // bb 2121 return this.responseRequired; 2122 } 2123 2124 public boolean hasResponseRequiredElement() { 2125 return this.responseRequired != null && !this.responseRequired.isEmpty(); 2126 } 2127 2128 public boolean hasResponseRequired() { 2129 return this.responseRequired != null && !this.responseRequired.isEmpty(); 2130 } 2131 2132 /** 2133 * @param value {@link #responseRequired} (Declare at a message definition level whether a response is required or only upon error or success, or never.). This is the underlying object with id, value and extensions. The accessor "getResponseRequired" gives direct access to the value 2134 */ 2135 public MessageDefinition setResponseRequiredElement(Enumeration<MessageheaderResponseRequest> value) { 2136 this.responseRequired = value; 2137 return this; 2138 } 2139 2140 /** 2141 * @return Declare at a message definition level whether a response is required or only upon error or success, or never. 2142 */ 2143 public MessageheaderResponseRequest getResponseRequired() { 2144 return this.responseRequired == null ? null : this.responseRequired.getValue(); 2145 } 2146 2147 /** 2148 * @param value Declare at a message definition level whether a response is required or only upon error or success, or never. 2149 */ 2150 public MessageDefinition setResponseRequired(MessageheaderResponseRequest value) { 2151 if (value == null) 2152 this.responseRequired = null; 2153 else { 2154 if (this.responseRequired == null) 2155 this.responseRequired = new Enumeration<MessageheaderResponseRequest>(new MessageheaderResponseRequestEnumFactory()); 2156 this.responseRequired.setValue(value); 2157 } 2158 return this; 2159 } 2160 2161 /** 2162 * @return {@link #allowedResponse} (Indicates what types of messages may be sent as an application-level response to this message.) 2163 */ 2164 public List<MessageDefinitionAllowedResponseComponent> getAllowedResponse() { 2165 if (this.allowedResponse == null) 2166 this.allowedResponse = new ArrayList<MessageDefinitionAllowedResponseComponent>(); 2167 return this.allowedResponse; 2168 } 2169 2170 /** 2171 * @return Returns a reference to <code>this</code> for easy method chaining 2172 */ 2173 public MessageDefinition setAllowedResponse(List<MessageDefinitionAllowedResponseComponent> theAllowedResponse) { 2174 this.allowedResponse = theAllowedResponse; 2175 return this; 2176 } 2177 2178 public boolean hasAllowedResponse() { 2179 if (this.allowedResponse == null) 2180 return false; 2181 for (MessageDefinitionAllowedResponseComponent item : this.allowedResponse) 2182 if (!item.isEmpty()) 2183 return true; 2184 return false; 2185 } 2186 2187 public MessageDefinitionAllowedResponseComponent addAllowedResponse() { //3 2188 MessageDefinitionAllowedResponseComponent t = new MessageDefinitionAllowedResponseComponent(); 2189 if (this.allowedResponse == null) 2190 this.allowedResponse = new ArrayList<MessageDefinitionAllowedResponseComponent>(); 2191 this.allowedResponse.add(t); 2192 return t; 2193 } 2194 2195 public MessageDefinition addAllowedResponse(MessageDefinitionAllowedResponseComponent t) { //3 2196 if (t == null) 2197 return this; 2198 if (this.allowedResponse == null) 2199 this.allowedResponse = new ArrayList<MessageDefinitionAllowedResponseComponent>(); 2200 this.allowedResponse.add(t); 2201 return this; 2202 } 2203 2204 /** 2205 * @return The first repetition of repeating field {@link #allowedResponse}, creating it if it does not already exist 2206 */ 2207 public MessageDefinitionAllowedResponseComponent getAllowedResponseFirstRep() { 2208 if (getAllowedResponse().isEmpty()) { 2209 addAllowedResponse(); 2210 } 2211 return getAllowedResponse().get(0); 2212 } 2213 2214 /** 2215 * @return {@link #graph} (Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.) 2216 */ 2217 public List<CanonicalType> getGraph() { 2218 if (this.graph == null) 2219 this.graph = new ArrayList<CanonicalType>(); 2220 return this.graph; 2221 } 2222 2223 /** 2224 * @return Returns a reference to <code>this</code> for easy method chaining 2225 */ 2226 public MessageDefinition setGraph(List<CanonicalType> theGraph) { 2227 this.graph = theGraph; 2228 return this; 2229 } 2230 2231 public boolean hasGraph() { 2232 if (this.graph == null) 2233 return false; 2234 for (CanonicalType item : this.graph) 2235 if (!item.isEmpty()) 2236 return true; 2237 return false; 2238 } 2239 2240 /** 2241 * @return {@link #graph} (Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.) 2242 */ 2243 public CanonicalType addGraphElement() {//2 2244 CanonicalType t = new CanonicalType(); 2245 if (this.graph == null) 2246 this.graph = new ArrayList<CanonicalType>(); 2247 this.graph.add(t); 2248 return t; 2249 } 2250 2251 /** 2252 * @param value {@link #graph} (Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.) 2253 */ 2254 public MessageDefinition addGraph(String value) { //1 2255 CanonicalType t = new CanonicalType(); 2256 t.setValue(value); 2257 if (this.graph == null) 2258 this.graph = new ArrayList<CanonicalType>(); 2259 this.graph.add(t); 2260 return this; 2261 } 2262 2263 /** 2264 * @param value {@link #graph} (Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.) 2265 */ 2266 public boolean hasGraph(String value) { 2267 if (this.graph == null) 2268 return false; 2269 for (CanonicalType v : this.graph) 2270 if (v.getValue().equals(value)) // canonical(GraphDefinition) 2271 return true; 2272 return false; 2273 } 2274 2275 protected void listChildren(List<Property> children) { 2276 super.listChildren(children); 2277 children.add(new Property("url", "uri", "The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.", 0, 1, url)); 2278 children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2279 children.add(new Property("version", "string", "The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version)); 2280 children.add(new Property("name", "string", "A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name)); 2281 children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the message definition.", 0, 1, title)); 2282 children.add(new Property("replaces", "canonical(MessageDefinition)", "A MessageDefinition that is superseded by this definition.", 0, java.lang.Integer.MAX_VALUE, replaces)); 2283 children.add(new Property("status", "code", "The status of this message definition. Enables tracking the life-cycle of the content.", 0, 1, status)); 2284 children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental)); 2285 children.add(new Property("date", "dateTime", "The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.", 0, 1, date)); 2286 children.add(new Property("publisher", "string", "The name of the organization or individual that published the message definition.", 0, 1, publisher)); 2287 children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 2288 children.add(new Property("description", "markdown", "A free text natural language description of the message definition from a consumer's perspective.", 0, 1, description)); 2289 children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 2290 children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the message definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); 2291 children.add(new Property("purpose", "markdown", "Explanation of why this message definition is needed and why it has been designed as it has.", 0, 1, purpose)); 2292 children.add(new Property("copyright", "markdown", "A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.", 0, 1, copyright)); 2293 children.add(new Property("base", "canonical(MessageDefinition)", "The MessageDefinition that is the basis for the contents of this resource.", 0, 1, base)); 2294 children.add(new Property("parent", "canonical(ActivityDefinition|PlanDefinition)", "Identifies a protocol or workflow that this MessageDefinition represents a step in.", 0, java.lang.Integer.MAX_VALUE, parent)); 2295 children.add(new Property("event[x]", "Coding|uri", "Event code or link to the EventDefinition.", 0, 1, event)); 2296 children.add(new Property("category", "code", "The impact of the content of the message.", 0, 1, category)); 2297 children.add(new Property("focus", "", "Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.", 0, java.lang.Integer.MAX_VALUE, focus)); 2298 children.add(new Property("responseRequired", "code", "Declare at a message definition level whether a response is required or only upon error or success, or never.", 0, 1, responseRequired)); 2299 children.add(new Property("allowedResponse", "", "Indicates what types of messages may be sent as an application-level response to this message.", 0, java.lang.Integer.MAX_VALUE, allowedResponse)); 2300 children.add(new Property("graph", "canonical(GraphDefinition)", "Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.", 0, java.lang.Integer.MAX_VALUE, graph)); 2301 } 2302 2303 @Override 2304 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2305 switch (_hash) { 2306 case 116079: /*url*/ return new Property("url", "uri", "The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.", 0, 1, url); 2307 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier); 2308 case 351608024: /*version*/ return new Property("version", "string", "The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version); 2309 case 3373707: /*name*/ return new Property("name", "string", "A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name); 2310 case 110371416: /*title*/ return new Property("title", "string", "A short, descriptive, user-friendly title for the message definition.", 0, 1, title); 2311 case -430332865: /*replaces*/ return new Property("replaces", "canonical(MessageDefinition)", "A MessageDefinition that is superseded by this definition.", 0, java.lang.Integer.MAX_VALUE, replaces); 2312 case -892481550: /*status*/ return new Property("status", "code", "The status of this message definition. Enables tracking the life-cycle of the content.", 0, 1, status); 2313 case -404562712: /*experimental*/ return new Property("experimental", "boolean", "A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental); 2314 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.", 0, 1, date); 2315 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the organization or individual that published the message definition.", 0, 1, publisher); 2316 case 951526432: /*contact*/ return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact); 2317 case -1724546052: /*description*/ return new Property("description", "markdown", "A free text natural language description of the message definition from a consumer's perspective.", 0, 1, description); 2318 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 2319 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the message definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction); 2320 case -220463842: /*purpose*/ return new Property("purpose", "markdown", "Explanation of why this message definition is needed and why it has been designed as it has.", 0, 1, purpose); 2321 case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.", 0, 1, copyright); 2322 case 3016401: /*base*/ return new Property("base", "canonical(MessageDefinition)", "The MessageDefinition that is the basis for the contents of this resource.", 0, 1, base); 2323 case -995424086: /*parent*/ return new Property("parent", "canonical(ActivityDefinition|PlanDefinition)", "Identifies a protocol or workflow that this MessageDefinition represents a step in.", 0, java.lang.Integer.MAX_VALUE, parent); 2324 case 278115238: /*event[x]*/ return new Property("event[x]", "Coding|uri", "Event code or link to the EventDefinition.", 0, 1, event); 2325 case 96891546: /*event*/ return new Property("event[x]", "Coding|uri", "Event code or link to the EventDefinition.", 0, 1, event); 2326 case -355957084: /*eventCoding*/ return new Property("event[x]", "Coding|uri", "Event code or link to the EventDefinition.", 0, 1, event); 2327 case 278109298: /*eventUri*/ return new Property("event[x]", "Coding|uri", "Event code or link to the EventDefinition.", 0, 1, event); 2328 case 50511102: /*category*/ return new Property("category", "code", "The impact of the content of the message.", 0, 1, category); 2329 case 97604824: /*focus*/ return new Property("focus", "", "Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.", 0, java.lang.Integer.MAX_VALUE, focus); 2330 case 791597824: /*responseRequired*/ return new Property("responseRequired", "code", "Declare at a message definition level whether a response is required or only upon error or success, or never.", 0, 1, responseRequired); 2331 case -1130933751: /*allowedResponse*/ return new Property("allowedResponse", "", "Indicates what types of messages may be sent as an application-level response to this message.", 0, java.lang.Integer.MAX_VALUE, allowedResponse); 2332 case 98615630: /*graph*/ return new Property("graph", "canonical(GraphDefinition)", "Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [[[GraphDefinition]]] that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.", 0, java.lang.Integer.MAX_VALUE, graph); 2333 default: return super.getNamedProperty(_hash, _name, _checkValid); 2334 } 2335 2336 } 2337 2338 @Override 2339 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2340 switch (hash) { 2341 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 2342 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2343 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 2344 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 2345 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 2346 case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // CanonicalType 2347 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 2348 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 2349 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 2350 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 2351 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 2352 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 2353 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 2354 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 2355 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 2356 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 2357 case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // CanonicalType 2358 case -995424086: /*parent*/ return this.parent == null ? new Base[0] : this.parent.toArray(new Base[this.parent.size()]); // CanonicalType 2359 case 96891546: /*event*/ return this.event == null ? new Base[0] : new Base[] {this.event}; // Type 2360 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // Enumeration<MessageSignificanceCategory> 2361 case 97604824: /*focus*/ return this.focus == null ? new Base[0] : this.focus.toArray(new Base[this.focus.size()]); // MessageDefinitionFocusComponent 2362 case 791597824: /*responseRequired*/ return this.responseRequired == null ? new Base[0] : new Base[] {this.responseRequired}; // Enumeration<MessageheaderResponseRequest> 2363 case -1130933751: /*allowedResponse*/ return this.allowedResponse == null ? new Base[0] : this.allowedResponse.toArray(new Base[this.allowedResponse.size()]); // MessageDefinitionAllowedResponseComponent 2364 case 98615630: /*graph*/ return this.graph == null ? new Base[0] : this.graph.toArray(new Base[this.graph.size()]); // CanonicalType 2365 default: return super.getProperty(hash, name, checkValid); 2366 } 2367 2368 } 2369 2370 @Override 2371 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2372 switch (hash) { 2373 case 116079: // url 2374 this.url = castToUri(value); // UriType 2375 return value; 2376 case -1618432855: // identifier 2377 this.getIdentifier().add(castToIdentifier(value)); // Identifier 2378 return value; 2379 case 351608024: // version 2380 this.version = castToString(value); // StringType 2381 return value; 2382 case 3373707: // name 2383 this.name = castToString(value); // StringType 2384 return value; 2385 case 110371416: // title 2386 this.title = castToString(value); // StringType 2387 return value; 2388 case -430332865: // replaces 2389 this.getReplaces().add(castToCanonical(value)); // CanonicalType 2390 return value; 2391 case -892481550: // status 2392 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 2393 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 2394 return value; 2395 case -404562712: // experimental 2396 this.experimental = castToBoolean(value); // BooleanType 2397 return value; 2398 case 3076014: // date 2399 this.date = castToDateTime(value); // DateTimeType 2400 return value; 2401 case 1447404028: // publisher 2402 this.publisher = castToString(value); // StringType 2403 return value; 2404 case 951526432: // contact 2405 this.getContact().add(castToContactDetail(value)); // ContactDetail 2406 return value; 2407 case -1724546052: // description 2408 this.description = castToMarkdown(value); // MarkdownType 2409 return value; 2410 case -669707736: // useContext 2411 this.getUseContext().add(castToUsageContext(value)); // UsageContext 2412 return value; 2413 case -507075711: // jurisdiction 2414 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 2415 return value; 2416 case -220463842: // purpose 2417 this.purpose = castToMarkdown(value); // MarkdownType 2418 return value; 2419 case 1522889671: // copyright 2420 this.copyright = castToMarkdown(value); // MarkdownType 2421 return value; 2422 case 3016401: // base 2423 this.base = castToCanonical(value); // CanonicalType 2424 return value; 2425 case -995424086: // parent 2426 this.getParent().add(castToCanonical(value)); // CanonicalType 2427 return value; 2428 case 96891546: // event 2429 this.event = castToType(value); // Type 2430 return value; 2431 case 50511102: // category 2432 value = new MessageSignificanceCategoryEnumFactory().fromType(castToCode(value)); 2433 this.category = (Enumeration) value; // Enumeration<MessageSignificanceCategory> 2434 return value; 2435 case 97604824: // focus 2436 this.getFocus().add((MessageDefinitionFocusComponent) value); // MessageDefinitionFocusComponent 2437 return value; 2438 case 791597824: // responseRequired 2439 value = new MessageheaderResponseRequestEnumFactory().fromType(castToCode(value)); 2440 this.responseRequired = (Enumeration) value; // Enumeration<MessageheaderResponseRequest> 2441 return value; 2442 case -1130933751: // allowedResponse 2443 this.getAllowedResponse().add((MessageDefinitionAllowedResponseComponent) value); // MessageDefinitionAllowedResponseComponent 2444 return value; 2445 case 98615630: // graph 2446 this.getGraph().add(castToCanonical(value)); // CanonicalType 2447 return value; 2448 default: return super.setProperty(hash, name, value); 2449 } 2450 2451 } 2452 2453 @Override 2454 public Base setProperty(String name, Base value) throws FHIRException { 2455 if (name.equals("url")) { 2456 this.url = castToUri(value); // UriType 2457 } else if (name.equals("identifier")) { 2458 this.getIdentifier().add(castToIdentifier(value)); 2459 } else if (name.equals("version")) { 2460 this.version = castToString(value); // StringType 2461 } else if (name.equals("name")) { 2462 this.name = castToString(value); // StringType 2463 } else if (name.equals("title")) { 2464 this.title = castToString(value); // StringType 2465 } else if (name.equals("replaces")) { 2466 this.getReplaces().add(castToCanonical(value)); 2467 } else if (name.equals("status")) { 2468 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 2469 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 2470 } else if (name.equals("experimental")) { 2471 this.experimental = castToBoolean(value); // BooleanType 2472 } else if (name.equals("date")) { 2473 this.date = castToDateTime(value); // DateTimeType 2474 } else if (name.equals("publisher")) { 2475 this.publisher = castToString(value); // StringType 2476 } else if (name.equals("contact")) { 2477 this.getContact().add(castToContactDetail(value)); 2478 } else if (name.equals("description")) { 2479 this.description = castToMarkdown(value); // MarkdownType 2480 } else if (name.equals("useContext")) { 2481 this.getUseContext().add(castToUsageContext(value)); 2482 } else if (name.equals("jurisdiction")) { 2483 this.getJurisdiction().add(castToCodeableConcept(value)); 2484 } else if (name.equals("purpose")) { 2485 this.purpose = castToMarkdown(value); // MarkdownType 2486 } else if (name.equals("copyright")) { 2487 this.copyright = castToMarkdown(value); // MarkdownType 2488 } else if (name.equals("base")) { 2489 this.base = castToCanonical(value); // CanonicalType 2490 } else if (name.equals("parent")) { 2491 this.getParent().add(castToCanonical(value)); 2492 } else if (name.equals("event[x]")) { 2493 this.event = castToType(value); // Type 2494 } else if (name.equals("category")) { 2495 value = new MessageSignificanceCategoryEnumFactory().fromType(castToCode(value)); 2496 this.category = (Enumeration) value; // Enumeration<MessageSignificanceCategory> 2497 } else if (name.equals("focus")) { 2498 this.getFocus().add((MessageDefinitionFocusComponent) value); 2499 } else if (name.equals("responseRequired")) { 2500 value = new MessageheaderResponseRequestEnumFactory().fromType(castToCode(value)); 2501 this.responseRequired = (Enumeration) value; // Enumeration<MessageheaderResponseRequest> 2502 } else if (name.equals("allowedResponse")) { 2503 this.getAllowedResponse().add((MessageDefinitionAllowedResponseComponent) value); 2504 } else if (name.equals("graph")) { 2505 this.getGraph().add(castToCanonical(value)); 2506 } else 2507 return super.setProperty(name, value); 2508 return value; 2509 } 2510 2511 @Override 2512 public Base makeProperty(int hash, String name) throws FHIRException { 2513 switch (hash) { 2514 case 116079: return getUrlElement(); 2515 case -1618432855: return addIdentifier(); 2516 case 351608024: return getVersionElement(); 2517 case 3373707: return getNameElement(); 2518 case 110371416: return getTitleElement(); 2519 case -430332865: return addReplacesElement(); 2520 case -892481550: return getStatusElement(); 2521 case -404562712: return getExperimentalElement(); 2522 case 3076014: return getDateElement(); 2523 case 1447404028: return getPublisherElement(); 2524 case 951526432: return addContact(); 2525 case -1724546052: return getDescriptionElement(); 2526 case -669707736: return addUseContext(); 2527 case -507075711: return addJurisdiction(); 2528 case -220463842: return getPurposeElement(); 2529 case 1522889671: return getCopyrightElement(); 2530 case 3016401: return getBaseElement(); 2531 case -995424086: return addParentElement(); 2532 case 278115238: return getEvent(); 2533 case 96891546: return getEvent(); 2534 case 50511102: return getCategoryElement(); 2535 case 97604824: return addFocus(); 2536 case 791597824: return getResponseRequiredElement(); 2537 case -1130933751: return addAllowedResponse(); 2538 case 98615630: return addGraphElement(); 2539 default: return super.makeProperty(hash, name); 2540 } 2541 2542 } 2543 2544 @Override 2545 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2546 switch (hash) { 2547 case 116079: /*url*/ return new String[] {"uri"}; 2548 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2549 case 351608024: /*version*/ return new String[] {"string"}; 2550 case 3373707: /*name*/ return new String[] {"string"}; 2551 case 110371416: /*title*/ return new String[] {"string"}; 2552 case -430332865: /*replaces*/ return new String[] {"canonical"}; 2553 case -892481550: /*status*/ return new String[] {"code"}; 2554 case -404562712: /*experimental*/ return new String[] {"boolean"}; 2555 case 3076014: /*date*/ return new String[] {"dateTime"}; 2556 case 1447404028: /*publisher*/ return new String[] {"string"}; 2557 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 2558 case -1724546052: /*description*/ return new String[] {"markdown"}; 2559 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 2560 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 2561 case -220463842: /*purpose*/ return new String[] {"markdown"}; 2562 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 2563 case 3016401: /*base*/ return new String[] {"canonical"}; 2564 case -995424086: /*parent*/ return new String[] {"canonical"}; 2565 case 96891546: /*event*/ return new String[] {"Coding", "uri"}; 2566 case 50511102: /*category*/ return new String[] {"code"}; 2567 case 97604824: /*focus*/ return new String[] {}; 2568 case 791597824: /*responseRequired*/ return new String[] {"code"}; 2569 case -1130933751: /*allowedResponse*/ return new String[] {}; 2570 case 98615630: /*graph*/ return new String[] {"canonical"}; 2571 default: return super.getTypesForProperty(hash, name); 2572 } 2573 2574 } 2575 2576 @Override 2577 public Base addChild(String name) throws FHIRException { 2578 if (name.equals("url")) { 2579 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.url"); 2580 } 2581 else if (name.equals("identifier")) { 2582 return addIdentifier(); 2583 } 2584 else if (name.equals("version")) { 2585 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.version"); 2586 } 2587 else if (name.equals("name")) { 2588 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.name"); 2589 } 2590 else if (name.equals("title")) { 2591 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.title"); 2592 } 2593 else if (name.equals("replaces")) { 2594 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.replaces"); 2595 } 2596 else if (name.equals("status")) { 2597 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.status"); 2598 } 2599 else if (name.equals("experimental")) { 2600 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.experimental"); 2601 } 2602 else if (name.equals("date")) { 2603 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.date"); 2604 } 2605 else if (name.equals("publisher")) { 2606 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.publisher"); 2607 } 2608 else if (name.equals("contact")) { 2609 return addContact(); 2610 } 2611 else if (name.equals("description")) { 2612 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.description"); 2613 } 2614 else if (name.equals("useContext")) { 2615 return addUseContext(); 2616 } 2617 else if (name.equals("jurisdiction")) { 2618 return addJurisdiction(); 2619 } 2620 else if (name.equals("purpose")) { 2621 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.purpose"); 2622 } 2623 else if (name.equals("copyright")) { 2624 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.copyright"); 2625 } 2626 else if (name.equals("base")) { 2627 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.base"); 2628 } 2629 else if (name.equals("parent")) { 2630 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.parent"); 2631 } 2632 else if (name.equals("eventCoding")) { 2633 this.event = new Coding(); 2634 return this.event; 2635 } 2636 else if (name.equals("eventUri")) { 2637 this.event = new UriType(); 2638 return this.event; 2639 } 2640 else if (name.equals("category")) { 2641 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.category"); 2642 } 2643 else if (name.equals("focus")) { 2644 return addFocus(); 2645 } 2646 else if (name.equals("responseRequired")) { 2647 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.responseRequired"); 2648 } 2649 else if (name.equals("allowedResponse")) { 2650 return addAllowedResponse(); 2651 } 2652 else if (name.equals("graph")) { 2653 throw new FHIRException("Cannot call addChild on a primitive type MessageDefinition.graph"); 2654 } 2655 else 2656 return super.addChild(name); 2657 } 2658 2659 public String fhirType() { 2660 return "MessageDefinition"; 2661 2662 } 2663 2664 public MessageDefinition copy() { 2665 MessageDefinition dst = new MessageDefinition(); 2666 copyValues(dst); 2667 return dst; 2668 } 2669 2670 public void copyValues(MessageDefinition dst) { 2671 super.copyValues(dst); 2672 dst.url = url == null ? null : url.copy(); 2673 if (identifier != null) { 2674 dst.identifier = new ArrayList<Identifier>(); 2675 for (Identifier i : identifier) 2676 dst.identifier.add(i.copy()); 2677 }; 2678 dst.version = version == null ? null : version.copy(); 2679 dst.name = name == null ? null : name.copy(); 2680 dst.title = title == null ? null : title.copy(); 2681 if (replaces != null) { 2682 dst.replaces = new ArrayList<CanonicalType>(); 2683 for (CanonicalType i : replaces) 2684 dst.replaces.add(i.copy()); 2685 }; 2686 dst.status = status == null ? null : status.copy(); 2687 dst.experimental = experimental == null ? null : experimental.copy(); 2688 dst.date = date == null ? null : date.copy(); 2689 dst.publisher = publisher == null ? null : publisher.copy(); 2690 if (contact != null) { 2691 dst.contact = new ArrayList<ContactDetail>(); 2692 for (ContactDetail i : contact) 2693 dst.contact.add(i.copy()); 2694 }; 2695 dst.description = description == null ? null : description.copy(); 2696 if (useContext != null) { 2697 dst.useContext = new ArrayList<UsageContext>(); 2698 for (UsageContext i : useContext) 2699 dst.useContext.add(i.copy()); 2700 }; 2701 if (jurisdiction != null) { 2702 dst.jurisdiction = new ArrayList<CodeableConcept>(); 2703 for (CodeableConcept i : jurisdiction) 2704 dst.jurisdiction.add(i.copy()); 2705 }; 2706 dst.purpose = purpose == null ? null : purpose.copy(); 2707 dst.copyright = copyright == null ? null : copyright.copy(); 2708 dst.base = base == null ? null : base.copy(); 2709 if (parent != null) { 2710 dst.parent = new ArrayList<CanonicalType>(); 2711 for (CanonicalType i : parent) 2712 dst.parent.add(i.copy()); 2713 }; 2714 dst.event = event == null ? null : event.copy(); 2715 dst.category = category == null ? null : category.copy(); 2716 if (focus != null) { 2717 dst.focus = new ArrayList<MessageDefinitionFocusComponent>(); 2718 for (MessageDefinitionFocusComponent i : focus) 2719 dst.focus.add(i.copy()); 2720 }; 2721 dst.responseRequired = responseRequired == null ? null : responseRequired.copy(); 2722 if (allowedResponse != null) { 2723 dst.allowedResponse = new ArrayList<MessageDefinitionAllowedResponseComponent>(); 2724 for (MessageDefinitionAllowedResponseComponent i : allowedResponse) 2725 dst.allowedResponse.add(i.copy()); 2726 }; 2727 if (graph != null) { 2728 dst.graph = new ArrayList<CanonicalType>(); 2729 for (CanonicalType i : graph) 2730 dst.graph.add(i.copy()); 2731 }; 2732 } 2733 2734 protected MessageDefinition typedCopy() { 2735 return copy(); 2736 } 2737 2738 @Override 2739 public boolean equalsDeep(Base other_) { 2740 if (!super.equalsDeep(other_)) 2741 return false; 2742 if (!(other_ instanceof MessageDefinition)) 2743 return false; 2744 MessageDefinition o = (MessageDefinition) other_; 2745 return compareDeep(identifier, o.identifier, true) && compareDeep(replaces, o.replaces, true) && compareDeep(purpose, o.purpose, true) 2746 && compareDeep(copyright, o.copyright, true) && compareDeep(base, o.base, true) && compareDeep(parent, o.parent, true) 2747 && compareDeep(event, o.event, true) && compareDeep(category, o.category, true) && compareDeep(focus, o.focus, true) 2748 && compareDeep(responseRequired, o.responseRequired, true) && compareDeep(allowedResponse, o.allowedResponse, true) 2749 && compareDeep(graph, o.graph, true); 2750 } 2751 2752 @Override 2753 public boolean equalsShallow(Base other_) { 2754 if (!super.equalsShallow(other_)) 2755 return false; 2756 if (!(other_ instanceof MessageDefinition)) 2757 return false; 2758 MessageDefinition o = (MessageDefinition) other_; 2759 return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) && compareValues(category, o.category, true) 2760 && compareValues(responseRequired, o.responseRequired, true); 2761 } 2762 2763 public boolean isEmpty() { 2764 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, replaces, purpose 2765 , copyright, base, parent, event, category, focus, responseRequired, allowedResponse 2766 , graph); 2767 } 2768 2769 @Override 2770 public ResourceType getResourceType() { 2771 return ResourceType.MessageDefinition; 2772 } 2773 2774 /** 2775 * Search parameter: <b>date</b> 2776 * <p> 2777 * Description: <b>The message definition publication date</b><br> 2778 * Type: <b>date</b><br> 2779 * Path: <b>MessageDefinition.date</b><br> 2780 * </p> 2781 */ 2782 @SearchParamDefinition(name="date", path="MessageDefinition.date", description="The message definition publication date", type="date" ) 2783 public static final String SP_DATE = "date"; 2784 /** 2785 * <b>Fluent Client</b> search parameter constant for <b>date</b> 2786 * <p> 2787 * Description: <b>The message definition publication date</b><br> 2788 * Type: <b>date</b><br> 2789 * Path: <b>MessageDefinition.date</b><br> 2790 * </p> 2791 */ 2792 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 2793 2794 /** 2795 * Search parameter: <b>identifier</b> 2796 * <p> 2797 * Description: <b>External identifier for the message definition</b><br> 2798 * Type: <b>token</b><br> 2799 * Path: <b>MessageDefinition.identifier</b><br> 2800 * </p> 2801 */ 2802 @SearchParamDefinition(name="identifier", path="MessageDefinition.identifier", description="External identifier for the message definition", type="token" ) 2803 public static final String SP_IDENTIFIER = "identifier"; 2804 /** 2805 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2806 * <p> 2807 * Description: <b>External identifier for the message definition</b><br> 2808 * Type: <b>token</b><br> 2809 * Path: <b>MessageDefinition.identifier</b><br> 2810 * </p> 2811 */ 2812 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2813 2814 /** 2815 * Search parameter: <b>parent</b> 2816 * <p> 2817 * Description: <b>A resource that is the parent of the definition</b><br> 2818 * Type: <b>reference</b><br> 2819 * Path: <b>MessageDefinition.parent</b><br> 2820 * </p> 2821 */ 2822 @SearchParamDefinition(name="parent", path="MessageDefinition.parent", description="A resource that is the parent of the definition", type="reference", target={ActivityDefinition.class, PlanDefinition.class } ) 2823 public static final String SP_PARENT = "parent"; 2824 /** 2825 * <b>Fluent Client</b> search parameter constant for <b>parent</b> 2826 * <p> 2827 * Description: <b>A resource that is the parent of the definition</b><br> 2828 * Type: <b>reference</b><br> 2829 * Path: <b>MessageDefinition.parent</b><br> 2830 * </p> 2831 */ 2832 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARENT); 2833 2834/** 2835 * Constant for fluent queries to be used to add include statements. Specifies 2836 * the path value of "<b>MessageDefinition:parent</b>". 2837 */ 2838 public static final ca.uhn.fhir.model.api.Include INCLUDE_PARENT = new ca.uhn.fhir.model.api.Include("MessageDefinition:parent").toLocked(); 2839 2840 /** 2841 * Search parameter: <b>context-type-value</b> 2842 * <p> 2843 * Description: <b>A use context type and value assigned to the message definition</b><br> 2844 * Type: <b>composite</b><br> 2845 * Path: <b></b><br> 2846 * </p> 2847 */ 2848 @SearchParamDefinition(name="context-type-value", path="MessageDefinition.useContext", description="A use context type and value assigned to the message definition", type="composite", compositeOf={"context-type", "context"} ) 2849 public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value"; 2850 /** 2851 * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b> 2852 * <p> 2853 * Description: <b>A use context type and value assigned to the message definition</b><br> 2854 * Type: <b>composite</b><br> 2855 * Path: <b></b><br> 2856 * </p> 2857 */ 2858 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE); 2859 2860 /** 2861 * Search parameter: <b>jurisdiction</b> 2862 * <p> 2863 * Description: <b>Intended jurisdiction for the message definition</b><br> 2864 * Type: <b>token</b><br> 2865 * Path: <b>MessageDefinition.jurisdiction</b><br> 2866 * </p> 2867 */ 2868 @SearchParamDefinition(name="jurisdiction", path="MessageDefinition.jurisdiction", description="Intended jurisdiction for the message definition", type="token" ) 2869 public static final String SP_JURISDICTION = "jurisdiction"; 2870 /** 2871 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 2872 * <p> 2873 * Description: <b>Intended jurisdiction for the message definition</b><br> 2874 * Type: <b>token</b><br> 2875 * Path: <b>MessageDefinition.jurisdiction</b><br> 2876 * </p> 2877 */ 2878 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 2879 2880 /** 2881 * Search parameter: <b>description</b> 2882 * <p> 2883 * Description: <b>The description of the message definition</b><br> 2884 * Type: <b>string</b><br> 2885 * Path: <b>MessageDefinition.description</b><br> 2886 * </p> 2887 */ 2888 @SearchParamDefinition(name="description", path="MessageDefinition.description", description="The description of the message definition", type="string" ) 2889 public static final String SP_DESCRIPTION = "description"; 2890 /** 2891 * <b>Fluent Client</b> search parameter constant for <b>description</b> 2892 * <p> 2893 * Description: <b>The description of the message definition</b><br> 2894 * Type: <b>string</b><br> 2895 * Path: <b>MessageDefinition.description</b><br> 2896 * </p> 2897 */ 2898 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 2899 2900 /** 2901 * Search parameter: <b>focus</b> 2902 * <p> 2903 * Description: <b>A resource that is a permitted focus of the message</b><br> 2904 * Type: <b>token</b><br> 2905 * Path: <b>MessageDefinition.focus.code</b><br> 2906 * </p> 2907 */ 2908 @SearchParamDefinition(name="focus", path="MessageDefinition.focus.code", description="A resource that is a permitted focus of the message", type="token" ) 2909 public static final String SP_FOCUS = "focus"; 2910 /** 2911 * <b>Fluent Client</b> search parameter constant for <b>focus</b> 2912 * <p> 2913 * Description: <b>A resource that is a permitted focus of the message</b><br> 2914 * Type: <b>token</b><br> 2915 * Path: <b>MessageDefinition.focus.code</b><br> 2916 * </p> 2917 */ 2918 public static final ca.uhn.fhir.rest.gclient.TokenClientParam FOCUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FOCUS); 2919 2920 /** 2921 * Search parameter: <b>context-type</b> 2922 * <p> 2923 * Description: <b>A type of use context assigned to the message definition</b><br> 2924 * Type: <b>token</b><br> 2925 * Path: <b>MessageDefinition.useContext.code</b><br> 2926 * </p> 2927 */ 2928 @SearchParamDefinition(name="context-type", path="MessageDefinition.useContext.code", description="A type of use context assigned to the message definition", type="token" ) 2929 public static final String SP_CONTEXT_TYPE = "context-type"; 2930 /** 2931 * <b>Fluent Client</b> search parameter constant for <b>context-type</b> 2932 * <p> 2933 * Description: <b>A type of use context assigned to the message definition</b><br> 2934 * Type: <b>token</b><br> 2935 * Path: <b>MessageDefinition.useContext.code</b><br> 2936 * </p> 2937 */ 2938 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE); 2939 2940 /** 2941 * Search parameter: <b>title</b> 2942 * <p> 2943 * Description: <b>The human-friendly name of the message definition</b><br> 2944 * Type: <b>string</b><br> 2945 * Path: <b>MessageDefinition.title</b><br> 2946 * </p> 2947 */ 2948 @SearchParamDefinition(name="title", path="MessageDefinition.title", description="The human-friendly name of the message definition", type="string" ) 2949 public static final String SP_TITLE = "title"; 2950 /** 2951 * <b>Fluent Client</b> search parameter constant for <b>title</b> 2952 * <p> 2953 * Description: <b>The human-friendly name of the message definition</b><br> 2954 * Type: <b>string</b><br> 2955 * Path: <b>MessageDefinition.title</b><br> 2956 * </p> 2957 */ 2958 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 2959 2960 /** 2961 * Search parameter: <b>version</b> 2962 * <p> 2963 * Description: <b>The business version of the message definition</b><br> 2964 * Type: <b>token</b><br> 2965 * Path: <b>MessageDefinition.version</b><br> 2966 * </p> 2967 */ 2968 @SearchParamDefinition(name="version", path="MessageDefinition.version", description="The business version of the message definition", type="token" ) 2969 public static final String SP_VERSION = "version"; 2970 /** 2971 * <b>Fluent Client</b> search parameter constant for <b>version</b> 2972 * <p> 2973 * Description: <b>The business version of the message definition</b><br> 2974 * Type: <b>token</b><br> 2975 * Path: <b>MessageDefinition.version</b><br> 2976 * </p> 2977 */ 2978 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 2979 2980 /** 2981 * Search parameter: <b>url</b> 2982 * <p> 2983 * Description: <b>The uri that identifies the message definition</b><br> 2984 * Type: <b>uri</b><br> 2985 * Path: <b>MessageDefinition.url</b><br> 2986 * </p> 2987 */ 2988 @SearchParamDefinition(name="url", path="MessageDefinition.url", description="The uri that identifies the message definition", type="uri" ) 2989 public static final String SP_URL = "url"; 2990 /** 2991 * <b>Fluent Client</b> search parameter constant for <b>url</b> 2992 * <p> 2993 * Description: <b>The uri that identifies the message definition</b><br> 2994 * Type: <b>uri</b><br> 2995 * Path: <b>MessageDefinition.url</b><br> 2996 * </p> 2997 */ 2998 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 2999 3000 /** 3001 * Search parameter: <b>context-quantity</b> 3002 * <p> 3003 * Description: <b>A quantity- or range-valued use context assigned to the message definition</b><br> 3004 * Type: <b>quantity</b><br> 3005 * Path: <b>MessageDefinition.useContext.valueQuantity, MessageDefinition.useContext.valueRange</b><br> 3006 * </p> 3007 */ 3008 @SearchParamDefinition(name="context-quantity", path="(MessageDefinition.useContext.value as Quantity) | (MessageDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the message definition", type="quantity" ) 3009 public static final String SP_CONTEXT_QUANTITY = "context-quantity"; 3010 /** 3011 * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b> 3012 * <p> 3013 * Description: <b>A quantity- or range-valued use context assigned to the message definition</b><br> 3014 * Type: <b>quantity</b><br> 3015 * Path: <b>MessageDefinition.useContext.valueQuantity, MessageDefinition.useContext.valueRange</b><br> 3016 * </p> 3017 */ 3018 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY); 3019 3020 /** 3021 * Search parameter: <b>name</b> 3022 * <p> 3023 * Description: <b>Computationally friendly name of the message definition</b><br> 3024 * Type: <b>string</b><br> 3025 * Path: <b>MessageDefinition.name</b><br> 3026 * </p> 3027 */ 3028 @SearchParamDefinition(name="name", path="MessageDefinition.name", description="Computationally friendly name of the message definition", type="string" ) 3029 public static final String SP_NAME = "name"; 3030 /** 3031 * <b>Fluent Client</b> search parameter constant for <b>name</b> 3032 * <p> 3033 * Description: <b>Computationally friendly name of the message definition</b><br> 3034 * Type: <b>string</b><br> 3035 * Path: <b>MessageDefinition.name</b><br> 3036 * </p> 3037 */ 3038 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 3039 3040 /** 3041 * Search parameter: <b>context</b> 3042 * <p> 3043 * Description: <b>A use context assigned to the message definition</b><br> 3044 * Type: <b>token</b><br> 3045 * Path: <b>MessageDefinition.useContext.valueCodeableConcept</b><br> 3046 * </p> 3047 */ 3048 @SearchParamDefinition(name="context", path="(MessageDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the message definition", type="token" ) 3049 public static final String SP_CONTEXT = "context"; 3050 /** 3051 * <b>Fluent Client</b> search parameter constant for <b>context</b> 3052 * <p> 3053 * Description: <b>A use context assigned to the message definition</b><br> 3054 * Type: <b>token</b><br> 3055 * Path: <b>MessageDefinition.useContext.valueCodeableConcept</b><br> 3056 * </p> 3057 */ 3058 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 3059 3060 /** 3061 * Search parameter: <b>publisher</b> 3062 * <p> 3063 * Description: <b>Name of the publisher of the message definition</b><br> 3064 * Type: <b>string</b><br> 3065 * Path: <b>MessageDefinition.publisher</b><br> 3066 * </p> 3067 */ 3068 @SearchParamDefinition(name="publisher", path="MessageDefinition.publisher", description="Name of the publisher of the message definition", type="string" ) 3069 public static final String SP_PUBLISHER = "publisher"; 3070 /** 3071 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 3072 * <p> 3073 * Description: <b>Name of the publisher of the message definition</b><br> 3074 * Type: <b>string</b><br> 3075 * Path: <b>MessageDefinition.publisher</b><br> 3076 * </p> 3077 */ 3078 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 3079 3080 /** 3081 * Search parameter: <b>event</b> 3082 * <p> 3083 * Description: <b>The event that triggers the message or link to the event definition.</b><br> 3084 * Type: <b>token</b><br> 3085 * Path: <b>MessageDefinition.event[x]</b><br> 3086 * </p> 3087 */ 3088 @SearchParamDefinition(name="event", path="MessageDefinition.event", description="The event that triggers the message or link to the event definition.", type="token" ) 3089 public static final String SP_EVENT = "event"; 3090 /** 3091 * <b>Fluent Client</b> search parameter constant for <b>event</b> 3092 * <p> 3093 * Description: <b>The event that triggers the message or link to the event definition.</b><br> 3094 * Type: <b>token</b><br> 3095 * Path: <b>MessageDefinition.event[x]</b><br> 3096 * </p> 3097 */ 3098 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EVENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EVENT); 3099 3100 /** 3101 * Search parameter: <b>category</b> 3102 * <p> 3103 * Description: <b>The behavior associated with the message</b><br> 3104 * Type: <b>token</b><br> 3105 * Path: <b>MessageDefinition.category</b><br> 3106 * </p> 3107 */ 3108 @SearchParamDefinition(name="category", path="MessageDefinition.category", description="The behavior associated with the message", type="token" ) 3109 public static final String SP_CATEGORY = "category"; 3110 /** 3111 * <b>Fluent Client</b> search parameter constant for <b>category</b> 3112 * <p> 3113 * Description: <b>The behavior associated with the message</b><br> 3114 * Type: <b>token</b><br> 3115 * Path: <b>MessageDefinition.category</b><br> 3116 * </p> 3117 */ 3118 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); 3119 3120 /** 3121 * Search parameter: <b>context-type-quantity</b> 3122 * <p> 3123 * Description: <b>A use context type and quantity- or range-based value assigned to the message definition</b><br> 3124 * Type: <b>composite</b><br> 3125 * Path: <b></b><br> 3126 * </p> 3127 */ 3128 @SearchParamDefinition(name="context-type-quantity", path="MessageDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the message definition", type="composite", compositeOf={"context-type", "context-quantity"} ) 3129 public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity"; 3130 /** 3131 * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b> 3132 * <p> 3133 * Description: <b>A use context type and quantity- or range-based value assigned to the message definition</b><br> 3134 * Type: <b>composite</b><br> 3135 * Path: <b></b><br> 3136 * </p> 3137 */ 3138 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY); 3139 3140 /** 3141 * Search parameter: <b>status</b> 3142 * <p> 3143 * Description: <b>The current status of the message definition</b><br> 3144 * Type: <b>token</b><br> 3145 * Path: <b>MessageDefinition.status</b><br> 3146 * </p> 3147 */ 3148 @SearchParamDefinition(name="status", path="MessageDefinition.status", description="The current status of the message definition", type="token" ) 3149 public static final String SP_STATUS = "status"; 3150 /** 3151 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3152 * <p> 3153 * Description: <b>The current status of the message definition</b><br> 3154 * Type: <b>token</b><br> 3155 * Path: <b>MessageDefinition.status</b><br> 3156 * </p> 3157 */ 3158 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3159 3160 3161}