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