001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import org.hl7.fhir.utilities.Utilities; 040import org.hl7.fhir.r4.model.Enumerations.*; 041import ca.uhn.fhir.model.api.annotation.ResourceDef; 042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 043import ca.uhn.fhir.model.api.annotation.Child; 044import ca.uhn.fhir.model.api.annotation.ChildOrder; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.Block; 047import org.hl7.fhir.instance.model.api.*; 048import org.hl7.fhir.exceptions.FHIRException; 049/** 050 * A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html). 051 */ 052@ResourceDef(name="ValueSet", profile="http://hl7.org/fhir/StructureDefinition/ValueSet") 053@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "immutable", "purpose", "copyright", "compose", "expansion"}) 054public class ValueSet extends MetadataResource { 055 056 public enum FilterOperator { 057 /** 058 * The specified property of the code equals the provided value. 059 */ 060 EQUAL, 061 /** 062 * Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (include descendant codes and self). 063 */ 064 ISA, 065 /** 066 * Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself i.e. include descendant codes only). 067 */ 068 DESCENDENTOF, 069 /** 070 * The specified property of the code does not have an is-a relationship with the provided value. 071 */ 072 ISNOTA, 073 /** 074 * The specified property of the code matches the regex specified in the provided value. 075 */ 076 REGEX, 077 /** 078 * The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list). 079 */ 080 IN, 081 /** 082 * The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list). 083 */ 084 NOTIN, 085 /** 086 * Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (i.e. include ancestor codes and self). 087 */ 088 GENERALIZES, 089 /** 090 * The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values). 091 */ 092 EXISTS, 093 /** 094 * added to help the parsers with the generic types 095 */ 096 NULL; 097 public static FilterOperator fromCode(String codeString) throws FHIRException { 098 if (codeString == null || "".equals(codeString)) 099 return null; 100 if ("=".equals(codeString)) 101 return EQUAL; 102 if ("is-a".equals(codeString)) 103 return ISA; 104 if ("descendent-of".equals(codeString)) 105 return DESCENDENTOF; 106 if ("is-not-a".equals(codeString)) 107 return ISNOTA; 108 if ("regex".equals(codeString)) 109 return REGEX; 110 if ("in".equals(codeString)) 111 return IN; 112 if ("not-in".equals(codeString)) 113 return NOTIN; 114 if ("generalizes".equals(codeString)) 115 return GENERALIZES; 116 if ("exists".equals(codeString)) 117 return EXISTS; 118 if (Configuration.isAcceptInvalidEnums()) 119 return null; 120 else 121 throw new FHIRException("Unknown FilterOperator code '"+codeString+"'"); 122 } 123 public String toCode() { 124 switch (this) { 125 case EQUAL: return "="; 126 case ISA: return "is-a"; 127 case DESCENDENTOF: return "descendent-of"; 128 case ISNOTA: return "is-not-a"; 129 case REGEX: return "regex"; 130 case IN: return "in"; 131 case NOTIN: return "not-in"; 132 case GENERALIZES: return "generalizes"; 133 case EXISTS: return "exists"; 134 case NULL: return null; 135 default: return "?"; 136 } 137 } 138 public String getSystem() { 139 switch (this) { 140 case EQUAL: return "http://hl7.org/fhir/filter-operator"; 141 case ISA: return "http://hl7.org/fhir/filter-operator"; 142 case DESCENDENTOF: return "http://hl7.org/fhir/filter-operator"; 143 case ISNOTA: return "http://hl7.org/fhir/filter-operator"; 144 case REGEX: return "http://hl7.org/fhir/filter-operator"; 145 case IN: return "http://hl7.org/fhir/filter-operator"; 146 case NOTIN: return "http://hl7.org/fhir/filter-operator"; 147 case GENERALIZES: return "http://hl7.org/fhir/filter-operator"; 148 case EXISTS: return "http://hl7.org/fhir/filter-operator"; 149 case NULL: return null; 150 default: return "?"; 151 } 152 } 153 public String getDefinition() { 154 switch (this) { 155 case EQUAL: return "The specified property of the code equals the provided value."; 156 case ISA: return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (include descendant codes and self)."; 157 case DESCENDENTOF: return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself i.e. include descendant codes only)."; 158 case ISNOTA: return "The specified property of the code does not have an is-a relationship with the provided value."; 159 case REGEX: return "The specified property of the code matches the regex specified in the provided value."; 160 case IN: return "The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list)."; 161 case NOTIN: return "The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list)."; 162 case GENERALIZES: return "Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (i.e. include ancestor codes and self)."; 163 case EXISTS: return "The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values)."; 164 case NULL: return null; 165 default: return "?"; 166 } 167 } 168 public String getDisplay() { 169 switch (this) { 170 case EQUAL: return "Equals"; 171 case ISA: return "Is A (by subsumption)"; 172 case DESCENDENTOF: return "Descendent Of (by subsumption)"; 173 case ISNOTA: return "Not (Is A) (by subsumption)"; 174 case REGEX: return "Regular Expression"; 175 case IN: return "In Set"; 176 case NOTIN: return "Not in Set"; 177 case GENERALIZES: return "Generalizes (by Subsumption)"; 178 case EXISTS: return "Exists"; 179 case NULL: return null; 180 default: return "?"; 181 } 182 } 183 } 184 185 public static class FilterOperatorEnumFactory implements EnumFactory<FilterOperator> { 186 public FilterOperator fromCode(String codeString) throws IllegalArgumentException { 187 if (codeString == null || "".equals(codeString)) 188 if (codeString == null || "".equals(codeString)) 189 return null; 190 if ("=".equals(codeString)) 191 return FilterOperator.EQUAL; 192 if ("is-a".equals(codeString)) 193 return FilterOperator.ISA; 194 if ("descendent-of".equals(codeString)) 195 return FilterOperator.DESCENDENTOF; 196 if ("is-not-a".equals(codeString)) 197 return FilterOperator.ISNOTA; 198 if ("regex".equals(codeString)) 199 return FilterOperator.REGEX; 200 if ("in".equals(codeString)) 201 return FilterOperator.IN; 202 if ("not-in".equals(codeString)) 203 return FilterOperator.NOTIN; 204 if ("generalizes".equals(codeString)) 205 return FilterOperator.GENERALIZES; 206 if ("exists".equals(codeString)) 207 return FilterOperator.EXISTS; 208 throw new IllegalArgumentException("Unknown FilterOperator code '"+codeString+"'"); 209 } 210 public Enumeration<FilterOperator> fromType(Base code) throws FHIRException { 211 if (code == null) 212 return null; 213 if (code.isEmpty()) 214 return new Enumeration<FilterOperator>(this); 215 String codeString = ((PrimitiveType) code).asStringValue(); 216 if (codeString == null || "".equals(codeString)) 217 return null; 218 if ("=".equals(codeString)) 219 return new Enumeration<FilterOperator>(this, FilterOperator.EQUAL); 220 if ("is-a".equals(codeString)) 221 return new Enumeration<FilterOperator>(this, FilterOperator.ISA); 222 if ("descendent-of".equals(codeString)) 223 return new Enumeration<FilterOperator>(this, FilterOperator.DESCENDENTOF); 224 if ("is-not-a".equals(codeString)) 225 return new Enumeration<FilterOperator>(this, FilterOperator.ISNOTA); 226 if ("regex".equals(codeString)) 227 return new Enumeration<FilterOperator>(this, FilterOperator.REGEX); 228 if ("in".equals(codeString)) 229 return new Enumeration<FilterOperator>(this, FilterOperator.IN); 230 if ("not-in".equals(codeString)) 231 return new Enumeration<FilterOperator>(this, FilterOperator.NOTIN); 232 if ("generalizes".equals(codeString)) 233 return new Enumeration<FilterOperator>(this, FilterOperator.GENERALIZES); 234 if ("exists".equals(codeString)) 235 return new Enumeration<FilterOperator>(this, FilterOperator.EXISTS); 236 throw new FHIRException("Unknown FilterOperator code '"+codeString+"'"); 237 } 238 public String toCode(FilterOperator code) { 239 if (code == FilterOperator.EQUAL) 240 return "="; 241 if (code == FilterOperator.ISA) 242 return "is-a"; 243 if (code == FilterOperator.DESCENDENTOF) 244 return "descendent-of"; 245 if (code == FilterOperator.ISNOTA) 246 return "is-not-a"; 247 if (code == FilterOperator.REGEX) 248 return "regex"; 249 if (code == FilterOperator.IN) 250 return "in"; 251 if (code == FilterOperator.NOTIN) 252 return "not-in"; 253 if (code == FilterOperator.GENERALIZES) 254 return "generalizes"; 255 if (code == FilterOperator.EXISTS) 256 return "exists"; 257 return "?"; 258 } 259 public String toSystem(FilterOperator code) { 260 return code.getSystem(); 261 } 262 } 263 264 @Block() 265 public static class ValueSetComposeComponent extends BackboneElement implements IBaseBackboneElement { 266 /** 267 * The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version. 268 */ 269 @Child(name = "lockedDate", type = {DateType.class}, order=1, min=0, max=1, modifier=false, summary=true) 270 @Description(shortDefinition="Fixed date for references with no specified version (transitive)", formalDefinition="The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version." ) 271 protected DateType lockedDate; 272 273 /** 274 * Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included). 275 */ 276 @Child(name = "inactive", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=true) 277 @Description(shortDefinition="Whether inactive codes are in the value set", formalDefinition="Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included)." ) 278 protected BooleanType inactive; 279 280 /** 281 * Include one or more codes from a code system or other value set(s). 282 */ 283 @Child(name = "include", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 284 @Description(shortDefinition="Include one or more codes from a code system or other value set(s)", formalDefinition="Include one or more codes from a code system or other value set(s)." ) 285 protected List<ConceptSetComponent> include; 286 287 /** 288 * Exclude one or more codes from the value set based on code system filters and/or other value sets. 289 */ 290 @Child(name = "exclude", type = {ConceptSetComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 291 @Description(shortDefinition="Explicitly exclude codes from a code system or other value sets", formalDefinition="Exclude one or more codes from the value set based on code system filters and/or other value sets." ) 292 protected List<ConceptSetComponent> exclude; 293 294 private static final long serialVersionUID = -765941757L; 295 296 /** 297 * Constructor 298 */ 299 public ValueSetComposeComponent() { 300 super(); 301 } 302 303 /** 304 * @return {@link #lockedDate} (The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.). This is the underlying object with id, value and extensions. The accessor "getLockedDate" gives direct access to the value 305 */ 306 public DateType getLockedDateElement() { 307 if (this.lockedDate == null) 308 if (Configuration.errorOnAutoCreate()) 309 throw new Error("Attempt to auto-create ValueSetComposeComponent.lockedDate"); 310 else if (Configuration.doAutoCreate()) 311 this.lockedDate = new DateType(); // bb 312 return this.lockedDate; 313 } 314 315 public boolean hasLockedDateElement() { 316 return this.lockedDate != null && !this.lockedDate.isEmpty(); 317 } 318 319 public boolean hasLockedDate() { 320 return this.lockedDate != null && !this.lockedDate.isEmpty(); 321 } 322 323 /** 324 * @param value {@link #lockedDate} (The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.). This is the underlying object with id, value and extensions. The accessor "getLockedDate" gives direct access to the value 325 */ 326 public ValueSetComposeComponent setLockedDateElement(DateType value) { 327 this.lockedDate = value; 328 return this; 329 } 330 331 /** 332 * @return The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version. 333 */ 334 public Date getLockedDate() { 335 return this.lockedDate == null ? null : this.lockedDate.getValue(); 336 } 337 338 /** 339 * @param value The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version. 340 */ 341 public ValueSetComposeComponent setLockedDate(Date value) { 342 if (value == null) 343 this.lockedDate = null; 344 else { 345 if (this.lockedDate == null) 346 this.lockedDate = new DateType(); 347 this.lockedDate.setValue(value); 348 } 349 return this; 350 } 351 352 /** 353 * @return {@link #inactive} (Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value 354 */ 355 public BooleanType getInactiveElement() { 356 if (this.inactive == null) 357 if (Configuration.errorOnAutoCreate()) 358 throw new Error("Attempt to auto-create ValueSetComposeComponent.inactive"); 359 else if (Configuration.doAutoCreate()) 360 this.inactive = new BooleanType(); // bb 361 return this.inactive; 362 } 363 364 public boolean hasInactiveElement() { 365 return this.inactive != null && !this.inactive.isEmpty(); 366 } 367 368 public boolean hasInactive() { 369 return this.inactive != null && !this.inactive.isEmpty(); 370 } 371 372 /** 373 * @param value {@link #inactive} (Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value 374 */ 375 public ValueSetComposeComponent setInactiveElement(BooleanType value) { 376 this.inactive = value; 377 return this; 378 } 379 380 /** 381 * @return Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included). 382 */ 383 public boolean getInactive() { 384 return this.inactive == null || this.inactive.isEmpty() ? false : this.inactive.getValue(); 385 } 386 387 /** 388 * @param value Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included). 389 */ 390 public ValueSetComposeComponent setInactive(boolean value) { 391 if (this.inactive == null) 392 this.inactive = new BooleanType(); 393 this.inactive.setValue(value); 394 return this; 395 } 396 397 /** 398 * @return {@link #include} (Include one or more codes from a code system or other value set(s).) 399 */ 400 public List<ConceptSetComponent> getInclude() { 401 if (this.include == null) 402 this.include = new ArrayList<ConceptSetComponent>(); 403 return this.include; 404 } 405 406 /** 407 * @return Returns a reference to <code>this</code> for easy method chaining 408 */ 409 public ValueSetComposeComponent setInclude(List<ConceptSetComponent> theInclude) { 410 this.include = theInclude; 411 return this; 412 } 413 414 public boolean hasInclude() { 415 if (this.include == null) 416 return false; 417 for (ConceptSetComponent item : this.include) 418 if (!item.isEmpty()) 419 return true; 420 return false; 421 } 422 423 public ConceptSetComponent addInclude() { //3 424 ConceptSetComponent t = new ConceptSetComponent(); 425 if (this.include == null) 426 this.include = new ArrayList<ConceptSetComponent>(); 427 this.include.add(t); 428 return t; 429 } 430 431 public ValueSetComposeComponent addInclude(ConceptSetComponent t) { //3 432 if (t == null) 433 return this; 434 if (this.include == null) 435 this.include = new ArrayList<ConceptSetComponent>(); 436 this.include.add(t); 437 return this; 438 } 439 440 /** 441 * @return The first repetition of repeating field {@link #include}, creating it if it does not already exist 442 */ 443 public ConceptSetComponent getIncludeFirstRep() { 444 if (getInclude().isEmpty()) { 445 addInclude(); 446 } 447 return getInclude().get(0); 448 } 449 450 /** 451 * @return {@link #exclude} (Exclude one or more codes from the value set based on code system filters and/or other value sets.) 452 */ 453 public List<ConceptSetComponent> getExclude() { 454 if (this.exclude == null) 455 this.exclude = new ArrayList<ConceptSetComponent>(); 456 return this.exclude; 457 } 458 459 /** 460 * @return Returns a reference to <code>this</code> for easy method chaining 461 */ 462 public ValueSetComposeComponent setExclude(List<ConceptSetComponent> theExclude) { 463 this.exclude = theExclude; 464 return this; 465 } 466 467 public boolean hasExclude() { 468 if (this.exclude == null) 469 return false; 470 for (ConceptSetComponent item : this.exclude) 471 if (!item.isEmpty()) 472 return true; 473 return false; 474 } 475 476 public ConceptSetComponent addExclude() { //3 477 ConceptSetComponent t = new ConceptSetComponent(); 478 if (this.exclude == null) 479 this.exclude = new ArrayList<ConceptSetComponent>(); 480 this.exclude.add(t); 481 return t; 482 } 483 484 public ValueSetComposeComponent addExclude(ConceptSetComponent t) { //3 485 if (t == null) 486 return this; 487 if (this.exclude == null) 488 this.exclude = new ArrayList<ConceptSetComponent>(); 489 this.exclude.add(t); 490 return this; 491 } 492 493 /** 494 * @return The first repetition of repeating field {@link #exclude}, creating it if it does not already exist 495 */ 496 public ConceptSetComponent getExcludeFirstRep() { 497 if (getExclude().isEmpty()) { 498 addExclude(); 499 } 500 return getExclude().get(0); 501 } 502 503 protected void listChildren(List<Property> children) { 504 super.listChildren(children); 505 children.add(new Property("lockedDate", "date", "The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.", 0, 1, lockedDate)); 506 children.add(new Property("inactive", "boolean", "Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).", 0, 1, inactive)); 507 children.add(new Property("include", "", "Include one or more codes from a code system or other value set(s).", 0, java.lang.Integer.MAX_VALUE, include)); 508 children.add(new Property("exclude", "@ValueSet.compose.include", "Exclude one or more codes from the value set based on code system filters and/or other value sets.", 0, java.lang.Integer.MAX_VALUE, exclude)); 509 } 510 511 @Override 512 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 513 switch (_hash) { 514 case 1391591896: /*lockedDate*/ return new Property("lockedDate", "date", "The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.", 0, 1, lockedDate); 515 case 24665195: /*inactive*/ return new Property("inactive", "boolean", "Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).", 0, 1, inactive); 516 case 1942574248: /*include*/ return new Property("include", "", "Include one or more codes from a code system or other value set(s).", 0, java.lang.Integer.MAX_VALUE, include); 517 case -1321148966: /*exclude*/ return new Property("exclude", "@ValueSet.compose.include", "Exclude one or more codes from the value set based on code system filters and/or other value sets.", 0, java.lang.Integer.MAX_VALUE, exclude); 518 default: return super.getNamedProperty(_hash, _name, _checkValid); 519 } 520 521 } 522 523 @Override 524 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 525 switch (hash) { 526 case 1391591896: /*lockedDate*/ return this.lockedDate == null ? new Base[0] : new Base[] {this.lockedDate}; // DateType 527 case 24665195: /*inactive*/ return this.inactive == null ? new Base[0] : new Base[] {this.inactive}; // BooleanType 528 case 1942574248: /*include*/ return this.include == null ? new Base[0] : this.include.toArray(new Base[this.include.size()]); // ConceptSetComponent 529 case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : this.exclude.toArray(new Base[this.exclude.size()]); // ConceptSetComponent 530 default: return super.getProperty(hash, name, checkValid); 531 } 532 533 } 534 535 @Override 536 public Base setProperty(int hash, String name, Base value) throws FHIRException { 537 switch (hash) { 538 case 1391591896: // lockedDate 539 this.lockedDate = castToDate(value); // DateType 540 return value; 541 case 24665195: // inactive 542 this.inactive = castToBoolean(value); // BooleanType 543 return value; 544 case 1942574248: // include 545 this.getInclude().add((ConceptSetComponent) value); // ConceptSetComponent 546 return value; 547 case -1321148966: // exclude 548 this.getExclude().add((ConceptSetComponent) value); // ConceptSetComponent 549 return value; 550 default: return super.setProperty(hash, name, value); 551 } 552 553 } 554 555 @Override 556 public Base setProperty(String name, Base value) throws FHIRException { 557 if (name.equals("lockedDate")) { 558 this.lockedDate = castToDate(value); // DateType 559 } else if (name.equals("inactive")) { 560 this.inactive = castToBoolean(value); // BooleanType 561 } else if (name.equals("include")) { 562 this.getInclude().add((ConceptSetComponent) value); 563 } else if (name.equals("exclude")) { 564 this.getExclude().add((ConceptSetComponent) value); 565 } else 566 return super.setProperty(name, value); 567 return value; 568 } 569 570 @Override 571 public Base makeProperty(int hash, String name) throws FHIRException { 572 switch (hash) { 573 case 1391591896: return getLockedDateElement(); 574 case 24665195: return getInactiveElement(); 575 case 1942574248: return addInclude(); 576 case -1321148966: return addExclude(); 577 default: return super.makeProperty(hash, name); 578 } 579 580 } 581 582 @Override 583 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 584 switch (hash) { 585 case 1391591896: /*lockedDate*/ return new String[] {"date"}; 586 case 24665195: /*inactive*/ return new String[] {"boolean"}; 587 case 1942574248: /*include*/ return new String[] {}; 588 case -1321148966: /*exclude*/ return new String[] {"@ValueSet.compose.include"}; 589 default: return super.getTypesForProperty(hash, name); 590 } 591 592 } 593 594 @Override 595 public Base addChild(String name) throws FHIRException { 596 if (name.equals("lockedDate")) { 597 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.lockedDate"); 598 } 599 else if (name.equals("inactive")) { 600 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.inactive"); 601 } 602 else if (name.equals("include")) { 603 return addInclude(); 604 } 605 else if (name.equals("exclude")) { 606 return addExclude(); 607 } 608 else 609 return super.addChild(name); 610 } 611 612 public ValueSetComposeComponent copy() { 613 ValueSetComposeComponent dst = new ValueSetComposeComponent(); 614 copyValues(dst); 615 return dst; 616 } 617 618 public void copyValues(ValueSetComposeComponent dst) { 619 super.copyValues(dst); 620 dst.lockedDate = lockedDate == null ? null : lockedDate.copy(); 621 dst.inactive = inactive == null ? null : inactive.copy(); 622 if (include != null) { 623 dst.include = new ArrayList<ConceptSetComponent>(); 624 for (ConceptSetComponent i : include) 625 dst.include.add(i.copy()); 626 }; 627 if (exclude != null) { 628 dst.exclude = new ArrayList<ConceptSetComponent>(); 629 for (ConceptSetComponent i : exclude) 630 dst.exclude.add(i.copy()); 631 }; 632 } 633 634 @Override 635 public boolean equalsDeep(Base other_) { 636 if (!super.equalsDeep(other_)) 637 return false; 638 if (!(other_ instanceof ValueSetComposeComponent)) 639 return false; 640 ValueSetComposeComponent o = (ValueSetComposeComponent) other_; 641 return compareDeep(lockedDate, o.lockedDate, true) && compareDeep(inactive, o.inactive, true) && compareDeep(include, o.include, true) 642 && compareDeep(exclude, o.exclude, true); 643 } 644 645 @Override 646 public boolean equalsShallow(Base other_) { 647 if (!super.equalsShallow(other_)) 648 return false; 649 if (!(other_ instanceof ValueSetComposeComponent)) 650 return false; 651 ValueSetComposeComponent o = (ValueSetComposeComponent) other_; 652 return compareValues(lockedDate, o.lockedDate, true) && compareValues(inactive, o.inactive, true); 653 } 654 655 public boolean isEmpty() { 656 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(lockedDate, inactive, include 657 , exclude); 658 } 659 660 public String fhirType() { 661 return "ValueSet.compose"; 662 663 } 664 665 } 666 667 @Block() 668 public static class ConceptSetComponent extends BackboneElement implements IBaseBackboneElement { 669 /** 670 * An absolute URI which is the code system from which the selected codes come from. 671 */ 672 @Child(name = "system", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=true) 673 @Description(shortDefinition="The system the codes come from", formalDefinition="An absolute URI which is the code system from which the selected codes come from." ) 674 protected UriType system; 675 676 /** 677 * The version of the code system that the codes are selected from, or the special version '*' for all versions. 678 */ 679 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 680 @Description(shortDefinition="Specific version of the code system referred to", formalDefinition="The version of the code system that the codes are selected from, or the special version '*' for all versions." ) 681 protected StringType version; 682 683 /** 684 * Specifies a concept to be included or excluded. 685 */ 686 @Child(name = "concept", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 687 @Description(shortDefinition="A concept defined in the system", formalDefinition="Specifies a concept to be included or excluded." ) 688 protected List<ConceptReferenceComponent> concept; 689 690 /** 691 * Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true. 692 */ 693 @Child(name = "filter", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 694 @Description(shortDefinition="Select codes/concepts by their properties (including relationships)", formalDefinition="Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true." ) 695 protected List<ConceptSetFilterComponent> filter; 696 697 /** 698 * Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets. 699 */ 700 @Child(name = "valueSet", type = {CanonicalType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 701 @Description(shortDefinition="Select the contents included in this value set", formalDefinition="Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets." ) 702 protected List<CanonicalType> valueSet; 703 704 private static final long serialVersionUID = 969391146L; 705 706 /** 707 * Constructor 708 */ 709 public ConceptSetComponent() { 710 super(); 711 } 712 713 /** 714 * @return {@link #system} (An absolute URI which is the code system from which the selected codes come from.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value 715 */ 716 public UriType getSystemElement() { 717 if (this.system == null) 718 if (Configuration.errorOnAutoCreate()) 719 throw new Error("Attempt to auto-create ConceptSetComponent.system"); 720 else if (Configuration.doAutoCreate()) 721 this.system = new UriType(); // bb 722 return this.system; 723 } 724 725 public boolean hasSystemElement() { 726 return this.system != null && !this.system.isEmpty(); 727 } 728 729 public boolean hasSystem() { 730 return this.system != null && !this.system.isEmpty(); 731 } 732 733 /** 734 * @param value {@link #system} (An absolute URI which is the code system from which the selected codes come from.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value 735 */ 736 public ConceptSetComponent setSystemElement(UriType value) { 737 this.system = value; 738 return this; 739 } 740 741 /** 742 * @return An absolute URI which is the code system from which the selected codes come from. 743 */ 744 public String getSystem() { 745 return this.system == null ? null : this.system.getValue(); 746 } 747 748 /** 749 * @param value An absolute URI which is the code system from which the selected codes come from. 750 */ 751 public ConceptSetComponent setSystem(String value) { 752 if (Utilities.noString(value)) 753 this.system = null; 754 else { 755 if (this.system == null) 756 this.system = new UriType(); 757 this.system.setValue(value); 758 } 759 return this; 760 } 761 762 /** 763 * @return {@link #version} (The version of the code system that the codes are selected from, or the special version '*' for all versions.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 764 */ 765 public StringType getVersionElement() { 766 if (this.version == null) 767 if (Configuration.errorOnAutoCreate()) 768 throw new Error("Attempt to auto-create ConceptSetComponent.version"); 769 else if (Configuration.doAutoCreate()) 770 this.version = new StringType(); // bb 771 return this.version; 772 } 773 774 public boolean hasVersionElement() { 775 return this.version != null && !this.version.isEmpty(); 776 } 777 778 public boolean hasVersion() { 779 return this.version != null && !this.version.isEmpty(); 780 } 781 782 /** 783 * @param value {@link #version} (The version of the code system that the codes are selected from, or the special version '*' for all versions.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 784 */ 785 public ConceptSetComponent setVersionElement(StringType value) { 786 this.version = value; 787 return this; 788 } 789 790 /** 791 * @return The version of the code system that the codes are selected from, or the special version '*' for all versions. 792 */ 793 public String getVersion() { 794 return this.version == null ? null : this.version.getValue(); 795 } 796 797 /** 798 * @param value The version of the code system that the codes are selected from, or the special version '*' for all versions. 799 */ 800 public ConceptSetComponent setVersion(String value) { 801 if (Utilities.noString(value)) 802 this.version = null; 803 else { 804 if (this.version == null) 805 this.version = new StringType(); 806 this.version.setValue(value); 807 } 808 return this; 809 } 810 811 /** 812 * @return {@link #concept} (Specifies a concept to be included or excluded.) 813 */ 814 public List<ConceptReferenceComponent> getConcept() { 815 if (this.concept == null) 816 this.concept = new ArrayList<ConceptReferenceComponent>(); 817 return this.concept; 818 } 819 820 /** 821 * @return Returns a reference to <code>this</code> for easy method chaining 822 */ 823 public ConceptSetComponent setConcept(List<ConceptReferenceComponent> theConcept) { 824 this.concept = theConcept; 825 return this; 826 } 827 828 public boolean hasConcept() { 829 if (this.concept == null) 830 return false; 831 for (ConceptReferenceComponent item : this.concept) 832 if (!item.isEmpty()) 833 return true; 834 return false; 835 } 836 837 public ConceptReferenceComponent addConcept() { //3 838 ConceptReferenceComponent t = new ConceptReferenceComponent(); 839 if (this.concept == null) 840 this.concept = new ArrayList<ConceptReferenceComponent>(); 841 this.concept.add(t); 842 return t; 843 } 844 845 public ConceptSetComponent addConcept(ConceptReferenceComponent t) { //3 846 if (t == null) 847 return this; 848 if (this.concept == null) 849 this.concept = new ArrayList<ConceptReferenceComponent>(); 850 this.concept.add(t); 851 return this; 852 } 853 854 /** 855 * @return The first repetition of repeating field {@link #concept}, creating it if it does not already exist 856 */ 857 public ConceptReferenceComponent getConceptFirstRep() { 858 if (getConcept().isEmpty()) { 859 addConcept(); 860 } 861 return getConcept().get(0); 862 } 863 864 /** 865 * @return {@link #filter} (Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.) 866 */ 867 public List<ConceptSetFilterComponent> getFilter() { 868 if (this.filter == null) 869 this.filter = new ArrayList<ConceptSetFilterComponent>(); 870 return this.filter; 871 } 872 873 /** 874 * @return Returns a reference to <code>this</code> for easy method chaining 875 */ 876 public ConceptSetComponent setFilter(List<ConceptSetFilterComponent> theFilter) { 877 this.filter = theFilter; 878 return this; 879 } 880 881 public boolean hasFilter() { 882 if (this.filter == null) 883 return false; 884 for (ConceptSetFilterComponent item : this.filter) 885 if (!item.isEmpty()) 886 return true; 887 return false; 888 } 889 890 public ConceptSetFilterComponent addFilter() { //3 891 ConceptSetFilterComponent t = new ConceptSetFilterComponent(); 892 if (this.filter == null) 893 this.filter = new ArrayList<ConceptSetFilterComponent>(); 894 this.filter.add(t); 895 return t; 896 } 897 898 public ConceptSetComponent addFilter(ConceptSetFilterComponent t) { //3 899 if (t == null) 900 return this; 901 if (this.filter == null) 902 this.filter = new ArrayList<ConceptSetFilterComponent>(); 903 this.filter.add(t); 904 return this; 905 } 906 907 /** 908 * @return The first repetition of repeating field {@link #filter}, creating it if it does not already exist 909 */ 910 public ConceptSetFilterComponent getFilterFirstRep() { 911 if (getFilter().isEmpty()) { 912 addFilter(); 913 } 914 return getFilter().get(0); 915 } 916 917 /** 918 * @return {@link #valueSet} (Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.) 919 */ 920 public List<CanonicalType> getValueSet() { 921 if (this.valueSet == null) 922 this.valueSet = new ArrayList<CanonicalType>(); 923 return this.valueSet; 924 } 925 926 /** 927 * @return Returns a reference to <code>this</code> for easy method chaining 928 */ 929 public ConceptSetComponent setValueSet(List<CanonicalType> theValueSet) { 930 this.valueSet = theValueSet; 931 return this; 932 } 933 934 public boolean hasValueSet() { 935 if (this.valueSet == null) 936 return false; 937 for (CanonicalType item : this.valueSet) 938 if (!item.isEmpty()) 939 return true; 940 return false; 941 } 942 943 /** 944 * @return {@link #valueSet} (Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.) 945 */ 946 public CanonicalType addValueSetElement() {//2 947 CanonicalType t = new CanonicalType(); 948 if (this.valueSet == null) 949 this.valueSet = new ArrayList<CanonicalType>(); 950 this.valueSet.add(t); 951 return t; 952 } 953 954 /** 955 * @param value {@link #valueSet} (Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.) 956 */ 957 public ConceptSetComponent addValueSet(String value) { //1 958 CanonicalType t = new CanonicalType(); 959 t.setValue(value); 960 if (this.valueSet == null) 961 this.valueSet = new ArrayList<CanonicalType>(); 962 this.valueSet.add(t); 963 return this; 964 } 965 966 /** 967 * @param value {@link #valueSet} (Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.) 968 */ 969 public boolean hasValueSet(String value) { 970 if (this.valueSet == null) 971 return false; 972 for (CanonicalType v : this.valueSet) 973 if (v.getValue().equals(value)) // canonical(ValueSet) 974 return true; 975 return false; 976 } 977 978 protected void listChildren(List<Property> children) { 979 super.listChildren(children); 980 children.add(new Property("system", "uri", "An absolute URI which is the code system from which the selected codes come from.", 0, 1, system)); 981 children.add(new Property("version", "string", "The version of the code system that the codes are selected from, or the special version '*' for all versions.", 0, 1, version)); 982 children.add(new Property("concept", "", "Specifies a concept to be included or excluded.", 0, java.lang.Integer.MAX_VALUE, concept)); 983 children.add(new Property("filter", "", "Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.", 0, java.lang.Integer.MAX_VALUE, filter)); 984 children.add(new Property("valueSet", "canonical(ValueSet)", "Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.", 0, java.lang.Integer.MAX_VALUE, valueSet)); 985 } 986 987 @Override 988 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 989 switch (_hash) { 990 case -887328209: /*system*/ return new Property("system", "uri", "An absolute URI which is the code system from which the selected codes come from.", 0, 1, system); 991 case 351608024: /*version*/ return new Property("version", "string", "The version of the code system that the codes are selected from, or the special version '*' for all versions.", 0, 1, version); 992 case 951024232: /*concept*/ return new Property("concept", "", "Specifies a concept to be included or excluded.", 0, java.lang.Integer.MAX_VALUE, concept); 993 case -1274492040: /*filter*/ return new Property("filter", "", "Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.", 0, java.lang.Integer.MAX_VALUE, filter); 994 case -1410174671: /*valueSet*/ return new Property("valueSet", "canonical(ValueSet)", "Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.", 0, java.lang.Integer.MAX_VALUE, valueSet); 995 default: return super.getNamedProperty(_hash, _name, _checkValid); 996 } 997 998 } 999 1000 @Override 1001 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1002 switch (hash) { 1003 case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType 1004 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 1005 case 951024232: /*concept*/ return this.concept == null ? new Base[0] : this.concept.toArray(new Base[this.concept.size()]); // ConceptReferenceComponent 1006 case -1274492040: /*filter*/ return this.filter == null ? new Base[0] : this.filter.toArray(new Base[this.filter.size()]); // ConceptSetFilterComponent 1007 case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : this.valueSet.toArray(new Base[this.valueSet.size()]); // CanonicalType 1008 default: return super.getProperty(hash, name, checkValid); 1009 } 1010 1011 } 1012 1013 @Override 1014 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1015 switch (hash) { 1016 case -887328209: // system 1017 this.system = castToUri(value); // UriType 1018 return value; 1019 case 351608024: // version 1020 this.version = castToString(value); // StringType 1021 return value; 1022 case 951024232: // concept 1023 this.getConcept().add((ConceptReferenceComponent) value); // ConceptReferenceComponent 1024 return value; 1025 case -1274492040: // filter 1026 this.getFilter().add((ConceptSetFilterComponent) value); // ConceptSetFilterComponent 1027 return value; 1028 case -1410174671: // valueSet 1029 this.getValueSet().add(castToCanonical(value)); // CanonicalType 1030 return value; 1031 default: return super.setProperty(hash, name, value); 1032 } 1033 1034 } 1035 1036 @Override 1037 public Base setProperty(String name, Base value) throws FHIRException { 1038 if (name.equals("system")) { 1039 this.system = castToUri(value); // UriType 1040 } else if (name.equals("version")) { 1041 this.version = castToString(value); // StringType 1042 } else if (name.equals("concept")) { 1043 this.getConcept().add((ConceptReferenceComponent) value); 1044 } else if (name.equals("filter")) { 1045 this.getFilter().add((ConceptSetFilterComponent) value); 1046 } else if (name.equals("valueSet")) { 1047 this.getValueSet().add(castToCanonical(value)); 1048 } else 1049 return super.setProperty(name, value); 1050 return value; 1051 } 1052 1053 @Override 1054 public Base makeProperty(int hash, String name) throws FHIRException { 1055 switch (hash) { 1056 case -887328209: return getSystemElement(); 1057 case 351608024: return getVersionElement(); 1058 case 951024232: return addConcept(); 1059 case -1274492040: return addFilter(); 1060 case -1410174671: return addValueSetElement(); 1061 default: return super.makeProperty(hash, name); 1062 } 1063 1064 } 1065 1066 @Override 1067 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1068 switch (hash) { 1069 case -887328209: /*system*/ return new String[] {"uri"}; 1070 case 351608024: /*version*/ return new String[] {"string"}; 1071 case 951024232: /*concept*/ return new String[] {}; 1072 case -1274492040: /*filter*/ return new String[] {}; 1073 case -1410174671: /*valueSet*/ return new String[] {"canonical"}; 1074 default: return super.getTypesForProperty(hash, name); 1075 } 1076 1077 } 1078 1079 @Override 1080 public Base addChild(String name) throws FHIRException { 1081 if (name.equals("system")) { 1082 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.system"); 1083 } 1084 else if (name.equals("version")) { 1085 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version"); 1086 } 1087 else if (name.equals("concept")) { 1088 return addConcept(); 1089 } 1090 else if (name.equals("filter")) { 1091 return addFilter(); 1092 } 1093 else if (name.equals("valueSet")) { 1094 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.valueSet"); 1095 } 1096 else 1097 return super.addChild(name); 1098 } 1099 1100 public ConceptSetComponent copy() { 1101 ConceptSetComponent dst = new ConceptSetComponent(); 1102 copyValues(dst); 1103 return dst; 1104 } 1105 1106 public void copyValues(ConceptSetComponent dst) { 1107 super.copyValues(dst); 1108 dst.system = system == null ? null : system.copy(); 1109 dst.version = version == null ? null : version.copy(); 1110 if (concept != null) { 1111 dst.concept = new ArrayList<ConceptReferenceComponent>(); 1112 for (ConceptReferenceComponent i : concept) 1113 dst.concept.add(i.copy()); 1114 }; 1115 if (filter != null) { 1116 dst.filter = new ArrayList<ConceptSetFilterComponent>(); 1117 for (ConceptSetFilterComponent i : filter) 1118 dst.filter.add(i.copy()); 1119 }; 1120 if (valueSet != null) { 1121 dst.valueSet = new ArrayList<CanonicalType>(); 1122 for (CanonicalType i : valueSet) 1123 dst.valueSet.add(i.copy()); 1124 }; 1125 } 1126 1127 @Override 1128 public boolean equalsDeep(Base other_) { 1129 if (!super.equalsDeep(other_)) 1130 return false; 1131 if (!(other_ instanceof ConceptSetComponent)) 1132 return false; 1133 ConceptSetComponent o = (ConceptSetComponent) other_; 1134 return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(concept, o.concept, true) 1135 && compareDeep(filter, o.filter, true) && compareDeep(valueSet, o.valueSet, true); 1136 } 1137 1138 @Override 1139 public boolean equalsShallow(Base other_) { 1140 if (!super.equalsShallow(other_)) 1141 return false; 1142 if (!(other_ instanceof ConceptSetComponent)) 1143 return false; 1144 ConceptSetComponent o = (ConceptSetComponent) other_; 1145 return compareValues(system, o.system, true) && compareValues(version, o.version, true); 1146 } 1147 1148 public boolean isEmpty() { 1149 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version, concept 1150 , filter, valueSet); 1151 } 1152 1153 public String fhirType() { 1154 return "ValueSet.compose.include"; 1155 1156 } 1157 1158 } 1159 1160 @Block() 1161 public static class ConceptReferenceComponent extends BackboneElement implements IBaseBackboneElement { 1162 /** 1163 * Specifies a code for the concept to be included or excluded. 1164 */ 1165 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1166 @Description(shortDefinition="Code or expression from system", formalDefinition="Specifies a code for the concept to be included or excluded." ) 1167 protected CodeType code; 1168 1169 /** 1170 * The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system. 1171 */ 1172 @Child(name = "display", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1173 @Description(shortDefinition="Text to display for this code for this value set in this valueset", formalDefinition="The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system." ) 1174 protected StringType display; 1175 1176 /** 1177 * Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc. 1178 */ 1179 @Child(name = "designation", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1180 @Description(shortDefinition="Additional representations for this concept", formalDefinition="Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc." ) 1181 protected List<ConceptReferenceDesignationComponent> designation; 1182 1183 private static final long serialVersionUID = 260579971L; 1184 1185 /** 1186 * Constructor 1187 */ 1188 public ConceptReferenceComponent() { 1189 super(); 1190 } 1191 1192 /** 1193 * Constructor 1194 */ 1195 public ConceptReferenceComponent(CodeType code) { 1196 super(); 1197 this.code = code; 1198 } 1199 1200 /** 1201 * @return {@link #code} (Specifies a code for the concept to be included or excluded.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1202 */ 1203 public CodeType getCodeElement() { 1204 if (this.code == null) 1205 if (Configuration.errorOnAutoCreate()) 1206 throw new Error("Attempt to auto-create ConceptReferenceComponent.code"); 1207 else if (Configuration.doAutoCreate()) 1208 this.code = new CodeType(); // bb 1209 return this.code; 1210 } 1211 1212 public boolean hasCodeElement() { 1213 return this.code != null && !this.code.isEmpty(); 1214 } 1215 1216 public boolean hasCode() { 1217 return this.code != null && !this.code.isEmpty(); 1218 } 1219 1220 /** 1221 * @param value {@link #code} (Specifies a code for the concept to be included or excluded.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1222 */ 1223 public ConceptReferenceComponent setCodeElement(CodeType value) { 1224 this.code = value; 1225 return this; 1226 } 1227 1228 /** 1229 * @return Specifies a code for the concept to be included or excluded. 1230 */ 1231 public String getCode() { 1232 return this.code == null ? null : this.code.getValue(); 1233 } 1234 1235 /** 1236 * @param value Specifies a code for the concept to be included or excluded. 1237 */ 1238 public ConceptReferenceComponent setCode(String value) { 1239 if (this.code == null) 1240 this.code = new CodeType(); 1241 this.code.setValue(value); 1242 return this; 1243 } 1244 1245 /** 1246 * @return {@link #display} (The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 1247 */ 1248 public StringType getDisplayElement() { 1249 if (this.display == null) 1250 if (Configuration.errorOnAutoCreate()) 1251 throw new Error("Attempt to auto-create ConceptReferenceComponent.display"); 1252 else if (Configuration.doAutoCreate()) 1253 this.display = new StringType(); // bb 1254 return this.display; 1255 } 1256 1257 public boolean hasDisplayElement() { 1258 return this.display != null && !this.display.isEmpty(); 1259 } 1260 1261 public boolean hasDisplay() { 1262 return this.display != null && !this.display.isEmpty(); 1263 } 1264 1265 /** 1266 * @param value {@link #display} (The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 1267 */ 1268 public ConceptReferenceComponent setDisplayElement(StringType value) { 1269 this.display = value; 1270 return this; 1271 } 1272 1273 /** 1274 * @return The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system. 1275 */ 1276 public String getDisplay() { 1277 return this.display == null ? null : this.display.getValue(); 1278 } 1279 1280 /** 1281 * @param value The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system. 1282 */ 1283 public ConceptReferenceComponent setDisplay(String value) { 1284 if (Utilities.noString(value)) 1285 this.display = null; 1286 else { 1287 if (this.display == null) 1288 this.display = new StringType(); 1289 this.display.setValue(value); 1290 } 1291 return this; 1292 } 1293 1294 /** 1295 * @return {@link #designation} (Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.) 1296 */ 1297 public List<ConceptReferenceDesignationComponent> getDesignation() { 1298 if (this.designation == null) 1299 this.designation = new ArrayList<ConceptReferenceDesignationComponent>(); 1300 return this.designation; 1301 } 1302 1303 /** 1304 * @return Returns a reference to <code>this</code> for easy method chaining 1305 */ 1306 public ConceptReferenceComponent setDesignation(List<ConceptReferenceDesignationComponent> theDesignation) { 1307 this.designation = theDesignation; 1308 return this; 1309 } 1310 1311 public boolean hasDesignation() { 1312 if (this.designation == null) 1313 return false; 1314 for (ConceptReferenceDesignationComponent item : this.designation) 1315 if (!item.isEmpty()) 1316 return true; 1317 return false; 1318 } 1319 1320 public ConceptReferenceDesignationComponent addDesignation() { //3 1321 ConceptReferenceDesignationComponent t = new ConceptReferenceDesignationComponent(); 1322 if (this.designation == null) 1323 this.designation = new ArrayList<ConceptReferenceDesignationComponent>(); 1324 this.designation.add(t); 1325 return t; 1326 } 1327 1328 public ConceptReferenceComponent addDesignation(ConceptReferenceDesignationComponent t) { //3 1329 if (t == null) 1330 return this; 1331 if (this.designation == null) 1332 this.designation = new ArrayList<ConceptReferenceDesignationComponent>(); 1333 this.designation.add(t); 1334 return this; 1335 } 1336 1337 /** 1338 * @return The first repetition of repeating field {@link #designation}, creating it if it does not already exist 1339 */ 1340 public ConceptReferenceDesignationComponent getDesignationFirstRep() { 1341 if (getDesignation().isEmpty()) { 1342 addDesignation(); 1343 } 1344 return getDesignation().get(0); 1345 } 1346 1347 protected void listChildren(List<Property> children) { 1348 super.listChildren(children); 1349 children.add(new Property("code", "code", "Specifies a code for the concept to be included or excluded.", 0, 1, code)); 1350 children.add(new Property("display", "string", "The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.", 0, 1, display)); 1351 children.add(new Property("designation", "", "Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.", 0, java.lang.Integer.MAX_VALUE, designation)); 1352 } 1353 1354 @Override 1355 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1356 switch (_hash) { 1357 case 3059181: /*code*/ return new Property("code", "code", "Specifies a code for the concept to be included or excluded.", 0, 1, code); 1358 case 1671764162: /*display*/ return new Property("display", "string", "The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.", 0, 1, display); 1359 case -900931593: /*designation*/ return new Property("designation", "", "Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.", 0, java.lang.Integer.MAX_VALUE, designation); 1360 default: return super.getNamedProperty(_hash, _name, _checkValid); 1361 } 1362 1363 } 1364 1365 @Override 1366 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1367 switch (hash) { 1368 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType 1369 case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType 1370 case -900931593: /*designation*/ return this.designation == null ? new Base[0] : this.designation.toArray(new Base[this.designation.size()]); // ConceptReferenceDesignationComponent 1371 default: return super.getProperty(hash, name, checkValid); 1372 } 1373 1374 } 1375 1376 @Override 1377 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1378 switch (hash) { 1379 case 3059181: // code 1380 this.code = castToCode(value); // CodeType 1381 return value; 1382 case 1671764162: // display 1383 this.display = castToString(value); // StringType 1384 return value; 1385 case -900931593: // designation 1386 this.getDesignation().add((ConceptReferenceDesignationComponent) value); // ConceptReferenceDesignationComponent 1387 return value; 1388 default: return super.setProperty(hash, name, value); 1389 } 1390 1391 } 1392 1393 @Override 1394 public Base setProperty(String name, Base value) throws FHIRException { 1395 if (name.equals("code")) { 1396 this.code = castToCode(value); // CodeType 1397 } else if (name.equals("display")) { 1398 this.display = castToString(value); // StringType 1399 } else if (name.equals("designation")) { 1400 this.getDesignation().add((ConceptReferenceDesignationComponent) value); 1401 } else 1402 return super.setProperty(name, value); 1403 return value; 1404 } 1405 1406 @Override 1407 public Base makeProperty(int hash, String name) throws FHIRException { 1408 switch (hash) { 1409 case 3059181: return getCodeElement(); 1410 case 1671764162: return getDisplayElement(); 1411 case -900931593: return addDesignation(); 1412 default: return super.makeProperty(hash, name); 1413 } 1414 1415 } 1416 1417 @Override 1418 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1419 switch (hash) { 1420 case 3059181: /*code*/ return new String[] {"code"}; 1421 case 1671764162: /*display*/ return new String[] {"string"}; 1422 case -900931593: /*designation*/ return new String[] {}; 1423 default: return super.getTypesForProperty(hash, name); 1424 } 1425 1426 } 1427 1428 @Override 1429 public Base addChild(String name) throws FHIRException { 1430 if (name.equals("code")) { 1431 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code"); 1432 } 1433 else if (name.equals("display")) { 1434 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.display"); 1435 } 1436 else if (name.equals("designation")) { 1437 return addDesignation(); 1438 } 1439 else 1440 return super.addChild(name); 1441 } 1442 1443 public ConceptReferenceComponent copy() { 1444 ConceptReferenceComponent dst = new ConceptReferenceComponent(); 1445 copyValues(dst); 1446 return dst; 1447 } 1448 1449 public void copyValues(ConceptReferenceComponent dst) { 1450 super.copyValues(dst); 1451 dst.code = code == null ? null : code.copy(); 1452 dst.display = display == null ? null : display.copy(); 1453 if (designation != null) { 1454 dst.designation = new ArrayList<ConceptReferenceDesignationComponent>(); 1455 for (ConceptReferenceDesignationComponent i : designation) 1456 dst.designation.add(i.copy()); 1457 }; 1458 } 1459 1460 @Override 1461 public boolean equalsDeep(Base other_) { 1462 if (!super.equalsDeep(other_)) 1463 return false; 1464 if (!(other_ instanceof ConceptReferenceComponent)) 1465 return false; 1466 ConceptReferenceComponent o = (ConceptReferenceComponent) other_; 1467 return compareDeep(code, o.code, true) && compareDeep(display, o.display, true) && compareDeep(designation, o.designation, true) 1468 ; 1469 } 1470 1471 @Override 1472 public boolean equalsShallow(Base other_) { 1473 if (!super.equalsShallow(other_)) 1474 return false; 1475 if (!(other_ instanceof ConceptReferenceComponent)) 1476 return false; 1477 ConceptReferenceComponent o = (ConceptReferenceComponent) other_; 1478 return compareValues(code, o.code, true) && compareValues(display, o.display, true); 1479 } 1480 1481 public boolean isEmpty() { 1482 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, display, designation 1483 ); 1484 } 1485 1486 public String fhirType() { 1487 return "ValueSet.compose.include.concept"; 1488 1489 } 1490 1491 } 1492 1493 @Block() 1494 public static class ConceptReferenceDesignationComponent extends BackboneElement implements IBaseBackboneElement { 1495 /** 1496 * The language this designation is defined for. 1497 */ 1498 @Child(name = "language", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1499 @Description(shortDefinition="Human language of the designation", formalDefinition="The language this designation is defined for." ) 1500 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") 1501 protected CodeType language; 1502 1503 /** 1504 * A code that represents types of uses of designations. 1505 */ 1506 @Child(name = "use", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=false) 1507 @Description(shortDefinition="Types of uses of designations", formalDefinition="A code that represents types of uses of designations." ) 1508 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/designation-use") 1509 protected Coding use; 1510 1511 /** 1512 * The text value for this designation. 1513 */ 1514 @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false) 1515 @Description(shortDefinition="The text value for this designation", formalDefinition="The text value for this designation." ) 1516 protected StringType value; 1517 1518 private static final long serialVersionUID = 1515662414L; 1519 1520 /** 1521 * Constructor 1522 */ 1523 public ConceptReferenceDesignationComponent() { 1524 super(); 1525 } 1526 1527 /** 1528 * Constructor 1529 */ 1530 public ConceptReferenceDesignationComponent(StringType value) { 1531 super(); 1532 this.value = value; 1533 } 1534 1535 /** 1536 * @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 1537 */ 1538 public CodeType getLanguageElement() { 1539 if (this.language == null) 1540 if (Configuration.errorOnAutoCreate()) 1541 throw new Error("Attempt to auto-create ConceptReferenceDesignationComponent.language"); 1542 else if (Configuration.doAutoCreate()) 1543 this.language = new CodeType(); // bb 1544 return this.language; 1545 } 1546 1547 public boolean hasLanguageElement() { 1548 return this.language != null && !this.language.isEmpty(); 1549 } 1550 1551 public boolean hasLanguage() { 1552 return this.language != null && !this.language.isEmpty(); 1553 } 1554 1555 /** 1556 * @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 1557 */ 1558 public ConceptReferenceDesignationComponent setLanguageElement(CodeType value) { 1559 this.language = value; 1560 return this; 1561 } 1562 1563 /** 1564 * @return The language this designation is defined for. 1565 */ 1566 public String getLanguage() { 1567 return this.language == null ? null : this.language.getValue(); 1568 } 1569 1570 /** 1571 * @param value The language this designation is defined for. 1572 */ 1573 public ConceptReferenceDesignationComponent setLanguage(String value) { 1574 if (Utilities.noString(value)) 1575 this.language = null; 1576 else { 1577 if (this.language == null) 1578 this.language = new CodeType(); 1579 this.language.setValue(value); 1580 } 1581 return this; 1582 } 1583 1584 /** 1585 * @return {@link #use} (A code that represents types of uses of designations.) 1586 */ 1587 public Coding getUse() { 1588 if (this.use == null) 1589 if (Configuration.errorOnAutoCreate()) 1590 throw new Error("Attempt to auto-create ConceptReferenceDesignationComponent.use"); 1591 else if (Configuration.doAutoCreate()) 1592 this.use = new Coding(); // cc 1593 return this.use; 1594 } 1595 1596 public boolean hasUse() { 1597 return this.use != null && !this.use.isEmpty(); 1598 } 1599 1600 /** 1601 * @param value {@link #use} (A code that represents types of uses of designations.) 1602 */ 1603 public ConceptReferenceDesignationComponent setUse(Coding value) { 1604 this.use = value; 1605 return this; 1606 } 1607 1608 /** 1609 * @return {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 1610 */ 1611 public StringType getValueElement() { 1612 if (this.value == null) 1613 if (Configuration.errorOnAutoCreate()) 1614 throw new Error("Attempt to auto-create ConceptReferenceDesignationComponent.value"); 1615 else if (Configuration.doAutoCreate()) 1616 this.value = new StringType(); // bb 1617 return this.value; 1618 } 1619 1620 public boolean hasValueElement() { 1621 return this.value != null && !this.value.isEmpty(); 1622 } 1623 1624 public boolean hasValue() { 1625 return this.value != null && !this.value.isEmpty(); 1626 } 1627 1628 /** 1629 * @param value {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 1630 */ 1631 public ConceptReferenceDesignationComponent setValueElement(StringType value) { 1632 this.value = value; 1633 return this; 1634 } 1635 1636 /** 1637 * @return The text value for this designation. 1638 */ 1639 public String getValue() { 1640 return this.value == null ? null : this.value.getValue(); 1641 } 1642 1643 /** 1644 * @param value The text value for this designation. 1645 */ 1646 public ConceptReferenceDesignationComponent setValue(String value) { 1647 if (this.value == null) 1648 this.value = new StringType(); 1649 this.value.setValue(value); 1650 return this; 1651 } 1652 1653 protected void listChildren(List<Property> children) { 1654 super.listChildren(children); 1655 children.add(new Property("language", "code", "The language this designation is defined for.", 0, 1, language)); 1656 children.add(new Property("use", "Coding", "A code that represents types of uses of designations.", 0, 1, use)); 1657 children.add(new Property("value", "string", "The text value for this designation.", 0, 1, value)); 1658 } 1659 1660 @Override 1661 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1662 switch (_hash) { 1663 case -1613589672: /*language*/ return new Property("language", "code", "The language this designation is defined for.", 0, 1, language); 1664 case 116103: /*use*/ return new Property("use", "Coding", "A code that represents types of uses of designations.", 0, 1, use); 1665 case 111972721: /*value*/ return new Property("value", "string", "The text value for this designation.", 0, 1, value); 1666 default: return super.getNamedProperty(_hash, _name, _checkValid); 1667 } 1668 1669 } 1670 1671 @Override 1672 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1673 switch (hash) { 1674 case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType 1675 case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Coding 1676 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 1677 default: return super.getProperty(hash, name, checkValid); 1678 } 1679 1680 } 1681 1682 @Override 1683 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1684 switch (hash) { 1685 case -1613589672: // language 1686 this.language = castToCode(value); // CodeType 1687 return value; 1688 case 116103: // use 1689 this.use = castToCoding(value); // Coding 1690 return value; 1691 case 111972721: // value 1692 this.value = castToString(value); // StringType 1693 return value; 1694 default: return super.setProperty(hash, name, value); 1695 } 1696 1697 } 1698 1699 @Override 1700 public Base setProperty(String name, Base value) throws FHIRException { 1701 if (name.equals("language")) { 1702 this.language = castToCode(value); // CodeType 1703 } else if (name.equals("use")) { 1704 this.use = castToCoding(value); // Coding 1705 } else if (name.equals("value")) { 1706 this.value = castToString(value); // StringType 1707 } else 1708 return super.setProperty(name, value); 1709 return value; 1710 } 1711 1712 @Override 1713 public Base makeProperty(int hash, String name) throws FHIRException { 1714 switch (hash) { 1715 case -1613589672: return getLanguageElement(); 1716 case 116103: return getUse(); 1717 case 111972721: return getValueElement(); 1718 default: return super.makeProperty(hash, name); 1719 } 1720 1721 } 1722 1723 @Override 1724 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1725 switch (hash) { 1726 case -1613589672: /*language*/ return new String[] {"code"}; 1727 case 116103: /*use*/ return new String[] {"Coding"}; 1728 case 111972721: /*value*/ return new String[] {"string"}; 1729 default: return super.getTypesForProperty(hash, name); 1730 } 1731 1732 } 1733 1734 @Override 1735 public Base addChild(String name) throws FHIRException { 1736 if (name.equals("language")) { 1737 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.language"); 1738 } 1739 else if (name.equals("use")) { 1740 this.use = new Coding(); 1741 return this.use; 1742 } 1743 else if (name.equals("value")) { 1744 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.value"); 1745 } 1746 else 1747 return super.addChild(name); 1748 } 1749 1750 public ConceptReferenceDesignationComponent copy() { 1751 ConceptReferenceDesignationComponent dst = new ConceptReferenceDesignationComponent(); 1752 copyValues(dst); 1753 return dst; 1754 } 1755 1756 public void copyValues(ConceptReferenceDesignationComponent dst) { 1757 super.copyValues(dst); 1758 dst.language = language == null ? null : language.copy(); 1759 dst.use = use == null ? null : use.copy(); 1760 dst.value = value == null ? null : value.copy(); 1761 } 1762 1763 @Override 1764 public boolean equalsDeep(Base other_) { 1765 if (!super.equalsDeep(other_)) 1766 return false; 1767 if (!(other_ instanceof ConceptReferenceDesignationComponent)) 1768 return false; 1769 ConceptReferenceDesignationComponent o = (ConceptReferenceDesignationComponent) other_; 1770 return compareDeep(language, o.language, true) && compareDeep(use, o.use, true) && compareDeep(value, o.value, true) 1771 ; 1772 } 1773 1774 @Override 1775 public boolean equalsShallow(Base other_) { 1776 if (!super.equalsShallow(other_)) 1777 return false; 1778 if (!(other_ instanceof ConceptReferenceDesignationComponent)) 1779 return false; 1780 ConceptReferenceDesignationComponent o = (ConceptReferenceDesignationComponent) other_; 1781 return compareValues(language, o.language, true) && compareValues(value, o.value, true); 1782 } 1783 1784 public boolean isEmpty() { 1785 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(language, use, value); 1786 } 1787 1788 public String fhirType() { 1789 return "ValueSet.compose.include.concept.designation"; 1790 1791 } 1792 1793 } 1794 1795 @Block() 1796 public static class ConceptSetFilterComponent extends BackboneElement implements IBaseBackboneElement { 1797 /** 1798 * A code that identifies a property or a filter defined in the code system. 1799 */ 1800 @Child(name = "property", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1801 @Description(shortDefinition="A property/filter defined by the code system", formalDefinition="A code that identifies a property or a filter defined in the code system." ) 1802 protected CodeType property; 1803 1804 /** 1805 * The kind of operation to perform as a part of the filter criteria. 1806 */ 1807 @Child(name = "op", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) 1808 @Description(shortDefinition="= | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists", formalDefinition="The kind of operation to perform as a part of the filter criteria." ) 1809 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/filter-operator") 1810 protected Enumeration<FilterOperator> op; 1811 1812 /** 1813 * The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'. 1814 */ 1815 @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true) 1816 @Description(shortDefinition="Code from the system, or regex criteria, or boolean value for exists", formalDefinition="The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'." ) 1817 protected StringType value; 1818 1819 private static final long serialVersionUID = 1259153492L; 1820 1821 /** 1822 * Constructor 1823 */ 1824 public ConceptSetFilterComponent() { 1825 super(); 1826 } 1827 1828 /** 1829 * Constructor 1830 */ 1831 public ConceptSetFilterComponent(CodeType property, Enumeration<FilterOperator> op, StringType value) { 1832 super(); 1833 this.property = property; 1834 this.op = op; 1835 this.value = value; 1836 } 1837 1838 /** 1839 * @return {@link #property} (A code that identifies a property or a filter defined in the code system.). This is the underlying object with id, value and extensions. The accessor "getProperty" gives direct access to the value 1840 */ 1841 public CodeType getPropertyElement() { 1842 if (this.property == null) 1843 if (Configuration.errorOnAutoCreate()) 1844 throw new Error("Attempt to auto-create ConceptSetFilterComponent.property"); 1845 else if (Configuration.doAutoCreate()) 1846 this.property = new CodeType(); // bb 1847 return this.property; 1848 } 1849 1850 public boolean hasPropertyElement() { 1851 return this.property != null && !this.property.isEmpty(); 1852 } 1853 1854 public boolean hasProperty() { 1855 return this.property != null && !this.property.isEmpty(); 1856 } 1857 1858 /** 1859 * @param value {@link #property} (A code that identifies a property or a filter defined in the code system.). This is the underlying object with id, value and extensions. The accessor "getProperty" gives direct access to the value 1860 */ 1861 public ConceptSetFilterComponent setPropertyElement(CodeType value) { 1862 this.property = value; 1863 return this; 1864 } 1865 1866 /** 1867 * @return A code that identifies a property or a filter defined in the code system. 1868 */ 1869 public String getProperty() { 1870 return this.property == null ? null : this.property.getValue(); 1871 } 1872 1873 /** 1874 * @param value A code that identifies a property or a filter defined in the code system. 1875 */ 1876 public ConceptSetFilterComponent setProperty(String value) { 1877 if (this.property == null) 1878 this.property = new CodeType(); 1879 this.property.setValue(value); 1880 return this; 1881 } 1882 1883 /** 1884 * @return {@link #op} (The kind of operation to perform as a part of the filter criteria.). This is the underlying object with id, value and extensions. The accessor "getOp" gives direct access to the value 1885 */ 1886 public Enumeration<FilterOperator> getOpElement() { 1887 if (this.op == null) 1888 if (Configuration.errorOnAutoCreate()) 1889 throw new Error("Attempt to auto-create ConceptSetFilterComponent.op"); 1890 else if (Configuration.doAutoCreate()) 1891 this.op = new Enumeration<FilterOperator>(new FilterOperatorEnumFactory()); // bb 1892 return this.op; 1893 } 1894 1895 public boolean hasOpElement() { 1896 return this.op != null && !this.op.isEmpty(); 1897 } 1898 1899 public boolean hasOp() { 1900 return this.op != null && !this.op.isEmpty(); 1901 } 1902 1903 /** 1904 * @param value {@link #op} (The kind of operation to perform as a part of the filter criteria.). This is the underlying object with id, value and extensions. The accessor "getOp" gives direct access to the value 1905 */ 1906 public ConceptSetFilterComponent setOpElement(Enumeration<FilterOperator> value) { 1907 this.op = value; 1908 return this; 1909 } 1910 1911 /** 1912 * @return The kind of operation to perform as a part of the filter criteria. 1913 */ 1914 public FilterOperator getOp() { 1915 return this.op == null ? null : this.op.getValue(); 1916 } 1917 1918 /** 1919 * @param value The kind of operation to perform as a part of the filter criteria. 1920 */ 1921 public ConceptSetFilterComponent setOp(FilterOperator value) { 1922 if (this.op == null) 1923 this.op = new Enumeration<FilterOperator>(new FilterOperatorEnumFactory()); 1924 this.op.setValue(value); 1925 return this; 1926 } 1927 1928 /** 1929 * @return {@link #value} (The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 1930 */ 1931 public StringType getValueElement() { 1932 if (this.value == null) 1933 if (Configuration.errorOnAutoCreate()) 1934 throw new Error("Attempt to auto-create ConceptSetFilterComponent.value"); 1935 else if (Configuration.doAutoCreate()) 1936 this.value = new StringType(); // bb 1937 return this.value; 1938 } 1939 1940 public boolean hasValueElement() { 1941 return this.value != null && !this.value.isEmpty(); 1942 } 1943 1944 public boolean hasValue() { 1945 return this.value != null && !this.value.isEmpty(); 1946 } 1947 1948 /** 1949 * @param value {@link #value} (The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 1950 */ 1951 public ConceptSetFilterComponent setValueElement(StringType value) { 1952 this.value = value; 1953 return this; 1954 } 1955 1956 /** 1957 * @return The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'. 1958 */ 1959 public String getValue() { 1960 return this.value == null ? null : this.value.getValue(); 1961 } 1962 1963 /** 1964 * @param value The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'. 1965 */ 1966 public ConceptSetFilterComponent setValue(String value) { 1967 if (this.value == null) 1968 this.value = new StringType(); 1969 this.value.setValue(value); 1970 return this; 1971 } 1972 1973 protected void listChildren(List<Property> children) { 1974 super.listChildren(children); 1975 children.add(new Property("property", "code", "A code that identifies a property or a filter defined in the code system.", 0, 1, property)); 1976 children.add(new Property("op", "code", "The kind of operation to perform as a part of the filter criteria.", 0, 1, op)); 1977 children.add(new Property("value", "string", "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", 0, 1, value)); 1978 } 1979 1980 @Override 1981 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1982 switch (_hash) { 1983 case -993141291: /*property*/ return new Property("property", "code", "A code that identifies a property or a filter defined in the code system.", 0, 1, property); 1984 case 3553: /*op*/ return new Property("op", "code", "The kind of operation to perform as a part of the filter criteria.", 0, 1, op); 1985 case 111972721: /*value*/ return new Property("value", "string", "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", 0, 1, value); 1986 default: return super.getNamedProperty(_hash, _name, _checkValid); 1987 } 1988 1989 } 1990 1991 @Override 1992 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1993 switch (hash) { 1994 case -993141291: /*property*/ return this.property == null ? new Base[0] : new Base[] {this.property}; // CodeType 1995 case 3553: /*op*/ return this.op == null ? new Base[0] : new Base[] {this.op}; // Enumeration<FilterOperator> 1996 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 1997 default: return super.getProperty(hash, name, checkValid); 1998 } 1999 2000 } 2001 2002 @Override 2003 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2004 switch (hash) { 2005 case -993141291: // property 2006 this.property = castToCode(value); // CodeType 2007 return value; 2008 case 3553: // op 2009 value = new FilterOperatorEnumFactory().fromType(castToCode(value)); 2010 this.op = (Enumeration) value; // Enumeration<FilterOperator> 2011 return value; 2012 case 111972721: // value 2013 this.value = castToString(value); // StringType 2014 return value; 2015 default: return super.setProperty(hash, name, value); 2016 } 2017 2018 } 2019 2020 @Override 2021 public Base setProperty(String name, Base value) throws FHIRException { 2022 if (name.equals("property")) { 2023 this.property = castToCode(value); // CodeType 2024 } else if (name.equals("op")) { 2025 value = new FilterOperatorEnumFactory().fromType(castToCode(value)); 2026 this.op = (Enumeration) value; // Enumeration<FilterOperator> 2027 } else if (name.equals("value")) { 2028 this.value = castToString(value); // StringType 2029 } else 2030 return super.setProperty(name, value); 2031 return value; 2032 } 2033 2034 @Override 2035 public Base makeProperty(int hash, String name) throws FHIRException { 2036 switch (hash) { 2037 case -993141291: return getPropertyElement(); 2038 case 3553: return getOpElement(); 2039 case 111972721: return getValueElement(); 2040 default: return super.makeProperty(hash, name); 2041 } 2042 2043 } 2044 2045 @Override 2046 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2047 switch (hash) { 2048 case -993141291: /*property*/ return new String[] {"code"}; 2049 case 3553: /*op*/ return new String[] {"code"}; 2050 case 111972721: /*value*/ return new String[] {"string"}; 2051 default: return super.getTypesForProperty(hash, name); 2052 } 2053 2054 } 2055 2056 @Override 2057 public Base addChild(String name) throws FHIRException { 2058 if (name.equals("property")) { 2059 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.property"); 2060 } 2061 else if (name.equals("op")) { 2062 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.op"); 2063 } 2064 else if (name.equals("value")) { 2065 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.value"); 2066 } 2067 else 2068 return super.addChild(name); 2069 } 2070 2071 public ConceptSetFilterComponent copy() { 2072 ConceptSetFilterComponent dst = new ConceptSetFilterComponent(); 2073 copyValues(dst); 2074 return dst; 2075 } 2076 2077 public void copyValues(ConceptSetFilterComponent dst) { 2078 super.copyValues(dst); 2079 dst.property = property == null ? null : property.copy(); 2080 dst.op = op == null ? null : op.copy(); 2081 dst.value = value == null ? null : value.copy(); 2082 } 2083 2084 @Override 2085 public boolean equalsDeep(Base other_) { 2086 if (!super.equalsDeep(other_)) 2087 return false; 2088 if (!(other_ instanceof ConceptSetFilterComponent)) 2089 return false; 2090 ConceptSetFilterComponent o = (ConceptSetFilterComponent) other_; 2091 return compareDeep(property, o.property, true) && compareDeep(op, o.op, true) && compareDeep(value, o.value, true) 2092 ; 2093 } 2094 2095 @Override 2096 public boolean equalsShallow(Base other_) { 2097 if (!super.equalsShallow(other_)) 2098 return false; 2099 if (!(other_ instanceof ConceptSetFilterComponent)) 2100 return false; 2101 ConceptSetFilterComponent o = (ConceptSetFilterComponent) other_; 2102 return compareValues(property, o.property, true) && compareValues(op, o.op, true) && compareValues(value, o.value, true) 2103 ; 2104 } 2105 2106 public boolean isEmpty() { 2107 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(property, op, value); 2108 } 2109 2110 public String fhirType() { 2111 return "ValueSet.compose.include.filter"; 2112 2113 } 2114 2115 } 2116 2117 @Block() 2118 public static class ValueSetExpansionComponent extends BackboneElement implements IBaseBackboneElement { 2119 /** 2120 * An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier. 2121 */ 2122 @Child(name = "identifier", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2123 @Description(shortDefinition="Identifies the value set expansion (business identifier)", formalDefinition="An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier." ) 2124 protected UriType identifier; 2125 2126 /** 2127 * The time at which the expansion was produced by the expanding system. 2128 */ 2129 @Child(name = "timestamp", type = {DateTimeType.class}, order=2, min=1, max=1, modifier=false, summary=false) 2130 @Description(shortDefinition="Time ValueSet expansion happened", formalDefinition="The time at which the expansion was produced by the expanding system." ) 2131 protected DateTimeType timestamp; 2132 2133 /** 2134 * The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter. 2135 */ 2136 @Child(name = "total", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2137 @Description(shortDefinition="Total number of codes in the expansion", formalDefinition="The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter." ) 2138 protected IntegerType total; 2139 2140 /** 2141 * If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present. 2142 */ 2143 @Child(name = "offset", type = {IntegerType.class}, order=4, min=0, max=1, modifier=false, summary=false) 2144 @Description(shortDefinition="Offset at which this resource starts", formalDefinition="If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present." ) 2145 protected IntegerType offset; 2146 2147 /** 2148 * A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion. 2149 */ 2150 @Child(name = "parameter", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2151 @Description(shortDefinition="Parameter that controlled the expansion process", formalDefinition="A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion." ) 2152 protected List<ValueSetExpansionParameterComponent> parameter; 2153 2154 /** 2155 * The codes that are contained in the value set expansion. 2156 */ 2157 @Child(name = "contains", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2158 @Description(shortDefinition="Codes in the value set", formalDefinition="The codes that are contained in the value set expansion." ) 2159 protected List<ValueSetExpansionContainsComponent> contains; 2160 2161 private static final long serialVersionUID = -43471993L; 2162 2163 /** 2164 * Constructor 2165 */ 2166 public ValueSetExpansionComponent() { 2167 super(); 2168 } 2169 2170 /** 2171 * Constructor 2172 */ 2173 public ValueSetExpansionComponent(DateTimeType timestamp) { 2174 super(); 2175 this.timestamp = timestamp; 2176 } 2177 2178 /** 2179 * @return {@link #identifier} (An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value 2180 */ 2181 public UriType getIdentifierElement() { 2182 if (this.identifier == null) 2183 if (Configuration.errorOnAutoCreate()) 2184 throw new Error("Attempt to auto-create ValueSetExpansionComponent.identifier"); 2185 else if (Configuration.doAutoCreate()) 2186 this.identifier = new UriType(); // bb 2187 return this.identifier; 2188 } 2189 2190 public boolean hasIdentifierElement() { 2191 return this.identifier != null && !this.identifier.isEmpty(); 2192 } 2193 2194 public boolean hasIdentifier() { 2195 return this.identifier != null && !this.identifier.isEmpty(); 2196 } 2197 2198 /** 2199 * @param value {@link #identifier} (An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value 2200 */ 2201 public ValueSetExpansionComponent setIdentifierElement(UriType value) { 2202 this.identifier = value; 2203 return this; 2204 } 2205 2206 /** 2207 * @return An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier. 2208 */ 2209 public String getIdentifier() { 2210 return this.identifier == null ? null : this.identifier.getValue(); 2211 } 2212 2213 /** 2214 * @param value An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier. 2215 */ 2216 public ValueSetExpansionComponent setIdentifier(String value) { 2217 if (Utilities.noString(value)) 2218 this.identifier = null; 2219 else { 2220 if (this.identifier == null) 2221 this.identifier = new UriType(); 2222 this.identifier.setValue(value); 2223 } 2224 return this; 2225 } 2226 2227 /** 2228 * @return {@link #timestamp} (The time at which the expansion was produced by the expanding system.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value 2229 */ 2230 public DateTimeType getTimestampElement() { 2231 if (this.timestamp == null) 2232 if (Configuration.errorOnAutoCreate()) 2233 throw new Error("Attempt to auto-create ValueSetExpansionComponent.timestamp"); 2234 else if (Configuration.doAutoCreate()) 2235 this.timestamp = new DateTimeType(); // bb 2236 return this.timestamp; 2237 } 2238 2239 public boolean hasTimestampElement() { 2240 return this.timestamp != null && !this.timestamp.isEmpty(); 2241 } 2242 2243 public boolean hasTimestamp() { 2244 return this.timestamp != null && !this.timestamp.isEmpty(); 2245 } 2246 2247 /** 2248 * @param value {@link #timestamp} (The time at which the expansion was produced by the expanding system.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value 2249 */ 2250 public ValueSetExpansionComponent setTimestampElement(DateTimeType value) { 2251 this.timestamp = value; 2252 return this; 2253 } 2254 2255 /** 2256 * @return The time at which the expansion was produced by the expanding system. 2257 */ 2258 public Date getTimestamp() { 2259 return this.timestamp == null ? null : this.timestamp.getValue(); 2260 } 2261 2262 /** 2263 * @param value The time at which the expansion was produced by the expanding system. 2264 */ 2265 public ValueSetExpansionComponent setTimestamp(Date value) { 2266 if (this.timestamp == null) 2267 this.timestamp = new DateTimeType(); 2268 this.timestamp.setValue(value); 2269 return this; 2270 } 2271 2272 /** 2273 * @return {@link #total} (The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value 2274 */ 2275 public IntegerType getTotalElement() { 2276 if (this.total == null) 2277 if (Configuration.errorOnAutoCreate()) 2278 throw new Error("Attempt to auto-create ValueSetExpansionComponent.total"); 2279 else if (Configuration.doAutoCreate()) 2280 this.total = new IntegerType(); // bb 2281 return this.total; 2282 } 2283 2284 public boolean hasTotalElement() { 2285 return this.total != null && !this.total.isEmpty(); 2286 } 2287 2288 public boolean hasTotal() { 2289 return this.total != null && !this.total.isEmpty(); 2290 } 2291 2292 /** 2293 * @param value {@link #total} (The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value 2294 */ 2295 public ValueSetExpansionComponent setTotalElement(IntegerType value) { 2296 this.total = value; 2297 return this; 2298 } 2299 2300 /** 2301 * @return The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter. 2302 */ 2303 public int getTotal() { 2304 return this.total == null || this.total.isEmpty() ? 0 : this.total.getValue(); 2305 } 2306 2307 /** 2308 * @param value The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter. 2309 */ 2310 public ValueSetExpansionComponent setTotal(int value) { 2311 if (this.total == null) 2312 this.total = new IntegerType(); 2313 this.total.setValue(value); 2314 return this; 2315 } 2316 2317 /** 2318 * @return {@link #offset} (If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.). This is the underlying object with id, value and extensions. The accessor "getOffset" gives direct access to the value 2319 */ 2320 public IntegerType getOffsetElement() { 2321 if (this.offset == null) 2322 if (Configuration.errorOnAutoCreate()) 2323 throw new Error("Attempt to auto-create ValueSetExpansionComponent.offset"); 2324 else if (Configuration.doAutoCreate()) 2325 this.offset = new IntegerType(); // bb 2326 return this.offset; 2327 } 2328 2329 public boolean hasOffsetElement() { 2330 return this.offset != null && !this.offset.isEmpty(); 2331 } 2332 2333 public boolean hasOffset() { 2334 return this.offset != null && !this.offset.isEmpty(); 2335 } 2336 2337 /** 2338 * @param value {@link #offset} (If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.). This is the underlying object with id, value and extensions. The accessor "getOffset" gives direct access to the value 2339 */ 2340 public ValueSetExpansionComponent setOffsetElement(IntegerType value) { 2341 this.offset = value; 2342 return this; 2343 } 2344 2345 /** 2346 * @return If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present. 2347 */ 2348 public int getOffset() { 2349 return this.offset == null || this.offset.isEmpty() ? 0 : this.offset.getValue(); 2350 } 2351 2352 /** 2353 * @param value If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present. 2354 */ 2355 public ValueSetExpansionComponent setOffset(int value) { 2356 if (this.offset == null) 2357 this.offset = new IntegerType(); 2358 this.offset.setValue(value); 2359 return this; 2360 } 2361 2362 /** 2363 * @return {@link #parameter} (A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.) 2364 */ 2365 public List<ValueSetExpansionParameterComponent> getParameter() { 2366 if (this.parameter == null) 2367 this.parameter = new ArrayList<ValueSetExpansionParameterComponent>(); 2368 return this.parameter; 2369 } 2370 2371 /** 2372 * @return Returns a reference to <code>this</code> for easy method chaining 2373 */ 2374 public ValueSetExpansionComponent setParameter(List<ValueSetExpansionParameterComponent> theParameter) { 2375 this.parameter = theParameter; 2376 return this; 2377 } 2378 2379 public boolean hasParameter() { 2380 if (this.parameter == null) 2381 return false; 2382 for (ValueSetExpansionParameterComponent item : this.parameter) 2383 if (!item.isEmpty()) 2384 return true; 2385 return false; 2386 } 2387 2388 public ValueSetExpansionParameterComponent addParameter() { //3 2389 ValueSetExpansionParameterComponent t = new ValueSetExpansionParameterComponent(); 2390 if (this.parameter == null) 2391 this.parameter = new ArrayList<ValueSetExpansionParameterComponent>(); 2392 this.parameter.add(t); 2393 return t; 2394 } 2395 2396 public ValueSetExpansionComponent addParameter(ValueSetExpansionParameterComponent t) { //3 2397 if (t == null) 2398 return this; 2399 if (this.parameter == null) 2400 this.parameter = new ArrayList<ValueSetExpansionParameterComponent>(); 2401 this.parameter.add(t); 2402 return this; 2403 } 2404 2405 /** 2406 * @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist 2407 */ 2408 public ValueSetExpansionParameterComponent getParameterFirstRep() { 2409 if (getParameter().isEmpty()) { 2410 addParameter(); 2411 } 2412 return getParameter().get(0); 2413 } 2414 2415 /** 2416 * @return {@link #contains} (The codes that are contained in the value set expansion.) 2417 */ 2418 public List<ValueSetExpansionContainsComponent> getContains() { 2419 if (this.contains == null) 2420 this.contains = new ArrayList<ValueSetExpansionContainsComponent>(); 2421 return this.contains; 2422 } 2423 2424 /** 2425 * @return Returns a reference to <code>this</code> for easy method chaining 2426 */ 2427 public ValueSetExpansionComponent setContains(List<ValueSetExpansionContainsComponent> theContains) { 2428 this.contains = theContains; 2429 return this; 2430 } 2431 2432 public boolean hasContains() { 2433 if (this.contains == null) 2434 return false; 2435 for (ValueSetExpansionContainsComponent item : this.contains) 2436 if (!item.isEmpty()) 2437 return true; 2438 return false; 2439 } 2440 2441 public ValueSetExpansionContainsComponent addContains() { //3 2442 ValueSetExpansionContainsComponent t = new ValueSetExpansionContainsComponent(); 2443 if (this.contains == null) 2444 this.contains = new ArrayList<ValueSetExpansionContainsComponent>(); 2445 this.contains.add(t); 2446 return t; 2447 } 2448 2449 public ValueSetExpansionComponent addContains(ValueSetExpansionContainsComponent t) { //3 2450 if (t == null) 2451 return this; 2452 if (this.contains == null) 2453 this.contains = new ArrayList<ValueSetExpansionContainsComponent>(); 2454 this.contains.add(t); 2455 return this; 2456 } 2457 2458 /** 2459 * @return The first repetition of repeating field {@link #contains}, creating it if it does not already exist 2460 */ 2461 public ValueSetExpansionContainsComponent getContainsFirstRep() { 2462 if (getContains().isEmpty()) { 2463 addContains(); 2464 } 2465 return getContains().get(0); 2466 } 2467 2468 protected void listChildren(List<Property> children) { 2469 super.listChildren(children); 2470 children.add(new Property("identifier", "uri", "An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.", 0, 1, identifier)); 2471 children.add(new Property("timestamp", "dateTime", "The time at which the expansion was produced by the expanding system.", 0, 1, timestamp)); 2472 children.add(new Property("total", "integer", "The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.", 0, 1, total)); 2473 children.add(new Property("offset", "integer", "If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.", 0, 1, offset)); 2474 children.add(new Property("parameter", "", "A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.", 0, java.lang.Integer.MAX_VALUE, parameter)); 2475 children.add(new Property("contains", "", "The codes that are contained in the value set expansion.", 0, java.lang.Integer.MAX_VALUE, contains)); 2476 } 2477 2478 @Override 2479 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2480 switch (_hash) { 2481 case -1618432855: /*identifier*/ return new Property("identifier", "uri", "An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.", 0, 1, identifier); 2482 case 55126294: /*timestamp*/ return new Property("timestamp", "dateTime", "The time at which the expansion was produced by the expanding system.", 0, 1, timestamp); 2483 case 110549828: /*total*/ return new Property("total", "integer", "The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.", 0, 1, total); 2484 case -1019779949: /*offset*/ return new Property("offset", "integer", "If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.", 0, 1, offset); 2485 case 1954460585: /*parameter*/ return new Property("parameter", "", "A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.", 0, java.lang.Integer.MAX_VALUE, parameter); 2486 case -567445985: /*contains*/ return new Property("contains", "", "The codes that are contained in the value set expansion.", 0, java.lang.Integer.MAX_VALUE, contains); 2487 default: return super.getNamedProperty(_hash, _name, _checkValid); 2488 } 2489 2490 } 2491 2492 @Override 2493 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2494 switch (hash) { 2495 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // UriType 2496 case 55126294: /*timestamp*/ return this.timestamp == null ? new Base[0] : new Base[] {this.timestamp}; // DateTimeType 2497 case 110549828: /*total*/ return this.total == null ? new Base[0] : new Base[] {this.total}; // IntegerType 2498 case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // IntegerType 2499 case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // ValueSetExpansionParameterComponent 2500 case -567445985: /*contains*/ return this.contains == null ? new Base[0] : this.contains.toArray(new Base[this.contains.size()]); // ValueSetExpansionContainsComponent 2501 default: return super.getProperty(hash, name, checkValid); 2502 } 2503 2504 } 2505 2506 @Override 2507 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2508 switch (hash) { 2509 case -1618432855: // identifier 2510 this.identifier = castToUri(value); // UriType 2511 return value; 2512 case 55126294: // timestamp 2513 this.timestamp = castToDateTime(value); // DateTimeType 2514 return value; 2515 case 110549828: // total 2516 this.total = castToInteger(value); // IntegerType 2517 return value; 2518 case -1019779949: // offset 2519 this.offset = castToInteger(value); // IntegerType 2520 return value; 2521 case 1954460585: // parameter 2522 this.getParameter().add((ValueSetExpansionParameterComponent) value); // ValueSetExpansionParameterComponent 2523 return value; 2524 case -567445985: // contains 2525 this.getContains().add((ValueSetExpansionContainsComponent) value); // ValueSetExpansionContainsComponent 2526 return value; 2527 default: return super.setProperty(hash, name, value); 2528 } 2529 2530 } 2531 2532 @Override 2533 public Base setProperty(String name, Base value) throws FHIRException { 2534 if (name.equals("identifier")) { 2535 this.identifier = castToUri(value); // UriType 2536 } else if (name.equals("timestamp")) { 2537 this.timestamp = castToDateTime(value); // DateTimeType 2538 } else if (name.equals("total")) { 2539 this.total = castToInteger(value); // IntegerType 2540 } else if (name.equals("offset")) { 2541 this.offset = castToInteger(value); // IntegerType 2542 } else if (name.equals("parameter")) { 2543 this.getParameter().add((ValueSetExpansionParameterComponent) value); 2544 } else if (name.equals("contains")) { 2545 this.getContains().add((ValueSetExpansionContainsComponent) value); 2546 } else 2547 return super.setProperty(name, value); 2548 return value; 2549 } 2550 2551 @Override 2552 public Base makeProperty(int hash, String name) throws FHIRException { 2553 switch (hash) { 2554 case -1618432855: return getIdentifierElement(); 2555 case 55126294: return getTimestampElement(); 2556 case 110549828: return getTotalElement(); 2557 case -1019779949: return getOffsetElement(); 2558 case 1954460585: return addParameter(); 2559 case -567445985: return addContains(); 2560 default: return super.makeProperty(hash, name); 2561 } 2562 2563 } 2564 2565 @Override 2566 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2567 switch (hash) { 2568 case -1618432855: /*identifier*/ return new String[] {"uri"}; 2569 case 55126294: /*timestamp*/ return new String[] {"dateTime"}; 2570 case 110549828: /*total*/ return new String[] {"integer"}; 2571 case -1019779949: /*offset*/ return new String[] {"integer"}; 2572 case 1954460585: /*parameter*/ return new String[] {}; 2573 case -567445985: /*contains*/ return new String[] {}; 2574 default: return super.getTypesForProperty(hash, name); 2575 } 2576 2577 } 2578 2579 @Override 2580 public Base addChild(String name) throws FHIRException { 2581 if (name.equals("identifier")) { 2582 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.identifier"); 2583 } 2584 else if (name.equals("timestamp")) { 2585 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.timestamp"); 2586 } 2587 else if (name.equals("total")) { 2588 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.total"); 2589 } 2590 else if (name.equals("offset")) { 2591 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.offset"); 2592 } 2593 else if (name.equals("parameter")) { 2594 return addParameter(); 2595 } 2596 else if (name.equals("contains")) { 2597 return addContains(); 2598 } 2599 else 2600 return super.addChild(name); 2601 } 2602 2603 public ValueSetExpansionComponent copy() { 2604 ValueSetExpansionComponent dst = new ValueSetExpansionComponent(); 2605 copyValues(dst); 2606 return dst; 2607 } 2608 2609 public void copyValues(ValueSetExpansionComponent dst) { 2610 super.copyValues(dst); 2611 dst.identifier = identifier == null ? null : identifier.copy(); 2612 dst.timestamp = timestamp == null ? null : timestamp.copy(); 2613 dst.total = total == null ? null : total.copy(); 2614 dst.offset = offset == null ? null : offset.copy(); 2615 if (parameter != null) { 2616 dst.parameter = new ArrayList<ValueSetExpansionParameterComponent>(); 2617 for (ValueSetExpansionParameterComponent i : parameter) 2618 dst.parameter.add(i.copy()); 2619 }; 2620 if (contains != null) { 2621 dst.contains = new ArrayList<ValueSetExpansionContainsComponent>(); 2622 for (ValueSetExpansionContainsComponent i : contains) 2623 dst.contains.add(i.copy()); 2624 }; 2625 } 2626 2627 @Override 2628 public boolean equalsDeep(Base other_) { 2629 if (!super.equalsDeep(other_)) 2630 return false; 2631 if (!(other_ instanceof ValueSetExpansionComponent)) 2632 return false; 2633 ValueSetExpansionComponent o = (ValueSetExpansionComponent) other_; 2634 return compareDeep(identifier, o.identifier, true) && compareDeep(timestamp, o.timestamp, true) 2635 && compareDeep(total, o.total, true) && compareDeep(offset, o.offset, true) && compareDeep(parameter, o.parameter, true) 2636 && compareDeep(contains, o.contains, true); 2637 } 2638 2639 @Override 2640 public boolean equalsShallow(Base other_) { 2641 if (!super.equalsShallow(other_)) 2642 return false; 2643 if (!(other_ instanceof ValueSetExpansionComponent)) 2644 return false; 2645 ValueSetExpansionComponent o = (ValueSetExpansionComponent) other_; 2646 return compareValues(identifier, o.identifier, true) && compareValues(timestamp, o.timestamp, true) 2647 && compareValues(total, o.total, true) && compareValues(offset, o.offset, true); 2648 } 2649 2650 public boolean isEmpty() { 2651 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, timestamp, total 2652 , offset, parameter, contains); 2653 } 2654 2655 public String fhirType() { 2656 return "ValueSet.expansion"; 2657 2658 } 2659 2660 } 2661 2662 @Block() 2663 public static class ValueSetExpansionParameterComponent extends BackboneElement implements IBaseBackboneElement { 2664 /** 2665 * Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process. 2666 */ 2667 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2668 @Description(shortDefinition="Name as assigned by the client or server", formalDefinition="Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process." ) 2669 protected StringType name; 2670 2671 /** 2672 * The value of the parameter. 2673 */ 2674 @Child(name = "value", type = {StringType.class, BooleanType.class, IntegerType.class, DecimalType.class, UriType.class, CodeType.class, DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2675 @Description(shortDefinition="Value of the named parameter", formalDefinition="The value of the parameter." ) 2676 protected Type value; 2677 2678 private static final long serialVersionUID = 1172641169L; 2679 2680 /** 2681 * Constructor 2682 */ 2683 public ValueSetExpansionParameterComponent() { 2684 super(); 2685 } 2686 2687 /** 2688 * Constructor 2689 */ 2690 public ValueSetExpansionParameterComponent(StringType name) { 2691 super(); 2692 this.name = name; 2693 } 2694 2695 /** 2696 * @return {@link #name} (Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2697 */ 2698 public StringType getNameElement() { 2699 if (this.name == null) 2700 if (Configuration.errorOnAutoCreate()) 2701 throw new Error("Attempt to auto-create ValueSetExpansionParameterComponent.name"); 2702 else if (Configuration.doAutoCreate()) 2703 this.name = new StringType(); // bb 2704 return this.name; 2705 } 2706 2707 public boolean hasNameElement() { 2708 return this.name != null && !this.name.isEmpty(); 2709 } 2710 2711 public boolean hasName() { 2712 return this.name != null && !this.name.isEmpty(); 2713 } 2714 2715 /** 2716 * @param value {@link #name} (Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2717 */ 2718 public ValueSetExpansionParameterComponent setNameElement(StringType value) { 2719 this.name = value; 2720 return this; 2721 } 2722 2723 /** 2724 * @return Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process. 2725 */ 2726 public String getName() { 2727 return this.name == null ? null : this.name.getValue(); 2728 } 2729 2730 /** 2731 * @param value Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process. 2732 */ 2733 public ValueSetExpansionParameterComponent setName(String value) { 2734 if (this.name == null) 2735 this.name = new StringType(); 2736 this.name.setValue(value); 2737 return this; 2738 } 2739 2740 /** 2741 * @return {@link #value} (The value of the parameter.) 2742 */ 2743 public Type getValue() { 2744 return this.value; 2745 } 2746 2747 /** 2748 * @return {@link #value} (The value of the parameter.) 2749 */ 2750 public StringType getValueStringType() throws FHIRException { 2751 if (this.value == null) 2752 this.value = new StringType(); 2753 if (!(this.value instanceof StringType)) 2754 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 2755 return (StringType) this.value; 2756 } 2757 2758 public boolean hasValueStringType() { 2759 return this != null && this.value instanceof StringType; 2760 } 2761 2762 /** 2763 * @return {@link #value} (The value of the parameter.) 2764 */ 2765 public BooleanType getValueBooleanType() throws FHIRException { 2766 if (this.value == null) 2767 this.value = new BooleanType(); 2768 if (!(this.value instanceof BooleanType)) 2769 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 2770 return (BooleanType) this.value; 2771 } 2772 2773 public boolean hasValueBooleanType() { 2774 return this != null && this.value instanceof BooleanType; 2775 } 2776 2777 /** 2778 * @return {@link #value} (The value of the parameter.) 2779 */ 2780 public IntegerType getValueIntegerType() throws FHIRException { 2781 if (this.value == null) 2782 this.value = new IntegerType(); 2783 if (!(this.value instanceof IntegerType)) 2784 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 2785 return (IntegerType) this.value; 2786 } 2787 2788 public boolean hasValueIntegerType() { 2789 return this != null && this.value instanceof IntegerType; 2790 } 2791 2792 /** 2793 * @return {@link #value} (The value of the parameter.) 2794 */ 2795 public DecimalType getValueDecimalType() throws FHIRException { 2796 if (this.value == null) 2797 this.value = new DecimalType(); 2798 if (!(this.value instanceof DecimalType)) 2799 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); 2800 return (DecimalType) this.value; 2801 } 2802 2803 public boolean hasValueDecimalType() { 2804 return this != null && this.value instanceof DecimalType; 2805 } 2806 2807 /** 2808 * @return {@link #value} (The value of the parameter.) 2809 */ 2810 public UriType getValueUriType() throws FHIRException { 2811 if (this.value == null) 2812 this.value = new UriType(); 2813 if (!(this.value instanceof UriType)) 2814 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); 2815 return (UriType) this.value; 2816 } 2817 2818 public boolean hasValueUriType() { 2819 return this != null && this.value instanceof UriType; 2820 } 2821 2822 /** 2823 * @return {@link #value} (The value of the parameter.) 2824 */ 2825 public CodeType getValueCodeType() throws FHIRException { 2826 if (this.value == null) 2827 this.value = new CodeType(); 2828 if (!(this.value instanceof CodeType)) 2829 throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered"); 2830 return (CodeType) this.value; 2831 } 2832 2833 public boolean hasValueCodeType() { 2834 return this != null && this.value instanceof CodeType; 2835 } 2836 2837 /** 2838 * @return {@link #value} (The value of the parameter.) 2839 */ 2840 public DateTimeType getValueDateTimeType() throws FHIRException { 2841 if (this.value == null) 2842 this.value = new DateTimeType(); 2843 if (!(this.value instanceof DateTimeType)) 2844 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 2845 return (DateTimeType) this.value; 2846 } 2847 2848 public boolean hasValueDateTimeType() { 2849 return this != null && this.value instanceof DateTimeType; 2850 } 2851 2852 public boolean hasValue() { 2853 return this.value != null && !this.value.isEmpty(); 2854 } 2855 2856 /** 2857 * @param value {@link #value} (The value of the parameter.) 2858 */ 2859 public ValueSetExpansionParameterComponent setValue(Type value) { 2860 if (value != null && !(value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof DecimalType || value instanceof UriType || value instanceof CodeType || value instanceof DateTimeType)) 2861 throw new Error("Not the right type for ValueSet.expansion.parameter.value[x]: "+value.fhirType()); 2862 this.value = value; 2863 return this; 2864 } 2865 2866 protected void listChildren(List<Property> children) { 2867 super.listChildren(children); 2868 children.add(new Property("name", "string", "Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.", 0, 1, name)); 2869 children.add(new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value)); 2870 } 2871 2872 @Override 2873 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2874 switch (_hash) { 2875 case 3373707: /*name*/ return new Property("name", "string", "Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.", 0, 1, name); 2876 case -1410166417: /*value[x]*/ return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value); 2877 case 111972721: /*value*/ return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value); 2878 case -1424603934: /*valueString*/ return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value); 2879 case 733421943: /*valueBoolean*/ return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value); 2880 case -1668204915: /*valueInteger*/ return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value); 2881 case -2083993440: /*valueDecimal*/ return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value); 2882 case -1410172357: /*valueUri*/ return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value); 2883 case -766209282: /*valueCode*/ return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value); 2884 case 1047929900: /*valueDateTime*/ return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value); 2885 default: return super.getNamedProperty(_hash, _name, _checkValid); 2886 } 2887 2888 } 2889 2890 @Override 2891 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2892 switch (hash) { 2893 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 2894 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 2895 default: return super.getProperty(hash, name, checkValid); 2896 } 2897 2898 } 2899 2900 @Override 2901 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2902 switch (hash) { 2903 case 3373707: // name 2904 this.name = castToString(value); // StringType 2905 return value; 2906 case 111972721: // value 2907 this.value = castToType(value); // Type 2908 return value; 2909 default: return super.setProperty(hash, name, value); 2910 } 2911 2912 } 2913 2914 @Override 2915 public Base setProperty(String name, Base value) throws FHIRException { 2916 if (name.equals("name")) { 2917 this.name = castToString(value); // StringType 2918 } else if (name.equals("value[x]")) { 2919 this.value = castToType(value); // Type 2920 } else 2921 return super.setProperty(name, value); 2922 return value; 2923 } 2924 2925 @Override 2926 public Base makeProperty(int hash, String name) throws FHIRException { 2927 switch (hash) { 2928 case 3373707: return getNameElement(); 2929 case -1410166417: return getValue(); 2930 case 111972721: return getValue(); 2931 default: return super.makeProperty(hash, name); 2932 } 2933 2934 } 2935 2936 @Override 2937 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2938 switch (hash) { 2939 case 3373707: /*name*/ return new String[] {"string"}; 2940 case 111972721: /*value*/ return new String[] {"string", "boolean", "integer", "decimal", "uri", "code", "dateTime"}; 2941 default: return super.getTypesForProperty(hash, name); 2942 } 2943 2944 } 2945 2946 @Override 2947 public Base addChild(String name) throws FHIRException { 2948 if (name.equals("name")) { 2949 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.name"); 2950 } 2951 else if (name.equals("valueString")) { 2952 this.value = new StringType(); 2953 return this.value; 2954 } 2955 else if (name.equals("valueBoolean")) { 2956 this.value = new BooleanType(); 2957 return this.value; 2958 } 2959 else if (name.equals("valueInteger")) { 2960 this.value = new IntegerType(); 2961 return this.value; 2962 } 2963 else if (name.equals("valueDecimal")) { 2964 this.value = new DecimalType(); 2965 return this.value; 2966 } 2967 else if (name.equals("valueUri")) { 2968 this.value = new UriType(); 2969 return this.value; 2970 } 2971 else if (name.equals("valueCode")) { 2972 this.value = new CodeType(); 2973 return this.value; 2974 } 2975 else if (name.equals("valueDateTime")) { 2976 this.value = new DateTimeType(); 2977 return this.value; 2978 } 2979 else 2980 return super.addChild(name); 2981 } 2982 2983 public ValueSetExpansionParameterComponent copy() { 2984 ValueSetExpansionParameterComponent dst = new ValueSetExpansionParameterComponent(); 2985 copyValues(dst); 2986 return dst; 2987 } 2988 2989 public void copyValues(ValueSetExpansionParameterComponent dst) { 2990 super.copyValues(dst); 2991 dst.name = name == null ? null : name.copy(); 2992 dst.value = value == null ? null : value.copy(); 2993 } 2994 2995 @Override 2996 public boolean equalsDeep(Base other_) { 2997 if (!super.equalsDeep(other_)) 2998 return false; 2999 if (!(other_ instanceof ValueSetExpansionParameterComponent)) 3000 return false; 3001 ValueSetExpansionParameterComponent o = (ValueSetExpansionParameterComponent) other_; 3002 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 3003 } 3004 3005 @Override 3006 public boolean equalsShallow(Base other_) { 3007 if (!super.equalsShallow(other_)) 3008 return false; 3009 if (!(other_ instanceof ValueSetExpansionParameterComponent)) 3010 return false; 3011 ValueSetExpansionParameterComponent o = (ValueSetExpansionParameterComponent) other_; 3012 return compareValues(name, o.name, true); 3013 } 3014 3015 public boolean isEmpty() { 3016 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 3017 } 3018 3019 public String fhirType() { 3020 return "ValueSet.expansion.parameter"; 3021 3022 } 3023 3024 } 3025 3026 @Block() 3027 public static class ValueSetExpansionContainsComponent extends BackboneElement implements IBaseBackboneElement { 3028 /** 3029 * An absolute URI which is the code system in which the code for this item in the expansion is defined. 3030 */ 3031 @Child(name = "system", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) 3032 @Description(shortDefinition="System value for the code", formalDefinition="An absolute URI which is the code system in which the code for this item in the expansion is defined." ) 3033 protected UriType system; 3034 3035 /** 3036 * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value. 3037 */ 3038 @Child(name = "abstract", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3039 @Description(shortDefinition="If user cannot select this entry", formalDefinition="If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value." ) 3040 protected BooleanType abstract_; 3041 3042 /** 3043 * If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use). 3044 */ 3045 @Child(name = "inactive", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) 3046 @Description(shortDefinition="If concept is inactive in the code system", formalDefinition="If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use)." ) 3047 protected BooleanType inactive; 3048 3049 /** 3050 * The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged. 3051 */ 3052 @Child(name = "version", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 3053 @Description(shortDefinition="Version in which this code/display is defined", formalDefinition="The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." ) 3054 protected StringType version; 3055 3056 /** 3057 * The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set. 3058 */ 3059 @Child(name = "code", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 3060 @Description(shortDefinition="Code - if blank, this is not a selectable code", formalDefinition="The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set." ) 3061 protected CodeType code; 3062 3063 /** 3064 * The recommended display for this item in the expansion. 3065 */ 3066 @Child(name = "display", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 3067 @Description(shortDefinition="User display for the concept", formalDefinition="The recommended display for this item in the expansion." ) 3068 protected StringType display; 3069 3070 /** 3071 * Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation. 3072 */ 3073 @Child(name = "designation", type = {ConceptReferenceDesignationComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3074 @Description(shortDefinition="Additional representations for this item", formalDefinition="Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation." ) 3075 protected List<ConceptReferenceDesignationComponent> designation; 3076 3077 /** 3078 * Other codes and entries contained under this entry in the hierarchy. 3079 */ 3080 @Child(name = "contains", type = {ValueSetExpansionContainsComponent.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3081 @Description(shortDefinition="Codes contained under this entry", formalDefinition="Other codes and entries contained under this entry in the hierarchy." ) 3082 protected List<ValueSetExpansionContainsComponent> contains; 3083 3084 private static final long serialVersionUID = 719458860L; 3085 3086 /** 3087 * Constructor 3088 */ 3089 public ValueSetExpansionContainsComponent() { 3090 super(); 3091 } 3092 3093 /** 3094 * @return {@link #system} (An absolute URI which is the code system in which the code for this item in the expansion is defined.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value 3095 */ 3096 public UriType getSystemElement() { 3097 if (this.system == null) 3098 if (Configuration.errorOnAutoCreate()) 3099 throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.system"); 3100 else if (Configuration.doAutoCreate()) 3101 this.system = new UriType(); // bb 3102 return this.system; 3103 } 3104 3105 public boolean hasSystemElement() { 3106 return this.system != null && !this.system.isEmpty(); 3107 } 3108 3109 public boolean hasSystem() { 3110 return this.system != null && !this.system.isEmpty(); 3111 } 3112 3113 /** 3114 * @param value {@link #system} (An absolute URI which is the code system in which the code for this item in the expansion is defined.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value 3115 */ 3116 public ValueSetExpansionContainsComponent setSystemElement(UriType value) { 3117 this.system = value; 3118 return this; 3119 } 3120 3121 /** 3122 * @return An absolute URI which is the code system in which the code for this item in the expansion is defined. 3123 */ 3124 public String getSystem() { 3125 return this.system == null ? null : this.system.getValue(); 3126 } 3127 3128 /** 3129 * @param value An absolute URI which is the code system in which the code for this item in the expansion is defined. 3130 */ 3131 public ValueSetExpansionContainsComponent setSystem(String value) { 3132 if (Utilities.noString(value)) 3133 this.system = null; 3134 else { 3135 if (this.system == null) 3136 this.system = new UriType(); 3137 this.system.setValue(value); 3138 } 3139 return this; 3140 } 3141 3142 /** 3143 * @return {@link #abstract_} (If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value 3144 */ 3145 public BooleanType getAbstractElement() { 3146 if (this.abstract_ == null) 3147 if (Configuration.errorOnAutoCreate()) 3148 throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.abstract_"); 3149 else if (Configuration.doAutoCreate()) 3150 this.abstract_ = new BooleanType(); // bb 3151 return this.abstract_; 3152 } 3153 3154 public boolean hasAbstractElement() { 3155 return this.abstract_ != null && !this.abstract_.isEmpty(); 3156 } 3157 3158 public boolean hasAbstract() { 3159 return this.abstract_ != null && !this.abstract_.isEmpty(); 3160 } 3161 3162 /** 3163 * @param value {@link #abstract_} (If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value 3164 */ 3165 public ValueSetExpansionContainsComponent setAbstractElement(BooleanType value) { 3166 this.abstract_ = value; 3167 return this; 3168 } 3169 3170 /** 3171 * @return If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value. 3172 */ 3173 public boolean getAbstract() { 3174 return this.abstract_ == null || this.abstract_.isEmpty() ? false : this.abstract_.getValue(); 3175 } 3176 3177 /** 3178 * @param value If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value. 3179 */ 3180 public ValueSetExpansionContainsComponent setAbstract(boolean value) { 3181 if (this.abstract_ == null) 3182 this.abstract_ = new BooleanType(); 3183 this.abstract_.setValue(value); 3184 return this; 3185 } 3186 3187 /** 3188 * @return {@link #inactive} (If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value 3189 */ 3190 public BooleanType getInactiveElement() { 3191 if (this.inactive == null) 3192 if (Configuration.errorOnAutoCreate()) 3193 throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.inactive"); 3194 else if (Configuration.doAutoCreate()) 3195 this.inactive = new BooleanType(); // bb 3196 return this.inactive; 3197 } 3198 3199 public boolean hasInactiveElement() { 3200 return this.inactive != null && !this.inactive.isEmpty(); 3201 } 3202 3203 public boolean hasInactive() { 3204 return this.inactive != null && !this.inactive.isEmpty(); 3205 } 3206 3207 /** 3208 * @param value {@link #inactive} (If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value 3209 */ 3210 public ValueSetExpansionContainsComponent setInactiveElement(BooleanType value) { 3211 this.inactive = value; 3212 return this; 3213 } 3214 3215 /** 3216 * @return If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use). 3217 */ 3218 public boolean getInactive() { 3219 return this.inactive == null || this.inactive.isEmpty() ? false : this.inactive.getValue(); 3220 } 3221 3222 /** 3223 * @param value If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use). 3224 */ 3225 public ValueSetExpansionContainsComponent setInactive(boolean value) { 3226 if (this.inactive == null) 3227 this.inactive = new BooleanType(); 3228 this.inactive.setValue(value); 3229 return this; 3230 } 3231 3232 /** 3233 * @return {@link #version} (The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 3234 */ 3235 public StringType getVersionElement() { 3236 if (this.version == null) 3237 if (Configuration.errorOnAutoCreate()) 3238 throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.version"); 3239 else if (Configuration.doAutoCreate()) 3240 this.version = new StringType(); // bb 3241 return this.version; 3242 } 3243 3244 public boolean hasVersionElement() { 3245 return this.version != null && !this.version.isEmpty(); 3246 } 3247 3248 public boolean hasVersion() { 3249 return this.version != null && !this.version.isEmpty(); 3250 } 3251 3252 /** 3253 * @param value {@link #version} (The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 3254 */ 3255 public ValueSetExpansionContainsComponent setVersionElement(StringType value) { 3256 this.version = value; 3257 return this; 3258 } 3259 3260 /** 3261 * @return The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged. 3262 */ 3263 public String getVersion() { 3264 return this.version == null ? null : this.version.getValue(); 3265 } 3266 3267 /** 3268 * @param value The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged. 3269 */ 3270 public ValueSetExpansionContainsComponent setVersion(String value) { 3271 if (Utilities.noString(value)) 3272 this.version = null; 3273 else { 3274 if (this.version == null) 3275 this.version = new StringType(); 3276 this.version.setValue(value); 3277 } 3278 return this; 3279 } 3280 3281 /** 3282 * @return {@link #code} (The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 3283 */ 3284 public CodeType getCodeElement() { 3285 if (this.code == null) 3286 if (Configuration.errorOnAutoCreate()) 3287 throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.code"); 3288 else if (Configuration.doAutoCreate()) 3289 this.code = new CodeType(); // bb 3290 return this.code; 3291 } 3292 3293 public boolean hasCodeElement() { 3294 return this.code != null && !this.code.isEmpty(); 3295 } 3296 3297 public boolean hasCode() { 3298 return this.code != null && !this.code.isEmpty(); 3299 } 3300 3301 /** 3302 * @param value {@link #code} (The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 3303 */ 3304 public ValueSetExpansionContainsComponent setCodeElement(CodeType value) { 3305 this.code = value; 3306 return this; 3307 } 3308 3309 /** 3310 * @return The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set. 3311 */ 3312 public String getCode() { 3313 return this.code == null ? null : this.code.getValue(); 3314 } 3315 3316 /** 3317 * @param value The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set. 3318 */ 3319 public ValueSetExpansionContainsComponent setCode(String value) { 3320 if (Utilities.noString(value)) 3321 this.code = null; 3322 else { 3323 if (this.code == null) 3324 this.code = new CodeType(); 3325 this.code.setValue(value); 3326 } 3327 return this; 3328 } 3329 3330 /** 3331 * @return {@link #display} (The recommended display for this item in the expansion.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 3332 */ 3333 public StringType getDisplayElement() { 3334 if (this.display == null) 3335 if (Configuration.errorOnAutoCreate()) 3336 throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.display"); 3337 else if (Configuration.doAutoCreate()) 3338 this.display = new StringType(); // bb 3339 return this.display; 3340 } 3341 3342 public boolean hasDisplayElement() { 3343 return this.display != null && !this.display.isEmpty(); 3344 } 3345 3346 public boolean hasDisplay() { 3347 return this.display != null && !this.display.isEmpty(); 3348 } 3349 3350 /** 3351 * @param value {@link #display} (The recommended display for this item in the expansion.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 3352 */ 3353 public ValueSetExpansionContainsComponent setDisplayElement(StringType value) { 3354 this.display = value; 3355 return this; 3356 } 3357 3358 /** 3359 * @return The recommended display for this item in the expansion. 3360 */ 3361 public String getDisplay() { 3362 return this.display == null ? null : this.display.getValue(); 3363 } 3364 3365 /** 3366 * @param value The recommended display for this item in the expansion. 3367 */ 3368 public ValueSetExpansionContainsComponent setDisplay(String value) { 3369 if (Utilities.noString(value)) 3370 this.display = null; 3371 else { 3372 if (this.display == null) 3373 this.display = new StringType(); 3374 this.display.setValue(value); 3375 } 3376 return this; 3377 } 3378 3379 /** 3380 * @return {@link #designation} (Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.) 3381 */ 3382 public List<ConceptReferenceDesignationComponent> getDesignation() { 3383 if (this.designation == null) 3384 this.designation = new ArrayList<ConceptReferenceDesignationComponent>(); 3385 return this.designation; 3386 } 3387 3388 /** 3389 * @return Returns a reference to <code>this</code> for easy method chaining 3390 */ 3391 public ValueSetExpansionContainsComponent setDesignation(List<ConceptReferenceDesignationComponent> theDesignation) { 3392 this.designation = theDesignation; 3393 return this; 3394 } 3395 3396 public boolean hasDesignation() { 3397 if (this.designation == null) 3398 return false; 3399 for (ConceptReferenceDesignationComponent item : this.designation) 3400 if (!item.isEmpty()) 3401 return true; 3402 return false; 3403 } 3404 3405 public ConceptReferenceDesignationComponent addDesignation() { //3 3406 ConceptReferenceDesignationComponent t = new ConceptReferenceDesignationComponent(); 3407 if (this.designation == null) 3408 this.designation = new ArrayList<ConceptReferenceDesignationComponent>(); 3409 this.designation.add(t); 3410 return t; 3411 } 3412 3413 public ValueSetExpansionContainsComponent addDesignation(ConceptReferenceDesignationComponent t) { //3 3414 if (t == null) 3415 return this; 3416 if (this.designation == null) 3417 this.designation = new ArrayList<ConceptReferenceDesignationComponent>(); 3418 this.designation.add(t); 3419 return this; 3420 } 3421 3422 /** 3423 * @return The first repetition of repeating field {@link #designation}, creating it if it does not already exist 3424 */ 3425 public ConceptReferenceDesignationComponent getDesignationFirstRep() { 3426 if (getDesignation().isEmpty()) { 3427 addDesignation(); 3428 } 3429 return getDesignation().get(0); 3430 } 3431 3432 /** 3433 * @return {@link #contains} (Other codes and entries contained under this entry in the hierarchy.) 3434 */ 3435 public List<ValueSetExpansionContainsComponent> getContains() { 3436 if (this.contains == null) 3437 this.contains = new ArrayList<ValueSetExpansionContainsComponent>(); 3438 return this.contains; 3439 } 3440 3441 /** 3442 * @return Returns a reference to <code>this</code> for easy method chaining 3443 */ 3444 public ValueSetExpansionContainsComponent setContains(List<ValueSetExpansionContainsComponent> theContains) { 3445 this.contains = theContains; 3446 return this; 3447 } 3448 3449 public boolean hasContains() { 3450 if (this.contains == null) 3451 return false; 3452 for (ValueSetExpansionContainsComponent item : this.contains) 3453 if (!item.isEmpty()) 3454 return true; 3455 return false; 3456 } 3457 3458 public ValueSetExpansionContainsComponent addContains() { //3 3459 ValueSetExpansionContainsComponent t = new ValueSetExpansionContainsComponent(); 3460 if (this.contains == null) 3461 this.contains = new ArrayList<ValueSetExpansionContainsComponent>(); 3462 this.contains.add(t); 3463 return t; 3464 } 3465 3466 public ValueSetExpansionContainsComponent addContains(ValueSetExpansionContainsComponent t) { //3 3467 if (t == null) 3468 return this; 3469 if (this.contains == null) 3470 this.contains = new ArrayList<ValueSetExpansionContainsComponent>(); 3471 this.contains.add(t); 3472 return this; 3473 } 3474 3475 /** 3476 * @return The first repetition of repeating field {@link #contains}, creating it if it does not already exist 3477 */ 3478 public ValueSetExpansionContainsComponent getContainsFirstRep() { 3479 if (getContains().isEmpty()) { 3480 addContains(); 3481 } 3482 return getContains().get(0); 3483 } 3484 3485 protected void listChildren(List<Property> children) { 3486 super.listChildren(children); 3487 children.add(new Property("system", "uri", "An absolute URI which is the code system in which the code for this item in the expansion is defined.", 0, 1, system)); 3488 children.add(new Property("abstract", "boolean", "If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.", 0, 1, abstract_)); 3489 children.add(new Property("inactive", "boolean", "If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).", 0, 1, inactive)); 3490 children.add(new Property("version", "string", "The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", 0, 1, version)); 3491 children.add(new Property("code", "code", "The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.", 0, 1, code)); 3492 children.add(new Property("display", "string", "The recommended display for this item in the expansion.", 0, 1, display)); 3493 children.add(new Property("designation", "@ValueSet.compose.include.concept.designation", "Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.", 0, java.lang.Integer.MAX_VALUE, designation)); 3494 children.add(new Property("contains", "@ValueSet.expansion.contains", "Other codes and entries contained under this entry in the hierarchy.", 0, java.lang.Integer.MAX_VALUE, contains)); 3495 } 3496 3497 @Override 3498 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3499 switch (_hash) { 3500 case -887328209: /*system*/ return new Property("system", "uri", "An absolute URI which is the code system in which the code for this item in the expansion is defined.", 0, 1, system); 3501 case 1732898850: /*abstract*/ return new Property("abstract", "boolean", "If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.", 0, 1, abstract_); 3502 case 24665195: /*inactive*/ return new Property("inactive", "boolean", "If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).", 0, 1, inactive); 3503 case 351608024: /*version*/ return new Property("version", "string", "The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", 0, 1, version); 3504 case 3059181: /*code*/ return new Property("code", "code", "The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.", 0, 1, code); 3505 case 1671764162: /*display*/ return new Property("display", "string", "The recommended display for this item in the expansion.", 0, 1, display); 3506 case -900931593: /*designation*/ return new Property("designation", "@ValueSet.compose.include.concept.designation", "Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.", 0, java.lang.Integer.MAX_VALUE, designation); 3507 case -567445985: /*contains*/ return new Property("contains", "@ValueSet.expansion.contains", "Other codes and entries contained under this entry in the hierarchy.", 0, java.lang.Integer.MAX_VALUE, contains); 3508 default: return super.getNamedProperty(_hash, _name, _checkValid); 3509 } 3510 3511 } 3512 3513 @Override 3514 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3515 switch (hash) { 3516 case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType 3517 case 1732898850: /*abstract*/ return this.abstract_ == null ? new Base[0] : new Base[] {this.abstract_}; // BooleanType 3518 case 24665195: /*inactive*/ return this.inactive == null ? new Base[0] : new Base[] {this.inactive}; // BooleanType 3519 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 3520 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType 3521 case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType 3522 case -900931593: /*designation*/ return this.designation == null ? new Base[0] : this.designation.toArray(new Base[this.designation.size()]); // ConceptReferenceDesignationComponent 3523 case -567445985: /*contains*/ return this.contains == null ? new Base[0] : this.contains.toArray(new Base[this.contains.size()]); // ValueSetExpansionContainsComponent 3524 default: return super.getProperty(hash, name, checkValid); 3525 } 3526 3527 } 3528 3529 @Override 3530 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3531 switch (hash) { 3532 case -887328209: // system 3533 this.system = castToUri(value); // UriType 3534 return value; 3535 case 1732898850: // abstract 3536 this.abstract_ = castToBoolean(value); // BooleanType 3537 return value; 3538 case 24665195: // inactive 3539 this.inactive = castToBoolean(value); // BooleanType 3540 return value; 3541 case 351608024: // version 3542 this.version = castToString(value); // StringType 3543 return value; 3544 case 3059181: // code 3545 this.code = castToCode(value); // CodeType 3546 return value; 3547 case 1671764162: // display 3548 this.display = castToString(value); // StringType 3549 return value; 3550 case -900931593: // designation 3551 this.getDesignation().add((ConceptReferenceDesignationComponent) value); // ConceptReferenceDesignationComponent 3552 return value; 3553 case -567445985: // contains 3554 this.getContains().add((ValueSetExpansionContainsComponent) value); // ValueSetExpansionContainsComponent 3555 return value; 3556 default: return super.setProperty(hash, name, value); 3557 } 3558 3559 } 3560 3561 @Override 3562 public Base setProperty(String name, Base value) throws FHIRException { 3563 if (name.equals("system")) { 3564 this.system = castToUri(value); // UriType 3565 } else if (name.equals("abstract")) { 3566 this.abstract_ = castToBoolean(value); // BooleanType 3567 } else if (name.equals("inactive")) { 3568 this.inactive = castToBoolean(value); // BooleanType 3569 } else if (name.equals("version")) { 3570 this.version = castToString(value); // StringType 3571 } else if (name.equals("code")) { 3572 this.code = castToCode(value); // CodeType 3573 } else if (name.equals("display")) { 3574 this.display = castToString(value); // StringType 3575 } else if (name.equals("designation")) { 3576 this.getDesignation().add((ConceptReferenceDesignationComponent) value); 3577 } else if (name.equals("contains")) { 3578 this.getContains().add((ValueSetExpansionContainsComponent) value); 3579 } else 3580 return super.setProperty(name, value); 3581 return value; 3582 } 3583 3584 @Override 3585 public Base makeProperty(int hash, String name) throws FHIRException { 3586 switch (hash) { 3587 case -887328209: return getSystemElement(); 3588 case 1732898850: return getAbstractElement(); 3589 case 24665195: return getInactiveElement(); 3590 case 351608024: return getVersionElement(); 3591 case 3059181: return getCodeElement(); 3592 case 1671764162: return getDisplayElement(); 3593 case -900931593: return addDesignation(); 3594 case -567445985: return addContains(); 3595 default: return super.makeProperty(hash, name); 3596 } 3597 3598 } 3599 3600 @Override 3601 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3602 switch (hash) { 3603 case -887328209: /*system*/ return new String[] {"uri"}; 3604 case 1732898850: /*abstract*/ return new String[] {"boolean"}; 3605 case 24665195: /*inactive*/ return new String[] {"boolean"}; 3606 case 351608024: /*version*/ return new String[] {"string"}; 3607 case 3059181: /*code*/ return new String[] {"code"}; 3608 case 1671764162: /*display*/ return new String[] {"string"}; 3609 case -900931593: /*designation*/ return new String[] {"@ValueSet.compose.include.concept.designation"}; 3610 case -567445985: /*contains*/ return new String[] {"@ValueSet.expansion.contains"}; 3611 default: return super.getTypesForProperty(hash, name); 3612 } 3613 3614 } 3615 3616 @Override 3617 public Base addChild(String name) throws FHIRException { 3618 if (name.equals("system")) { 3619 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.system"); 3620 } 3621 else if (name.equals("abstract")) { 3622 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.abstract"); 3623 } 3624 else if (name.equals("inactive")) { 3625 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.inactive"); 3626 } 3627 else if (name.equals("version")) { 3628 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version"); 3629 } 3630 else if (name.equals("code")) { 3631 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code"); 3632 } 3633 else if (name.equals("display")) { 3634 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.display"); 3635 } 3636 else if (name.equals("designation")) { 3637 return addDesignation(); 3638 } 3639 else if (name.equals("contains")) { 3640 return addContains(); 3641 } 3642 else 3643 return super.addChild(name); 3644 } 3645 3646 public ValueSetExpansionContainsComponent copy() { 3647 ValueSetExpansionContainsComponent dst = new ValueSetExpansionContainsComponent(); 3648 copyValues(dst); 3649 return dst; 3650 } 3651 3652 public void copyValues(ValueSetExpansionContainsComponent dst) { 3653 super.copyValues(dst); 3654 dst.system = system == null ? null : system.copy(); 3655 dst.abstract_ = abstract_ == null ? null : abstract_.copy(); 3656 dst.inactive = inactive == null ? null : inactive.copy(); 3657 dst.version = version == null ? null : version.copy(); 3658 dst.code = code == null ? null : code.copy(); 3659 dst.display = display == null ? null : display.copy(); 3660 if (designation != null) { 3661 dst.designation = new ArrayList<ConceptReferenceDesignationComponent>(); 3662 for (ConceptReferenceDesignationComponent i : designation) 3663 dst.designation.add(i.copy()); 3664 }; 3665 if (contains != null) { 3666 dst.contains = new ArrayList<ValueSetExpansionContainsComponent>(); 3667 for (ValueSetExpansionContainsComponent i : contains) 3668 dst.contains.add(i.copy()); 3669 }; 3670 } 3671 3672 @Override 3673 public boolean equalsDeep(Base other_) { 3674 if (!super.equalsDeep(other_)) 3675 return false; 3676 if (!(other_ instanceof ValueSetExpansionContainsComponent)) 3677 return false; 3678 ValueSetExpansionContainsComponent o = (ValueSetExpansionContainsComponent) other_; 3679 return compareDeep(system, o.system, true) && compareDeep(abstract_, o.abstract_, true) && compareDeep(inactive, o.inactive, true) 3680 && compareDeep(version, o.version, true) && compareDeep(code, o.code, true) && compareDeep(display, o.display, true) 3681 && compareDeep(designation, o.designation, true) && compareDeep(contains, o.contains, true); 3682 } 3683 3684 @Override 3685 public boolean equalsShallow(Base other_) { 3686 if (!super.equalsShallow(other_)) 3687 return false; 3688 if (!(other_ instanceof ValueSetExpansionContainsComponent)) 3689 return false; 3690 ValueSetExpansionContainsComponent o = (ValueSetExpansionContainsComponent) other_; 3691 return compareValues(system, o.system, true) && compareValues(abstract_, o.abstract_, true) && compareValues(inactive, o.inactive, true) 3692 && compareValues(version, o.version, true) && compareValues(code, o.code, true) && compareValues(display, o.display, true) 3693 ; 3694 } 3695 3696 public boolean isEmpty() { 3697 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, abstract_, inactive 3698 , version, code, display, designation, contains); 3699 } 3700 3701 public String fhirType() { 3702 return "ValueSet.expansion.contains"; 3703 3704 } 3705 3706 } 3707 3708 /** 3709 * A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance. 3710 */ 3711 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3712 @Description(shortDefinition="Additional identifier for the value set (business identifier)", formalDefinition="A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 3713 protected List<Identifier> identifier; 3714 3715 /** 3716 * If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change. 3717 */ 3718 @Child(name = "immutable", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true) 3719 @Description(shortDefinition="Indicates whether or not any change to the content logical definition may occur", formalDefinition="If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change." ) 3720 protected BooleanType immutable; 3721 3722 /** 3723 * Explanation of why this value set is needed and why it has been designed as it has. 3724 */ 3725 @Child(name = "purpose", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3726 @Description(shortDefinition="Why this value set is defined", formalDefinition="Explanation of why this value set is needed and why it has been designed as it has." ) 3727 protected MarkdownType purpose; 3728 3729 /** 3730 * A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set. 3731 */ 3732 @Child(name = "copyright", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=false) 3733 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set." ) 3734 protected MarkdownType copyright; 3735 3736 /** 3737 * A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD). 3738 */ 3739 @Child(name = "compose", type = {}, order=4, min=0, max=1, modifier=false, summary=false) 3740 @Description(shortDefinition="Content logical definition of the value set (CLD)", formalDefinition="A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD)." ) 3741 protected ValueSetComposeComponent compose; 3742 3743 /** 3744 * A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed. 3745 */ 3746 @Child(name = "expansion", type = {}, order=5, min=0, max=1, modifier=false, summary=false) 3747 @Description(shortDefinition="Used when the value set is \"expanded\"", formalDefinition="A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed." ) 3748 protected ValueSetExpansionComponent expansion; 3749 3750 private static final long serialVersionUID = 786712949L; 3751 3752 /** 3753 * Constructor 3754 */ 3755 public ValueSet() { 3756 super(); 3757 } 3758 3759 /** 3760 * Constructor 3761 */ 3762 public ValueSet(Enumeration<PublicationStatus> status) { 3763 super(); 3764 this.status = status; 3765 } 3766 3767 /** 3768 * @return {@link #url} (An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 3769 */ 3770 public UriType getUrlElement() { 3771 if (this.url == null) 3772 if (Configuration.errorOnAutoCreate()) 3773 throw new Error("Attempt to auto-create ValueSet.url"); 3774 else if (Configuration.doAutoCreate()) 3775 this.url = new UriType(); // bb 3776 return this.url; 3777 } 3778 3779 public boolean hasUrlElement() { 3780 return this.url != null && !this.url.isEmpty(); 3781 } 3782 3783 public boolean hasUrl() { 3784 return this.url != null && !this.url.isEmpty(); 3785 } 3786 3787 /** 3788 * @param value {@link #url} (An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 3789 */ 3790 public ValueSet setUrlElement(UriType value) { 3791 this.url = value; 3792 return this; 3793 } 3794 3795 /** 3796 * @return An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers. 3797 */ 3798 public String getUrl() { 3799 return this.url == null ? null : this.url.getValue(); 3800 } 3801 3802 /** 3803 * @param value An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers. 3804 */ 3805 public ValueSet setUrl(String value) { 3806 if (Utilities.noString(value)) 3807 this.url = null; 3808 else { 3809 if (this.url == null) 3810 this.url = new UriType(); 3811 this.url.setValue(value); 3812 } 3813 return this; 3814 } 3815 3816 /** 3817 * @return {@link #identifier} (A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.) 3818 */ 3819 public List<Identifier> getIdentifier() { 3820 if (this.identifier == null) 3821 this.identifier = new ArrayList<Identifier>(); 3822 return this.identifier; 3823 } 3824 3825 /** 3826 * @return Returns a reference to <code>this</code> for easy method chaining 3827 */ 3828 public ValueSet setIdentifier(List<Identifier> theIdentifier) { 3829 this.identifier = theIdentifier; 3830 return this; 3831 } 3832 3833 public boolean hasIdentifier() { 3834 if (this.identifier == null) 3835 return false; 3836 for (Identifier item : this.identifier) 3837 if (!item.isEmpty()) 3838 return true; 3839 return false; 3840 } 3841 3842 public Identifier addIdentifier() { //3 3843 Identifier t = new Identifier(); 3844 if (this.identifier == null) 3845 this.identifier = new ArrayList<Identifier>(); 3846 this.identifier.add(t); 3847 return t; 3848 } 3849 3850 public ValueSet addIdentifier(Identifier t) { //3 3851 if (t == null) 3852 return this; 3853 if (this.identifier == null) 3854 this.identifier = new ArrayList<Identifier>(); 3855 this.identifier.add(t); 3856 return this; 3857 } 3858 3859 /** 3860 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 3861 */ 3862 public Identifier getIdentifierFirstRep() { 3863 if (getIdentifier().isEmpty()) { 3864 addIdentifier(); 3865 } 3866 return getIdentifier().get(0); 3867 } 3868 3869 /** 3870 * @return {@link #version} (The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set 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 3871 */ 3872 public StringType getVersionElement() { 3873 if (this.version == null) 3874 if (Configuration.errorOnAutoCreate()) 3875 throw new Error("Attempt to auto-create ValueSet.version"); 3876 else if (Configuration.doAutoCreate()) 3877 this.version = new StringType(); // bb 3878 return this.version; 3879 } 3880 3881 public boolean hasVersionElement() { 3882 return this.version != null && !this.version.isEmpty(); 3883 } 3884 3885 public boolean hasVersion() { 3886 return this.version != null && !this.version.isEmpty(); 3887 } 3888 3889 /** 3890 * @param value {@link #version} (The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set 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 3891 */ 3892 public ValueSet setVersionElement(StringType value) { 3893 this.version = value; 3894 return this; 3895 } 3896 3897 /** 3898 * @return The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set 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. 3899 */ 3900 public String getVersion() { 3901 return this.version == null ? null : this.version.getValue(); 3902 } 3903 3904 /** 3905 * @param value The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set 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. 3906 */ 3907 public ValueSet setVersion(String value) { 3908 if (Utilities.noString(value)) 3909 this.version = null; 3910 else { 3911 if (this.version == null) 3912 this.version = new StringType(); 3913 this.version.setValue(value); 3914 } 3915 return this; 3916 } 3917 3918 /** 3919 * @return {@link #name} (A natural language name identifying the value set. 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 3920 */ 3921 public StringType getNameElement() { 3922 if (this.name == null) 3923 if (Configuration.errorOnAutoCreate()) 3924 throw new Error("Attempt to auto-create ValueSet.name"); 3925 else if (Configuration.doAutoCreate()) 3926 this.name = new StringType(); // bb 3927 return this.name; 3928 } 3929 3930 public boolean hasNameElement() { 3931 return this.name != null && !this.name.isEmpty(); 3932 } 3933 3934 public boolean hasName() { 3935 return this.name != null && !this.name.isEmpty(); 3936 } 3937 3938 /** 3939 * @param value {@link #name} (A natural language name identifying the value set. 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 3940 */ 3941 public ValueSet setNameElement(StringType value) { 3942 this.name = value; 3943 return this; 3944 } 3945 3946 /** 3947 * @return A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation. 3948 */ 3949 public String getName() { 3950 return this.name == null ? null : this.name.getValue(); 3951 } 3952 3953 /** 3954 * @param value A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation. 3955 */ 3956 public ValueSet setName(String value) { 3957 if (Utilities.noString(value)) 3958 this.name = null; 3959 else { 3960 if (this.name == null) 3961 this.name = new StringType(); 3962 this.name.setValue(value); 3963 } 3964 return this; 3965 } 3966 3967 /** 3968 * @return {@link #title} (A short, descriptive, user-friendly title for the value set.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 3969 */ 3970 public StringType getTitleElement() { 3971 if (this.title == null) 3972 if (Configuration.errorOnAutoCreate()) 3973 throw new Error("Attempt to auto-create ValueSet.title"); 3974 else if (Configuration.doAutoCreate()) 3975 this.title = new StringType(); // bb 3976 return this.title; 3977 } 3978 3979 public boolean hasTitleElement() { 3980 return this.title != null && !this.title.isEmpty(); 3981 } 3982 3983 public boolean hasTitle() { 3984 return this.title != null && !this.title.isEmpty(); 3985 } 3986 3987 /** 3988 * @param value {@link #title} (A short, descriptive, user-friendly title for the value set.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 3989 */ 3990 public ValueSet setTitleElement(StringType value) { 3991 this.title = value; 3992 return this; 3993 } 3994 3995 /** 3996 * @return A short, descriptive, user-friendly title for the value set. 3997 */ 3998 public String getTitle() { 3999 return this.title == null ? null : this.title.getValue(); 4000 } 4001 4002 /** 4003 * @param value A short, descriptive, user-friendly title for the value set. 4004 */ 4005 public ValueSet setTitle(String value) { 4006 if (Utilities.noString(value)) 4007 this.title = null; 4008 else { 4009 if (this.title == null) 4010 this.title = new StringType(); 4011 this.title.setValue(value); 4012 } 4013 return this; 4014 } 4015 4016 /** 4017 * @return {@link #status} (The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 4018 */ 4019 public Enumeration<PublicationStatus> getStatusElement() { 4020 if (this.status == null) 4021 if (Configuration.errorOnAutoCreate()) 4022 throw new Error("Attempt to auto-create ValueSet.status"); 4023 else if (Configuration.doAutoCreate()) 4024 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 4025 return this.status; 4026 } 4027 4028 public boolean hasStatusElement() { 4029 return this.status != null && !this.status.isEmpty(); 4030 } 4031 4032 public boolean hasStatus() { 4033 return this.status != null && !this.status.isEmpty(); 4034 } 4035 4036 /** 4037 * @param value {@link #status} (The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 4038 */ 4039 public ValueSet setStatusElement(Enumeration<PublicationStatus> value) { 4040 this.status = value; 4041 return this; 4042 } 4043 4044 /** 4045 * @return The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state. 4046 */ 4047 public PublicationStatus getStatus() { 4048 return this.status == null ? null : this.status.getValue(); 4049 } 4050 4051 /** 4052 * @param value The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state. 4053 */ 4054 public ValueSet setStatus(PublicationStatus value) { 4055 if (this.status == null) 4056 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 4057 this.status.setValue(value); 4058 return this; 4059 } 4060 4061 /** 4062 * @return {@link #experimental} (A Boolean value to indicate that this value set 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 4063 */ 4064 public BooleanType getExperimentalElement() { 4065 if (this.experimental == null) 4066 if (Configuration.errorOnAutoCreate()) 4067 throw new Error("Attempt to auto-create ValueSet.experimental"); 4068 else if (Configuration.doAutoCreate()) 4069 this.experimental = new BooleanType(); // bb 4070 return this.experimental; 4071 } 4072 4073 public boolean hasExperimentalElement() { 4074 return this.experimental != null && !this.experimental.isEmpty(); 4075 } 4076 4077 public boolean hasExperimental() { 4078 return this.experimental != null && !this.experimental.isEmpty(); 4079 } 4080 4081 /** 4082 * @param value {@link #experimental} (A Boolean value to indicate that this value set 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 4083 */ 4084 public ValueSet setExperimentalElement(BooleanType value) { 4085 this.experimental = value; 4086 return this; 4087 } 4088 4089 /** 4090 * @return A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 4091 */ 4092 public boolean getExperimental() { 4093 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 4094 } 4095 4096 /** 4097 * @param value A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 4098 */ 4099 public ValueSet setExperimental(boolean value) { 4100 if (this.experimental == null) 4101 this.experimental = new BooleanType(); 4102 this.experimental.setValue(value); 4103 return this; 4104 } 4105 4106 /** 4107 * @return {@link #date} (The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 4108 */ 4109 public DateTimeType getDateElement() { 4110 if (this.date == null) 4111 if (Configuration.errorOnAutoCreate()) 4112 throw new Error("Attempt to auto-create ValueSet.date"); 4113 else if (Configuration.doAutoCreate()) 4114 this.date = new DateTimeType(); // bb 4115 return this.date; 4116 } 4117 4118 public boolean hasDateElement() { 4119 return this.date != null && !this.date.isEmpty(); 4120 } 4121 4122 public boolean hasDate() { 4123 return this.date != null && !this.date.isEmpty(); 4124 } 4125 4126 /** 4127 * @param value {@link #date} (The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 4128 */ 4129 public ValueSet setDateElement(DateTimeType value) { 4130 this.date = value; 4131 return this; 4132 } 4133 4134 /** 4135 * @return The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition'). 4136 */ 4137 public Date getDate() { 4138 return this.date == null ? null : this.date.getValue(); 4139 } 4140 4141 /** 4142 * @param value The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition'). 4143 */ 4144 public ValueSet setDate(Date value) { 4145 if (value == null) 4146 this.date = null; 4147 else { 4148 if (this.date == null) 4149 this.date = new DateTimeType(); 4150 this.date.setValue(value); 4151 } 4152 return this; 4153 } 4154 4155 /** 4156 * @return {@link #publisher} (The name of the organization or individual that published the value set.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 4157 */ 4158 public StringType getPublisherElement() { 4159 if (this.publisher == null) 4160 if (Configuration.errorOnAutoCreate()) 4161 throw new Error("Attempt to auto-create ValueSet.publisher"); 4162 else if (Configuration.doAutoCreate()) 4163 this.publisher = new StringType(); // bb 4164 return this.publisher; 4165 } 4166 4167 public boolean hasPublisherElement() { 4168 return this.publisher != null && !this.publisher.isEmpty(); 4169 } 4170 4171 public boolean hasPublisher() { 4172 return this.publisher != null && !this.publisher.isEmpty(); 4173 } 4174 4175 /** 4176 * @param value {@link #publisher} (The name of the organization or individual that published the value set.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 4177 */ 4178 public ValueSet setPublisherElement(StringType value) { 4179 this.publisher = value; 4180 return this; 4181 } 4182 4183 /** 4184 * @return The name of the organization or individual that published the value set. 4185 */ 4186 public String getPublisher() { 4187 return this.publisher == null ? null : this.publisher.getValue(); 4188 } 4189 4190 /** 4191 * @param value The name of the organization or individual that published the value set. 4192 */ 4193 public ValueSet setPublisher(String value) { 4194 if (Utilities.noString(value)) 4195 this.publisher = null; 4196 else { 4197 if (this.publisher == null) 4198 this.publisher = new StringType(); 4199 this.publisher.setValue(value); 4200 } 4201 return this; 4202 } 4203 4204 /** 4205 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 4206 */ 4207 public List<ContactDetail> getContact() { 4208 if (this.contact == null) 4209 this.contact = new ArrayList<ContactDetail>(); 4210 return this.contact; 4211 } 4212 4213 /** 4214 * @return Returns a reference to <code>this</code> for easy method chaining 4215 */ 4216 public ValueSet setContact(List<ContactDetail> theContact) { 4217 this.contact = theContact; 4218 return this; 4219 } 4220 4221 public boolean hasContact() { 4222 if (this.contact == null) 4223 return false; 4224 for (ContactDetail item : this.contact) 4225 if (!item.isEmpty()) 4226 return true; 4227 return false; 4228 } 4229 4230 public ContactDetail addContact() { //3 4231 ContactDetail t = new ContactDetail(); 4232 if (this.contact == null) 4233 this.contact = new ArrayList<ContactDetail>(); 4234 this.contact.add(t); 4235 return t; 4236 } 4237 4238 public ValueSet addContact(ContactDetail t) { //3 4239 if (t == null) 4240 return this; 4241 if (this.contact == null) 4242 this.contact = new ArrayList<ContactDetail>(); 4243 this.contact.add(t); 4244 return this; 4245 } 4246 4247 /** 4248 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 4249 */ 4250 public ContactDetail getContactFirstRep() { 4251 if (getContact().isEmpty()) { 4252 addContact(); 4253 } 4254 return getContact().get(0); 4255 } 4256 4257 /** 4258 * @return {@link #description} (A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 4259 */ 4260 public MarkdownType getDescriptionElement() { 4261 if (this.description == null) 4262 if (Configuration.errorOnAutoCreate()) 4263 throw new Error("Attempt to auto-create ValueSet.description"); 4264 else if (Configuration.doAutoCreate()) 4265 this.description = new MarkdownType(); // bb 4266 return this.description; 4267 } 4268 4269 public boolean hasDescriptionElement() { 4270 return this.description != null && !this.description.isEmpty(); 4271 } 4272 4273 public boolean hasDescription() { 4274 return this.description != null && !this.description.isEmpty(); 4275 } 4276 4277 /** 4278 * @param value {@link #description} (A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 4279 */ 4280 public ValueSet setDescriptionElement(MarkdownType value) { 4281 this.description = value; 4282 return this; 4283 } 4284 4285 /** 4286 * @return A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set. 4287 */ 4288 public String getDescription() { 4289 return this.description == null ? null : this.description.getValue(); 4290 } 4291 4292 /** 4293 * @param value A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set. 4294 */ 4295 public ValueSet setDescription(String value) { 4296 if (value == null) 4297 this.description = null; 4298 else { 4299 if (this.description == null) 4300 this.description = new MarkdownType(); 4301 this.description.setValue(value); 4302 } 4303 return this; 4304 } 4305 4306 /** 4307 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.) 4308 */ 4309 public List<UsageContext> getUseContext() { 4310 if (this.useContext == null) 4311 this.useContext = new ArrayList<UsageContext>(); 4312 return this.useContext; 4313 } 4314 4315 /** 4316 * @return Returns a reference to <code>this</code> for easy method chaining 4317 */ 4318 public ValueSet setUseContext(List<UsageContext> theUseContext) { 4319 this.useContext = theUseContext; 4320 return this; 4321 } 4322 4323 public boolean hasUseContext() { 4324 if (this.useContext == null) 4325 return false; 4326 for (UsageContext item : this.useContext) 4327 if (!item.isEmpty()) 4328 return true; 4329 return false; 4330 } 4331 4332 public UsageContext addUseContext() { //3 4333 UsageContext t = new UsageContext(); 4334 if (this.useContext == null) 4335 this.useContext = new ArrayList<UsageContext>(); 4336 this.useContext.add(t); 4337 return t; 4338 } 4339 4340 public ValueSet addUseContext(UsageContext t) { //3 4341 if (t == null) 4342 return this; 4343 if (this.useContext == null) 4344 this.useContext = new ArrayList<UsageContext>(); 4345 this.useContext.add(t); 4346 return this; 4347 } 4348 4349 /** 4350 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 4351 */ 4352 public UsageContext getUseContextFirstRep() { 4353 if (getUseContext().isEmpty()) { 4354 addUseContext(); 4355 } 4356 return getUseContext().get(0); 4357 } 4358 4359 /** 4360 * @return {@link #jurisdiction} (A legal or geographic region in which the value set is intended to be used.) 4361 */ 4362 public List<CodeableConcept> getJurisdiction() { 4363 if (this.jurisdiction == null) 4364 this.jurisdiction = new ArrayList<CodeableConcept>(); 4365 return this.jurisdiction; 4366 } 4367 4368 /** 4369 * @return Returns a reference to <code>this</code> for easy method chaining 4370 */ 4371 public ValueSet setJurisdiction(List<CodeableConcept> theJurisdiction) { 4372 this.jurisdiction = theJurisdiction; 4373 return this; 4374 } 4375 4376 public boolean hasJurisdiction() { 4377 if (this.jurisdiction == null) 4378 return false; 4379 for (CodeableConcept item : this.jurisdiction) 4380 if (!item.isEmpty()) 4381 return true; 4382 return false; 4383 } 4384 4385 public CodeableConcept addJurisdiction() { //3 4386 CodeableConcept t = new CodeableConcept(); 4387 if (this.jurisdiction == null) 4388 this.jurisdiction = new ArrayList<CodeableConcept>(); 4389 this.jurisdiction.add(t); 4390 return t; 4391 } 4392 4393 public ValueSet addJurisdiction(CodeableConcept t) { //3 4394 if (t == null) 4395 return this; 4396 if (this.jurisdiction == null) 4397 this.jurisdiction = new ArrayList<CodeableConcept>(); 4398 this.jurisdiction.add(t); 4399 return this; 4400 } 4401 4402 /** 4403 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 4404 */ 4405 public CodeableConcept getJurisdictionFirstRep() { 4406 if (getJurisdiction().isEmpty()) { 4407 addJurisdiction(); 4408 } 4409 return getJurisdiction().get(0); 4410 } 4411 4412 /** 4413 * @return {@link #immutable} (If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.). This is the underlying object with id, value and extensions. The accessor "getImmutable" gives direct access to the value 4414 */ 4415 public BooleanType getImmutableElement() { 4416 if (this.immutable == null) 4417 if (Configuration.errorOnAutoCreate()) 4418 throw new Error("Attempt to auto-create ValueSet.immutable"); 4419 else if (Configuration.doAutoCreate()) 4420 this.immutable = new BooleanType(); // bb 4421 return this.immutable; 4422 } 4423 4424 public boolean hasImmutableElement() { 4425 return this.immutable != null && !this.immutable.isEmpty(); 4426 } 4427 4428 public boolean hasImmutable() { 4429 return this.immutable != null && !this.immutable.isEmpty(); 4430 } 4431 4432 /** 4433 * @param value {@link #immutable} (If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.). This is the underlying object with id, value and extensions. The accessor "getImmutable" gives direct access to the value 4434 */ 4435 public ValueSet setImmutableElement(BooleanType value) { 4436 this.immutable = value; 4437 return this; 4438 } 4439 4440 /** 4441 * @return If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change. 4442 */ 4443 public boolean getImmutable() { 4444 return this.immutable == null || this.immutable.isEmpty() ? false : this.immutable.getValue(); 4445 } 4446 4447 /** 4448 * @param value If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change. 4449 */ 4450 public ValueSet setImmutable(boolean value) { 4451 if (this.immutable == null) 4452 this.immutable = new BooleanType(); 4453 this.immutable.setValue(value); 4454 return this; 4455 } 4456 4457 /** 4458 * @return {@link #purpose} (Explanation of why this value set is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 4459 */ 4460 public MarkdownType getPurposeElement() { 4461 if (this.purpose == null) 4462 if (Configuration.errorOnAutoCreate()) 4463 throw new Error("Attempt to auto-create ValueSet.purpose"); 4464 else if (Configuration.doAutoCreate()) 4465 this.purpose = new MarkdownType(); // bb 4466 return this.purpose; 4467 } 4468 4469 public boolean hasPurposeElement() { 4470 return this.purpose != null && !this.purpose.isEmpty(); 4471 } 4472 4473 public boolean hasPurpose() { 4474 return this.purpose != null && !this.purpose.isEmpty(); 4475 } 4476 4477 /** 4478 * @param value {@link #purpose} (Explanation of why this value set is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 4479 */ 4480 public ValueSet setPurposeElement(MarkdownType value) { 4481 this.purpose = value; 4482 return this; 4483 } 4484 4485 /** 4486 * @return Explanation of why this value set is needed and why it has been designed as it has. 4487 */ 4488 public String getPurpose() { 4489 return this.purpose == null ? null : this.purpose.getValue(); 4490 } 4491 4492 /** 4493 * @param value Explanation of why this value set is needed and why it has been designed as it has. 4494 */ 4495 public ValueSet setPurpose(String value) { 4496 if (value == null) 4497 this.purpose = null; 4498 else { 4499 if (this.purpose == null) 4500 this.purpose = new MarkdownType(); 4501 this.purpose.setValue(value); 4502 } 4503 return this; 4504 } 4505 4506 /** 4507 * @return {@link #copyright} (A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 4508 */ 4509 public MarkdownType getCopyrightElement() { 4510 if (this.copyright == null) 4511 if (Configuration.errorOnAutoCreate()) 4512 throw new Error("Attempt to auto-create ValueSet.copyright"); 4513 else if (Configuration.doAutoCreate()) 4514 this.copyright = new MarkdownType(); // bb 4515 return this.copyright; 4516 } 4517 4518 public boolean hasCopyrightElement() { 4519 return this.copyright != null && !this.copyright.isEmpty(); 4520 } 4521 4522 public boolean hasCopyright() { 4523 return this.copyright != null && !this.copyright.isEmpty(); 4524 } 4525 4526 /** 4527 * @param value {@link #copyright} (A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 4528 */ 4529 public ValueSet setCopyrightElement(MarkdownType value) { 4530 this.copyright = value; 4531 return this; 4532 } 4533 4534 /** 4535 * @return A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set. 4536 */ 4537 public String getCopyright() { 4538 return this.copyright == null ? null : this.copyright.getValue(); 4539 } 4540 4541 /** 4542 * @param value A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set. 4543 */ 4544 public ValueSet setCopyright(String value) { 4545 if (value == null) 4546 this.copyright = null; 4547 else { 4548 if (this.copyright == null) 4549 this.copyright = new MarkdownType(); 4550 this.copyright.setValue(value); 4551 } 4552 return this; 4553 } 4554 4555 /** 4556 * @return {@link #compose} (A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).) 4557 */ 4558 public ValueSetComposeComponent getCompose() { 4559 if (this.compose == null) 4560 if (Configuration.errorOnAutoCreate()) 4561 throw new Error("Attempt to auto-create ValueSet.compose"); 4562 else if (Configuration.doAutoCreate()) 4563 this.compose = new ValueSetComposeComponent(); // cc 4564 return this.compose; 4565 } 4566 4567 public boolean hasCompose() { 4568 return this.compose != null && !this.compose.isEmpty(); 4569 } 4570 4571 /** 4572 * @param value {@link #compose} (A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).) 4573 */ 4574 public ValueSet setCompose(ValueSetComposeComponent value) { 4575 this.compose = value; 4576 return this; 4577 } 4578 4579 /** 4580 * @return {@link #expansion} (A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.) 4581 */ 4582 public ValueSetExpansionComponent getExpansion() { 4583 if (this.expansion == null) 4584 if (Configuration.errorOnAutoCreate()) 4585 throw new Error("Attempt to auto-create ValueSet.expansion"); 4586 else if (Configuration.doAutoCreate()) 4587 this.expansion = new ValueSetExpansionComponent(); // cc 4588 return this.expansion; 4589 } 4590 4591 public boolean hasExpansion() { 4592 return this.expansion != null && !this.expansion.isEmpty(); 4593 } 4594 4595 /** 4596 * @param value {@link #expansion} (A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.) 4597 */ 4598 public ValueSet setExpansion(ValueSetExpansionComponent value) { 4599 this.expansion = value; 4600 return this; 4601 } 4602 4603 protected void listChildren(List<Property> children) { 4604 super.listChildren(children); 4605 children.add(new Property("url", "uri", "An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.", 0, 1, url)); 4606 children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 4607 children.add(new Property("version", "string", "The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version)); 4608 children.add(new Property("name", "string", "A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name)); 4609 children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the value set.", 0, 1, title)); 4610 children.add(new Property("status", "code", "The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.", 0, 1, status)); 4611 children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental)); 4612 children.add(new Property("date", "dateTime", "The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').", 0, 1, date)); 4613 children.add(new Property("publisher", "string", "The name of the organization or individual that published the value set.", 0, 1, publisher)); 4614 children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 4615 children.add(new Property("description", "markdown", "A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.", 0, 1, description)); 4616 children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 4617 children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the value set is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); 4618 children.add(new Property("immutable", "boolean", "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", 0, 1, immutable)); 4619 children.add(new Property("purpose", "markdown", "Explanation of why this value set is needed and why it has been designed as it has.", 0, 1, purpose)); 4620 children.add(new Property("copyright", "markdown", "A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.", 0, 1, copyright)); 4621 children.add(new Property("compose", "", "A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).", 0, 1, compose)); 4622 children.add(new Property("expansion", "", "A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", 0, 1, expansion)); 4623 } 4624 4625 @Override 4626 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4627 switch (_hash) { 4628 case 116079: /*url*/ return new Property("url", "uri", "An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.", 0, 1, url); 4629 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier); 4630 case 351608024: /*version*/ return new Property("version", "string", "The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version); 4631 case 3373707: /*name*/ return new Property("name", "string", "A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name); 4632 case 110371416: /*title*/ return new Property("title", "string", "A short, descriptive, user-friendly title for the value set.", 0, 1, title); 4633 case -892481550: /*status*/ return new Property("status", "code", "The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.", 0, 1, status); 4634 case -404562712: /*experimental*/ return new Property("experimental", "boolean", "A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental); 4635 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').", 0, 1, date); 4636 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the organization or individual that published the value set.", 0, 1, publisher); 4637 case 951526432: /*contact*/ return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact); 4638 case -1724546052: /*description*/ return new Property("description", "markdown", "A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.", 0, 1, description); 4639 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 4640 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the value set is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction); 4641 case 1596987778: /*immutable*/ return new Property("immutable", "boolean", "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", 0, 1, immutable); 4642 case -220463842: /*purpose*/ return new Property("purpose", "markdown", "Explanation of why this value set is needed and why it has been designed as it has.", 0, 1, purpose); 4643 case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.", 0, 1, copyright); 4644 case 950497682: /*compose*/ return new Property("compose", "", "A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).", 0, 1, compose); 4645 case 17878207: /*expansion*/ return new Property("expansion", "", "A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", 0, 1, expansion); 4646 default: return super.getNamedProperty(_hash, _name, _checkValid); 4647 } 4648 4649 } 4650 4651 @Override 4652 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4653 switch (hash) { 4654 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 4655 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 4656 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 4657 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 4658 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 4659 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 4660 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 4661 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 4662 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 4663 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 4664 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 4665 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 4666 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 4667 case 1596987778: /*immutable*/ return this.immutable == null ? new Base[0] : new Base[] {this.immutable}; // BooleanType 4668 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 4669 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 4670 case 950497682: /*compose*/ return this.compose == null ? new Base[0] : new Base[] {this.compose}; // ValueSetComposeComponent 4671 case 17878207: /*expansion*/ return this.expansion == null ? new Base[0] : new Base[] {this.expansion}; // ValueSetExpansionComponent 4672 default: return super.getProperty(hash, name, checkValid); 4673 } 4674 4675 } 4676 4677 @Override 4678 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4679 switch (hash) { 4680 case 116079: // url 4681 this.url = castToUri(value); // UriType 4682 return value; 4683 case -1618432855: // identifier 4684 this.getIdentifier().add(castToIdentifier(value)); // Identifier 4685 return value; 4686 case 351608024: // version 4687 this.version = castToString(value); // StringType 4688 return value; 4689 case 3373707: // name 4690 this.name = castToString(value); // StringType 4691 return value; 4692 case 110371416: // title 4693 this.title = castToString(value); // StringType 4694 return value; 4695 case -892481550: // status 4696 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 4697 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 4698 return value; 4699 case -404562712: // experimental 4700 this.experimental = castToBoolean(value); // BooleanType 4701 return value; 4702 case 3076014: // date 4703 this.date = castToDateTime(value); // DateTimeType 4704 return value; 4705 case 1447404028: // publisher 4706 this.publisher = castToString(value); // StringType 4707 return value; 4708 case 951526432: // contact 4709 this.getContact().add(castToContactDetail(value)); // ContactDetail 4710 return value; 4711 case -1724546052: // description 4712 this.description = castToMarkdown(value); // MarkdownType 4713 return value; 4714 case -669707736: // useContext 4715 this.getUseContext().add(castToUsageContext(value)); // UsageContext 4716 return value; 4717 case -507075711: // jurisdiction 4718 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 4719 return value; 4720 case 1596987778: // immutable 4721 this.immutable = castToBoolean(value); // BooleanType 4722 return value; 4723 case -220463842: // purpose 4724 this.purpose = castToMarkdown(value); // MarkdownType 4725 return value; 4726 case 1522889671: // copyright 4727 this.copyright = castToMarkdown(value); // MarkdownType 4728 return value; 4729 case 950497682: // compose 4730 this.compose = (ValueSetComposeComponent) value; // ValueSetComposeComponent 4731 return value; 4732 case 17878207: // expansion 4733 this.expansion = (ValueSetExpansionComponent) value; // ValueSetExpansionComponent 4734 return value; 4735 default: return super.setProperty(hash, name, value); 4736 } 4737 4738 } 4739 4740 @Override 4741 public Base setProperty(String name, Base value) throws FHIRException { 4742 if (name.equals("url")) { 4743 this.url = castToUri(value); // UriType 4744 } else if (name.equals("identifier")) { 4745 this.getIdentifier().add(castToIdentifier(value)); 4746 } else if (name.equals("version")) { 4747 this.version = castToString(value); // StringType 4748 } else if (name.equals("name")) { 4749 this.name = castToString(value); // StringType 4750 } else if (name.equals("title")) { 4751 this.title = castToString(value); // StringType 4752 } else if (name.equals("status")) { 4753 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 4754 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 4755 } else if (name.equals("experimental")) { 4756 this.experimental = castToBoolean(value); // BooleanType 4757 } else if (name.equals("date")) { 4758 this.date = castToDateTime(value); // DateTimeType 4759 } else if (name.equals("publisher")) { 4760 this.publisher = castToString(value); // StringType 4761 } else if (name.equals("contact")) { 4762 this.getContact().add(castToContactDetail(value)); 4763 } else if (name.equals("description")) { 4764 this.description = castToMarkdown(value); // MarkdownType 4765 } else if (name.equals("useContext")) { 4766 this.getUseContext().add(castToUsageContext(value)); 4767 } else if (name.equals("jurisdiction")) { 4768 this.getJurisdiction().add(castToCodeableConcept(value)); 4769 } else if (name.equals("immutable")) { 4770 this.immutable = castToBoolean(value); // BooleanType 4771 } else if (name.equals("purpose")) { 4772 this.purpose = castToMarkdown(value); // MarkdownType 4773 } else if (name.equals("copyright")) { 4774 this.copyright = castToMarkdown(value); // MarkdownType 4775 } else if (name.equals("compose")) { 4776 this.compose = (ValueSetComposeComponent) value; // ValueSetComposeComponent 4777 } else if (name.equals("expansion")) { 4778 this.expansion = (ValueSetExpansionComponent) value; // ValueSetExpansionComponent 4779 } else 4780 return super.setProperty(name, value); 4781 return value; 4782 } 4783 4784 @Override 4785 public Base makeProperty(int hash, String name) throws FHIRException { 4786 switch (hash) { 4787 case 116079: return getUrlElement(); 4788 case -1618432855: return addIdentifier(); 4789 case 351608024: return getVersionElement(); 4790 case 3373707: return getNameElement(); 4791 case 110371416: return getTitleElement(); 4792 case -892481550: return getStatusElement(); 4793 case -404562712: return getExperimentalElement(); 4794 case 3076014: return getDateElement(); 4795 case 1447404028: return getPublisherElement(); 4796 case 951526432: return addContact(); 4797 case -1724546052: return getDescriptionElement(); 4798 case -669707736: return addUseContext(); 4799 case -507075711: return addJurisdiction(); 4800 case 1596987778: return getImmutableElement(); 4801 case -220463842: return getPurposeElement(); 4802 case 1522889671: return getCopyrightElement(); 4803 case 950497682: return getCompose(); 4804 case 17878207: return getExpansion(); 4805 default: return super.makeProperty(hash, name); 4806 } 4807 4808 } 4809 4810 @Override 4811 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4812 switch (hash) { 4813 case 116079: /*url*/ return new String[] {"uri"}; 4814 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 4815 case 351608024: /*version*/ return new String[] {"string"}; 4816 case 3373707: /*name*/ return new String[] {"string"}; 4817 case 110371416: /*title*/ return new String[] {"string"}; 4818 case -892481550: /*status*/ return new String[] {"code"}; 4819 case -404562712: /*experimental*/ return new String[] {"boolean"}; 4820 case 3076014: /*date*/ return new String[] {"dateTime"}; 4821 case 1447404028: /*publisher*/ return new String[] {"string"}; 4822 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 4823 case -1724546052: /*description*/ return new String[] {"markdown"}; 4824 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 4825 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 4826 case 1596987778: /*immutable*/ return new String[] {"boolean"}; 4827 case -220463842: /*purpose*/ return new String[] {"markdown"}; 4828 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 4829 case 950497682: /*compose*/ return new String[] {}; 4830 case 17878207: /*expansion*/ return new String[] {}; 4831 default: return super.getTypesForProperty(hash, name); 4832 } 4833 4834 } 4835 4836 @Override 4837 public Base addChild(String name) throws FHIRException { 4838 if (name.equals("url")) { 4839 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.url"); 4840 } 4841 else if (name.equals("identifier")) { 4842 return addIdentifier(); 4843 } 4844 else if (name.equals("version")) { 4845 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version"); 4846 } 4847 else if (name.equals("name")) { 4848 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.name"); 4849 } 4850 else if (name.equals("title")) { 4851 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.title"); 4852 } 4853 else if (name.equals("status")) { 4854 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.status"); 4855 } 4856 else if (name.equals("experimental")) { 4857 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.experimental"); 4858 } 4859 else if (name.equals("date")) { 4860 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.date"); 4861 } 4862 else if (name.equals("publisher")) { 4863 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.publisher"); 4864 } 4865 else if (name.equals("contact")) { 4866 return addContact(); 4867 } 4868 else if (name.equals("description")) { 4869 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.description"); 4870 } 4871 else if (name.equals("useContext")) { 4872 return addUseContext(); 4873 } 4874 else if (name.equals("jurisdiction")) { 4875 return addJurisdiction(); 4876 } 4877 else if (name.equals("immutable")) { 4878 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.immutable"); 4879 } 4880 else if (name.equals("purpose")) { 4881 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.purpose"); 4882 } 4883 else if (name.equals("copyright")) { 4884 throw new FHIRException("Cannot call addChild on a primitive type ValueSet.copyright"); 4885 } 4886 else if (name.equals("compose")) { 4887 this.compose = new ValueSetComposeComponent(); 4888 return this.compose; 4889 } 4890 else if (name.equals("expansion")) { 4891 this.expansion = new ValueSetExpansionComponent(); 4892 return this.expansion; 4893 } 4894 else 4895 return super.addChild(name); 4896 } 4897 4898 public String fhirType() { 4899 return "ValueSet"; 4900 4901 } 4902 4903 public ValueSet copy() { 4904 ValueSet dst = new ValueSet(); 4905 copyValues(dst); 4906 return dst; 4907 } 4908 4909 public void copyValues(ValueSet dst) { 4910 super.copyValues(dst); 4911 dst.url = url == null ? null : url.copy(); 4912 if (identifier != null) { 4913 dst.identifier = new ArrayList<Identifier>(); 4914 for (Identifier i : identifier) 4915 dst.identifier.add(i.copy()); 4916 }; 4917 dst.version = version == null ? null : version.copy(); 4918 dst.name = name == null ? null : name.copy(); 4919 dst.title = title == null ? null : title.copy(); 4920 dst.status = status == null ? null : status.copy(); 4921 dst.experimental = experimental == null ? null : experimental.copy(); 4922 dst.date = date == null ? null : date.copy(); 4923 dst.publisher = publisher == null ? null : publisher.copy(); 4924 if (contact != null) { 4925 dst.contact = new ArrayList<ContactDetail>(); 4926 for (ContactDetail i : contact) 4927 dst.contact.add(i.copy()); 4928 }; 4929 dst.description = description == null ? null : description.copy(); 4930 if (useContext != null) { 4931 dst.useContext = new ArrayList<UsageContext>(); 4932 for (UsageContext i : useContext) 4933 dst.useContext.add(i.copy()); 4934 }; 4935 if (jurisdiction != null) { 4936 dst.jurisdiction = new ArrayList<CodeableConcept>(); 4937 for (CodeableConcept i : jurisdiction) 4938 dst.jurisdiction.add(i.copy()); 4939 }; 4940 dst.immutable = immutable == null ? null : immutable.copy(); 4941 dst.purpose = purpose == null ? null : purpose.copy(); 4942 dst.copyright = copyright == null ? null : copyright.copy(); 4943 dst.compose = compose == null ? null : compose.copy(); 4944 dst.expansion = expansion == null ? null : expansion.copy(); 4945 } 4946 4947 protected ValueSet typedCopy() { 4948 return copy(); 4949 } 4950 4951 @Override 4952 public boolean equalsDeep(Base other_) { 4953 if (!super.equalsDeep(other_)) 4954 return false; 4955 if (!(other_ instanceof ValueSet)) 4956 return false; 4957 ValueSet o = (ValueSet) other_; 4958 return compareDeep(identifier, o.identifier, true) && compareDeep(immutable, o.immutable, true) 4959 && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true) && compareDeep(compose, o.compose, true) 4960 && compareDeep(expansion, o.expansion, true); 4961 } 4962 4963 @Override 4964 public boolean equalsShallow(Base other_) { 4965 if (!super.equalsShallow(other_)) 4966 return false; 4967 if (!(other_ instanceof ValueSet)) 4968 return false; 4969 ValueSet o = (ValueSet) other_; 4970 return compareValues(immutable, o.immutable, true) && compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) 4971 ; 4972 } 4973 4974 public boolean isEmpty() { 4975 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, immutable, purpose 4976 , copyright, compose, expansion); 4977 } 4978 4979 @Override 4980 public ResourceType getResourceType() { 4981 return ResourceType.ValueSet; 4982 } 4983 4984 /** 4985 * Search parameter: <b>date</b> 4986 * <p> 4987 * Description: <b>The value set publication date</b><br> 4988 * Type: <b>date</b><br> 4989 * Path: <b>ValueSet.date</b><br> 4990 * </p> 4991 */ 4992 @SearchParamDefinition(name="date", path="ValueSet.date", description="The value set publication date", type="date" ) 4993 public static final String SP_DATE = "date"; 4994 /** 4995 * <b>Fluent Client</b> search parameter constant for <b>date</b> 4996 * <p> 4997 * Description: <b>The value set publication date</b><br> 4998 * Type: <b>date</b><br> 4999 * Path: <b>ValueSet.date</b><br> 5000 * </p> 5001 */ 5002 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 5003 5004 /** 5005 * Search parameter: <b>identifier</b> 5006 * <p> 5007 * Description: <b>External identifier for the value set</b><br> 5008 * Type: <b>token</b><br> 5009 * Path: <b>ValueSet.identifier</b><br> 5010 * </p> 5011 */ 5012 @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="External identifier for the value set", type="token" ) 5013 public static final String SP_IDENTIFIER = "identifier"; 5014 /** 5015 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 5016 * <p> 5017 * Description: <b>External identifier for the value set</b><br> 5018 * Type: <b>token</b><br> 5019 * Path: <b>ValueSet.identifier</b><br> 5020 * </p> 5021 */ 5022 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 5023 5024 /** 5025 * Search parameter: <b>code</b> 5026 * <p> 5027 * Description: <b>This special parameter searches for codes in the value set. See additional notes on the ValueSet resource</b><br> 5028 * Type: <b>token</b><br> 5029 * Path: <b>ValueSet.expansion.contains.code, ValueSet.compose.include.concept.code</b><br> 5030 * </p> 5031 */ 5032 @SearchParamDefinition(name="code", path="ValueSet.expansion.contains.code | ValueSet.compose.include.concept.code", description="This special parameter searches for codes in the value set. See additional notes on the ValueSet resource", type="token" ) 5033 public static final String SP_CODE = "code"; 5034 /** 5035 * <b>Fluent Client</b> search parameter constant for <b>code</b> 5036 * <p> 5037 * Description: <b>This special parameter searches for codes in the value set. See additional notes on the ValueSet resource</b><br> 5038 * Type: <b>token</b><br> 5039 * Path: <b>ValueSet.expansion.contains.code, ValueSet.compose.include.concept.code</b><br> 5040 * </p> 5041 */ 5042 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 5043 5044 /** 5045 * Search parameter: <b>context-type-value</b> 5046 * <p> 5047 * Description: <b>A use context type and value assigned to the value set</b><br> 5048 * Type: <b>composite</b><br> 5049 * Path: <b></b><br> 5050 * </p> 5051 */ 5052 @SearchParamDefinition(name="context-type-value", path="ValueSet.useContext", description="A use context type and value assigned to the value set", type="composite", compositeOf={"context-type", "context"} ) 5053 public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value"; 5054 /** 5055 * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b> 5056 * <p> 5057 * Description: <b>A use context type and value assigned to the value set</b><br> 5058 * Type: <b>composite</b><br> 5059 * Path: <b></b><br> 5060 * </p> 5061 */ 5062 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE); 5063 5064 /** 5065 * Search parameter: <b>jurisdiction</b> 5066 * <p> 5067 * Description: <b>Intended jurisdiction for the value set</b><br> 5068 * Type: <b>token</b><br> 5069 * Path: <b>ValueSet.jurisdiction</b><br> 5070 * </p> 5071 */ 5072 @SearchParamDefinition(name="jurisdiction", path="ValueSet.jurisdiction", description="Intended jurisdiction for the value set", type="token" ) 5073 public static final String SP_JURISDICTION = "jurisdiction"; 5074 /** 5075 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 5076 * <p> 5077 * Description: <b>Intended jurisdiction for the value set</b><br> 5078 * Type: <b>token</b><br> 5079 * Path: <b>ValueSet.jurisdiction</b><br> 5080 * </p> 5081 */ 5082 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 5083 5084 /** 5085 * Search parameter: <b>description</b> 5086 * <p> 5087 * Description: <b>The description of the value set</b><br> 5088 * Type: <b>string</b><br> 5089 * Path: <b>ValueSet.description</b><br> 5090 * </p> 5091 */ 5092 @SearchParamDefinition(name="description", path="ValueSet.description", description="The description of the value set", type="string" ) 5093 public static final String SP_DESCRIPTION = "description"; 5094 /** 5095 * <b>Fluent Client</b> search parameter constant for <b>description</b> 5096 * <p> 5097 * Description: <b>The description of the value set</b><br> 5098 * Type: <b>string</b><br> 5099 * Path: <b>ValueSet.description</b><br> 5100 * </p> 5101 */ 5102 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 5103 5104 /** 5105 * Search parameter: <b>context-type</b> 5106 * <p> 5107 * Description: <b>A type of use context assigned to the value set</b><br> 5108 * Type: <b>token</b><br> 5109 * Path: <b>ValueSet.useContext.code</b><br> 5110 * </p> 5111 */ 5112 @SearchParamDefinition(name="context-type", path="ValueSet.useContext.code", description="A type of use context assigned to the value set", type="token" ) 5113 public static final String SP_CONTEXT_TYPE = "context-type"; 5114 /** 5115 * <b>Fluent Client</b> search parameter constant for <b>context-type</b> 5116 * <p> 5117 * Description: <b>A type of use context assigned to the value set</b><br> 5118 * Type: <b>token</b><br> 5119 * Path: <b>ValueSet.useContext.code</b><br> 5120 * </p> 5121 */ 5122 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE); 5123 5124 /** 5125 * Search parameter: <b>title</b> 5126 * <p> 5127 * Description: <b>The human-friendly name of the value set</b><br> 5128 * Type: <b>string</b><br> 5129 * Path: <b>ValueSet.title</b><br> 5130 * </p> 5131 */ 5132 @SearchParamDefinition(name="title", path="ValueSet.title", description="The human-friendly name of the value set", type="string" ) 5133 public static final String SP_TITLE = "title"; 5134 /** 5135 * <b>Fluent Client</b> search parameter constant for <b>title</b> 5136 * <p> 5137 * Description: <b>The human-friendly name of the value set</b><br> 5138 * Type: <b>string</b><br> 5139 * Path: <b>ValueSet.title</b><br> 5140 * </p> 5141 */ 5142 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 5143 5144 /** 5145 * Search parameter: <b>version</b> 5146 * <p> 5147 * Description: <b>The business version of the value set</b><br> 5148 * Type: <b>token</b><br> 5149 * Path: <b>ValueSet.version</b><br> 5150 * </p> 5151 */ 5152 @SearchParamDefinition(name="version", path="ValueSet.version", description="The business version of the value set", type="token" ) 5153 public static final String SP_VERSION = "version"; 5154 /** 5155 * <b>Fluent Client</b> search parameter constant for <b>version</b> 5156 * <p> 5157 * Description: <b>The business version of the value set</b><br> 5158 * Type: <b>token</b><br> 5159 * Path: <b>ValueSet.version</b><br> 5160 * </p> 5161 */ 5162 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 5163 5164 /** 5165 * Search parameter: <b>url</b> 5166 * <p> 5167 * Description: <b>The uri that identifies the value set</b><br> 5168 * Type: <b>uri</b><br> 5169 * Path: <b>ValueSet.url</b><br> 5170 * </p> 5171 */ 5172 @SearchParamDefinition(name="url", path="ValueSet.url", description="The uri that identifies the value set", type="uri" ) 5173 public static final String SP_URL = "url"; 5174 /** 5175 * <b>Fluent Client</b> search parameter constant for <b>url</b> 5176 * <p> 5177 * Description: <b>The uri that identifies the value set</b><br> 5178 * Type: <b>uri</b><br> 5179 * Path: <b>ValueSet.url</b><br> 5180 * </p> 5181 */ 5182 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 5183 5184 /** 5185 * Search parameter: <b>expansion</b> 5186 * <p> 5187 * Description: <b>Identifies the value set expansion (business identifier)</b><br> 5188 * Type: <b>uri</b><br> 5189 * Path: <b>ValueSet.expansion.identifier</b><br> 5190 * </p> 5191 */ 5192 @SearchParamDefinition(name="expansion", path="ValueSet.expansion.identifier", description="Identifies the value set expansion (business identifier)", type="uri" ) 5193 public static final String SP_EXPANSION = "expansion"; 5194 /** 5195 * <b>Fluent Client</b> search parameter constant for <b>expansion</b> 5196 * <p> 5197 * Description: <b>Identifies the value set expansion (business identifier)</b><br> 5198 * Type: <b>uri</b><br> 5199 * Path: <b>ValueSet.expansion.identifier</b><br> 5200 * </p> 5201 */ 5202 public static final ca.uhn.fhir.rest.gclient.UriClientParam EXPANSION = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_EXPANSION); 5203 5204 /** 5205 * Search parameter: <b>reference</b> 5206 * <p> 5207 * Description: <b>A code system included or excluded in the value set or an imported value set</b><br> 5208 * Type: <b>uri</b><br> 5209 * Path: <b>ValueSet.compose.include.system</b><br> 5210 * </p> 5211 */ 5212 @SearchParamDefinition(name="reference", path="ValueSet.compose.include.system", description="A code system included or excluded in the value set or an imported value set", type="uri" ) 5213 public static final String SP_REFERENCE = "reference"; 5214 /** 5215 * <b>Fluent Client</b> search parameter constant for <b>reference</b> 5216 * <p> 5217 * Description: <b>A code system included or excluded in the value set or an imported value set</b><br> 5218 * Type: <b>uri</b><br> 5219 * Path: <b>ValueSet.compose.include.system</b><br> 5220 * </p> 5221 */ 5222 public static final ca.uhn.fhir.rest.gclient.UriClientParam REFERENCE = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_REFERENCE); 5223 5224 /** 5225 * Search parameter: <b>context-quantity</b> 5226 * <p> 5227 * Description: <b>A quantity- or range-valued use context assigned to the value set</b><br> 5228 * Type: <b>quantity</b><br> 5229 * Path: <b>ValueSet.useContext.valueQuantity, ValueSet.useContext.valueRange</b><br> 5230 * </p> 5231 */ 5232 @SearchParamDefinition(name="context-quantity", path="(ValueSet.useContext.value as Quantity) | (ValueSet.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the value set", type="quantity" ) 5233 public static final String SP_CONTEXT_QUANTITY = "context-quantity"; 5234 /** 5235 * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b> 5236 * <p> 5237 * Description: <b>A quantity- or range-valued use context assigned to the value set</b><br> 5238 * Type: <b>quantity</b><br> 5239 * Path: <b>ValueSet.useContext.valueQuantity, ValueSet.useContext.valueRange</b><br> 5240 * </p> 5241 */ 5242 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY); 5243 5244 /** 5245 * Search parameter: <b>name</b> 5246 * <p> 5247 * Description: <b>Computationally friendly name of the value set</b><br> 5248 * Type: <b>string</b><br> 5249 * Path: <b>ValueSet.name</b><br> 5250 * </p> 5251 */ 5252 @SearchParamDefinition(name="name", path="ValueSet.name", description="Computationally friendly name of the value set", type="string" ) 5253 public static final String SP_NAME = "name"; 5254 /** 5255 * <b>Fluent Client</b> search parameter constant for <b>name</b> 5256 * <p> 5257 * Description: <b>Computationally friendly name of the value set</b><br> 5258 * Type: <b>string</b><br> 5259 * Path: <b>ValueSet.name</b><br> 5260 * </p> 5261 */ 5262 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 5263 5264 /** 5265 * Search parameter: <b>context</b> 5266 * <p> 5267 * Description: <b>A use context assigned to the value set</b><br> 5268 * Type: <b>token</b><br> 5269 * Path: <b>ValueSet.useContext.valueCodeableConcept</b><br> 5270 * </p> 5271 */ 5272 @SearchParamDefinition(name="context", path="(ValueSet.useContext.value as CodeableConcept)", description="A use context assigned to the value set", type="token" ) 5273 public static final String SP_CONTEXT = "context"; 5274 /** 5275 * <b>Fluent Client</b> search parameter constant for <b>context</b> 5276 * <p> 5277 * Description: <b>A use context assigned to the value set</b><br> 5278 * Type: <b>token</b><br> 5279 * Path: <b>ValueSet.useContext.valueCodeableConcept</b><br> 5280 * </p> 5281 */ 5282 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 5283 5284 /** 5285 * Search parameter: <b>publisher</b> 5286 * <p> 5287 * Description: <b>Name of the publisher of the value set</b><br> 5288 * Type: <b>string</b><br> 5289 * Path: <b>ValueSet.publisher</b><br> 5290 * </p> 5291 */ 5292 @SearchParamDefinition(name="publisher", path="ValueSet.publisher", description="Name of the publisher of the value set", type="string" ) 5293 public static final String SP_PUBLISHER = "publisher"; 5294 /** 5295 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 5296 * <p> 5297 * Description: <b>Name of the publisher of the value set</b><br> 5298 * Type: <b>string</b><br> 5299 * Path: <b>ValueSet.publisher</b><br> 5300 * </p> 5301 */ 5302 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 5303 5304 /** 5305 * Search parameter: <b>context-type-quantity</b> 5306 * <p> 5307 * Description: <b>A use context type and quantity- or range-based value assigned to the value set</b><br> 5308 * Type: <b>composite</b><br> 5309 * Path: <b></b><br> 5310 * </p> 5311 */ 5312 @SearchParamDefinition(name="context-type-quantity", path="ValueSet.useContext", description="A use context type and quantity- or range-based value assigned to the value set", type="composite", compositeOf={"context-type", "context-quantity"} ) 5313 public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity"; 5314 /** 5315 * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b> 5316 * <p> 5317 * Description: <b>A use context type and quantity- or range-based value assigned to the value set</b><br> 5318 * Type: <b>composite</b><br> 5319 * Path: <b></b><br> 5320 * </p> 5321 */ 5322 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY); 5323 5324 /** 5325 * Search parameter: <b>status</b> 5326 * <p> 5327 * Description: <b>The current status of the value set</b><br> 5328 * Type: <b>token</b><br> 5329 * Path: <b>ValueSet.status</b><br> 5330 * </p> 5331 */ 5332 @SearchParamDefinition(name="status", path="ValueSet.status", description="The current status of the value set", type="token" ) 5333 public static final String SP_STATUS = "status"; 5334 /** 5335 * <b>Fluent Client</b> search parameter constant for <b>status</b> 5336 * <p> 5337 * Description: <b>The current status of the value set</b><br> 5338 * Type: <b>token</b><br> 5339 * Path: <b>ValueSet.status</b><br> 5340 * </p> 5341 */ 5342 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 5343 5344 5345}