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