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