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