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