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