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