001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.Child;
043import ca.uhn.fhir.model.api.annotation.ChildOrder;
044import ca.uhn.fhir.model.api.annotation.DatatypeDef;
045import ca.uhn.fhir.model.api.annotation.Description;
046import ca.uhn.fhir.model.api.annotation.Block;
047
048import org.hl7.fhir.instance.model.api.ICompositeType;
049import  org.hl7.fhir.r5.model.Enumerations.BindingStrength;
050import  org.hl7.fhir.r5.model.Enumerations.BindingStrengthEnumFactory;
051import  org.hl7.fhir.r5.utils.ToolingExtensions;
052import  org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
053import  org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
054/**
055 * ElementDefinition Type: Captures constraints on each element within the resource, profile, or extension.
056 */
057@DatatypeDef(name="ElementDefinition")
058public class ElementDefinition extends BackboneType implements ICompositeType {
059
060    public enum AdditionalBindingPurposeVS {
061        /**
062         * A required binding, for use when the binding strength is 'extensible' or 'preferred'
063         */
064        MAXIMUM, 
065        /**
066         * The minimum allowable value set - any conformant system SHALL support all these codes
067         */
068        MINIMUM, 
069        /**
070         * This value set is used as a required binding (in addition to the base binding (not a replacement), usually in a particular usage context)
071         */
072        REQUIRED, 
073        /**
074         * This value set is used as an extensible binding (in addition to the base binding (not a replacement), usually in a particular usage context)
075         */
076        EXTENSIBLE, 
077        /**
078         * This value set is a candidate to substitute for the overall conformance value set in some situations; usually these are defined in the documentation
079         */
080        CANDIDATE, 
081        /**
082         * New records are required to use this value set, but legacy records may use other codes. The definition of 'new record' is difficult, since systems often create new records based on pre-existing data. Usually 'current' bindings are mandated by an external authority that makes clear rules around this
083         */
084        CURRENT, 
085        /**
086         * This is the value set that is preferred in a given context (documentation should explain why)
087         */
088        PREFERRED, 
089        /**
090         * This value set is provided for user look up in a given context. Typically, these valuesets only include a subset of codes relevant for input in a context
091         */
092        UI, 
093        /**
094         * This value set is a good set of codes to start with when designing your system
095         */
096        STARTER, 
097        /**
098         * This value set is a component of the base value set. Usually this is called out so that documentation can be written about a portion of the value set
099         */
100        COMPONENT, 
101        /**
102         * added to help the parsers with the generic types
103         */
104        NULL;
105        public static AdditionalBindingPurposeVS fromCode(String codeString) throws FHIRException {
106            if (codeString == null || "".equals(codeString))
107                return null;
108        if ("maximum".equals(codeString))
109          return MAXIMUM;
110        if ("minimum".equals(codeString))
111          return MINIMUM;
112        if ("required".equals(codeString))
113          return REQUIRED;
114        if ("extensible".equals(codeString))
115          return EXTENSIBLE;
116        if ("candidate".equals(codeString))
117          return CANDIDATE;
118        if ("current".equals(codeString))
119          return CURRENT;
120        if ("preferred".equals(codeString))
121          return PREFERRED;
122        if ("ui".equals(codeString))
123          return UI;
124        if ("starter".equals(codeString))
125          return STARTER;
126        if ("component".equals(codeString))
127          return COMPONENT;
128        if (Configuration.isAcceptInvalidEnums())
129          return null;
130        else
131          throw new FHIRException("Unknown AdditionalBindingPurposeVS code '"+codeString+"'");
132        }
133        public String toCode() {
134          switch (this) {
135            case MAXIMUM: return "maximum";
136            case MINIMUM: return "minimum";
137            case REQUIRED: return "required";
138            case EXTENSIBLE: return "extensible";
139            case CANDIDATE: return "candidate";
140            case CURRENT: return "current";
141            case PREFERRED: return "preferred";
142            case UI: return "ui";
143            case STARTER: return "starter";
144            case COMPONENT: return "component";
145            case NULL: return null;
146            default: return "?";
147          }
148        }
149        public String getSystem() {
150          switch (this) {
151            case MAXIMUM: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
152            case MINIMUM: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
153            case REQUIRED: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
154            case EXTENSIBLE: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
155            case CANDIDATE: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
156            case CURRENT: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
157            case PREFERRED: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
158            case UI: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
159            case STARTER: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
160            case COMPONENT: return "http://hl7.org/fhir/CodeSystem/additional-binding-purpose";
161            case NULL: return null;
162            default: return "?";
163          }
164        }
165        public String getDefinition() {
166          switch (this) {
167            case MAXIMUM: return "A required binding, for use when the binding strength is 'extensible' or 'preferred'";
168            case MINIMUM: return "The minimum allowable value set - any conformant system SHALL support all these codes";
169            case REQUIRED: return "This value set is used as a required binding (in addition to the base binding (not a replacement), usually in a particular usage context)";
170            case EXTENSIBLE: return "This value set is used as an extensible binding (in addition to the base binding (not a replacement), usually in a particular usage context)";
171            case CANDIDATE: return "This value set is a candidate to substitute for the overall conformance value set in some situations; usually these are defined in the documentation";
172            case CURRENT: return "New records are required to use this value set, but legacy records may use other codes. The definition of 'new record' is difficult, since systems often create new records based on pre-existing data. Usually 'current' bindings are mandated by an external authority that makes clear rules around this";
173            case PREFERRED: return "This is the value set that is preferred in a given context (documentation should explain why)";
174            case UI: return "This value set is provided for user look up in a given context. Typically, these valuesets only include a subset of codes relevant for input in a context";
175            case STARTER: return "This value set is a good set of codes to start with when designing your system";
176            case COMPONENT: return "This value set is a component of the base value set. Usually this is called out so that documentation can be written about a portion of the value set";
177            case NULL: return null;
178            default: return "?";
179          }
180        }
181        public String getDisplay() {
182          switch (this) {
183            case MAXIMUM: return "Maximum Binding";
184            case MINIMUM: return "Minimum Binding";
185            case REQUIRED: return "Required Binding";
186            case EXTENSIBLE: return "Conformance Binding";
187            case CANDIDATE: return "Candidate Binding";
188            case CURRENT: return "Current Binding";
189            case PREFERRED: return "Preferred Binding";
190            case UI: return "UI Suggested Binding";
191            case STARTER: return "Starter Binding";
192            case COMPONENT: return "Component Binding";
193            case NULL: return null;
194            default: return "?";
195          }
196        }
197    }
198
199  public static class AdditionalBindingPurposeVSEnumFactory implements EnumFactory<AdditionalBindingPurposeVS> {
200    public AdditionalBindingPurposeVS fromCode(String codeString) throws IllegalArgumentException {
201      if (codeString == null || "".equals(codeString))
202            if (codeString == null || "".equals(codeString))
203                return null;
204        if ("maximum".equals(codeString))
205          return AdditionalBindingPurposeVS.MAXIMUM;
206        if ("minimum".equals(codeString))
207          return AdditionalBindingPurposeVS.MINIMUM;
208        if ("required".equals(codeString))
209          return AdditionalBindingPurposeVS.REQUIRED;
210        if ("extensible".equals(codeString))
211          return AdditionalBindingPurposeVS.EXTENSIBLE;
212        if ("candidate".equals(codeString))
213          return AdditionalBindingPurposeVS.CANDIDATE;
214        if ("current".equals(codeString))
215          return AdditionalBindingPurposeVS.CURRENT;
216        if ("preferred".equals(codeString))
217          return AdditionalBindingPurposeVS.PREFERRED;
218        if ("ui".equals(codeString))
219          return AdditionalBindingPurposeVS.UI;
220        if ("starter".equals(codeString))
221          return AdditionalBindingPurposeVS.STARTER;
222        if ("component".equals(codeString))
223          return AdditionalBindingPurposeVS.COMPONENT;
224        throw new IllegalArgumentException("Unknown AdditionalBindingPurposeVS code '"+codeString+"'");
225        }
226        public Enumeration<AdditionalBindingPurposeVS> fromType(PrimitiveType<?> code) throws FHIRException {
227          if (code == null)
228            return null;
229          if (code.isEmpty())
230            return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.NULL, code);
231          String codeString = ((PrimitiveType) code).asStringValue();
232          if (codeString == null || "".equals(codeString))
233            return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.NULL, code);
234        if ("maximum".equals(codeString))
235          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.MAXIMUM, code);
236        if ("minimum".equals(codeString))
237          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.MINIMUM, code);
238        if ("required".equals(codeString))
239          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.REQUIRED, code);
240        if ("extensible".equals(codeString))
241          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.EXTENSIBLE, code);
242        if ("candidate".equals(codeString))
243          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.CANDIDATE, code);
244        if ("current".equals(codeString))
245          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.CURRENT, code);
246        if ("preferred".equals(codeString))
247          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.PREFERRED, code);
248        if ("ui".equals(codeString))
249          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.UI, code);
250        if ("starter".equals(codeString))
251          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.STARTER, code);
252        if ("component".equals(codeString))
253          return new Enumeration<AdditionalBindingPurposeVS>(this, AdditionalBindingPurposeVS.COMPONENT, code);
254        throw new FHIRException("Unknown AdditionalBindingPurposeVS code '"+codeString+"'");
255        }
256    public String toCode(AdditionalBindingPurposeVS code) {
257      if (code == AdditionalBindingPurposeVS.MAXIMUM)
258        return "maximum";
259      if (code == AdditionalBindingPurposeVS.MINIMUM)
260        return "minimum";
261      if (code == AdditionalBindingPurposeVS.REQUIRED)
262        return "required";
263      if (code == AdditionalBindingPurposeVS.EXTENSIBLE)
264        return "extensible";
265      if (code == AdditionalBindingPurposeVS.CANDIDATE)
266        return "candidate";
267      if (code == AdditionalBindingPurposeVS.CURRENT)
268        return "current";
269      if (code == AdditionalBindingPurposeVS.PREFERRED)
270        return "preferred";
271      if (code == AdditionalBindingPurposeVS.UI)
272        return "ui";
273      if (code == AdditionalBindingPurposeVS.STARTER)
274        return "starter";
275      if (code == AdditionalBindingPurposeVS.COMPONENT)
276        return "component";
277      return "?";
278      }
279    public String toSystem(AdditionalBindingPurposeVS code) {
280      return code.getSystem();
281      }
282    }
283
284    public enum AggregationMode {
285        /**
286         * The reference is a local reference to a contained resource.
287         */
288        CONTAINED, 
289        /**
290         * The reference to a resource that has to be resolved externally to the resource that includes the reference.
291         */
292        REFERENCED, 
293        /**
294         * When the resource is in a Bundle, the resource the reference points to will be found in the same bundle as the resource that includes the reference.
295         */
296        BUNDLED, 
297        /**
298         * added to help the parsers with the generic types
299         */
300        NULL;
301        public static AggregationMode fromCode(String codeString) throws FHIRException {
302            if (codeString == null || "".equals(codeString))
303                return null;
304        if ("contained".equals(codeString))
305          return CONTAINED;
306        if ("referenced".equals(codeString))
307          return REFERENCED;
308        if ("bundled".equals(codeString))
309          return BUNDLED;
310        if (Configuration.isAcceptInvalidEnums())
311          return null;
312        else
313          throw new FHIRException("Unknown AggregationMode code '"+codeString+"'");
314        }
315        public String toCode() {
316          switch (this) {
317            case CONTAINED: return "contained";
318            case REFERENCED: return "referenced";
319            case BUNDLED: return "bundled";
320            case NULL: return null;
321            default: return "?";
322          }
323        }
324        public String getSystem() {
325          switch (this) {
326            case CONTAINED: return "http://hl7.org/fhir/resource-aggregation-mode";
327            case REFERENCED: return "http://hl7.org/fhir/resource-aggregation-mode";
328            case BUNDLED: return "http://hl7.org/fhir/resource-aggregation-mode";
329            case NULL: return null;
330            default: return "?";
331          }
332        }
333        public String getDefinition() {
334          switch (this) {
335            case CONTAINED: return "The reference is a local reference to a contained resource.";
336            case REFERENCED: return "The reference to a resource that has to be resolved externally to the resource that includes the reference.";
337            case BUNDLED: return "When the resource is in a Bundle, the resource the reference points to will be found in the same bundle as the resource that includes the reference.";
338            case NULL: return null;
339            default: return "?";
340          }
341        }
342        public String getDisplay() {
343          switch (this) {
344            case CONTAINED: return "Contained";
345            case REFERENCED: return "Referenced";
346            case BUNDLED: return "Bundled";
347            case NULL: return null;
348            default: return "?";
349          }
350        }
351    }
352
353  public static class AggregationModeEnumFactory implements EnumFactory<AggregationMode> {
354    public AggregationMode fromCode(String codeString) throws IllegalArgumentException {
355      if (codeString == null || "".equals(codeString))
356            if (codeString == null || "".equals(codeString))
357                return null;
358        if ("contained".equals(codeString))
359          return AggregationMode.CONTAINED;
360        if ("referenced".equals(codeString))
361          return AggregationMode.REFERENCED;
362        if ("bundled".equals(codeString))
363          return AggregationMode.BUNDLED;
364        throw new IllegalArgumentException("Unknown AggregationMode code '"+codeString+"'");
365        }
366        public Enumeration<AggregationMode> fromType(PrimitiveType<?> code) throws FHIRException {
367          if (code == null)
368            return null;
369          if (code.isEmpty())
370            return new Enumeration<AggregationMode>(this, AggregationMode.NULL, code);
371          String codeString = ((PrimitiveType) code).asStringValue();
372          if (codeString == null || "".equals(codeString))
373            return new Enumeration<AggregationMode>(this, AggregationMode.NULL, code);
374        if ("contained".equals(codeString))
375          return new Enumeration<AggregationMode>(this, AggregationMode.CONTAINED, code);
376        if ("referenced".equals(codeString))
377          return new Enumeration<AggregationMode>(this, AggregationMode.REFERENCED, code);
378        if ("bundled".equals(codeString))
379          return new Enumeration<AggregationMode>(this, AggregationMode.BUNDLED, code);
380        throw new FHIRException("Unknown AggregationMode code '"+codeString+"'");
381        }
382    public String toCode(AggregationMode code) {
383      if (code == AggregationMode.CONTAINED)
384        return "contained";
385      if (code == AggregationMode.REFERENCED)
386        return "referenced";
387      if (code == AggregationMode.BUNDLED)
388        return "bundled";
389      return "?";
390      }
391    public String toSystem(AggregationMode code) {
392      return code.getSystem();
393      }
394    }
395
396    public enum ConstraintSeverity {
397        /**
398         * If the constraint is violated, the resource is not conformant.
399         */
400        ERROR, 
401        /**
402         * If the constraint is violated, the resource is conformant, but it is not necessarily following best practice.
403         */
404        WARNING, 
405        /**
406         * added to help the parsers with the generic types
407         */
408        NULL;
409        public static ConstraintSeverity fromCode(String codeString) throws FHIRException {
410            if (codeString == null || "".equals(codeString))
411                return null;
412        if ("error".equals(codeString))
413          return ERROR;
414        if ("warning".equals(codeString))
415          return WARNING;
416        if (Configuration.isAcceptInvalidEnums())
417          return null;
418        else
419          throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'");
420        }
421        public String toCode() {
422          switch (this) {
423            case ERROR: return "error";
424            case WARNING: return "warning";
425            case NULL: return null;
426            default: return "?";
427          }
428        }
429        public String getSystem() {
430          switch (this) {
431            case ERROR: return "http://hl7.org/fhir/constraint-severity";
432            case WARNING: return "http://hl7.org/fhir/constraint-severity";
433            case NULL: return null;
434            default: return "?";
435          }
436        }
437        public String getDefinition() {
438          switch (this) {
439            case ERROR: return "If the constraint is violated, the resource is not conformant.";
440            case WARNING: return "If the constraint is violated, the resource is conformant, but it is not necessarily following best practice.";
441            case NULL: return null;
442            default: return "?";
443          }
444        }
445        public String getDisplay() {
446          switch (this) {
447            case ERROR: return "Error";
448            case WARNING: return "Warning";
449            case NULL: return null;
450            default: return "?";
451          }
452        }
453    }
454
455  public static class ConstraintSeverityEnumFactory implements EnumFactory<ConstraintSeverity> {
456    public ConstraintSeverity fromCode(String codeString) throws IllegalArgumentException {
457      if (codeString == null || "".equals(codeString))
458            if (codeString == null || "".equals(codeString))
459                return null;
460        if ("error".equals(codeString))
461          return ConstraintSeverity.ERROR;
462        if ("warning".equals(codeString))
463          return ConstraintSeverity.WARNING;
464        throw new IllegalArgumentException("Unknown ConstraintSeverity code '"+codeString+"'");
465        }
466        public Enumeration<ConstraintSeverity> fromType(PrimitiveType<?> code) throws FHIRException {
467          if (code == null)
468            return null;
469          if (code.isEmpty())
470            return new Enumeration<ConstraintSeverity>(this, ConstraintSeverity.NULL, code);
471          String codeString = ((PrimitiveType) code).asStringValue();
472          if (codeString == null || "".equals(codeString))
473            return new Enumeration<ConstraintSeverity>(this, ConstraintSeverity.NULL, code);
474        if ("error".equals(codeString))
475          return new Enumeration<ConstraintSeverity>(this, ConstraintSeverity.ERROR, code);
476        if ("warning".equals(codeString))
477          return new Enumeration<ConstraintSeverity>(this, ConstraintSeverity.WARNING, code);
478        throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'");
479        }
480    public String toCode(ConstraintSeverity code) {
481      if (code == ConstraintSeverity.ERROR)
482        return "error";
483      if (code == ConstraintSeverity.WARNING)
484        return "warning";
485      return "?";
486      }
487    public String toSystem(ConstraintSeverity code) {
488      return code.getSystem();
489      }
490    }
491
492    public enum DiscriminatorType {
493        /**
494         * The slices have different values in the nominated element, as determined by the applicable fixed value, pattern, or required ValueSet binding.
495         */
496        VALUE, 
497        /**
498         * The slices are differentiated by the presence or absence of the nominated element. There SHALL be no more than two slices. The slices are differentiated by the fact that one must have a max of 0 and the other must have a min of 1 (or more).  The order in which the slices are declared doesn't matter.
499         */
500        EXISTS, 
501        /**
502         * The slices have different values in the nominated element, as determined by the applicable fixed value, pattern, or required ValueSet binding. This has the same meaning as 'value' and is deprecated.
503         */
504        PATTERN, 
505        /**
506         * The slices are differentiated by type of the nominated element.
507         */
508        TYPE, 
509        /**
510         * The slices are differentiated by conformance of the nominated element to a specified profile. Note that if the path specifies .resolve() then the profile is the target profile on the reference. In this case, validation by the possible profiles is required to differentiate the slices.
511         */
512        PROFILE, 
513        /**
514         * The slices are differentiated by their index. This is only possible if all but the last slice have min=max cardinality, and the (optional) last slice contains other undifferentiated elements.
515         */
516        POSITION, 
517        /**
518         * added to help the parsers with the generic types
519         */
520        NULL;
521        public static DiscriminatorType fromCode(String codeString) throws FHIRException {
522            if (codeString == null || "".equals(codeString))
523                return null;
524        if ("value".equals(codeString))
525          return VALUE;
526        if ("exists".equals(codeString))
527          return EXISTS;
528        if ("pattern".equals(codeString))
529          return PATTERN;
530        if ("type".equals(codeString))
531          return TYPE;
532        if ("profile".equals(codeString))
533          return PROFILE;
534        if ("position".equals(codeString))
535          return POSITION;
536        if (Configuration.isAcceptInvalidEnums())
537          return null;
538        else
539          throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'");
540        }
541        public String toCode() {
542          switch (this) {
543            case VALUE: return "value";
544            case EXISTS: return "exists";
545            case PATTERN: return "pattern";
546            case TYPE: return "type";
547            case PROFILE: return "profile";
548            case POSITION: return "position";
549            case NULL: return null;
550            default: return "?";
551          }
552        }
553        public String getSystem() {
554          switch (this) {
555            case VALUE: return "http://hl7.org/fhir/discriminator-type";
556            case EXISTS: return "http://hl7.org/fhir/discriminator-type";
557            case PATTERN: return "http://hl7.org/fhir/discriminator-type";
558            case TYPE: return "http://hl7.org/fhir/discriminator-type";
559            case PROFILE: return "http://hl7.org/fhir/discriminator-type";
560            case POSITION: return "http://hl7.org/fhir/discriminator-type";
561            case NULL: return null;
562            default: return "?";
563          }
564        }
565        public String getDefinition() {
566          switch (this) {
567            case VALUE: return "The slices have different values in the nominated element, as determined by the applicable fixed value, pattern, or required ValueSet binding.";
568            case EXISTS: return "The slices are differentiated by the presence or absence of the nominated element. There SHALL be no more than two slices. The slices are differentiated by the fact that one must have a max of 0 and the other must have a min of 1 (or more).  The order in which the slices are declared doesn't matter.";
569            case PATTERN: return "The slices have different values in the nominated element, as determined by the applicable fixed value, pattern, or required ValueSet binding. This has the same meaning as 'value' and is deprecated.";
570            case TYPE: return "The slices are differentiated by type of the nominated element.";
571            case PROFILE: return "The slices are differentiated by conformance of the nominated element to a specified profile. Note that if the path specifies .resolve() then the profile is the target profile on the reference. In this case, validation by the possible profiles is required to differentiate the slices.";
572            case POSITION: return "The slices are differentiated by their index. This is only possible if all but the last slice have min=max cardinality, and the (optional) last slice contains other undifferentiated elements.";
573            case NULL: return null;
574            default: return "?";
575          }
576        }
577        public String getDisplay() {
578          switch (this) {
579            case VALUE: return "Value";
580            case EXISTS: return "Exists";
581            case PATTERN: return "Pattern";
582            case TYPE: return "Type";
583            case PROFILE: return "Profile";
584            case POSITION: return "Position";
585            case NULL: return null;
586            default: return "?";
587          }
588        }
589    }
590
591  public static class DiscriminatorTypeEnumFactory implements EnumFactory<DiscriminatorType> {
592    public DiscriminatorType fromCode(String codeString) throws IllegalArgumentException {
593      if (codeString == null || "".equals(codeString))
594            if (codeString == null || "".equals(codeString))
595                return null;
596        if ("value".equals(codeString))
597          return DiscriminatorType.VALUE;
598        if ("exists".equals(codeString))
599          return DiscriminatorType.EXISTS;
600        if ("pattern".equals(codeString))
601          return DiscriminatorType.PATTERN;
602        if ("type".equals(codeString))
603          return DiscriminatorType.TYPE;
604        if ("profile".equals(codeString))
605          return DiscriminatorType.PROFILE;
606        if ("position".equals(codeString))
607          return DiscriminatorType.POSITION;
608        throw new IllegalArgumentException("Unknown DiscriminatorType code '"+codeString+"'");
609        }
610        public Enumeration<DiscriminatorType> fromType(PrimitiveType<?> code) throws FHIRException {
611          if (code == null)
612            return null;
613          if (code.isEmpty())
614            return new Enumeration<DiscriminatorType>(this, DiscriminatorType.NULL, code);
615          String codeString = ((PrimitiveType) code).asStringValue();
616          if (codeString == null || "".equals(codeString))
617            return new Enumeration<DiscriminatorType>(this, DiscriminatorType.NULL, code);
618        if ("value".equals(codeString))
619          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.VALUE, code);
620        if ("exists".equals(codeString))
621          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.EXISTS, code);
622        if ("pattern".equals(codeString))
623          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.PATTERN, code);
624        if ("type".equals(codeString))
625          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.TYPE, code);
626        if ("profile".equals(codeString))
627          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.PROFILE, code);
628        if ("position".equals(codeString))
629          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.POSITION, code);
630        throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'");
631        }
632    public String toCode(DiscriminatorType code) {
633      if (code == DiscriminatorType.VALUE)
634        return "value";
635      if (code == DiscriminatorType.EXISTS)
636        return "exists";
637      if (code == DiscriminatorType.PATTERN)
638        return "pattern";
639      if (code == DiscriminatorType.TYPE)
640        return "type";
641      if (code == DiscriminatorType.PROFILE)
642        return "profile";
643      if (code == DiscriminatorType.POSITION)
644        return "position";
645      return "?";
646      }
647    public String toSystem(DiscriminatorType code) {
648      return code.getSystem();
649      }
650    }
651
652    public enum PropertyRepresentation {
653        /**
654         * In XML, this property is represented as an attribute not an element.
655         */
656        XMLATTR, 
657        /**
658         * This element is represented using the XML text attribute (primitives only).
659         */
660        XMLTEXT, 
661        /**
662         * The type of this element is indicated using xsi:type.
663         */
664        TYPEATTR, 
665        /**
666         * Use CDA narrative instead of XHTML.
667         */
668        CDATEXT, 
669        /**
670         * The property is represented using XHTML.
671         */
672        XHTML, 
673        /**
674         * added to help the parsers with the generic types
675         */
676        NULL;
677        public static PropertyRepresentation fromCode(String codeString) throws FHIRException {
678            if (codeString == null || "".equals(codeString))
679                return null;
680        if ("xmlAttr".equals(codeString))
681          return XMLATTR;
682        if ("xmlText".equals(codeString))
683          return XMLTEXT;
684        if ("typeAttr".equals(codeString))
685          return TYPEATTR;
686        if ("cdaText".equals(codeString))
687          return CDATEXT;
688        if ("xhtml".equals(codeString))
689          return XHTML;
690        if (Configuration.isAcceptInvalidEnums())
691          return null;
692        else
693          throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'");
694        }
695        public String toCode() {
696          switch (this) {
697            case XMLATTR: return "xmlAttr";
698            case XMLTEXT: return "xmlText";
699            case TYPEATTR: return "typeAttr";
700            case CDATEXT: return "cdaText";
701            case XHTML: return "xhtml";
702            case NULL: return null;
703            default: return "?";
704          }
705        }
706        public String getSystem() {
707          switch (this) {
708            case XMLATTR: return "http://hl7.org/fhir/property-representation";
709            case XMLTEXT: return "http://hl7.org/fhir/property-representation";
710            case TYPEATTR: return "http://hl7.org/fhir/property-representation";
711            case CDATEXT: return "http://hl7.org/fhir/property-representation";
712            case XHTML: return "http://hl7.org/fhir/property-representation";
713            case NULL: return null;
714            default: return "?";
715          }
716        }
717        public String getDefinition() {
718          switch (this) {
719            case XMLATTR: return "In XML, this property is represented as an attribute not an element.";
720            case XMLTEXT: return "This element is represented using the XML text attribute (primitives only).";
721            case TYPEATTR: return "The type of this element is indicated using xsi:type.";
722            case CDATEXT: return "Use CDA narrative instead of XHTML.";
723            case XHTML: return "The property is represented using XHTML.";
724            case NULL: return null;
725            default: return "?";
726          }
727        }
728        public String getDisplay() {
729          switch (this) {
730            case XMLATTR: return "XML Attribute";
731            case XMLTEXT: return "XML Text";
732            case TYPEATTR: return "Type Attribute";
733            case CDATEXT: return "CDA Text Format";
734            case XHTML: return "XHTML";
735            case NULL: return null;
736            default: return "?";
737          }
738        }
739    }
740
741  public static class PropertyRepresentationEnumFactory implements EnumFactory<PropertyRepresentation> {
742    public PropertyRepresentation fromCode(String codeString) throws IllegalArgumentException {
743      if (codeString == null || "".equals(codeString))
744            if (codeString == null || "".equals(codeString))
745                return null;
746        if ("xmlAttr".equals(codeString))
747          return PropertyRepresentation.XMLATTR;
748        if ("xmlText".equals(codeString))
749          return PropertyRepresentation.XMLTEXT;
750        if ("typeAttr".equals(codeString))
751          return PropertyRepresentation.TYPEATTR;
752        if ("cdaText".equals(codeString))
753          return PropertyRepresentation.CDATEXT;
754        if ("xhtml".equals(codeString))
755          return PropertyRepresentation.XHTML;
756        throw new IllegalArgumentException("Unknown PropertyRepresentation code '"+codeString+"'");
757        }
758        public Enumeration<PropertyRepresentation> fromType(PrimitiveType<?> code) throws FHIRException {
759          if (code == null)
760            return null;
761          if (code.isEmpty())
762            return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.NULL, code);
763          String codeString = ((PrimitiveType) code).asStringValue();
764          if (codeString == null || "".equals(codeString))
765            return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.NULL, code);
766        if ("xmlAttr".equals(codeString))
767          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.XMLATTR, code);
768        if ("xmlText".equals(codeString))
769          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.XMLTEXT, code);
770        if ("typeAttr".equals(codeString))
771          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.TYPEATTR, code);
772        if ("cdaText".equals(codeString))
773          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.CDATEXT, code);
774        if ("xhtml".equals(codeString))
775          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.XHTML, code);
776        throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'");
777        }
778    public String toCode(PropertyRepresentation code) {
779      if (code == PropertyRepresentation.XMLATTR)
780        return "xmlAttr";
781      if (code == PropertyRepresentation.XMLTEXT)
782        return "xmlText";
783      if (code == PropertyRepresentation.TYPEATTR)
784        return "typeAttr";
785      if (code == PropertyRepresentation.CDATEXT)
786        return "cdaText";
787      if (code == PropertyRepresentation.XHTML)
788        return "xhtml";
789      return "?";
790      }
791    public String toSystem(PropertyRepresentation code) {
792      return code.getSystem();
793      }
794    }
795
796    public enum ReferenceVersionRules {
797        /**
798         * The reference may be either version independent or version specific.
799         */
800        EITHER, 
801        /**
802         * The reference must be version independent.
803         */
804        INDEPENDENT, 
805        /**
806         * The reference must be version specific.
807         */
808        SPECIFIC, 
809        /**
810         * added to help the parsers with the generic types
811         */
812        NULL;
813        public static ReferenceVersionRules fromCode(String codeString) throws FHIRException {
814            if (codeString == null || "".equals(codeString))
815                return null;
816        if ("either".equals(codeString))
817          return EITHER;
818        if ("independent".equals(codeString))
819          return INDEPENDENT;
820        if ("specific".equals(codeString))
821          return SPECIFIC;
822        if (Configuration.isAcceptInvalidEnums())
823          return null;
824        else
825          throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'");
826        }
827        public String toCode() {
828          switch (this) {
829            case EITHER: return "either";
830            case INDEPENDENT: return "independent";
831            case SPECIFIC: return "specific";
832            case NULL: return null;
833            default: return "?";
834          }
835        }
836        public String getSystem() {
837          switch (this) {
838            case EITHER: return "http://hl7.org/fhir/reference-version-rules";
839            case INDEPENDENT: return "http://hl7.org/fhir/reference-version-rules";
840            case SPECIFIC: return "http://hl7.org/fhir/reference-version-rules";
841            case NULL: return null;
842            default: return "?";
843          }
844        }
845        public String getDefinition() {
846          switch (this) {
847            case EITHER: return "The reference may be either version independent or version specific.";
848            case INDEPENDENT: return "The reference must be version independent.";
849            case SPECIFIC: return "The reference must be version specific.";
850            case NULL: return null;
851            default: return "?";
852          }
853        }
854        public String getDisplay() {
855          switch (this) {
856            case EITHER: return "Either Specific or independent";
857            case INDEPENDENT: return "Version independent";
858            case SPECIFIC: return "Version Specific";
859            case NULL: return null;
860            default: return "?";
861          }
862        }
863    }
864
865  public static class ReferenceVersionRulesEnumFactory implements EnumFactory<ReferenceVersionRules> {
866    public ReferenceVersionRules fromCode(String codeString) throws IllegalArgumentException {
867      if (codeString == null || "".equals(codeString))
868            if (codeString == null || "".equals(codeString))
869                return null;
870        if ("either".equals(codeString))
871          return ReferenceVersionRules.EITHER;
872        if ("independent".equals(codeString))
873          return ReferenceVersionRules.INDEPENDENT;
874        if ("specific".equals(codeString))
875          return ReferenceVersionRules.SPECIFIC;
876        throw new IllegalArgumentException("Unknown ReferenceVersionRules code '"+codeString+"'");
877        }
878        public Enumeration<ReferenceVersionRules> fromType(PrimitiveType<?> code) throws FHIRException {
879          if (code == null)
880            return null;
881          if (code.isEmpty())
882            return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.NULL, code);
883          String codeString = ((PrimitiveType) code).asStringValue();
884          if (codeString == null || "".equals(codeString))
885            return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.NULL, code);
886        if ("either".equals(codeString))
887          return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.EITHER, code);
888        if ("independent".equals(codeString))
889          return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.INDEPENDENT, code);
890        if ("specific".equals(codeString))
891          return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.SPECIFIC, code);
892        throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'");
893        }
894    public String toCode(ReferenceVersionRules code) {
895      if (code == ReferenceVersionRules.EITHER)
896        return "either";
897      if (code == ReferenceVersionRules.INDEPENDENT)
898        return "independent";
899      if (code == ReferenceVersionRules.SPECIFIC)
900        return "specific";
901      return "?";
902      }
903    public String toSystem(ReferenceVersionRules code) {
904      return code.getSystem();
905      }
906    }
907
908    public enum SlicingRules {
909        /**
910         * No additional content is allowed other than that described by the slices in this profile.
911         */
912        CLOSED, 
913        /**
914         * Additional content is allowed anywhere in the list.
915         */
916        OPEN, 
917        /**
918         * Additional content is allowed, but only at the end of the list. Note that using this requires that the slices be ordered, which makes it hard to share uses. This should only be done where absolutely required.
919         */
920        OPENATEND, 
921        /**
922         * added to help the parsers with the generic types
923         */
924        NULL;
925        public static SlicingRules fromCode(String codeString) throws FHIRException {
926            if (codeString == null || "".equals(codeString))
927                return null;
928        if ("closed".equals(codeString))
929          return CLOSED;
930        if ("open".equals(codeString))
931          return OPEN;
932        if ("openAtEnd".equals(codeString))
933          return OPENATEND;
934        if (Configuration.isAcceptInvalidEnums())
935          return null;
936        else
937          throw new FHIRException("Unknown SlicingRules code '"+codeString+"'");
938        }
939        public String toCode() {
940          switch (this) {
941            case CLOSED: return "closed";
942            case OPEN: return "open";
943            case OPENATEND: return "openAtEnd";
944            case NULL: return null;
945            default: return "?";
946          }
947        }
948        public String getSystem() {
949          switch (this) {
950            case CLOSED: return "http://hl7.org/fhir/resource-slicing-rules";
951            case OPEN: return "http://hl7.org/fhir/resource-slicing-rules";
952            case OPENATEND: return "http://hl7.org/fhir/resource-slicing-rules";
953            case NULL: return null;
954            default: return "?";
955          }
956        }
957        public String getDefinition() {
958          switch (this) {
959            case CLOSED: return "No additional content is allowed other than that described by the slices in this profile.";
960            case OPEN: return "Additional content is allowed anywhere in the list.";
961            case OPENATEND: return "Additional content is allowed, but only at the end of the list. Note that using this requires that the slices be ordered, which makes it hard to share uses. This should only be done where absolutely required.";
962            case NULL: return null;
963            default: return "?";
964          }
965        }
966        public String getDisplay() {
967          switch (this) {
968            case CLOSED: return "Closed";
969            case OPEN: return "Open";
970            case OPENATEND: return "Open at End";
971            case NULL: return null;
972            default: return "?";
973          }
974        }
975    }
976
977  public static class SlicingRulesEnumFactory implements EnumFactory<SlicingRules> {
978    public SlicingRules fromCode(String codeString) throws IllegalArgumentException {
979      if (codeString == null || "".equals(codeString))
980            if (codeString == null || "".equals(codeString))
981                return null;
982        if ("closed".equals(codeString))
983          return SlicingRules.CLOSED;
984        if ("open".equals(codeString))
985          return SlicingRules.OPEN;
986        if ("openAtEnd".equals(codeString))
987          return SlicingRules.OPENATEND;
988        throw new IllegalArgumentException("Unknown SlicingRules code '"+codeString+"'");
989        }
990        public Enumeration<SlicingRules> fromType(PrimitiveType<?> code) throws FHIRException {
991          if (code == null)
992            return null;
993          if (code.isEmpty())
994            return new Enumeration<SlicingRules>(this, SlicingRules.NULL, code);
995          String codeString = ((PrimitiveType) code).asStringValue();
996          if (codeString == null || "".equals(codeString))
997            return new Enumeration<SlicingRules>(this, SlicingRules.NULL, code);
998        if ("closed".equals(codeString))
999          return new Enumeration<SlicingRules>(this, SlicingRules.CLOSED, code);
1000        if ("open".equals(codeString))
1001          return new Enumeration<SlicingRules>(this, SlicingRules.OPEN, code);
1002        if ("openAtEnd".equals(codeString))
1003          return new Enumeration<SlicingRules>(this, SlicingRules.OPENATEND, code);
1004        throw new FHIRException("Unknown SlicingRules code '"+codeString+"'");
1005        }
1006    public String toCode(SlicingRules code) {
1007      if (code == SlicingRules.CLOSED)
1008        return "closed";
1009      if (code == SlicingRules.OPEN)
1010        return "open";
1011      if (code == SlicingRules.OPENATEND)
1012        return "openAtEnd";
1013      return "?";
1014      }
1015    public String toSystem(SlicingRules code) {
1016      return code.getSystem();
1017      }
1018    }
1019
1020    @Block()
1021    public static class ElementDefinitionSlicingComponent extends Element implements IBaseDatatypeElement {
1022        /**
1023         * Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.
1024         */
1025        @Child(name = "discriminator", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1026        @Description(shortDefinition="Element values that are used to distinguish the slices", formalDefinition="Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices." )
1027        protected List<ElementDefinitionSlicingDiscriminatorComponent> discriminator;
1028
1029        /**
1030         * A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.
1031         */
1032        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1033        @Description(shortDefinition="Text description of how slicing works (or not)", formalDefinition="A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated." )
1034        protected StringType description;
1035
1036        /**
1037         * If the matching elements have to occur in the same order as defined in the profile.
1038         */
1039        @Child(name = "ordered", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1040        @Description(shortDefinition="If elements must be in same order as slices", formalDefinition="If the matching elements have to occur in the same order as defined in the profile." )
1041        protected BooleanType ordered;
1042
1043        /**
1044         * Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.
1045         */
1046        @Child(name = "rules", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=true)
1047        @Description(shortDefinition="closed | open | openAtEnd", formalDefinition="Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end." )
1048        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-slicing-rules")
1049        protected Enumeration<SlicingRules> rules;
1050
1051        private static final long serialVersionUID = -311635839L;
1052
1053    /**
1054     * Constructor
1055     */
1056      public ElementDefinitionSlicingComponent() {
1057        super();
1058      }
1059
1060    /**
1061     * Constructor
1062     */
1063      public ElementDefinitionSlicingComponent(SlicingRules rules) {
1064        super();
1065        this.setRules(rules);
1066      }
1067
1068        /**
1069         * @return {@link #discriminator} (Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.)
1070         */
1071        public List<ElementDefinitionSlicingDiscriminatorComponent> getDiscriminator() { 
1072          if (this.discriminator == null)
1073            this.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>();
1074          return this.discriminator;
1075        }
1076
1077        /**
1078         * @return Returns a reference to <code>this</code> for easy method chaining
1079         */
1080        public ElementDefinitionSlicingComponent setDiscriminator(List<ElementDefinitionSlicingDiscriminatorComponent> theDiscriminator) { 
1081          this.discriminator = theDiscriminator;
1082          return this;
1083        }
1084
1085        public boolean hasDiscriminator() { 
1086          if (this.discriminator == null)
1087            return false;
1088          for (ElementDefinitionSlicingDiscriminatorComponent item : this.discriminator)
1089            if (!item.isEmpty())
1090              return true;
1091          return false;
1092        }
1093
1094        public ElementDefinitionSlicingDiscriminatorComponent addDiscriminator() { //3
1095          ElementDefinitionSlicingDiscriminatorComponent t = new ElementDefinitionSlicingDiscriminatorComponent();
1096          if (this.discriminator == null)
1097            this.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>();
1098          this.discriminator.add(t);
1099          return t;
1100        }
1101
1102        public ElementDefinitionSlicingComponent addDiscriminator(ElementDefinitionSlicingDiscriminatorComponent t) { //3
1103          if (t == null)
1104            return this;
1105          if (this.discriminator == null)
1106            this.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>();
1107          this.discriminator.add(t);
1108          return this;
1109        }
1110
1111        /**
1112         * @return The first repetition of repeating field {@link #discriminator}, creating it if it does not already exist {3}
1113         */
1114        public ElementDefinitionSlicingDiscriminatorComponent getDiscriminatorFirstRep() { 
1115          if (getDiscriminator().isEmpty()) {
1116            addDiscriminator();
1117          }
1118          return getDiscriminator().get(0);
1119        }
1120
1121        /**
1122         * @return {@link #description} (A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1123         */
1124        public StringType getDescriptionElement() { 
1125          if (this.description == null)
1126            if (Configuration.errorOnAutoCreate())
1127              throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.description");
1128            else if (Configuration.doAutoCreate())
1129              this.description = new StringType(); // bb
1130          return this.description;
1131        }
1132
1133        public boolean hasDescriptionElement() { 
1134          return this.description != null && !this.description.isEmpty();
1135        }
1136
1137        public boolean hasDescription() { 
1138          return this.description != null && !this.description.isEmpty();
1139        }
1140
1141        /**
1142         * @param value {@link #description} (A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1143         */
1144        public ElementDefinitionSlicingComponent setDescriptionElement(StringType value) { 
1145          this.description = value;
1146          return this;
1147        }
1148
1149        /**
1150         * @return A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.
1151         */
1152        public String getDescription() { 
1153          return this.description == null ? null : this.description.getValue();
1154        }
1155
1156        /**
1157         * @param value A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.
1158         */
1159        public ElementDefinitionSlicingComponent setDescription(String value) { 
1160          if (Utilities.noString(value))
1161            this.description = null;
1162          else {
1163            if (this.description == null)
1164              this.description = new StringType();
1165            this.description.setValue(value);
1166          }
1167          return this;
1168        }
1169
1170        /**
1171         * @return {@link #ordered} (If the matching elements have to occur in the same order as defined in the profile.). This is the underlying object with id, value and extensions. The accessor "getOrdered" gives direct access to the value
1172         */
1173        public BooleanType getOrderedElement() { 
1174          if (this.ordered == null)
1175            if (Configuration.errorOnAutoCreate())
1176              throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.ordered");
1177            else if (Configuration.doAutoCreate())
1178              this.ordered = new BooleanType(); // bb
1179          return this.ordered;
1180        }
1181
1182        public boolean hasOrderedElement() { 
1183          return this.ordered != null && !this.ordered.isEmpty();
1184        }
1185
1186        public boolean hasOrdered() { 
1187          return this.ordered != null && !this.ordered.isEmpty();
1188        }
1189
1190        /**
1191         * @param value {@link #ordered} (If the matching elements have to occur in the same order as defined in the profile.). This is the underlying object with id, value and extensions. The accessor "getOrdered" gives direct access to the value
1192         */
1193        public ElementDefinitionSlicingComponent setOrderedElement(BooleanType value) { 
1194          this.ordered = value;
1195          return this;
1196        }
1197
1198        /**
1199         * @return If the matching elements have to occur in the same order as defined in the profile.
1200         */
1201        public boolean getOrdered() { 
1202          return this.ordered == null || this.ordered.isEmpty() ? false : this.ordered.getValue();
1203        }
1204
1205        /**
1206         * @param value If the matching elements have to occur in the same order as defined in the profile.
1207         */
1208        public ElementDefinitionSlicingComponent setOrdered(boolean value) { 
1209            if (this.ordered == null)
1210              this.ordered = new BooleanType();
1211            this.ordered.setValue(value);
1212          return this;
1213        }
1214
1215        /**
1216         * @return {@link #rules} (Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.). This is the underlying object with id, value and extensions. The accessor "getRules" gives direct access to the value
1217         */
1218        public Enumeration<SlicingRules> getRulesElement() { 
1219          if (this.rules == null)
1220            if (Configuration.errorOnAutoCreate())
1221              throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.rules");
1222            else if (Configuration.doAutoCreate())
1223              this.rules = new Enumeration<SlicingRules>(new SlicingRulesEnumFactory()); // bb
1224          return this.rules;
1225        }
1226
1227        public boolean hasRulesElement() { 
1228          return this.rules != null && !this.rules.isEmpty();
1229        }
1230
1231        public boolean hasRules() { 
1232          return this.rules != null && !this.rules.isEmpty();
1233        }
1234
1235        /**
1236         * @param value {@link #rules} (Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.). This is the underlying object with id, value and extensions. The accessor "getRules" gives direct access to the value
1237         */
1238        public ElementDefinitionSlicingComponent setRulesElement(Enumeration<SlicingRules> value) { 
1239          this.rules = value;
1240          return this;
1241        }
1242
1243        /**
1244         * @return Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.
1245         */
1246        public SlicingRules getRules() { 
1247          return this.rules == null ? null : this.rules.getValue();
1248        }
1249
1250        /**
1251         * @param value Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.
1252         */
1253        public ElementDefinitionSlicingComponent setRules(SlicingRules value) { 
1254            if (this.rules == null)
1255              this.rules = new Enumeration<SlicingRules>(new SlicingRulesEnumFactory());
1256            this.rules.setValue(value);
1257          return this;
1258        }
1259
1260        protected void listChildren(List<Property> children) {
1261          super.listChildren(children);
1262          children.add(new Property("discriminator", "", "Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.", 0, java.lang.Integer.MAX_VALUE, discriminator));
1263          children.add(new Property("description", "string", "A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.", 0, 1, description));
1264          children.add(new Property("ordered", "boolean", "If the matching elements have to occur in the same order as defined in the profile.", 0, 1, ordered));
1265          children.add(new Property("rules", "code", "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", 0, 1, rules));
1266        }
1267
1268        @Override
1269        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1270          switch (_hash) {
1271          case -1888270692: /*discriminator*/  return new Property("discriminator", "", "Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.", 0, java.lang.Integer.MAX_VALUE, discriminator);
1272          case -1724546052: /*description*/  return new Property("description", "string", "A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.", 0, 1, description);
1273          case -1207109523: /*ordered*/  return new Property("ordered", "boolean", "If the matching elements have to occur in the same order as defined in the profile.", 0, 1, ordered);
1274          case 108873975: /*rules*/  return new Property("rules", "code", "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", 0, 1, rules);
1275          default: return super.getNamedProperty(_hash, _name, _checkValid);
1276          }
1277
1278        }
1279
1280      @Override
1281      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1282        switch (hash) {
1283        case -1888270692: /*discriminator*/ return this.discriminator == null ? new Base[0] : this.discriminator.toArray(new Base[this.discriminator.size()]); // ElementDefinitionSlicingDiscriminatorComponent
1284        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1285        case -1207109523: /*ordered*/ return this.ordered == null ? new Base[0] : new Base[] {this.ordered}; // BooleanType
1286        case 108873975: /*rules*/ return this.rules == null ? new Base[0] : new Base[] {this.rules}; // Enumeration<SlicingRules>
1287        default: return super.getProperty(hash, name, checkValid);
1288        }
1289
1290      }
1291
1292      @Override
1293      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1294        switch (hash) {
1295        case -1888270692: // discriminator
1296          this.getDiscriminator().add((ElementDefinitionSlicingDiscriminatorComponent) value); // ElementDefinitionSlicingDiscriminatorComponent
1297          return value;
1298        case -1724546052: // description
1299          this.description = TypeConvertor.castToString(value); // StringType
1300          return value;
1301        case -1207109523: // ordered
1302          this.ordered = TypeConvertor.castToBoolean(value); // BooleanType
1303          return value;
1304        case 108873975: // rules
1305          value = new SlicingRulesEnumFactory().fromType(TypeConvertor.castToCode(value));
1306          this.rules = (Enumeration) value; // Enumeration<SlicingRules>
1307          return value;
1308        default: return super.setProperty(hash, name, value);
1309        }
1310
1311      }
1312
1313      @Override
1314      public Base setProperty(String name, Base value) throws FHIRException {
1315        if (name.equals("discriminator")) {
1316          this.getDiscriminator().add((ElementDefinitionSlicingDiscriminatorComponent) value);
1317        } else if (name.equals("description")) {
1318          this.description = TypeConvertor.castToString(value); // StringType
1319        } else if (name.equals("ordered")) {
1320          this.ordered = TypeConvertor.castToBoolean(value); // BooleanType
1321        } else if (name.equals("rules")) {
1322          value = new SlicingRulesEnumFactory().fromType(TypeConvertor.castToCode(value));
1323          this.rules = (Enumeration) value; // Enumeration<SlicingRules>
1324        } else
1325          return super.setProperty(name, value);
1326        return value;
1327      }
1328
1329      @Override
1330      public Base makeProperty(int hash, String name) throws FHIRException {
1331        switch (hash) {
1332        case -1888270692:  return addDiscriminator(); 
1333        case -1724546052:  return getDescriptionElement();
1334        case -1207109523:  return getOrderedElement();
1335        case 108873975:  return getRulesElement();
1336        default: return super.makeProperty(hash, name);
1337        }
1338
1339      }
1340
1341      @Override
1342      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1343        switch (hash) {
1344        case -1888270692: /*discriminator*/ return new String[] {};
1345        case -1724546052: /*description*/ return new String[] {"string"};
1346        case -1207109523: /*ordered*/ return new String[] {"boolean"};
1347        case 108873975: /*rules*/ return new String[] {"code"};
1348        default: return super.getTypesForProperty(hash, name);
1349        }
1350
1351      }
1352
1353      @Override
1354      public Base addChild(String name) throws FHIRException {
1355        if (name.equals("discriminator")) {
1356          return addDiscriminator();
1357        }
1358        else if (name.equals("description")) {
1359          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.slicing.description");
1360        }
1361        else if (name.equals("ordered")) {
1362          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.slicing.ordered");
1363        }
1364        else if (name.equals("rules")) {
1365          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.slicing.rules");
1366        }
1367        else
1368          return super.addChild(name);
1369      }
1370
1371      public ElementDefinitionSlicingComponent copy() {
1372        ElementDefinitionSlicingComponent dst = new ElementDefinitionSlicingComponent();
1373        copyValues(dst);
1374        return dst;
1375      }
1376
1377      public void copyValues(ElementDefinitionSlicingComponent dst) {
1378        super.copyValues(dst);
1379        if (discriminator != null) {
1380          dst.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>();
1381          for (ElementDefinitionSlicingDiscriminatorComponent i : discriminator)
1382            dst.discriminator.add(i.copy());
1383        };
1384        dst.description = description == null ? null : description.copy();
1385        dst.ordered = ordered == null ? null : ordered.copy();
1386        dst.rules = rules == null ? null : rules.copy();
1387      }
1388
1389      @Override
1390      public boolean equalsDeep(Base other_) {
1391        if (!super.equalsDeep(other_))
1392          return false;
1393        if (!(other_ instanceof ElementDefinitionSlicingComponent))
1394          return false;
1395        ElementDefinitionSlicingComponent o = (ElementDefinitionSlicingComponent) other_;
1396        return compareDeep(discriminator, o.discriminator, true) && compareDeep(description, o.description, true)
1397           && compareDeep(ordered, o.ordered, true) && compareDeep(rules, o.rules, true);
1398      }
1399
1400      @Override
1401      public boolean equalsShallow(Base other_) {
1402        if (!super.equalsShallow(other_))
1403          return false;
1404        if (!(other_ instanceof ElementDefinitionSlicingComponent))
1405          return false;
1406        ElementDefinitionSlicingComponent o = (ElementDefinitionSlicingComponent) other_;
1407        return compareValues(description, o.description, true) && compareValues(ordered, o.ordered, true) && compareValues(rules, o.rules, true)
1408          ;
1409      }
1410
1411      public boolean isEmpty() {
1412        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(discriminator, description
1413          , ordered, rules);
1414      }
1415
1416      public String fhirType() {
1417        return "ElementDefinition.slicing";
1418
1419      }
1420
1421      @Override
1422      public String toString() {
1423        return (ordered == null ? "??" : "true".equals(ordered.asStringValue()) ? "ordered" : "unordered")+"/"+
1424            (rules == null ? "??" : rules.asStringValue())+" "+discriminator.toString();
1425      }
1426    }
1427
1428    @Block()
1429    public static class ElementDefinitionSlicingDiscriminatorComponent extends Element implements IBaseDatatypeElement {
1430        /**
1431         * How the element value is interpreted when discrimination is evaluated.
1432         */
1433        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1434        @Description(shortDefinition="value | exists | type | profile | position", formalDefinition="How the element value is interpreted when discrimination is evaluated." )
1435        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/discriminator-type")
1436        protected Enumeration<DiscriminatorType> type;
1437
1438        /**
1439         * A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.
1440         */
1441        @Child(name = "path", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true)
1442        @Description(shortDefinition="Path to element value", formalDefinition="A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based." )
1443        protected StringType path;
1444
1445        private static final long serialVersionUID = 1151159293L;
1446
1447    /**
1448     * Constructor
1449     */
1450      public ElementDefinitionSlicingDiscriminatorComponent() {
1451        super();
1452      }
1453
1454    /**
1455     * Constructor
1456     */
1457      public ElementDefinitionSlicingDiscriminatorComponent(DiscriminatorType type, String path) {
1458        super();
1459        this.setType(type);
1460        this.setPath(path);
1461      }
1462
1463        /**
1464         * @return {@link #type} (How the element value is interpreted when discrimination is evaluated.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1465         */
1466        public Enumeration<DiscriminatorType> getTypeElement() { 
1467          if (this.type == null)
1468            if (Configuration.errorOnAutoCreate())
1469              throw new Error("Attempt to auto-create ElementDefinitionSlicingDiscriminatorComponent.type");
1470            else if (Configuration.doAutoCreate())
1471              this.type = new Enumeration<DiscriminatorType>(new DiscriminatorTypeEnumFactory()); // bb
1472          return this.type;
1473        }
1474
1475        public boolean hasTypeElement() { 
1476          return this.type != null && !this.type.isEmpty();
1477        }
1478
1479        public boolean hasType() { 
1480          return this.type != null && !this.type.isEmpty();
1481        }
1482
1483        /**
1484         * @param value {@link #type} (How the element value is interpreted when discrimination is evaluated.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1485         */
1486        public ElementDefinitionSlicingDiscriminatorComponent setTypeElement(Enumeration<DiscriminatorType> value) { 
1487          this.type = value;
1488          return this;
1489        }
1490
1491        /**
1492         * @return How the element value is interpreted when discrimination is evaluated.
1493         */
1494        public DiscriminatorType getType() { 
1495          return this.type == null ? null : this.type.getValue();
1496        }
1497
1498        /**
1499         * @param value How the element value is interpreted when discrimination is evaluated.
1500         */
1501        public ElementDefinitionSlicingDiscriminatorComponent setType(DiscriminatorType value) { 
1502            if (this.type == null)
1503              this.type = new Enumeration<DiscriminatorType>(new DiscriminatorTypeEnumFactory());
1504            this.type.setValue(value);
1505          return this;
1506        }
1507
1508        /**
1509         * @return {@link #path} (A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
1510         */
1511        public StringType getPathElement() { 
1512          if (this.path == null)
1513            if (Configuration.errorOnAutoCreate())
1514              throw new Error("Attempt to auto-create ElementDefinitionSlicingDiscriminatorComponent.path");
1515            else if (Configuration.doAutoCreate())
1516              this.path = new StringType(); // bb
1517          return this.path;
1518        }
1519
1520        public boolean hasPathElement() { 
1521          return this.path != null && !this.path.isEmpty();
1522        }
1523
1524        public boolean hasPath() { 
1525          return this.path != null && !this.path.isEmpty();
1526        }
1527
1528        /**
1529         * @param value {@link #path} (A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
1530         */
1531        public ElementDefinitionSlicingDiscriminatorComponent setPathElement(StringType value) { 
1532          this.path = value;
1533          return this;
1534        }
1535
1536        /**
1537         * @return A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.
1538         */
1539        public String getPath() { 
1540          return this.path == null ? null : this.path.getValue();
1541        }
1542
1543        /**
1544         * @param value A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.
1545         */
1546        public ElementDefinitionSlicingDiscriminatorComponent setPath(String value) { 
1547            if (this.path == null)
1548              this.path = new StringType();
1549            this.path.setValue(value);
1550          return this;
1551        }
1552
1553        protected void listChildren(List<Property> children) {
1554          super.listChildren(children);
1555          children.add(new Property("type", "code", "How the element value is interpreted when discrimination is evaluated.", 0, 1, type));
1556          children.add(new Property("path", "string", "A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.", 0, 1, path));
1557        }
1558
1559        @Override
1560        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1561          switch (_hash) {
1562          case 3575610: /*type*/  return new Property("type", "code", "How the element value is interpreted when discrimination is evaluated.", 0, 1, type);
1563          case 3433509: /*path*/  return new Property("path", "string", "A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.", 0, 1, path);
1564          default: return super.getNamedProperty(_hash, _name, _checkValid);
1565          }
1566
1567        }
1568
1569      @Override
1570      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1571        switch (hash) {
1572        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DiscriminatorType>
1573        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
1574        default: return super.getProperty(hash, name, checkValid);
1575        }
1576
1577      }
1578
1579      @Override
1580      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1581        switch (hash) {
1582        case 3575610: // type
1583          value = new DiscriminatorTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1584          this.type = (Enumeration) value; // Enumeration<DiscriminatorType>
1585          return value;
1586        case 3433509: // path
1587          this.path = TypeConvertor.castToString(value); // StringType
1588          return value;
1589        default: return super.setProperty(hash, name, value);
1590        }
1591
1592      }
1593
1594      @Override
1595      public Base setProperty(String name, Base value) throws FHIRException {
1596        if (name.equals("type")) {
1597          value = new DiscriminatorTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1598          this.type = (Enumeration) value; // Enumeration<DiscriminatorType>
1599        } else if (name.equals("path")) {
1600          this.path = TypeConvertor.castToString(value); // StringType
1601        } else
1602          return super.setProperty(name, value);
1603        return value;
1604      }
1605
1606      @Override
1607      public Base makeProperty(int hash, String name) throws FHIRException {
1608        switch (hash) {
1609        case 3575610:  return getTypeElement();
1610        case 3433509:  return getPathElement();
1611        default: return super.makeProperty(hash, name);
1612        }
1613
1614      }
1615
1616      @Override
1617      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1618        switch (hash) {
1619        case 3575610: /*type*/ return new String[] {"code"};
1620        case 3433509: /*path*/ return new String[] {"string"};
1621        default: return super.getTypesForProperty(hash, name);
1622        }
1623
1624      }
1625
1626      @Override
1627      public Base addChild(String name) throws FHIRException {
1628        if (name.equals("type")) {
1629          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.slicing.discriminator.type");
1630        }
1631        else if (name.equals("path")) {
1632          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.slicing.discriminator.path");
1633        }
1634        else
1635          return super.addChild(name);
1636      }
1637
1638      public ElementDefinitionSlicingDiscriminatorComponent copy() {
1639        ElementDefinitionSlicingDiscriminatorComponent dst = new ElementDefinitionSlicingDiscriminatorComponent();
1640        copyValues(dst);
1641        return dst;
1642      }
1643
1644      public void copyValues(ElementDefinitionSlicingDiscriminatorComponent dst) {
1645        super.copyValues(dst);
1646        dst.type = type == null ? null : type.copy();
1647        dst.path = path == null ? null : path.copy();
1648      }
1649
1650      @Override
1651      public boolean equalsDeep(Base other_) {
1652        if (!super.equalsDeep(other_))
1653          return false;
1654        if (!(other_ instanceof ElementDefinitionSlicingDiscriminatorComponent))
1655          return false;
1656        ElementDefinitionSlicingDiscriminatorComponent o = (ElementDefinitionSlicingDiscriminatorComponent) other_;
1657        return compareDeep(type, o.type, true) && compareDeep(path, o.path, true);
1658      }
1659
1660      @Override
1661      public boolean equalsShallow(Base other_) {
1662        if (!super.equalsShallow(other_))
1663          return false;
1664        if (!(other_ instanceof ElementDefinitionSlicingDiscriminatorComponent))
1665          return false;
1666        ElementDefinitionSlicingDiscriminatorComponent o = (ElementDefinitionSlicingDiscriminatorComponent) other_;
1667        return compareValues(type, o.type, true) && compareValues(path, o.path, true);
1668      }
1669
1670      public boolean isEmpty() {
1671        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, path);
1672      }
1673
1674  public String fhirType() {
1675    return "ElementDefinition.slicing.discriminator";
1676
1677  }
1678
1679  @Override
1680  public String toString() {
1681    return (type == null ? "??" : type.getCode()) + "="+(path == null ? "??" : path.asStringValue());
1682  }
1683
1684  }
1685
1686    @Block()
1687    public static class ElementDefinitionBaseComponent extends Element implements IBaseDatatypeElement {
1688        /**
1689         * The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.
1690         */
1691        @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1692        @Description(shortDefinition="Path that identifies the base element", formalDefinition="The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base." )
1693        protected StringType path;
1694
1695        /**
1696         * Minimum cardinality of the base element identified by the path.
1697         */
1698        @Child(name = "min", type = {UnsignedIntType.class}, order=2, min=1, max=1, modifier=false, summary=true)
1699        @Description(shortDefinition="Min cardinality of the base element", formalDefinition="Minimum cardinality of the base element identified by the path." )
1700        protected UnsignedIntType min;
1701
1702        /**
1703         * Maximum cardinality of the base element identified by the path.
1704         */
1705        @Child(name = "max", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1706        @Description(shortDefinition="Max cardinality of the base element", formalDefinition="Maximum cardinality of the base element identified by the path." )
1707        protected StringType max;
1708
1709        private static final long serialVersionUID = -1412704221L;
1710
1711    /**
1712     * Constructor
1713     */
1714      public ElementDefinitionBaseComponent() {
1715        super();
1716      }
1717
1718    /**
1719     * Constructor
1720     */
1721      public ElementDefinitionBaseComponent(String path, int min, String max) {
1722        super();
1723        this.setPath(path);
1724        this.setMin(min);
1725        this.setMax(max);
1726      }
1727
1728        /**
1729         * @return {@link #path} (The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
1730         */
1731        public StringType getPathElement() { 
1732          if (this.path == null)
1733            if (Configuration.errorOnAutoCreate())
1734              throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.path");
1735            else if (Configuration.doAutoCreate())
1736              this.path = new StringType(); // bb
1737          return this.path;
1738        }
1739
1740        public boolean hasPathElement() { 
1741          return this.path != null && !this.path.isEmpty();
1742        }
1743
1744        public boolean hasPath() { 
1745          return this.path != null && !this.path.isEmpty();
1746        }
1747
1748        /**
1749         * @param value {@link #path} (The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
1750         */
1751        public ElementDefinitionBaseComponent setPathElement(StringType value) { 
1752          this.path = value;
1753          return this;
1754        }
1755
1756        /**
1757         * @return The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.
1758         */
1759        public String getPath() { 
1760          return this.path == null ? null : this.path.getValue();
1761        }
1762
1763        /**
1764         * @param value The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.
1765         */
1766        public ElementDefinitionBaseComponent setPath(String value) { 
1767            if (this.path == null)
1768              this.path = new StringType();
1769            this.path.setValue(value);
1770          return this;
1771        }
1772
1773        /**
1774         * @return {@link #min} (Minimum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value
1775         */
1776        public UnsignedIntType getMinElement() { 
1777          if (this.min == null)
1778            if (Configuration.errorOnAutoCreate())
1779              throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.min");
1780            else if (Configuration.doAutoCreate())
1781              this.min = new UnsignedIntType(); // bb
1782          return this.min;
1783        }
1784
1785        public boolean hasMinElement() { 
1786          return this.min != null && !this.min.isEmpty();
1787        }
1788
1789        public boolean hasMin() { 
1790          return this.min != null && !this.min.isEmpty();
1791        }
1792
1793        /**
1794         * @param value {@link #min} (Minimum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value
1795         */
1796        public ElementDefinitionBaseComponent setMinElement(UnsignedIntType value) { 
1797          this.min = value;
1798          return this;
1799        }
1800
1801        /**
1802         * @return Minimum cardinality of the base element identified by the path.
1803         */
1804        public int getMin() { 
1805          return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue();
1806        }
1807
1808        /**
1809         * @param value Minimum cardinality of the base element identified by the path.
1810         */
1811        public ElementDefinitionBaseComponent setMin(int value) { 
1812            if (this.min == null)
1813              this.min = new UnsignedIntType();
1814            this.min.setValue(value);
1815          return this;
1816        }
1817
1818        /**
1819         * @return {@link #max} (Maximum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value
1820         */
1821        public StringType getMaxElement() { 
1822          if (this.max == null)
1823            if (Configuration.errorOnAutoCreate())
1824              throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.max");
1825            else if (Configuration.doAutoCreate())
1826              this.max = new StringType(); // bb
1827          return this.max;
1828        }
1829
1830        public boolean hasMaxElement() { 
1831          return this.max != null && !this.max.isEmpty();
1832        }
1833
1834        public boolean hasMax() { 
1835          return this.max != null && !this.max.isEmpty();
1836        }
1837
1838        /**
1839         * @param value {@link #max} (Maximum cardinality of the base element identified by the path.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value
1840         */
1841        public ElementDefinitionBaseComponent setMaxElement(StringType value) { 
1842          this.max = value;
1843          return this;
1844        }
1845
1846        /**
1847         * @return Maximum cardinality of the base element identified by the path.
1848         */
1849        public String getMax() { 
1850          return this.max == null ? null : this.max.getValue();
1851        }
1852
1853        /**
1854         * @param value Maximum cardinality of the base element identified by the path.
1855         */
1856        public ElementDefinitionBaseComponent setMax(String value) { 
1857            if (this.max == null)
1858              this.max = new StringType();
1859            this.max.setValue(value);
1860          return this;
1861        }
1862
1863        protected void listChildren(List<Property> children) {
1864          super.listChildren(children);
1865          children.add(new Property("path", "string", "The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.", 0, 1, path));
1866          children.add(new Property("min", "unsignedInt", "Minimum cardinality of the base element identified by the path.", 0, 1, min));
1867          children.add(new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, 1, max));
1868        }
1869
1870        @Override
1871        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1872          switch (_hash) {
1873          case 3433509: /*path*/  return new Property("path", "string", "The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.", 0, 1, path);
1874          case 108114: /*min*/  return new Property("min", "unsignedInt", "Minimum cardinality of the base element identified by the path.", 0, 1, min);
1875          case 107876: /*max*/  return new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, 1, max);
1876          default: return super.getNamedProperty(_hash, _name, _checkValid);
1877          }
1878
1879        }
1880
1881      @Override
1882      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1883        switch (hash) {
1884        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
1885        case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // UnsignedIntType
1886        case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
1887        default: return super.getProperty(hash, name, checkValid);
1888        }
1889
1890      }
1891
1892      @Override
1893      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1894        switch (hash) {
1895        case 3433509: // path
1896          this.path = TypeConvertor.castToString(value); // StringType
1897          return value;
1898        case 108114: // min
1899          this.min = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1900          return value;
1901        case 107876: // max
1902          this.max = TypeConvertor.castToString(value); // StringType
1903          return value;
1904        default: return super.setProperty(hash, name, value);
1905        }
1906
1907      }
1908
1909      @Override
1910      public Base setProperty(String name, Base value) throws FHIRException {
1911        if (name.equals("path")) {
1912          this.path = TypeConvertor.castToString(value); // StringType
1913        } else if (name.equals("min")) {
1914          this.min = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1915        } else if (name.equals("max")) {
1916          this.max = TypeConvertor.castToString(value); // StringType
1917        } else
1918          return super.setProperty(name, value);
1919        return value;
1920      }
1921
1922      @Override
1923      public Base makeProperty(int hash, String name) throws FHIRException {
1924        switch (hash) {
1925        case 3433509:  return getPathElement();
1926        case 108114:  return getMinElement();
1927        case 107876:  return getMaxElement();
1928        default: return super.makeProperty(hash, name);
1929        }
1930
1931      }
1932
1933      @Override
1934      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1935        switch (hash) {
1936        case 3433509: /*path*/ return new String[] {"string"};
1937        case 108114: /*min*/ return new String[] {"unsignedInt"};
1938        case 107876: /*max*/ return new String[] {"string"};
1939        default: return super.getTypesForProperty(hash, name);
1940        }
1941
1942      }
1943
1944      @Override
1945      public Base addChild(String name) throws FHIRException {
1946        if (name.equals("path")) {
1947          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.base.path");
1948        }
1949        else if (name.equals("min")) {
1950          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.base.min");
1951        }
1952        else if (name.equals("max")) {
1953          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.base.max");
1954        }
1955        else
1956          return super.addChild(name);
1957      }
1958
1959      public ElementDefinitionBaseComponent copy() {
1960        ElementDefinitionBaseComponent dst = new ElementDefinitionBaseComponent();
1961        copyValues(dst);
1962        return dst;
1963      }
1964
1965      public void copyValues(ElementDefinitionBaseComponent dst) {
1966        super.copyValues(dst);
1967        dst.path = path == null ? null : path.copy();
1968        dst.min = min == null ? null : min.copy();
1969        dst.max = max == null ? null : max.copy();
1970      }
1971
1972      @Override
1973      public boolean equalsDeep(Base other_) {
1974        if (!super.equalsDeep(other_))
1975          return false;
1976        if (!(other_ instanceof ElementDefinitionBaseComponent))
1977          return false;
1978        ElementDefinitionBaseComponent o = (ElementDefinitionBaseComponent) other_;
1979        return compareDeep(path, o.path, true) && compareDeep(min, o.min, true) && compareDeep(max, o.max, true)
1980          ;
1981      }
1982
1983      @Override
1984      public boolean equalsShallow(Base other_) {
1985        if (!super.equalsShallow(other_))
1986          return false;
1987        if (!(other_ instanceof ElementDefinitionBaseComponent))
1988          return false;
1989        ElementDefinitionBaseComponent o = (ElementDefinitionBaseComponent) other_;
1990        return compareValues(path, o.path, true) && compareValues(min, o.min, true) && compareValues(max, o.max, true)
1991          ;
1992      }
1993
1994      public boolean isEmpty() {
1995        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, min, max);
1996      }
1997
1998  public String fhirType() {
1999    return "ElementDefinition.base";
2000
2001  }
2002
2003  }
2004
2005    @Block()
2006    public static class TypeRefComponent extends Element implements IBaseDatatypeElement {
2007        /**
2008         * URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.
2009         */
2010        @Child(name = "code", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true)
2011        @Description(shortDefinition="Data type or Resource (reference to definition)", formalDefinition="URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. \"string\" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models." )
2012        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/elementdefinition-types")
2013        protected UriType code;
2014
2015        /**
2016         * Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.
2017         */
2018        @Child(name = "profile", type = {CanonicalType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2019        @Description(shortDefinition="Profiles (StructureDefinition or IG) - one must apply", formalDefinition="Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide." )
2020        protected List<CanonicalType> profile;
2021
2022        /**
2023         * Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.
2024         */
2025        @Child(name = "targetProfile", type = {CanonicalType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2026        @Description(shortDefinition="Profile (StructureDefinition or IG) on the Reference/canonical target - one must apply", formalDefinition="Used when the type is \"Reference\" or \"canonical\", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide." )
2027        protected List<CanonicalType> targetProfile;
2028
2029        /**
2030         * If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.
2031         */
2032        @Child(name = "aggregation", type = {CodeType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2033        @Description(shortDefinition="contained | referenced | bundled - how aggregated", formalDefinition="If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle." )
2034        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-aggregation-mode")
2035        protected List<Enumeration<AggregationMode>> aggregation;
2036
2037        /**
2038         * Whether this reference needs to be version specific or version independent, or whether either can be used.
2039         */
2040        @Child(name = "versioning", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
2041        @Description(shortDefinition="either | independent | specific", formalDefinition="Whether this reference needs to be version specific or version independent, or whether either can be used." )
2042        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reference-version-rules")
2043        protected Enumeration<ReferenceVersionRules> versioning;
2044
2045        private static final long serialVersionUID = 957891653L;
2046
2047    /**
2048     * Constructor
2049     */
2050      public TypeRefComponent() {
2051        super();
2052      }
2053
2054    /**
2055     * Constructor
2056     */
2057      public TypeRefComponent(String code) {
2058        super();
2059        this.setCode(code);
2060      }
2061
2062        /**
2063         * @return {@link #code} (URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
2064         */
2065        public UriType getCodeElement() { 
2066          if (this.code == null)
2067            if (Configuration.errorOnAutoCreate())
2068              throw new Error("Attempt to auto-create TypeRefComponent.code");
2069            else if (Configuration.doAutoCreate())
2070              this.code = new UriType(); // bb
2071          return this.code;
2072        }
2073
2074        public boolean hasCodeElement() { 
2075          return this.code != null && !this.code.isEmpty();
2076        }
2077
2078        public boolean hasCode() { 
2079          return this.code != null && !this.code.isEmpty();
2080        }
2081
2082        /**
2083         * @param value {@link #code} (URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
2084         */
2085        public TypeRefComponent setCodeElement(UriType value) { 
2086          this.code = value;
2087          return this;
2088        }
2089
2090        /**
2091         * @return URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.
2092         */
2093        public String getCode() { 
2094          return this.code == null ? null : this.code.getValue();
2095        }
2096
2097        /**
2098         * @param value URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.
2099         */
2100        public TypeRefComponent setCode(String value) { 
2101            if (this.code == null)
2102              this.code = new UriType();
2103            this.code.setValue(value);
2104          return this;
2105        }
2106
2107        /**
2108         * @return {@link #profile} (Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.)
2109         */
2110        public List<CanonicalType> getProfile() { 
2111          if (this.profile == null)
2112            this.profile = new ArrayList<CanonicalType>();
2113          return this.profile;
2114        }
2115
2116        /**
2117         * @return Returns a reference to <code>this</code> for easy method chaining
2118         */
2119        public TypeRefComponent setProfile(List<CanonicalType> theProfile) { 
2120          this.profile = theProfile;
2121          return this;
2122        }
2123
2124        public boolean hasProfile() { 
2125          if (this.profile == null)
2126            return false;
2127          for (CanonicalType item : this.profile)
2128            if (!item.isEmpty())
2129              return true;
2130          return false;
2131        }
2132
2133        /**
2134         * @return {@link #profile} (Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.)
2135         */
2136        public CanonicalType addProfileElement() {//2 
2137          CanonicalType t = new CanonicalType();
2138          if (this.profile == null)
2139            this.profile = new ArrayList<CanonicalType>();
2140          this.profile.add(t);
2141          return t;
2142        }
2143
2144        /**
2145         * @param value {@link #profile} (Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.)
2146         */
2147        public TypeRefComponent addProfile(String value) { //1
2148          CanonicalType t = new CanonicalType();
2149          t.setValue(value);
2150          if (this.profile == null)
2151            this.profile = new ArrayList<CanonicalType>();
2152          this.profile.add(t);
2153          return this;
2154        }
2155
2156        /**
2157         * @param value {@link #profile} (Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.)
2158         */
2159        public boolean hasProfile(String value) { 
2160          if (this.profile == null)
2161            return false;
2162          for (CanonicalType v : this.profile)
2163            if (v.getValue().equals(value)) // canonical
2164              return true;
2165          return false;
2166        }
2167
2168        /**
2169         * @return {@link #targetProfile} (Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.)
2170         */
2171        public List<CanonicalType> getTargetProfile() { 
2172          if (this.targetProfile == null)
2173            this.targetProfile = new ArrayList<CanonicalType>();
2174          return this.targetProfile;
2175        }
2176
2177        /**
2178         * @return Returns a reference to <code>this</code> for easy method chaining
2179         */
2180        public TypeRefComponent setTargetProfile(List<CanonicalType> theTargetProfile) { 
2181          this.targetProfile = theTargetProfile;
2182          return this;
2183        }
2184
2185        public boolean hasTargetProfile() { 
2186          if (this.targetProfile == null)
2187            return false;
2188          for (CanonicalType item : this.targetProfile)
2189            if (!item.isEmpty())
2190              return true;
2191          return false;
2192        }
2193
2194        /**
2195         * @return {@link #targetProfile} (Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.)
2196         */
2197        public CanonicalType addTargetProfileElement() {//2 
2198          CanonicalType t = new CanonicalType();
2199          if (this.targetProfile == null)
2200            this.targetProfile = new ArrayList<CanonicalType>();
2201          this.targetProfile.add(t);
2202          return t;
2203        }
2204
2205        /**
2206         * @param value {@link #targetProfile} (Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.)
2207         */
2208        public TypeRefComponent addTargetProfile(String value) { //1
2209          CanonicalType t = new CanonicalType();
2210          t.setValue(value);
2211          if (this.targetProfile == null)
2212            this.targetProfile = new ArrayList<CanonicalType>();
2213          this.targetProfile.add(t);
2214          return this;
2215        }
2216
2217        /**
2218         * @param value {@link #targetProfile} (Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.)
2219         */
2220        public boolean hasTargetProfile(String value) { 
2221          if (this.targetProfile == null)
2222            return false;
2223          for (CanonicalType v : this.targetProfile)
2224            if (v.getValue().equals(value)) // canonical
2225              return true;
2226          return false;
2227        }
2228
2229        /**
2230         * @return {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.)
2231         */
2232        public List<Enumeration<AggregationMode>> getAggregation() { 
2233          if (this.aggregation == null)
2234            this.aggregation = new ArrayList<Enumeration<AggregationMode>>();
2235          return this.aggregation;
2236        }
2237
2238        /**
2239         * @return Returns a reference to <code>this</code> for easy method chaining
2240         */
2241        public TypeRefComponent setAggregation(List<Enumeration<AggregationMode>> theAggregation) { 
2242          this.aggregation = theAggregation;
2243          return this;
2244        }
2245
2246        public boolean hasAggregation() { 
2247          if (this.aggregation == null)
2248            return false;
2249          for (Enumeration<AggregationMode> item : this.aggregation)
2250            if (!item.isEmpty())
2251              return true;
2252          return false;
2253        }
2254
2255        /**
2256         * @return {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.)
2257         */
2258        public Enumeration<AggregationMode> addAggregationElement() {//2 
2259          Enumeration<AggregationMode> t = new Enumeration<AggregationMode>(new AggregationModeEnumFactory());
2260          if (this.aggregation == null)
2261            this.aggregation = new ArrayList<Enumeration<AggregationMode>>();
2262          this.aggregation.add(t);
2263          return t;
2264        }
2265
2266        /**
2267         * @param value {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.)
2268         */
2269        public TypeRefComponent addAggregation(AggregationMode value) { //1
2270          Enumeration<AggregationMode> t = new Enumeration<AggregationMode>(new AggregationModeEnumFactory());
2271          t.setValue(value);
2272          if (this.aggregation == null)
2273            this.aggregation = new ArrayList<Enumeration<AggregationMode>>();
2274          this.aggregation.add(t);
2275          return this;
2276        }
2277
2278        /**
2279         * @param value {@link #aggregation} (If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.)
2280         */
2281        public boolean hasAggregation(AggregationMode value) { 
2282          if (this.aggregation == null)
2283            return false;
2284          for (Enumeration<AggregationMode> v : this.aggregation)
2285            if (v.getValue().equals(value)) // code
2286              return true;
2287          return false;
2288        }
2289
2290        /**
2291         * @return {@link #versioning} (Whether this reference needs to be version specific or version independent, or whether either can be used.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value
2292         */
2293        public Enumeration<ReferenceVersionRules> getVersioningElement() { 
2294          if (this.versioning == null)
2295            if (Configuration.errorOnAutoCreate())
2296              throw new Error("Attempt to auto-create TypeRefComponent.versioning");
2297            else if (Configuration.doAutoCreate())
2298              this.versioning = new Enumeration<ReferenceVersionRules>(new ReferenceVersionRulesEnumFactory()); // bb
2299          return this.versioning;
2300        }
2301
2302        public boolean hasVersioningElement() { 
2303          return this.versioning != null && !this.versioning.isEmpty();
2304        }
2305
2306        public boolean hasVersioning() { 
2307          return this.versioning != null && !this.versioning.isEmpty();
2308        }
2309
2310        /**
2311         * @param value {@link #versioning} (Whether this reference needs to be version specific or version independent, or whether either can be used.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value
2312         */
2313        public TypeRefComponent setVersioningElement(Enumeration<ReferenceVersionRules> value) { 
2314          this.versioning = value;
2315          return this;
2316        }
2317
2318        /**
2319         * @return Whether this reference needs to be version specific or version independent, or whether either can be used.
2320         */
2321        public ReferenceVersionRules getVersioning() { 
2322          return this.versioning == null ? null : this.versioning.getValue();
2323        }
2324
2325        /**
2326         * @param value Whether this reference needs to be version specific or version independent, or whether either can be used.
2327         */
2328        public TypeRefComponent setVersioning(ReferenceVersionRules value) { 
2329          if (value == null)
2330            this.versioning = null;
2331          else {
2332            if (this.versioning == null)
2333              this.versioning = new Enumeration<ReferenceVersionRules>(new ReferenceVersionRulesEnumFactory());
2334            this.versioning.setValue(value);
2335          }
2336          return this;
2337        }
2338
2339        protected void listChildren(List<Property> children) {
2340          super.listChildren(children);
2341          children.add(new Property("code", "uri", "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. \"string\" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", 0, 1, code));
2342          children.add(new Property("profile", "canonical(StructureDefinition|ImplementationGuide)", "Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, profile));
2343          children.add(new Property("targetProfile", "canonical(StructureDefinition|ImplementationGuide)", "Used when the type is \"Reference\" or \"canonical\", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, targetProfile));
2344          children.add(new Property("aggregation", "code", "If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.", 0, java.lang.Integer.MAX_VALUE, aggregation));
2345          children.add(new Property("versioning", "code", "Whether this reference needs to be version specific or version independent, or whether either can be used.", 0, 1, versioning));
2346        }
2347
2348        @Override
2349        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2350          switch (_hash) {
2351          case 3059181: /*code*/  return new Property("code", "uri", "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. \"string\" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", 0, 1, code);
2352          case -309425751: /*profile*/  return new Property("profile", "canonical(StructureDefinition|ImplementationGuide)", "Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, profile);
2353          case 1994521304: /*targetProfile*/  return new Property("targetProfile", "canonical(StructureDefinition|ImplementationGuide)", "Used when the type is \"Reference\" or \"canonical\", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, targetProfile);
2354          case 841524962: /*aggregation*/  return new Property("aggregation", "code", "If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.", 0, java.lang.Integer.MAX_VALUE, aggregation);
2355          case -670487542: /*versioning*/  return new Property("versioning", "code", "Whether this reference needs to be version specific or version independent, or whether either can be used.", 0, 1, versioning);
2356          default: return super.getNamedProperty(_hash, _name, _checkValid);
2357          }
2358
2359        }
2360
2361      @Override
2362      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2363        switch (hash) {
2364        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // UriType
2365        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // CanonicalType
2366        case 1994521304: /*targetProfile*/ return this.targetProfile == null ? new Base[0] : this.targetProfile.toArray(new Base[this.targetProfile.size()]); // CanonicalType
2367        case 841524962: /*aggregation*/ return this.aggregation == null ? new Base[0] : this.aggregation.toArray(new Base[this.aggregation.size()]); // Enumeration<AggregationMode>
2368        case -670487542: /*versioning*/ return this.versioning == null ? new Base[0] : new Base[] {this.versioning}; // Enumeration<ReferenceVersionRules>
2369        default: return super.getProperty(hash, name, checkValid);
2370        }
2371
2372      }
2373
2374      @Override
2375      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2376        switch (hash) {
2377        case 3059181: // code
2378          this.code = TypeConvertor.castToUri(value); // UriType
2379          return value;
2380        case -309425751: // profile
2381          this.getProfile().add(TypeConvertor.castToCanonical(value)); // CanonicalType
2382          return value;
2383        case 1994521304: // targetProfile
2384          this.getTargetProfile().add(TypeConvertor.castToCanonical(value)); // CanonicalType
2385          return value;
2386        case 841524962: // aggregation
2387          value = new AggregationModeEnumFactory().fromType(TypeConvertor.castToCode(value));
2388          this.getAggregation().add((Enumeration) value); // Enumeration<AggregationMode>
2389          return value;
2390        case -670487542: // versioning
2391          value = new ReferenceVersionRulesEnumFactory().fromType(TypeConvertor.castToCode(value));
2392          this.versioning = (Enumeration) value; // Enumeration<ReferenceVersionRules>
2393          return value;
2394        default: return super.setProperty(hash, name, value);
2395        }
2396
2397      }
2398
2399      @Override
2400      public Base setProperty(String name, Base value) throws FHIRException {
2401        if (name.equals("code")) {
2402          this.code = TypeConvertor.castToUri(value); // UriType
2403        } else if (name.equals("profile")) {
2404          this.getProfile().add(TypeConvertor.castToCanonical(value));
2405        } else if (name.equals("targetProfile")) {
2406          this.getTargetProfile().add(TypeConvertor.castToCanonical(value));
2407        } else if (name.equals("aggregation")) {
2408          value = new AggregationModeEnumFactory().fromType(TypeConvertor.castToCode(value));
2409          this.getAggregation().add((Enumeration) value);
2410        } else if (name.equals("versioning")) {
2411          value = new ReferenceVersionRulesEnumFactory().fromType(TypeConvertor.castToCode(value));
2412          this.versioning = (Enumeration) value; // Enumeration<ReferenceVersionRules>
2413        } else
2414          return super.setProperty(name, value);
2415        return value;
2416      }
2417
2418      @Override
2419      public Base makeProperty(int hash, String name) throws FHIRException {
2420        switch (hash) {
2421        case 3059181:  return getCodeElement();
2422        case -309425751:  return addProfileElement();
2423        case 1994521304:  return addTargetProfileElement();
2424        case 841524962:  return addAggregationElement();
2425        case -670487542:  return getVersioningElement();
2426        default: return super.makeProperty(hash, name);
2427        }
2428
2429      }
2430
2431      @Override
2432      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2433        switch (hash) {
2434        case 3059181: /*code*/ return new String[] {"uri"};
2435        case -309425751: /*profile*/ return new String[] {"canonical"};
2436        case 1994521304: /*targetProfile*/ return new String[] {"canonical"};
2437        case 841524962: /*aggregation*/ return new String[] {"code"};
2438        case -670487542: /*versioning*/ return new String[] {"code"};
2439        default: return super.getTypesForProperty(hash, name);
2440        }
2441
2442      }
2443
2444      @Override
2445      public Base addChild(String name) throws FHIRException {
2446        if (name.equals("code")) {
2447          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.type.code");
2448        }
2449        else if (name.equals("profile")) {
2450          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.type.profile");
2451        }
2452        else if (name.equals("targetProfile")) {
2453          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.type.targetProfile");
2454        }
2455        else if (name.equals("aggregation")) {
2456          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.type.aggregation");
2457        }
2458        else if (name.equals("versioning")) {
2459          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.type.versioning");
2460        }
2461        else
2462          return super.addChild(name);
2463      }
2464
2465      public TypeRefComponent copy() {
2466        TypeRefComponent dst = new TypeRefComponent();
2467        copyValues(dst);
2468        return dst;
2469      }
2470
2471      public void copyValues(TypeRefComponent dst) {
2472        super.copyValues(dst);
2473        dst.code = code == null ? null : code.copy();
2474        if (profile != null) {
2475          dst.profile = new ArrayList<CanonicalType>();
2476          for (CanonicalType i : profile)
2477            dst.profile.add(i.copy());
2478        };
2479        if (targetProfile != null) {
2480          dst.targetProfile = new ArrayList<CanonicalType>();
2481          for (CanonicalType i : targetProfile)
2482            dst.targetProfile.add(i.copy());
2483        };
2484        if (aggregation != null) {
2485          dst.aggregation = new ArrayList<Enumeration<AggregationMode>>();
2486          for (Enumeration<AggregationMode> i : aggregation)
2487            dst.aggregation.add(i.copy());
2488        };
2489        dst.versioning = versioning == null ? null : versioning.copy();
2490      }
2491
2492      @Override
2493      public boolean equalsDeep(Base other_) {
2494        if (!super.equalsDeep(other_))
2495          return false;
2496        if (!(other_ instanceof TypeRefComponent))
2497          return false;
2498        TypeRefComponent o = (TypeRefComponent) other_;
2499        return compareDeep(code, o.code, true) && compareDeep(profile, o.profile, true) && compareDeep(targetProfile, o.targetProfile, true)
2500           && compareDeep(aggregation, o.aggregation, true) && compareDeep(versioning, o.versioning, true)
2501          ;
2502      }
2503
2504      @Override
2505      public boolean equalsShallow(Base other_) {
2506        if (!super.equalsShallow(other_))
2507          return false;
2508        if (!(other_ instanceof TypeRefComponent))
2509          return false;
2510        TypeRefComponent o = (TypeRefComponent) other_;
2511        return compareValues(code, o.code, true) && compareValues(profile, o.profile, true) && compareValues(targetProfile, o.targetProfile, true)
2512           && compareValues(aggregation, o.aggregation, true) && compareValues(versioning, o.versioning, true)
2513          ;
2514      }
2515
2516      public boolean isEmpty() {
2517        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, profile, targetProfile
2518          , aggregation, versioning);
2519      }
2520
2521  public String fhirType() {
2522    return "ElementDefinition.type";
2523
2524  }
2525
2526// added from java-adornments.txt:
2527public boolean hasTarget() {
2528    return Utilities.existsInList(getCode(), "Reference", "canonical", "CodeableReference");
2529  }
2530  
2531    /**
2532   * This code checks for the system prefix and returns the FHIR type
2533   * 
2534   * @return
2535   */
2536  public String getWorkingCode() {
2537    if (hasExtension(ToolingExtensions.EXT_FHIR_TYPE))
2538      return getExtensionString(ToolingExtensions.EXT_FHIR_TYPE);
2539    if (!hasCodeElement()) 
2540      return null;
2541    if (getCodeElement().hasExtension(ToolingExtensions.EXT_XML_TYPE)) {
2542      String s = getCodeElement().getExtensionString(ToolingExtensions.EXT_XML_TYPE);
2543      if ("xsd:gYear OR xsd:gYearMonth OR xsd:date OR xsd:dateTime".equalsIgnoreCase(s))
2544        return "dateTime";
2545      if ("xsd:gYear OR xsd:gYearMonth OR xsd:date".equalsIgnoreCase(s))
2546        return "date";
2547      if ("xsd:dateTime".equalsIgnoreCase(s))
2548        return "instant";
2549      if ("xsd:token".equals(s))
2550        return "code";
2551      if ("xsd:boolean".equals(s))
2552        return "boolean";
2553      if ("xsd:string".equals(s))
2554        return "string";
2555      if ("xsd:time".equals(s))
2556        return "time";
2557      if ("xsd:int".equals(s))
2558        return "integer";
2559      if ("xsd:decimal OR xsd:double".equals(s))
2560        return "decimal";
2561      if ("xsd:decimal".equalsIgnoreCase(s))
2562        return "decimal";
2563      if ("xsd:base64Binary".equalsIgnoreCase(s))
2564        return "base64Binary";
2565      if ("xsd:positiveInteger".equalsIgnoreCase(s))
2566        return "positiveInt";
2567      if ("xsd:nonNegativeInteger".equalsIgnoreCase(s))
2568        return "unsignedInt";
2569      if ("xsd:anyURI".equalsIgnoreCase(s))
2570        return "uri";
2571      
2572      throw new Error("Unknown xml type '"+s+"'");
2573    }
2574    return getCode();
2575  }
2576
2577  @Override
2578  public String toString() {
2579    String res = getCode();
2580    if (hasProfile()) {
2581      res = res + "{";
2582      boolean first = true;
2583      for (CanonicalType s : getProfile()) {
2584        if (first) first = false; else res = res + "|";
2585        res = res + s.getValue();
2586      }
2587      res = res + "}";
2588    }
2589    if (hasTargetProfile()) {
2590      res = res + "->(";
2591      boolean first = true;
2592      for (CanonicalType s : getTargetProfile()) {
2593        if (first) first = false; else res = res + "|";
2594        res = res + s.getValue();
2595      }
2596      res = res + ")";
2597    }    
2598    return res;
2599  }
2600
2601  public String getName() {
2602    return getWorkingCode();
2603  }
2604
2605  public boolean isResourceReference() {
2606    return "Reference".equals(getCode()) && hasTargetProfile();
2607  }
2608// end addition
2609  }
2610
2611    @Block()
2612    public static class ElementDefinitionExampleComponent extends Element implements IBaseDatatypeElement {
2613        /**
2614         * Describes the purpose of this example among the set of examples.
2615         */
2616        @Child(name = "label", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
2617        @Description(shortDefinition="Describes the purpose of this example", formalDefinition="Describes the purpose of this example among the set of examples." )
2618        protected StringType label;
2619
2620        /**
2621         * The actual value for the element, which must be one of the types allowed for this element.
2622         */
2623        @Child(name = "value", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, CodeableReference.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, RatioRange.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Availability.class, ExtendedContactDetail.class, Dosage.class, Meta.class}, order=2, min=1, max=1, modifier=false, summary=true)
2624        @Description(shortDefinition="Value of Example (one of allowed types)", formalDefinition="The actual value for the element, which must be one of the types allowed for this element." )
2625        protected DataType value;
2626
2627        private static final long serialVersionUID = 463190922L;
2628
2629    /**
2630     * Constructor
2631     */
2632      public ElementDefinitionExampleComponent() {
2633        super();
2634      }
2635
2636    /**
2637     * Constructor
2638     */
2639      public ElementDefinitionExampleComponent(String label, DataType value) {
2640        super();
2641        this.setLabel(label);
2642        this.setValue(value);
2643      }
2644
2645        /**
2646         * @return {@link #label} (Describes the purpose of this example among the set of examples.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
2647         */
2648        public StringType getLabelElement() { 
2649          if (this.label == null)
2650            if (Configuration.errorOnAutoCreate())
2651              throw new Error("Attempt to auto-create ElementDefinitionExampleComponent.label");
2652            else if (Configuration.doAutoCreate())
2653              this.label = new StringType(); // bb
2654          return this.label;
2655        }
2656
2657        public boolean hasLabelElement() { 
2658          return this.label != null && !this.label.isEmpty();
2659        }
2660
2661        public boolean hasLabel() { 
2662          return this.label != null && !this.label.isEmpty();
2663        }
2664
2665        /**
2666         * @param value {@link #label} (Describes the purpose of this example among the set of examples.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
2667         */
2668        public ElementDefinitionExampleComponent setLabelElement(StringType value) { 
2669          this.label = value;
2670          return this;
2671        }
2672
2673        /**
2674         * @return Describes the purpose of this example among the set of examples.
2675         */
2676        public String getLabel() { 
2677          return this.label == null ? null : this.label.getValue();
2678        }
2679
2680        /**
2681         * @param value Describes the purpose of this example among the set of examples.
2682         */
2683        public ElementDefinitionExampleComponent setLabel(String value) { 
2684            if (this.label == null)
2685              this.label = new StringType();
2686            this.label.setValue(value);
2687          return this;
2688        }
2689
2690        /**
2691         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2692         */
2693        public DataType getValue() { 
2694          return this.value;
2695        }
2696
2697        /**
2698         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2699         */
2700        public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 
2701          if (this.value == null)
2702            this.value = new Base64BinaryType();
2703          if (!(this.value instanceof Base64BinaryType))
2704            throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered");
2705          return (Base64BinaryType) this.value;
2706        }
2707
2708        public boolean hasValueBase64BinaryType() { 
2709          return this != null && this.value instanceof Base64BinaryType;
2710        }
2711
2712        /**
2713         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2714         */
2715        public BooleanType getValueBooleanType() throws FHIRException { 
2716          if (this.value == null)
2717            this.value = new BooleanType();
2718          if (!(this.value instanceof BooleanType))
2719            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
2720          return (BooleanType) this.value;
2721        }
2722
2723        public boolean hasValueBooleanType() { 
2724          return this != null && this.value instanceof BooleanType;
2725        }
2726
2727        /**
2728         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2729         */
2730        public CanonicalType getValueCanonicalType() throws FHIRException { 
2731          if (this.value == null)
2732            this.value = new CanonicalType();
2733          if (!(this.value instanceof CanonicalType))
2734            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered");
2735          return (CanonicalType) this.value;
2736        }
2737
2738        public boolean hasValueCanonicalType() { 
2739          return this != null && this.value instanceof CanonicalType;
2740        }
2741
2742        /**
2743         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2744         */
2745        public CodeType getValueCodeType() throws FHIRException { 
2746          if (this.value == null)
2747            this.value = new CodeType();
2748          if (!(this.value instanceof CodeType))
2749            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
2750          return (CodeType) this.value;
2751        }
2752
2753        public boolean hasValueCodeType() { 
2754          return this != null && this.value instanceof CodeType;
2755        }
2756
2757        /**
2758         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2759         */
2760        public DateType getValueDateType() throws FHIRException { 
2761          if (this.value == null)
2762            this.value = new DateType();
2763          if (!(this.value instanceof DateType))
2764            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered");
2765          return (DateType) this.value;
2766        }
2767
2768        public boolean hasValueDateType() { 
2769          return this != null && this.value instanceof DateType;
2770        }
2771
2772        /**
2773         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2774         */
2775        public DateTimeType getValueDateTimeType() throws FHIRException { 
2776          if (this.value == null)
2777            this.value = new DateTimeType();
2778          if (!(this.value instanceof DateTimeType))
2779            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2780          return (DateTimeType) this.value;
2781        }
2782
2783        public boolean hasValueDateTimeType() { 
2784          return this != null && this.value instanceof DateTimeType;
2785        }
2786
2787        /**
2788         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2789         */
2790        public DecimalType getValueDecimalType() throws FHIRException { 
2791          if (this.value == null)
2792            this.value = new DecimalType();
2793          if (!(this.value instanceof DecimalType))
2794            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
2795          return (DecimalType) this.value;
2796        }
2797
2798        public boolean hasValueDecimalType() { 
2799          return this != null && this.value instanceof DecimalType;
2800        }
2801
2802        /**
2803         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2804         */
2805        public IdType getValueIdType() throws FHIRException { 
2806          if (this.value == null)
2807            this.value = new IdType();
2808          if (!(this.value instanceof IdType))
2809            throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered");
2810          return (IdType) this.value;
2811        }
2812
2813        public boolean hasValueIdType() { 
2814          return this != null && this.value instanceof IdType;
2815        }
2816
2817        /**
2818         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2819         */
2820        public InstantType getValueInstantType() throws FHIRException { 
2821          if (this.value == null)
2822            this.value = new InstantType();
2823          if (!(this.value instanceof InstantType))
2824            throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered");
2825          return (InstantType) this.value;
2826        }
2827
2828        public boolean hasValueInstantType() { 
2829          return this != null && this.value instanceof InstantType;
2830        }
2831
2832        /**
2833         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2834         */
2835        public IntegerType getValueIntegerType() throws FHIRException { 
2836          if (this.value == null)
2837            this.value = new IntegerType();
2838          if (!(this.value instanceof IntegerType))
2839            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
2840          return (IntegerType) this.value;
2841        }
2842
2843        public boolean hasValueIntegerType() { 
2844          return this != null && this.value instanceof IntegerType;
2845        }
2846
2847        /**
2848         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2849         */
2850        public Integer64Type getValueInteger64Type() throws FHIRException { 
2851          if (this.value == null)
2852            this.value = new Integer64Type();
2853          if (!(this.value instanceof Integer64Type))
2854            throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.value.getClass().getName()+" was encountered");
2855          return (Integer64Type) this.value;
2856        }
2857
2858        public boolean hasValueInteger64Type() { 
2859          return this != null && this.value instanceof Integer64Type;
2860        }
2861
2862        /**
2863         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2864         */
2865        public MarkdownType getValueMarkdownType() throws FHIRException { 
2866          if (this.value == null)
2867            this.value = new MarkdownType();
2868          if (!(this.value instanceof MarkdownType))
2869            throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered");
2870          return (MarkdownType) this.value;
2871        }
2872
2873        public boolean hasValueMarkdownType() { 
2874          return this != null && this.value instanceof MarkdownType;
2875        }
2876
2877        /**
2878         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2879         */
2880        public OidType getValueOidType() throws FHIRException { 
2881          if (this.value == null)
2882            this.value = new OidType();
2883          if (!(this.value instanceof OidType))
2884            throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered");
2885          return (OidType) this.value;
2886        }
2887
2888        public boolean hasValueOidType() { 
2889          return this != null && this.value instanceof OidType;
2890        }
2891
2892        /**
2893         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2894         */
2895        public PositiveIntType getValuePositiveIntType() throws FHIRException { 
2896          if (this.value == null)
2897            this.value = new PositiveIntType();
2898          if (!(this.value instanceof PositiveIntType))
2899            throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2900          return (PositiveIntType) this.value;
2901        }
2902
2903        public boolean hasValuePositiveIntType() { 
2904          return this != null && this.value instanceof PositiveIntType;
2905        }
2906
2907        /**
2908         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2909         */
2910        public StringType getValueStringType() throws FHIRException { 
2911          if (this.value == null)
2912            this.value = new StringType();
2913          if (!(this.value instanceof StringType))
2914            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
2915          return (StringType) this.value;
2916        }
2917
2918        public boolean hasValueStringType() { 
2919          return this != null && this.value instanceof StringType;
2920        }
2921
2922        /**
2923         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2924         */
2925        public TimeType getValueTimeType() throws FHIRException { 
2926          if (this.value == null)
2927            this.value = new TimeType();
2928          if (!(this.value instanceof TimeType))
2929            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2930          return (TimeType) this.value;
2931        }
2932
2933        public boolean hasValueTimeType() { 
2934          return this != null && this.value instanceof TimeType;
2935        }
2936
2937        /**
2938         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2939         */
2940        public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 
2941          if (this.value == null)
2942            this.value = new UnsignedIntType();
2943          if (!(this.value instanceof UnsignedIntType))
2944            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2945          return (UnsignedIntType) this.value;
2946        }
2947
2948        public boolean hasValueUnsignedIntType() { 
2949          return this != null && this.value instanceof UnsignedIntType;
2950        }
2951
2952        /**
2953         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2954         */
2955        public UriType getValueUriType() throws FHIRException { 
2956          if (this.value == null)
2957            this.value = new UriType();
2958          if (!(this.value instanceof UriType))
2959            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
2960          return (UriType) this.value;
2961        }
2962
2963        public boolean hasValueUriType() { 
2964          return this != null && this.value instanceof UriType;
2965        }
2966
2967        /**
2968         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2969         */
2970        public UrlType getValueUrlType() throws FHIRException { 
2971          if (this.value == null)
2972            this.value = new UrlType();
2973          if (!(this.value instanceof UrlType))
2974            throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered");
2975          return (UrlType) this.value;
2976        }
2977
2978        public boolean hasValueUrlType() { 
2979          return this != null && this.value instanceof UrlType;
2980        }
2981
2982        /**
2983         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2984         */
2985        public UuidType getValueUuidType() throws FHIRException { 
2986          if (this.value == null)
2987            this.value = new UuidType();
2988          if (!(this.value instanceof UuidType))
2989            throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered");
2990          return (UuidType) this.value;
2991        }
2992
2993        public boolean hasValueUuidType() { 
2994          return this != null && this.value instanceof UuidType;
2995        }
2996
2997        /**
2998         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2999         */
3000        public Address getValueAddress() throws FHIRException { 
3001          if (this.value == null)
3002            this.value = new Address();
3003          if (!(this.value instanceof Address))
3004            throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered");
3005          return (Address) this.value;
3006        }
3007
3008        public boolean hasValueAddress() { 
3009          return this != null && this.value instanceof Address;
3010        }
3011
3012        /**
3013         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3014         */
3015        public Age getValueAge() throws FHIRException { 
3016          if (this.value == null)
3017            this.value = new Age();
3018          if (!(this.value instanceof Age))
3019            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered");
3020          return (Age) this.value;
3021        }
3022
3023        public boolean hasValueAge() { 
3024          return this != null && this.value instanceof Age;
3025        }
3026
3027        /**
3028         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3029         */
3030        public Annotation getValueAnnotation() throws FHIRException { 
3031          if (this.value == null)
3032            this.value = new Annotation();
3033          if (!(this.value instanceof Annotation))
3034            throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered");
3035          return (Annotation) this.value;
3036        }
3037
3038        public boolean hasValueAnnotation() { 
3039          return this != null && this.value instanceof Annotation;
3040        }
3041
3042        /**
3043         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3044         */
3045        public Attachment getValueAttachment() throws FHIRException { 
3046          if (this.value == null)
3047            this.value = new Attachment();
3048          if (!(this.value instanceof Attachment))
3049            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
3050          return (Attachment) this.value;
3051        }
3052
3053        public boolean hasValueAttachment() { 
3054          return this != null && this.value instanceof Attachment;
3055        }
3056
3057        /**
3058         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3059         */
3060        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
3061          if (this.value == null)
3062            this.value = new CodeableConcept();
3063          if (!(this.value instanceof CodeableConcept))
3064            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
3065          return (CodeableConcept) this.value;
3066        }
3067
3068        public boolean hasValueCodeableConcept() { 
3069          return this != null && this.value instanceof CodeableConcept;
3070        }
3071
3072        /**
3073         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3074         */
3075        public CodeableReference getValueCodeableReference() throws FHIRException { 
3076          if (this.value == null)
3077            this.value = new CodeableReference();
3078          if (!(this.value instanceof CodeableReference))
3079            throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.value.getClass().getName()+" was encountered");
3080          return (CodeableReference) this.value;
3081        }
3082
3083        public boolean hasValueCodeableReference() { 
3084          return this != null && this.value instanceof CodeableReference;
3085        }
3086
3087        /**
3088         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3089         */
3090        public Coding getValueCoding() throws FHIRException { 
3091          if (this.value == null)
3092            this.value = new Coding();
3093          if (!(this.value instanceof Coding))
3094            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
3095          return (Coding) this.value;
3096        }
3097
3098        public boolean hasValueCoding() { 
3099          return this != null && this.value instanceof Coding;
3100        }
3101
3102        /**
3103         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3104         */
3105        public ContactPoint getValueContactPoint() throws FHIRException { 
3106          if (this.value == null)
3107            this.value = new ContactPoint();
3108          if (!(this.value instanceof ContactPoint))
3109            throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered");
3110          return (ContactPoint) this.value;
3111        }
3112
3113        public boolean hasValueContactPoint() { 
3114          return this != null && this.value instanceof ContactPoint;
3115        }
3116
3117        /**
3118         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3119         */
3120        public Count getValueCount() throws FHIRException { 
3121          if (this.value == null)
3122            this.value = new Count();
3123          if (!(this.value instanceof Count))
3124            throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered");
3125          return (Count) this.value;
3126        }
3127
3128        public boolean hasValueCount() { 
3129          return this != null && this.value instanceof Count;
3130        }
3131
3132        /**
3133         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3134         */
3135        public Distance getValueDistance() throws FHIRException { 
3136          if (this.value == null)
3137            this.value = new Distance();
3138          if (!(this.value instanceof Distance))
3139            throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered");
3140          return (Distance) this.value;
3141        }
3142
3143        public boolean hasValueDistance() { 
3144          return this != null && this.value instanceof Distance;
3145        }
3146
3147        /**
3148         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3149         */
3150        public Duration getValueDuration() throws FHIRException { 
3151          if (this.value == null)
3152            this.value = new Duration();
3153          if (!(this.value instanceof Duration))
3154            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered");
3155          return (Duration) this.value;
3156        }
3157
3158        public boolean hasValueDuration() { 
3159          return this != null && this.value instanceof Duration;
3160        }
3161
3162        /**
3163         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3164         */
3165        public HumanName getValueHumanName() throws FHIRException { 
3166          if (this.value == null)
3167            this.value = new HumanName();
3168          if (!(this.value instanceof HumanName))
3169            throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered");
3170          return (HumanName) this.value;
3171        }
3172
3173        public boolean hasValueHumanName() { 
3174          return this != null && this.value instanceof HumanName;
3175        }
3176
3177        /**
3178         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3179         */
3180        public Identifier getValueIdentifier() throws FHIRException { 
3181          if (this.value == null)
3182            this.value = new Identifier();
3183          if (!(this.value instanceof Identifier))
3184            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered");
3185          return (Identifier) this.value;
3186        }
3187
3188        public boolean hasValueIdentifier() { 
3189          return this != null && this.value instanceof Identifier;
3190        }
3191
3192        /**
3193         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3194         */
3195        public Money getValueMoney() throws FHIRException { 
3196          if (this.value == null)
3197            this.value = new Money();
3198          if (!(this.value instanceof Money))
3199            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered");
3200          return (Money) this.value;
3201        }
3202
3203        public boolean hasValueMoney() { 
3204          return this != null && this.value instanceof Money;
3205        }
3206
3207        /**
3208         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3209         */
3210        public Period getValuePeriod() throws FHIRException { 
3211          if (this.value == null)
3212            this.value = new Period();
3213          if (!(this.value instanceof Period))
3214            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
3215          return (Period) this.value;
3216        }
3217
3218        public boolean hasValuePeriod() { 
3219          return this != null && this.value instanceof Period;
3220        }
3221
3222        /**
3223         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3224         */
3225        public Quantity getValueQuantity() throws FHIRException { 
3226          if (this.value == null)
3227            this.value = new Quantity();
3228          if (!(this.value instanceof Quantity))
3229            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
3230          return (Quantity) this.value;
3231        }
3232
3233        public boolean hasValueQuantity() { 
3234          return this != null && this.value instanceof Quantity;
3235        }
3236
3237        /**
3238         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3239         */
3240        public Range getValueRange() throws FHIRException { 
3241          if (this.value == null)
3242            this.value = new Range();
3243          if (!(this.value instanceof Range))
3244            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
3245          return (Range) this.value;
3246        }
3247
3248        public boolean hasValueRange() { 
3249          return this != null && this.value instanceof Range;
3250        }
3251
3252        /**
3253         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3254         */
3255        public Ratio getValueRatio() throws FHIRException { 
3256          if (this.value == null)
3257            this.value = new Ratio();
3258          if (!(this.value instanceof Ratio))
3259            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
3260          return (Ratio) this.value;
3261        }
3262
3263        public boolean hasValueRatio() { 
3264          return this != null && this.value instanceof Ratio;
3265        }
3266
3267        /**
3268         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3269         */
3270        public RatioRange getValueRatioRange() throws FHIRException { 
3271          if (this.value == null)
3272            this.value = new RatioRange();
3273          if (!(this.value instanceof RatioRange))
3274            throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.value.getClass().getName()+" was encountered");
3275          return (RatioRange) this.value;
3276        }
3277
3278        public boolean hasValueRatioRange() { 
3279          return this != null && this.value instanceof RatioRange;
3280        }
3281
3282        /**
3283         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3284         */
3285        public Reference getValueReference() throws FHIRException { 
3286          if (this.value == null)
3287            this.value = new Reference();
3288          if (!(this.value instanceof Reference))
3289            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
3290          return (Reference) this.value;
3291        }
3292
3293        public boolean hasValueReference() { 
3294          return this != null && this.value instanceof Reference;
3295        }
3296
3297        /**
3298         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3299         */
3300        public SampledData getValueSampledData() throws FHIRException { 
3301          if (this.value == null)
3302            this.value = new SampledData();
3303          if (!(this.value instanceof SampledData))
3304            throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
3305          return (SampledData) this.value;
3306        }
3307
3308        public boolean hasValueSampledData() { 
3309          return this != null && this.value instanceof SampledData;
3310        }
3311
3312        /**
3313         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3314         */
3315        public Signature getValueSignature() throws FHIRException { 
3316          if (this.value == null)
3317            this.value = new Signature();
3318          if (!(this.value instanceof Signature))
3319            throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered");
3320          return (Signature) this.value;
3321        }
3322
3323        public boolean hasValueSignature() { 
3324          return this != null && this.value instanceof Signature;
3325        }
3326
3327        /**
3328         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3329         */
3330        public Timing getValueTiming() throws FHIRException { 
3331          if (this.value == null)
3332            this.value = new Timing();
3333          if (!(this.value instanceof Timing))
3334            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered");
3335          return (Timing) this.value;
3336        }
3337
3338        public boolean hasValueTiming() { 
3339          return this != null && this.value instanceof Timing;
3340        }
3341
3342        /**
3343         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3344         */
3345        public ContactDetail getValueContactDetail() throws FHIRException { 
3346          if (this.value == null)
3347            this.value = new ContactDetail();
3348          if (!(this.value instanceof ContactDetail))
3349            throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
3350          return (ContactDetail) this.value;
3351        }
3352
3353        public boolean hasValueContactDetail() { 
3354          return this != null && this.value instanceof ContactDetail;
3355        }
3356
3357        /**
3358         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3359         */
3360        public DataRequirement getValueDataRequirement() throws FHIRException { 
3361          if (this.value == null)
3362            this.value = new DataRequirement();
3363          if (!(this.value instanceof DataRequirement))
3364            throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered");
3365          return (DataRequirement) this.value;
3366        }
3367
3368        public boolean hasValueDataRequirement() { 
3369          return this != null && this.value instanceof DataRequirement;
3370        }
3371
3372        /**
3373         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3374         */
3375        public Expression getValueExpression() throws FHIRException { 
3376          if (this.value == null)
3377            this.value = new Expression();
3378          if (!(this.value instanceof Expression))
3379            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered");
3380          return (Expression) this.value;
3381        }
3382
3383        public boolean hasValueExpression() { 
3384          return this != null && this.value instanceof Expression;
3385        }
3386
3387        /**
3388         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3389         */
3390        public ParameterDefinition getValueParameterDefinition() throws FHIRException { 
3391          if (this.value == null)
3392            this.value = new ParameterDefinition();
3393          if (!(this.value instanceof ParameterDefinition))
3394            throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
3395          return (ParameterDefinition) this.value;
3396        }
3397
3398        public boolean hasValueParameterDefinition() { 
3399          return this != null && this.value instanceof ParameterDefinition;
3400        }
3401
3402        /**
3403         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3404         */
3405        public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 
3406          if (this.value == null)
3407            this.value = new RelatedArtifact();
3408          if (!(this.value instanceof RelatedArtifact))
3409            throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered");
3410          return (RelatedArtifact) this.value;
3411        }
3412
3413        public boolean hasValueRelatedArtifact() { 
3414          return this != null && this.value instanceof RelatedArtifact;
3415        }
3416
3417        /**
3418         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3419         */
3420        public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 
3421          if (this.value == null)
3422            this.value = new TriggerDefinition();
3423          if (!(this.value instanceof TriggerDefinition))
3424            throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
3425          return (TriggerDefinition) this.value;
3426        }
3427
3428        public boolean hasValueTriggerDefinition() { 
3429          return this != null && this.value instanceof TriggerDefinition;
3430        }
3431
3432        /**
3433         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3434         */
3435        public UsageContext getValueUsageContext() throws FHIRException { 
3436          if (this.value == null)
3437            this.value = new UsageContext();
3438          if (!(this.value instanceof UsageContext))
3439            throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered");
3440          return (UsageContext) this.value;
3441        }
3442
3443        public boolean hasValueUsageContext() { 
3444          return this != null && this.value instanceof UsageContext;
3445        }
3446
3447        /**
3448         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3449         */
3450        public Availability getValueAvailability() throws FHIRException { 
3451          if (this.value == null)
3452            this.value = new Availability();
3453          if (!(this.value instanceof Availability))
3454            throw new FHIRException("Type mismatch: the type Availability was expected, but "+this.value.getClass().getName()+" was encountered");
3455          return (Availability) this.value;
3456        }
3457
3458        public boolean hasValueAvailability() { 
3459          return this != null && this.value instanceof Availability;
3460        }
3461
3462        /**
3463         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3464         */
3465        public ExtendedContactDetail getValueExtendedContactDetail() throws FHIRException { 
3466          if (this.value == null)
3467            this.value = new ExtendedContactDetail();
3468          if (!(this.value instanceof ExtendedContactDetail))
3469            throw new FHIRException("Type mismatch: the type ExtendedContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
3470          return (ExtendedContactDetail) this.value;
3471        }
3472
3473        public boolean hasValueExtendedContactDetail() { 
3474          return this != null && this.value instanceof ExtendedContactDetail;
3475        }
3476
3477        /**
3478         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3479         */
3480        public Dosage getValueDosage() throws FHIRException { 
3481          if (this.value == null)
3482            this.value = new Dosage();
3483          if (!(this.value instanceof Dosage))
3484            throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered");
3485          return (Dosage) this.value;
3486        }
3487
3488        public boolean hasValueDosage() { 
3489          return this != null && this.value instanceof Dosage;
3490        }
3491
3492        /**
3493         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3494         */
3495        public Meta getValueMeta() throws FHIRException { 
3496          if (this.value == null)
3497            this.value = new Meta();
3498          if (!(this.value instanceof Meta))
3499            throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered");
3500          return (Meta) this.value;
3501        }
3502
3503        public boolean hasValueMeta() { 
3504          return this != null && this.value instanceof Meta;
3505        }
3506
3507        public boolean hasValue() { 
3508          return this.value != null && !this.value.isEmpty();
3509        }
3510
3511        /**
3512         * @param value {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3513         */
3514        public ElementDefinitionExampleComponent setValue(DataType value) { 
3515          if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof CodeableReference || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof RatioRange || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Availability || value instanceof ExtendedContactDetail || value instanceof Dosage || value instanceof Meta))
3516            throw new FHIRException("Not the right type for ElementDefinition.example.value[x]: "+value.fhirType());
3517          this.value = value;
3518          return this;
3519        }
3520
3521        protected void listChildren(List<Property> children) {
3522          super.listChildren(children);
3523          children.add(new Property("label", "string", "Describes the purpose of this example among the set of examples.", 0, 1, label));
3524          children.add(new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value));
3525        }
3526
3527        @Override
3528        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3529          switch (_hash) {
3530          case 102727412: /*label*/  return new Property("label", "string", "Describes the purpose of this example among the set of examples.", 0, 1, label);
3531          case -1410166417: /*value[x]*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3532          case 111972721: /*value*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3533          case -1535024575: /*valueBase64Binary*/  return new Property("value[x]", "base64Binary", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3534          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3535          case -786218365: /*valueCanonical*/  return new Property("value[x]", "canonical", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3536          case -766209282: /*valueCode*/  return new Property("value[x]", "code", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3537          case -766192449: /*valueDate*/  return new Property("value[x]", "date", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3538          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3539          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "decimal", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3540          case 231604844: /*valueId*/  return new Property("value[x]", "id", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3541          case -1668687056: /*valueInstant*/  return new Property("value[x]", "instant", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3542          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3543          case -1122120181: /*valueInteger64*/  return new Property("value[x]", "integer64", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3544          case -497880704: /*valueMarkdown*/  return new Property("value[x]", "markdown", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3545          case -1410178407: /*valueOid*/  return new Property("value[x]", "oid", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3546          case -1249932027: /*valuePositiveInt*/  return new Property("value[x]", "positiveInt", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3547          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3548          case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3549          case 26529417: /*valueUnsignedInt*/  return new Property("value[x]", "unsignedInt", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3550          case -1410172357: /*valueUri*/  return new Property("value[x]", "uri", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3551          case -1410172354: /*valueUrl*/  return new Property("value[x]", "url", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3552          case -765667124: /*valueUuid*/  return new Property("value[x]", "uuid", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3553          case -478981821: /*valueAddress*/  return new Property("value[x]", "Address", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3554          case -1410191922: /*valueAge*/  return new Property("value[x]", "Age", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3555          case -67108992: /*valueAnnotation*/  return new Property("value[x]", "Annotation", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3556          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3557          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3558          case -257955629: /*valueCodeableReference*/  return new Property("value[x]", "CodeableReference", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3559          case -1887705029: /*valueCoding*/  return new Property("value[x]", "Coding", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3560          case 944904545: /*valueContactPoint*/  return new Property("value[x]", "ContactPoint", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3561          case 2017332766: /*valueCount*/  return new Property("value[x]", "Count", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3562          case -456359802: /*valueDistance*/  return new Property("value[x]", "Distance", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3563          case 1558135333: /*valueDuration*/  return new Property("value[x]", "Duration", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3564          case -2026205465: /*valueHumanName*/  return new Property("value[x]", "HumanName", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3565          case -130498310: /*valueIdentifier*/  return new Property("value[x]", "Identifier", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3566          case 2026560975: /*valueMoney*/  return new Property("value[x]", "Money", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3567          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3568          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3569          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3570          case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3571          case -706454461: /*valueRatioRange*/  return new Property("value[x]", "RatioRange", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3572          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3573          case -962229101: /*valueSampledData*/  return new Property("value[x]", "SampledData", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3574          case -540985785: /*valueSignature*/  return new Property("value[x]", "Signature", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3575          case -1406282469: /*valueTiming*/  return new Property("value[x]", "Timing", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3576          case -1125200224: /*valueContactDetail*/  return new Property("value[x]", "ContactDetail", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3577          case 1710554248: /*valueDataRequirement*/  return new Property("value[x]", "DataRequirement", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3578          case -307517719: /*valueExpression*/  return new Property("value[x]", "Expression", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3579          case 1387478187: /*valueParameterDefinition*/  return new Property("value[x]", "ParameterDefinition", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3580          case 1748214124: /*valueRelatedArtifact*/  return new Property("value[x]", "RelatedArtifact", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3581          case 976830394: /*valueTriggerDefinition*/  return new Property("value[x]", "TriggerDefinition", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3582          case 588000479: /*valueUsageContext*/  return new Property("value[x]", "UsageContext", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3583          case 1678530924: /*valueAvailability*/  return new Property("value[x]", "Availability", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3584          case -1567222041: /*valueExtendedContactDetail*/  return new Property("value[x]", "ExtendedContactDetail", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3585          case -1858636920: /*valueDosage*/  return new Property("value[x]", "Dosage", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3586          case -765920490: /*valueMeta*/  return new Property("value[x]", "Meta", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3587          default: return super.getNamedProperty(_hash, _name, _checkValid);
3588          }
3589
3590        }
3591
3592      @Override
3593      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3594        switch (hash) {
3595        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
3596        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
3597        default: return super.getProperty(hash, name, checkValid);
3598        }
3599
3600      }
3601
3602      @Override
3603      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3604        switch (hash) {
3605        case 102727412: // label
3606          this.label = TypeConvertor.castToString(value); // StringType
3607          return value;
3608        case 111972721: // value
3609          this.value = TypeConvertor.castToType(value); // DataType
3610          return value;
3611        default: return super.setProperty(hash, name, value);
3612        }
3613
3614      }
3615
3616      @Override
3617      public Base setProperty(String name, Base value) throws FHIRException {
3618        if (name.equals("label")) {
3619          this.label = TypeConvertor.castToString(value); // StringType
3620        } else if (name.equals("value[x]")) {
3621          this.value = TypeConvertor.castToType(value); // DataType
3622        } else
3623          return super.setProperty(name, value);
3624        return value;
3625      }
3626
3627      @Override
3628      public Base makeProperty(int hash, String name) throws FHIRException {
3629        switch (hash) {
3630        case 102727412:  return getLabelElement();
3631        case -1410166417:  return getValue();
3632        case 111972721:  return getValue();
3633        default: return super.makeProperty(hash, name);
3634        }
3635
3636      }
3637
3638      @Override
3639      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3640        switch (hash) {
3641        case 102727412: /*label*/ return new String[] {"string"};
3642        case 111972721: /*value*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "CodeableReference", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "RatioRange", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Availability", "ExtendedContactDetail", "Dosage", "Meta"};
3643        default: return super.getTypesForProperty(hash, name);
3644        }
3645
3646      }
3647
3648      @Override
3649      public Base addChild(String name) throws FHIRException {
3650        if (name.equals("label")) {
3651          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.example.label");
3652        }
3653        else if (name.equals("valueBase64Binary")) {
3654          this.value = new Base64BinaryType();
3655          return this.value;
3656        }
3657        else if (name.equals("valueBoolean")) {
3658          this.value = new BooleanType();
3659          return this.value;
3660        }
3661        else if (name.equals("valueCanonical")) {
3662          this.value = new CanonicalType();
3663          return this.value;
3664        }
3665        else if (name.equals("valueCode")) {
3666          this.value = new CodeType();
3667          return this.value;
3668        }
3669        else if (name.equals("valueDate")) {
3670          this.value = new DateType();
3671          return this.value;
3672        }
3673        else if (name.equals("valueDateTime")) {
3674          this.value = new DateTimeType();
3675          return this.value;
3676        }
3677        else if (name.equals("valueDecimal")) {
3678          this.value = new DecimalType();
3679          return this.value;
3680        }
3681        else if (name.equals("valueId")) {
3682          this.value = new IdType();
3683          return this.value;
3684        }
3685        else if (name.equals("valueInstant")) {
3686          this.value = new InstantType();
3687          return this.value;
3688        }
3689        else if (name.equals("valueInteger")) {
3690          this.value = new IntegerType();
3691          return this.value;
3692        }
3693        else if (name.equals("valueInteger64")) {
3694          this.value = new Integer64Type();
3695          return this.value;
3696        }
3697        else if (name.equals("valueMarkdown")) {
3698          this.value = new MarkdownType();
3699          return this.value;
3700        }
3701        else if (name.equals("valueOid")) {
3702          this.value = new OidType();
3703          return this.value;
3704        }
3705        else if (name.equals("valuePositiveInt")) {
3706          this.value = new PositiveIntType();
3707          return this.value;
3708        }
3709        else if (name.equals("valueString")) {
3710          this.value = new StringType();
3711          return this.value;
3712        }
3713        else if (name.equals("valueTime")) {
3714          this.value = new TimeType();
3715          return this.value;
3716        }
3717        else if (name.equals("valueUnsignedInt")) {
3718          this.value = new UnsignedIntType();
3719          return this.value;
3720        }
3721        else if (name.equals("valueUri")) {
3722          this.value = new UriType();
3723          return this.value;
3724        }
3725        else if (name.equals("valueUrl")) {
3726          this.value = new UrlType();
3727          return this.value;
3728        }
3729        else if (name.equals("valueUuid")) {
3730          this.value = new UuidType();
3731          return this.value;
3732        }
3733        else if (name.equals("valueAddress")) {
3734          this.value = new Address();
3735          return this.value;
3736        }
3737        else if (name.equals("valueAge")) {
3738          this.value = new Age();
3739          return this.value;
3740        }
3741        else if (name.equals("valueAnnotation")) {
3742          this.value = new Annotation();
3743          return this.value;
3744        }
3745        else if (name.equals("valueAttachment")) {
3746          this.value = new Attachment();
3747          return this.value;
3748        }
3749        else if (name.equals("valueCodeableConcept")) {
3750          this.value = new CodeableConcept();
3751          return this.value;
3752        }
3753        else if (name.equals("valueCodeableReference")) {
3754          this.value = new CodeableReference();
3755          return this.value;
3756        }
3757        else if (name.equals("valueCoding")) {
3758          this.value = new Coding();
3759          return this.value;
3760        }
3761        else if (name.equals("valueContactPoint")) {
3762          this.value = new ContactPoint();
3763          return this.value;
3764        }
3765        else if (name.equals("valueCount")) {
3766          this.value = new Count();
3767          return this.value;
3768        }
3769        else if (name.equals("valueDistance")) {
3770          this.value = new Distance();
3771          return this.value;
3772        }
3773        else if (name.equals("valueDuration")) {
3774          this.value = new Duration();
3775          return this.value;
3776        }
3777        else if (name.equals("valueHumanName")) {
3778          this.value = new HumanName();
3779          return this.value;
3780        }
3781        else if (name.equals("valueIdentifier")) {
3782          this.value = new Identifier();
3783          return this.value;
3784        }
3785        else if (name.equals("valueMoney")) {
3786          this.value = new Money();
3787          return this.value;
3788        }
3789        else if (name.equals("valuePeriod")) {
3790          this.value = new Period();
3791          return this.value;
3792        }
3793        else if (name.equals("valueQuantity")) {
3794          this.value = new Quantity();
3795          return this.value;
3796        }
3797        else if (name.equals("valueRange")) {
3798          this.value = new Range();
3799          return this.value;
3800        }
3801        else if (name.equals("valueRatio")) {
3802          this.value = new Ratio();
3803          return this.value;
3804        }
3805        else if (name.equals("valueRatioRange")) {
3806          this.value = new RatioRange();
3807          return this.value;
3808        }
3809        else if (name.equals("valueReference")) {
3810          this.value = new Reference();
3811          return this.value;
3812        }
3813        else if (name.equals("valueSampledData")) {
3814          this.value = new SampledData();
3815          return this.value;
3816        }
3817        else if (name.equals("valueSignature")) {
3818          this.value = new Signature();
3819          return this.value;
3820        }
3821        else if (name.equals("valueTiming")) {
3822          this.value = new Timing();
3823          return this.value;
3824        }
3825        else if (name.equals("valueContactDetail")) {
3826          this.value = new ContactDetail();
3827          return this.value;
3828        }
3829        else if (name.equals("valueDataRequirement")) {
3830          this.value = new DataRequirement();
3831          return this.value;
3832        }
3833        else if (name.equals("valueExpression")) {
3834          this.value = new Expression();
3835          return this.value;
3836        }
3837        else if (name.equals("valueParameterDefinition")) {
3838          this.value = new ParameterDefinition();
3839          return this.value;
3840        }
3841        else if (name.equals("valueRelatedArtifact")) {
3842          this.value = new RelatedArtifact();
3843          return this.value;
3844        }
3845        else if (name.equals("valueTriggerDefinition")) {
3846          this.value = new TriggerDefinition();
3847          return this.value;
3848        }
3849        else if (name.equals("valueUsageContext")) {
3850          this.value = new UsageContext();
3851          return this.value;
3852        }
3853        else if (name.equals("valueAvailability")) {
3854          this.value = new Availability();
3855          return this.value;
3856        }
3857        else if (name.equals("valueExtendedContactDetail")) {
3858          this.value = new ExtendedContactDetail();
3859          return this.value;
3860        }
3861        else if (name.equals("valueDosage")) {
3862          this.value = new Dosage();
3863          return this.value;
3864        }
3865        else if (name.equals("valueMeta")) {
3866          this.value = new Meta();
3867          return this.value;
3868        }
3869        else
3870          return super.addChild(name);
3871      }
3872
3873      public ElementDefinitionExampleComponent copy() {
3874        ElementDefinitionExampleComponent dst = new ElementDefinitionExampleComponent();
3875        copyValues(dst);
3876        return dst;
3877      }
3878
3879      public void copyValues(ElementDefinitionExampleComponent dst) {
3880        super.copyValues(dst);
3881        dst.label = label == null ? null : label.copy();
3882        dst.value = value == null ? null : value.copy();
3883      }
3884
3885      @Override
3886      public boolean equalsDeep(Base other_) {
3887        if (!super.equalsDeep(other_))
3888          return false;
3889        if (!(other_ instanceof ElementDefinitionExampleComponent))
3890          return false;
3891        ElementDefinitionExampleComponent o = (ElementDefinitionExampleComponent) other_;
3892        return compareDeep(label, o.label, true) && compareDeep(value, o.value, true);
3893      }
3894
3895      @Override
3896      public boolean equalsShallow(Base other_) {
3897        if (!super.equalsShallow(other_))
3898          return false;
3899        if (!(other_ instanceof ElementDefinitionExampleComponent))
3900          return false;
3901        ElementDefinitionExampleComponent o = (ElementDefinitionExampleComponent) other_;
3902        return compareValues(label, o.label, true);
3903      }
3904
3905      public boolean isEmpty() {
3906        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, value);
3907      }
3908
3909  public String fhirType() {
3910    return "ElementDefinition.example";
3911
3912  }
3913
3914  }
3915
3916    @Block()
3917    public static class ElementDefinitionConstraintComponent extends Element implements IBaseDatatypeElement {
3918        /**
3919         * Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.
3920         */
3921        @Child(name = "key", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true)
3922        @Description(shortDefinition="Target of 'condition' reference above", formalDefinition="Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality." )
3923        protected IdType key;
3924
3925        /**
3926         * Description of why this constraint is necessary or appropriate.
3927         */
3928        @Child(name = "requirements", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=true)
3929        @Description(shortDefinition="Why this constraint is necessary or appropriate", formalDefinition="Description of why this constraint is necessary or appropriate." )
3930        protected MarkdownType requirements;
3931
3932        /**
3933         * Identifies the impact constraint violation has on the conformance of the instance.
3934         */
3935        @Child(name = "severity", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true)
3936        @Description(shortDefinition="error | warning", formalDefinition="Identifies the impact constraint violation has on the conformance of the instance." )
3937        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/constraint-severity")
3938        protected Enumeration<ConstraintSeverity> severity;
3939
3940        /**
3941         * If true, indicates that the warning or best practice guideline should be suppressed.
3942         */
3943        @Child(name = "suppress", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true)
3944        @Description(shortDefinition="Suppress warning or hint in profile", formalDefinition="If true, indicates that the warning or best practice guideline should be suppressed." )
3945        protected BooleanType suppress;
3946
3947        /**
3948         * Text that can be used to describe the constraint in messages identifying that the constraint has been violated.
3949         */
3950        @Child(name = "human", type = {StringType.class}, order=5, min=1, max=1, modifier=false, summary=true)
3951        @Description(shortDefinition="Human description of constraint", formalDefinition="Text that can be used to describe the constraint in messages identifying that the constraint has been violated." )
3952        protected StringType human;
3953
3954        /**
3955         * A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.
3956         */
3957        @Child(name = "expression", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true)
3958        @Description(shortDefinition="FHIRPath expression of constraint", formalDefinition="A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met." )
3959        protected StringType expression;
3960
3961        /**
3962         * A reference to the original source of the constraint, for traceability purposes.
3963         */
3964        @Child(name = "source", type = {CanonicalType.class}, order=7, min=0, max=1, modifier=false, summary=true)
3965        @Description(shortDefinition="Reference to original source of constraint", formalDefinition="A reference to the original source of the constraint, for traceability purposes." )
3966        protected CanonicalType source;
3967
3968        private static final long serialVersionUID = 1642607838L;
3969
3970    /**
3971     * Constructor
3972     */
3973      public ElementDefinitionConstraintComponent() {
3974        super();
3975      }
3976
3977    /**
3978     * Constructor
3979     */
3980      public ElementDefinitionConstraintComponent(String key, ConstraintSeverity severity, String human) {
3981        super();
3982        this.setKey(key);
3983        this.setSeverity(severity);
3984        this.setHuman(human);
3985      }
3986
3987        /**
3988         * @return {@link #key} (Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.). This is the underlying object with id, value and extensions. The accessor "getKey" gives direct access to the value
3989         */
3990        public IdType getKeyElement() { 
3991          if (this.key == null)
3992            if (Configuration.errorOnAutoCreate())
3993              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.key");
3994            else if (Configuration.doAutoCreate())
3995              this.key = new IdType(); // bb
3996          return this.key;
3997        }
3998
3999        public boolean hasKeyElement() { 
4000          return this.key != null && !this.key.isEmpty();
4001        }
4002
4003        public boolean hasKey() { 
4004          return this.key != null && !this.key.isEmpty();
4005        }
4006
4007        /**
4008         * @param value {@link #key} (Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.). This is the underlying object with id, value and extensions. The accessor "getKey" gives direct access to the value
4009         */
4010        public ElementDefinitionConstraintComponent setKeyElement(IdType value) { 
4011          this.key = value;
4012          return this;
4013        }
4014
4015        /**
4016         * @return Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.
4017         */
4018        public String getKey() { 
4019          return this.key == null ? null : this.key.getValue();
4020        }
4021
4022        /**
4023         * @param value Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.
4024         */
4025        public ElementDefinitionConstraintComponent setKey(String value) { 
4026            if (this.key == null)
4027              this.key = new IdType();
4028            this.key.setValue(value);
4029          return this;
4030        }
4031
4032        /**
4033         * @return {@link #requirements} (Description of why this constraint is necessary or appropriate.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value
4034         */
4035        public MarkdownType getRequirementsElement() { 
4036          if (this.requirements == null)
4037            if (Configuration.errorOnAutoCreate())
4038              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.requirements");
4039            else if (Configuration.doAutoCreate())
4040              this.requirements = new MarkdownType(); // bb
4041          return this.requirements;
4042        }
4043
4044        public boolean hasRequirementsElement() { 
4045          return this.requirements != null && !this.requirements.isEmpty();
4046        }
4047
4048        public boolean hasRequirements() { 
4049          return this.requirements != null && !this.requirements.isEmpty();
4050        }
4051
4052        /**
4053         * @param value {@link #requirements} (Description of why this constraint is necessary or appropriate.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value
4054         */
4055        public ElementDefinitionConstraintComponent setRequirementsElement(MarkdownType value) { 
4056          this.requirements = value;
4057          return this;
4058        }
4059
4060        /**
4061         * @return Description of why this constraint is necessary or appropriate.
4062         */
4063        public String getRequirements() { 
4064          return this.requirements == null ? null : this.requirements.getValue();
4065        }
4066
4067        /**
4068         * @param value Description of why this constraint is necessary or appropriate.
4069         */
4070        public ElementDefinitionConstraintComponent setRequirements(String value) { 
4071          if (Utilities.noString(value))
4072            this.requirements = null;
4073          else {
4074            if (this.requirements == null)
4075              this.requirements = new MarkdownType();
4076            this.requirements.setValue(value);
4077          }
4078          return this;
4079        }
4080
4081        /**
4082         * @return {@link #severity} (Identifies the impact constraint violation has on the conformance of the instance.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value
4083         */
4084        public Enumeration<ConstraintSeverity> getSeverityElement() { 
4085          if (this.severity == null)
4086            if (Configuration.errorOnAutoCreate())
4087              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.severity");
4088            else if (Configuration.doAutoCreate())
4089              this.severity = new Enumeration<ConstraintSeverity>(new ConstraintSeverityEnumFactory()); // bb
4090          return this.severity;
4091        }
4092
4093        public boolean hasSeverityElement() { 
4094          return this.severity != null && !this.severity.isEmpty();
4095        }
4096
4097        public boolean hasSeverity() { 
4098          return this.severity != null && !this.severity.isEmpty();
4099        }
4100
4101        /**
4102         * @param value {@link #severity} (Identifies the impact constraint violation has on the conformance of the instance.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value
4103         */
4104        public ElementDefinitionConstraintComponent setSeverityElement(Enumeration<ConstraintSeverity> value) { 
4105          this.severity = value;
4106          return this;
4107        }
4108
4109        /**
4110         * @return Identifies the impact constraint violation has on the conformance of the instance.
4111         */
4112        public ConstraintSeverity getSeverity() { 
4113          return this.severity == null ? null : this.severity.getValue();
4114        }
4115
4116        /**
4117         * @param value Identifies the impact constraint violation has on the conformance of the instance.
4118         */
4119        public ElementDefinitionConstraintComponent setSeverity(ConstraintSeverity value) { 
4120            if (this.severity == null)
4121              this.severity = new Enumeration<ConstraintSeverity>(new ConstraintSeverityEnumFactory());
4122            this.severity.setValue(value);
4123          return this;
4124        }
4125
4126        /**
4127         * @return {@link #suppress} (If true, indicates that the warning or best practice guideline should be suppressed.). This is the underlying object with id, value and extensions. The accessor "getSuppress" gives direct access to the value
4128         */
4129        public BooleanType getSuppressElement() { 
4130          if (this.suppress == null)
4131            if (Configuration.errorOnAutoCreate())
4132              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.suppress");
4133            else if (Configuration.doAutoCreate())
4134              this.suppress = new BooleanType(); // bb
4135          return this.suppress;
4136        }
4137
4138        public boolean hasSuppressElement() { 
4139          return this.suppress != null && !this.suppress.isEmpty();
4140        }
4141
4142        public boolean hasSuppress() { 
4143          return this.suppress != null && !this.suppress.isEmpty();
4144        }
4145
4146        /**
4147         * @param value {@link #suppress} (If true, indicates that the warning or best practice guideline should be suppressed.). This is the underlying object with id, value and extensions. The accessor "getSuppress" gives direct access to the value
4148         */
4149        public ElementDefinitionConstraintComponent setSuppressElement(BooleanType value) { 
4150          this.suppress = value;
4151          return this;
4152        }
4153
4154        /**
4155         * @return If true, indicates that the warning or best practice guideline should be suppressed.
4156         */
4157        public boolean getSuppress() { 
4158          return this.suppress == null || this.suppress.isEmpty() ? false : this.suppress.getValue();
4159        }
4160
4161        /**
4162         * @param value If true, indicates that the warning or best practice guideline should be suppressed.
4163         */
4164        public ElementDefinitionConstraintComponent setSuppress(boolean value) { 
4165            if (this.suppress == null)
4166              this.suppress = new BooleanType();
4167            this.suppress.setValue(value);
4168          return this;
4169        }
4170
4171        /**
4172         * @return {@link #human} (Text that can be used to describe the constraint in messages identifying that the constraint has been violated.). This is the underlying object with id, value and extensions. The accessor "getHuman" gives direct access to the value
4173         */
4174        public StringType getHumanElement() { 
4175          if (this.human == null)
4176            if (Configuration.errorOnAutoCreate())
4177              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.human");
4178            else if (Configuration.doAutoCreate())
4179              this.human = new StringType(); // bb
4180          return this.human;
4181        }
4182
4183        public boolean hasHumanElement() { 
4184          return this.human != null && !this.human.isEmpty();
4185        }
4186
4187        public boolean hasHuman() { 
4188          return this.human != null && !this.human.isEmpty();
4189        }
4190
4191        /**
4192         * @param value {@link #human} (Text that can be used to describe the constraint in messages identifying that the constraint has been violated.). This is the underlying object with id, value and extensions. The accessor "getHuman" gives direct access to the value
4193         */
4194        public ElementDefinitionConstraintComponent setHumanElement(StringType value) { 
4195          this.human = value;
4196          return this;
4197        }
4198
4199        /**
4200         * @return Text that can be used to describe the constraint in messages identifying that the constraint has been violated.
4201         */
4202        public String getHuman() { 
4203          return this.human == null ? null : this.human.getValue();
4204        }
4205
4206        /**
4207         * @param value Text that can be used to describe the constraint in messages identifying that the constraint has been violated.
4208         */
4209        public ElementDefinitionConstraintComponent setHuman(String value) { 
4210            if (this.human == null)
4211              this.human = new StringType();
4212            this.human.setValue(value);
4213          return this;
4214        }
4215
4216        /**
4217         * @return {@link #expression} (A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
4218         */
4219        public StringType getExpressionElement() { 
4220          if (this.expression == null)
4221            if (Configuration.errorOnAutoCreate())
4222              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.expression");
4223            else if (Configuration.doAutoCreate())
4224              this.expression = new StringType(); // bb
4225          return this.expression;
4226        }
4227
4228        public boolean hasExpressionElement() { 
4229          return this.expression != null && !this.expression.isEmpty();
4230        }
4231
4232        public boolean hasExpression() { 
4233          return this.expression != null && !this.expression.isEmpty();
4234        }
4235
4236        /**
4237         * @param value {@link #expression} (A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
4238         */
4239        public ElementDefinitionConstraintComponent setExpressionElement(StringType value) { 
4240          this.expression = value;
4241          return this;
4242        }
4243
4244        /**
4245         * @return A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.
4246         */
4247        public String getExpression() { 
4248          return this.expression == null ? null : this.expression.getValue();
4249        }
4250
4251        /**
4252         * @param value A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.
4253         */
4254        public ElementDefinitionConstraintComponent setExpression(String value) { 
4255          if (Utilities.noString(value))
4256            this.expression = null;
4257          else {
4258            if (this.expression == null)
4259              this.expression = new StringType();
4260            this.expression.setValue(value);
4261          }
4262          return this;
4263        }
4264
4265        /**
4266         * @return {@link #source} (A reference to the original source of the constraint, for traceability purposes.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
4267         */
4268        public CanonicalType getSourceElement() { 
4269          if (this.source == null)
4270            if (Configuration.errorOnAutoCreate())
4271              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.source");
4272            else if (Configuration.doAutoCreate())
4273              this.source = new CanonicalType(); // bb
4274          return this.source;
4275        }
4276
4277        public boolean hasSourceElement() { 
4278          return this.source != null && !this.source.isEmpty();
4279        }
4280
4281        public boolean hasSource() { 
4282          return this.source != null && !this.source.isEmpty();
4283        }
4284
4285        /**
4286         * @param value {@link #source} (A reference to the original source of the constraint, for traceability purposes.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
4287         */
4288        public ElementDefinitionConstraintComponent setSourceElement(CanonicalType value) { 
4289          this.source = value;
4290          return this;
4291        }
4292
4293        /**
4294         * @return A reference to the original source of the constraint, for traceability purposes.
4295         */
4296        public String getSource() { 
4297          return this.source == null ? null : this.source.getValue();
4298        }
4299
4300        /**
4301         * @param value A reference to the original source of the constraint, for traceability purposes.
4302         */
4303        public ElementDefinitionConstraintComponent setSource(String value) { 
4304          if (Utilities.noString(value))
4305            this.source = null;
4306          else {
4307            if (this.source == null)
4308              this.source = new CanonicalType();
4309            this.source.setValue(value);
4310          }
4311          return this;
4312        }
4313
4314        protected void listChildren(List<Property> children) {
4315          super.listChildren(children);
4316          children.add(new Property("key", "id", "Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.", 0, 1, key));
4317          children.add(new Property("requirements", "markdown", "Description of why this constraint is necessary or appropriate.", 0, 1, requirements));
4318          children.add(new Property("severity", "code", "Identifies the impact constraint violation has on the conformance of the instance.", 0, 1, severity));
4319          children.add(new Property("suppress", "boolean", "If true, indicates that the warning or best practice guideline should be suppressed.", 0, 1, suppress));
4320          children.add(new Property("human", "string", "Text that can be used to describe the constraint in messages identifying that the constraint has been violated.", 0, 1, human));
4321          children.add(new Property("expression", "string", "A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.", 0, 1, expression));
4322          children.add(new Property("source", "canonical(StructureDefinition)", "A reference to the original source of the constraint, for traceability purposes.", 0, 1, source));
4323        }
4324
4325        @Override
4326        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4327          switch (_hash) {
4328          case 106079: /*key*/  return new Property("key", "id", "Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.", 0, 1, key);
4329          case -1619874672: /*requirements*/  return new Property("requirements", "markdown", "Description of why this constraint is necessary or appropriate.", 0, 1, requirements);
4330          case 1478300413: /*severity*/  return new Property("severity", "code", "Identifies the impact constraint violation has on the conformance of the instance.", 0, 1, severity);
4331          case -1663129931: /*suppress*/  return new Property("suppress", "boolean", "If true, indicates that the warning or best practice guideline should be suppressed.", 0, 1, suppress);
4332          case 99639597: /*human*/  return new Property("human", "string", "Text that can be used to describe the constraint in messages identifying that the constraint has been violated.", 0, 1, human);
4333          case -1795452264: /*expression*/  return new Property("expression", "string", "A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.", 0, 1, expression);
4334          case -896505829: /*source*/  return new Property("source", "canonical(StructureDefinition)", "A reference to the original source of the constraint, for traceability purposes.", 0, 1, source);
4335          default: return super.getNamedProperty(_hash, _name, _checkValid);
4336          }
4337
4338        }
4339
4340      @Override
4341      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4342        switch (hash) {
4343        case 106079: /*key*/ return this.key == null ? new Base[0] : new Base[] {this.key}; // IdType
4344        case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // MarkdownType
4345        case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // Enumeration<ConstraintSeverity>
4346        case -1663129931: /*suppress*/ return this.suppress == null ? new Base[0] : new Base[] {this.suppress}; // BooleanType
4347        case 99639597: /*human*/ return this.human == null ? new Base[0] : new Base[] {this.human}; // StringType
4348        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
4349        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // CanonicalType
4350        default: return super.getProperty(hash, name, checkValid);
4351        }
4352
4353      }
4354
4355      @Override
4356      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4357        switch (hash) {
4358        case 106079: // key
4359          this.key = TypeConvertor.castToId(value); // IdType
4360          return value;
4361        case -1619874672: // requirements
4362          this.requirements = TypeConvertor.castToMarkdown(value); // MarkdownType
4363          return value;
4364        case 1478300413: // severity
4365          value = new ConstraintSeverityEnumFactory().fromType(TypeConvertor.castToCode(value));
4366          this.severity = (Enumeration) value; // Enumeration<ConstraintSeverity>
4367          return value;
4368        case -1663129931: // suppress
4369          this.suppress = TypeConvertor.castToBoolean(value); // BooleanType
4370          return value;
4371        case 99639597: // human
4372          this.human = TypeConvertor.castToString(value); // StringType
4373          return value;
4374        case -1795452264: // expression
4375          this.expression = TypeConvertor.castToString(value); // StringType
4376          return value;
4377        case -896505829: // source
4378          this.source = TypeConvertor.castToCanonical(value); // CanonicalType
4379          return value;
4380        default: return super.setProperty(hash, name, value);
4381        }
4382
4383      }
4384
4385      @Override
4386      public Base setProperty(String name, Base value) throws FHIRException {
4387        if (name.equals("key")) {
4388          this.key = TypeConvertor.castToId(value); // IdType
4389        } else if (name.equals("requirements")) {
4390          this.requirements = TypeConvertor.castToMarkdown(value); // MarkdownType
4391        } else if (name.equals("severity")) {
4392          value = new ConstraintSeverityEnumFactory().fromType(TypeConvertor.castToCode(value));
4393          this.severity = (Enumeration) value; // Enumeration<ConstraintSeverity>
4394        } else if (name.equals("suppress")) {
4395          this.suppress = TypeConvertor.castToBoolean(value); // BooleanType
4396        } else if (name.equals("human")) {
4397          this.human = TypeConvertor.castToString(value); // StringType
4398        } else if (name.equals("expression")) {
4399          this.expression = TypeConvertor.castToString(value); // StringType
4400        } else if (name.equals("source")) {
4401          this.source = TypeConvertor.castToCanonical(value); // CanonicalType
4402        } else
4403          return super.setProperty(name, value);
4404        return value;
4405      }
4406
4407      @Override
4408      public Base makeProperty(int hash, String name) throws FHIRException {
4409        switch (hash) {
4410        case 106079:  return getKeyElement();
4411        case -1619874672:  return getRequirementsElement();
4412        case 1478300413:  return getSeverityElement();
4413        case -1663129931:  return getSuppressElement();
4414        case 99639597:  return getHumanElement();
4415        case -1795452264:  return getExpressionElement();
4416        case -896505829:  return getSourceElement();
4417        default: return super.makeProperty(hash, name);
4418        }
4419
4420      }
4421
4422      @Override
4423      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4424        switch (hash) {
4425        case 106079: /*key*/ return new String[] {"id"};
4426        case -1619874672: /*requirements*/ return new String[] {"markdown"};
4427        case 1478300413: /*severity*/ return new String[] {"code"};
4428        case -1663129931: /*suppress*/ return new String[] {"boolean"};
4429        case 99639597: /*human*/ return new String[] {"string"};
4430        case -1795452264: /*expression*/ return new String[] {"string"};
4431        case -896505829: /*source*/ return new String[] {"canonical"};
4432        default: return super.getTypesForProperty(hash, name);
4433        }
4434
4435      }
4436
4437      @Override
4438      public Base addChild(String name) throws FHIRException {
4439        if (name.equals("key")) {
4440          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.constraint.key");
4441        }
4442        else if (name.equals("requirements")) {
4443          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.constraint.requirements");
4444        }
4445        else if (name.equals("severity")) {
4446          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.constraint.severity");
4447        }
4448        else if (name.equals("suppress")) {
4449          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.constraint.suppress");
4450        }
4451        else if (name.equals("human")) {
4452          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.constraint.human");
4453        }
4454        else if (name.equals("expression")) {
4455          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.constraint.expression");
4456        }
4457        else if (name.equals("source")) {
4458          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.constraint.source");
4459        }
4460        else
4461          return super.addChild(name);
4462      }
4463
4464      public ElementDefinitionConstraintComponent copy() {
4465        ElementDefinitionConstraintComponent dst = new ElementDefinitionConstraintComponent();
4466        copyValues(dst);
4467        return dst;
4468      }
4469
4470      public void copyValues(ElementDefinitionConstraintComponent dst) {
4471        super.copyValues(dst);
4472        dst.key = key == null ? null : key.copy();
4473        dst.requirements = requirements == null ? null : requirements.copy();
4474        dst.severity = severity == null ? null : severity.copy();
4475        dst.suppress = suppress == null ? null : suppress.copy();
4476        dst.human = human == null ? null : human.copy();
4477        dst.expression = expression == null ? null : expression.copy();
4478        dst.source = source == null ? null : source.copy();
4479      }
4480
4481      @Override
4482      public boolean equalsDeep(Base other_) {
4483        if (!super.equalsDeep(other_))
4484          return false;
4485        if (!(other_ instanceof ElementDefinitionConstraintComponent))
4486          return false;
4487        ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other_;
4488        return compareDeep(key, o.key, true) && compareDeep(requirements, o.requirements, true) && compareDeep(severity, o.severity, true)
4489           && compareDeep(suppress, o.suppress, true) && compareDeep(human, o.human, true) && compareDeep(expression, o.expression, true)
4490           && compareDeep(source, o.source, true);
4491      }
4492
4493      @Override
4494      public boolean equalsShallow(Base other_) {
4495        if (!super.equalsShallow(other_))
4496          return false;
4497        if (!(other_ instanceof ElementDefinitionConstraintComponent))
4498          return false;
4499        ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other_;
4500        return compareValues(key, o.key, true) && compareValues(requirements, o.requirements, true) && compareValues(severity, o.severity, true)
4501           && compareValues(suppress, o.suppress, true) && compareValues(human, o.human, true) && compareValues(expression, o.expression, true)
4502           && compareValues(source, o.source, true);
4503      }
4504
4505      public boolean isEmpty() {
4506        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(key, requirements, severity
4507          , suppress, human, expression, source);
4508      }
4509
4510  public String fhirType() {
4511    return "ElementDefinition.constraint";
4512
4513  }
4514
4515  }
4516
4517    @Block()
4518    public static class ElementDefinitionBindingComponent extends Element implements IBaseDatatypeElement {
4519        /**
4520         * Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.
4521         */
4522        @Child(name = "strength", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
4523        @Description(shortDefinition="required | extensible | preferred | example", formalDefinition="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances." )
4524        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/binding-strength")
4525        protected Enumeration<BindingStrength> strength;
4526
4527        /**
4528         * Describes the intended use of this particular set of codes.
4529         */
4530        @Child(name = "description", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=true)
4531        @Description(shortDefinition="Intended use of codes in the bound value set", formalDefinition="Describes the intended use of this particular set of codes." )
4532        protected MarkdownType description;
4533
4534        /**
4535         * Refers to the value set that identifies the set of codes the binding refers to.
4536         */
4537        @Child(name = "valueSet", type = {CanonicalType.class}, order=3, min=0, max=1, modifier=false, summary=true)
4538        @Description(shortDefinition="Source of value set", formalDefinition="Refers to the value set that identifies the set of codes the binding refers to." )
4539        protected CanonicalType valueSet;
4540
4541        /**
4542         * Additional bindings that help applications implementing this element. Additional bindings do not replace the main binding but provide more information and/or context.
4543         */
4544        @Child(name = "additional", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4545        @Description(shortDefinition="Additional Bindings - more rules about the binding", formalDefinition="Additional bindings that help applications implementing this element. Additional bindings do not replace the main binding but provide more information and/or context." )
4546        protected List<ElementDefinitionBindingAdditionalComponent> additional;
4547
4548        private static final long serialVersionUID = 16276611L;
4549
4550    /**
4551     * Constructor
4552     */
4553      public ElementDefinitionBindingComponent() {
4554        super();
4555      }
4556
4557    /**
4558     * Constructor
4559     */
4560      public ElementDefinitionBindingComponent(BindingStrength strength) {
4561        super();
4562        this.setStrength(strength);
4563      }
4564
4565        /**
4566         * @return {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value
4567         */
4568        public Enumeration<BindingStrength> getStrengthElement() { 
4569          if (this.strength == null)
4570            if (Configuration.errorOnAutoCreate())
4571              throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.strength");
4572            else if (Configuration.doAutoCreate())
4573              this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory()); // bb
4574          return this.strength;
4575        }
4576
4577        public boolean hasStrengthElement() { 
4578          return this.strength != null && !this.strength.isEmpty();
4579        }
4580
4581        public boolean hasStrength() { 
4582          return this.strength != null && !this.strength.isEmpty();
4583        }
4584
4585        /**
4586         * @param value {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value
4587         */
4588        public ElementDefinitionBindingComponent setStrengthElement(Enumeration<BindingStrength> value) { 
4589          this.strength = value;
4590          return this;
4591        }
4592
4593        /**
4594         * @return Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.
4595         */
4596        public BindingStrength getStrength() { 
4597          return this.strength == null ? null : this.strength.getValue();
4598        }
4599
4600        /**
4601         * @param value Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.
4602         */
4603        public ElementDefinitionBindingComponent setStrength(BindingStrength value) { 
4604            if (this.strength == null)
4605              this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory());
4606            this.strength.setValue(value);
4607          return this;
4608        }
4609
4610        /**
4611         * @return {@link #description} (Describes the intended use of this particular set of codes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4612         */
4613        public MarkdownType getDescriptionElement() { 
4614          if (this.description == null)
4615            if (Configuration.errorOnAutoCreate())
4616              throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.description");
4617            else if (Configuration.doAutoCreate())
4618              this.description = new MarkdownType(); // bb
4619          return this.description;
4620        }
4621
4622        public boolean hasDescriptionElement() { 
4623          return this.description != null && !this.description.isEmpty();
4624        }
4625
4626        public boolean hasDescription() { 
4627          return this.description != null && !this.description.isEmpty();
4628        }
4629
4630        /**
4631         * @param value {@link #description} (Describes the intended use of this particular set of codes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4632         */
4633        public ElementDefinitionBindingComponent setDescriptionElement(MarkdownType value) { 
4634          this.description = value;
4635          return this;
4636        }
4637
4638        /**
4639         * @return Describes the intended use of this particular set of codes.
4640         */
4641        public String getDescription() { 
4642          return this.description == null ? null : this.description.getValue();
4643        }
4644
4645        /**
4646         * @param value Describes the intended use of this particular set of codes.
4647         */
4648        public ElementDefinitionBindingComponent setDescription(String value) { 
4649          if (Utilities.noString(value))
4650            this.description = null;
4651          else {
4652            if (this.description == null)
4653              this.description = new MarkdownType();
4654            this.description.setValue(value);
4655          }
4656          return this;
4657        }
4658
4659        /**
4660         * @return {@link #valueSet} (Refers to the value set that identifies the set of codes the binding refers to.). This is the underlying object with id, value and extensions. The accessor "getValueSet" gives direct access to the value
4661         */
4662        public CanonicalType getValueSetElement() { 
4663          if (this.valueSet == null)
4664            if (Configuration.errorOnAutoCreate())
4665              throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.valueSet");
4666            else if (Configuration.doAutoCreate())
4667              this.valueSet = new CanonicalType(); // bb
4668          return this.valueSet;
4669        }
4670
4671        public boolean hasValueSetElement() { 
4672          return this.valueSet != null && !this.valueSet.isEmpty();
4673        }
4674
4675        public boolean hasValueSet() { 
4676          return this.valueSet != null && !this.valueSet.isEmpty();
4677        }
4678
4679        /**
4680         * @param value {@link #valueSet} (Refers to the value set that identifies the set of codes the binding refers to.). This is the underlying object with id, value and extensions. The accessor "getValueSet" gives direct access to the value
4681         */
4682        public ElementDefinitionBindingComponent setValueSetElement(CanonicalType value) { 
4683          this.valueSet = value;
4684          return this;
4685        }
4686
4687        /**
4688         * @return Refers to the value set that identifies the set of codes the binding refers to.
4689         */
4690        public String getValueSet() { 
4691          return this.valueSet == null ? null : this.valueSet.getValue();
4692        }
4693
4694        /**
4695         * @param value Refers to the value set that identifies the set of codes the binding refers to.
4696         */
4697        public ElementDefinitionBindingComponent setValueSet(String value) { 
4698          if (Utilities.noString(value))
4699            this.valueSet = null;
4700          else {
4701            if (this.valueSet == null)
4702              this.valueSet = new CanonicalType();
4703            this.valueSet.setValue(value);
4704          }
4705          return this;
4706        }
4707
4708        /**
4709         * @return {@link #additional} (Additional bindings that help applications implementing this element. Additional bindings do not replace the main binding but provide more information and/or context.)
4710         */
4711        public List<ElementDefinitionBindingAdditionalComponent> getAdditional() { 
4712          if (this.additional == null)
4713            this.additional = new ArrayList<ElementDefinitionBindingAdditionalComponent>();
4714          return this.additional;
4715        }
4716
4717        /**
4718         * @return Returns a reference to <code>this</code> for easy method chaining
4719         */
4720        public ElementDefinitionBindingComponent setAdditional(List<ElementDefinitionBindingAdditionalComponent> theAdditional) { 
4721          this.additional = theAdditional;
4722          return this;
4723        }
4724
4725        public boolean hasAdditional() { 
4726          if (this.additional == null)
4727            return false;
4728          for (ElementDefinitionBindingAdditionalComponent item : this.additional)
4729            if (!item.isEmpty())
4730              return true;
4731          return false;
4732        }
4733
4734        public ElementDefinitionBindingAdditionalComponent addAdditional() { //3
4735          ElementDefinitionBindingAdditionalComponent t = new ElementDefinitionBindingAdditionalComponent();
4736          if (this.additional == null)
4737            this.additional = new ArrayList<ElementDefinitionBindingAdditionalComponent>();
4738          this.additional.add(t);
4739          return t;
4740        }
4741
4742        public ElementDefinitionBindingComponent addAdditional(ElementDefinitionBindingAdditionalComponent t) { //3
4743          if (t == null)
4744            return this;
4745          if (this.additional == null)
4746            this.additional = new ArrayList<ElementDefinitionBindingAdditionalComponent>();
4747          this.additional.add(t);
4748          return this;
4749        }
4750
4751        /**
4752         * @return The first repetition of repeating field {@link #additional}, creating it if it does not already exist {3}
4753         */
4754        public ElementDefinitionBindingAdditionalComponent getAdditionalFirstRep() { 
4755          if (getAdditional().isEmpty()) {
4756            addAdditional();
4757          }
4758          return getAdditional().get(0);
4759        }
4760
4761        protected void listChildren(List<Property> children) {
4762          super.listChildren(children);
4763          children.add(new Property("strength", "code", "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", 0, 1, strength));
4764          children.add(new Property("description", "markdown", "Describes the intended use of this particular set of codes.", 0, 1, description));
4765          children.add(new Property("valueSet", "canonical(ValueSet)", "Refers to the value set that identifies the set of codes the binding refers to.", 0, 1, valueSet));
4766          children.add(new Property("additional", "", "Additional bindings that help applications implementing this element. Additional bindings do not replace the main binding but provide more information and/or context.", 0, java.lang.Integer.MAX_VALUE, additional));
4767        }
4768
4769        @Override
4770        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4771          switch (_hash) {
4772          case 1791316033: /*strength*/  return new Property("strength", "code", "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", 0, 1, strength);
4773          case -1724546052: /*description*/  return new Property("description", "markdown", "Describes the intended use of this particular set of codes.", 0, 1, description);
4774          case -1410174671: /*valueSet*/  return new Property("valueSet", "canonical(ValueSet)", "Refers to the value set that identifies the set of codes the binding refers to.", 0, 1, valueSet);
4775          case -1931413465: /*additional*/  return new Property("additional", "", "Additional bindings that help applications implementing this element. Additional bindings do not replace the main binding but provide more information and/or context.", 0, java.lang.Integer.MAX_VALUE, additional);
4776          default: return super.getNamedProperty(_hash, _name, _checkValid);
4777          }
4778
4779        }
4780
4781      @Override
4782      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4783        switch (hash) {
4784        case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : new Base[] {this.strength}; // Enumeration<BindingStrength>
4785        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
4786        case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // CanonicalType
4787        case -1931413465: /*additional*/ return this.additional == null ? new Base[0] : this.additional.toArray(new Base[this.additional.size()]); // ElementDefinitionBindingAdditionalComponent
4788        default: return super.getProperty(hash, name, checkValid);
4789        }
4790
4791      }
4792
4793      @Override
4794      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4795        switch (hash) {
4796        case 1791316033: // strength
4797          value = new BindingStrengthEnumFactory().fromType(TypeConvertor.castToCode(value));
4798          this.strength = (Enumeration) value; // Enumeration<BindingStrength>
4799          return value;
4800        case -1724546052: // description
4801          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
4802          return value;
4803        case -1410174671: // valueSet
4804          this.valueSet = TypeConvertor.castToCanonical(value); // CanonicalType
4805          return value;
4806        case -1931413465: // additional
4807          this.getAdditional().add((ElementDefinitionBindingAdditionalComponent) value); // ElementDefinitionBindingAdditionalComponent
4808          return value;
4809        default: return super.setProperty(hash, name, value);
4810        }
4811
4812      }
4813
4814      @Override
4815      public Base setProperty(String name, Base value) throws FHIRException {
4816        if (name.equals("strength")) {
4817          value = new BindingStrengthEnumFactory().fromType(TypeConvertor.castToCode(value));
4818          this.strength = (Enumeration) value; // Enumeration<BindingStrength>
4819        } else if (name.equals("description")) {
4820          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
4821        } else if (name.equals("valueSet")) {
4822          this.valueSet = TypeConvertor.castToCanonical(value); // CanonicalType
4823        } else if (name.equals("additional")) {
4824          this.getAdditional().add((ElementDefinitionBindingAdditionalComponent) value);
4825        } else
4826          return super.setProperty(name, value);
4827        return value;
4828      }
4829
4830      @Override
4831      public Base makeProperty(int hash, String name) throws FHIRException {
4832        switch (hash) {
4833        case 1791316033:  return getStrengthElement();
4834        case -1724546052:  return getDescriptionElement();
4835        case -1410174671:  return getValueSetElement();
4836        case -1931413465:  return addAdditional(); 
4837        default: return super.makeProperty(hash, name);
4838        }
4839
4840      }
4841
4842      @Override
4843      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4844        switch (hash) {
4845        case 1791316033: /*strength*/ return new String[] {"code"};
4846        case -1724546052: /*description*/ return new String[] {"markdown"};
4847        case -1410174671: /*valueSet*/ return new String[] {"canonical"};
4848        case -1931413465: /*additional*/ return new String[] {};
4849        default: return super.getTypesForProperty(hash, name);
4850        }
4851
4852      }
4853
4854      @Override
4855      public Base addChild(String name) throws FHIRException {
4856        if (name.equals("strength")) {
4857          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.binding.strength");
4858        }
4859        else if (name.equals("description")) {
4860          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.binding.description");
4861        }
4862        else if (name.equals("valueSet")) {
4863          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.binding.valueSet");
4864        }
4865        else if (name.equals("additional")) {
4866          return addAdditional();
4867        }
4868        else
4869          return super.addChild(name);
4870      }
4871
4872      public ElementDefinitionBindingComponent copy() {
4873        ElementDefinitionBindingComponent dst = new ElementDefinitionBindingComponent();
4874        copyValues(dst);
4875        return dst;
4876      }
4877
4878      public void copyValues(ElementDefinitionBindingComponent dst) {
4879        super.copyValues(dst);
4880        dst.strength = strength == null ? null : strength.copy();
4881        dst.description = description == null ? null : description.copy();
4882        dst.valueSet = valueSet == null ? null : valueSet.copy();
4883        if (additional != null) {
4884          dst.additional = new ArrayList<ElementDefinitionBindingAdditionalComponent>();
4885          for (ElementDefinitionBindingAdditionalComponent i : additional)
4886            dst.additional.add(i.copy());
4887        };
4888      }
4889
4890      @Override
4891      public boolean equalsDeep(Base other_) {
4892        if (!super.equalsDeep(other_))
4893          return false;
4894        if (!(other_ instanceof ElementDefinitionBindingComponent))
4895          return false;
4896        ElementDefinitionBindingComponent o = (ElementDefinitionBindingComponent) other_;
4897        return compareDeep(strength, o.strength, true) && compareDeep(description, o.description, true)
4898           && compareDeep(valueSet, o.valueSet, true) && compareDeep(additional, o.additional, true);
4899      }
4900
4901      @Override
4902      public boolean equalsShallow(Base other_) {
4903        if (!super.equalsShallow(other_))
4904          return false;
4905        if (!(other_ instanceof ElementDefinitionBindingComponent))
4906          return false;
4907        ElementDefinitionBindingComponent o = (ElementDefinitionBindingComponent) other_;
4908        return compareValues(strength, o.strength, true) && compareValues(description, o.description, true)
4909           && compareValues(valueSet, o.valueSet, true);
4910      }
4911
4912      public boolean isEmpty() {
4913        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(strength, description, valueSet
4914          , additional);
4915      }
4916
4917  public String fhirType() {
4918    return "ElementDefinition.binding";
4919
4920  }
4921
4922  public boolean hasAdditional(ElementDefinitionBindingAdditionalComponent ab) {
4923    if (hasAdditional()) {
4924      for (ElementDefinitionBindingAdditionalComponent t : getAdditional()) {
4925        if (Base.compareDeep(t, ab, false)) {
4926          return true;
4927        }
4928      }
4929    }
4930    return false;
4931  }
4932
4933  }
4934
4935    @Block()
4936    public static class ElementDefinitionBindingAdditionalComponent extends Element implements IBaseDatatypeElement {
4937        /**
4938         * The use of this additional binding.
4939         */
4940        @Child(name = "purpose", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
4941        @Description(shortDefinition="maximum | minimum | required | extensible | candidate | current | preferred | ui | starter | component", formalDefinition="The use of this additional binding." )
4942        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/additional-binding-purpose")
4943        protected Enumeration<AdditionalBindingPurposeVS> purpose;
4944
4945        /**
4946         * The valueSet that is being bound for the purpose.
4947         */
4948        @Child(name = "valueSet", type = {CanonicalType.class}, order=2, min=1, max=1, modifier=false, summary=true)
4949        @Description(shortDefinition="The value set for the additional binding", formalDefinition="The valueSet that is being bound for the purpose." )
4950        protected CanonicalType valueSet;
4951
4952        /**
4953         * Documentation of the purpose of use of the bindingproviding additional information about how it is intended to be used.
4954         */
4955        @Child(name = "documentation", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=true)
4956        @Description(shortDefinition="Documentation of the purpose of use of the binding", formalDefinition="Documentation of the purpose of use of the bindingproviding additional information about how it is intended to be used." )
4957        protected MarkdownType documentation;
4958
4959        /**
4960         * Concise documentation - for summary tables.
4961         */
4962        @Child(name = "shortDoco", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
4963        @Description(shortDefinition="Concise documentation - for summary tables", formalDefinition="Concise documentation - for summary tables." )
4964        protected StringType shortDoco;
4965
4966        /**
4967         * Qualifies the usage of the binding. Typically bindings are qualified by jurisdiction, but they may also be qualified by gender, workflow status, clinical domain etc. The information to decide whether a usege context applies is usually outside the resource, determined by context, and this might present challenges for validation tooling.
4968         */
4969        @Child(name = "usage", type = {UsageContext.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4970        @Description(shortDefinition="Qualifies the usage - jurisdiction, gender, workflow status etc.", formalDefinition="Qualifies the usage of the binding. Typically bindings are qualified by jurisdiction, but they may also be qualified by gender, workflow status, clinical domain etc. The information to decide whether a usege context applies is usually outside the resource, determined by context, and this might present challenges for validation tooling." )
4971        protected List<UsageContext> usage;
4972
4973        /**
4974         * Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat.
4975         */
4976        @Child(name = "any", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=true)
4977        @Description(shortDefinition="Whether binding can applies to all repeats, or just one", formalDefinition="Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat." )
4978        protected BooleanType any;
4979
4980        private static final long serialVersionUID = -1312796441L;
4981
4982    /**
4983     * Constructor
4984     */
4985      public ElementDefinitionBindingAdditionalComponent() {
4986        super();
4987      }
4988
4989    /**
4990     * Constructor
4991     */
4992      public ElementDefinitionBindingAdditionalComponent(AdditionalBindingPurposeVS purpose, String valueSet) {
4993        super();
4994        this.setPurpose(purpose);
4995        this.setValueSet(valueSet);
4996      }
4997
4998        /**
4999         * @return {@link #purpose} (The use of this additional binding.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
5000         */
5001        public Enumeration<AdditionalBindingPurposeVS> getPurposeElement() { 
5002          if (this.purpose == null)
5003            if (Configuration.errorOnAutoCreate())
5004              throw new Error("Attempt to auto-create ElementDefinitionBindingAdditionalComponent.purpose");
5005            else if (Configuration.doAutoCreate())
5006              this.purpose = new Enumeration<AdditionalBindingPurposeVS>(new AdditionalBindingPurposeVSEnumFactory()); // bb
5007          return this.purpose;
5008        }
5009
5010        public boolean hasPurposeElement() { 
5011          return this.purpose != null && !this.purpose.isEmpty();
5012        }
5013
5014        public boolean hasPurpose() { 
5015          return this.purpose != null && !this.purpose.isEmpty();
5016        }
5017
5018        /**
5019         * @param value {@link #purpose} (The use of this additional binding.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
5020         */
5021        public ElementDefinitionBindingAdditionalComponent setPurposeElement(Enumeration<AdditionalBindingPurposeVS> value) { 
5022          this.purpose = value;
5023          return this;
5024        }
5025
5026        /**
5027         * @return The use of this additional binding.
5028         */
5029        public AdditionalBindingPurposeVS getPurpose() { 
5030          return this.purpose == null ? null : this.purpose.getValue();
5031        }
5032
5033        /**
5034         * @param value The use of this additional binding.
5035         */
5036        public ElementDefinitionBindingAdditionalComponent setPurpose(AdditionalBindingPurposeVS value) { 
5037            if (this.purpose == null)
5038              this.purpose = new Enumeration<AdditionalBindingPurposeVS>(new AdditionalBindingPurposeVSEnumFactory());
5039            this.purpose.setValue(value);
5040          return this;
5041        }
5042
5043        /**
5044         * @return {@link #valueSet} (The valueSet that is being bound for the purpose.). This is the underlying object with id, value and extensions. The accessor "getValueSet" gives direct access to the value
5045         */
5046        public CanonicalType getValueSetElement() { 
5047          if (this.valueSet == null)
5048            if (Configuration.errorOnAutoCreate())
5049              throw new Error("Attempt to auto-create ElementDefinitionBindingAdditionalComponent.valueSet");
5050            else if (Configuration.doAutoCreate())
5051              this.valueSet = new CanonicalType(); // bb
5052          return this.valueSet;
5053        }
5054
5055        public boolean hasValueSetElement() { 
5056          return this.valueSet != null && !this.valueSet.isEmpty();
5057        }
5058
5059        public boolean hasValueSet() { 
5060          return this.valueSet != null && !this.valueSet.isEmpty();
5061        }
5062
5063        /**
5064         * @param value {@link #valueSet} (The valueSet that is being bound for the purpose.). This is the underlying object with id, value and extensions. The accessor "getValueSet" gives direct access to the value
5065         */
5066        public ElementDefinitionBindingAdditionalComponent setValueSetElement(CanonicalType value) { 
5067          this.valueSet = value;
5068          return this;
5069        }
5070
5071        /**
5072         * @return The valueSet that is being bound for the purpose.
5073         */
5074        public String getValueSet() { 
5075          return this.valueSet == null ? null : this.valueSet.getValue();
5076        }
5077
5078        /**
5079         * @param value The valueSet that is being bound for the purpose.
5080         */
5081        public ElementDefinitionBindingAdditionalComponent setValueSet(String value) { 
5082            if (this.valueSet == null)
5083              this.valueSet = new CanonicalType();
5084            this.valueSet.setValue(value);
5085          return this;
5086        }
5087
5088        /**
5089         * @return {@link #documentation} (Documentation of the purpose of use of the bindingproviding additional information about how it is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
5090         */
5091        public MarkdownType getDocumentationElement() { 
5092          if (this.documentation == null)
5093            if (Configuration.errorOnAutoCreate())
5094              throw new Error("Attempt to auto-create ElementDefinitionBindingAdditionalComponent.documentation");
5095            else if (Configuration.doAutoCreate())
5096              this.documentation = new MarkdownType(); // bb
5097          return this.documentation;
5098        }
5099
5100        public boolean hasDocumentationElement() { 
5101          return this.documentation != null && !this.documentation.isEmpty();
5102        }
5103
5104        public boolean hasDocumentation() { 
5105          return this.documentation != null && !this.documentation.isEmpty();
5106        }
5107
5108        /**
5109         * @param value {@link #documentation} (Documentation of the purpose of use of the bindingproviding additional information about how it is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
5110         */
5111        public ElementDefinitionBindingAdditionalComponent setDocumentationElement(MarkdownType value) { 
5112          this.documentation = value;
5113          return this;
5114        }
5115
5116        /**
5117         * @return Documentation of the purpose of use of the bindingproviding additional information about how it is intended to be used.
5118         */
5119        public String getDocumentation() { 
5120          return this.documentation == null ? null : this.documentation.getValue();
5121        }
5122
5123        /**
5124         * @param value Documentation of the purpose of use of the bindingproviding additional information about how it is intended to be used.
5125         */
5126        public ElementDefinitionBindingAdditionalComponent setDocumentation(String value) { 
5127          if (Utilities.noString(value))
5128            this.documentation = null;
5129          else {
5130            if (this.documentation == null)
5131              this.documentation = new MarkdownType();
5132            this.documentation.setValue(value);
5133          }
5134          return this;
5135        }
5136
5137        /**
5138         * @return {@link #shortDoco} (Concise documentation - for summary tables.). This is the underlying object with id, value and extensions. The accessor "getShortDoco" gives direct access to the value
5139         */
5140        public StringType getShortDocoElement() { 
5141          if (this.shortDoco == null)
5142            if (Configuration.errorOnAutoCreate())
5143              throw new Error("Attempt to auto-create ElementDefinitionBindingAdditionalComponent.shortDoco");
5144            else if (Configuration.doAutoCreate())
5145              this.shortDoco = new StringType(); // bb
5146          return this.shortDoco;
5147        }
5148
5149        public boolean hasShortDocoElement() { 
5150          return this.shortDoco != null && !this.shortDoco.isEmpty();
5151        }
5152
5153        public boolean hasShortDoco() { 
5154          return this.shortDoco != null && !this.shortDoco.isEmpty();
5155        }
5156
5157        /**
5158         * @param value {@link #shortDoco} (Concise documentation - for summary tables.). This is the underlying object with id, value and extensions. The accessor "getShortDoco" gives direct access to the value
5159         */
5160        public ElementDefinitionBindingAdditionalComponent setShortDocoElement(StringType value) { 
5161          this.shortDoco = value;
5162          return this;
5163        }
5164
5165        /**
5166         * @return Concise documentation - for summary tables.
5167         */
5168        public String getShortDoco() { 
5169          return this.shortDoco == null ? null : this.shortDoco.getValue();
5170        }
5171
5172        /**
5173         * @param value Concise documentation - for summary tables.
5174         */
5175        public ElementDefinitionBindingAdditionalComponent setShortDoco(String value) { 
5176          if (Utilities.noString(value))
5177            this.shortDoco = null;
5178          else {
5179            if (this.shortDoco == null)
5180              this.shortDoco = new StringType();
5181            this.shortDoco.setValue(value);
5182          }
5183          return this;
5184        }
5185
5186        /**
5187         * @return {@link #usage} (Qualifies the usage of the binding. Typically bindings are qualified by jurisdiction, but they may also be qualified by gender, workflow status, clinical domain etc. The information to decide whether a usege context applies is usually outside the resource, determined by context, and this might present challenges for validation tooling.)
5188         */
5189        public List<UsageContext> getUsage() { 
5190          if (this.usage == null)
5191            this.usage = new ArrayList<UsageContext>();
5192          return this.usage;
5193        }
5194
5195        /**
5196         * @return Returns a reference to <code>this</code> for easy method chaining
5197         */
5198        public ElementDefinitionBindingAdditionalComponent setUsage(List<UsageContext> theUsage) { 
5199          this.usage = theUsage;
5200          return this;
5201        }
5202
5203        public boolean hasUsage() { 
5204          if (this.usage == null)
5205            return false;
5206          for (UsageContext item : this.usage)
5207            if (!item.isEmpty())
5208              return true;
5209          return false;
5210        }
5211
5212        public UsageContext addUsage() { //3
5213          UsageContext t = new UsageContext();
5214          if (this.usage == null)
5215            this.usage = new ArrayList<UsageContext>();
5216          this.usage.add(t);
5217          return t;
5218        }
5219
5220        public ElementDefinitionBindingAdditionalComponent addUsage(UsageContext t) { //3
5221          if (t == null)
5222            return this;
5223          if (this.usage == null)
5224            this.usage = new ArrayList<UsageContext>();
5225          this.usage.add(t);
5226          return this;
5227        }
5228
5229        /**
5230         * @return The first repetition of repeating field {@link #usage}, creating it if it does not already exist {3}
5231         */
5232        public UsageContext getUsageFirstRep() { 
5233          if (getUsage().isEmpty()) {
5234            addUsage();
5235          }
5236          return getUsage().get(0);
5237        }
5238
5239        /**
5240         * @return {@link #any} (Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat.). This is the underlying object with id, value and extensions. The accessor "getAny" gives direct access to the value
5241         */
5242        public BooleanType getAnyElement() { 
5243          if (this.any == null)
5244            if (Configuration.errorOnAutoCreate())
5245              throw new Error("Attempt to auto-create ElementDefinitionBindingAdditionalComponent.any");
5246            else if (Configuration.doAutoCreate())
5247              this.any = new BooleanType(); // bb
5248          return this.any;
5249        }
5250
5251        public boolean hasAnyElement() { 
5252          return this.any != null && !this.any.isEmpty();
5253        }
5254
5255        public boolean hasAny() { 
5256          return this.any != null && !this.any.isEmpty();
5257        }
5258
5259        /**
5260         * @param value {@link #any} (Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat.). This is the underlying object with id, value and extensions. The accessor "getAny" gives direct access to the value
5261         */
5262        public ElementDefinitionBindingAdditionalComponent setAnyElement(BooleanType value) { 
5263          this.any = value;
5264          return this;
5265        }
5266
5267        /**
5268         * @return Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat.
5269         */
5270        public boolean getAny() { 
5271          return this.any == null || this.any.isEmpty() ? false : this.any.getValue();
5272        }
5273
5274        /**
5275         * @param value Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat.
5276         */
5277        public ElementDefinitionBindingAdditionalComponent setAny(boolean value) { 
5278            if (this.any == null)
5279              this.any = new BooleanType();
5280            this.any.setValue(value);
5281          return this;
5282        }
5283
5284        protected void listChildren(List<Property> children) {
5285          super.listChildren(children);
5286          children.add(new Property("purpose", "code", "The use of this additional binding.", 0, 1, purpose));
5287          children.add(new Property("valueSet", "canonical(ValueSet)", "The valueSet that is being bound for the purpose.", 0, 1, valueSet));
5288          children.add(new Property("documentation", "markdown", "Documentation of the purpose of use of the bindingproviding additional information about how it is intended to be used.", 0, 1, documentation));
5289          children.add(new Property("shortDoco", "string", "Concise documentation - for summary tables.", 0, 1, shortDoco));
5290          children.add(new Property("usage", "UsageContext", "Qualifies the usage of the binding. Typically bindings are qualified by jurisdiction, but they may also be qualified by gender, workflow status, clinical domain etc. The information to decide whether a usege context applies is usually outside the resource, determined by context, and this might present challenges for validation tooling.", 0, java.lang.Integer.MAX_VALUE, usage));
5291          children.add(new Property("any", "boolean", "Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat.", 0, 1, any));
5292        }
5293
5294        @Override
5295        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5296          switch (_hash) {
5297          case -220463842: /*purpose*/  return new Property("purpose", "code", "The use of this additional binding.", 0, 1, purpose);
5298          case -1410174671: /*valueSet*/  return new Property("valueSet", "canonical(ValueSet)", "The valueSet that is being bound for the purpose.", 0, 1, valueSet);
5299          case 1587405498: /*documentation*/  return new Property("documentation", "markdown", "Documentation of the purpose of use of the bindingproviding additional information about how it is intended to be used.", 0, 1, documentation);
5300          case -2028503853: /*shortDoco*/  return new Property("shortDoco", "string", "Concise documentation - for summary tables.", 0, 1, shortDoco);
5301          case 111574433: /*usage*/  return new Property("usage", "UsageContext", "Qualifies the usage of the binding. Typically bindings are qualified by jurisdiction, but they may also be qualified by gender, workflow status, clinical domain etc. The information to decide whether a usege context applies is usually outside the resource, determined by context, and this might present challenges for validation tooling.", 0, java.lang.Integer.MAX_VALUE, usage);
5302          case 96748: /*any*/  return new Property("any", "boolean", "Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat.", 0, 1, any);
5303          default: return super.getNamedProperty(_hash, _name, _checkValid);
5304          }
5305
5306        }
5307
5308      @Override
5309      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5310        switch (hash) {
5311        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // Enumeration<AdditionalBindingPurposeVS>
5312        case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // CanonicalType
5313        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // MarkdownType
5314        case -2028503853: /*shortDoco*/ return this.shortDoco == null ? new Base[0] : new Base[] {this.shortDoco}; // StringType
5315        case 111574433: /*usage*/ return this.usage == null ? new Base[0] : this.usage.toArray(new Base[this.usage.size()]); // UsageContext
5316        case 96748: /*any*/ return this.any == null ? new Base[0] : new Base[] {this.any}; // BooleanType
5317        default: return super.getProperty(hash, name, checkValid);
5318        }
5319
5320      }
5321
5322      @Override
5323      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5324        switch (hash) {
5325        case -220463842: // purpose
5326          value = new AdditionalBindingPurposeVSEnumFactory().fromType(TypeConvertor.castToCode(value));
5327          this.purpose = (Enumeration) value; // Enumeration<AdditionalBindingPurposeVS>
5328          return value;
5329        case -1410174671: // valueSet
5330          this.valueSet = TypeConvertor.castToCanonical(value); // CanonicalType
5331          return value;
5332        case 1587405498: // documentation
5333          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
5334          return value;
5335        case -2028503853: // shortDoco
5336          this.shortDoco = TypeConvertor.castToString(value); // StringType
5337          return value;
5338        case 111574433: // usage
5339          this.getUsage().add(TypeConvertor.castToUsageContext(value)); // UsageContext
5340          return value;
5341        case 96748: // any
5342          this.any = TypeConvertor.castToBoolean(value); // BooleanType
5343          return value;
5344        default: return super.setProperty(hash, name, value);
5345        }
5346
5347      }
5348
5349      @Override
5350      public Base setProperty(String name, Base value) throws FHIRException {
5351        if (name.equals("purpose")) {
5352          value = new AdditionalBindingPurposeVSEnumFactory().fromType(TypeConvertor.castToCode(value));
5353          this.purpose = (Enumeration) value; // Enumeration<AdditionalBindingPurposeVS>
5354        } else if (name.equals("valueSet")) {
5355          this.valueSet = TypeConvertor.castToCanonical(value); // CanonicalType
5356        } else if (name.equals("documentation")) {
5357          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
5358        } else if (name.equals("shortDoco")) {
5359          this.shortDoco = TypeConvertor.castToString(value); // StringType
5360        } else if (name.equals("usage")) {
5361          this.getUsage().add(TypeConvertor.castToUsageContext(value));
5362        } else if (name.equals("any")) {
5363          this.any = TypeConvertor.castToBoolean(value); // BooleanType
5364        } else
5365          return super.setProperty(name, value);
5366        return value;
5367      }
5368
5369      @Override
5370      public Base makeProperty(int hash, String name) throws FHIRException {
5371        switch (hash) {
5372        case -220463842:  return getPurposeElement();
5373        case -1410174671:  return getValueSetElement();
5374        case 1587405498:  return getDocumentationElement();
5375        case -2028503853:  return getShortDocoElement();
5376        case 111574433:  return addUsage(); 
5377        case 96748:  return getAnyElement();
5378        default: return super.makeProperty(hash, name);
5379        }
5380
5381      }
5382
5383      @Override
5384      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5385        switch (hash) {
5386        case -220463842: /*purpose*/ return new String[] {"code"};
5387        case -1410174671: /*valueSet*/ return new String[] {"canonical"};
5388        case 1587405498: /*documentation*/ return new String[] {"markdown"};
5389        case -2028503853: /*shortDoco*/ return new String[] {"string"};
5390        case 111574433: /*usage*/ return new String[] {"UsageContext"};
5391        case 96748: /*any*/ return new String[] {"boolean"};
5392        default: return super.getTypesForProperty(hash, name);
5393        }
5394
5395      }
5396
5397      @Override
5398      public Base addChild(String name) throws FHIRException {
5399        if (name.equals("purpose")) {
5400          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.binding.additional.purpose");
5401        }
5402        else if (name.equals("valueSet")) {
5403          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.binding.additional.valueSet");
5404        }
5405        else if (name.equals("documentation")) {
5406          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.binding.additional.documentation");
5407        }
5408        else if (name.equals("shortDoco")) {
5409          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.binding.additional.shortDoco");
5410        }
5411        else if (name.equals("usage")) {
5412          return addUsage();
5413        }
5414        else if (name.equals("any")) {
5415          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.binding.additional.any");
5416        }
5417        else
5418          return super.addChild(name);
5419      }
5420
5421      public ElementDefinitionBindingAdditionalComponent copy() {
5422        ElementDefinitionBindingAdditionalComponent dst = new ElementDefinitionBindingAdditionalComponent();
5423        copyValues(dst);
5424        return dst;
5425      }
5426
5427      public void copyValues(ElementDefinitionBindingAdditionalComponent dst) {
5428        super.copyValues(dst);
5429        dst.purpose = purpose == null ? null : purpose.copy();
5430        dst.valueSet = valueSet == null ? null : valueSet.copy();
5431        dst.documentation = documentation == null ? null : documentation.copy();
5432        dst.shortDoco = shortDoco == null ? null : shortDoco.copy();
5433        if (usage != null) {
5434          dst.usage = new ArrayList<UsageContext>();
5435          for (UsageContext i : usage)
5436            dst.usage.add(i.copy());
5437        };
5438        dst.any = any == null ? null : any.copy();
5439      }
5440
5441      @Override
5442      public boolean equalsDeep(Base other_) {
5443        if (!super.equalsDeep(other_))
5444          return false;
5445        if (!(other_ instanceof ElementDefinitionBindingAdditionalComponent))
5446          return false;
5447        ElementDefinitionBindingAdditionalComponent o = (ElementDefinitionBindingAdditionalComponent) other_;
5448        return compareDeep(purpose, o.purpose, true) && compareDeep(valueSet, o.valueSet, true) && compareDeep(documentation, o.documentation, true)
5449           && compareDeep(shortDoco, o.shortDoco, true) && compareDeep(usage, o.usage, true) && compareDeep(any, o.any, true)
5450          ;
5451      }
5452
5453      @Override
5454      public boolean equalsShallow(Base other_) {
5455        if (!super.equalsShallow(other_))
5456          return false;
5457        if (!(other_ instanceof ElementDefinitionBindingAdditionalComponent))
5458          return false;
5459        ElementDefinitionBindingAdditionalComponent o = (ElementDefinitionBindingAdditionalComponent) other_;
5460        return compareValues(purpose, o.purpose, true) && compareValues(valueSet, o.valueSet, true) && compareValues(documentation, o.documentation, true)
5461           && compareValues(shortDoco, o.shortDoco, true) && compareValues(any, o.any, true);
5462      }
5463
5464      public boolean isEmpty() {
5465        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(purpose, valueSet, documentation
5466          , shortDoco, usage, any);
5467      }
5468
5469  public String fhirType() {
5470    return "ElementDefinition.binding.additional";
5471
5472  }
5473
5474  }
5475
5476    @Block()
5477    public static class ElementDefinitionMappingComponent extends Element implements IBaseDatatypeElement {
5478        /**
5479         * An internal reference to the definition of a mapping.
5480         */
5481        @Child(name = "identity", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true)
5482        @Description(shortDefinition="Reference to mapping declaration", formalDefinition="An internal reference to the definition of a mapping." )
5483        protected IdType identity;
5484
5485        /**
5486         * Identifies the computable language in which mapping.map is expressed.
5487         */
5488        @Child(name = "language", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true)
5489        @Description(shortDefinition="Computable language of mapping", formalDefinition="Identifies the computable language in which mapping.map is expressed." )
5490        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
5491        protected CodeType language;
5492
5493        /**
5494         * Expresses what part of the target specification corresponds to this element.
5495         */
5496        @Child(name = "map", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true)
5497        @Description(shortDefinition="Details of the mapping", formalDefinition="Expresses what part of the target specification corresponds to this element." )
5498        protected StringType map;
5499
5500        /**
5501         * Comments that provide information about the mapping or its use.
5502         */
5503        @Child(name = "comment", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=true)
5504        @Description(shortDefinition="Comments about the mapping or its use", formalDefinition="Comments that provide information about the mapping or its use." )
5505        protected MarkdownType comment;
5506
5507        private static final long serialVersionUID = -582458727L;
5508
5509    /**
5510     * Constructor
5511     */
5512      public ElementDefinitionMappingComponent() {
5513        super();
5514      }
5515
5516    /**
5517     * Constructor
5518     */
5519      public ElementDefinitionMappingComponent(String identity, String map) {
5520        super();
5521        this.setIdentity(identity);
5522        this.setMap(map);
5523      }
5524
5525        /**
5526         * @return {@link #identity} (An internal reference to the definition of a mapping.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value
5527         */
5528        public IdType getIdentityElement() { 
5529          if (this.identity == null)
5530            if (Configuration.errorOnAutoCreate())
5531              throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.identity");
5532            else if (Configuration.doAutoCreate())
5533              this.identity = new IdType(); // bb
5534          return this.identity;
5535        }
5536
5537        public boolean hasIdentityElement() { 
5538          return this.identity != null && !this.identity.isEmpty();
5539        }
5540
5541        public boolean hasIdentity() { 
5542          return this.identity != null && !this.identity.isEmpty();
5543        }
5544
5545        /**
5546         * @param value {@link #identity} (An internal reference to the definition of a mapping.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value
5547         */
5548        public ElementDefinitionMappingComponent setIdentityElement(IdType value) { 
5549          this.identity = value;
5550          return this;
5551        }
5552
5553        /**
5554         * @return An internal reference to the definition of a mapping.
5555         */
5556        public String getIdentity() { 
5557          return this.identity == null ? null : this.identity.getValue();
5558        }
5559
5560        /**
5561         * @param value An internal reference to the definition of a mapping.
5562         */
5563        public ElementDefinitionMappingComponent setIdentity(String value) { 
5564            if (this.identity == null)
5565              this.identity = new IdType();
5566            this.identity.setValue(value);
5567          return this;
5568        }
5569
5570        /**
5571         * @return {@link #language} (Identifies the computable language in which mapping.map is expressed.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
5572         */
5573        public CodeType getLanguageElement() { 
5574          if (this.language == null)
5575            if (Configuration.errorOnAutoCreate())
5576              throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.language");
5577            else if (Configuration.doAutoCreate())
5578              this.language = new CodeType(); // bb
5579          return this.language;
5580        }
5581
5582        public boolean hasLanguageElement() { 
5583          return this.language != null && !this.language.isEmpty();
5584        }
5585
5586        public boolean hasLanguage() { 
5587          return this.language != null && !this.language.isEmpty();
5588        }
5589
5590        /**
5591         * @param value {@link #language} (Identifies the computable language in which mapping.map is expressed.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
5592         */
5593        public ElementDefinitionMappingComponent setLanguageElement(CodeType value) { 
5594          this.language = value;
5595          return this;
5596        }
5597
5598        /**
5599         * @return Identifies the computable language in which mapping.map is expressed.
5600         */
5601        public String getLanguage() { 
5602          return this.language == null ? null : this.language.getValue();
5603        }
5604
5605        /**
5606         * @param value Identifies the computable language in which mapping.map is expressed.
5607         */
5608        public ElementDefinitionMappingComponent setLanguage(String value) { 
5609          if (Utilities.noString(value))
5610            this.language = null;
5611          else {
5612            if (this.language == null)
5613              this.language = new CodeType();
5614            this.language.setValue(value);
5615          }
5616          return this;
5617        }
5618
5619        /**
5620         * @return {@link #map} (Expresses what part of the target specification corresponds to this element.). This is the underlying object with id, value and extensions. The accessor "getMap" gives direct access to the value
5621         */
5622        public StringType getMapElement() { 
5623          if (this.map == null)
5624            if (Configuration.errorOnAutoCreate())
5625              throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.map");
5626            else if (Configuration.doAutoCreate())
5627              this.map = new StringType(); // bb
5628          return this.map;
5629        }
5630
5631        public boolean hasMapElement() { 
5632          return this.map != null && !this.map.isEmpty();
5633        }
5634
5635        public boolean hasMap() { 
5636          return this.map != null && !this.map.isEmpty();
5637        }
5638
5639        /**
5640         * @param value {@link #map} (Expresses what part of the target specification corresponds to this element.). This is the underlying object with id, value and extensions. The accessor "getMap" gives direct access to the value
5641         */
5642        public ElementDefinitionMappingComponent setMapElement(StringType value) { 
5643          this.map = value;
5644          return this;
5645        }
5646
5647        /**
5648         * @return Expresses what part of the target specification corresponds to this element.
5649         */
5650        public String getMap() { 
5651          return this.map == null ? null : this.map.getValue();
5652        }
5653
5654        /**
5655         * @param value Expresses what part of the target specification corresponds to this element.
5656         */
5657        public ElementDefinitionMappingComponent setMap(String value) { 
5658            if (this.map == null)
5659              this.map = new StringType();
5660            this.map.setValue(value);
5661          return this;
5662        }
5663
5664        /**
5665         * @return {@link #comment} (Comments that provide information about the mapping or its use.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
5666         */
5667        public MarkdownType getCommentElement() { 
5668          if (this.comment == null)
5669            if (Configuration.errorOnAutoCreate())
5670              throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.comment");
5671            else if (Configuration.doAutoCreate())
5672              this.comment = new MarkdownType(); // bb
5673          return this.comment;
5674        }
5675
5676        public boolean hasCommentElement() { 
5677          return this.comment != null && !this.comment.isEmpty();
5678        }
5679
5680        public boolean hasComment() { 
5681          return this.comment != null && !this.comment.isEmpty();
5682        }
5683
5684        /**
5685         * @param value {@link #comment} (Comments that provide information about the mapping or its use.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
5686         */
5687        public ElementDefinitionMappingComponent setCommentElement(MarkdownType value) { 
5688          this.comment = value;
5689          return this;
5690        }
5691
5692        /**
5693         * @return Comments that provide information about the mapping or its use.
5694         */
5695        public String getComment() { 
5696          return this.comment == null ? null : this.comment.getValue();
5697        }
5698
5699        /**
5700         * @param value Comments that provide information about the mapping or its use.
5701         */
5702        public ElementDefinitionMappingComponent setComment(String value) { 
5703          if (Utilities.noString(value))
5704            this.comment = null;
5705          else {
5706            if (this.comment == null)
5707              this.comment = new MarkdownType();
5708            this.comment.setValue(value);
5709          }
5710          return this;
5711        }
5712
5713        protected void listChildren(List<Property> children) {
5714          super.listChildren(children);
5715          children.add(new Property("identity", "id", "An internal reference to the definition of a mapping.", 0, 1, identity));
5716          children.add(new Property("language", "code", "Identifies the computable language in which mapping.map is expressed.", 0, 1, language));
5717          children.add(new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, 1, map));
5718          children.add(new Property("comment", "markdown", "Comments that provide information about the mapping or its use.", 0, 1, comment));
5719        }
5720
5721        @Override
5722        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5723          switch (_hash) {
5724          case -135761730: /*identity*/  return new Property("identity", "id", "An internal reference to the definition of a mapping.", 0, 1, identity);
5725          case -1613589672: /*language*/  return new Property("language", "code", "Identifies the computable language in which mapping.map is expressed.", 0, 1, language);
5726          case 107868: /*map*/  return new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, 1, map);
5727          case 950398559: /*comment*/  return new Property("comment", "markdown", "Comments that provide information about the mapping or its use.", 0, 1, comment);
5728          default: return super.getNamedProperty(_hash, _name, _checkValid);
5729          }
5730
5731        }
5732
5733      @Override
5734      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5735        switch (hash) {
5736        case -135761730: /*identity*/ return this.identity == null ? new Base[0] : new Base[] {this.identity}; // IdType
5737        case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType
5738        case 107868: /*map*/ return this.map == null ? new Base[0] : new Base[] {this.map}; // StringType
5739        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // MarkdownType
5740        default: return super.getProperty(hash, name, checkValid);
5741        }
5742
5743      }
5744
5745      @Override
5746      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5747        switch (hash) {
5748        case -135761730: // identity
5749          this.identity = TypeConvertor.castToId(value); // IdType
5750          return value;
5751        case -1613589672: // language
5752          this.language = TypeConvertor.castToCode(value); // CodeType
5753          return value;
5754        case 107868: // map
5755          this.map = TypeConvertor.castToString(value); // StringType
5756          return value;
5757        case 950398559: // comment
5758          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
5759          return value;
5760        default: return super.setProperty(hash, name, value);
5761        }
5762
5763      }
5764
5765      @Override
5766      public Base setProperty(String name, Base value) throws FHIRException {
5767        if (name.equals("identity")) {
5768          this.identity = TypeConvertor.castToId(value); // IdType
5769        } else if (name.equals("language")) {
5770          this.language = TypeConvertor.castToCode(value); // CodeType
5771        } else if (name.equals("map")) {
5772          this.map = TypeConvertor.castToString(value); // StringType
5773        } else if (name.equals("comment")) {
5774          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
5775        } else
5776          return super.setProperty(name, value);
5777        return value;
5778      }
5779
5780      @Override
5781      public Base makeProperty(int hash, String name) throws FHIRException {
5782        switch (hash) {
5783        case -135761730:  return getIdentityElement();
5784        case -1613589672:  return getLanguageElement();
5785        case 107868:  return getMapElement();
5786        case 950398559:  return getCommentElement();
5787        default: return super.makeProperty(hash, name);
5788        }
5789
5790      }
5791
5792      @Override
5793      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5794        switch (hash) {
5795        case -135761730: /*identity*/ return new String[] {"id"};
5796        case -1613589672: /*language*/ return new String[] {"code"};
5797        case 107868: /*map*/ return new String[] {"string"};
5798        case 950398559: /*comment*/ return new String[] {"markdown"};
5799        default: return super.getTypesForProperty(hash, name);
5800        }
5801
5802      }
5803
5804      @Override
5805      public Base addChild(String name) throws FHIRException {
5806        if (name.equals("identity")) {
5807          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.mapping.identity");
5808        }
5809        else if (name.equals("language")) {
5810          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.mapping.language");
5811        }
5812        else if (name.equals("map")) {
5813          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.mapping.map");
5814        }
5815        else if (name.equals("comment")) {
5816          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.mapping.comment");
5817        }
5818        else
5819          return super.addChild(name);
5820      }
5821
5822      public ElementDefinitionMappingComponent copy() {
5823        ElementDefinitionMappingComponent dst = new ElementDefinitionMappingComponent();
5824        copyValues(dst);
5825        return dst;
5826      }
5827
5828      public void copyValues(ElementDefinitionMappingComponent dst) {
5829        super.copyValues(dst);
5830        dst.identity = identity == null ? null : identity.copy();
5831        dst.language = language == null ? null : language.copy();
5832        dst.map = map == null ? null : map.copy();
5833        dst.comment = comment == null ? null : comment.copy();
5834      }
5835
5836      @Override
5837      public boolean equalsDeep(Base other_) {
5838        if (!super.equalsDeep(other_))
5839          return false;
5840        if (!(other_ instanceof ElementDefinitionMappingComponent))
5841          return false;
5842        ElementDefinitionMappingComponent o = (ElementDefinitionMappingComponent) other_;
5843        return compareDeep(identity, o.identity, true) && compareDeep(language, o.language, true) && compareDeep(map, o.map, true)
5844           && compareDeep(comment, o.comment, true);
5845      }
5846
5847      @Override
5848      public boolean equalsShallow(Base other_) {
5849        if (!super.equalsShallow(other_))
5850          return false;
5851        if (!(other_ instanceof ElementDefinitionMappingComponent))
5852          return false;
5853        ElementDefinitionMappingComponent o = (ElementDefinitionMappingComponent) other_;
5854        return compareValues(identity, o.identity, true) && compareValues(language, o.language, true) && compareValues(map, o.map, true)
5855           && compareValues(comment, o.comment, true);
5856      }
5857
5858      public boolean isEmpty() {
5859        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identity, language, map
5860          , comment);
5861      }
5862
5863  public String fhirType() {
5864    return "ElementDefinition.mapping";
5865
5866  }
5867
5868  }
5869
5870    /**
5871     * The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.
5872     */
5873    @Child(name = "path", type = {StringType.class}, order=0, min=1, max=1, modifier=false, summary=true)
5874    @Description(shortDefinition="Path of the element in the hierarchy of elements", formalDefinition="The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension." )
5875    protected StringType path;
5876
5877    /**
5878     * Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used.
5879     */
5880    @Child(name = "representation", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5881    @Description(shortDefinition="xmlAttr | xmlText | typeAttr | cdaText | xhtml", formalDefinition="Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used." )
5882    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/property-representation")
5883    protected List<Enumeration<PropertyRepresentation>> representation;
5884
5885    /**
5886     * The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.
5887     */
5888    @Child(name = "sliceName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
5889    @Description(shortDefinition="Name for this particular element (in a set of slices)", formalDefinition="The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element." )
5890    protected StringType sliceName;
5891
5892    /**
5893     * If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.
5894     */
5895    @Child(name = "sliceIsConstraining", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true)
5896    @Description(shortDefinition="If this slice definition constrains an inherited slice definition (or not)", formalDefinition="If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName." )
5897    protected BooleanType sliceIsConstraining;
5898
5899    /**
5900     * A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.
5901     */
5902    @Child(name = "label", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
5903    @Description(shortDefinition="Name for element to display with or prompt for element", formalDefinition="A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form." )
5904    protected StringType label;
5905
5906    /**
5907     * A code that has the same meaning as the element in a particular terminology.
5908     */
5909    @Child(name = "code", type = {Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5910    @Description(shortDefinition="Corresponding codes in terminologies", formalDefinition="A code that has the same meaning as the element in a particular terminology." )
5911    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://loinc.org/vs")
5912    protected List<Coding> code;
5913
5914    /**
5915     * Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).
5916     */
5917    @Child(name = "slicing", type = {}, order=6, min=0, max=1, modifier=false, summary=true)
5918    @Description(shortDefinition="This element is sliced - slices follow", formalDefinition="Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)." )
5919    protected ElementDefinitionSlicingComponent slicing;
5920
5921    /**
5922     * A concise description of what this element means (e.g. for use in autogenerated summaries).
5923     */
5924    @Child(name = "short", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true)
5925    @Description(shortDefinition="Concise definition for space-constrained presentation", formalDefinition="A concise description of what this element means (e.g. for use in autogenerated summaries)." )
5926    protected StringType short_;
5927
5928    /**
5929     * Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).
5930     */
5931    @Child(name = "definition", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=true)
5932    @Description(shortDefinition="Full formal definition as narrative text", formalDefinition="Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition)." )
5933    protected MarkdownType definition;
5934
5935    /**
5936     * Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).
5937     */
5938    @Child(name = "comment", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true)
5939    @Description(shortDefinition="Comments about the use of this element", formalDefinition="Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment)." )
5940    protected MarkdownType comment;
5941
5942    /**
5943     * This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.
5944     */
5945    @Child(name = "requirements", type = {MarkdownType.class}, order=10, min=0, max=1, modifier=false, summary=true)
5946    @Description(shortDefinition="Why this resource has been created", formalDefinition="This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element." )
5947    protected MarkdownType requirements;
5948
5949    /**
5950     * Identifies additional names by which this element might also be known.
5951     */
5952    @Child(name = "alias", type = {StringType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5953    @Description(shortDefinition="Other names", formalDefinition="Identifies additional names by which this element might also be known." )
5954    protected List<StringType> alias;
5955
5956    /**
5957     * The minimum number of times this element SHALL appear in the instance.
5958     */
5959    @Child(name = "min", type = {UnsignedIntType.class}, order=12, min=0, max=1, modifier=false, summary=true)
5960    @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this element SHALL appear in the instance." )
5961    protected UnsignedIntType min;
5962
5963    /**
5964     * The maximum number of times this element is permitted to appear in the instance.
5965     */
5966    @Child(name = "max", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=true)
5967    @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the instance." )
5968    protected StringType max;
5969
5970    /**
5971     * Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.
5972     */
5973    @Child(name = "base", type = {}, order=14, min=0, max=1, modifier=false, summary=true)
5974    @Description(shortDefinition="Base definition information for tools", formalDefinition="Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same." )
5975    protected ElementDefinitionBaseComponent base;
5976
5977    /**
5978     * Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.
5979     */
5980    @Child(name = "contentReference", type = {UriType.class}, order=15, min=0, max=1, modifier=false, summary=true)
5981    @Description(shortDefinition="Reference to definition of content for the element", formalDefinition="Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc." )
5982    protected UriType contentReference;
5983
5984    /**
5985     * The data type or resource that the value of this element is permitted to be.
5986     */
5987    @Child(name = "type", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5988    @Description(shortDefinition="Data type and Profile for this element", formalDefinition="The data type or resource that the value of this element is permitted to be." )
5989    protected List<TypeRefComponent> type;
5990
5991    /**
5992     * The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').
5993     */
5994    @Child(name = "defaultValue", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, CodeableReference.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, RatioRange.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Availability.class, ExtendedContactDetail.class, Dosage.class, Meta.class}, order=17, min=0, max=1, modifier=false, summary=true)
5995    @Description(shortDefinition="Specified value if missing from instance", formalDefinition="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')." )
5996    protected DataType defaultValue;
5997
5998    /**
5999     * The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').
6000     */
6001    @Child(name = "meaningWhenMissing", type = {MarkdownType.class}, order=18, min=0, max=1, modifier=false, summary=true)
6002    @Description(shortDefinition="Implicit meaning when this element is missing", formalDefinition="The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing')." )
6003    protected MarkdownType meaningWhenMissing;
6004
6005    /**
6006     * If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning.
6007     */
6008    @Child(name = "orderMeaning", type = {StringType.class}, order=19, min=0, max=1, modifier=false, summary=true)
6009    @Description(shortDefinition="What the order of the elements means", formalDefinition="If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning." )
6010    protected StringType orderMeaning;
6011
6012    /**
6013     * Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.
6014     */
6015    @Child(name = "fixed", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, CodeableReference.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, RatioRange.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Availability.class, ExtendedContactDetail.class, Dosage.class, Meta.class}, order=20, min=0, max=1, modifier=false, summary=true)
6016    @Description(shortDefinition="Value must be exactly this", formalDefinition="Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing." )
6017    protected DataType fixed;
6018
6019    /**
6020     * Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
6021
6022When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
6023
6024When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
6025
6026When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
6027
60281. If primitive: it must match exactly the pattern value
60292. If a complex object: it must match (recursively) the pattern value
60303. If an array: it must match (recursively) the pattern value
6031
6032If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.
6033     */
6034    @Child(name = "pattern", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, CodeableReference.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, RatioRange.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Availability.class, ExtendedContactDetail.class, Dosage.class, Meta.class}, order=21, min=0, max=1, modifier=false, summary=true)
6035    @Description(shortDefinition="Value must have at least these property values", formalDefinition="Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have." )
6036    protected DataType pattern;
6037
6038    /**
6039     * A sample value for this element demonstrating the type of information that would typically be found in the element.
6040     */
6041    @Child(name = "example", type = {}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
6042    @Description(shortDefinition="Example value (as defined for type)", formalDefinition="A sample value for this element demonstrating the type of information that would typically be found in the element." )
6043    protected List<ElementDefinitionExampleComponent> example;
6044
6045    /**
6046     * The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.
6047     */
6048    @Child(name = "minValue", type = {DateType.class, DateTimeType.class, InstantType.class, TimeType.class, DecimalType.class, IntegerType.class, Integer64Type.class, PositiveIntType.class, UnsignedIntType.class, Quantity.class}, order=23, min=0, max=1, modifier=false, summary=true)
6049    @Description(shortDefinition="Minimum Allowed Value (for some types)", formalDefinition="The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity." )
6050    protected DataType minValue;
6051
6052    /**
6053     * The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.
6054     */
6055    @Child(name = "maxValue", type = {DateType.class, DateTimeType.class, InstantType.class, TimeType.class, DecimalType.class, IntegerType.class, Integer64Type.class, PositiveIntType.class, UnsignedIntType.class, Quantity.class}, order=24, min=0, max=1, modifier=false, summary=true)
6056    @Description(shortDefinition="Maximum Allowed Value (for some types)", formalDefinition="The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity." )
6057    protected DataType maxValue;
6058
6059    /**
6060     * Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. ```maxLength``` SHOULD only be used on primitive data types that have a string representation (see [http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-structuredefinition-type-characteristics.html)).
6061     */
6062    @Child(name = "maxLength", type = {IntegerType.class}, order=25, min=0, max=1, modifier=false, summary=true)
6063    @Description(shortDefinition="Max length for string type data", formalDefinition="Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. ```maxLength``` SHOULD only be used on primitive data types that have a string representation (see [http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-structuredefinition-type-characteristics.html))." )
6064    protected IntegerType maxLength;
6065
6066    /**
6067     * A reference to an invariant that may make additional statements about the cardinality or value in the instance.
6068     */
6069    @Child(name = "condition", type = {IdType.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
6070    @Description(shortDefinition="Reference to invariant about presence", formalDefinition="A reference to an invariant that may make additional statements about the cardinality or value in the instance." )
6071    protected List<IdType> condition;
6072
6073    /**
6074     * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.
6075     */
6076    @Child(name = "constraint", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
6077    @Description(shortDefinition="Condition that must evaluate to true", formalDefinition="Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance." )
6078    protected List<ElementDefinitionConstraintComponent> constraint;
6079
6080    /**
6081     * Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.
6082     */
6083    @Child(name = "mustHaveValue", type = {BooleanType.class}, order=28, min=0, max=1, modifier=false, summary=true)
6084    @Description(shortDefinition="For primitives, that a value must be present - not replaced by an extension", formalDefinition="Specifies for a primitive data type that the value of the data type cannot be replaced by an extension." )
6085    protected BooleanType mustHaveValue;
6086
6087    /**
6088     * Specifies a list of extensions that can appear in place of a primitive value.
6089     */
6090    @Child(name = "valueAlternatives", type = {CanonicalType.class}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
6091    @Description(shortDefinition="Extensions that are allowed to replace a primitive value", formalDefinition="Specifies a list of extensions that can appear in place of a primitive value." )
6092    protected List<CanonicalType> valueAlternatives;
6093
6094    /**
6095     * If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.
6096     */
6097    @Child(name = "mustSupport", type = {BooleanType.class}, order=30, min=0, max=1, modifier=false, summary=true)
6098    @Description(shortDefinition="If the element must be supported (discouraged - see obligations)", formalDefinition="If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation." )
6099    protected BooleanType mustSupport;
6100
6101    /**
6102     * If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.
6103     */
6104    @Child(name = "isModifier", type = {BooleanType.class}, order=31, min=0, max=1, modifier=false, summary=true)
6105    @Description(shortDefinition="If this modifies the meaning of other elements", formalDefinition="If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension." )
6106    protected BooleanType isModifier;
6107
6108    /**
6109     * Explains how that element affects the interpretation of the resource or element that contains it.
6110     */
6111    @Child(name = "isModifierReason", type = {StringType.class}, order=32, min=0, max=1, modifier=false, summary=true)
6112    @Description(shortDefinition="Reason that this element is marked as a modifier", formalDefinition="Explains how that element affects the interpretation of the resource or element that contains it." )
6113    protected StringType isModifierReason;
6114
6115    /**
6116     * Whether the element should be included if a client requests a search with the parameter _summary=true.
6117     */
6118    @Child(name = "isSummary", type = {BooleanType.class}, order=33, min=0, max=1, modifier=false, summary=true)
6119    @Description(shortDefinition="Include when _summary = true?", formalDefinition="Whether the element should be included if a client requests a search with the parameter _summary=true." )
6120    protected BooleanType isSummary;
6121
6122    /**
6123     * Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).
6124     */
6125    @Child(name = "binding", type = {}, order=34, min=0, max=1, modifier=false, summary=true)
6126    @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri)." )
6127    protected ElementDefinitionBindingComponent binding;
6128
6129    /**
6130     * Identifies a concept from an external specification that roughly corresponds to this element.
6131     */
6132    @Child(name = "mapping", type = {}, order=35, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
6133    @Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." )
6134    protected List<ElementDefinitionMappingComponent> mapping;
6135
6136    private static final long serialVersionUID = -1474105308L;
6137
6138  /**
6139   * Constructor
6140   */
6141    public ElementDefinition() {
6142      super();
6143    }
6144
6145  /**
6146   * Constructor
6147   */
6148    public ElementDefinition(String path) {
6149      super();
6150      this.setPath(path);
6151    }
6152
6153    /**
6154     * @return {@link #path} (The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
6155     */
6156    public StringType getPathElement() { 
6157      if (this.path == null)
6158        if (Configuration.errorOnAutoCreate())
6159          throw new Error("Attempt to auto-create ElementDefinition.path");
6160        else if (Configuration.doAutoCreate())
6161          this.path = new StringType(); // bb
6162      return this.path;
6163    }
6164
6165    public boolean hasPathElement() { 
6166      return this.path != null && !this.path.isEmpty();
6167    }
6168
6169    public boolean hasPath() { 
6170      return this.path != null && !this.path.isEmpty();
6171    }
6172
6173    /**
6174     * @param value {@link #path} (The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
6175     */
6176    public ElementDefinition setPathElement(StringType value) { 
6177      this.path = value;
6178      return this;
6179    }
6180
6181    /**
6182     * @return The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.
6183     */
6184    public String getPath() { 
6185      return this.path == null ? null : this.path.getValue();
6186    }
6187
6188    /**
6189     * @param value The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.
6190     */
6191    public ElementDefinition setPath(String value) { 
6192        if (this.path == null)
6193          this.path = new StringType();
6194        this.path.setValue(value);
6195      return this;
6196    }
6197
6198    /**
6199     * @return {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used.)
6200     */
6201    public List<Enumeration<PropertyRepresentation>> getRepresentation() { 
6202      if (this.representation == null)
6203        this.representation = new ArrayList<Enumeration<PropertyRepresentation>>();
6204      return this.representation;
6205    }
6206
6207    /**
6208     * @return Returns a reference to <code>this</code> for easy method chaining
6209     */
6210    public ElementDefinition setRepresentation(List<Enumeration<PropertyRepresentation>> theRepresentation) { 
6211      this.representation = theRepresentation;
6212      return this;
6213    }
6214
6215    public boolean hasRepresentation() { 
6216      if (this.representation == null)
6217        return false;
6218      for (Enumeration<PropertyRepresentation> item : this.representation)
6219        if (!item.isEmpty())
6220          return true;
6221      return false;
6222    }
6223
6224    /**
6225     * @return {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used.)
6226     */
6227    public Enumeration<PropertyRepresentation> addRepresentationElement() {//2 
6228      Enumeration<PropertyRepresentation> t = new Enumeration<PropertyRepresentation>(new PropertyRepresentationEnumFactory());
6229      if (this.representation == null)
6230        this.representation = new ArrayList<Enumeration<PropertyRepresentation>>();
6231      this.representation.add(t);
6232      return t;
6233    }
6234
6235    /**
6236     * @param value {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used.)
6237     */
6238    public ElementDefinition addRepresentation(PropertyRepresentation value) { //1
6239      Enumeration<PropertyRepresentation> t = new Enumeration<PropertyRepresentation>(new PropertyRepresentationEnumFactory());
6240      t.setValue(value);
6241      if (this.representation == null)
6242        this.representation = new ArrayList<Enumeration<PropertyRepresentation>>();
6243      this.representation.add(t);
6244      return this;
6245    }
6246
6247    /**
6248     * @param value {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used.)
6249     */
6250    public boolean hasRepresentation(PropertyRepresentation value) { 
6251      if (this.representation == null)
6252        return false;
6253      for (Enumeration<PropertyRepresentation> v : this.representation)
6254        if (v.getValue().equals(value)) // code
6255          return true;
6256      return false;
6257    }
6258
6259    /**
6260     * @return {@link #sliceName} (The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getSliceName" gives direct access to the value
6261     */
6262    public StringType getSliceNameElement() { 
6263      if (this.sliceName == null)
6264        if (Configuration.errorOnAutoCreate())
6265          throw new Error("Attempt to auto-create ElementDefinition.sliceName");
6266        else if (Configuration.doAutoCreate())
6267          this.sliceName = new StringType(); // bb
6268      return this.sliceName;
6269    }
6270
6271    public boolean hasSliceNameElement() { 
6272      return this.sliceName != null && !this.sliceName.isEmpty();
6273    }
6274
6275    public boolean hasSliceName() { 
6276      return this.sliceName != null && !this.sliceName.isEmpty();
6277    }
6278
6279    /**
6280     * @param value {@link #sliceName} (The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getSliceName" gives direct access to the value
6281     */
6282    public ElementDefinition setSliceNameElement(StringType value) { 
6283      this.sliceName = value;
6284      return this;
6285    }
6286
6287    /**
6288     * @return The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.
6289     */
6290    public String getSliceName() { 
6291      return this.sliceName == null ? null : this.sliceName.getValue();
6292    }
6293
6294    /**
6295     * @param value The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.
6296     */
6297    public ElementDefinition setSliceName(String value) { 
6298      if (Utilities.noString(value))
6299        this.sliceName = null;
6300      else {
6301        if (this.sliceName == null)
6302          this.sliceName = new StringType();
6303        this.sliceName.setValue(value);
6304      }
6305      return this;
6306    }
6307
6308    /**
6309     * @return {@link #sliceIsConstraining} (If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.). This is the underlying object with id, value and extensions. The accessor "getSliceIsConstraining" gives direct access to the value
6310     */
6311    public BooleanType getSliceIsConstrainingElement() { 
6312      if (this.sliceIsConstraining == null)
6313        if (Configuration.errorOnAutoCreate())
6314          throw new Error("Attempt to auto-create ElementDefinition.sliceIsConstraining");
6315        else if (Configuration.doAutoCreate())
6316          this.sliceIsConstraining = new BooleanType(); // bb
6317      return this.sliceIsConstraining;
6318    }
6319
6320    public boolean hasSliceIsConstrainingElement() { 
6321      return this.sliceIsConstraining != null && !this.sliceIsConstraining.isEmpty();
6322    }
6323
6324    public boolean hasSliceIsConstraining() { 
6325      return this.sliceIsConstraining != null && !this.sliceIsConstraining.isEmpty();
6326    }
6327
6328    /**
6329     * @param value {@link #sliceIsConstraining} (If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.). This is the underlying object with id, value and extensions. The accessor "getSliceIsConstraining" gives direct access to the value
6330     */
6331    public ElementDefinition setSliceIsConstrainingElement(BooleanType value) { 
6332      this.sliceIsConstraining = value;
6333      return this;
6334    }
6335
6336    /**
6337     * @return If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.
6338     */
6339    public boolean getSliceIsConstraining() { 
6340      return this.sliceIsConstraining == null || this.sliceIsConstraining.isEmpty() ? false : this.sliceIsConstraining.getValue();
6341    }
6342
6343    /**
6344     * @param value If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.
6345     */
6346    public ElementDefinition setSliceIsConstraining(boolean value) { 
6347        if (this.sliceIsConstraining == null)
6348          this.sliceIsConstraining = new BooleanType();
6349        this.sliceIsConstraining.setValue(value);
6350      return this;
6351    }
6352
6353    /**
6354     * @return {@link #label} (A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
6355     */
6356    public StringType getLabelElement() { 
6357      if (this.label == null)
6358        if (Configuration.errorOnAutoCreate())
6359          throw new Error("Attempt to auto-create ElementDefinition.label");
6360        else if (Configuration.doAutoCreate())
6361          this.label = new StringType(); // bb
6362      return this.label;
6363    }
6364
6365    public boolean hasLabelElement() { 
6366      return this.label != null && !this.label.isEmpty();
6367    }
6368
6369    public boolean hasLabel() { 
6370      return this.label != null && !this.label.isEmpty();
6371    }
6372
6373    /**
6374     * @param value {@link #label} (A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
6375     */
6376    public ElementDefinition setLabelElement(StringType value) { 
6377      this.label = value;
6378      return this;
6379    }
6380
6381    /**
6382     * @return A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.
6383     */
6384    public String getLabel() { 
6385      return this.label == null ? null : this.label.getValue();
6386    }
6387
6388    /**
6389     * @param value A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.
6390     */
6391    public ElementDefinition setLabel(String value) { 
6392      if (Utilities.noString(value))
6393        this.label = null;
6394      else {
6395        if (this.label == null)
6396          this.label = new StringType();
6397        this.label.setValue(value);
6398      }
6399      return this;
6400    }
6401
6402    /**
6403     * @return {@link #code} (A code that has the same meaning as the element in a particular terminology.)
6404     */
6405    public List<Coding> getCode() { 
6406      if (this.code == null)
6407        this.code = new ArrayList<Coding>();
6408      return this.code;
6409    }
6410
6411    /**
6412     * @return Returns a reference to <code>this</code> for easy method chaining
6413     */
6414    public ElementDefinition setCode(List<Coding> theCode) { 
6415      this.code = theCode;
6416      return this;
6417    }
6418
6419    public boolean hasCode() { 
6420      if (this.code == null)
6421        return false;
6422      for (Coding item : this.code)
6423        if (!item.isEmpty())
6424          return true;
6425      return false;
6426    }
6427
6428    public Coding addCode() { //3
6429      Coding t = new Coding();
6430      if (this.code == null)
6431        this.code = new ArrayList<Coding>();
6432      this.code.add(t);
6433      return t;
6434    }
6435
6436    public ElementDefinition addCode(Coding t) { //3
6437      if (t == null)
6438        return this;
6439      if (this.code == null)
6440        this.code = new ArrayList<Coding>();
6441      this.code.add(t);
6442      return this;
6443    }
6444
6445    /**
6446     * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist {3}
6447     */
6448    public Coding getCodeFirstRep() { 
6449      if (getCode().isEmpty()) {
6450        addCode();
6451      }
6452      return getCode().get(0);
6453    }
6454
6455    /**
6456     * @return {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).)
6457     */
6458    public ElementDefinitionSlicingComponent getSlicing() { 
6459      if (this.slicing == null)
6460        if (Configuration.errorOnAutoCreate())
6461          throw new Error("Attempt to auto-create ElementDefinition.slicing");
6462        else if (Configuration.doAutoCreate())
6463          this.slicing = new ElementDefinitionSlicingComponent(); // cc
6464      return this.slicing;
6465    }
6466
6467    public boolean hasSlicing() { 
6468      return this.slicing != null && !this.slicing.isEmpty();
6469    }
6470
6471    /**
6472     * @param value {@link #slicing} (Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).)
6473     */
6474    public ElementDefinition setSlicing(ElementDefinitionSlicingComponent value) { 
6475      this.slicing = value;
6476      return this;
6477    }
6478
6479    /**
6480     * @return {@link #short_} (A concise description of what this element means (e.g. for use in autogenerated summaries).). This is the underlying object with id, value and extensions. The accessor "getShort" gives direct access to the value
6481     */
6482    public StringType getShortElement() { 
6483      if (this.short_ == null)
6484        if (Configuration.errorOnAutoCreate())
6485          throw new Error("Attempt to auto-create ElementDefinition.short_");
6486        else if (Configuration.doAutoCreate())
6487          this.short_ = new StringType(); // bb
6488      return this.short_;
6489    }
6490
6491    public boolean hasShortElement() { 
6492      return this.short_ != null && !this.short_.isEmpty();
6493    }
6494
6495    public boolean hasShort() { 
6496      return this.short_ != null && !this.short_.isEmpty();
6497    }
6498
6499    /**
6500     * @param value {@link #short_} (A concise description of what this element means (e.g. for use in autogenerated summaries).). This is the underlying object with id, value and extensions. The accessor "getShort" gives direct access to the value
6501     */
6502    public ElementDefinition setShortElement(StringType value) { 
6503      this.short_ = value;
6504      return this;
6505    }
6506
6507    /**
6508     * @return A concise description of what this element means (e.g. for use in autogenerated summaries).
6509     */
6510    public String getShort() { 
6511      return this.short_ == null ? null : this.short_.getValue();
6512    }
6513
6514    /**
6515     * @param value A concise description of what this element means (e.g. for use in autogenerated summaries).
6516     */
6517    public ElementDefinition setShort(String value) { 
6518      if (Utilities.noString(value))
6519        this.short_ = null;
6520      else {
6521        if (this.short_ == null)
6522          this.short_ = new StringType();
6523        this.short_.setValue(value);
6524      }
6525      return this;
6526    }
6527
6528    /**
6529     * @return {@link #definition} (Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
6530     */
6531    public MarkdownType getDefinitionElement() { 
6532      if (this.definition == null)
6533        if (Configuration.errorOnAutoCreate())
6534          throw new Error("Attempt to auto-create ElementDefinition.definition");
6535        else if (Configuration.doAutoCreate())
6536          this.definition = new MarkdownType(); // bb
6537      return this.definition;
6538    }
6539
6540    public boolean hasDefinitionElement() { 
6541      return this.definition != null && !this.definition.isEmpty();
6542    }
6543
6544    public boolean hasDefinition() { 
6545      return this.definition != null && !this.definition.isEmpty();
6546    }
6547
6548    /**
6549     * @param value {@link #definition} (Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
6550     */
6551    public ElementDefinition setDefinitionElement(MarkdownType value) { 
6552      this.definition = value;
6553      return this;
6554    }
6555
6556    /**
6557     * @return Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).
6558     */
6559    public String getDefinition() { 
6560      return this.definition == null ? null : this.definition.getValue();
6561    }
6562
6563    /**
6564     * @param value Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).
6565     */
6566    public ElementDefinition setDefinition(String value) { 
6567      if (Utilities.noString(value))
6568        this.definition = null;
6569      else {
6570        if (this.definition == null)
6571          this.definition = new MarkdownType();
6572        this.definition.setValue(value);
6573      }
6574      return this;
6575    }
6576
6577    /**
6578     * @return {@link #comment} (Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
6579     */
6580    public MarkdownType getCommentElement() { 
6581      if (this.comment == null)
6582        if (Configuration.errorOnAutoCreate())
6583          throw new Error("Attempt to auto-create ElementDefinition.comment");
6584        else if (Configuration.doAutoCreate())
6585          this.comment = new MarkdownType(); // bb
6586      return this.comment;
6587    }
6588
6589    public boolean hasCommentElement() { 
6590      return this.comment != null && !this.comment.isEmpty();
6591    }
6592
6593    public boolean hasComment() { 
6594      return this.comment != null && !this.comment.isEmpty();
6595    }
6596
6597    /**
6598     * @param value {@link #comment} (Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
6599     */
6600    public ElementDefinition setCommentElement(MarkdownType value) { 
6601      this.comment = value;
6602      return this;
6603    }
6604
6605    /**
6606     * @return Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).
6607     */
6608    public String getComment() { 
6609      return this.comment == null ? null : this.comment.getValue();
6610    }
6611
6612    /**
6613     * @param value Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).
6614     */
6615    public ElementDefinition setComment(String value) { 
6616      if (Utilities.noString(value))
6617        this.comment = null;
6618      else {
6619        if (this.comment == null)
6620          this.comment = new MarkdownType();
6621        this.comment.setValue(value);
6622      }
6623      return this;
6624    }
6625
6626    /**
6627     * @return {@link #requirements} (This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value
6628     */
6629    public MarkdownType getRequirementsElement() { 
6630      if (this.requirements == null)
6631        if (Configuration.errorOnAutoCreate())
6632          throw new Error("Attempt to auto-create ElementDefinition.requirements");
6633        else if (Configuration.doAutoCreate())
6634          this.requirements = new MarkdownType(); // bb
6635      return this.requirements;
6636    }
6637
6638    public boolean hasRequirementsElement() { 
6639      return this.requirements != null && !this.requirements.isEmpty();
6640    }
6641
6642    public boolean hasRequirements() { 
6643      return this.requirements != null && !this.requirements.isEmpty();
6644    }
6645
6646    /**
6647     * @param value {@link #requirements} (This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value
6648     */
6649    public ElementDefinition setRequirementsElement(MarkdownType value) { 
6650      this.requirements = value;
6651      return this;
6652    }
6653
6654    /**
6655     * @return This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.
6656     */
6657    public String getRequirements() { 
6658      return this.requirements == null ? null : this.requirements.getValue();
6659    }
6660
6661    /**
6662     * @param value This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.
6663     */
6664    public ElementDefinition setRequirements(String value) { 
6665      if (Utilities.noString(value))
6666        this.requirements = null;
6667      else {
6668        if (this.requirements == null)
6669          this.requirements = new MarkdownType();
6670        this.requirements.setValue(value);
6671      }
6672      return this;
6673    }
6674
6675    /**
6676     * @return {@link #alias} (Identifies additional names by which this element might also be known.)
6677     */
6678    public List<StringType> getAlias() { 
6679      if (this.alias == null)
6680        this.alias = new ArrayList<StringType>();
6681      return this.alias;
6682    }
6683
6684    /**
6685     * @return Returns a reference to <code>this</code> for easy method chaining
6686     */
6687    public ElementDefinition setAlias(List<StringType> theAlias) { 
6688      this.alias = theAlias;
6689      return this;
6690    }
6691
6692    public boolean hasAlias() { 
6693      if (this.alias == null)
6694        return false;
6695      for (StringType item : this.alias)
6696        if (!item.isEmpty())
6697          return true;
6698      return false;
6699    }
6700
6701    /**
6702     * @return {@link #alias} (Identifies additional names by which this element might also be known.)
6703     */
6704    public StringType addAliasElement() {//2 
6705      StringType t = new StringType();
6706      if (this.alias == null)
6707        this.alias = new ArrayList<StringType>();
6708      this.alias.add(t);
6709      return t;
6710    }
6711
6712    /**
6713     * @param value {@link #alias} (Identifies additional names by which this element might also be known.)
6714     */
6715    public ElementDefinition addAlias(String value) { //1
6716      StringType t = new StringType();
6717      t.setValue(value);
6718      if (this.alias == null)
6719        this.alias = new ArrayList<StringType>();
6720      this.alias.add(t);
6721      return this;
6722    }
6723
6724    /**
6725     * @param value {@link #alias} (Identifies additional names by which this element might also be known.)
6726     */
6727    public boolean hasAlias(String value) { 
6728      if (this.alias == null)
6729        return false;
6730      for (StringType v : this.alias)
6731        if (v.getValue().equals(value)) // string
6732          return true;
6733      return false;
6734    }
6735
6736    /**
6737     * @return {@link #min} (The minimum number of times this element SHALL appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value
6738     */
6739    public UnsignedIntType getMinElement() { 
6740      if (this.min == null)
6741        if (Configuration.errorOnAutoCreate())
6742          throw new Error("Attempt to auto-create ElementDefinition.min");
6743        else if (Configuration.doAutoCreate())
6744          this.min = new UnsignedIntType(); // bb
6745      return this.min;
6746    }
6747
6748    public boolean hasMinElement() { 
6749      return this.min != null && !this.min.isEmpty();
6750    }
6751
6752    public boolean hasMin() { 
6753      return this.min != null && !this.min.isEmpty();
6754    }
6755
6756    /**
6757     * @param value {@link #min} (The minimum number of times this element SHALL appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value
6758     */
6759    public ElementDefinition setMinElement(UnsignedIntType value) { 
6760      this.min = value;
6761      return this;
6762    }
6763
6764    /**
6765     * @return The minimum number of times this element SHALL appear in the instance.
6766     */
6767    public int getMin() { 
6768      return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue();
6769    }
6770
6771    /**
6772     * @param value The minimum number of times this element SHALL appear in the instance.
6773     */
6774    public ElementDefinition setMin(int value) { 
6775        if (this.min == null)
6776          this.min = new UnsignedIntType();
6777        this.min.setValue(value);
6778      return this;
6779    }
6780
6781    /**
6782     * @return {@link #max} (The maximum number of times this element is permitted to appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value
6783     */
6784    public StringType getMaxElement() { 
6785      if (this.max == null)
6786        if (Configuration.errorOnAutoCreate())
6787          throw new Error("Attempt to auto-create ElementDefinition.max");
6788        else if (Configuration.doAutoCreate())
6789          this.max = new StringType(); // bb
6790      return this.max;
6791    }
6792
6793    public boolean hasMaxElement() { 
6794      return this.max != null && !this.max.isEmpty();
6795    }
6796
6797    public boolean hasMax() { 
6798      return this.max != null && !this.max.isEmpty();
6799    }
6800
6801    /**
6802     * @param value {@link #max} (The maximum number of times this element is permitted to appear in the instance.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value
6803     */
6804    public ElementDefinition setMaxElement(StringType value) { 
6805      this.max = value;
6806      return this;
6807    }
6808
6809    /**
6810     * @return The maximum number of times this element is permitted to appear in the instance.
6811     */
6812    public String getMax() { 
6813      return this.max == null ? null : this.max.getValue();
6814    }
6815
6816    /**
6817     * @param value The maximum number of times this element is permitted to appear in the instance.
6818     */
6819    public ElementDefinition setMax(String value) { 
6820      if (Utilities.noString(value))
6821        this.max = null;
6822      else {
6823        if (this.max == null)
6824          this.max = new StringType();
6825        this.max.setValue(value);
6826      }
6827      return this;
6828    }
6829
6830    /**
6831     * @return {@link #base} (Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.)
6832     */
6833    public ElementDefinitionBaseComponent getBase() { 
6834      if (this.base == null)
6835        if (Configuration.errorOnAutoCreate())
6836          throw new Error("Attempt to auto-create ElementDefinition.base");
6837        else if (Configuration.doAutoCreate())
6838          this.base = new ElementDefinitionBaseComponent(); // cc
6839      return this.base;
6840    }
6841
6842    public boolean hasBase() { 
6843      return this.base != null && !this.base.isEmpty();
6844    }
6845
6846    /**
6847     * @param value {@link #base} (Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.)
6848     */
6849    public ElementDefinition setBase(ElementDefinitionBaseComponent value) { 
6850      this.base = value;
6851      return this;
6852    }
6853
6854    /**
6855     * @return {@link #contentReference} (Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.). This is the underlying object with id, value and extensions. The accessor "getContentReference" gives direct access to the value
6856     */
6857    public UriType getContentReferenceElement() { 
6858      if (this.contentReference == null)
6859        if (Configuration.errorOnAutoCreate())
6860          throw new Error("Attempt to auto-create ElementDefinition.contentReference");
6861        else if (Configuration.doAutoCreate())
6862          this.contentReference = new UriType(); // bb
6863      return this.contentReference;
6864    }
6865
6866    public boolean hasContentReferenceElement() { 
6867      return this.contentReference != null && !this.contentReference.isEmpty();
6868    }
6869
6870    public boolean hasContentReference() { 
6871      return this.contentReference != null && !this.contentReference.isEmpty();
6872    }
6873
6874    /**
6875     * @param value {@link #contentReference} (Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.). This is the underlying object with id, value and extensions. The accessor "getContentReference" gives direct access to the value
6876     */
6877    public ElementDefinition setContentReferenceElement(UriType value) { 
6878      this.contentReference = value;
6879      return this;
6880    }
6881
6882    /**
6883     * @return Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.
6884     */
6885    public String getContentReference() { 
6886      return this.contentReference == null ? null : this.contentReference.getValue();
6887    }
6888
6889    /**
6890     * @param value Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.
6891     */
6892    public ElementDefinition setContentReference(String value) { 
6893      if (Utilities.noString(value))
6894        this.contentReference = null;
6895      else {
6896        if (this.contentReference == null)
6897          this.contentReference = new UriType();
6898        this.contentReference.setValue(value);
6899      }
6900      return this;
6901    }
6902
6903    /**
6904     * @return {@link #type} (The data type or resource that the value of this element is permitted to be.)
6905     */
6906    public List<TypeRefComponent> getType() { 
6907      if (this.type == null)
6908        this.type = new ArrayList<TypeRefComponent>();
6909      return this.type;
6910    }
6911
6912    /**
6913     * @return Returns a reference to <code>this</code> for easy method chaining
6914     */
6915    public ElementDefinition setType(List<TypeRefComponent> theType) { 
6916      this.type = theType;
6917      return this;
6918    }
6919
6920    public boolean hasType() { 
6921      if (this.type == null)
6922        return false;
6923      for (TypeRefComponent item : this.type)
6924        if (!item.isEmpty())
6925          return true;
6926      return false;
6927    }
6928
6929    public TypeRefComponent addType() { //3
6930      TypeRefComponent t = new TypeRefComponent();
6931      if (this.type == null)
6932        this.type = new ArrayList<TypeRefComponent>();
6933      this.type.add(t);
6934      return t;
6935    }
6936
6937    public ElementDefinition addType(TypeRefComponent t) { //3
6938      if (t == null)
6939        return this;
6940      if (this.type == null)
6941        this.type = new ArrayList<TypeRefComponent>();
6942      this.type.add(t);
6943      return this;
6944    }
6945
6946    /**
6947     * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3}
6948     */
6949    public TypeRefComponent getTypeFirstRep() { 
6950      if (getType().isEmpty()) {
6951        addType();
6952      }
6953      return getType().get(0);
6954    }
6955
6956    /**
6957     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
6958     */
6959    public DataType getDefaultValue() { 
6960      return this.defaultValue;
6961    }
6962
6963    /**
6964     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
6965     */
6966    public Base64BinaryType getDefaultValueBase64BinaryType() throws FHIRException { 
6967      if (this.defaultValue == null)
6968        this.defaultValue = new Base64BinaryType();
6969      if (!(this.defaultValue instanceof Base64BinaryType))
6970        throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6971      return (Base64BinaryType) this.defaultValue;
6972    }
6973
6974    public boolean hasDefaultValueBase64BinaryType() { 
6975      return this != null && this.defaultValue instanceof Base64BinaryType;
6976    }
6977
6978    /**
6979     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
6980     */
6981    public BooleanType getDefaultValueBooleanType() throws FHIRException { 
6982      if (this.defaultValue == null)
6983        this.defaultValue = new BooleanType();
6984      if (!(this.defaultValue instanceof BooleanType))
6985        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6986      return (BooleanType) this.defaultValue;
6987    }
6988
6989    public boolean hasDefaultValueBooleanType() { 
6990      return this != null && this.defaultValue instanceof BooleanType;
6991    }
6992
6993    /**
6994     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
6995     */
6996    public CanonicalType getDefaultValueCanonicalType() throws FHIRException { 
6997      if (this.defaultValue == null)
6998        this.defaultValue = new CanonicalType();
6999      if (!(this.defaultValue instanceof CanonicalType))
7000        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7001      return (CanonicalType) this.defaultValue;
7002    }
7003
7004    public boolean hasDefaultValueCanonicalType() { 
7005      return this != null && this.defaultValue instanceof CanonicalType;
7006    }
7007
7008    /**
7009     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7010     */
7011    public CodeType getDefaultValueCodeType() throws FHIRException { 
7012      if (this.defaultValue == null)
7013        this.defaultValue = new CodeType();
7014      if (!(this.defaultValue instanceof CodeType))
7015        throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7016      return (CodeType) this.defaultValue;
7017    }
7018
7019    public boolean hasDefaultValueCodeType() { 
7020      return this != null && this.defaultValue instanceof CodeType;
7021    }
7022
7023    /**
7024     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7025     */
7026    public DateType getDefaultValueDateType() throws FHIRException { 
7027      if (this.defaultValue == null)
7028        this.defaultValue = new DateType();
7029      if (!(this.defaultValue instanceof DateType))
7030        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7031      return (DateType) this.defaultValue;
7032    }
7033
7034    public boolean hasDefaultValueDateType() { 
7035      return this != null && this.defaultValue instanceof DateType;
7036    }
7037
7038    /**
7039     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7040     */
7041    public DateTimeType getDefaultValueDateTimeType() throws FHIRException { 
7042      if (this.defaultValue == null)
7043        this.defaultValue = new DateTimeType();
7044      if (!(this.defaultValue instanceof DateTimeType))
7045        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7046      return (DateTimeType) this.defaultValue;
7047    }
7048
7049    public boolean hasDefaultValueDateTimeType() { 
7050      return this != null && this.defaultValue instanceof DateTimeType;
7051    }
7052
7053    /**
7054     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7055     */
7056    public DecimalType getDefaultValueDecimalType() throws FHIRException { 
7057      if (this.defaultValue == null)
7058        this.defaultValue = new DecimalType();
7059      if (!(this.defaultValue instanceof DecimalType))
7060        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7061      return (DecimalType) this.defaultValue;
7062    }
7063
7064    public boolean hasDefaultValueDecimalType() { 
7065      return this != null && this.defaultValue instanceof DecimalType;
7066    }
7067
7068    /**
7069     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7070     */
7071    public IdType getDefaultValueIdType() throws FHIRException { 
7072      if (this.defaultValue == null)
7073        this.defaultValue = new IdType();
7074      if (!(this.defaultValue instanceof IdType))
7075        throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7076      return (IdType) this.defaultValue;
7077    }
7078
7079    public boolean hasDefaultValueIdType() { 
7080      return this != null && this.defaultValue instanceof IdType;
7081    }
7082
7083    /**
7084     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7085     */
7086    public InstantType getDefaultValueInstantType() throws FHIRException { 
7087      if (this.defaultValue == null)
7088        this.defaultValue = new InstantType();
7089      if (!(this.defaultValue instanceof InstantType))
7090        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7091      return (InstantType) this.defaultValue;
7092    }
7093
7094    public boolean hasDefaultValueInstantType() { 
7095      return this != null && this.defaultValue instanceof InstantType;
7096    }
7097
7098    /**
7099     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7100     */
7101    public IntegerType getDefaultValueIntegerType() throws FHIRException { 
7102      if (this.defaultValue == null)
7103        this.defaultValue = new IntegerType();
7104      if (!(this.defaultValue instanceof IntegerType))
7105        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7106      return (IntegerType) this.defaultValue;
7107    }
7108
7109    public boolean hasDefaultValueIntegerType() { 
7110      return this != null && this.defaultValue instanceof IntegerType;
7111    }
7112
7113    /**
7114     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7115     */
7116    public Integer64Type getDefaultValueInteger64Type() throws FHIRException { 
7117      if (this.defaultValue == null)
7118        this.defaultValue = new Integer64Type();
7119      if (!(this.defaultValue instanceof Integer64Type))
7120        throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7121      return (Integer64Type) this.defaultValue;
7122    }
7123
7124    public boolean hasDefaultValueInteger64Type() { 
7125      return this != null && this.defaultValue instanceof Integer64Type;
7126    }
7127
7128    /**
7129     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7130     */
7131    public MarkdownType getDefaultValueMarkdownType() throws FHIRException { 
7132      if (this.defaultValue == null)
7133        this.defaultValue = new MarkdownType();
7134      if (!(this.defaultValue instanceof MarkdownType))
7135        throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7136      return (MarkdownType) this.defaultValue;
7137    }
7138
7139    public boolean hasDefaultValueMarkdownType() { 
7140      return this != null && this.defaultValue instanceof MarkdownType;
7141    }
7142
7143    /**
7144     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7145     */
7146    public OidType getDefaultValueOidType() throws FHIRException { 
7147      if (this.defaultValue == null)
7148        this.defaultValue = new OidType();
7149      if (!(this.defaultValue instanceof OidType))
7150        throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7151      return (OidType) this.defaultValue;
7152    }
7153
7154    public boolean hasDefaultValueOidType() { 
7155      return this != null && this.defaultValue instanceof OidType;
7156    }
7157
7158    /**
7159     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7160     */
7161    public PositiveIntType getDefaultValuePositiveIntType() throws FHIRException { 
7162      if (this.defaultValue == null)
7163        this.defaultValue = new PositiveIntType();
7164      if (!(this.defaultValue instanceof PositiveIntType))
7165        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7166      return (PositiveIntType) this.defaultValue;
7167    }
7168
7169    public boolean hasDefaultValuePositiveIntType() { 
7170      return this != null && this.defaultValue instanceof PositiveIntType;
7171    }
7172
7173    /**
7174     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7175     */
7176    public StringType getDefaultValueStringType() throws FHIRException { 
7177      if (this.defaultValue == null)
7178        this.defaultValue = new StringType();
7179      if (!(this.defaultValue instanceof StringType))
7180        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7181      return (StringType) this.defaultValue;
7182    }
7183
7184    public boolean hasDefaultValueStringType() { 
7185      return this != null && this.defaultValue instanceof StringType;
7186    }
7187
7188    /**
7189     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7190     */
7191    public TimeType getDefaultValueTimeType() throws FHIRException { 
7192      if (this.defaultValue == null)
7193        this.defaultValue = new TimeType();
7194      if (!(this.defaultValue instanceof TimeType))
7195        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7196      return (TimeType) this.defaultValue;
7197    }
7198
7199    public boolean hasDefaultValueTimeType() { 
7200      return this != null && this.defaultValue instanceof TimeType;
7201    }
7202
7203    /**
7204     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7205     */
7206    public UnsignedIntType getDefaultValueUnsignedIntType() throws FHIRException { 
7207      if (this.defaultValue == null)
7208        this.defaultValue = new UnsignedIntType();
7209      if (!(this.defaultValue instanceof UnsignedIntType))
7210        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7211      return (UnsignedIntType) this.defaultValue;
7212    }
7213
7214    public boolean hasDefaultValueUnsignedIntType() { 
7215      return this != null && this.defaultValue instanceof UnsignedIntType;
7216    }
7217
7218    /**
7219     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7220     */
7221    public UriType getDefaultValueUriType() throws FHIRException { 
7222      if (this.defaultValue == null)
7223        this.defaultValue = new UriType();
7224      if (!(this.defaultValue instanceof UriType))
7225        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7226      return (UriType) this.defaultValue;
7227    }
7228
7229    public boolean hasDefaultValueUriType() { 
7230      return this != null && this.defaultValue instanceof UriType;
7231    }
7232
7233    /**
7234     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7235     */
7236    public UrlType getDefaultValueUrlType() throws FHIRException { 
7237      if (this.defaultValue == null)
7238        this.defaultValue = new UrlType();
7239      if (!(this.defaultValue instanceof UrlType))
7240        throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7241      return (UrlType) this.defaultValue;
7242    }
7243
7244    public boolean hasDefaultValueUrlType() { 
7245      return this != null && this.defaultValue instanceof UrlType;
7246    }
7247
7248    /**
7249     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7250     */
7251    public UuidType getDefaultValueUuidType() throws FHIRException { 
7252      if (this.defaultValue == null)
7253        this.defaultValue = new UuidType();
7254      if (!(this.defaultValue instanceof UuidType))
7255        throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7256      return (UuidType) this.defaultValue;
7257    }
7258
7259    public boolean hasDefaultValueUuidType() { 
7260      return this != null && this.defaultValue instanceof UuidType;
7261    }
7262
7263    /**
7264     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7265     */
7266    public Address getDefaultValueAddress() throws FHIRException { 
7267      if (this.defaultValue == null)
7268        this.defaultValue = new Address();
7269      if (!(this.defaultValue instanceof Address))
7270        throw new FHIRException("Type mismatch: the type Address was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7271      return (Address) this.defaultValue;
7272    }
7273
7274    public boolean hasDefaultValueAddress() { 
7275      return this != null && this.defaultValue instanceof Address;
7276    }
7277
7278    /**
7279     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7280     */
7281    public Age getDefaultValueAge() throws FHIRException { 
7282      if (this.defaultValue == null)
7283        this.defaultValue = new Age();
7284      if (!(this.defaultValue instanceof Age))
7285        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7286      return (Age) this.defaultValue;
7287    }
7288
7289    public boolean hasDefaultValueAge() { 
7290      return this != null && this.defaultValue instanceof Age;
7291    }
7292
7293    /**
7294     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7295     */
7296    public Annotation getDefaultValueAnnotation() throws FHIRException { 
7297      if (this.defaultValue == null)
7298        this.defaultValue = new Annotation();
7299      if (!(this.defaultValue instanceof Annotation))
7300        throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7301      return (Annotation) this.defaultValue;
7302    }
7303
7304    public boolean hasDefaultValueAnnotation() { 
7305      return this != null && this.defaultValue instanceof Annotation;
7306    }
7307
7308    /**
7309     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7310     */
7311    public Attachment getDefaultValueAttachment() throws FHIRException { 
7312      if (this.defaultValue == null)
7313        this.defaultValue = new Attachment();
7314      if (!(this.defaultValue instanceof Attachment))
7315        throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7316      return (Attachment) this.defaultValue;
7317    }
7318
7319    public boolean hasDefaultValueAttachment() { 
7320      return this != null && this.defaultValue instanceof Attachment;
7321    }
7322
7323    /**
7324     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7325     */
7326    public CodeableConcept getDefaultValueCodeableConcept() throws FHIRException { 
7327      if (this.defaultValue == null)
7328        this.defaultValue = new CodeableConcept();
7329      if (!(this.defaultValue instanceof CodeableConcept))
7330        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7331      return (CodeableConcept) this.defaultValue;
7332    }
7333
7334    public boolean hasDefaultValueCodeableConcept() { 
7335      return this != null && this.defaultValue instanceof CodeableConcept;
7336    }
7337
7338    /**
7339     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7340     */
7341    public CodeableReference getDefaultValueCodeableReference() throws FHIRException { 
7342      if (this.defaultValue == null)
7343        this.defaultValue = new CodeableReference();
7344      if (!(this.defaultValue instanceof CodeableReference))
7345        throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7346      return (CodeableReference) this.defaultValue;
7347    }
7348
7349    public boolean hasDefaultValueCodeableReference() { 
7350      return this != null && this.defaultValue instanceof CodeableReference;
7351    }
7352
7353    /**
7354     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7355     */
7356    public Coding getDefaultValueCoding() throws FHIRException { 
7357      if (this.defaultValue == null)
7358        this.defaultValue = new Coding();
7359      if (!(this.defaultValue instanceof Coding))
7360        throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7361      return (Coding) this.defaultValue;
7362    }
7363
7364    public boolean hasDefaultValueCoding() { 
7365      return this != null && this.defaultValue instanceof Coding;
7366    }
7367
7368    /**
7369     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7370     */
7371    public ContactPoint getDefaultValueContactPoint() throws FHIRException { 
7372      if (this.defaultValue == null)
7373        this.defaultValue = new ContactPoint();
7374      if (!(this.defaultValue instanceof ContactPoint))
7375        throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7376      return (ContactPoint) this.defaultValue;
7377    }
7378
7379    public boolean hasDefaultValueContactPoint() { 
7380      return this != null && this.defaultValue instanceof ContactPoint;
7381    }
7382
7383    /**
7384     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7385     */
7386    public Count getDefaultValueCount() throws FHIRException { 
7387      if (this.defaultValue == null)
7388        this.defaultValue = new Count();
7389      if (!(this.defaultValue instanceof Count))
7390        throw new FHIRException("Type mismatch: the type Count was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7391      return (Count) this.defaultValue;
7392    }
7393
7394    public boolean hasDefaultValueCount() { 
7395      return this != null && this.defaultValue instanceof Count;
7396    }
7397
7398    /**
7399     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7400     */
7401    public Distance getDefaultValueDistance() throws FHIRException { 
7402      if (this.defaultValue == null)
7403        this.defaultValue = new Distance();
7404      if (!(this.defaultValue instanceof Distance))
7405        throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7406      return (Distance) this.defaultValue;
7407    }
7408
7409    public boolean hasDefaultValueDistance() { 
7410      return this != null && this.defaultValue instanceof Distance;
7411    }
7412
7413    /**
7414     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7415     */
7416    public Duration getDefaultValueDuration() throws FHIRException { 
7417      if (this.defaultValue == null)
7418        this.defaultValue = new Duration();
7419      if (!(this.defaultValue instanceof Duration))
7420        throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7421      return (Duration) this.defaultValue;
7422    }
7423
7424    public boolean hasDefaultValueDuration() { 
7425      return this != null && this.defaultValue instanceof Duration;
7426    }
7427
7428    /**
7429     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7430     */
7431    public HumanName getDefaultValueHumanName() throws FHIRException { 
7432      if (this.defaultValue == null)
7433        this.defaultValue = new HumanName();
7434      if (!(this.defaultValue instanceof HumanName))
7435        throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7436      return (HumanName) this.defaultValue;
7437    }
7438
7439    public boolean hasDefaultValueHumanName() { 
7440      return this != null && this.defaultValue instanceof HumanName;
7441    }
7442
7443    /**
7444     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7445     */
7446    public Identifier getDefaultValueIdentifier() throws FHIRException { 
7447      if (this.defaultValue == null)
7448        this.defaultValue = new Identifier();
7449      if (!(this.defaultValue instanceof Identifier))
7450        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7451      return (Identifier) this.defaultValue;
7452    }
7453
7454    public boolean hasDefaultValueIdentifier() { 
7455      return this != null && this.defaultValue instanceof Identifier;
7456    }
7457
7458    /**
7459     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7460     */
7461    public Money getDefaultValueMoney() throws FHIRException { 
7462      if (this.defaultValue == null)
7463        this.defaultValue = new Money();
7464      if (!(this.defaultValue instanceof Money))
7465        throw new FHIRException("Type mismatch: the type Money was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7466      return (Money) this.defaultValue;
7467    }
7468
7469    public boolean hasDefaultValueMoney() { 
7470      return this != null && this.defaultValue instanceof Money;
7471    }
7472
7473    /**
7474     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7475     */
7476    public Period getDefaultValuePeriod() throws FHIRException { 
7477      if (this.defaultValue == null)
7478        this.defaultValue = new Period();
7479      if (!(this.defaultValue instanceof Period))
7480        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7481      return (Period) this.defaultValue;
7482    }
7483
7484    public boolean hasDefaultValuePeriod() { 
7485      return this != null && this.defaultValue instanceof Period;
7486    }
7487
7488    /**
7489     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7490     */
7491    public Quantity getDefaultValueQuantity() throws FHIRException { 
7492      if (this.defaultValue == null)
7493        this.defaultValue = new Quantity();
7494      if (!(this.defaultValue instanceof Quantity))
7495        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7496      return (Quantity) this.defaultValue;
7497    }
7498
7499    public boolean hasDefaultValueQuantity() { 
7500      return this != null && this.defaultValue instanceof Quantity;
7501    }
7502
7503    /**
7504     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7505     */
7506    public Range getDefaultValueRange() throws FHIRException { 
7507      if (this.defaultValue == null)
7508        this.defaultValue = new Range();
7509      if (!(this.defaultValue instanceof Range))
7510        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7511      return (Range) this.defaultValue;
7512    }
7513
7514    public boolean hasDefaultValueRange() { 
7515      return this != null && this.defaultValue instanceof Range;
7516    }
7517
7518    /**
7519     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7520     */
7521    public Ratio getDefaultValueRatio() throws FHIRException { 
7522      if (this.defaultValue == null)
7523        this.defaultValue = new Ratio();
7524      if (!(this.defaultValue instanceof Ratio))
7525        throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7526      return (Ratio) this.defaultValue;
7527    }
7528
7529    public boolean hasDefaultValueRatio() { 
7530      return this != null && this.defaultValue instanceof Ratio;
7531    }
7532
7533    /**
7534     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7535     */
7536    public RatioRange getDefaultValueRatioRange() throws FHIRException { 
7537      if (this.defaultValue == null)
7538        this.defaultValue = new RatioRange();
7539      if (!(this.defaultValue instanceof RatioRange))
7540        throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7541      return (RatioRange) this.defaultValue;
7542    }
7543
7544    public boolean hasDefaultValueRatioRange() { 
7545      return this != null && this.defaultValue instanceof RatioRange;
7546    }
7547
7548    /**
7549     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7550     */
7551    public Reference getDefaultValueReference() throws FHIRException { 
7552      if (this.defaultValue == null)
7553        this.defaultValue = new Reference();
7554      if (!(this.defaultValue instanceof Reference))
7555        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7556      return (Reference) this.defaultValue;
7557    }
7558
7559    public boolean hasDefaultValueReference() { 
7560      return this != null && this.defaultValue instanceof Reference;
7561    }
7562
7563    /**
7564     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7565     */
7566    public SampledData getDefaultValueSampledData() throws FHIRException { 
7567      if (this.defaultValue == null)
7568        this.defaultValue = new SampledData();
7569      if (!(this.defaultValue instanceof SampledData))
7570        throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7571      return (SampledData) this.defaultValue;
7572    }
7573
7574    public boolean hasDefaultValueSampledData() { 
7575      return this != null && this.defaultValue instanceof SampledData;
7576    }
7577
7578    /**
7579     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7580     */
7581    public Signature getDefaultValueSignature() throws FHIRException { 
7582      if (this.defaultValue == null)
7583        this.defaultValue = new Signature();
7584      if (!(this.defaultValue instanceof Signature))
7585        throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7586      return (Signature) this.defaultValue;
7587    }
7588
7589    public boolean hasDefaultValueSignature() { 
7590      return this != null && this.defaultValue instanceof Signature;
7591    }
7592
7593    /**
7594     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7595     */
7596    public Timing getDefaultValueTiming() throws FHIRException { 
7597      if (this.defaultValue == null)
7598        this.defaultValue = new Timing();
7599      if (!(this.defaultValue instanceof Timing))
7600        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7601      return (Timing) this.defaultValue;
7602    }
7603
7604    public boolean hasDefaultValueTiming() { 
7605      return this != null && this.defaultValue instanceof Timing;
7606    }
7607
7608    /**
7609     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7610     */
7611    public ContactDetail getDefaultValueContactDetail() throws FHIRException { 
7612      if (this.defaultValue == null)
7613        this.defaultValue = new ContactDetail();
7614      if (!(this.defaultValue instanceof ContactDetail))
7615        throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7616      return (ContactDetail) this.defaultValue;
7617    }
7618
7619    public boolean hasDefaultValueContactDetail() { 
7620      return this != null && this.defaultValue instanceof ContactDetail;
7621    }
7622
7623    /**
7624     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7625     */
7626    public DataRequirement getDefaultValueDataRequirement() throws FHIRException { 
7627      if (this.defaultValue == null)
7628        this.defaultValue = new DataRequirement();
7629      if (!(this.defaultValue instanceof DataRequirement))
7630        throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7631      return (DataRequirement) this.defaultValue;
7632    }
7633
7634    public boolean hasDefaultValueDataRequirement() { 
7635      return this != null && this.defaultValue instanceof DataRequirement;
7636    }
7637
7638    /**
7639     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7640     */
7641    public Expression getDefaultValueExpression() throws FHIRException { 
7642      if (this.defaultValue == null)
7643        this.defaultValue = new Expression();
7644      if (!(this.defaultValue instanceof Expression))
7645        throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7646      return (Expression) this.defaultValue;
7647    }
7648
7649    public boolean hasDefaultValueExpression() { 
7650      return this != null && this.defaultValue instanceof Expression;
7651    }
7652
7653    /**
7654     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7655     */
7656    public ParameterDefinition getDefaultValueParameterDefinition() throws FHIRException { 
7657      if (this.defaultValue == null)
7658        this.defaultValue = new ParameterDefinition();
7659      if (!(this.defaultValue instanceof ParameterDefinition))
7660        throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7661      return (ParameterDefinition) this.defaultValue;
7662    }
7663
7664    public boolean hasDefaultValueParameterDefinition() { 
7665      return this != null && this.defaultValue instanceof ParameterDefinition;
7666    }
7667
7668    /**
7669     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7670     */
7671    public RelatedArtifact getDefaultValueRelatedArtifact() throws FHIRException { 
7672      if (this.defaultValue == null)
7673        this.defaultValue = new RelatedArtifact();
7674      if (!(this.defaultValue instanceof RelatedArtifact))
7675        throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7676      return (RelatedArtifact) this.defaultValue;
7677    }
7678
7679    public boolean hasDefaultValueRelatedArtifact() { 
7680      return this != null && this.defaultValue instanceof RelatedArtifact;
7681    }
7682
7683    /**
7684     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7685     */
7686    public TriggerDefinition getDefaultValueTriggerDefinition() throws FHIRException { 
7687      if (this.defaultValue == null)
7688        this.defaultValue = new TriggerDefinition();
7689      if (!(this.defaultValue instanceof TriggerDefinition))
7690        throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7691      return (TriggerDefinition) this.defaultValue;
7692    }
7693
7694    public boolean hasDefaultValueTriggerDefinition() { 
7695      return this != null && this.defaultValue instanceof TriggerDefinition;
7696    }
7697
7698    /**
7699     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7700     */
7701    public UsageContext getDefaultValueUsageContext() throws FHIRException { 
7702      if (this.defaultValue == null)
7703        this.defaultValue = new UsageContext();
7704      if (!(this.defaultValue instanceof UsageContext))
7705        throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7706      return (UsageContext) this.defaultValue;
7707    }
7708
7709    public boolean hasDefaultValueUsageContext() { 
7710      return this != null && this.defaultValue instanceof UsageContext;
7711    }
7712
7713    /**
7714     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7715     */
7716    public Availability getDefaultValueAvailability() throws FHIRException { 
7717      if (this.defaultValue == null)
7718        this.defaultValue = new Availability();
7719      if (!(this.defaultValue instanceof Availability))
7720        throw new FHIRException("Type mismatch: the type Availability was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7721      return (Availability) this.defaultValue;
7722    }
7723
7724    public boolean hasDefaultValueAvailability() { 
7725      return this != null && this.defaultValue instanceof Availability;
7726    }
7727
7728    /**
7729     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7730     */
7731    public ExtendedContactDetail getDefaultValueExtendedContactDetail() throws FHIRException { 
7732      if (this.defaultValue == null)
7733        this.defaultValue = new ExtendedContactDetail();
7734      if (!(this.defaultValue instanceof ExtendedContactDetail))
7735        throw new FHIRException("Type mismatch: the type ExtendedContactDetail was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7736      return (ExtendedContactDetail) this.defaultValue;
7737    }
7738
7739    public boolean hasDefaultValueExtendedContactDetail() { 
7740      return this != null && this.defaultValue instanceof ExtendedContactDetail;
7741    }
7742
7743    /**
7744     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7745     */
7746    public Dosage getDefaultValueDosage() throws FHIRException { 
7747      if (this.defaultValue == null)
7748        this.defaultValue = new Dosage();
7749      if (!(this.defaultValue instanceof Dosage))
7750        throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7751      return (Dosage) this.defaultValue;
7752    }
7753
7754    public boolean hasDefaultValueDosage() { 
7755      return this != null && this.defaultValue instanceof Dosage;
7756    }
7757
7758    /**
7759     * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7760     */
7761    public Meta getDefaultValueMeta() throws FHIRException { 
7762      if (this.defaultValue == null)
7763        this.defaultValue = new Meta();
7764      if (!(this.defaultValue instanceof Meta))
7765        throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
7766      return (Meta) this.defaultValue;
7767    }
7768
7769    public boolean hasDefaultValueMeta() { 
7770      return this != null && this.defaultValue instanceof Meta;
7771    }
7772
7773    public boolean hasDefaultValue() { 
7774      return this.defaultValue != null && !this.defaultValue.isEmpty();
7775    }
7776
7777    /**
7778     * @param value {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').)
7779     */
7780    public ElementDefinition setDefaultValue(DataType value) { 
7781      if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof CodeableReference || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof RatioRange || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Availability || value instanceof ExtendedContactDetail || value instanceof Dosage || value instanceof Meta))
7782        throw new FHIRException("Not the right type for ElementDefinition.defaultValue[x]: "+value.fhirType());
7783      this.defaultValue = value;
7784      return this;
7785    }
7786
7787    /**
7788     * @return {@link #meaningWhenMissing} (The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').). This is the underlying object with id, value and extensions. The accessor "getMeaningWhenMissing" gives direct access to the value
7789     */
7790    public MarkdownType getMeaningWhenMissingElement() { 
7791      if (this.meaningWhenMissing == null)
7792        if (Configuration.errorOnAutoCreate())
7793          throw new Error("Attempt to auto-create ElementDefinition.meaningWhenMissing");
7794        else if (Configuration.doAutoCreate())
7795          this.meaningWhenMissing = new MarkdownType(); // bb
7796      return this.meaningWhenMissing;
7797    }
7798
7799    public boolean hasMeaningWhenMissingElement() { 
7800      return this.meaningWhenMissing != null && !this.meaningWhenMissing.isEmpty();
7801    }
7802
7803    public boolean hasMeaningWhenMissing() { 
7804      return this.meaningWhenMissing != null && !this.meaningWhenMissing.isEmpty();
7805    }
7806
7807    /**
7808     * @param value {@link #meaningWhenMissing} (The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').). This is the underlying object with id, value and extensions. The accessor "getMeaningWhenMissing" gives direct access to the value
7809     */
7810    public ElementDefinition setMeaningWhenMissingElement(MarkdownType value) { 
7811      this.meaningWhenMissing = value;
7812      return this;
7813    }
7814
7815    /**
7816     * @return The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').
7817     */
7818    public String getMeaningWhenMissing() { 
7819      return this.meaningWhenMissing == null ? null : this.meaningWhenMissing.getValue();
7820    }
7821
7822    /**
7823     * @param value The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').
7824     */
7825    public ElementDefinition setMeaningWhenMissing(String value) { 
7826      if (Utilities.noString(value))
7827        this.meaningWhenMissing = null;
7828      else {
7829        if (this.meaningWhenMissing == null)
7830          this.meaningWhenMissing = new MarkdownType();
7831        this.meaningWhenMissing.setValue(value);
7832      }
7833      return this;
7834    }
7835
7836    /**
7837     * @return {@link #orderMeaning} (If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning.). This is the underlying object with id, value and extensions. The accessor "getOrderMeaning" gives direct access to the value
7838     */
7839    public StringType getOrderMeaningElement() { 
7840      if (this.orderMeaning == null)
7841        if (Configuration.errorOnAutoCreate())
7842          throw new Error("Attempt to auto-create ElementDefinition.orderMeaning");
7843        else if (Configuration.doAutoCreate())
7844          this.orderMeaning = new StringType(); // bb
7845      return this.orderMeaning;
7846    }
7847
7848    public boolean hasOrderMeaningElement() { 
7849      return this.orderMeaning != null && !this.orderMeaning.isEmpty();
7850    }
7851
7852    public boolean hasOrderMeaning() { 
7853      return this.orderMeaning != null && !this.orderMeaning.isEmpty();
7854    }
7855
7856    /**
7857     * @param value {@link #orderMeaning} (If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning.). This is the underlying object with id, value and extensions. The accessor "getOrderMeaning" gives direct access to the value
7858     */
7859    public ElementDefinition setOrderMeaningElement(StringType value) { 
7860      this.orderMeaning = value;
7861      return this;
7862    }
7863
7864    /**
7865     * @return If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning.
7866     */
7867    public String getOrderMeaning() { 
7868      return this.orderMeaning == null ? null : this.orderMeaning.getValue();
7869    }
7870
7871    /**
7872     * @param value If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning.
7873     */
7874    public ElementDefinition setOrderMeaning(String value) { 
7875      if (Utilities.noString(value))
7876        this.orderMeaning = null;
7877      else {
7878        if (this.orderMeaning == null)
7879          this.orderMeaning = new StringType();
7880        this.orderMeaning.setValue(value);
7881      }
7882      return this;
7883    }
7884
7885    /**
7886     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
7887     */
7888    public DataType getFixed() { 
7889      return this.fixed;
7890    }
7891
7892    /**
7893     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
7894     */
7895    public Base64BinaryType getFixedBase64BinaryType() throws FHIRException { 
7896      if (this.fixed == null)
7897        this.fixed = new Base64BinaryType();
7898      if (!(this.fixed instanceof Base64BinaryType))
7899        throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7900      return (Base64BinaryType) this.fixed;
7901    }
7902
7903    public boolean hasFixedBase64BinaryType() { 
7904      return this != null && this.fixed instanceof Base64BinaryType;
7905    }
7906
7907    /**
7908     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
7909     */
7910    public BooleanType getFixedBooleanType() throws FHIRException { 
7911      if (this.fixed == null)
7912        this.fixed = new BooleanType();
7913      if (!(this.fixed instanceof BooleanType))
7914        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7915      return (BooleanType) this.fixed;
7916    }
7917
7918    public boolean hasFixedBooleanType() { 
7919      return this != null && this.fixed instanceof BooleanType;
7920    }
7921
7922    /**
7923     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
7924     */
7925    public CanonicalType getFixedCanonicalType() throws FHIRException { 
7926      if (this.fixed == null)
7927        this.fixed = new CanonicalType();
7928      if (!(this.fixed instanceof CanonicalType))
7929        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7930      return (CanonicalType) this.fixed;
7931    }
7932
7933    public boolean hasFixedCanonicalType() { 
7934      return this != null && this.fixed instanceof CanonicalType;
7935    }
7936
7937    /**
7938     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
7939     */
7940    public CodeType getFixedCodeType() throws FHIRException { 
7941      if (this.fixed == null)
7942        this.fixed = new CodeType();
7943      if (!(this.fixed instanceof CodeType))
7944        throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7945      return (CodeType) this.fixed;
7946    }
7947
7948    public boolean hasFixedCodeType() { 
7949      return this != null && this.fixed instanceof CodeType;
7950    }
7951
7952    /**
7953     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
7954     */
7955    public DateType getFixedDateType() throws FHIRException { 
7956      if (this.fixed == null)
7957        this.fixed = new DateType();
7958      if (!(this.fixed instanceof DateType))
7959        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7960      return (DateType) this.fixed;
7961    }
7962
7963    public boolean hasFixedDateType() { 
7964      return this != null && this.fixed instanceof DateType;
7965    }
7966
7967    /**
7968     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
7969     */
7970    public DateTimeType getFixedDateTimeType() throws FHIRException { 
7971      if (this.fixed == null)
7972        this.fixed = new DateTimeType();
7973      if (!(this.fixed instanceof DateTimeType))
7974        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7975      return (DateTimeType) this.fixed;
7976    }
7977
7978    public boolean hasFixedDateTimeType() { 
7979      return this != null && this.fixed instanceof DateTimeType;
7980    }
7981
7982    /**
7983     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
7984     */
7985    public DecimalType getFixedDecimalType() throws FHIRException { 
7986      if (this.fixed == null)
7987        this.fixed = new DecimalType();
7988      if (!(this.fixed instanceof DecimalType))
7989        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7990      return (DecimalType) this.fixed;
7991    }
7992
7993    public boolean hasFixedDecimalType() { 
7994      return this != null && this.fixed instanceof DecimalType;
7995    }
7996
7997    /**
7998     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
7999     */
8000    public IdType getFixedIdType() throws FHIRException { 
8001      if (this.fixed == null)
8002        this.fixed = new IdType();
8003      if (!(this.fixed instanceof IdType))
8004        throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8005      return (IdType) this.fixed;
8006    }
8007
8008    public boolean hasFixedIdType() { 
8009      return this != null && this.fixed instanceof IdType;
8010    }
8011
8012    /**
8013     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8014     */
8015    public InstantType getFixedInstantType() throws FHIRException { 
8016      if (this.fixed == null)
8017        this.fixed = new InstantType();
8018      if (!(this.fixed instanceof InstantType))
8019        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8020      return (InstantType) this.fixed;
8021    }
8022
8023    public boolean hasFixedInstantType() { 
8024      return this != null && this.fixed instanceof InstantType;
8025    }
8026
8027    /**
8028     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8029     */
8030    public IntegerType getFixedIntegerType() throws FHIRException { 
8031      if (this.fixed == null)
8032        this.fixed = new IntegerType();
8033      if (!(this.fixed instanceof IntegerType))
8034        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8035      return (IntegerType) this.fixed;
8036    }
8037
8038    public boolean hasFixedIntegerType() { 
8039      return this != null && this.fixed instanceof IntegerType;
8040    }
8041
8042    /**
8043     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8044     */
8045    public Integer64Type getFixedInteger64Type() throws FHIRException { 
8046      if (this.fixed == null)
8047        this.fixed = new Integer64Type();
8048      if (!(this.fixed instanceof Integer64Type))
8049        throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.fixed.getClass().getName()+" was encountered");
8050      return (Integer64Type) this.fixed;
8051    }
8052
8053    public boolean hasFixedInteger64Type() { 
8054      return this != null && this.fixed instanceof Integer64Type;
8055    }
8056
8057    /**
8058     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8059     */
8060    public MarkdownType getFixedMarkdownType() throws FHIRException { 
8061      if (this.fixed == null)
8062        this.fixed = new MarkdownType();
8063      if (!(this.fixed instanceof MarkdownType))
8064        throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8065      return (MarkdownType) this.fixed;
8066    }
8067
8068    public boolean hasFixedMarkdownType() { 
8069      return this != null && this.fixed instanceof MarkdownType;
8070    }
8071
8072    /**
8073     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8074     */
8075    public OidType getFixedOidType() throws FHIRException { 
8076      if (this.fixed == null)
8077        this.fixed = new OidType();
8078      if (!(this.fixed instanceof OidType))
8079        throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8080      return (OidType) this.fixed;
8081    }
8082
8083    public boolean hasFixedOidType() { 
8084      return this != null && this.fixed instanceof OidType;
8085    }
8086
8087    /**
8088     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8089     */
8090    public PositiveIntType getFixedPositiveIntType() throws FHIRException { 
8091      if (this.fixed == null)
8092        this.fixed = new PositiveIntType();
8093      if (!(this.fixed instanceof PositiveIntType))
8094        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8095      return (PositiveIntType) this.fixed;
8096    }
8097
8098    public boolean hasFixedPositiveIntType() { 
8099      return this != null && this.fixed instanceof PositiveIntType;
8100    }
8101
8102    /**
8103     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8104     */
8105    public StringType getFixedStringType() throws FHIRException { 
8106      if (this.fixed == null)
8107        this.fixed = new StringType();
8108      if (!(this.fixed instanceof StringType))
8109        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8110      return (StringType) this.fixed;
8111    }
8112
8113    public boolean hasFixedStringType() { 
8114      return this != null && this.fixed instanceof StringType;
8115    }
8116
8117    /**
8118     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8119     */
8120    public TimeType getFixedTimeType() throws FHIRException { 
8121      if (this.fixed == null)
8122        this.fixed = new TimeType();
8123      if (!(this.fixed instanceof TimeType))
8124        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8125      return (TimeType) this.fixed;
8126    }
8127
8128    public boolean hasFixedTimeType() { 
8129      return this != null && this.fixed instanceof TimeType;
8130    }
8131
8132    /**
8133     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8134     */
8135    public UnsignedIntType getFixedUnsignedIntType() throws FHIRException { 
8136      if (this.fixed == null)
8137        this.fixed = new UnsignedIntType();
8138      if (!(this.fixed instanceof UnsignedIntType))
8139        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8140      return (UnsignedIntType) this.fixed;
8141    }
8142
8143    public boolean hasFixedUnsignedIntType() { 
8144      return this != null && this.fixed instanceof UnsignedIntType;
8145    }
8146
8147    /**
8148     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8149     */
8150    public UriType getFixedUriType() throws FHIRException { 
8151      if (this.fixed == null)
8152        this.fixed = new UriType();
8153      if (!(this.fixed instanceof UriType))
8154        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8155      return (UriType) this.fixed;
8156    }
8157
8158    public boolean hasFixedUriType() { 
8159      return this != null && this.fixed instanceof UriType;
8160    }
8161
8162    /**
8163     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8164     */
8165    public UrlType getFixedUrlType() throws FHIRException { 
8166      if (this.fixed == null)
8167        this.fixed = new UrlType();
8168      if (!(this.fixed instanceof UrlType))
8169        throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8170      return (UrlType) this.fixed;
8171    }
8172
8173    public boolean hasFixedUrlType() { 
8174      return this != null && this.fixed instanceof UrlType;
8175    }
8176
8177    /**
8178     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8179     */
8180    public UuidType getFixedUuidType() throws FHIRException { 
8181      if (this.fixed == null)
8182        this.fixed = new UuidType();
8183      if (!(this.fixed instanceof UuidType))
8184        throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.fixed.getClass().getName()+" was encountered");
8185      return (UuidType) this.fixed;
8186    }
8187
8188    public boolean hasFixedUuidType() { 
8189      return this != null && this.fixed instanceof UuidType;
8190    }
8191
8192    /**
8193     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8194     */
8195    public Address getFixedAddress() throws FHIRException { 
8196      if (this.fixed == null)
8197        this.fixed = new Address();
8198      if (!(this.fixed instanceof Address))
8199        throw new FHIRException("Type mismatch: the type Address was expected, but "+this.fixed.getClass().getName()+" was encountered");
8200      return (Address) this.fixed;
8201    }
8202
8203    public boolean hasFixedAddress() { 
8204      return this != null && this.fixed instanceof Address;
8205    }
8206
8207    /**
8208     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8209     */
8210    public Age getFixedAge() throws FHIRException { 
8211      if (this.fixed == null)
8212        this.fixed = new Age();
8213      if (!(this.fixed instanceof Age))
8214        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.fixed.getClass().getName()+" was encountered");
8215      return (Age) this.fixed;
8216    }
8217
8218    public boolean hasFixedAge() { 
8219      return this != null && this.fixed instanceof Age;
8220    }
8221
8222    /**
8223     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8224     */
8225    public Annotation getFixedAnnotation() throws FHIRException { 
8226      if (this.fixed == null)
8227        this.fixed = new Annotation();
8228      if (!(this.fixed instanceof Annotation))
8229        throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.fixed.getClass().getName()+" was encountered");
8230      return (Annotation) this.fixed;
8231    }
8232
8233    public boolean hasFixedAnnotation() { 
8234      return this != null && this.fixed instanceof Annotation;
8235    }
8236
8237    /**
8238     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8239     */
8240    public Attachment getFixedAttachment() throws FHIRException { 
8241      if (this.fixed == null)
8242        this.fixed = new Attachment();
8243      if (!(this.fixed instanceof Attachment))
8244        throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.fixed.getClass().getName()+" was encountered");
8245      return (Attachment) this.fixed;
8246    }
8247
8248    public boolean hasFixedAttachment() { 
8249      return this != null && this.fixed instanceof Attachment;
8250    }
8251
8252    /**
8253     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8254     */
8255    public CodeableConcept getFixedCodeableConcept() throws FHIRException { 
8256      if (this.fixed == null)
8257        this.fixed = new CodeableConcept();
8258      if (!(this.fixed instanceof CodeableConcept))
8259        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.fixed.getClass().getName()+" was encountered");
8260      return (CodeableConcept) this.fixed;
8261    }
8262
8263    public boolean hasFixedCodeableConcept() { 
8264      return this != null && this.fixed instanceof CodeableConcept;
8265    }
8266
8267    /**
8268     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8269     */
8270    public CodeableReference getFixedCodeableReference() throws FHIRException { 
8271      if (this.fixed == null)
8272        this.fixed = new CodeableReference();
8273      if (!(this.fixed instanceof CodeableReference))
8274        throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.fixed.getClass().getName()+" was encountered");
8275      return (CodeableReference) this.fixed;
8276    }
8277
8278    public boolean hasFixedCodeableReference() { 
8279      return this != null && this.fixed instanceof CodeableReference;
8280    }
8281
8282    /**
8283     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8284     */
8285    public Coding getFixedCoding() throws FHIRException { 
8286      if (this.fixed == null)
8287        this.fixed = new Coding();
8288      if (!(this.fixed instanceof Coding))
8289        throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.fixed.getClass().getName()+" was encountered");
8290      return (Coding) this.fixed;
8291    }
8292
8293    public boolean hasFixedCoding() { 
8294      return this != null && this.fixed instanceof Coding;
8295    }
8296
8297    /**
8298     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8299     */
8300    public ContactPoint getFixedContactPoint() throws FHIRException { 
8301      if (this.fixed == null)
8302        this.fixed = new ContactPoint();
8303      if (!(this.fixed instanceof ContactPoint))
8304        throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.fixed.getClass().getName()+" was encountered");
8305      return (ContactPoint) this.fixed;
8306    }
8307
8308    public boolean hasFixedContactPoint() { 
8309      return this != null && this.fixed instanceof ContactPoint;
8310    }
8311
8312    /**
8313     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8314     */
8315    public Count getFixedCount() throws FHIRException { 
8316      if (this.fixed == null)
8317        this.fixed = new Count();
8318      if (!(this.fixed instanceof Count))
8319        throw new FHIRException("Type mismatch: the type Count was expected, but "+this.fixed.getClass().getName()+" was encountered");
8320      return (Count) this.fixed;
8321    }
8322
8323    public boolean hasFixedCount() { 
8324      return this != null && this.fixed instanceof Count;
8325    }
8326
8327    /**
8328     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8329     */
8330    public Distance getFixedDistance() throws FHIRException { 
8331      if (this.fixed == null)
8332        this.fixed = new Distance();
8333      if (!(this.fixed instanceof Distance))
8334        throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.fixed.getClass().getName()+" was encountered");
8335      return (Distance) this.fixed;
8336    }
8337
8338    public boolean hasFixedDistance() { 
8339      return this != null && this.fixed instanceof Distance;
8340    }
8341
8342    /**
8343     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8344     */
8345    public Duration getFixedDuration() throws FHIRException { 
8346      if (this.fixed == null)
8347        this.fixed = new Duration();
8348      if (!(this.fixed instanceof Duration))
8349        throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.fixed.getClass().getName()+" was encountered");
8350      return (Duration) this.fixed;
8351    }
8352
8353    public boolean hasFixedDuration() { 
8354      return this != null && this.fixed instanceof Duration;
8355    }
8356
8357    /**
8358     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8359     */
8360    public HumanName getFixedHumanName() throws FHIRException { 
8361      if (this.fixed == null)
8362        this.fixed = new HumanName();
8363      if (!(this.fixed instanceof HumanName))
8364        throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.fixed.getClass().getName()+" was encountered");
8365      return (HumanName) this.fixed;
8366    }
8367
8368    public boolean hasFixedHumanName() { 
8369      return this != null && this.fixed instanceof HumanName;
8370    }
8371
8372    /**
8373     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8374     */
8375    public Identifier getFixedIdentifier() throws FHIRException { 
8376      if (this.fixed == null)
8377        this.fixed = new Identifier();
8378      if (!(this.fixed instanceof Identifier))
8379        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.fixed.getClass().getName()+" was encountered");
8380      return (Identifier) this.fixed;
8381    }
8382
8383    public boolean hasFixedIdentifier() { 
8384      return this != null && this.fixed instanceof Identifier;
8385    }
8386
8387    /**
8388     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8389     */
8390    public Money getFixedMoney() throws FHIRException { 
8391      if (this.fixed == null)
8392        this.fixed = new Money();
8393      if (!(this.fixed instanceof Money))
8394        throw new FHIRException("Type mismatch: the type Money was expected, but "+this.fixed.getClass().getName()+" was encountered");
8395      return (Money) this.fixed;
8396    }
8397
8398    public boolean hasFixedMoney() { 
8399      return this != null && this.fixed instanceof Money;
8400    }
8401
8402    /**
8403     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8404     */
8405    public Period getFixedPeriod() throws FHIRException { 
8406      if (this.fixed == null)
8407        this.fixed = new Period();
8408      if (!(this.fixed instanceof Period))
8409        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.fixed.getClass().getName()+" was encountered");
8410      return (Period) this.fixed;
8411    }
8412
8413    public boolean hasFixedPeriod() { 
8414      return this != null && this.fixed instanceof Period;
8415    }
8416
8417    /**
8418     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8419     */
8420    public Quantity getFixedQuantity() throws FHIRException { 
8421      if (this.fixed == null)
8422        this.fixed = new Quantity();
8423      if (!(this.fixed instanceof Quantity))
8424        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.fixed.getClass().getName()+" was encountered");
8425      return (Quantity) this.fixed;
8426    }
8427
8428    public boolean hasFixedQuantity() { 
8429      return this != null && this.fixed instanceof Quantity;
8430    }
8431
8432    /**
8433     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8434     */
8435    public Range getFixedRange() throws FHIRException { 
8436      if (this.fixed == null)
8437        this.fixed = new Range();
8438      if (!(this.fixed instanceof Range))
8439        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.fixed.getClass().getName()+" was encountered");
8440      return (Range) this.fixed;
8441    }
8442
8443    public boolean hasFixedRange() { 
8444      return this != null && this.fixed instanceof Range;
8445    }
8446
8447    /**
8448     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8449     */
8450    public Ratio getFixedRatio() throws FHIRException { 
8451      if (this.fixed == null)
8452        this.fixed = new Ratio();
8453      if (!(this.fixed instanceof Ratio))
8454        throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.fixed.getClass().getName()+" was encountered");
8455      return (Ratio) this.fixed;
8456    }
8457
8458    public boolean hasFixedRatio() { 
8459      return this != null && this.fixed instanceof Ratio;
8460    }
8461
8462    /**
8463     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8464     */
8465    public RatioRange getFixedRatioRange() throws FHIRException { 
8466      if (this.fixed == null)
8467        this.fixed = new RatioRange();
8468      if (!(this.fixed instanceof RatioRange))
8469        throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.fixed.getClass().getName()+" was encountered");
8470      return (RatioRange) this.fixed;
8471    }
8472
8473    public boolean hasFixedRatioRange() { 
8474      return this != null && this.fixed instanceof RatioRange;
8475    }
8476
8477    /**
8478     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8479     */
8480    public Reference getFixedReference() throws FHIRException { 
8481      if (this.fixed == null)
8482        this.fixed = new Reference();
8483      if (!(this.fixed instanceof Reference))
8484        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.fixed.getClass().getName()+" was encountered");
8485      return (Reference) this.fixed;
8486    }
8487
8488    public boolean hasFixedReference() { 
8489      return this != null && this.fixed instanceof Reference;
8490    }
8491
8492    /**
8493     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8494     */
8495    public SampledData getFixedSampledData() throws FHIRException { 
8496      if (this.fixed == null)
8497        this.fixed = new SampledData();
8498      if (!(this.fixed instanceof SampledData))
8499        throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.fixed.getClass().getName()+" was encountered");
8500      return (SampledData) this.fixed;
8501    }
8502
8503    public boolean hasFixedSampledData() { 
8504      return this != null && this.fixed instanceof SampledData;
8505    }
8506
8507    /**
8508     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8509     */
8510    public Signature getFixedSignature() throws FHIRException { 
8511      if (this.fixed == null)
8512        this.fixed = new Signature();
8513      if (!(this.fixed instanceof Signature))
8514        throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.fixed.getClass().getName()+" was encountered");
8515      return (Signature) this.fixed;
8516    }
8517
8518    public boolean hasFixedSignature() { 
8519      return this != null && this.fixed instanceof Signature;
8520    }
8521
8522    /**
8523     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8524     */
8525    public Timing getFixedTiming() throws FHIRException { 
8526      if (this.fixed == null)
8527        this.fixed = new Timing();
8528      if (!(this.fixed instanceof Timing))
8529        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.fixed.getClass().getName()+" was encountered");
8530      return (Timing) this.fixed;
8531    }
8532
8533    public boolean hasFixedTiming() { 
8534      return this != null && this.fixed instanceof Timing;
8535    }
8536
8537    /**
8538     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8539     */
8540    public ContactDetail getFixedContactDetail() throws FHIRException { 
8541      if (this.fixed == null)
8542        this.fixed = new ContactDetail();
8543      if (!(this.fixed instanceof ContactDetail))
8544        throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.fixed.getClass().getName()+" was encountered");
8545      return (ContactDetail) this.fixed;
8546    }
8547
8548    public boolean hasFixedContactDetail() { 
8549      return this != null && this.fixed instanceof ContactDetail;
8550    }
8551
8552    /**
8553     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8554     */
8555    public DataRequirement getFixedDataRequirement() throws FHIRException { 
8556      if (this.fixed == null)
8557        this.fixed = new DataRequirement();
8558      if (!(this.fixed instanceof DataRequirement))
8559        throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.fixed.getClass().getName()+" was encountered");
8560      return (DataRequirement) this.fixed;
8561    }
8562
8563    public boolean hasFixedDataRequirement() { 
8564      return this != null && this.fixed instanceof DataRequirement;
8565    }
8566
8567    /**
8568     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8569     */
8570    public Expression getFixedExpression() throws FHIRException { 
8571      if (this.fixed == null)
8572        this.fixed = new Expression();
8573      if (!(this.fixed instanceof Expression))
8574        throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.fixed.getClass().getName()+" was encountered");
8575      return (Expression) this.fixed;
8576    }
8577
8578    public boolean hasFixedExpression() { 
8579      return this != null && this.fixed instanceof Expression;
8580    }
8581
8582    /**
8583     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8584     */
8585    public ParameterDefinition getFixedParameterDefinition() throws FHIRException { 
8586      if (this.fixed == null)
8587        this.fixed = new ParameterDefinition();
8588      if (!(this.fixed instanceof ParameterDefinition))
8589        throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.fixed.getClass().getName()+" was encountered");
8590      return (ParameterDefinition) this.fixed;
8591    }
8592
8593    public boolean hasFixedParameterDefinition() { 
8594      return this != null && this.fixed instanceof ParameterDefinition;
8595    }
8596
8597    /**
8598     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8599     */
8600    public RelatedArtifact getFixedRelatedArtifact() throws FHIRException { 
8601      if (this.fixed == null)
8602        this.fixed = new RelatedArtifact();
8603      if (!(this.fixed instanceof RelatedArtifact))
8604        throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.fixed.getClass().getName()+" was encountered");
8605      return (RelatedArtifact) this.fixed;
8606    }
8607
8608    public boolean hasFixedRelatedArtifact() { 
8609      return this != null && this.fixed instanceof RelatedArtifact;
8610    }
8611
8612    /**
8613     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8614     */
8615    public TriggerDefinition getFixedTriggerDefinition() throws FHIRException { 
8616      if (this.fixed == null)
8617        this.fixed = new TriggerDefinition();
8618      if (!(this.fixed instanceof TriggerDefinition))
8619        throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.fixed.getClass().getName()+" was encountered");
8620      return (TriggerDefinition) this.fixed;
8621    }
8622
8623    public boolean hasFixedTriggerDefinition() { 
8624      return this != null && this.fixed instanceof TriggerDefinition;
8625    }
8626
8627    /**
8628     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8629     */
8630    public UsageContext getFixedUsageContext() throws FHIRException { 
8631      if (this.fixed == null)
8632        this.fixed = new UsageContext();
8633      if (!(this.fixed instanceof UsageContext))
8634        throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.fixed.getClass().getName()+" was encountered");
8635      return (UsageContext) this.fixed;
8636    }
8637
8638    public boolean hasFixedUsageContext() { 
8639      return this != null && this.fixed instanceof UsageContext;
8640    }
8641
8642    /**
8643     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8644     */
8645    public Availability getFixedAvailability() throws FHIRException { 
8646      if (this.fixed == null)
8647        this.fixed = new Availability();
8648      if (!(this.fixed instanceof Availability))
8649        throw new FHIRException("Type mismatch: the type Availability was expected, but "+this.fixed.getClass().getName()+" was encountered");
8650      return (Availability) this.fixed;
8651    }
8652
8653    public boolean hasFixedAvailability() { 
8654      return this != null && this.fixed instanceof Availability;
8655    }
8656
8657    /**
8658     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8659     */
8660    public ExtendedContactDetail getFixedExtendedContactDetail() throws FHIRException { 
8661      if (this.fixed == null)
8662        this.fixed = new ExtendedContactDetail();
8663      if (!(this.fixed instanceof ExtendedContactDetail))
8664        throw new FHIRException("Type mismatch: the type ExtendedContactDetail was expected, but "+this.fixed.getClass().getName()+" was encountered");
8665      return (ExtendedContactDetail) this.fixed;
8666    }
8667
8668    public boolean hasFixedExtendedContactDetail() { 
8669      return this != null && this.fixed instanceof ExtendedContactDetail;
8670    }
8671
8672    /**
8673     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8674     */
8675    public Dosage getFixedDosage() throws FHIRException { 
8676      if (this.fixed == null)
8677        this.fixed = new Dosage();
8678      if (!(this.fixed instanceof Dosage))
8679        throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.fixed.getClass().getName()+" was encountered");
8680      return (Dosage) this.fixed;
8681    }
8682
8683    public boolean hasFixedDosage() { 
8684      return this != null && this.fixed instanceof Dosage;
8685    }
8686
8687    /**
8688     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8689     */
8690    public Meta getFixedMeta() throws FHIRException { 
8691      if (this.fixed == null)
8692        this.fixed = new Meta();
8693      if (!(this.fixed instanceof Meta))
8694        throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.fixed.getClass().getName()+" was encountered");
8695      return (Meta) this.fixed;
8696    }
8697
8698    public boolean hasFixedMeta() { 
8699      return this != null && this.fixed instanceof Meta;
8700    }
8701
8702    public boolean hasFixed() { 
8703      return this.fixed != null && !this.fixed.isEmpty();
8704    }
8705
8706    /**
8707     * @param value {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.)
8708     */
8709    public ElementDefinition setFixed(DataType value) { 
8710      if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof CodeableReference || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof RatioRange || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Availability || value instanceof ExtendedContactDetail || value instanceof Dosage || value instanceof Meta))
8711        throw new FHIRException("Not the right type for ElementDefinition.fixed[x]: "+value.fhirType());
8712      this.fixed = value;
8713      return this;
8714    }
8715
8716    /**
8717     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8718
8719When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8720
8721When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8722
8723When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8724
87251. If primitive: it must match exactly the pattern value
87262. If a complex object: it must match (recursively) the pattern value
87273. If an array: it must match (recursively) the pattern value
8728
8729If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8730     */
8731    public DataType getPattern() { 
8732      return this.pattern;
8733    }
8734
8735    /**
8736     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8737
8738When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8739
8740When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8741
8742When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8743
87441. If primitive: it must match exactly the pattern value
87452. If a complex object: it must match (recursively) the pattern value
87463. If an array: it must match (recursively) the pattern value
8747
8748If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8749     */
8750    public Base64BinaryType getPatternBase64BinaryType() throws FHIRException { 
8751      if (this.pattern == null)
8752        this.pattern = new Base64BinaryType();
8753      if (!(this.pattern instanceof Base64BinaryType))
8754        throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8755      return (Base64BinaryType) this.pattern;
8756    }
8757
8758    public boolean hasPatternBase64BinaryType() { 
8759      return this != null && this.pattern instanceof Base64BinaryType;
8760    }
8761
8762    /**
8763     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8764
8765When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8766
8767When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8768
8769When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8770
87711. If primitive: it must match exactly the pattern value
87722. If a complex object: it must match (recursively) the pattern value
87733. If an array: it must match (recursively) the pattern value
8774
8775If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8776     */
8777    public BooleanType getPatternBooleanType() throws FHIRException { 
8778      if (this.pattern == null)
8779        this.pattern = new BooleanType();
8780      if (!(this.pattern instanceof BooleanType))
8781        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8782      return (BooleanType) this.pattern;
8783    }
8784
8785    public boolean hasPatternBooleanType() { 
8786      return this != null && this.pattern instanceof BooleanType;
8787    }
8788
8789    /**
8790     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8791
8792When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8793
8794When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8795
8796When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8797
87981. If primitive: it must match exactly the pattern value
87992. If a complex object: it must match (recursively) the pattern value
88003. If an array: it must match (recursively) the pattern value
8801
8802If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8803     */
8804    public CanonicalType getPatternCanonicalType() throws FHIRException { 
8805      if (this.pattern == null)
8806        this.pattern = new CanonicalType();
8807      if (!(this.pattern instanceof CanonicalType))
8808        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8809      return (CanonicalType) this.pattern;
8810    }
8811
8812    public boolean hasPatternCanonicalType() { 
8813      return this != null && this.pattern instanceof CanonicalType;
8814    }
8815
8816    /**
8817     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8818
8819When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8820
8821When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8822
8823When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8824
88251. If primitive: it must match exactly the pattern value
88262. If a complex object: it must match (recursively) the pattern value
88273. If an array: it must match (recursively) the pattern value
8828
8829If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8830     */
8831    public CodeType getPatternCodeType() throws FHIRException { 
8832      if (this.pattern == null)
8833        this.pattern = new CodeType();
8834      if (!(this.pattern instanceof CodeType))
8835        throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8836      return (CodeType) this.pattern;
8837    }
8838
8839    public boolean hasPatternCodeType() { 
8840      return this != null && this.pattern instanceof CodeType;
8841    }
8842
8843    /**
8844     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8845
8846When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8847
8848When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8849
8850When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8851
88521. If primitive: it must match exactly the pattern value
88532. If a complex object: it must match (recursively) the pattern value
88543. If an array: it must match (recursively) the pattern value
8855
8856If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8857     */
8858    public DateType getPatternDateType() throws FHIRException { 
8859      if (this.pattern == null)
8860        this.pattern = new DateType();
8861      if (!(this.pattern instanceof DateType))
8862        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8863      return (DateType) this.pattern;
8864    }
8865
8866    public boolean hasPatternDateType() { 
8867      return this != null && this.pattern instanceof DateType;
8868    }
8869
8870    /**
8871     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8872
8873When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8874
8875When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8876
8877When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8878
88791. If primitive: it must match exactly the pattern value
88802. If a complex object: it must match (recursively) the pattern value
88813. If an array: it must match (recursively) the pattern value
8882
8883If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8884     */
8885    public DateTimeType getPatternDateTimeType() throws FHIRException { 
8886      if (this.pattern == null)
8887        this.pattern = new DateTimeType();
8888      if (!(this.pattern instanceof DateTimeType))
8889        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8890      return (DateTimeType) this.pattern;
8891    }
8892
8893    public boolean hasPatternDateTimeType() { 
8894      return this != null && this.pattern instanceof DateTimeType;
8895    }
8896
8897    /**
8898     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8899
8900When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8901
8902When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8903
8904When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8905
89061. If primitive: it must match exactly the pattern value
89072. If a complex object: it must match (recursively) the pattern value
89083. If an array: it must match (recursively) the pattern value
8909
8910If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8911     */
8912    public DecimalType getPatternDecimalType() throws FHIRException { 
8913      if (this.pattern == null)
8914        this.pattern = new DecimalType();
8915      if (!(this.pattern instanceof DecimalType))
8916        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8917      return (DecimalType) this.pattern;
8918    }
8919
8920    public boolean hasPatternDecimalType() { 
8921      return this != null && this.pattern instanceof DecimalType;
8922    }
8923
8924    /**
8925     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8926
8927When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8928
8929When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8930
8931When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8932
89331. If primitive: it must match exactly the pattern value
89342. If a complex object: it must match (recursively) the pattern value
89353. If an array: it must match (recursively) the pattern value
8936
8937If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8938     */
8939    public IdType getPatternIdType() throws FHIRException { 
8940      if (this.pattern == null)
8941        this.pattern = new IdType();
8942      if (!(this.pattern instanceof IdType))
8943        throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8944      return (IdType) this.pattern;
8945    }
8946
8947    public boolean hasPatternIdType() { 
8948      return this != null && this.pattern instanceof IdType;
8949    }
8950
8951    /**
8952     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8953
8954When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8955
8956When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8957
8958When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8959
89601. If primitive: it must match exactly the pattern value
89612. If a complex object: it must match (recursively) the pattern value
89623. If an array: it must match (recursively) the pattern value
8963
8964If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8965     */
8966    public InstantType getPatternInstantType() throws FHIRException { 
8967      if (this.pattern == null)
8968        this.pattern = new InstantType();
8969      if (!(this.pattern instanceof InstantType))
8970        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8971      return (InstantType) this.pattern;
8972    }
8973
8974    public boolean hasPatternInstantType() { 
8975      return this != null && this.pattern instanceof InstantType;
8976    }
8977
8978    /**
8979     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
8980
8981When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8982
8983When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
8984
8985When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
8986
89871. If primitive: it must match exactly the pattern value
89882. If a complex object: it must match (recursively) the pattern value
89893. If an array: it must match (recursively) the pattern value
8990
8991If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
8992     */
8993    public IntegerType getPatternIntegerType() throws FHIRException { 
8994      if (this.pattern == null)
8995        this.pattern = new IntegerType();
8996      if (!(this.pattern instanceof IntegerType))
8997        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8998      return (IntegerType) this.pattern;
8999    }
9000
9001    public boolean hasPatternIntegerType() { 
9002      return this != null && this.pattern instanceof IntegerType;
9003    }
9004
9005    /**
9006     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9007
9008When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9009
9010When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9011
9012When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9013
90141. If primitive: it must match exactly the pattern value
90152. If a complex object: it must match (recursively) the pattern value
90163. If an array: it must match (recursively) the pattern value
9017
9018If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9019     */
9020    public Integer64Type getPatternInteger64Type() throws FHIRException { 
9021      if (this.pattern == null)
9022        this.pattern = new Integer64Type();
9023      if (!(this.pattern instanceof Integer64Type))
9024        throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.pattern.getClass().getName()+" was encountered");
9025      return (Integer64Type) this.pattern;
9026    }
9027
9028    public boolean hasPatternInteger64Type() { 
9029      return this != null && this.pattern instanceof Integer64Type;
9030    }
9031
9032    /**
9033     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9034
9035When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9036
9037When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9038
9039When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9040
90411. If primitive: it must match exactly the pattern value
90422. If a complex object: it must match (recursively) the pattern value
90433. If an array: it must match (recursively) the pattern value
9044
9045If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9046     */
9047    public MarkdownType getPatternMarkdownType() throws FHIRException { 
9048      if (this.pattern == null)
9049        this.pattern = new MarkdownType();
9050      if (!(this.pattern instanceof MarkdownType))
9051        throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.pattern.getClass().getName()+" was encountered");
9052      return (MarkdownType) this.pattern;
9053    }
9054
9055    public boolean hasPatternMarkdownType() { 
9056      return this != null && this.pattern instanceof MarkdownType;
9057    }
9058
9059    /**
9060     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9061
9062When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9063
9064When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9065
9066When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9067
90681. If primitive: it must match exactly the pattern value
90692. If a complex object: it must match (recursively) the pattern value
90703. If an array: it must match (recursively) the pattern value
9071
9072If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9073     */
9074    public OidType getPatternOidType() throws FHIRException { 
9075      if (this.pattern == null)
9076        this.pattern = new OidType();
9077      if (!(this.pattern instanceof OidType))
9078        throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.pattern.getClass().getName()+" was encountered");
9079      return (OidType) this.pattern;
9080    }
9081
9082    public boolean hasPatternOidType() { 
9083      return this != null && this.pattern instanceof OidType;
9084    }
9085
9086    /**
9087     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9088
9089When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9090
9091When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9092
9093When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9094
90951. If primitive: it must match exactly the pattern value
90962. If a complex object: it must match (recursively) the pattern value
90973. If an array: it must match (recursively) the pattern value
9098
9099If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9100     */
9101    public PositiveIntType getPatternPositiveIntType() throws FHIRException { 
9102      if (this.pattern == null)
9103        this.pattern = new PositiveIntType();
9104      if (!(this.pattern instanceof PositiveIntType))
9105        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.pattern.getClass().getName()+" was encountered");
9106      return (PositiveIntType) this.pattern;
9107    }
9108
9109    public boolean hasPatternPositiveIntType() { 
9110      return this != null && this.pattern instanceof PositiveIntType;
9111    }
9112
9113    /**
9114     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9115
9116When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9117
9118When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9119
9120When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9121
91221. If primitive: it must match exactly the pattern value
91232. If a complex object: it must match (recursively) the pattern value
91243. If an array: it must match (recursively) the pattern value
9125
9126If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9127     */
9128    public StringType getPatternStringType() throws FHIRException { 
9129      if (this.pattern == null)
9130        this.pattern = new StringType();
9131      if (!(this.pattern instanceof StringType))
9132        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.pattern.getClass().getName()+" was encountered");
9133      return (StringType) this.pattern;
9134    }
9135
9136    public boolean hasPatternStringType() { 
9137      return this != null && this.pattern instanceof StringType;
9138    }
9139
9140    /**
9141     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9142
9143When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9144
9145When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9146
9147When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9148
91491. If primitive: it must match exactly the pattern value
91502. If a complex object: it must match (recursively) the pattern value
91513. If an array: it must match (recursively) the pattern value
9152
9153If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9154     */
9155    public TimeType getPatternTimeType() throws FHIRException { 
9156      if (this.pattern == null)
9157        this.pattern = new TimeType();
9158      if (!(this.pattern instanceof TimeType))
9159        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.pattern.getClass().getName()+" was encountered");
9160      return (TimeType) this.pattern;
9161    }
9162
9163    public boolean hasPatternTimeType() { 
9164      return this != null && this.pattern instanceof TimeType;
9165    }
9166
9167    /**
9168     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9169
9170When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9171
9172When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9173
9174When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9175
91761. If primitive: it must match exactly the pattern value
91772. If a complex object: it must match (recursively) the pattern value
91783. If an array: it must match (recursively) the pattern value
9179
9180If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9181     */
9182    public UnsignedIntType getPatternUnsignedIntType() throws FHIRException { 
9183      if (this.pattern == null)
9184        this.pattern = new UnsignedIntType();
9185      if (!(this.pattern instanceof UnsignedIntType))
9186        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.pattern.getClass().getName()+" was encountered");
9187      return (UnsignedIntType) this.pattern;
9188    }
9189
9190    public boolean hasPatternUnsignedIntType() { 
9191      return this != null && this.pattern instanceof UnsignedIntType;
9192    }
9193
9194    /**
9195     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9196
9197When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9198
9199When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9200
9201When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9202
92031. If primitive: it must match exactly the pattern value
92042. If a complex object: it must match (recursively) the pattern value
92053. If an array: it must match (recursively) the pattern value
9206
9207If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9208     */
9209    public UriType getPatternUriType() throws FHIRException { 
9210      if (this.pattern == null)
9211        this.pattern = new UriType();
9212      if (!(this.pattern instanceof UriType))
9213        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.pattern.getClass().getName()+" was encountered");
9214      return (UriType) this.pattern;
9215    }
9216
9217    public boolean hasPatternUriType() { 
9218      return this != null && this.pattern instanceof UriType;
9219    }
9220
9221    /**
9222     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9223
9224When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9225
9226When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9227
9228When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9229
92301. If primitive: it must match exactly the pattern value
92312. If a complex object: it must match (recursively) the pattern value
92323. If an array: it must match (recursively) the pattern value
9233
9234If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9235     */
9236    public UrlType getPatternUrlType() throws FHIRException { 
9237      if (this.pattern == null)
9238        this.pattern = new UrlType();
9239      if (!(this.pattern instanceof UrlType))
9240        throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.pattern.getClass().getName()+" was encountered");
9241      return (UrlType) this.pattern;
9242    }
9243
9244    public boolean hasPatternUrlType() { 
9245      return this != null && this.pattern instanceof UrlType;
9246    }
9247
9248    /**
9249     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9250
9251When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9252
9253When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9254
9255When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9256
92571. If primitive: it must match exactly the pattern value
92582. If a complex object: it must match (recursively) the pattern value
92593. If an array: it must match (recursively) the pattern value
9260
9261If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9262     */
9263    public UuidType getPatternUuidType() throws FHIRException { 
9264      if (this.pattern == null)
9265        this.pattern = new UuidType();
9266      if (!(this.pattern instanceof UuidType))
9267        throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.pattern.getClass().getName()+" was encountered");
9268      return (UuidType) this.pattern;
9269    }
9270
9271    public boolean hasPatternUuidType() { 
9272      return this != null && this.pattern instanceof UuidType;
9273    }
9274
9275    /**
9276     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9277
9278When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9279
9280When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9281
9282When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9283
92841. If primitive: it must match exactly the pattern value
92852. If a complex object: it must match (recursively) the pattern value
92863. If an array: it must match (recursively) the pattern value
9287
9288If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9289     */
9290    public Address getPatternAddress() throws FHIRException { 
9291      if (this.pattern == null)
9292        this.pattern = new Address();
9293      if (!(this.pattern instanceof Address))
9294        throw new FHIRException("Type mismatch: the type Address was expected, but "+this.pattern.getClass().getName()+" was encountered");
9295      return (Address) this.pattern;
9296    }
9297
9298    public boolean hasPatternAddress() { 
9299      return this != null && this.pattern instanceof Address;
9300    }
9301
9302    /**
9303     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9304
9305When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9306
9307When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9308
9309When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9310
93111. If primitive: it must match exactly the pattern value
93122. If a complex object: it must match (recursively) the pattern value
93133. If an array: it must match (recursively) the pattern value
9314
9315If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9316     */
9317    public Age getPatternAge() throws FHIRException { 
9318      if (this.pattern == null)
9319        this.pattern = new Age();
9320      if (!(this.pattern instanceof Age))
9321        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.pattern.getClass().getName()+" was encountered");
9322      return (Age) this.pattern;
9323    }
9324
9325    public boolean hasPatternAge() { 
9326      return this != null && this.pattern instanceof Age;
9327    }
9328
9329    /**
9330     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9331
9332When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9333
9334When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9335
9336When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9337
93381. If primitive: it must match exactly the pattern value
93392. If a complex object: it must match (recursively) the pattern value
93403. If an array: it must match (recursively) the pattern value
9341
9342If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9343     */
9344    public Annotation getPatternAnnotation() throws FHIRException { 
9345      if (this.pattern == null)
9346        this.pattern = new Annotation();
9347      if (!(this.pattern instanceof Annotation))
9348        throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.pattern.getClass().getName()+" was encountered");
9349      return (Annotation) this.pattern;
9350    }
9351
9352    public boolean hasPatternAnnotation() { 
9353      return this != null && this.pattern instanceof Annotation;
9354    }
9355
9356    /**
9357     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9358
9359When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9360
9361When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9362
9363When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9364
93651. If primitive: it must match exactly the pattern value
93662. If a complex object: it must match (recursively) the pattern value
93673. If an array: it must match (recursively) the pattern value
9368
9369If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9370     */
9371    public Attachment getPatternAttachment() throws FHIRException { 
9372      if (this.pattern == null)
9373        this.pattern = new Attachment();
9374      if (!(this.pattern instanceof Attachment))
9375        throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.pattern.getClass().getName()+" was encountered");
9376      return (Attachment) this.pattern;
9377    }
9378
9379    public boolean hasPatternAttachment() { 
9380      return this != null && this.pattern instanceof Attachment;
9381    }
9382
9383    /**
9384     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9385
9386When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9387
9388When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9389
9390When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9391
93921. If primitive: it must match exactly the pattern value
93932. If a complex object: it must match (recursively) the pattern value
93943. If an array: it must match (recursively) the pattern value
9395
9396If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9397     */
9398    public CodeableConcept getPatternCodeableConcept() throws FHIRException { 
9399      if (this.pattern == null)
9400        this.pattern = new CodeableConcept();
9401      if (!(this.pattern instanceof CodeableConcept))
9402        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.pattern.getClass().getName()+" was encountered");
9403      return (CodeableConcept) this.pattern;
9404    }
9405
9406    public boolean hasPatternCodeableConcept() { 
9407      return this != null && this.pattern instanceof CodeableConcept;
9408    }
9409
9410    /**
9411     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9412
9413When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9414
9415When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9416
9417When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9418
94191. If primitive: it must match exactly the pattern value
94202. If a complex object: it must match (recursively) the pattern value
94213. If an array: it must match (recursively) the pattern value
9422
9423If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9424     */
9425    public CodeableReference getPatternCodeableReference() throws FHIRException { 
9426      if (this.pattern == null)
9427        this.pattern = new CodeableReference();
9428      if (!(this.pattern instanceof CodeableReference))
9429        throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.pattern.getClass().getName()+" was encountered");
9430      return (CodeableReference) this.pattern;
9431    }
9432
9433    public boolean hasPatternCodeableReference() { 
9434      return this != null && this.pattern instanceof CodeableReference;
9435    }
9436
9437    /**
9438     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9439
9440When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9441
9442When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9443
9444When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9445
94461. If primitive: it must match exactly the pattern value
94472. If a complex object: it must match (recursively) the pattern value
94483. If an array: it must match (recursively) the pattern value
9449
9450If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9451     */
9452    public Coding getPatternCoding() throws FHIRException { 
9453      if (this.pattern == null)
9454        this.pattern = new Coding();
9455      if (!(this.pattern instanceof Coding))
9456        throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.pattern.getClass().getName()+" was encountered");
9457      return (Coding) this.pattern;
9458    }
9459
9460    public boolean hasPatternCoding() { 
9461      return this != null && this.pattern instanceof Coding;
9462    }
9463
9464    /**
9465     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9466
9467When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9468
9469When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9470
9471When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9472
94731. If primitive: it must match exactly the pattern value
94742. If a complex object: it must match (recursively) the pattern value
94753. If an array: it must match (recursively) the pattern value
9476
9477If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9478     */
9479    public ContactPoint getPatternContactPoint() throws FHIRException { 
9480      if (this.pattern == null)
9481        this.pattern = new ContactPoint();
9482      if (!(this.pattern instanceof ContactPoint))
9483        throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.pattern.getClass().getName()+" was encountered");
9484      return (ContactPoint) this.pattern;
9485    }
9486
9487    public boolean hasPatternContactPoint() { 
9488      return this != null && this.pattern instanceof ContactPoint;
9489    }
9490
9491    /**
9492     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9493
9494When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9495
9496When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9497
9498When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9499
95001. If primitive: it must match exactly the pattern value
95012. If a complex object: it must match (recursively) the pattern value
95023. If an array: it must match (recursively) the pattern value
9503
9504If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9505     */
9506    public Count getPatternCount() throws FHIRException { 
9507      if (this.pattern == null)
9508        this.pattern = new Count();
9509      if (!(this.pattern instanceof Count))
9510        throw new FHIRException("Type mismatch: the type Count was expected, but "+this.pattern.getClass().getName()+" was encountered");
9511      return (Count) this.pattern;
9512    }
9513
9514    public boolean hasPatternCount() { 
9515      return this != null && this.pattern instanceof Count;
9516    }
9517
9518    /**
9519     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9520
9521When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9522
9523When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9524
9525When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9526
95271. If primitive: it must match exactly the pattern value
95282. If a complex object: it must match (recursively) the pattern value
95293. If an array: it must match (recursively) the pattern value
9530
9531If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9532     */
9533    public Distance getPatternDistance() throws FHIRException { 
9534      if (this.pattern == null)
9535        this.pattern = new Distance();
9536      if (!(this.pattern instanceof Distance))
9537        throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.pattern.getClass().getName()+" was encountered");
9538      return (Distance) this.pattern;
9539    }
9540
9541    public boolean hasPatternDistance() { 
9542      return this != null && this.pattern instanceof Distance;
9543    }
9544
9545    /**
9546     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9547
9548When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9549
9550When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9551
9552When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9553
95541. If primitive: it must match exactly the pattern value
95552. If a complex object: it must match (recursively) the pattern value
95563. If an array: it must match (recursively) the pattern value
9557
9558If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9559     */
9560    public Duration getPatternDuration() throws FHIRException { 
9561      if (this.pattern == null)
9562        this.pattern = new Duration();
9563      if (!(this.pattern instanceof Duration))
9564        throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.pattern.getClass().getName()+" was encountered");
9565      return (Duration) this.pattern;
9566    }
9567
9568    public boolean hasPatternDuration() { 
9569      return this != null && this.pattern instanceof Duration;
9570    }
9571
9572    /**
9573     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9574
9575When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9576
9577When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9578
9579When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9580
95811. If primitive: it must match exactly the pattern value
95822. If a complex object: it must match (recursively) the pattern value
95833. If an array: it must match (recursively) the pattern value
9584
9585If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9586     */
9587    public HumanName getPatternHumanName() throws FHIRException { 
9588      if (this.pattern == null)
9589        this.pattern = new HumanName();
9590      if (!(this.pattern instanceof HumanName))
9591        throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.pattern.getClass().getName()+" was encountered");
9592      return (HumanName) this.pattern;
9593    }
9594
9595    public boolean hasPatternHumanName() { 
9596      return this != null && this.pattern instanceof HumanName;
9597    }
9598
9599    /**
9600     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9601
9602When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9603
9604When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9605
9606When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9607
96081. If primitive: it must match exactly the pattern value
96092. If a complex object: it must match (recursively) the pattern value
96103. If an array: it must match (recursively) the pattern value
9611
9612If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9613     */
9614    public Identifier getPatternIdentifier() throws FHIRException { 
9615      if (this.pattern == null)
9616        this.pattern = new Identifier();
9617      if (!(this.pattern instanceof Identifier))
9618        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.pattern.getClass().getName()+" was encountered");
9619      return (Identifier) this.pattern;
9620    }
9621
9622    public boolean hasPatternIdentifier() { 
9623      return this != null && this.pattern instanceof Identifier;
9624    }
9625
9626    /**
9627     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9628
9629When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9630
9631When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9632
9633When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9634
96351. If primitive: it must match exactly the pattern value
96362. If a complex object: it must match (recursively) the pattern value
96373. If an array: it must match (recursively) the pattern value
9638
9639If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9640     */
9641    public Money getPatternMoney() throws FHIRException { 
9642      if (this.pattern == null)
9643        this.pattern = new Money();
9644      if (!(this.pattern instanceof Money))
9645        throw new FHIRException("Type mismatch: the type Money was expected, but "+this.pattern.getClass().getName()+" was encountered");
9646      return (Money) this.pattern;
9647    }
9648
9649    public boolean hasPatternMoney() { 
9650      return this != null && this.pattern instanceof Money;
9651    }
9652
9653    /**
9654     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9655
9656When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9657
9658When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9659
9660When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9661
96621. If primitive: it must match exactly the pattern value
96632. If a complex object: it must match (recursively) the pattern value
96643. If an array: it must match (recursively) the pattern value
9665
9666If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9667     */
9668    public Period getPatternPeriod() throws FHIRException { 
9669      if (this.pattern == null)
9670        this.pattern = new Period();
9671      if (!(this.pattern instanceof Period))
9672        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.pattern.getClass().getName()+" was encountered");
9673      return (Period) this.pattern;
9674    }
9675
9676    public boolean hasPatternPeriod() { 
9677      return this != null && this.pattern instanceof Period;
9678    }
9679
9680    /**
9681     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9682
9683When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9684
9685When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9686
9687When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9688
96891. If primitive: it must match exactly the pattern value
96902. If a complex object: it must match (recursively) the pattern value
96913. If an array: it must match (recursively) the pattern value
9692
9693If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9694     */
9695    public Quantity getPatternQuantity() throws FHIRException { 
9696      if (this.pattern == null)
9697        this.pattern = new Quantity();
9698      if (!(this.pattern instanceof Quantity))
9699        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.pattern.getClass().getName()+" was encountered");
9700      return (Quantity) this.pattern;
9701    }
9702
9703    public boolean hasPatternQuantity() { 
9704      return this != null && this.pattern instanceof Quantity;
9705    }
9706
9707    /**
9708     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9709
9710When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9711
9712When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9713
9714When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9715
97161. If primitive: it must match exactly the pattern value
97172. If a complex object: it must match (recursively) the pattern value
97183. If an array: it must match (recursively) the pattern value
9719
9720If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9721     */
9722    public Range getPatternRange() throws FHIRException { 
9723      if (this.pattern == null)
9724        this.pattern = new Range();
9725      if (!(this.pattern instanceof Range))
9726        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.pattern.getClass().getName()+" was encountered");
9727      return (Range) this.pattern;
9728    }
9729
9730    public boolean hasPatternRange() { 
9731      return this != null && this.pattern instanceof Range;
9732    }
9733
9734    /**
9735     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9736
9737When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9738
9739When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9740
9741When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9742
97431. If primitive: it must match exactly the pattern value
97442. If a complex object: it must match (recursively) the pattern value
97453. If an array: it must match (recursively) the pattern value
9746
9747If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9748     */
9749    public Ratio getPatternRatio() throws FHIRException { 
9750      if (this.pattern == null)
9751        this.pattern = new Ratio();
9752      if (!(this.pattern instanceof Ratio))
9753        throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.pattern.getClass().getName()+" was encountered");
9754      return (Ratio) this.pattern;
9755    }
9756
9757    public boolean hasPatternRatio() { 
9758      return this != null && this.pattern instanceof Ratio;
9759    }
9760
9761    /**
9762     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9763
9764When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9765
9766When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9767
9768When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9769
97701. If primitive: it must match exactly the pattern value
97712. If a complex object: it must match (recursively) the pattern value
97723. If an array: it must match (recursively) the pattern value
9773
9774If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9775     */
9776    public RatioRange getPatternRatioRange() throws FHIRException { 
9777      if (this.pattern == null)
9778        this.pattern = new RatioRange();
9779      if (!(this.pattern instanceof RatioRange))
9780        throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.pattern.getClass().getName()+" was encountered");
9781      return (RatioRange) this.pattern;
9782    }
9783
9784    public boolean hasPatternRatioRange() { 
9785      return this != null && this.pattern instanceof RatioRange;
9786    }
9787
9788    /**
9789     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9790
9791When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9792
9793When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9794
9795When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9796
97971. If primitive: it must match exactly the pattern value
97982. If a complex object: it must match (recursively) the pattern value
97993. If an array: it must match (recursively) the pattern value
9800
9801If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9802     */
9803    public Reference getPatternReference() throws FHIRException { 
9804      if (this.pattern == null)
9805        this.pattern = new Reference();
9806      if (!(this.pattern instanceof Reference))
9807        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.pattern.getClass().getName()+" was encountered");
9808      return (Reference) this.pattern;
9809    }
9810
9811    public boolean hasPatternReference() { 
9812      return this != null && this.pattern instanceof Reference;
9813    }
9814
9815    /**
9816     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9817
9818When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9819
9820When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9821
9822When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9823
98241. If primitive: it must match exactly the pattern value
98252. If a complex object: it must match (recursively) the pattern value
98263. If an array: it must match (recursively) the pattern value
9827
9828If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9829     */
9830    public SampledData getPatternSampledData() throws FHIRException { 
9831      if (this.pattern == null)
9832        this.pattern = new SampledData();
9833      if (!(this.pattern instanceof SampledData))
9834        throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.pattern.getClass().getName()+" was encountered");
9835      return (SampledData) this.pattern;
9836    }
9837
9838    public boolean hasPatternSampledData() { 
9839      return this != null && this.pattern instanceof SampledData;
9840    }
9841
9842    /**
9843     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9844
9845When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9846
9847When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9848
9849When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9850
98511. If primitive: it must match exactly the pattern value
98522. If a complex object: it must match (recursively) the pattern value
98533. If an array: it must match (recursively) the pattern value
9854
9855If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9856     */
9857    public Signature getPatternSignature() throws FHIRException { 
9858      if (this.pattern == null)
9859        this.pattern = new Signature();
9860      if (!(this.pattern instanceof Signature))
9861        throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.pattern.getClass().getName()+" was encountered");
9862      return (Signature) this.pattern;
9863    }
9864
9865    public boolean hasPatternSignature() { 
9866      return this != null && this.pattern instanceof Signature;
9867    }
9868
9869    /**
9870     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9871
9872When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9873
9874When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9875
9876When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9877
98781. If primitive: it must match exactly the pattern value
98792. If a complex object: it must match (recursively) the pattern value
98803. If an array: it must match (recursively) the pattern value
9881
9882If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9883     */
9884    public Timing getPatternTiming() throws FHIRException { 
9885      if (this.pattern == null)
9886        this.pattern = new Timing();
9887      if (!(this.pattern instanceof Timing))
9888        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.pattern.getClass().getName()+" was encountered");
9889      return (Timing) this.pattern;
9890    }
9891
9892    public boolean hasPatternTiming() { 
9893      return this != null && this.pattern instanceof Timing;
9894    }
9895
9896    /**
9897     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9898
9899When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9900
9901When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9902
9903When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9904
99051. If primitive: it must match exactly the pattern value
99062. If a complex object: it must match (recursively) the pattern value
99073. If an array: it must match (recursively) the pattern value
9908
9909If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9910     */
9911    public ContactDetail getPatternContactDetail() throws FHIRException { 
9912      if (this.pattern == null)
9913        this.pattern = new ContactDetail();
9914      if (!(this.pattern instanceof ContactDetail))
9915        throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.pattern.getClass().getName()+" was encountered");
9916      return (ContactDetail) this.pattern;
9917    }
9918
9919    public boolean hasPatternContactDetail() { 
9920      return this != null && this.pattern instanceof ContactDetail;
9921    }
9922
9923    /**
9924     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9925
9926When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9927
9928When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9929
9930When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9931
99321. If primitive: it must match exactly the pattern value
99332. If a complex object: it must match (recursively) the pattern value
99343. If an array: it must match (recursively) the pattern value
9935
9936If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9937     */
9938    public DataRequirement getPatternDataRequirement() throws FHIRException { 
9939      if (this.pattern == null)
9940        this.pattern = new DataRequirement();
9941      if (!(this.pattern instanceof DataRequirement))
9942        throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.pattern.getClass().getName()+" was encountered");
9943      return (DataRequirement) this.pattern;
9944    }
9945
9946    public boolean hasPatternDataRequirement() { 
9947      return this != null && this.pattern instanceof DataRequirement;
9948    }
9949
9950    /**
9951     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9952
9953When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9954
9955When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9956
9957When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9958
99591. If primitive: it must match exactly the pattern value
99602. If a complex object: it must match (recursively) the pattern value
99613. If an array: it must match (recursively) the pattern value
9962
9963If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9964     */
9965    public Expression getPatternExpression() throws FHIRException { 
9966      if (this.pattern == null)
9967        this.pattern = new Expression();
9968      if (!(this.pattern instanceof Expression))
9969        throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.pattern.getClass().getName()+" was encountered");
9970      return (Expression) this.pattern;
9971    }
9972
9973    public boolean hasPatternExpression() { 
9974      return this != null && this.pattern instanceof Expression;
9975    }
9976
9977    /**
9978     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
9979
9980When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9981
9982When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
9983
9984When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
9985
99861. If primitive: it must match exactly the pattern value
99872. If a complex object: it must match (recursively) the pattern value
99883. If an array: it must match (recursively) the pattern value
9989
9990If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
9991     */
9992    public ParameterDefinition getPatternParameterDefinition() throws FHIRException { 
9993      if (this.pattern == null)
9994        this.pattern = new ParameterDefinition();
9995      if (!(this.pattern instanceof ParameterDefinition))
9996        throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.pattern.getClass().getName()+" was encountered");
9997      return (ParameterDefinition) this.pattern;
9998    }
9999
10000    public boolean hasPatternParameterDefinition() { 
10001      return this != null && this.pattern instanceof ParameterDefinition;
10002    }
10003
10004    /**
10005     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
10006
10007When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
10008
10009When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
10010
10011When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
10012
100131. If primitive: it must match exactly the pattern value
100142. If a complex object: it must match (recursively) the pattern value
100153. If an array: it must match (recursively) the pattern value
10016
10017If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
10018     */
10019    public RelatedArtifact getPatternRelatedArtifact() throws FHIRException { 
10020      if (this.pattern == null)
10021        this.pattern = new RelatedArtifact();
10022      if (!(this.pattern instanceof RelatedArtifact))
10023        throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.pattern.getClass().getName()+" was encountered");
10024      return (RelatedArtifact) this.pattern;
10025    }
10026
10027    public boolean hasPatternRelatedArtifact() { 
10028      return this != null && this.pattern instanceof RelatedArtifact;
10029    }
10030
10031    /**
10032     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
10033
10034When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
10035
10036When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
10037
10038When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
10039
100401. If primitive: it must match exactly the pattern value
100412. If a complex object: it must match (recursively) the pattern value
100423. If an array: it must match (recursively) the pattern value
10043
10044If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
10045     */
10046    public TriggerDefinition getPatternTriggerDefinition() throws FHIRException { 
10047      if (this.pattern == null)
10048        this.pattern = new TriggerDefinition();
10049      if (!(this.pattern instanceof TriggerDefinition))
10050        throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.pattern.getClass().getName()+" was encountered");
10051      return (TriggerDefinition) this.pattern;
10052    }
10053
10054    public boolean hasPatternTriggerDefinition() { 
10055      return this != null && this.pattern instanceof TriggerDefinition;
10056    }
10057
10058    /**
10059     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
10060
10061When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
10062
10063When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
10064
10065When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
10066
100671. If primitive: it must match exactly the pattern value
100682. If a complex object: it must match (recursively) the pattern value
100693. If an array: it must match (recursively) the pattern value
10070
10071If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
10072     */
10073    public UsageContext getPatternUsageContext() throws FHIRException { 
10074      if (this.pattern == null)
10075        this.pattern = new UsageContext();
10076      if (!(this.pattern instanceof UsageContext))
10077        throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.pattern.getClass().getName()+" was encountered");
10078      return (UsageContext) this.pattern;
10079    }
10080
10081    public boolean hasPatternUsageContext() { 
10082      return this != null && this.pattern instanceof UsageContext;
10083    }
10084
10085    /**
10086     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
10087
10088When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
10089
10090When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
10091
10092When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
10093
100941. If primitive: it must match exactly the pattern value
100952. If a complex object: it must match (recursively) the pattern value
100963. If an array: it must match (recursively) the pattern value
10097
10098If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
10099     */
10100    public Availability getPatternAvailability() throws FHIRException { 
10101      if (this.pattern == null)
10102        this.pattern = new Availability();
10103      if (!(this.pattern instanceof Availability))
10104        throw new FHIRException("Type mismatch: the type Availability was expected, but "+this.pattern.getClass().getName()+" was encountered");
10105      return (Availability) this.pattern;
10106    }
10107
10108    public boolean hasPatternAvailability() { 
10109      return this != null && this.pattern instanceof Availability;
10110    }
10111
10112    /**
10113     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
10114
10115When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
10116
10117When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
10118
10119When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
10120
101211. If primitive: it must match exactly the pattern value
101222. If a complex object: it must match (recursively) the pattern value
101233. If an array: it must match (recursively) the pattern value
10124
10125If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
10126     */
10127    public ExtendedContactDetail getPatternExtendedContactDetail() throws FHIRException { 
10128      if (this.pattern == null)
10129        this.pattern = new ExtendedContactDetail();
10130      if (!(this.pattern instanceof ExtendedContactDetail))
10131        throw new FHIRException("Type mismatch: the type ExtendedContactDetail was expected, but "+this.pattern.getClass().getName()+" was encountered");
10132      return (ExtendedContactDetail) this.pattern;
10133    }
10134
10135    public boolean hasPatternExtendedContactDetail() { 
10136      return this != null && this.pattern instanceof ExtendedContactDetail;
10137    }
10138
10139    /**
10140     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
10141
10142When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
10143
10144When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
10145
10146When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
10147
101481. If primitive: it must match exactly the pattern value
101492. If a complex object: it must match (recursively) the pattern value
101503. If an array: it must match (recursively) the pattern value
10151
10152If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
10153     */
10154    public Dosage getPatternDosage() throws FHIRException { 
10155      if (this.pattern == null)
10156        this.pattern = new Dosage();
10157      if (!(this.pattern instanceof Dosage))
10158        throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.pattern.getClass().getName()+" was encountered");
10159      return (Dosage) this.pattern;
10160    }
10161
10162    public boolean hasPatternDosage() { 
10163      return this != null && this.pattern instanceof Dosage;
10164    }
10165
10166    /**
10167     * @return {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
10168
10169When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
10170
10171When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
10172
10173When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
10174
101751. If primitive: it must match exactly the pattern value
101762. If a complex object: it must match (recursively) the pattern value
101773. If an array: it must match (recursively) the pattern value
10178
10179If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
10180     */
10181    public Meta getPatternMeta() throws FHIRException { 
10182      if (this.pattern == null)
10183        this.pattern = new Meta();
10184      if (!(this.pattern instanceof Meta))
10185        throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.pattern.getClass().getName()+" was encountered");
10186      return (Meta) this.pattern;
10187    }
10188
10189    public boolean hasPatternMeta() { 
10190      return this != null && this.pattern instanceof Meta;
10191    }
10192
10193    public boolean hasPattern() { 
10194      return this.pattern != null && !this.pattern.isEmpty();
10195    }
10196
10197    /**
10198     * @param value {@link #pattern} (Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  
10199
10200When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
10201
10202When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
10203
10204When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,
10205
102061. If primitive: it must match exactly the pattern value
102072. If a complex object: it must match (recursively) the pattern value
102083. If an array: it must match (recursively) the pattern value
10209
10210If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.)
10211     */
10212    public ElementDefinition setPattern(DataType value) { 
10213      if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof CodeableReference || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof RatioRange || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Availability || value instanceof ExtendedContactDetail || value instanceof Dosage || value instanceof Meta))
10214        throw new FHIRException("Not the right type for ElementDefinition.pattern[x]: "+value.fhirType());
10215      this.pattern = value;
10216      return this;
10217    }
10218
10219    /**
10220     * @return {@link #example} (A sample value for this element demonstrating the type of information that would typically be found in the element.)
10221     */
10222    public List<ElementDefinitionExampleComponent> getExample() { 
10223      if (this.example == null)
10224        this.example = new ArrayList<ElementDefinitionExampleComponent>();
10225      return this.example;
10226    }
10227
10228    /**
10229     * @return Returns a reference to <code>this</code> for easy method chaining
10230     */
10231    public ElementDefinition setExample(List<ElementDefinitionExampleComponent> theExample) { 
10232      this.example = theExample;
10233      return this;
10234    }
10235
10236    public boolean hasExample() { 
10237      if (this.example == null)
10238        return false;
10239      for (ElementDefinitionExampleComponent item : this.example)
10240        if (!item.isEmpty())
10241          return true;
10242      return false;
10243    }
10244
10245    public ElementDefinitionExampleComponent addExample() { //3
10246      ElementDefinitionExampleComponent t = new ElementDefinitionExampleComponent();
10247      if (this.example == null)
10248        this.example = new ArrayList<ElementDefinitionExampleComponent>();
10249      this.example.add(t);
10250      return t;
10251    }
10252
10253    public ElementDefinition addExample(ElementDefinitionExampleComponent t) { //3
10254      if (t == null)
10255        return this;
10256      if (this.example == null)
10257        this.example = new ArrayList<ElementDefinitionExampleComponent>();
10258      this.example.add(t);
10259      return this;
10260    }
10261
10262    /**
10263     * @return The first repetition of repeating field {@link #example}, creating it if it does not already exist {3}
10264     */
10265    public ElementDefinitionExampleComponent getExampleFirstRep() { 
10266      if (getExample().isEmpty()) {
10267        addExample();
10268      }
10269      return getExample().get(0);
10270    }
10271
10272    /**
10273     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10274     */
10275    public DataType getMinValue() { 
10276      return this.minValue;
10277    }
10278
10279    /**
10280     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10281     */
10282    public DateType getMinValueDateType() throws FHIRException { 
10283      if (this.minValue == null)
10284        this.minValue = new DateType();
10285      if (!(this.minValue instanceof DateType))
10286        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.minValue.getClass().getName()+" was encountered");
10287      return (DateType) this.minValue;
10288    }
10289
10290    public boolean hasMinValueDateType() { 
10291      return this != null && this.minValue instanceof DateType;
10292    }
10293
10294    /**
10295     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10296     */
10297    public DateTimeType getMinValueDateTimeType() throws FHIRException { 
10298      if (this.minValue == null)
10299        this.minValue = new DateTimeType();
10300      if (!(this.minValue instanceof DateTimeType))
10301        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.minValue.getClass().getName()+" was encountered");
10302      return (DateTimeType) this.minValue;
10303    }
10304
10305    public boolean hasMinValueDateTimeType() { 
10306      return this != null && this.minValue instanceof DateTimeType;
10307    }
10308
10309    /**
10310     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10311     */
10312    public InstantType getMinValueInstantType() throws FHIRException { 
10313      if (this.minValue == null)
10314        this.minValue = new InstantType();
10315      if (!(this.minValue instanceof InstantType))
10316        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.minValue.getClass().getName()+" was encountered");
10317      return (InstantType) this.minValue;
10318    }
10319
10320    public boolean hasMinValueInstantType() { 
10321      return this != null && this.minValue instanceof InstantType;
10322    }
10323
10324    /**
10325     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10326     */
10327    public TimeType getMinValueTimeType() throws FHIRException { 
10328      if (this.minValue == null)
10329        this.minValue = new TimeType();
10330      if (!(this.minValue instanceof TimeType))
10331        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.minValue.getClass().getName()+" was encountered");
10332      return (TimeType) this.minValue;
10333    }
10334
10335    public boolean hasMinValueTimeType() { 
10336      return this != null && this.minValue instanceof TimeType;
10337    }
10338
10339    /**
10340     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10341     */
10342    public DecimalType getMinValueDecimalType() throws FHIRException { 
10343      if (this.minValue == null)
10344        this.minValue = new DecimalType();
10345      if (!(this.minValue instanceof DecimalType))
10346        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.minValue.getClass().getName()+" was encountered");
10347      return (DecimalType) this.minValue;
10348    }
10349
10350    public boolean hasMinValueDecimalType() { 
10351      return this != null && this.minValue instanceof DecimalType;
10352    }
10353
10354    /**
10355     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10356     */
10357    public IntegerType getMinValueIntegerType() throws FHIRException { 
10358      if (this.minValue == null)
10359        this.minValue = new IntegerType();
10360      if (!(this.minValue instanceof IntegerType))
10361        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.minValue.getClass().getName()+" was encountered");
10362      return (IntegerType) this.minValue;
10363    }
10364
10365    public boolean hasMinValueIntegerType() { 
10366      return this != null && this.minValue instanceof IntegerType;
10367    }
10368
10369    /**
10370     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10371     */
10372    public Integer64Type getMinValueInteger64Type() throws FHIRException { 
10373      if (this.minValue == null)
10374        this.minValue = new Integer64Type();
10375      if (!(this.minValue instanceof Integer64Type))
10376        throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.minValue.getClass().getName()+" was encountered");
10377      return (Integer64Type) this.minValue;
10378    }
10379
10380    public boolean hasMinValueInteger64Type() { 
10381      return this != null && this.minValue instanceof Integer64Type;
10382    }
10383
10384    /**
10385     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10386     */
10387    public PositiveIntType getMinValuePositiveIntType() throws FHIRException { 
10388      if (this.minValue == null)
10389        this.minValue = new PositiveIntType();
10390      if (!(this.minValue instanceof PositiveIntType))
10391        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.minValue.getClass().getName()+" was encountered");
10392      return (PositiveIntType) this.minValue;
10393    }
10394
10395    public boolean hasMinValuePositiveIntType() { 
10396      return this != null && this.minValue instanceof PositiveIntType;
10397    }
10398
10399    /**
10400     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10401     */
10402    public UnsignedIntType getMinValueUnsignedIntType() throws FHIRException { 
10403      if (this.minValue == null)
10404        this.minValue = new UnsignedIntType();
10405      if (!(this.minValue instanceof UnsignedIntType))
10406        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.minValue.getClass().getName()+" was encountered");
10407      return (UnsignedIntType) this.minValue;
10408    }
10409
10410    public boolean hasMinValueUnsignedIntType() { 
10411      return this != null && this.minValue instanceof UnsignedIntType;
10412    }
10413
10414    /**
10415     * @return {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10416     */
10417    public Quantity getMinValueQuantity() throws FHIRException { 
10418      if (this.minValue == null)
10419        this.minValue = new Quantity();
10420      if (!(this.minValue instanceof Quantity))
10421        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.minValue.getClass().getName()+" was encountered");
10422      return (Quantity) this.minValue;
10423    }
10424
10425    public boolean hasMinValueQuantity() { 
10426      return this != null && this.minValue instanceof Quantity;
10427    }
10428
10429    public boolean hasMinValue() { 
10430      return this.minValue != null && !this.minValue.isEmpty();
10431    }
10432
10433    /**
10434     * @param value {@link #minValue} (The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10435     */
10436    public ElementDefinition setMinValue(DataType value) { 
10437      if (value != null && !(value instanceof DateType || value instanceof DateTimeType || value instanceof InstantType || value instanceof TimeType || value instanceof DecimalType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof PositiveIntType || value instanceof UnsignedIntType || value instanceof Quantity))
10438        throw new FHIRException("Not the right type for ElementDefinition.minValue[x]: "+value.fhirType());
10439      this.minValue = value;
10440      return this;
10441    }
10442
10443    /**
10444     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10445     */
10446    public DataType getMaxValue() { 
10447      return this.maxValue;
10448    }
10449
10450    /**
10451     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10452     */
10453    public DateType getMaxValueDateType() throws FHIRException { 
10454      if (this.maxValue == null)
10455        this.maxValue = new DateType();
10456      if (!(this.maxValue instanceof DateType))
10457        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10458      return (DateType) this.maxValue;
10459    }
10460
10461    public boolean hasMaxValueDateType() { 
10462      return this != null && this.maxValue instanceof DateType;
10463    }
10464
10465    /**
10466     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10467     */
10468    public DateTimeType getMaxValueDateTimeType() throws FHIRException { 
10469      if (this.maxValue == null)
10470        this.maxValue = new DateTimeType();
10471      if (!(this.maxValue instanceof DateTimeType))
10472        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10473      return (DateTimeType) this.maxValue;
10474    }
10475
10476    public boolean hasMaxValueDateTimeType() { 
10477      return this != null && this.maxValue instanceof DateTimeType;
10478    }
10479
10480    /**
10481     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10482     */
10483    public InstantType getMaxValueInstantType() throws FHIRException { 
10484      if (this.maxValue == null)
10485        this.maxValue = new InstantType();
10486      if (!(this.maxValue instanceof InstantType))
10487        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10488      return (InstantType) this.maxValue;
10489    }
10490
10491    public boolean hasMaxValueInstantType() { 
10492      return this != null && this.maxValue instanceof InstantType;
10493    }
10494
10495    /**
10496     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10497     */
10498    public TimeType getMaxValueTimeType() throws FHIRException { 
10499      if (this.maxValue == null)
10500        this.maxValue = new TimeType();
10501      if (!(this.maxValue instanceof TimeType))
10502        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10503      return (TimeType) this.maxValue;
10504    }
10505
10506    public boolean hasMaxValueTimeType() { 
10507      return this != null && this.maxValue instanceof TimeType;
10508    }
10509
10510    /**
10511     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10512     */
10513    public DecimalType getMaxValueDecimalType() throws FHIRException { 
10514      if (this.maxValue == null)
10515        this.maxValue = new DecimalType();
10516      if (!(this.maxValue instanceof DecimalType))
10517        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10518      return (DecimalType) this.maxValue;
10519    }
10520
10521    public boolean hasMaxValueDecimalType() { 
10522      return this != null && this.maxValue instanceof DecimalType;
10523    }
10524
10525    /**
10526     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10527     */
10528    public IntegerType getMaxValueIntegerType() throws FHIRException { 
10529      if (this.maxValue == null)
10530        this.maxValue = new IntegerType();
10531      if (!(this.maxValue instanceof IntegerType))
10532        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10533      return (IntegerType) this.maxValue;
10534    }
10535
10536    public boolean hasMaxValueIntegerType() { 
10537      return this != null && this.maxValue instanceof IntegerType;
10538    }
10539
10540    /**
10541     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10542     */
10543    public Integer64Type getMaxValueInteger64Type() throws FHIRException { 
10544      if (this.maxValue == null)
10545        this.maxValue = new Integer64Type();
10546      if (!(this.maxValue instanceof Integer64Type))
10547        throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10548      return (Integer64Type) this.maxValue;
10549    }
10550
10551    public boolean hasMaxValueInteger64Type() { 
10552      return this != null && this.maxValue instanceof Integer64Type;
10553    }
10554
10555    /**
10556     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10557     */
10558    public PositiveIntType getMaxValuePositiveIntType() throws FHIRException { 
10559      if (this.maxValue == null)
10560        this.maxValue = new PositiveIntType();
10561      if (!(this.maxValue instanceof PositiveIntType))
10562        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10563      return (PositiveIntType) this.maxValue;
10564    }
10565
10566    public boolean hasMaxValuePositiveIntType() { 
10567      return this != null && this.maxValue instanceof PositiveIntType;
10568    }
10569
10570    /**
10571     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10572     */
10573    public UnsignedIntType getMaxValueUnsignedIntType() throws FHIRException { 
10574      if (this.maxValue == null)
10575        this.maxValue = new UnsignedIntType();
10576      if (!(this.maxValue instanceof UnsignedIntType))
10577        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10578      return (UnsignedIntType) this.maxValue;
10579    }
10580
10581    public boolean hasMaxValueUnsignedIntType() { 
10582      return this != null && this.maxValue instanceof UnsignedIntType;
10583    }
10584
10585    /**
10586     * @return {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10587     */
10588    public Quantity getMaxValueQuantity() throws FHIRException { 
10589      if (this.maxValue == null)
10590        this.maxValue = new Quantity();
10591      if (!(this.maxValue instanceof Quantity))
10592        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.maxValue.getClass().getName()+" was encountered");
10593      return (Quantity) this.maxValue;
10594    }
10595
10596    public boolean hasMaxValueQuantity() { 
10597      return this != null && this.maxValue instanceof Quantity;
10598    }
10599
10600    public boolean hasMaxValue() { 
10601      return this.maxValue != null && !this.maxValue.isEmpty();
10602    }
10603
10604    /**
10605     * @param value {@link #maxValue} (The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.)
10606     */
10607    public ElementDefinition setMaxValue(DataType value) { 
10608      if (value != null && !(value instanceof DateType || value instanceof DateTimeType || value instanceof InstantType || value instanceof TimeType || value instanceof DecimalType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof PositiveIntType || value instanceof UnsignedIntType || value instanceof Quantity))
10609        throw new FHIRException("Not the right type for ElementDefinition.maxValue[x]: "+value.fhirType());
10610      this.maxValue = value;
10611      return this;
10612    }
10613
10614    /**
10615     * @return {@link #maxLength} (Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. ```maxLength``` SHOULD only be used on primitive data types that have a string representation (see [http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-structuredefinition-type-characteristics.html)).). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value
10616     */
10617    public IntegerType getMaxLengthElement() { 
10618      if (this.maxLength == null)
10619        if (Configuration.errorOnAutoCreate())
10620          throw new Error("Attempt to auto-create ElementDefinition.maxLength");
10621        else if (Configuration.doAutoCreate())
10622          this.maxLength = new IntegerType(); // bb
10623      return this.maxLength;
10624    }
10625
10626    public boolean hasMaxLengthElement() { 
10627      return this.maxLength != null && !this.maxLength.isEmpty();
10628    }
10629
10630    public boolean hasMaxLength() { 
10631      return this.maxLength != null && !this.maxLength.isEmpty();
10632    }
10633
10634    /**
10635     * @param value {@link #maxLength} (Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. ```maxLength``` SHOULD only be used on primitive data types that have a string representation (see [http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-structuredefinition-type-characteristics.html)).). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value
10636     */
10637    public ElementDefinition setMaxLengthElement(IntegerType value) { 
10638      this.maxLength = value;
10639      return this;
10640    }
10641
10642    /**
10643     * @return Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. ```maxLength``` SHOULD only be used on primitive data types that have a string representation (see [http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-structuredefinition-type-characteristics.html)).
10644     */
10645    public int getMaxLength() { 
10646      return this.maxLength == null || this.maxLength.isEmpty() ? 0 : this.maxLength.getValue();
10647    }
10648
10649    /**
10650     * @param value Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. ```maxLength``` SHOULD only be used on primitive data types that have a string representation (see [http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-structuredefinition-type-characteristics.html)).
10651     */
10652    public ElementDefinition setMaxLength(int value) { 
10653        if (this.maxLength == null)
10654          this.maxLength = new IntegerType();
10655        this.maxLength.setValue(value);
10656      return this;
10657    }
10658
10659    /**
10660     * @return {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.)
10661     */
10662    public List<IdType> getCondition() { 
10663      if (this.condition == null)
10664        this.condition = new ArrayList<IdType>();
10665      return this.condition;
10666    }
10667
10668    /**
10669     * @return Returns a reference to <code>this</code> for easy method chaining
10670     */
10671    public ElementDefinition setCondition(List<IdType> theCondition) { 
10672      this.condition = theCondition;
10673      return this;
10674    }
10675
10676    public boolean hasCondition() { 
10677      if (this.condition == null)
10678        return false;
10679      for (IdType item : this.condition)
10680        if (!item.isEmpty())
10681          return true;
10682      return false;
10683    }
10684
10685    /**
10686     * @return {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.)
10687     */
10688    public IdType addConditionElement() {//2 
10689      IdType t = new IdType();
10690      if (this.condition == null)
10691        this.condition = new ArrayList<IdType>();
10692      this.condition.add(t);
10693      return t;
10694    }
10695
10696    /**
10697     * @param value {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.)
10698     */
10699    public ElementDefinition addCondition(String value) { //1
10700      IdType t = new IdType();
10701      t.setValue(value);
10702      if (this.condition == null)
10703        this.condition = new ArrayList<IdType>();
10704      this.condition.add(t);
10705      return this;
10706    }
10707
10708    /**
10709     * @param value {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.)
10710     */
10711    public boolean hasCondition(String value) { 
10712      if (this.condition == null)
10713        return false;
10714      for (IdType v : this.condition)
10715        if (v.getValue().equals(value)) // id
10716          return true;
10717      return false;
10718    }
10719
10720    /**
10721     * @return {@link #constraint} (Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.)
10722     */
10723    public List<ElementDefinitionConstraintComponent> getConstraint() { 
10724      if (this.constraint == null)
10725        this.constraint = new ArrayList<ElementDefinitionConstraintComponent>();
10726      return this.constraint;
10727    }
10728
10729    /**
10730     * @return Returns a reference to <code>this</code> for easy method chaining
10731     */
10732    public ElementDefinition setConstraint(List<ElementDefinitionConstraintComponent> theConstraint) { 
10733      this.constraint = theConstraint;
10734      return this;
10735    }
10736
10737    public boolean hasConstraint() { 
10738      if (this.constraint == null)
10739        return false;
10740      for (ElementDefinitionConstraintComponent item : this.constraint)
10741        if (!item.isEmpty())
10742          return true;
10743      return false;
10744    }
10745
10746    public ElementDefinitionConstraintComponent addConstraint() { //3
10747      ElementDefinitionConstraintComponent t = new ElementDefinitionConstraintComponent();
10748      if (this.constraint == null)
10749        this.constraint = new ArrayList<ElementDefinitionConstraintComponent>();
10750      this.constraint.add(t);
10751      return t;
10752    }
10753
10754    public ElementDefinition addConstraint(ElementDefinitionConstraintComponent t) { //3
10755      if (t == null)
10756        return this;
10757      if (this.constraint == null)
10758        this.constraint = new ArrayList<ElementDefinitionConstraintComponent>();
10759      this.constraint.add(t);
10760      return this;
10761    }
10762
10763    /**
10764     * @return The first repetition of repeating field {@link #constraint}, creating it if it does not already exist {3}
10765     */
10766    public ElementDefinitionConstraintComponent getConstraintFirstRep() { 
10767      if (getConstraint().isEmpty()) {
10768        addConstraint();
10769      }
10770      return getConstraint().get(0);
10771    }
10772
10773    /**
10774     * @return {@link #mustHaveValue} (Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.). This is the underlying object with id, value and extensions. The accessor "getMustHaveValue" gives direct access to the value
10775     */
10776    public BooleanType getMustHaveValueElement() { 
10777      if (this.mustHaveValue == null)
10778        if (Configuration.errorOnAutoCreate())
10779          throw new Error("Attempt to auto-create ElementDefinition.mustHaveValue");
10780        else if (Configuration.doAutoCreate())
10781          this.mustHaveValue = new BooleanType(); // bb
10782      return this.mustHaveValue;
10783    }
10784
10785    public boolean hasMustHaveValueElement() { 
10786      return this.mustHaveValue != null && !this.mustHaveValue.isEmpty();
10787    }
10788
10789    public boolean hasMustHaveValue() { 
10790      return this.mustHaveValue != null && !this.mustHaveValue.isEmpty();
10791    }
10792
10793    /**
10794     * @param value {@link #mustHaveValue} (Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.). This is the underlying object with id, value and extensions. The accessor "getMustHaveValue" gives direct access to the value
10795     */
10796    public ElementDefinition setMustHaveValueElement(BooleanType value) { 
10797      this.mustHaveValue = value;
10798      return this;
10799    }
10800
10801    /**
10802     * @return Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.
10803     */
10804    public boolean getMustHaveValue() { 
10805      return this.mustHaveValue == null || this.mustHaveValue.isEmpty() ? false : this.mustHaveValue.getValue();
10806    }
10807
10808    /**
10809     * @param value Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.
10810     */
10811    public ElementDefinition setMustHaveValue(boolean value) { 
10812        if (this.mustHaveValue == null)
10813          this.mustHaveValue = new BooleanType();
10814        this.mustHaveValue.setValue(value);
10815      return this;
10816    }
10817
10818    /**
10819     * @return {@link #valueAlternatives} (Specifies a list of extensions that can appear in place of a primitive value.)
10820     */
10821    public List<CanonicalType> getValueAlternatives() { 
10822      if (this.valueAlternatives == null)
10823        this.valueAlternatives = new ArrayList<CanonicalType>();
10824      return this.valueAlternatives;
10825    }
10826
10827    /**
10828     * @return Returns a reference to <code>this</code> for easy method chaining
10829     */
10830    public ElementDefinition setValueAlternatives(List<CanonicalType> theValueAlternatives) { 
10831      this.valueAlternatives = theValueAlternatives;
10832      return this;
10833    }
10834
10835    public boolean hasValueAlternatives() { 
10836      if (this.valueAlternatives == null)
10837        return false;
10838      for (CanonicalType item : this.valueAlternatives)
10839        if (!item.isEmpty())
10840          return true;
10841      return false;
10842    }
10843
10844    /**
10845     * @return {@link #valueAlternatives} (Specifies a list of extensions that can appear in place of a primitive value.)
10846     */
10847    public CanonicalType addValueAlternativesElement() {//2 
10848      CanonicalType t = new CanonicalType();
10849      if (this.valueAlternatives == null)
10850        this.valueAlternatives = new ArrayList<CanonicalType>();
10851      this.valueAlternatives.add(t);
10852      return t;
10853    }
10854
10855    /**
10856     * @param value {@link #valueAlternatives} (Specifies a list of extensions that can appear in place of a primitive value.)
10857     */
10858    public ElementDefinition addValueAlternatives(String value) { //1
10859      CanonicalType t = new CanonicalType();
10860      t.setValue(value);
10861      if (this.valueAlternatives == null)
10862        this.valueAlternatives = new ArrayList<CanonicalType>();
10863      this.valueAlternatives.add(t);
10864      return this;
10865    }
10866
10867    /**
10868     * @param value {@link #valueAlternatives} (Specifies a list of extensions that can appear in place of a primitive value.)
10869     */
10870    public boolean hasValueAlternatives(String value) { 
10871      if (this.valueAlternatives == null)
10872        return false;
10873      for (CanonicalType v : this.valueAlternatives)
10874        if (v.getValue().equals(value)) // canonical
10875          return true;
10876      return false;
10877    }
10878
10879    /**
10880     * @return {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value
10881     */
10882    public BooleanType getMustSupportElement() { 
10883      if (this.mustSupport == null)
10884        if (Configuration.errorOnAutoCreate())
10885          throw new Error("Attempt to auto-create ElementDefinition.mustSupport");
10886        else if (Configuration.doAutoCreate())
10887          this.mustSupport = new BooleanType(); // bb
10888      return this.mustSupport;
10889    }
10890
10891    public boolean hasMustSupportElement() { 
10892      return this.mustSupport != null && !this.mustSupport.isEmpty();
10893    }
10894
10895    public boolean hasMustSupport() { 
10896      return this.mustSupport != null && !this.mustSupport.isEmpty();
10897    }
10898
10899    /**
10900     * @param value {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.). This is the underlying object with id, value and extensions. The accessor "getMustSupport" gives direct access to the value
10901     */
10902    public ElementDefinition setMustSupportElement(BooleanType value) { 
10903      this.mustSupport = value;
10904      return this;
10905    }
10906
10907    /**
10908     * @return If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.
10909     */
10910    public boolean getMustSupport() { 
10911      return this.mustSupport == null || this.mustSupport.isEmpty() ? false : this.mustSupport.getValue();
10912    }
10913
10914    /**
10915     * @param value If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.
10916     */
10917    public ElementDefinition setMustSupport(boolean value) { 
10918        if (this.mustSupport == null)
10919          this.mustSupport = new BooleanType();
10920        this.mustSupport.setValue(value);
10921      return this;
10922    }
10923
10924    /**
10925     * @return {@link #isModifier} (If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.). This is the underlying object with id, value and extensions. The accessor "getIsModifier" gives direct access to the value
10926     */
10927    public BooleanType getIsModifierElement() { 
10928      if (this.isModifier == null)
10929        if (Configuration.errorOnAutoCreate())
10930          throw new Error("Attempt to auto-create ElementDefinition.isModifier");
10931        else if (Configuration.doAutoCreate())
10932          this.isModifier = new BooleanType(); // bb
10933      return this.isModifier;
10934    }
10935
10936    public boolean hasIsModifierElement() { 
10937      return this.isModifier != null && !this.isModifier.isEmpty();
10938    }
10939
10940    public boolean hasIsModifier() { 
10941      return this.isModifier != null && !this.isModifier.isEmpty();
10942    }
10943
10944    /**
10945     * @param value {@link #isModifier} (If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.). This is the underlying object with id, value and extensions. The accessor "getIsModifier" gives direct access to the value
10946     */
10947    public ElementDefinition setIsModifierElement(BooleanType value) { 
10948      this.isModifier = value;
10949      return this;
10950    }
10951
10952    /**
10953     * @return If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.
10954     */
10955    public boolean getIsModifier() { 
10956      return this.isModifier == null || this.isModifier.isEmpty() ? false : this.isModifier.getValue();
10957    }
10958
10959    /**
10960     * @param value If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.
10961     */
10962    public ElementDefinition setIsModifier(boolean value) { 
10963        if (this.isModifier == null)
10964          this.isModifier = new BooleanType();
10965        this.isModifier.setValue(value);
10966      return this;
10967    }
10968
10969    /**
10970     * @return {@link #isModifierReason} (Explains how that element affects the interpretation of the resource or element that contains it.). This is the underlying object with id, value and extensions. The accessor "getIsModifierReason" gives direct access to the value
10971     */
10972    public StringType getIsModifierReasonElement() { 
10973      if (this.isModifierReason == null)
10974        if (Configuration.errorOnAutoCreate())
10975          throw new Error("Attempt to auto-create ElementDefinition.isModifierReason");
10976        else if (Configuration.doAutoCreate())
10977          this.isModifierReason = new StringType(); // bb
10978      return this.isModifierReason;
10979    }
10980
10981    public boolean hasIsModifierReasonElement() { 
10982      return this.isModifierReason != null && !this.isModifierReason.isEmpty();
10983    }
10984
10985    public boolean hasIsModifierReason() { 
10986      return this.isModifierReason != null && !this.isModifierReason.isEmpty();
10987    }
10988
10989    /**
10990     * @param value {@link #isModifierReason} (Explains how that element affects the interpretation of the resource or element that contains it.). This is the underlying object with id, value and extensions. The accessor "getIsModifierReason" gives direct access to the value
10991     */
10992    public ElementDefinition setIsModifierReasonElement(StringType value) { 
10993      this.isModifierReason = value;
10994      return this;
10995    }
10996
10997    /**
10998     * @return Explains how that element affects the interpretation of the resource or element that contains it.
10999     */
11000    public String getIsModifierReason() { 
11001      return this.isModifierReason == null ? null : this.isModifierReason.getValue();
11002    }
11003
11004    /**
11005     * @param value Explains how that element affects the interpretation of the resource or element that contains it.
11006     */
11007    public ElementDefinition setIsModifierReason(String value) { 
11008      if (Utilities.noString(value))
11009        this.isModifierReason = null;
11010      else {
11011        if (this.isModifierReason == null)
11012          this.isModifierReason = new StringType();
11013        this.isModifierReason.setValue(value);
11014      }
11015      return this;
11016    }
11017
11018    /**
11019     * @return {@link #isSummary} (Whether the element should be included if a client requests a search with the parameter _summary=true.). This is the underlying object with id, value and extensions. The accessor "getIsSummary" gives direct access to the value
11020     */
11021    public BooleanType getIsSummaryElement() { 
11022      if (this.isSummary == null)
11023        if (Configuration.errorOnAutoCreate())
11024          throw new Error("Attempt to auto-create ElementDefinition.isSummary");
11025        else if (Configuration.doAutoCreate())
11026          this.isSummary = new BooleanType(); // bb
11027      return this.isSummary;
11028    }
11029
11030    public boolean hasIsSummaryElement() { 
11031      return this.isSummary != null && !this.isSummary.isEmpty();
11032    }
11033
11034    public boolean hasIsSummary() { 
11035      return this.isSummary != null && !this.isSummary.isEmpty();
11036    }
11037
11038    /**
11039     * @param value {@link #isSummary} (Whether the element should be included if a client requests a search with the parameter _summary=true.). This is the underlying object with id, value and extensions. The accessor "getIsSummary" gives direct access to the value
11040     */
11041    public ElementDefinition setIsSummaryElement(BooleanType value) { 
11042      this.isSummary = value;
11043      return this;
11044    }
11045
11046    /**
11047     * @return Whether the element should be included if a client requests a search with the parameter _summary=true.
11048     */
11049    public boolean getIsSummary() { 
11050      return this.isSummary == null || this.isSummary.isEmpty() ? false : this.isSummary.getValue();
11051    }
11052
11053    /**
11054     * @param value Whether the element should be included if a client requests a search with the parameter _summary=true.
11055     */
11056    public ElementDefinition setIsSummary(boolean value) { 
11057        if (this.isSummary == null)
11058          this.isSummary = new BooleanType();
11059        this.isSummary.setValue(value);
11060      return this;
11061    }
11062
11063    /**
11064     * @return {@link #binding} (Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).)
11065     */
11066    public ElementDefinitionBindingComponent getBinding() { 
11067      if (this.binding == null)
11068        if (Configuration.errorOnAutoCreate())
11069          throw new Error("Attempt to auto-create ElementDefinition.binding");
11070        else if (Configuration.doAutoCreate())
11071          this.binding = new ElementDefinitionBindingComponent(); // cc
11072      return this.binding;
11073    }
11074
11075    public boolean hasBinding() { 
11076      return this.binding != null && !this.binding.isEmpty();
11077    }
11078
11079    /**
11080     * @param value {@link #binding} (Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).)
11081     */
11082    public ElementDefinition setBinding(ElementDefinitionBindingComponent value) { 
11083      this.binding = value;
11084      return this;
11085    }
11086
11087    /**
11088     * @return {@link #mapping} (Identifies a concept from an external specification that roughly corresponds to this element.)
11089     */
11090    public List<ElementDefinitionMappingComponent> getMapping() { 
11091      if (this.mapping == null)
11092        this.mapping = new ArrayList<ElementDefinitionMappingComponent>();
11093      return this.mapping;
11094    }
11095
11096    /**
11097     * @return Returns a reference to <code>this</code> for easy method chaining
11098     */
11099    public ElementDefinition setMapping(List<ElementDefinitionMappingComponent> theMapping) { 
11100      this.mapping = theMapping;
11101      return this;
11102    }
11103
11104    public boolean hasMapping() { 
11105      if (this.mapping == null)
11106        return false;
11107      for (ElementDefinitionMappingComponent item : this.mapping)
11108        if (!item.isEmpty())
11109          return true;
11110      return false;
11111    }
11112
11113    public ElementDefinitionMappingComponent addMapping() { //3
11114      ElementDefinitionMappingComponent t = new ElementDefinitionMappingComponent();
11115      if (this.mapping == null)
11116        this.mapping = new ArrayList<ElementDefinitionMappingComponent>();
11117      this.mapping.add(t);
11118      return t;
11119    }
11120
11121    public ElementDefinition addMapping(ElementDefinitionMappingComponent t) { //3
11122      if (t == null)
11123        return this;
11124      if (this.mapping == null)
11125        this.mapping = new ArrayList<ElementDefinitionMappingComponent>();
11126      this.mapping.add(t);
11127      return this;
11128    }
11129
11130    /**
11131     * @return The first repetition of repeating field {@link #mapping}, creating it if it does not already exist {3}
11132     */
11133    public ElementDefinitionMappingComponent getMappingFirstRep() { 
11134      if (getMapping().isEmpty()) {
11135        addMapping();
11136      }
11137      return getMapping().get(0);
11138    }
11139
11140      protected void listChildren(List<Property> children) {
11141        super.listChildren(children);
11142        children.add(new Property("path", "string", "The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension.", 0, 1, path));
11143        children.add(new Property("representation", "code", "Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used.", 0, java.lang.Integer.MAX_VALUE, representation));
11144        children.add(new Property("sliceName", "string", "The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.", 0, 1, sliceName));
11145        children.add(new Property("sliceIsConstraining", "boolean", "If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.", 0, 1, sliceIsConstraining));
11146        children.add(new Property("label", "string", "A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.", 0, 1, label));
11147        children.add(new Property("code", "Coding", "A code that has the same meaning as the element in a particular terminology.", 0, java.lang.Integer.MAX_VALUE, code));
11148        children.add(new Property("slicing", "", "Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).", 0, 1, slicing));
11149        children.add(new Property("short", "string", "A concise description of what this element means (e.g. for use in autogenerated summaries).", 0, 1, short_));
11150        children.add(new Property("definition", "markdown", "Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).", 0, 1, definition));
11151        children.add(new Property("comment", "markdown", "Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).", 0, 1, comment));
11152        children.add(new Property("requirements", "markdown", "This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.", 0, 1, requirements));
11153        children.add(new Property("alias", "string", "Identifies additional names by which this element might also be known.", 0, java.lang.Integer.MAX_VALUE, alias));
11154        children.add(new Property("min", "unsignedInt", "The minimum number of times this element SHALL appear in the instance.", 0, 1, min));
11155        children.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the instance.", 0, 1, max));
11156        children.add(new Property("base", "", "Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.", 0, 1, base));
11157        children.add(new Property("contentReference", "uri", "Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.", 0, 1, contentReference));
11158        children.add(new Property("type", "", "The data type or resource that the value of this element is permitted to be.", 0, java.lang.Integer.MAX_VALUE, type));
11159        children.add(new Property("defaultValue[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue));
11160        children.add(new Property("meaningWhenMissing", "markdown", "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').", 0, 1, meaningWhenMissing));
11161        children.add(new Property("orderMeaning", "string", "If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning.", 0, 1, orderMeaning));
11162        children.add(new Property("fixed[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed));
11163        children.add(new Property("pattern[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern));
11164        children.add(new Property("example", "", "A sample value for this element demonstrating the type of information that would typically be found in the element.", 0, java.lang.Integer.MAX_VALUE, example));
11165        children.add(new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|integer64|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue));
11166        children.add(new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|integer64|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue));
11167        children.add(new Property("maxLength", "integer", "Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. ```maxLength``` SHOULD only be used on primitive data types that have a string representation (see [http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-structuredefinition-type-characteristics.html)).", 0, 1, maxLength));
11168        children.add(new Property("condition", "id", "A reference to an invariant that may make additional statements about the cardinality or value in the instance.", 0, java.lang.Integer.MAX_VALUE, condition));
11169        children.add(new Property("constraint", "", "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.", 0, java.lang.Integer.MAX_VALUE, constraint));
11170        children.add(new Property("mustHaveValue", "boolean", "Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.", 0, 1, mustHaveValue));
11171        children.add(new Property("valueAlternatives", "canonical(StructureDefinition)", "Specifies a list of extensions that can appear in place of a primitive value.", 0, java.lang.Integer.MAX_VALUE, valueAlternatives));
11172        children.add(new Property("mustSupport", "boolean", "If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.", 0, 1, mustSupport));
11173        children.add(new Property("isModifier", "boolean", "If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.", 0, 1, isModifier));
11174        children.add(new Property("isModifierReason", "string", "Explains how that element affects the interpretation of the resource or element that contains it.", 0, 1, isModifierReason));
11175        children.add(new Property("isSummary", "boolean", "Whether the element should be included if a client requests a search with the parameter _summary=true.", 0, 1, isSummary));
11176        children.add(new Property("binding", "", "Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).", 0, 1, binding));
11177        children.add(new Property("mapping", "", "Identifies a concept from an external specification that roughly corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, mapping));
11178      }
11179
11180      @Override
11181      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
11182        switch (_hash) {
11183        case 3433509: /*path*/  return new Property("path", "string", "The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension.", 0, 1, path);
11184        case -671065907: /*representation*/  return new Property("representation", "code", "Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used.", 0, java.lang.Integer.MAX_VALUE, representation);
11185        case -825289923: /*sliceName*/  return new Property("sliceName", "string", "The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.", 0, 1, sliceName);
11186        case 333040519: /*sliceIsConstraining*/  return new Property("sliceIsConstraining", "boolean", "If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.", 0, 1, sliceIsConstraining);
11187        case 102727412: /*label*/  return new Property("label", "string", "A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.", 0, 1, label);
11188        case 3059181: /*code*/  return new Property("code", "Coding", "A code that has the same meaning as the element in a particular terminology.", 0, java.lang.Integer.MAX_VALUE, code);
11189        case -2119287345: /*slicing*/  return new Property("slicing", "", "Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).", 0, 1, slicing);
11190        case 109413500: /*short*/  return new Property("short", "string", "A concise description of what this element means (e.g. for use in autogenerated summaries).", 0, 1, short_);
11191        case -1014418093: /*definition*/  return new Property("definition", "markdown", "Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).", 0, 1, definition);
11192        case 950398559: /*comment*/  return new Property("comment", "markdown", "Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).", 0, 1, comment);
11193        case -1619874672: /*requirements*/  return new Property("requirements", "markdown", "This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.", 0, 1, requirements);
11194        case 92902992: /*alias*/  return new Property("alias", "string", "Identifies additional names by which this element might also be known.", 0, java.lang.Integer.MAX_VALUE, alias);
11195        case 108114: /*min*/  return new Property("min", "unsignedInt", "The minimum number of times this element SHALL appear in the instance.", 0, 1, min);
11196        case 107876: /*max*/  return new Property("max", "string", "The maximum number of times this element is permitted to appear in the instance.", 0, 1, max);
11197        case 3016401: /*base*/  return new Property("base", "", "Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.", 0, 1, base);
11198        case 1193747154: /*contentReference*/  return new Property("contentReference", "uri", "Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.", 0, 1, contentReference);
11199        case 3575610: /*type*/  return new Property("type", "", "The data type or resource that the value of this element is permitted to be.", 0, java.lang.Integer.MAX_VALUE, type);
11200        case 587922128: /*defaultValue[x]*/  return new Property("defaultValue[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11201        case -659125328: /*defaultValue*/  return new Property("defaultValue[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11202        case 1470297600: /*defaultValueBase64Binary*/  return new Property("defaultValue[x]", "base64Binary", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11203        case 600437336: /*defaultValueBoolean*/  return new Property("defaultValue[x]", "boolean", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11204        case 264593188: /*defaultValueCanonical*/  return new Property("defaultValue[x]", "canonical", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11205        case 1044993469: /*defaultValueCode*/  return new Property("defaultValue[x]", "code", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11206        case 1045010302: /*defaultValueDate*/  return new Property("defaultValue[x]", "date", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11207        case 1220374379: /*defaultValueDateTime*/  return new Property("defaultValue[x]", "dateTime", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11208        case 2077989249: /*defaultValueDecimal*/  return new Property("defaultValue[x]", "decimal", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11209        case -2059245333: /*defaultValueId*/  return new Property("defaultValue[x]", "id", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11210        case -1801671663: /*defaultValueInstant*/  return new Property("defaultValue[x]", "instant", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11211        case -1801189522: /*defaultValueInteger*/  return new Property("defaultValue[x]", "integer", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11212        case -71308628: /*defaultValueInteger64*/  return new Property("defaultValue[x]", "integer64", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11213        case -325436225: /*defaultValueMarkdown*/  return new Property("defaultValue[x]", "markdown", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11214        case 587910138: /*defaultValueOid*/  return new Property("defaultValue[x]", "oid", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11215        case -737344154: /*defaultValuePositiveInt*/  return new Property("defaultValue[x]", "positiveInt", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11216        case -320515103: /*defaultValueString*/  return new Property("defaultValue[x]", "string", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11217        case 1045494429: /*defaultValueTime*/  return new Property("defaultValue[x]", "time", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11218        case 539117290: /*defaultValueUnsignedInt*/  return new Property("defaultValue[x]", "unsignedInt", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11219        case 587916188: /*defaultValueUri*/  return new Property("defaultValue[x]", "uri", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11220        case 587916191: /*defaultValueUrl*/  return new Property("defaultValue[x]", "url", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11221        case 1045535627: /*defaultValueUuid*/  return new Property("defaultValue[x]", "uuid", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11222        case -611966428: /*defaultValueAddress*/  return new Property("defaultValue[x]", "Address", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11223        case 587896623: /*defaultValueAge*/  return new Property("defaultValue[x]", "Age", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11224        case -1851689217: /*defaultValueAnnotation*/  return new Property("defaultValue[x]", "Annotation", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11225        case 2034820339: /*defaultValueAttachment*/  return new Property("defaultValue[x]", "Attachment", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11226        case -410434095: /*defaultValueCodeableConcept*/  return new Property("defaultValue[x]", "CodeableConcept", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11227        case 678417524: /*defaultValueCodeableReference*/  return new Property("defaultValue[x]", "CodeableReference", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11228        case -783616198: /*defaultValueCoding*/  return new Property("defaultValue[x]", "Coding", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11229        case -344740576: /*defaultValueContactPoint*/  return new Property("defaultValue[x]", "ContactPoint", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11230        case -1964924097: /*defaultValueCount*/  return new Property("defaultValue[x]", "Count", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11231        case -283915323: /*defaultValueDistance*/  return new Property("defaultValue[x]", "Distance", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11232        case 1730579812: /*defaultValueDuration*/  return new Property("defaultValue[x]", "Duration", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11233        case -975393912: /*defaultValueHumanName*/  return new Property("defaultValue[x]", "HumanName", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11234        case -1915078535: /*defaultValueIdentifier*/  return new Property("defaultValue[x]", "Identifier", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11235        case -1955695888: /*defaultValueMoney*/  return new Property("defaultValue[x]", "Money", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11236        case -420255343: /*defaultValuePeriod*/  return new Property("defaultValue[x]", "Period", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11237        case -1857379237: /*defaultValueQuantity*/  return new Property("defaultValue[x]", "Quantity", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11238        case -1951495315: /*defaultValueRange*/  return new Property("defaultValue[x]", "Range", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11239        case -1951489477: /*defaultValueRatio*/  return new Property("defaultValue[x]", "Ratio", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11240        case 1803932610: /*defaultValueRatioRange*/  return new Property("defaultValue[x]", "RatioRange", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11241        case -1488914053: /*defaultValueReference*/  return new Property("defaultValue[x]", "Reference", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11242        case -449641228: /*defaultValueSampledData*/  return new Property("defaultValue[x]", "SampledData", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11243        case 509825768: /*defaultValueSignature*/  return new Property("defaultValue[x]", "Signature", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11244        case -302193638: /*defaultValueTiming*/  return new Property("defaultValue[x]", "Timing", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11245        case 1845473985: /*defaultValueContactDetail*/  return new Property("defaultValue[x]", "ContactDetail", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11246        case 375217257: /*defaultValueDataRequirement*/  return new Property("defaultValue[x]", "DataRequirement", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11247        case -2092097944: /*defaultValueExpression*/  return new Property("defaultValue[x]", "Expression", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11248        case -701053940: /*defaultValueParameterDefinition*/  return new Property("defaultValue[x]", "ParameterDefinition", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11249        case 412877133: /*defaultValueRelatedArtifact*/  return new Property("defaultValue[x]", "RelatedArtifact", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11250        case 1913203547: /*defaultValueTriggerDefinition*/  return new Property("defaultValue[x]", "TriggerDefinition", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11251        case -701644642: /*defaultValueUsageContext*/  return new Property("defaultValue[x]", "UsageContext", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11252        case 388885803: /*defaultValueAvailability*/  return new Property("defaultValue[x]", "Availability", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11253        case 1398098440: /*defaultValueExtendedContactDetail*/  return new Property("defaultValue[x]", "ExtendedContactDetail", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11254        case -754548089: /*defaultValueDosage*/  return new Property("defaultValue[x]", "Dosage", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11255        case 1045282261: /*defaultValueMeta*/  return new Property("defaultValue[x]", "Meta", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, 1, defaultValue);
11256        case 1857257103: /*meaningWhenMissing*/  return new Property("meaningWhenMissing", "markdown", "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').", 0, 1, meaningWhenMissing);
11257        case 1828196047: /*orderMeaning*/  return new Property("orderMeaning", "string", "If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning.", 0, 1, orderMeaning);
11258        case -391522164: /*fixed[x]*/  return new Property("fixed[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11259        case 97445748: /*fixed*/  return new Property("fixed[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11260        case -799290428: /*fixedBase64Binary*/  return new Property("fixed[x]", "base64Binary", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11261        case 520851988: /*fixedBoolean*/  return new Property("fixed[x]", "boolean", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11262        case 1092485088: /*fixedCanonical*/  return new Property("fixed[x]", "canonical", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11263        case 746991489: /*fixedCode*/  return new Property("fixed[x]", "code", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11264        case 747008322: /*fixedDate*/  return new Property("fixed[x]", "date", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11265        case -1246771409: /*fixedDateTime*/  return new Property("fixed[x]", "dateTime", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11266        case 1998403901: /*fixedDecimal*/  return new Property("fixed[x]", "decimal", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11267        case -843914321: /*fixedId*/  return new Property("fixed[x]", "id", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11268        case -1881257011: /*fixedInstant*/  return new Property("fixed[x]", "instant", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11269        case -1880774870: /*fixedInteger*/  return new Property("fixed[x]", "integer", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11270        case 756583272: /*fixedInteger64*/  return new Property("fixed[x]", "integer64", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11271        case 1502385283: /*fixedMarkdown*/  return new Property("fixed[x]", "markdown", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11272        case -391534154: /*fixedOid*/  return new Property("fixed[x]", "oid", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11273        case 297821986: /*fixedPositiveInt*/  return new Property("fixed[x]", "positiveInt", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11274        case 1062390949: /*fixedString*/  return new Property("fixed[x]", "string", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11275        case 747492449: /*fixedTime*/  return new Property("fixed[x]", "time", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11276        case 1574283430: /*fixedUnsignedInt*/  return new Property("fixed[x]", "unsignedInt", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11277        case -391528104: /*fixedUri*/  return new Property("fixed[x]", "uri", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11278        case -391528101: /*fixedUrl*/  return new Property("fixed[x]", "url", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11279        case 747533647: /*fixedUuid*/  return new Property("fixed[x]", "uuid", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11280        case -691551776: /*fixedAddress*/  return new Property("fixed[x]", "Address", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11281        case -391547669: /*fixedAge*/  return new Property("fixed[x]", "Age", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11282        case -1956844093: /*fixedAnnotation*/  return new Property("fixed[x]", "Annotation", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11283        case 1929665463: /*fixedAttachment*/  return new Property("fixed[x]", "Attachment", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11284        case 1962764685: /*fixedCodeableConcept*/  return new Property("fixed[x]", "CodeableConcept", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11285        case 694810928: /*fixedCodeableReference*/  return new Property("fixed[x]", "CodeableReference", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11286        case 599289854: /*fixedCoding*/  return new Property("fixed[x]", "Coding", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11287        case 1680638692: /*fixedContactPoint*/  return new Property("fixed[x]", "ContactPoint", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11288        case 1681916411: /*fixedCount*/  return new Property("fixed[x]", "Count", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11289        case 1543906185: /*fixedDistance*/  return new Property("fixed[x]", "Distance", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11290        case -736565976: /*fixedDuration*/  return new Property("fixed[x]", "Duration", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11291        case -147502012: /*fixedHumanName*/  return new Property("fixed[x]", "HumanName", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11292        case -2020233411: /*fixedIdentifier*/  return new Property("fixed[x]", "Identifier", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11293        case 1691144620: /*fixedMoney*/  return new Property("fixed[x]", "Money", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11294        case 962650709: /*fixedPeriod*/  return new Property("fixed[x]", "Period", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11295        case -29557729: /*fixedQuantity*/  return new Property("fixed[x]", "Quantity", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11296        case 1695345193: /*fixedRange*/  return new Property("fixed[x]", "Range", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11297        case 1695351031: /*fixedRatio*/  return new Property("fixed[x]", "Ratio", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11298        case 1698777734: /*fixedRatioRange*/  return new Property("fixed[x]", "RatioRange", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11299        case -661022153: /*fixedReference*/  return new Property("fixed[x]", "Reference", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11300        case 585524912: /*fixedSampledData*/  return new Property("fixed[x]", "SampledData", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11301        case 1337717668: /*fixedSignature*/  return new Property("fixed[x]", "Signature", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11302        case 1080712414: /*fixedTiming*/  return new Property("fixed[x]", "Timing", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11303        case 207721853: /*fixedContactDetail*/  return new Property("fixed[x]", "ContactDetail", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11304        case -1546551259: /*fixedDataRequirement*/  return new Property("fixed[x]", "DataRequirement", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11305        case 2097714476: /*fixedExpression*/  return new Property("fixed[x]", "Expression", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11306        case -2126861880: /*fixedParameterDefinition*/  return new Property("fixed[x]", "ParameterDefinition", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11307        case -1508891383: /*fixedRelatedArtifact*/  return new Property("fixed[x]", "RelatedArtifact", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11308        case 1929596951: /*fixedTriggerDefinition*/  return new Property("fixed[x]", "TriggerDefinition", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11309        case 1323734626: /*fixedUsageContext*/  return new Property("fixed[x]", "UsageContext", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11310        case -1880702225: /*fixedAvailability*/  return new Property("fixed[x]", "Availability", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11311        case 1291235524: /*fixedExtendedContactDetail*/  return new Property("fixed[x]", "ExtendedContactDetail", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11312        case 628357963: /*fixedDosage*/  return new Property("fixed[x]", "Dosage", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11313        case 747280281: /*fixedMeta*/  return new Property("fixed[x]", "Meta", "Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, 1, fixed);
11314        case -885125392: /*pattern[x]*/  return new Property("pattern[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11315        case -791090288: /*pattern*/  return new Property("pattern[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11316        case 2127857120: /*patternBase64Binary*/  return new Property("pattern[x]", "base64Binary", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11317        case -1776945544: /*patternBoolean*/  return new Property("pattern[x]", "boolean", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11318        case 522246980: /*patternCanonical*/  return new Property("pattern[x]", "canonical", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11319        case -1669806691: /*patternCode*/  return new Property("pattern[x]", "code", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11320        case -1669789858: /*patternDate*/  return new Property("pattern[x]", "date", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11321        case 535949131: /*patternDateTime*/  return new Property("pattern[x]", "dateTime", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11322        case -299393631: /*patternDecimal*/  return new Property("pattern[x]", "decimal", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11323        case -28553013: /*patternId*/  return new Property("pattern[x]", "id", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11324        case 115912753: /*patternInstant*/  return new Property("pattern[x]", "instant", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11325        case 116394894: /*patternInteger*/  return new Property("pattern[x]", "integer", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11326        case 186345164: /*patternInteger64*/  return new Property("pattern[x]", "integer64", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11327        case -1009861473: /*patternMarkdown*/  return new Property("pattern[x]", "markdown", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11328        case -885137382: /*patternOid*/  return new Property("pattern[x]", "oid", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11329        case 2054814086: /*patternPositiveInt*/  return new Property("pattern[x]", "positiveInt", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11330        case 2096647105: /*patternString*/  return new Property("pattern[x]", "string", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11331        case -1669305731: /*patternTime*/  return new Property("pattern[x]", "time", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11332        case -963691766: /*patternUnsignedInt*/  return new Property("pattern[x]", "unsignedInt", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11333        case -885131332: /*patternUri*/  return new Property("pattern[x]", "uri", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11334        case -885131329: /*patternUrl*/  return new Property("pattern[x]", "url", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11335        case -1669264533: /*patternUuid*/  return new Property("pattern[x]", "uuid", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11336        case 1305617988: /*patternAddress*/  return new Property("pattern[x]", "Address", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11337        case -885150897: /*patternAge*/  return new Property("pattern[x]", "Age", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11338        case 1840611039: /*patternAnnotation*/  return new Property("pattern[x]", "Annotation", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11339        case 1432153299: /*patternAttachment*/  return new Property("pattern[x]", "Attachment", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11340        case -400610831: /*patternCodeableConcept*/  return new Property("pattern[x]", "CodeableConcept", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11341        case 1528639636: /*patternCodeableReference*/  return new Property("pattern[x]", "CodeableReference", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11342        case 1633546010: /*patternCoding*/  return new Property("pattern[x]", "Coding", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11343        case 312818944: /*patternContactPoint*/  return new Property("pattern[x]", "ContactPoint", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11344        case -224383137: /*patternCount*/  return new Property("pattern[x]", "Count", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11345        case -968340571: /*patternDistance*/  return new Property("pattern[x]", "Distance", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11346        case 1046154564: /*patternDuration*/  return new Property("pattern[x]", "Duration", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11347        case -717740120: /*patternHumanName*/  return new Property("pattern[x]", "HumanName", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11348        case 1777221721: /*patternIdentifier*/  return new Property("pattern[x]", "Identifier", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11349        case -215154928: /*patternMoney*/  return new Property("pattern[x]", "Money", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11350        case 1996906865: /*patternPeriod*/  return new Property("pattern[x]", "Period", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11351        case 1753162811: /*patternQuantity*/  return new Property("pattern[x]", "Quantity", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11352        case -210954355: /*patternRange*/  return new Property("pattern[x]", "Range", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11353        case -210948517: /*patternRatio*/  return new Property("pattern[x]", "Ratio", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11354        case 1201265570: /*patternRatioRange*/  return new Property("pattern[x]", "RatioRange", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11355        case -1231260261: /*patternReference*/  return new Property("pattern[x]", "Reference", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11356        case -1952450284: /*patternSampledData*/  return new Property("pattern[x]", "SampledData", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11357        case 767479560: /*patternSignature*/  return new Property("pattern[x]", "Signature", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11358        case 2114968570: /*patternTiming*/  return new Property("pattern[x]", "Timing", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11359        case 754982625: /*patternContactDetail*/  return new Property("pattern[x]", "ContactDetail", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11360        case 385040521: /*patternDataRequirement*/  return new Property("pattern[x]", "DataRequirement", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11361        case 1600202312: /*patternExpression*/  return new Property("pattern[x]", "Expression", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11362        case 318609452: /*patternParameterDefinition*/  return new Property("pattern[x]", "ParameterDefinition", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11363        case 422700397: /*patternRelatedArtifact*/  return new Property("pattern[x]", "RelatedArtifact", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11364        case -1531541637: /*patternTriggerDefinition*/  return new Property("pattern[x]", "TriggerDefinition", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11365        case -44085122: /*patternUsageContext*/  return new Property("pattern[x]", "UsageContext", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11366        case 1046445323: /*patternAvailability*/  return new Property("pattern[x]", "Availability", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11367        case 2042074664: /*patternExtendedContactDetail*/  return new Property("pattern[x]", "ExtendedContactDetail", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11368        case 1662614119: /*patternDosage*/  return new Property("pattern[x]", "Dosage", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11369        case -1669517899: /*patternMeta*/  return new Property("pattern[x]", "Meta", "Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.", 0, 1, pattern);
11370        case -1322970774: /*example*/  return new Property("example", "", "A sample value for this element demonstrating the type of information that would typically be found in the element.", 0, java.lang.Integer.MAX_VALUE, example);
11371        case -55301663: /*minValue[x]*/  return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|integer64|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11372        case -1376969153: /*minValue*/  return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|integer64|positiveInt|unsignedInt|Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11373        case -1715058035: /*minValueDate*/  return new Property("minValue[x]", "date", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11374        case 1635517178: /*minValueDateTime*/  return new Property("minValue[x]", "dateTime", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11375        case 151382690: /*minValueInstant*/  return new Property("minValue[x]", "instant", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11376        case -1714573908: /*minValueTime*/  return new Property("minValue[x]", "time", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11377        case -263923694: /*minValueDecimal*/  return new Property("minValue[x]", "decimal", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11378        case 151864831: /*minValueInteger*/  return new Property("minValue[x]", "integer", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11379        case -86783747: /*minValueInteger64*/  return new Property("minValue[x]", "integer64", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11380        case 1570935671: /*minValuePositiveInt*/  return new Property("minValue[x]", "positiveInt", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11381        case -1447570181: /*minValueUnsignedInt*/  return new Property("minValue[x]", "unsignedInt", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11382        case -1442236438: /*minValueQuantity*/  return new Property("minValue[x]", "Quantity", "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, minValue);
11383        case 622130931: /*maxValue[x]*/  return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|integer64|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11384        case 399227501: /*maxValue*/  return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|integer64|positiveInt|unsignedInt|Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11385        case 2105483195: /*maxValueDate*/  return new Property("maxValue[x]", "date", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11386        case 1699385640: /*maxValueDateTime*/  return new Property("maxValue[x]", "dateTime", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11387        case 1261821620: /*maxValueInstant*/  return new Property("maxValue[x]", "instant", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11388        case 2105967322: /*maxValueTime*/  return new Property("maxValue[x]", "time", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11389        case 846515236: /*maxValueDecimal*/  return new Property("maxValue[x]", "decimal", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11390        case 1262303761: /*maxValueInteger*/  return new Property("maxValue[x]", "integer", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11391        case 1893138575: /*maxValueInteger64*/  return new Property("maxValue[x]", "integer64", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11392        case 1605774985: /*maxValuePositiveInt*/  return new Property("maxValue[x]", "positiveInt", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11393        case -1412730867: /*maxValueUnsignedInt*/  return new Property("maxValue[x]", "unsignedInt", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11394        case -1378367976: /*maxValueQuantity*/  return new Property("maxValue[x]", "Quantity", "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.", 0, 1, maxValue);
11395        case -791400086: /*maxLength*/  return new Property("maxLength", "integer", "Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. ```maxLength``` SHOULD only be used on primitive data types that have a string representation (see [http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-structuredefinition-type-characteristics.html)).", 0, 1, maxLength);
11396        case -861311717: /*condition*/  return new Property("condition", "id", "A reference to an invariant that may make additional statements about the cardinality or value in the instance.", 0, java.lang.Integer.MAX_VALUE, condition);
11397        case -190376483: /*constraint*/  return new Property("constraint", "", "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.", 0, java.lang.Integer.MAX_VALUE, constraint);
11398        case -923694880: /*mustHaveValue*/  return new Property("mustHaveValue", "boolean", "Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.", 0, 1, mustHaveValue);
11399        case -2124672393: /*valueAlternatives*/  return new Property("valueAlternatives", "canonical(StructureDefinition)", "Specifies a list of extensions that can appear in place of a primitive value.", 0, java.lang.Integer.MAX_VALUE, valueAlternatives);
11400        case -1402857082: /*mustSupport*/  return new Property("mustSupport", "boolean", "If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.", 0, 1, mustSupport);
11401        case -1408783839: /*isModifier*/  return new Property("isModifier", "boolean", "If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.", 0, 1, isModifier);
11402        case -1854387259: /*isModifierReason*/  return new Property("isModifierReason", "string", "Explains how that element affects the interpretation of the resource or element that contains it.", 0, 1, isModifierReason);
11403        case 1857548060: /*isSummary*/  return new Property("isSummary", "boolean", "Whether the element should be included if a client requests a search with the parameter _summary=true.", 0, 1, isSummary);
11404        case -108220795: /*binding*/  return new Property("binding", "", "Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).", 0, 1, binding);
11405        case 837556430: /*mapping*/  return new Property("mapping", "", "Identifies a concept from an external specification that roughly corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, mapping);
11406        default: return super.getNamedProperty(_hash, _name, _checkValid);
11407        }
11408
11409      }
11410
11411      @Override
11412      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
11413        switch (hash) {
11414        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
11415        case -671065907: /*representation*/ return this.representation == null ? new Base[0] : this.representation.toArray(new Base[this.representation.size()]); // Enumeration<PropertyRepresentation>
11416        case -825289923: /*sliceName*/ return this.sliceName == null ? new Base[0] : new Base[] {this.sliceName}; // StringType
11417        case 333040519: /*sliceIsConstraining*/ return this.sliceIsConstraining == null ? new Base[0] : new Base[] {this.sliceIsConstraining}; // BooleanType
11418        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
11419        case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // Coding
11420        case -2119287345: /*slicing*/ return this.slicing == null ? new Base[0] : new Base[] {this.slicing}; // ElementDefinitionSlicingComponent
11421        case 109413500: /*short*/ return this.short_ == null ? new Base[0] : new Base[] {this.short_}; // StringType
11422        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // MarkdownType
11423        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // MarkdownType
11424        case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // MarkdownType
11425        case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType
11426        case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // UnsignedIntType
11427        case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
11428        case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // ElementDefinitionBaseComponent
11429        case 1193747154: /*contentReference*/ return this.contentReference == null ? new Base[0] : new Base[] {this.contentReference}; // UriType
11430        case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // TypeRefComponent
11431        case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // DataType
11432        case 1857257103: /*meaningWhenMissing*/ return this.meaningWhenMissing == null ? new Base[0] : new Base[] {this.meaningWhenMissing}; // MarkdownType
11433        case 1828196047: /*orderMeaning*/ return this.orderMeaning == null ? new Base[0] : new Base[] {this.orderMeaning}; // StringType
11434        case 97445748: /*fixed*/ return this.fixed == null ? new Base[0] : new Base[] {this.fixed}; // DataType
11435        case -791090288: /*pattern*/ return this.pattern == null ? new Base[0] : new Base[] {this.pattern}; // DataType
11436        case -1322970774: /*example*/ return this.example == null ? new Base[0] : this.example.toArray(new Base[this.example.size()]); // ElementDefinitionExampleComponent
11437        case -1376969153: /*minValue*/ return this.minValue == null ? new Base[0] : new Base[] {this.minValue}; // DataType
11438        case 399227501: /*maxValue*/ return this.maxValue == null ? new Base[0] : new Base[] {this.maxValue}; // DataType
11439        case -791400086: /*maxLength*/ return this.maxLength == null ? new Base[0] : new Base[] {this.maxLength}; // IntegerType
11440        case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // IdType
11441        case -190376483: /*constraint*/ return this.constraint == null ? new Base[0] : this.constraint.toArray(new Base[this.constraint.size()]); // ElementDefinitionConstraintComponent
11442        case -923694880: /*mustHaveValue*/ return this.mustHaveValue == null ? new Base[0] : new Base[] {this.mustHaveValue}; // BooleanType
11443        case -2124672393: /*valueAlternatives*/ return this.valueAlternatives == null ? new Base[0] : this.valueAlternatives.toArray(new Base[this.valueAlternatives.size()]); // CanonicalType
11444        case -1402857082: /*mustSupport*/ return this.mustSupport == null ? new Base[0] : new Base[] {this.mustSupport}; // BooleanType
11445        case -1408783839: /*isModifier*/ return this.isModifier == null ? new Base[0] : new Base[] {this.isModifier}; // BooleanType
11446        case -1854387259: /*isModifierReason*/ return this.isModifierReason == null ? new Base[0] : new Base[] {this.isModifierReason}; // StringType
11447        case 1857548060: /*isSummary*/ return this.isSummary == null ? new Base[0] : new Base[] {this.isSummary}; // BooleanType
11448        case -108220795: /*binding*/ return this.binding == null ? new Base[0] : new Base[] {this.binding}; // ElementDefinitionBindingComponent
11449        case 837556430: /*mapping*/ return this.mapping == null ? new Base[0] : this.mapping.toArray(new Base[this.mapping.size()]); // ElementDefinitionMappingComponent
11450        default: return super.getProperty(hash, name, checkValid);
11451        }
11452
11453      }
11454
11455      @Override
11456      public Base setProperty(int hash, String name, Base value) throws FHIRException {
11457        switch (hash) {
11458        case 3433509: // path
11459          this.path = TypeConvertor.castToString(value); // StringType
11460          return value;
11461        case -671065907: // representation
11462          value = new PropertyRepresentationEnumFactory().fromType(TypeConvertor.castToCode(value));
11463          this.getRepresentation().add((Enumeration) value); // Enumeration<PropertyRepresentation>
11464          return value;
11465        case -825289923: // sliceName
11466          this.sliceName = TypeConvertor.castToString(value); // StringType
11467          return value;
11468        case 333040519: // sliceIsConstraining
11469          this.sliceIsConstraining = TypeConvertor.castToBoolean(value); // BooleanType
11470          return value;
11471        case 102727412: // label
11472          this.label = TypeConvertor.castToString(value); // StringType
11473          return value;
11474        case 3059181: // code
11475          this.getCode().add(TypeConvertor.castToCoding(value)); // Coding
11476          return value;
11477        case -2119287345: // slicing
11478          this.slicing = (ElementDefinitionSlicingComponent) value; // ElementDefinitionSlicingComponent
11479          return value;
11480        case 109413500: // short
11481          this.short_ = TypeConvertor.castToString(value); // StringType
11482          return value;
11483        case -1014418093: // definition
11484          this.definition = TypeConvertor.castToMarkdown(value); // MarkdownType
11485          return value;
11486        case 950398559: // comment
11487          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
11488          return value;
11489        case -1619874672: // requirements
11490          this.requirements = TypeConvertor.castToMarkdown(value); // MarkdownType
11491          return value;
11492        case 92902992: // alias
11493          this.getAlias().add(TypeConvertor.castToString(value)); // StringType
11494          return value;
11495        case 108114: // min
11496          this.min = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
11497          return value;
11498        case 107876: // max
11499          this.max = TypeConvertor.castToString(value); // StringType
11500          return value;
11501        case 3016401: // base
11502          this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent
11503          return value;
11504        case 1193747154: // contentReference
11505          this.contentReference = TypeConvertor.castToUri(value); // UriType
11506          return value;
11507        case 3575610: // type
11508          this.getType().add((TypeRefComponent) value); // TypeRefComponent
11509          return value;
11510        case -659125328: // defaultValue
11511          this.defaultValue = TypeConvertor.castToType(value); // DataType
11512          return value;
11513        case 1857257103: // meaningWhenMissing
11514          this.meaningWhenMissing = TypeConvertor.castToMarkdown(value); // MarkdownType
11515          return value;
11516        case 1828196047: // orderMeaning
11517          this.orderMeaning = TypeConvertor.castToString(value); // StringType
11518          return value;
11519        case 97445748: // fixed
11520          this.fixed = TypeConvertor.castToType(value); // DataType
11521          return value;
11522        case -791090288: // pattern
11523          this.pattern = TypeConvertor.castToType(value); // DataType
11524          return value;
11525        case -1322970774: // example
11526          this.getExample().add((ElementDefinitionExampleComponent) value); // ElementDefinitionExampleComponent
11527          return value;
11528        case -1376969153: // minValue
11529          this.minValue = TypeConvertor.castToType(value); // DataType
11530          return value;
11531        case 399227501: // maxValue
11532          this.maxValue = TypeConvertor.castToType(value); // DataType
11533          return value;
11534        case -791400086: // maxLength
11535          this.maxLength = TypeConvertor.castToInteger(value); // IntegerType
11536          return value;
11537        case -861311717: // condition
11538          this.getCondition().add(TypeConvertor.castToId(value)); // IdType
11539          return value;
11540        case -190376483: // constraint
11541          this.getConstraint().add((ElementDefinitionConstraintComponent) value); // ElementDefinitionConstraintComponent
11542          return value;
11543        case -923694880: // mustHaveValue
11544          this.mustHaveValue = TypeConvertor.castToBoolean(value); // BooleanType
11545          return value;
11546        case -2124672393: // valueAlternatives
11547          this.getValueAlternatives().add(TypeConvertor.castToCanonical(value)); // CanonicalType
11548          return value;
11549        case -1402857082: // mustSupport
11550          this.mustSupport = TypeConvertor.castToBoolean(value); // BooleanType
11551          return value;
11552        case -1408783839: // isModifier
11553          this.isModifier = TypeConvertor.castToBoolean(value); // BooleanType
11554          return value;
11555        case -1854387259: // isModifierReason
11556          this.isModifierReason = TypeConvertor.castToString(value); // StringType
11557          return value;
11558        case 1857548060: // isSummary
11559          this.isSummary = TypeConvertor.castToBoolean(value); // BooleanType
11560          return value;
11561        case -108220795: // binding
11562          this.binding = (ElementDefinitionBindingComponent) value; // ElementDefinitionBindingComponent
11563          return value;
11564        case 837556430: // mapping
11565          this.getMapping().add((ElementDefinitionMappingComponent) value); // ElementDefinitionMappingComponent
11566          return value;
11567        default: return super.setProperty(hash, name, value);
11568        }
11569
11570      }
11571
11572      @Override
11573      public Base setProperty(String name, Base value) throws FHIRException {
11574        if (name.equals("path")) {
11575          this.path = TypeConvertor.castToString(value); // StringType
11576        } else if (name.equals("representation")) {
11577          value = new PropertyRepresentationEnumFactory().fromType(TypeConvertor.castToCode(value));
11578          this.getRepresentation().add((Enumeration) value);
11579        } else if (name.equals("sliceName")) {
11580          this.sliceName = TypeConvertor.castToString(value); // StringType
11581        } else if (name.equals("sliceIsConstraining")) {
11582          this.sliceIsConstraining = TypeConvertor.castToBoolean(value); // BooleanType
11583        } else if (name.equals("label")) {
11584          this.label = TypeConvertor.castToString(value); // StringType
11585        } else if (name.equals("code")) {
11586          this.getCode().add(TypeConvertor.castToCoding(value));
11587        } else if (name.equals("slicing")) {
11588          this.slicing = (ElementDefinitionSlicingComponent) value; // ElementDefinitionSlicingComponent
11589        } else if (name.equals("short")) {
11590          this.short_ = TypeConvertor.castToString(value); // StringType
11591        } else if (name.equals("definition")) {
11592          this.definition = TypeConvertor.castToMarkdown(value); // MarkdownType
11593        } else if (name.equals("comment")) {
11594          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
11595        } else if (name.equals("requirements")) {
11596          this.requirements = TypeConvertor.castToMarkdown(value); // MarkdownType
11597        } else if (name.equals("alias")) {
11598          this.getAlias().add(TypeConvertor.castToString(value));
11599        } else if (name.equals("min")) {
11600          this.min = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
11601        } else if (name.equals("max")) {
11602          this.max = TypeConvertor.castToString(value); // StringType
11603        } else if (name.equals("base")) {
11604          this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent
11605        } else if (name.equals("contentReference")) {
11606          this.contentReference = TypeConvertor.castToUri(value); // UriType
11607        } else if (name.equals("type")) {
11608          this.getType().add((TypeRefComponent) value);
11609        } else if (name.equals("defaultValue[x]")) {
11610          this.defaultValue = TypeConvertor.castToType(value); // DataType
11611        } else if (name.equals("meaningWhenMissing")) {
11612          this.meaningWhenMissing = TypeConvertor.castToMarkdown(value); // MarkdownType
11613        } else if (name.equals("orderMeaning")) {
11614          this.orderMeaning = TypeConvertor.castToString(value); // StringType
11615        } else if (name.equals("fixed[x]")) {
11616          this.fixed = TypeConvertor.castToType(value); // DataType
11617        } else if (name.equals("pattern[x]")) {
11618          this.pattern = TypeConvertor.castToType(value); // DataType
11619        } else if (name.equals("example")) {
11620          this.getExample().add((ElementDefinitionExampleComponent) value);
11621        } else if (name.equals("minValue[x]")) {
11622          this.minValue = TypeConvertor.castToType(value); // DataType
11623        } else if (name.equals("maxValue[x]")) {
11624          this.maxValue = TypeConvertor.castToType(value); // DataType
11625        } else if (name.equals("maxLength")) {
11626          this.maxLength = TypeConvertor.castToInteger(value); // IntegerType
11627        } else if (name.equals("condition")) {
11628          this.getCondition().add(TypeConvertor.castToId(value));
11629        } else if (name.equals("constraint")) {
11630          this.getConstraint().add((ElementDefinitionConstraintComponent) value);
11631        } else if (name.equals("mustHaveValue")) {
11632          this.mustHaveValue = TypeConvertor.castToBoolean(value); // BooleanType
11633        } else if (name.equals("valueAlternatives")) {
11634          this.getValueAlternatives().add(TypeConvertor.castToCanonical(value));
11635        } else if (name.equals("mustSupport")) {
11636          this.mustSupport = TypeConvertor.castToBoolean(value); // BooleanType
11637        } else if (name.equals("isModifier")) {
11638          this.isModifier = TypeConvertor.castToBoolean(value); // BooleanType
11639        } else if (name.equals("isModifierReason")) {
11640          this.isModifierReason = TypeConvertor.castToString(value); // StringType
11641        } else if (name.equals("isSummary")) {
11642          this.isSummary = TypeConvertor.castToBoolean(value); // BooleanType
11643        } else if (name.equals("binding")) {
11644          this.binding = (ElementDefinitionBindingComponent) value; // ElementDefinitionBindingComponent
11645        } else if (name.equals("mapping")) {
11646          this.getMapping().add((ElementDefinitionMappingComponent) value);
11647        } else
11648          return super.setProperty(name, value);
11649        return value;
11650      }
11651
11652      @Override
11653      public Base makeProperty(int hash, String name) throws FHIRException {
11654        switch (hash) {
11655        case 3433509:  return getPathElement();
11656        case -671065907:  return addRepresentationElement();
11657        case -825289923:  return getSliceNameElement();
11658        case 333040519:  return getSliceIsConstrainingElement();
11659        case 102727412:  return getLabelElement();
11660        case 3059181:  return addCode(); 
11661        case -2119287345:  return getSlicing();
11662        case 109413500:  return getShortElement();
11663        case -1014418093:  return getDefinitionElement();
11664        case 950398559:  return getCommentElement();
11665        case -1619874672:  return getRequirementsElement();
11666        case 92902992:  return addAliasElement();
11667        case 108114:  return getMinElement();
11668        case 107876:  return getMaxElement();
11669        case 3016401:  return getBase();
11670        case 1193747154:  return getContentReferenceElement();
11671        case 3575610:  return addType(); 
11672        case 587922128:  return getDefaultValue();
11673        case -659125328:  return getDefaultValue();
11674        case 1857257103:  return getMeaningWhenMissingElement();
11675        case 1828196047:  return getOrderMeaningElement();
11676        case -391522164:  return getFixed();
11677        case 97445748:  return getFixed();
11678        case -885125392:  return getPattern();
11679        case -791090288:  return getPattern();
11680        case -1322970774:  return addExample(); 
11681        case -55301663:  return getMinValue();
11682        case -1376969153:  return getMinValue();
11683        case 622130931:  return getMaxValue();
11684        case 399227501:  return getMaxValue();
11685        case -791400086:  return getMaxLengthElement();
11686        case -861311717:  return addConditionElement();
11687        case -190376483:  return addConstraint(); 
11688        case -923694880:  return getMustHaveValueElement();
11689        case -2124672393:  return addValueAlternativesElement();
11690        case -1402857082:  return getMustSupportElement();
11691        case -1408783839:  return getIsModifierElement();
11692        case -1854387259:  return getIsModifierReasonElement();
11693        case 1857548060:  return getIsSummaryElement();
11694        case -108220795:  return getBinding();
11695        case 837556430:  return addMapping(); 
11696        default: return super.makeProperty(hash, name);
11697        }
11698
11699      }
11700
11701      @Override
11702      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
11703        switch (hash) {
11704        case 3433509: /*path*/ return new String[] {"string"};
11705        case -671065907: /*representation*/ return new String[] {"code"};
11706        case -825289923: /*sliceName*/ return new String[] {"string"};
11707        case 333040519: /*sliceIsConstraining*/ return new String[] {"boolean"};
11708        case 102727412: /*label*/ return new String[] {"string"};
11709        case 3059181: /*code*/ return new String[] {"Coding"};
11710        case -2119287345: /*slicing*/ return new String[] {};
11711        case 109413500: /*short*/ return new String[] {"string"};
11712        case -1014418093: /*definition*/ return new String[] {"markdown"};
11713        case 950398559: /*comment*/ return new String[] {"markdown"};
11714        case -1619874672: /*requirements*/ return new String[] {"markdown"};
11715        case 92902992: /*alias*/ return new String[] {"string"};
11716        case 108114: /*min*/ return new String[] {"unsignedInt"};
11717        case 107876: /*max*/ return new String[] {"string"};
11718        case 3016401: /*base*/ return new String[] {};
11719        case 1193747154: /*contentReference*/ return new String[] {"uri"};
11720        case 3575610: /*type*/ return new String[] {};
11721        case -659125328: /*defaultValue*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "CodeableReference", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "RatioRange", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Availability", "ExtendedContactDetail", "Dosage", "Meta"};
11722        case 1857257103: /*meaningWhenMissing*/ return new String[] {"markdown"};
11723        case 1828196047: /*orderMeaning*/ return new String[] {"string"};
11724        case 97445748: /*fixed*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "CodeableReference", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "RatioRange", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Availability", "ExtendedContactDetail", "Dosage", "Meta"};
11725        case -791090288: /*pattern*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "CodeableReference", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "RatioRange", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Availability", "ExtendedContactDetail", "Dosage", "Meta"};
11726        case -1322970774: /*example*/ return new String[] {};
11727        case -1376969153: /*minValue*/ return new String[] {"date", "dateTime", "instant", "time", "decimal", "integer", "integer64", "positiveInt", "unsignedInt", "Quantity"};
11728        case 399227501: /*maxValue*/ return new String[] {"date", "dateTime", "instant", "time", "decimal", "integer", "integer64", "positiveInt", "unsignedInt", "Quantity"};
11729        case -791400086: /*maxLength*/ return new String[] {"integer"};
11730        case -861311717: /*condition*/ return new String[] {"id"};
11731        case -190376483: /*constraint*/ return new String[] {};
11732        case -923694880: /*mustHaveValue*/ return new String[] {"boolean"};
11733        case -2124672393: /*valueAlternatives*/ return new String[] {"canonical"};
11734        case -1402857082: /*mustSupport*/ return new String[] {"boolean"};
11735        case -1408783839: /*isModifier*/ return new String[] {"boolean"};
11736        case -1854387259: /*isModifierReason*/ return new String[] {"string"};
11737        case 1857548060: /*isSummary*/ return new String[] {"boolean"};
11738        case -108220795: /*binding*/ return new String[] {};
11739        case 837556430: /*mapping*/ return new String[] {};
11740        default: return super.getTypesForProperty(hash, name);
11741        }
11742
11743      }
11744
11745      @Override
11746      public Base addChild(String name) throws FHIRException {
11747        if (name.equals("path")) {
11748          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.path");
11749        }
11750        else if (name.equals("representation")) {
11751          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.representation");
11752        }
11753        else if (name.equals("sliceName")) {
11754          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.sliceName");
11755        }
11756        else if (name.equals("sliceIsConstraining")) {
11757          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.sliceIsConstraining");
11758        }
11759        else if (name.equals("label")) {
11760          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.label");
11761        }
11762        else if (name.equals("code")) {
11763          return addCode();
11764        }
11765        else if (name.equals("slicing")) {
11766          this.slicing = new ElementDefinitionSlicingComponent();
11767          return this.slicing;
11768        }
11769        else if (name.equals("short")) {
11770          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.short");
11771        }
11772        else if (name.equals("definition")) {
11773          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.definition");
11774        }
11775        else if (name.equals("comment")) {
11776          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.comment");
11777        }
11778        else if (name.equals("requirements")) {
11779          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.requirements");
11780        }
11781        else if (name.equals("alias")) {
11782          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.alias");
11783        }
11784        else if (name.equals("min")) {
11785          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.min");
11786        }
11787        else if (name.equals("max")) {
11788          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.max");
11789        }
11790        else if (name.equals("base")) {
11791          this.base = new ElementDefinitionBaseComponent();
11792          return this.base;
11793        }
11794        else if (name.equals("contentReference")) {
11795          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.contentReference");
11796        }
11797        else if (name.equals("type")) {
11798          return addType();
11799        }
11800        else if (name.equals("defaultValueBase64Binary")) {
11801          this.defaultValue = new Base64BinaryType();
11802          return this.defaultValue;
11803        }
11804        else if (name.equals("defaultValueBoolean")) {
11805          this.defaultValue = new BooleanType();
11806          return this.defaultValue;
11807        }
11808        else if (name.equals("defaultValueCanonical")) {
11809          this.defaultValue = new CanonicalType();
11810          return this.defaultValue;
11811        }
11812        else if (name.equals("defaultValueCode")) {
11813          this.defaultValue = new CodeType();
11814          return this.defaultValue;
11815        }
11816        else if (name.equals("defaultValueDate")) {
11817          this.defaultValue = new DateType();
11818          return this.defaultValue;
11819        }
11820        else if (name.equals("defaultValueDateTime")) {
11821          this.defaultValue = new DateTimeType();
11822          return this.defaultValue;
11823        }
11824        else if (name.equals("defaultValueDecimal")) {
11825          this.defaultValue = new DecimalType();
11826          return this.defaultValue;
11827        }
11828        else if (name.equals("defaultValueId")) {
11829          this.defaultValue = new IdType();
11830          return this.defaultValue;
11831        }
11832        else if (name.equals("defaultValueInstant")) {
11833          this.defaultValue = new InstantType();
11834          return this.defaultValue;
11835        }
11836        else if (name.equals("defaultValueInteger")) {
11837          this.defaultValue = new IntegerType();
11838          return this.defaultValue;
11839        }
11840        else if (name.equals("defaultValueInteger64")) {
11841          this.defaultValue = new Integer64Type();
11842          return this.defaultValue;
11843        }
11844        else if (name.equals("defaultValueMarkdown")) {
11845          this.defaultValue = new MarkdownType();
11846          return this.defaultValue;
11847        }
11848        else if (name.equals("defaultValueOid")) {
11849          this.defaultValue = new OidType();
11850          return this.defaultValue;
11851        }
11852        else if (name.equals("defaultValuePositiveInt")) {
11853          this.defaultValue = new PositiveIntType();
11854          return this.defaultValue;
11855        }
11856        else if (name.equals("defaultValueString")) {
11857          this.defaultValue = new StringType();
11858          return this.defaultValue;
11859        }
11860        else if (name.equals("defaultValueTime")) {
11861          this.defaultValue = new TimeType();
11862          return this.defaultValue;
11863        }
11864        else if (name.equals("defaultValueUnsignedInt")) {
11865          this.defaultValue = new UnsignedIntType();
11866          return this.defaultValue;
11867        }
11868        else if (name.equals("defaultValueUri")) {
11869          this.defaultValue = new UriType();
11870          return this.defaultValue;
11871        }
11872        else if (name.equals("defaultValueUrl")) {
11873          this.defaultValue = new UrlType();
11874          return this.defaultValue;
11875        }
11876        else if (name.equals("defaultValueUuid")) {
11877          this.defaultValue = new UuidType();
11878          return this.defaultValue;
11879        }
11880        else if (name.equals("defaultValueAddress")) {
11881          this.defaultValue = new Address();
11882          return this.defaultValue;
11883        }
11884        else if (name.equals("defaultValueAge")) {
11885          this.defaultValue = new Age();
11886          return this.defaultValue;
11887        }
11888        else if (name.equals("defaultValueAnnotation")) {
11889          this.defaultValue = new Annotation();
11890          return this.defaultValue;
11891        }
11892        else if (name.equals("defaultValueAttachment")) {
11893          this.defaultValue = new Attachment();
11894          return this.defaultValue;
11895        }
11896        else if (name.equals("defaultValueCodeableConcept")) {
11897          this.defaultValue = new CodeableConcept();
11898          return this.defaultValue;
11899        }
11900        else if (name.equals("defaultValueCodeableReference")) {
11901          this.defaultValue = new CodeableReference();
11902          return this.defaultValue;
11903        }
11904        else if (name.equals("defaultValueCoding")) {
11905          this.defaultValue = new Coding();
11906          return this.defaultValue;
11907        }
11908        else if (name.equals("defaultValueContactPoint")) {
11909          this.defaultValue = new ContactPoint();
11910          return this.defaultValue;
11911        }
11912        else if (name.equals("defaultValueCount")) {
11913          this.defaultValue = new Count();
11914          return this.defaultValue;
11915        }
11916        else if (name.equals("defaultValueDistance")) {
11917          this.defaultValue = new Distance();
11918          return this.defaultValue;
11919        }
11920        else if (name.equals("defaultValueDuration")) {
11921          this.defaultValue = new Duration();
11922          return this.defaultValue;
11923        }
11924        else if (name.equals("defaultValueHumanName")) {
11925          this.defaultValue = new HumanName();
11926          return this.defaultValue;
11927        }
11928        else if (name.equals("defaultValueIdentifier")) {
11929          this.defaultValue = new Identifier();
11930          return this.defaultValue;
11931        }
11932        else if (name.equals("defaultValueMoney")) {
11933          this.defaultValue = new Money();
11934          return this.defaultValue;
11935        }
11936        else if (name.equals("defaultValuePeriod")) {
11937          this.defaultValue = new Period();
11938          return this.defaultValue;
11939        }
11940        else if (name.equals("defaultValueQuantity")) {
11941          this.defaultValue = new Quantity();
11942          return this.defaultValue;
11943        }
11944        else if (name.equals("defaultValueRange")) {
11945          this.defaultValue = new Range();
11946          return this.defaultValue;
11947        }
11948        else if (name.equals("defaultValueRatio")) {
11949          this.defaultValue = new Ratio();
11950          return this.defaultValue;
11951        }
11952        else if (name.equals("defaultValueRatioRange")) {
11953          this.defaultValue = new RatioRange();
11954          return this.defaultValue;
11955        }
11956        else if (name.equals("defaultValueReference")) {
11957          this.defaultValue = new Reference();
11958          return this.defaultValue;
11959        }
11960        else if (name.equals("defaultValueSampledData")) {
11961          this.defaultValue = new SampledData();
11962          return this.defaultValue;
11963        }
11964        else if (name.equals("defaultValueSignature")) {
11965          this.defaultValue = new Signature();
11966          return this.defaultValue;
11967        }
11968        else if (name.equals("defaultValueTiming")) {
11969          this.defaultValue = new Timing();
11970          return this.defaultValue;
11971        }
11972        else if (name.equals("defaultValueContactDetail")) {
11973          this.defaultValue = new ContactDetail();
11974          return this.defaultValue;
11975        }
11976        else if (name.equals("defaultValueDataRequirement")) {
11977          this.defaultValue = new DataRequirement();
11978          return this.defaultValue;
11979        }
11980        else if (name.equals("defaultValueExpression")) {
11981          this.defaultValue = new Expression();
11982          return this.defaultValue;
11983        }
11984        else if (name.equals("defaultValueParameterDefinition")) {
11985          this.defaultValue = new ParameterDefinition();
11986          return this.defaultValue;
11987        }
11988        else if (name.equals("defaultValueRelatedArtifact")) {
11989          this.defaultValue = new RelatedArtifact();
11990          return this.defaultValue;
11991        }
11992        else if (name.equals("defaultValueTriggerDefinition")) {
11993          this.defaultValue = new TriggerDefinition();
11994          return this.defaultValue;
11995        }
11996        else if (name.equals("defaultValueUsageContext")) {
11997          this.defaultValue = new UsageContext();
11998          return this.defaultValue;
11999        }
12000        else if (name.equals("defaultValueAvailability")) {
12001          this.defaultValue = new Availability();
12002          return this.defaultValue;
12003        }
12004        else if (name.equals("defaultValueExtendedContactDetail")) {
12005          this.defaultValue = new ExtendedContactDetail();
12006          return this.defaultValue;
12007        }
12008        else if (name.equals("defaultValueDosage")) {
12009          this.defaultValue = new Dosage();
12010          return this.defaultValue;
12011        }
12012        else if (name.equals("defaultValueMeta")) {
12013          this.defaultValue = new Meta();
12014          return this.defaultValue;
12015        }
12016        else if (name.equals("meaningWhenMissing")) {
12017          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.meaningWhenMissing");
12018        }
12019        else if (name.equals("orderMeaning")) {
12020          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.orderMeaning");
12021        }
12022        else if (name.equals("fixedBase64Binary")) {
12023          this.fixed = new Base64BinaryType();
12024          return this.fixed;
12025        }
12026        else if (name.equals("fixedBoolean")) {
12027          this.fixed = new BooleanType();
12028          return this.fixed;
12029        }
12030        else if (name.equals("fixedCanonical")) {
12031          this.fixed = new CanonicalType();
12032          return this.fixed;
12033        }
12034        else if (name.equals("fixedCode")) {
12035          this.fixed = new CodeType();
12036          return this.fixed;
12037        }
12038        else if (name.equals("fixedDate")) {
12039          this.fixed = new DateType();
12040          return this.fixed;
12041        }
12042        else if (name.equals("fixedDateTime")) {
12043          this.fixed = new DateTimeType();
12044          return this.fixed;
12045        }
12046        else if (name.equals("fixedDecimal")) {
12047          this.fixed = new DecimalType();
12048          return this.fixed;
12049        }
12050        else if (name.equals("fixedId")) {
12051          this.fixed = new IdType();
12052          return this.fixed;
12053        }
12054        else if (name.equals("fixedInstant")) {
12055          this.fixed = new InstantType();
12056          return this.fixed;
12057        }
12058        else if (name.equals("fixedInteger")) {
12059          this.fixed = new IntegerType();
12060          return this.fixed;
12061        }
12062        else if (name.equals("fixedInteger64")) {
12063          this.fixed = new Integer64Type();
12064          return this.fixed;
12065        }
12066        else if (name.equals("fixedMarkdown")) {
12067          this.fixed = new MarkdownType();
12068          return this.fixed;
12069        }
12070        else if (name.equals("fixedOid")) {
12071          this.fixed = new OidType();
12072          return this.fixed;
12073        }
12074        else if (name.equals("fixedPositiveInt")) {
12075          this.fixed = new PositiveIntType();
12076          return this.fixed;
12077        }
12078        else if (name.equals("fixedString")) {
12079          this.fixed = new StringType();
12080          return this.fixed;
12081        }
12082        else if (name.equals("fixedTime")) {
12083          this.fixed = new TimeType();
12084          return this.fixed;
12085        }
12086        else if (name.equals("fixedUnsignedInt")) {
12087          this.fixed = new UnsignedIntType();
12088          return this.fixed;
12089        }
12090        else if (name.equals("fixedUri")) {
12091          this.fixed = new UriType();
12092          return this.fixed;
12093        }
12094        else if (name.equals("fixedUrl")) {
12095          this.fixed = new UrlType();
12096          return this.fixed;
12097        }
12098        else if (name.equals("fixedUuid")) {
12099          this.fixed = new UuidType();
12100          return this.fixed;
12101        }
12102        else if (name.equals("fixedAddress")) {
12103          this.fixed = new Address();
12104          return this.fixed;
12105        }
12106        else if (name.equals("fixedAge")) {
12107          this.fixed = new Age();
12108          return this.fixed;
12109        }
12110        else if (name.equals("fixedAnnotation")) {
12111          this.fixed = new Annotation();
12112          return this.fixed;
12113        }
12114        else if (name.equals("fixedAttachment")) {
12115          this.fixed = new Attachment();
12116          return this.fixed;
12117        }
12118        else if (name.equals("fixedCodeableConcept")) {
12119          this.fixed = new CodeableConcept();
12120          return this.fixed;
12121        }
12122        else if (name.equals("fixedCodeableReference")) {
12123          this.fixed = new CodeableReference();
12124          return this.fixed;
12125        }
12126        else if (name.equals("fixedCoding")) {
12127          this.fixed = new Coding();
12128          return this.fixed;
12129        }
12130        else if (name.equals("fixedContactPoint")) {
12131          this.fixed = new ContactPoint();
12132          return this.fixed;
12133        }
12134        else if (name.equals("fixedCount")) {
12135          this.fixed = new Count();
12136          return this.fixed;
12137        }
12138        else if (name.equals("fixedDistance")) {
12139          this.fixed = new Distance();
12140          return this.fixed;
12141        }
12142        else if (name.equals("fixedDuration")) {
12143          this.fixed = new Duration();
12144          return this.fixed;
12145        }
12146        else if (name.equals("fixedHumanName")) {
12147          this.fixed = new HumanName();
12148          return this.fixed;
12149        }
12150        else if (name.equals("fixedIdentifier")) {
12151          this.fixed = new Identifier();
12152          return this.fixed;
12153        }
12154        else if (name.equals("fixedMoney")) {
12155          this.fixed = new Money();
12156          return this.fixed;
12157        }
12158        else if (name.equals("fixedPeriod")) {
12159          this.fixed = new Period();
12160          return this.fixed;
12161        }
12162        else if (name.equals("fixedQuantity")) {
12163          this.fixed = new Quantity();
12164          return this.fixed;
12165        }
12166        else if (name.equals("fixedRange")) {
12167          this.fixed = new Range();
12168          return this.fixed;
12169        }
12170        else if (name.equals("fixedRatio")) {
12171          this.fixed = new Ratio();
12172          return this.fixed;
12173        }
12174        else if (name.equals("fixedRatioRange")) {
12175          this.fixed = new RatioRange();
12176          return this.fixed;
12177        }
12178        else if (name.equals("fixedReference")) {
12179          this.fixed = new Reference();
12180          return this.fixed;
12181        }
12182        else if (name.equals("fixedSampledData")) {
12183          this.fixed = new SampledData();
12184          return this.fixed;
12185        }
12186        else if (name.equals("fixedSignature")) {
12187          this.fixed = new Signature();
12188          return this.fixed;
12189        }
12190        else if (name.equals("fixedTiming")) {
12191          this.fixed = new Timing();
12192          return this.fixed;
12193        }
12194        else if (name.equals("fixedContactDetail")) {
12195          this.fixed = new ContactDetail();
12196          return this.fixed;
12197        }
12198        else if (name.equals("fixedDataRequirement")) {
12199          this.fixed = new DataRequirement();
12200          return this.fixed;
12201        }
12202        else if (name.equals("fixedExpression")) {
12203          this.fixed = new Expression();
12204          return this.fixed;
12205        }
12206        else if (name.equals("fixedParameterDefinition")) {
12207          this.fixed = new ParameterDefinition();
12208          return this.fixed;
12209        }
12210        else if (name.equals("fixedRelatedArtifact")) {
12211          this.fixed = new RelatedArtifact();
12212          return this.fixed;
12213        }
12214        else if (name.equals("fixedTriggerDefinition")) {
12215          this.fixed = new TriggerDefinition();
12216          return this.fixed;
12217        }
12218        else if (name.equals("fixedUsageContext")) {
12219          this.fixed = new UsageContext();
12220          return this.fixed;
12221        }
12222        else if (name.equals("fixedAvailability")) {
12223          this.fixed = new Availability();
12224          return this.fixed;
12225        }
12226        else if (name.equals("fixedExtendedContactDetail")) {
12227          this.fixed = new ExtendedContactDetail();
12228          return this.fixed;
12229        }
12230        else if (name.equals("fixedDosage")) {
12231          this.fixed = new Dosage();
12232          return this.fixed;
12233        }
12234        else if (name.equals("fixedMeta")) {
12235          this.fixed = new Meta();
12236          return this.fixed;
12237        }
12238        else if (name.equals("patternBase64Binary")) {
12239          this.pattern = new Base64BinaryType();
12240          return this.pattern;
12241        }
12242        else if (name.equals("patternBoolean")) {
12243          this.pattern = new BooleanType();
12244          return this.pattern;
12245        }
12246        else if (name.equals("patternCanonical")) {
12247          this.pattern = new CanonicalType();
12248          return this.pattern;
12249        }
12250        else if (name.equals("patternCode")) {
12251          this.pattern = new CodeType();
12252          return this.pattern;
12253        }
12254        else if (name.equals("patternDate")) {
12255          this.pattern = new DateType();
12256          return this.pattern;
12257        }
12258        else if (name.equals("patternDateTime")) {
12259          this.pattern = new DateTimeType();
12260          return this.pattern;
12261        }
12262        else if (name.equals("patternDecimal")) {
12263          this.pattern = new DecimalType();
12264          return this.pattern;
12265        }
12266        else if (name.equals("patternId")) {
12267          this.pattern = new IdType();
12268          return this.pattern;
12269        }
12270        else if (name.equals("patternInstant")) {
12271          this.pattern = new InstantType();
12272          return this.pattern;
12273        }
12274        else if (name.equals("patternInteger")) {
12275          this.pattern = new IntegerType();
12276          return this.pattern;
12277        }
12278        else if (name.equals("patternInteger64")) {
12279          this.pattern = new Integer64Type();
12280          return this.pattern;
12281        }
12282        else if (name.equals("patternMarkdown")) {
12283          this.pattern = new MarkdownType();
12284          return this.pattern;
12285        }
12286        else if (name.equals("patternOid")) {
12287          this.pattern = new OidType();
12288          return this.pattern;
12289        }
12290        else if (name.equals("patternPositiveInt")) {
12291          this.pattern = new PositiveIntType();
12292          return this.pattern;
12293        }
12294        else if (name.equals("patternString")) {
12295          this.pattern = new StringType();
12296          return this.pattern;
12297        }
12298        else if (name.equals("patternTime")) {
12299          this.pattern = new TimeType();
12300          return this.pattern;
12301        }
12302        else if (name.equals("patternUnsignedInt")) {
12303          this.pattern = new UnsignedIntType();
12304          return this.pattern;
12305        }
12306        else if (name.equals("patternUri")) {
12307          this.pattern = new UriType();
12308          return this.pattern;
12309        }
12310        else if (name.equals("patternUrl")) {
12311          this.pattern = new UrlType();
12312          return this.pattern;
12313        }
12314        else if (name.equals("patternUuid")) {
12315          this.pattern = new UuidType();
12316          return this.pattern;
12317        }
12318        else if (name.equals("patternAddress")) {
12319          this.pattern = new Address();
12320          return this.pattern;
12321        }
12322        else if (name.equals("patternAge")) {
12323          this.pattern = new Age();
12324          return this.pattern;
12325        }
12326        else if (name.equals("patternAnnotation")) {
12327          this.pattern = new Annotation();
12328          return this.pattern;
12329        }
12330        else if (name.equals("patternAttachment")) {
12331          this.pattern = new Attachment();
12332          return this.pattern;
12333        }
12334        else if (name.equals("patternCodeableConcept")) {
12335          this.pattern = new CodeableConcept();
12336          return this.pattern;
12337        }
12338        else if (name.equals("patternCodeableReference")) {
12339          this.pattern = new CodeableReference();
12340          return this.pattern;
12341        }
12342        else if (name.equals("patternCoding")) {
12343          this.pattern = new Coding();
12344          return this.pattern;
12345        }
12346        else if (name.equals("patternContactPoint")) {
12347          this.pattern = new ContactPoint();
12348          return this.pattern;
12349        }
12350        else if (name.equals("patternCount")) {
12351          this.pattern = new Count();
12352          return this.pattern;
12353        }
12354        else if (name.equals("patternDistance")) {
12355          this.pattern = new Distance();
12356          return this.pattern;
12357        }
12358        else if (name.equals("patternDuration")) {
12359          this.pattern = new Duration();
12360          return this.pattern;
12361        }
12362        else if (name.equals("patternHumanName")) {
12363          this.pattern = new HumanName();
12364          return this.pattern;
12365        }
12366        else if (name.equals("patternIdentifier")) {
12367          this.pattern = new Identifier();
12368          return this.pattern;
12369        }
12370        else if (name.equals("patternMoney")) {
12371          this.pattern = new Money();
12372          return this.pattern;
12373        }
12374        else if (name.equals("patternPeriod")) {
12375          this.pattern = new Period();
12376          return this.pattern;
12377        }
12378        else if (name.equals("patternQuantity")) {
12379          this.pattern = new Quantity();
12380          return this.pattern;
12381        }
12382        else if (name.equals("patternRange")) {
12383          this.pattern = new Range();
12384          return this.pattern;
12385        }
12386        else if (name.equals("patternRatio")) {
12387          this.pattern = new Ratio();
12388          return this.pattern;
12389        }
12390        else if (name.equals("patternRatioRange")) {
12391          this.pattern = new RatioRange();
12392          return this.pattern;
12393        }
12394        else if (name.equals("patternReference")) {
12395          this.pattern = new Reference();
12396          return this.pattern;
12397        }
12398        else if (name.equals("patternSampledData")) {
12399          this.pattern = new SampledData();
12400          return this.pattern;
12401        }
12402        else if (name.equals("patternSignature")) {
12403          this.pattern = new Signature();
12404          return this.pattern;
12405        }
12406        else if (name.equals("patternTiming")) {
12407          this.pattern = new Timing();
12408          return this.pattern;
12409        }
12410        else if (name.equals("patternContactDetail")) {
12411          this.pattern = new ContactDetail();
12412          return this.pattern;
12413        }
12414        else if (name.equals("patternDataRequirement")) {
12415          this.pattern = new DataRequirement();
12416          return this.pattern;
12417        }
12418        else if (name.equals("patternExpression")) {
12419          this.pattern = new Expression();
12420          return this.pattern;
12421        }
12422        else if (name.equals("patternParameterDefinition")) {
12423          this.pattern = new ParameterDefinition();
12424          return this.pattern;
12425        }
12426        else if (name.equals("patternRelatedArtifact")) {
12427          this.pattern = new RelatedArtifact();
12428          return this.pattern;
12429        }
12430        else if (name.equals("patternTriggerDefinition")) {
12431          this.pattern = new TriggerDefinition();
12432          return this.pattern;
12433        }
12434        else if (name.equals("patternUsageContext")) {
12435          this.pattern = new UsageContext();
12436          return this.pattern;
12437        }
12438        else if (name.equals("patternAvailability")) {
12439          this.pattern = new Availability();
12440          return this.pattern;
12441        }
12442        else if (name.equals("patternExtendedContactDetail")) {
12443          this.pattern = new ExtendedContactDetail();
12444          return this.pattern;
12445        }
12446        else if (name.equals("patternDosage")) {
12447          this.pattern = new Dosage();
12448          return this.pattern;
12449        }
12450        else if (name.equals("patternMeta")) {
12451          this.pattern = new Meta();
12452          return this.pattern;
12453        }
12454        else if (name.equals("example")) {
12455          return addExample();
12456        }
12457        else if (name.equals("minValueDate")) {
12458          this.minValue = new DateType();
12459          return this.minValue;
12460        }
12461        else if (name.equals("minValueDateTime")) {
12462          this.minValue = new DateTimeType();
12463          return this.minValue;
12464        }
12465        else if (name.equals("minValueInstant")) {
12466          this.minValue = new InstantType();
12467          return this.minValue;
12468        }
12469        else if (name.equals("minValueTime")) {
12470          this.minValue = new TimeType();
12471          return this.minValue;
12472        }
12473        else if (name.equals("minValueDecimal")) {
12474          this.minValue = new DecimalType();
12475          return this.minValue;
12476        }
12477        else if (name.equals("minValueInteger")) {
12478          this.minValue = new IntegerType();
12479          return this.minValue;
12480        }
12481        else if (name.equals("minValueInteger64")) {
12482          this.minValue = new Integer64Type();
12483          return this.minValue;
12484        }
12485        else if (name.equals("minValuePositiveInt")) {
12486          this.minValue = new PositiveIntType();
12487          return this.minValue;
12488        }
12489        else if (name.equals("minValueUnsignedInt")) {
12490          this.minValue = new UnsignedIntType();
12491          return this.minValue;
12492        }
12493        else if (name.equals("minValueQuantity")) {
12494          this.minValue = new Quantity();
12495          return this.minValue;
12496        }
12497        else if (name.equals("maxValueDate")) {
12498          this.maxValue = new DateType();
12499          return this.maxValue;
12500        }
12501        else if (name.equals("maxValueDateTime")) {
12502          this.maxValue = new DateTimeType();
12503          return this.maxValue;
12504        }
12505        else if (name.equals("maxValueInstant")) {
12506          this.maxValue = new InstantType();
12507          return this.maxValue;
12508        }
12509        else if (name.equals("maxValueTime")) {
12510          this.maxValue = new TimeType();
12511          return this.maxValue;
12512        }
12513        else if (name.equals("maxValueDecimal")) {
12514          this.maxValue = new DecimalType();
12515          return this.maxValue;
12516        }
12517        else if (name.equals("maxValueInteger")) {
12518          this.maxValue = new IntegerType();
12519          return this.maxValue;
12520        }
12521        else if (name.equals("maxValueInteger64")) {
12522          this.maxValue = new Integer64Type();
12523          return this.maxValue;
12524        }
12525        else if (name.equals("maxValuePositiveInt")) {
12526          this.maxValue = new PositiveIntType();
12527          return this.maxValue;
12528        }
12529        else if (name.equals("maxValueUnsignedInt")) {
12530          this.maxValue = new UnsignedIntType();
12531          return this.maxValue;
12532        }
12533        else if (name.equals("maxValueQuantity")) {
12534          this.maxValue = new Quantity();
12535          return this.maxValue;
12536        }
12537        else if (name.equals("maxLength")) {
12538          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.maxLength");
12539        }
12540        else if (name.equals("condition")) {
12541          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.condition");
12542        }
12543        else if (name.equals("constraint")) {
12544          return addConstraint();
12545        }
12546        else if (name.equals("mustHaveValue")) {
12547          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.mustHaveValue");
12548        }
12549        else if (name.equals("valueAlternatives")) {
12550          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.valueAlternatives");
12551        }
12552        else if (name.equals("mustSupport")) {
12553          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.mustSupport");
12554        }
12555        else if (name.equals("isModifier")) {
12556          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.isModifier");
12557        }
12558        else if (name.equals("isModifierReason")) {
12559          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.isModifierReason");
12560        }
12561        else if (name.equals("isSummary")) {
12562          throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.isSummary");
12563        }
12564        else if (name.equals("binding")) {
12565          this.binding = new ElementDefinitionBindingComponent();
12566          return this.binding;
12567        }
12568        else if (name.equals("mapping")) {
12569          return addMapping();
12570        }
12571        else
12572          return super.addChild(name);
12573      }
12574
12575  public String fhirType() {
12576    return "ElementDefinition";
12577
12578  }
12579
12580      public ElementDefinition copy() {
12581        ElementDefinition dst = new ElementDefinition();
12582        copyValues(dst);
12583        return dst;
12584      }
12585
12586      public void copyValues(ElementDefinition dst) {
12587        super.copyValues(dst);
12588        dst.path = path == null ? null : path.copy();
12589        if (representation != null) {
12590          dst.representation = new ArrayList<Enumeration<PropertyRepresentation>>();
12591          for (Enumeration<PropertyRepresentation> i : representation)
12592            dst.representation.add(i.copy());
12593        };
12594        dst.sliceName = sliceName == null ? null : sliceName.copy();
12595        dst.sliceIsConstraining = sliceIsConstraining == null ? null : sliceIsConstraining.copy();
12596        dst.label = label == null ? null : label.copy();
12597        if (code != null) {
12598          dst.code = new ArrayList<Coding>();
12599          for (Coding i : code)
12600            dst.code.add(i.copy());
12601        };
12602        dst.slicing = slicing == null ? null : slicing.copy();
12603        dst.short_ = short_ == null ? null : short_.copy();
12604        dst.definition = definition == null ? null : definition.copy();
12605        dst.comment = comment == null ? null : comment.copy();
12606        dst.requirements = requirements == null ? null : requirements.copy();
12607        if (alias != null) {
12608          dst.alias = new ArrayList<StringType>();
12609          for (StringType i : alias)
12610            dst.alias.add(i.copy());
12611        };
12612        dst.min = min == null ? null : min.copy();
12613        dst.max = max == null ? null : max.copy();
12614        dst.base = base == null ? null : base.copy();
12615        dst.contentReference = contentReference == null ? null : contentReference.copy();
12616        if (type != null) {
12617          dst.type = new ArrayList<TypeRefComponent>();
12618          for (TypeRefComponent i : type)
12619            dst.type.add(i.copy());
12620        };
12621        dst.defaultValue = defaultValue == null ? null : defaultValue.copy();
12622        dst.meaningWhenMissing = meaningWhenMissing == null ? null : meaningWhenMissing.copy();
12623        dst.orderMeaning = orderMeaning == null ? null : orderMeaning.copy();
12624        dst.fixed = fixed == null ? null : fixed.copy();
12625        dst.pattern = pattern == null ? null : pattern.copy();
12626        if (example != null) {
12627          dst.example = new ArrayList<ElementDefinitionExampleComponent>();
12628          for (ElementDefinitionExampleComponent i : example)
12629            dst.example.add(i.copy());
12630        };
12631        dst.minValue = minValue == null ? null : minValue.copy();
12632        dst.maxValue = maxValue == null ? null : maxValue.copy();
12633        dst.maxLength = maxLength == null ? null : maxLength.copy();
12634        if (condition != null) {
12635          dst.condition = new ArrayList<IdType>();
12636          for (IdType i : condition)
12637            dst.condition.add(i.copy());
12638        };
12639        if (constraint != null) {
12640          dst.constraint = new ArrayList<ElementDefinitionConstraintComponent>();
12641          for (ElementDefinitionConstraintComponent i : constraint)
12642            dst.constraint.add(i.copy());
12643        };
12644        dst.mustHaveValue = mustHaveValue == null ? null : mustHaveValue.copy();
12645        if (valueAlternatives != null) {
12646          dst.valueAlternatives = new ArrayList<CanonicalType>();
12647          for (CanonicalType i : valueAlternatives)
12648            dst.valueAlternatives.add(i.copy());
12649        };
12650        dst.mustSupport = mustSupport == null ? null : mustSupport.copy();
12651        dst.isModifier = isModifier == null ? null : isModifier.copy();
12652        dst.isModifierReason = isModifierReason == null ? null : isModifierReason.copy();
12653        dst.isSummary = isSummary == null ? null : isSummary.copy();
12654        dst.binding = binding == null ? null : binding.copy();
12655        if (mapping != null) {
12656          dst.mapping = new ArrayList<ElementDefinitionMappingComponent>();
12657          for (ElementDefinitionMappingComponent i : mapping)
12658            dst.mapping.add(i.copy());
12659        };
12660      }
12661
12662      protected ElementDefinition typedCopy() {
12663        return copy();
12664      }
12665
12666      @Override
12667      public boolean equalsDeep(Base other_) {
12668        if (!super.equalsDeep(other_))
12669          return false;
12670        if (!(other_ instanceof ElementDefinition))
12671          return false;
12672        ElementDefinition o = (ElementDefinition) other_;
12673        return compareDeep(path, o.path, true) && compareDeep(representation, o.representation, true) && compareDeep(sliceName, o.sliceName, true)
12674           && compareDeep(sliceIsConstraining, o.sliceIsConstraining, true) && compareDeep(label, o.label, true)
12675           && compareDeep(code, o.code, true) && compareDeep(slicing, o.slicing, true) && compareDeep(short_, o.short_, true)
12676           && compareDeep(definition, o.definition, true) && compareDeep(comment, o.comment, true) && compareDeep(requirements, o.requirements, true)
12677           && compareDeep(alias, o.alias, true) && compareDeep(min, o.min, true) && compareDeep(max, o.max, true)
12678           && compareDeep(base, o.base, true) && compareDeep(contentReference, o.contentReference, true) && compareDeep(type, o.type, true)
12679           && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(meaningWhenMissing, o.meaningWhenMissing, true)
12680           && compareDeep(orderMeaning, o.orderMeaning, true) && compareDeep(fixed, o.fixed, true) && compareDeep(pattern, o.pattern, true)
12681           && compareDeep(example, o.example, true) && compareDeep(minValue, o.minValue, true) && compareDeep(maxValue, o.maxValue, true)
12682           && compareDeep(maxLength, o.maxLength, true) && compareDeep(condition, o.condition, true) && compareDeep(constraint, o.constraint, true)
12683           && compareDeep(mustHaveValue, o.mustHaveValue, true) && compareDeep(valueAlternatives, o.valueAlternatives, true)
12684           && compareDeep(mustSupport, o.mustSupport, true) && compareDeep(isModifier, o.isModifier, true)
12685           && compareDeep(isModifierReason, o.isModifierReason, true) && compareDeep(isSummary, o.isSummary, true)
12686           && compareDeep(binding, o.binding, true) && compareDeep(mapping, o.mapping, true);
12687      }
12688
12689      @Override
12690      public boolean equalsShallow(Base other_) {
12691        if (!super.equalsShallow(other_))
12692          return false;
12693        if (!(other_ instanceof ElementDefinition))
12694          return false;
12695        ElementDefinition o = (ElementDefinition) other_;
12696        return compareValues(path, o.path, true) && compareValues(representation, o.representation, true) && compareValues(sliceName, o.sliceName, true)
12697           && compareValues(sliceIsConstraining, o.sliceIsConstraining, true) && compareValues(label, o.label, true)
12698           && compareValues(short_, o.short_, true) && compareValues(definition, o.definition, true) && compareValues(comment, o.comment, true)
12699           && compareValues(requirements, o.requirements, true) && compareValues(alias, o.alias, true) && compareValues(min, o.min, true)
12700           && compareValues(max, o.max, true) && compareValues(contentReference, o.contentReference, true) && compareValues(meaningWhenMissing, o.meaningWhenMissing, true)
12701           && compareValues(orderMeaning, o.orderMeaning, true) && compareValues(maxLength, o.maxLength, true)
12702           && compareValues(condition, o.condition, true) && compareValues(mustHaveValue, o.mustHaveValue, true)
12703           && compareValues(valueAlternatives, o.valueAlternatives, true) && compareValues(mustSupport, o.mustSupport, true)
12704           && compareValues(isModifier, o.isModifier, true) && compareValues(isModifierReason, o.isModifierReason, true)
12705           && compareValues(isSummary, o.isSummary, true);
12706      }
12707
12708      public boolean isEmpty() {
12709        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, representation, sliceName
12710          , sliceIsConstraining, label, code, slicing, short_, definition, comment, requirements
12711          , alias, min, max, base, contentReference, type, defaultValue, meaningWhenMissing
12712          , orderMeaning, fixed, pattern, example, minValue, maxValue, maxLength, condition
12713          , constraint, mustHaveValue, valueAlternatives, mustSupport, isModifier, isModifierReason
12714          , isSummary, binding, mapping);
12715      }
12716
12717// Manual code (from Configuration.txt):
12718
12719  public String toString() {
12720    if (hasId())
12721      return getId();
12722    if (hasSliceName())
12723      return getPath()+":"+getSliceName();
12724    else
12725      return getPath();
12726  }
12727    
12728  public void makeBase(String path, int min, String max) {
12729    ElementDefinitionBaseComponent self = getBase();
12730    self.setPath(path);
12731    self.setMin(min);
12732    self.setMax(max);
12733  }
12734  
12735  public void makeBase() {
12736    ElementDefinitionBaseComponent self = getBase();
12737    self.setPath(getPath());
12738    self.setMin(getMin());
12739    self.setMax(getMax());
12740  }
12741 
12742  
12743  public String typeSummary() {
12744    CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
12745    for (TypeRefComponent tr : getType()) {
12746      if (tr.hasCode())
12747        b.append(tr.getWorkingCode());
12748    }
12749    return b.toString();
12750  }
12751
12752  public List<String> typeList() {
12753    List<String> res = new ArrayList<>();
12754    for (TypeRefComponent tr : getType()) {
12755      if (tr.hasCode())
12756        res.add(tr.getWorkingCode());
12757    }
12758    return res;
12759  }
12760  
12761  public String typeSummaryVB() {
12762    CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder("|");
12763    for (TypeRefComponent tr : getType()) {
12764      if (tr.hasCode())
12765        b.append(tr.getWorkingCode());
12766    }
12767    return b.toString().replace(" ", "");
12768  }
12769  
12770  public TypeRefComponent getType(String code) {
12771    for (TypeRefComponent tr : getType()) 
12772      if (tr.getCode().equals(code))
12773        return tr;
12774    TypeRefComponent tr = new TypeRefComponent();
12775    tr.setCode(code);
12776    type.add(tr);
12777    return tr;
12778  }
12779
12780  public static final boolean NOT_MODIFIER = false;
12781  public static final boolean NOT_IN_SUMMARY = false;
12782  public static final boolean IS_MODIFIER = true;
12783  public static final boolean IS_IN_SUMMARY = true;
12784  public ElementDefinition(boolean defaults, boolean modifier, boolean inSummary) {
12785    super();
12786    if (defaults) {
12787      setIsModifier(modifier);
12788      setIsSummary(inSummary);
12789    }
12790  }  
12791
12792 public String present() {
12793    return hasId() ? getId() : getPath();
12794  }
12795
12796  public boolean hasCondition(IdType id) {
12797    for (IdType c : getCondition()) {
12798      if (c.primitiveValue().equals(id.primitiveValue()))
12799        return true;
12800    }
12801    return false;
12802  }
12803
12804  public boolean hasConstraint(String key) {
12805    for (ElementDefinitionConstraintComponent c : getConstraint()) {
12806      if (c.getKey().equals(key))
12807        return true;
12808    }
12809    return false;
12810  }
12811
12812  public boolean hasCode(Coding c) {
12813    for (Coding t : getCode()) {
12814      if (t.getSystem().equals(c.getSystem()) && t.getCode().equals(c.getCode()))
12815        return true;
12816    }
12817    return false;
12818  }  
12819
12820  public boolean isChoice() {
12821    return getPath().endsWith("[x]");
12822  }  
12823
12824  public String getName() {
12825    return hasPath() ? getPath().contains(".") ? getPath().substring(getPath().lastIndexOf(".")+1) : getPath() : null;
12826  }
12827  
12828  public String getNameBase() {
12829    return getName().replace("[x]", "");
12830  }
12831
12832  public boolean unbounded() {
12833    return getMax().equals("*") || Integer.parseInt(getMax()) > 1;
12834  }
12835
12836  public boolean isMandatory() {
12837    return getMin() > 0;
12838  }
12839
12840  public boolean isInlineType() {
12841    return getType().size() == 1 && Utilities.existsInList(getType().get(0).getCode(), "Element", "BackboneElement");
12842  }  
12843
12844
12845  public boolean prohibited() { 
12846    return "0".equals(getMax()); 
12847  } 
12848
12849  public boolean hasFixedOrPattern() { 
12850    return hasFixed() || hasPattern(); 
12851  } 
12852
12853  public DataType getFixedOrPattern() { 
12854    return hasFixed() ? getFixed() : getPattern(); 
12855  } 
12856
12857  public boolean isProhibited() { 
12858    return "0".equals(getMax()); 
12859  }   
12860
12861  public boolean isRequired() { 
12862    return getMin() == 1; 
12863  }
12864
12865  public CanonicalType addValueAlternative(CanonicalType t) { 
12866    if (this.valueAlternatives == null)
12867      this.valueAlternatives = new ArrayList<CanonicalType>();
12868    this.valueAlternatives.add(t);
12869    return t;
12870  }
12871
12872// end addition
12873
12874}
12875