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