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