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