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