001package org.hl7.fhir.r4b.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 Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r4b.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.r4b.model.Enumerations.BindingStrength;
050import  org.hl7.fhir.r4b.model.Enumerations.BindingStrengthEnumFactory;
051import  org.hl7.fhir.r4b.utils.ToolingExtensions;
052import  org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
053import  org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
054/**
055 * Base StructureDefinition for ElementDefinition Type: Captures constraints on each element within the resource, profile, or extension.
056 */
057@DatatypeDef(name="ElementDefinition")
058public class ElementDefinition extends DataType implements ICompositeType {
059
060    public enum AggregationMode {
061        /**
062         * The reference is a local reference to a contained resource.
063         */
064        CONTAINED, 
065        /**
066         * The reference to a resource that has to be resolved externally to the resource that includes the reference.
067         */
068        REFERENCED, 
069        /**
070         * The resource the reference points to will be found in the same bundle as the resource that includes the reference.
071         */
072        BUNDLED, 
073        /**
074         * added to help the parsers with the generic types
075         */
076        NULL;
077        public static AggregationMode fromCode(String codeString) throws FHIRException {
078            if (codeString == null || "".equals(codeString))
079                return null;
080        if ("contained".equals(codeString))
081          return CONTAINED;
082        if ("referenced".equals(codeString))
083          return REFERENCED;
084        if ("bundled".equals(codeString))
085          return BUNDLED;
086        if (Configuration.isAcceptInvalidEnums())
087          return null;
088        else
089          throw new FHIRException("Unknown AggregationMode code '"+codeString+"'");
090        }
091        public String toCode() {
092          switch (this) {
093            case CONTAINED: return "contained";
094            case REFERENCED: return "referenced";
095            case BUNDLED: return "bundled";
096            case NULL: return null;
097            default: return "?";
098          }
099        }
100        public String getSystem() {
101          switch (this) {
102            case CONTAINED: return "http://hl7.org/fhir/resource-aggregation-mode";
103            case REFERENCED: return "http://hl7.org/fhir/resource-aggregation-mode";
104            case BUNDLED: return "http://hl7.org/fhir/resource-aggregation-mode";
105            case NULL: return null;
106            default: return "?";
107          }
108        }
109        public String getDefinition() {
110          switch (this) {
111            case CONTAINED: return "The reference is a local reference to a contained resource.";
112            case REFERENCED: return "The reference to a resource that has to be resolved externally to the resource that includes the reference.";
113            case BUNDLED: return "The resource the reference points to will be found in the same bundle as the resource that includes the reference.";
114            case NULL: return null;
115            default: return "?";
116          }
117        }
118        public String getDisplay() {
119          switch (this) {
120            case CONTAINED: return "Contained";
121            case REFERENCED: return "Referenced";
122            case BUNDLED: return "Bundled";
123            case NULL: return null;
124            default: return "?";
125          }
126        }
127    }
128
129  public static class AggregationModeEnumFactory implements EnumFactory<AggregationMode> {
130    public AggregationMode fromCode(String codeString) throws IllegalArgumentException {
131      if (codeString == null || "".equals(codeString))
132            if (codeString == null || "".equals(codeString))
133                return null;
134        if ("contained".equals(codeString))
135          return AggregationMode.CONTAINED;
136        if ("referenced".equals(codeString))
137          return AggregationMode.REFERENCED;
138        if ("bundled".equals(codeString))
139          return AggregationMode.BUNDLED;
140        throw new IllegalArgumentException("Unknown AggregationMode code '"+codeString+"'");
141        }
142        public Enumeration<AggregationMode> fromType(Base code) throws FHIRException {
143          if (code == null)
144            return null;
145          if (code.isEmpty())
146            return new Enumeration<AggregationMode>(this);
147          String codeString = ((PrimitiveType) code).asStringValue();
148          if (codeString == null || "".equals(codeString))
149            return null;
150        if ("contained".equals(codeString))
151          return new Enumeration<AggregationMode>(this, AggregationMode.CONTAINED);
152        if ("referenced".equals(codeString))
153          return new Enumeration<AggregationMode>(this, AggregationMode.REFERENCED);
154        if ("bundled".equals(codeString))
155          return new Enumeration<AggregationMode>(this, AggregationMode.BUNDLED);
156        throw new FHIRException("Unknown AggregationMode code '"+codeString+"'");
157        }
158    public String toCode(AggregationMode code) {
159      if (code == AggregationMode.CONTAINED)
160        return "contained";
161      if (code == AggregationMode.REFERENCED)
162        return "referenced";
163      if (code == AggregationMode.BUNDLED)
164        return "bundled";
165      return "?";
166      }
167    public String toSystem(AggregationMode code) {
168      return code.getSystem();
169      }
170    }
171
172    public enum ConstraintSeverity {
173        /**
174         * If the constraint is violated, the resource is not conformant.
175         */
176        ERROR, 
177        /**
178         * If the constraint is violated, the resource is conformant, but it is not necessarily following best practice.
179         */
180        WARNING, 
181        /**
182         * added to help the parsers with the generic types
183         */
184        NULL;
185        public static ConstraintSeverity fromCode(String codeString) throws FHIRException {
186            if (codeString == null || "".equals(codeString))
187                return null;
188        if ("error".equals(codeString))
189          return ERROR;
190        if ("warning".equals(codeString))
191          return WARNING;
192        if (Configuration.isAcceptInvalidEnums())
193          return null;
194        else
195          throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'");
196        }
197        public String toCode() {
198          switch (this) {
199            case ERROR: return "error";
200            case WARNING: return "warning";
201            case NULL: return null;
202            default: return "?";
203          }
204        }
205        public String getSystem() {
206          switch (this) {
207            case ERROR: return "http://hl7.org/fhir/constraint-severity";
208            case WARNING: return "http://hl7.org/fhir/constraint-severity";
209            case NULL: return null;
210            default: return "?";
211          }
212        }
213        public String getDefinition() {
214          switch (this) {
215            case ERROR: return "If the constraint is violated, the resource is not conformant.";
216            case WARNING: return "If the constraint is violated, the resource is conformant, but it is not necessarily following best practice.";
217            case NULL: return null;
218            default: return "?";
219          }
220        }
221        public String getDisplay() {
222          switch (this) {
223            case ERROR: return "Error";
224            case WARNING: return "Warning";
225            case NULL: return null;
226            default: return "?";
227          }
228        }
229    }
230
231  public static class ConstraintSeverityEnumFactory implements EnumFactory<ConstraintSeverity> {
232    public ConstraintSeverity fromCode(String codeString) throws IllegalArgumentException {
233      if (codeString == null || "".equals(codeString))
234            if (codeString == null || "".equals(codeString))
235                return null;
236        if ("error".equals(codeString))
237          return ConstraintSeverity.ERROR;
238        if ("warning".equals(codeString))
239          return ConstraintSeverity.WARNING;
240        throw new IllegalArgumentException("Unknown ConstraintSeverity code '"+codeString+"'");
241        }
242        public Enumeration<ConstraintSeverity> fromType(Base code) throws FHIRException {
243          if (code == null)
244            return null;
245          if (code.isEmpty())
246            return new Enumeration<ConstraintSeverity>(this);
247          String codeString = ((PrimitiveType) code).asStringValue();
248          if (codeString == null || "".equals(codeString))
249            return null;
250        if ("error".equals(codeString))
251          return new Enumeration<ConstraintSeverity>(this, ConstraintSeverity.ERROR);
252        if ("warning".equals(codeString))
253          return new Enumeration<ConstraintSeverity>(this, ConstraintSeverity.WARNING);
254        throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'");
255        }
256    public String toCode(ConstraintSeverity code) {
257      if (code == ConstraintSeverity.ERROR)
258        return "error";
259      if (code == ConstraintSeverity.WARNING)
260        return "warning";
261      return "?";
262      }
263    public String toSystem(ConstraintSeverity code) {
264      return code.getSystem();
265      }
266    }
267
268    public enum DiscriminatorType {
269        /**
270         * The slices have different values in the nominated element.
271         */
272        VALUE, 
273        /**
274         * The slices are differentiated by the presence or absence of the nominated element.
275         */
276        EXISTS, 
277        /**
278         * The slices have different values in the nominated element, as determined by testing them against the applicable ElementDefinition.pattern[x].
279         */
280        PATTERN, 
281        /**
282         * The slices are differentiated by type of the nominated element.
283         */
284        TYPE, 
285        /**
286         * 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.
287         */
288        PROFILE, 
289        /**
290         * added to help the parsers with the generic types
291         */
292        NULL;
293        public static DiscriminatorType fromCode(String codeString) throws FHIRException {
294            if (codeString == null || "".equals(codeString))
295                return null;
296        if ("value".equals(codeString))
297          return VALUE;
298        if ("exists".equals(codeString))
299          return EXISTS;
300        if ("pattern".equals(codeString))
301          return PATTERN;
302        if ("type".equals(codeString))
303          return TYPE;
304        if ("profile".equals(codeString))
305          return PROFILE;
306        if (Configuration.isAcceptInvalidEnums())
307          return null;
308        else
309          throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'");
310        }
311        public String toCode() {
312          switch (this) {
313            case VALUE: return "value";
314            case EXISTS: return "exists";
315            case PATTERN: return "pattern";
316            case TYPE: return "type";
317            case PROFILE: return "profile";
318            case NULL: return null;
319            default: return "?";
320          }
321        }
322        public String getSystem() {
323          switch (this) {
324            case VALUE: return "http://hl7.org/fhir/discriminator-type";
325            case EXISTS: return "http://hl7.org/fhir/discriminator-type";
326            case PATTERN: return "http://hl7.org/fhir/discriminator-type";
327            case TYPE: return "http://hl7.org/fhir/discriminator-type";
328            case PROFILE: return "http://hl7.org/fhir/discriminator-type";
329            case NULL: return null;
330            default: return "?";
331          }
332        }
333        public String getDefinition() {
334          switch (this) {
335            case VALUE: return "The slices have different values in the nominated element.";
336            case EXISTS: return "The slices are differentiated by the presence or absence of the nominated element.";
337            case PATTERN: return "The slices have different values in the nominated element, as determined by testing them against the applicable ElementDefinition.pattern[x].";
338            case TYPE: return "The slices are differentiated by type of the nominated element.";
339            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.";
340            case NULL: return null;
341            default: return "?";
342          }
343        }
344        public String getDisplay() {
345          switch (this) {
346            case VALUE: return "Value";
347            case EXISTS: return "Exists";
348            case PATTERN: return "Pattern";
349            case TYPE: return "Type";
350            case PROFILE: return "Profile";
351            case NULL: return null;
352            default: return "?";
353          }
354        }
355    }
356
357  public static class DiscriminatorTypeEnumFactory implements EnumFactory<DiscriminatorType> {
358    public DiscriminatorType fromCode(String codeString) throws IllegalArgumentException {
359      if (codeString == null || "".equals(codeString))
360            if (codeString == null || "".equals(codeString))
361                return null;
362        if ("value".equals(codeString))
363          return DiscriminatorType.VALUE;
364        if ("exists".equals(codeString))
365          return DiscriminatorType.EXISTS;
366        if ("pattern".equals(codeString))
367          return DiscriminatorType.PATTERN;
368        if ("type".equals(codeString))
369          return DiscriminatorType.TYPE;
370        if ("profile".equals(codeString))
371          return DiscriminatorType.PROFILE;
372        throw new IllegalArgumentException("Unknown DiscriminatorType code '"+codeString+"'");
373        }
374        public Enumeration<DiscriminatorType> fromType(Base code) throws FHIRException {
375          if (code == null)
376            return null;
377          if (code.isEmpty())
378            return new Enumeration<DiscriminatorType>(this);
379          String codeString = ((PrimitiveType) code).asStringValue();
380          if (codeString == null || "".equals(codeString))
381            return null;
382        if ("value".equals(codeString))
383          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.VALUE);
384        if ("exists".equals(codeString))
385          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.EXISTS);
386        if ("pattern".equals(codeString))
387          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.PATTERN);
388        if ("type".equals(codeString))
389          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.TYPE);
390        if ("profile".equals(codeString))
391          return new Enumeration<DiscriminatorType>(this, DiscriminatorType.PROFILE);
392        throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'");
393        }
394    public String toCode(DiscriminatorType code) {
395      if (code == DiscriminatorType.VALUE)
396        return "value";
397      if (code == DiscriminatorType.EXISTS)
398        return "exists";
399      if (code == DiscriminatorType.PATTERN)
400        return "pattern";
401      if (code == DiscriminatorType.TYPE)
402        return "type";
403      if (code == DiscriminatorType.PROFILE)
404        return "profile";
405      return "?";
406      }
407    public String toSystem(DiscriminatorType code) {
408      return code.getSystem();
409      }
410    }
411
412    public enum PropertyRepresentation {
413        /**
414         * In XML, this property is represented as an attribute not an element.
415         */
416        XMLATTR, 
417        /**
418         * This element is represented using the XML text attribute (primitives only).
419         */
420        XMLTEXT, 
421        /**
422         * The type of this element is indicated using xsi:type.
423         */
424        TYPEATTR, 
425        /**
426         * Use CDA narrative instead of XHTML.
427         */
428        CDATEXT, 
429        /**
430         * The property is represented using XHTML.
431         */
432        XHTML, 
433        /**
434         * added to help the parsers with the generic types
435         */
436        NULL;
437        public static PropertyRepresentation fromCode(String codeString) throws FHIRException {
438            if (codeString == null || "".equals(codeString))
439                return null;
440        if ("xmlAttr".equals(codeString))
441          return XMLATTR;
442        if ("xmlText".equals(codeString))
443          return XMLTEXT;
444        if ("typeAttr".equals(codeString))
445          return TYPEATTR;
446        if ("cdaText".equals(codeString))
447          return CDATEXT;
448        if ("xhtml".equals(codeString))
449          return XHTML;
450        if (Configuration.isAcceptInvalidEnums())
451          return null;
452        else
453          throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'");
454        }
455        public String toCode() {
456          switch (this) {
457            case XMLATTR: return "xmlAttr";
458            case XMLTEXT: return "xmlText";
459            case TYPEATTR: return "typeAttr";
460            case CDATEXT: return "cdaText";
461            case XHTML: return "xhtml";
462            case NULL: return null;
463            default: return "?";
464          }
465        }
466        public String getSystem() {
467          switch (this) {
468            case XMLATTR: return "http://hl7.org/fhir/property-representation";
469            case XMLTEXT: return "http://hl7.org/fhir/property-representation";
470            case TYPEATTR: return "http://hl7.org/fhir/property-representation";
471            case CDATEXT: return "http://hl7.org/fhir/property-representation";
472            case XHTML: return "http://hl7.org/fhir/property-representation";
473            case NULL: return null;
474            default: return "?";
475          }
476        }
477        public String getDefinition() {
478          switch (this) {
479            case XMLATTR: return "In XML, this property is represented as an attribute not an element.";
480            case XMLTEXT: return "This element is represented using the XML text attribute (primitives only).";
481            case TYPEATTR: return "The type of this element is indicated using xsi:type.";
482            case CDATEXT: return "Use CDA narrative instead of XHTML.";
483            case XHTML: return "The property is represented using XHTML.";
484            case NULL: return null;
485            default: return "?";
486          }
487        }
488        public String getDisplay() {
489          switch (this) {
490            case XMLATTR: return "XML Attribute";
491            case XMLTEXT: return "XML Text";
492            case TYPEATTR: return "Type Attribute";
493            case CDATEXT: return "CDA Text Format";
494            case XHTML: return "XHTML";
495            case NULL: return null;
496            default: return "?";
497          }
498        }
499    }
500
501  public static class PropertyRepresentationEnumFactory implements EnumFactory<PropertyRepresentation> {
502    public PropertyRepresentation fromCode(String codeString) throws IllegalArgumentException {
503      if (codeString == null || "".equals(codeString))
504            if (codeString == null || "".equals(codeString))
505                return null;
506        if ("xmlAttr".equals(codeString))
507          return PropertyRepresentation.XMLATTR;
508        if ("xmlText".equals(codeString))
509          return PropertyRepresentation.XMLTEXT;
510        if ("typeAttr".equals(codeString))
511          return PropertyRepresentation.TYPEATTR;
512        if ("cdaText".equals(codeString))
513          return PropertyRepresentation.CDATEXT;
514        if ("xhtml".equals(codeString))
515          return PropertyRepresentation.XHTML;
516        throw new IllegalArgumentException("Unknown PropertyRepresentation code '"+codeString+"'");
517        }
518        public Enumeration<PropertyRepresentation> fromType(Base code) throws FHIRException {
519          if (code == null)
520            return null;
521          if (code.isEmpty())
522            return new Enumeration<PropertyRepresentation>(this);
523          String codeString = ((PrimitiveType) code).asStringValue();
524          if (codeString == null || "".equals(codeString))
525            return null;
526        if ("xmlAttr".equals(codeString))
527          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.XMLATTR);
528        if ("xmlText".equals(codeString))
529          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.XMLTEXT);
530        if ("typeAttr".equals(codeString))
531          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.TYPEATTR);
532        if ("cdaText".equals(codeString))
533          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.CDATEXT);
534        if ("xhtml".equals(codeString))
535          return new Enumeration<PropertyRepresentation>(this, PropertyRepresentation.XHTML);
536        throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'");
537        }
538    public String toCode(PropertyRepresentation code) {
539      if (code == PropertyRepresentation.XMLATTR)
540        return "xmlAttr";
541      if (code == PropertyRepresentation.XMLTEXT)
542        return "xmlText";
543      if (code == PropertyRepresentation.TYPEATTR)
544        return "typeAttr";
545      if (code == PropertyRepresentation.CDATEXT)
546        return "cdaText";
547      if (code == PropertyRepresentation.XHTML)
548        return "xhtml";
549      return "?";
550      }
551    public String toSystem(PropertyRepresentation code) {
552      return code.getSystem();
553      }
554    }
555
556    public enum ReferenceVersionRules {
557        /**
558         * The reference may be either version independent or version specific.
559         */
560        EITHER, 
561        /**
562         * The reference must be version independent.
563         */
564        INDEPENDENT, 
565        /**
566         * The reference must be version specific.
567         */
568        SPECIFIC, 
569        /**
570         * added to help the parsers with the generic types
571         */
572        NULL;
573        public static ReferenceVersionRules fromCode(String codeString) throws FHIRException {
574            if (codeString == null || "".equals(codeString))
575                return null;
576        if ("either".equals(codeString))
577          return EITHER;
578        if ("independent".equals(codeString))
579          return INDEPENDENT;
580        if ("specific".equals(codeString))
581          return SPECIFIC;
582        if (Configuration.isAcceptInvalidEnums())
583          return null;
584        else
585          throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'");
586        }
587        public String toCode() {
588          switch (this) {
589            case EITHER: return "either";
590            case INDEPENDENT: return "independent";
591            case SPECIFIC: return "specific";
592            case NULL: return null;
593            default: return "?";
594          }
595        }
596        public String getSystem() {
597          switch (this) {
598            case EITHER: return "http://hl7.org/fhir/reference-version-rules";
599            case INDEPENDENT: return "http://hl7.org/fhir/reference-version-rules";
600            case SPECIFIC: return "http://hl7.org/fhir/reference-version-rules";
601            case NULL: return null;
602            default: return "?";
603          }
604        }
605        public String getDefinition() {
606          switch (this) {
607            case EITHER: return "The reference may be either version independent or version specific.";
608            case INDEPENDENT: return "The reference must be version independent.";
609            case SPECIFIC: return "The reference must be version specific.";
610            case NULL: return null;
611            default: return "?";
612          }
613        }
614        public String getDisplay() {
615          switch (this) {
616            case EITHER: return "Either Specific or independent";
617            case INDEPENDENT: return "Version independent";
618            case SPECIFIC: return "Version Specific";
619            case NULL: return null;
620            default: return "?";
621          }
622        }
623    }
624
625  public static class ReferenceVersionRulesEnumFactory implements EnumFactory<ReferenceVersionRules> {
626    public ReferenceVersionRules fromCode(String codeString) throws IllegalArgumentException {
627      if (codeString == null || "".equals(codeString))
628            if (codeString == null || "".equals(codeString))
629                return null;
630        if ("either".equals(codeString))
631          return ReferenceVersionRules.EITHER;
632        if ("independent".equals(codeString))
633          return ReferenceVersionRules.INDEPENDENT;
634        if ("specific".equals(codeString))
635          return ReferenceVersionRules.SPECIFIC;
636        throw new IllegalArgumentException("Unknown ReferenceVersionRules code '"+codeString+"'");
637        }
638        public Enumeration<ReferenceVersionRules> fromType(Base code) throws FHIRException {
639          if (code == null)
640            return null;
641          if (code.isEmpty())
642            return new Enumeration<ReferenceVersionRules>(this);
643          String codeString = ((PrimitiveType) code).asStringValue();
644          if (codeString == null || "".equals(codeString))
645            return null;
646        if ("either".equals(codeString))
647          return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.EITHER);
648        if ("independent".equals(codeString))
649          return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.INDEPENDENT);
650        if ("specific".equals(codeString))
651          return new Enumeration<ReferenceVersionRules>(this, ReferenceVersionRules.SPECIFIC);
652        throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'");
653        }
654    public String toCode(ReferenceVersionRules code) {
655      if (code == ReferenceVersionRules.EITHER)
656        return "either";
657      if (code == ReferenceVersionRules.INDEPENDENT)
658        return "independent";
659      if (code == ReferenceVersionRules.SPECIFIC)
660        return "specific";
661      return "?";
662      }
663    public String toSystem(ReferenceVersionRules code) {
664      return code.getSystem();
665      }
666    }
667
668    public enum SlicingRules {
669        /**
670         * No additional content is allowed other than that described by the slices in this profile.
671         */
672        CLOSED, 
673        /**
674         * Additional content is allowed anywhere in the list.
675         */
676        OPEN, 
677        /**
678         * 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.
679         */
680        OPENATEND, 
681        /**
682         * added to help the parsers with the generic types
683         */
684        NULL;
685        public static SlicingRules fromCode(String codeString) throws FHIRException {
686            if (codeString == null || "".equals(codeString))
687                return null;
688        if ("closed".equals(codeString))
689          return CLOSED;
690        if ("open".equals(codeString))
691          return OPEN;
692        if ("openAtEnd".equals(codeString))
693          return OPENATEND;
694        if (Configuration.isAcceptInvalidEnums())
695          return null;
696        else
697          throw new FHIRException("Unknown SlicingRules code '"+codeString+"'");
698        }
699        public String toCode() {
700          switch (this) {
701            case CLOSED: return "closed";
702            case OPEN: return "open";
703            case OPENATEND: return "openAtEnd";
704            case NULL: return null;
705            default: return "?";
706          }
707        }
708        public String getSystem() {
709          switch (this) {
710            case CLOSED: return "http://hl7.org/fhir/resource-slicing-rules";
711            case OPEN: return "http://hl7.org/fhir/resource-slicing-rules";
712            case OPENATEND: return "http://hl7.org/fhir/resource-slicing-rules";
713            case NULL: return null;
714            default: return "?";
715          }
716        }
717        public String getDefinition() {
718          switch (this) {
719            case CLOSED: return "No additional content is allowed other than that described by the slices in this profile.";
720            case OPEN: return "Additional content is allowed anywhere in the list.";
721            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.";
722            case NULL: return null;
723            default: return "?";
724          }
725        }
726        public String getDisplay() {
727          switch (this) {
728            case CLOSED: return "Closed";
729            case OPEN: return "Open";
730            case OPENATEND: return "Open at End";
731            case NULL: return null;
732            default: return "?";
733          }
734        }
735    }
736
737  public static class SlicingRulesEnumFactory implements EnumFactory<SlicingRules> {
738    public SlicingRules fromCode(String codeString) throws IllegalArgumentException {
739      if (codeString == null || "".equals(codeString))
740            if (codeString == null || "".equals(codeString))
741                return null;
742        if ("closed".equals(codeString))
743          return SlicingRules.CLOSED;
744        if ("open".equals(codeString))
745          return SlicingRules.OPEN;
746        if ("openAtEnd".equals(codeString))
747          return SlicingRules.OPENATEND;
748        throw new IllegalArgumentException("Unknown SlicingRules code '"+codeString+"'");
749        }
750        public Enumeration<SlicingRules> fromType(Base code) throws FHIRException {
751          if (code == null)
752            return null;
753          if (code.isEmpty())
754            return new Enumeration<SlicingRules>(this);
755          String codeString = ((PrimitiveType) code).asStringValue();
756          if (codeString == null || "".equals(codeString))
757            return null;
758        if ("closed".equals(codeString))
759          return new Enumeration<SlicingRules>(this, SlicingRules.CLOSED);
760        if ("open".equals(codeString))
761          return new Enumeration<SlicingRules>(this, SlicingRules.OPEN);
762        if ("openAtEnd".equals(codeString))
763          return new Enumeration<SlicingRules>(this, SlicingRules.OPENATEND);
764        throw new FHIRException("Unknown SlicingRules code '"+codeString+"'");
765        }
766    public String toCode(SlicingRules code) {
767      if (code == SlicingRules.CLOSED)
768        return "closed";
769      if (code == SlicingRules.OPEN)
770        return "open";
771      if (code == SlicingRules.OPENATEND)
772        return "openAtEnd";
773      return "?";
774      }
775    public String toSystem(SlicingRules code) {
776      return code.getSystem();
777      }
778    }
779
780    @Block()
781    public static class ElementDefinitionSlicingComponent extends Element implements IBaseDatatypeElement {
782        /**
783         * 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.
784         */
785        @Child(name = "discriminator", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
786        @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." )
787        protected List<ElementDefinitionSlicingDiscriminatorComponent> discriminator;
788
789        /**
790         * 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.
791         */
792        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
793        @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." )
794        protected StringType description;
795
796        /**
797         * If the matching elements have to occur in the same order as defined in the profile.
798         */
799        @Child(name = "ordered", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true)
800        @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." )
801        protected BooleanType ordered;
802
803        /**
804         * 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.
805         */
806        @Child(name = "rules", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=true)
807        @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." )
808        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-slicing-rules")
809        protected Enumeration<SlicingRules> rules;
810
811        private static final long serialVersionUID = -311635839L;
812
813    /**
814     * Constructor
815     */
816      public ElementDefinitionSlicingComponent() {
817        super();
818      }
819
820    /**
821     * Constructor
822     */
823      public ElementDefinitionSlicingComponent(SlicingRules rules) {
824        super();
825        this.setRules(rules);
826      }
827
828        /**
829         * @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.)
830         */
831        public List<ElementDefinitionSlicingDiscriminatorComponent> getDiscriminator() { 
832          if (this.discriminator == null)
833            this.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>();
834          return this.discriminator;
835        }
836
837        /**
838         * @return Returns a reference to <code>this</code> for easy method chaining
839         */
840        public ElementDefinitionSlicingComponent setDiscriminator(List<ElementDefinitionSlicingDiscriminatorComponent> theDiscriminator) { 
841          this.discriminator = theDiscriminator;
842          return this;
843        }
844
845        public boolean hasDiscriminator() { 
846          if (this.discriminator == null)
847            return false;
848          for (ElementDefinitionSlicingDiscriminatorComponent item : this.discriminator)
849            if (!item.isEmpty())
850              return true;
851          return false;
852        }
853
854        public ElementDefinitionSlicingDiscriminatorComponent addDiscriminator() { //3
855          ElementDefinitionSlicingDiscriminatorComponent t = new ElementDefinitionSlicingDiscriminatorComponent();
856          if (this.discriminator == null)
857            this.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>();
858          this.discriminator.add(t);
859          return t;
860        }
861
862        public ElementDefinitionSlicingComponent addDiscriminator(ElementDefinitionSlicingDiscriminatorComponent t) { //3
863          if (t == null)
864            return this;
865          if (this.discriminator == null)
866            this.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>();
867          this.discriminator.add(t);
868          return this;
869        }
870
871        /**
872         * @return The first repetition of repeating field {@link #discriminator}, creating it if it does not already exist {3}
873         */
874        public ElementDefinitionSlicingDiscriminatorComponent getDiscriminatorFirstRep() { 
875          if (getDiscriminator().isEmpty()) {
876            addDiscriminator();
877          }
878          return getDiscriminator().get(0);
879        }
880
881        /**
882         * @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
883         */
884        public StringType getDescriptionElement() { 
885          if (this.description == null)
886            if (Configuration.errorOnAutoCreate())
887              throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.description");
888            else if (Configuration.doAutoCreate())
889              this.description = new StringType(); // bb
890          return this.description;
891        }
892
893        public boolean hasDescriptionElement() { 
894          return this.description != null && !this.description.isEmpty();
895        }
896
897        public boolean hasDescription() { 
898          return this.description != null && !this.description.isEmpty();
899        }
900
901        /**
902         * @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
903         */
904        public ElementDefinitionSlicingComponent setDescriptionElement(StringType value) { 
905          this.description = value;
906          return this;
907        }
908
909        /**
910         * @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.
911         */
912        public String getDescription() { 
913          return this.description == null ? null : this.description.getValue();
914        }
915
916        /**
917         * @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.
918         */
919        public ElementDefinitionSlicingComponent setDescription(String value) { 
920          if (Utilities.noString(value))
921            this.description = null;
922          else {
923            if (this.description == null)
924              this.description = new StringType();
925            this.description.setValue(value);
926          }
927          return this;
928        }
929
930        /**
931         * @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
932         */
933        public BooleanType getOrderedElement() { 
934          if (this.ordered == null)
935            if (Configuration.errorOnAutoCreate())
936              throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.ordered");
937            else if (Configuration.doAutoCreate())
938              this.ordered = new BooleanType(); // bb
939          return this.ordered;
940        }
941
942        public boolean hasOrderedElement() { 
943          return this.ordered != null && !this.ordered.isEmpty();
944        }
945
946        public boolean hasOrdered() { 
947          return this.ordered != null && !this.ordered.isEmpty();
948        }
949
950        /**
951         * @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
952         */
953        public ElementDefinitionSlicingComponent setOrderedElement(BooleanType value) { 
954          this.ordered = value;
955          return this;
956        }
957
958        /**
959         * @return If the matching elements have to occur in the same order as defined in the profile.
960         */
961        public boolean getOrdered() { 
962          return this.ordered == null || this.ordered.isEmpty() ? false : this.ordered.getValue();
963        }
964
965        /**
966         * @param value If the matching elements have to occur in the same order as defined in the profile.
967         */
968        public ElementDefinitionSlicingComponent setOrdered(boolean value) { 
969            if (this.ordered == null)
970              this.ordered = new BooleanType();
971            this.ordered.setValue(value);
972          return this;
973        }
974
975        /**
976         * @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
977         */
978        public Enumeration<SlicingRules> getRulesElement() { 
979          if (this.rules == null)
980            if (Configuration.errorOnAutoCreate())
981              throw new Error("Attempt to auto-create ElementDefinitionSlicingComponent.rules");
982            else if (Configuration.doAutoCreate())
983              this.rules = new Enumeration<SlicingRules>(new SlicingRulesEnumFactory()); // bb
984          return this.rules;
985        }
986
987        public boolean hasRulesElement() { 
988          return this.rules != null && !this.rules.isEmpty();
989        }
990
991        public boolean hasRules() { 
992          return this.rules != null && !this.rules.isEmpty();
993        }
994
995        /**
996         * @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
997         */
998        public ElementDefinitionSlicingComponent setRulesElement(Enumeration<SlicingRules> value) { 
999          this.rules = value;
1000          return this;
1001        }
1002
1003        /**
1004         * @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.
1005         */
1006        public SlicingRules getRules() { 
1007          return this.rules == null ? null : this.rules.getValue();
1008        }
1009
1010        /**
1011         * @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.
1012         */
1013        public ElementDefinitionSlicingComponent setRules(SlicingRules value) { 
1014            if (this.rules == null)
1015              this.rules = new Enumeration<SlicingRules>(new SlicingRulesEnumFactory());
1016            this.rules.setValue(value);
1017          return this;
1018        }
1019
1020        protected void listChildren(List<Property> children) {
1021          super.listChildren(children);
1022          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));
1023          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));
1024          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));
1025          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));
1026        }
1027
1028        @Override
1029        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1030          switch (_hash) {
1031          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);
1032          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);
1033          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);
1034          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);
1035          default: return super.getNamedProperty(_hash, _name, _checkValid);
1036          }
1037
1038        }
1039
1040      @Override
1041      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1042        switch (hash) {
1043        case -1888270692: /*discriminator*/ return this.discriminator == null ? new Base[0] : this.discriminator.toArray(new Base[this.discriminator.size()]); // ElementDefinitionSlicingDiscriminatorComponent
1044        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1045        case -1207109523: /*ordered*/ return this.ordered == null ? new Base[0] : new Base[] {this.ordered}; // BooleanType
1046        case 108873975: /*rules*/ return this.rules == null ? new Base[0] : new Base[] {this.rules}; // Enumeration<SlicingRules>
1047        default: return super.getProperty(hash, name, checkValid);
1048        }
1049
1050      }
1051
1052      @Override
1053      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1054        switch (hash) {
1055        case -1888270692: // discriminator
1056          this.getDiscriminator().add((ElementDefinitionSlicingDiscriminatorComponent) value); // ElementDefinitionSlicingDiscriminatorComponent
1057          return value;
1058        case -1724546052: // description
1059          this.description = TypeConvertor.castToString(value); // StringType
1060          return value;
1061        case -1207109523: // ordered
1062          this.ordered = TypeConvertor.castToBoolean(value); // BooleanType
1063          return value;
1064        case 108873975: // rules
1065          value = new SlicingRulesEnumFactory().fromType(TypeConvertor.castToCode(value));
1066          this.rules = (Enumeration) value; // Enumeration<SlicingRules>
1067          return value;
1068        default: return super.setProperty(hash, name, value);
1069        }
1070
1071      }
1072
1073      @Override
1074      public Base setProperty(String name, Base value) throws FHIRException {
1075        if (name.equals("discriminator")) {
1076          this.getDiscriminator().add((ElementDefinitionSlicingDiscriminatorComponent) value);
1077        } else if (name.equals("description")) {
1078          this.description = TypeConvertor.castToString(value); // StringType
1079        } else if (name.equals("ordered")) {
1080          this.ordered = TypeConvertor.castToBoolean(value); // BooleanType
1081        } else if (name.equals("rules")) {
1082          value = new SlicingRulesEnumFactory().fromType(TypeConvertor.castToCode(value));
1083          this.rules = (Enumeration) value; // Enumeration<SlicingRules>
1084        } else
1085          return super.setProperty(name, value);
1086        return value;
1087      }
1088
1089      @Override
1090      public Base makeProperty(int hash, String name) throws FHIRException {
1091        switch (hash) {
1092        case -1888270692:  return addDiscriminator(); 
1093        case -1724546052:  return getDescriptionElement();
1094        case -1207109523:  return getOrderedElement();
1095        case 108873975:  return getRulesElement();
1096        default: return super.makeProperty(hash, name);
1097        }
1098
1099      }
1100
1101      @Override
1102      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1103        switch (hash) {
1104        case -1888270692: /*discriminator*/ return new String[] {};
1105        case -1724546052: /*description*/ return new String[] {"string"};
1106        case -1207109523: /*ordered*/ return new String[] {"boolean"};
1107        case 108873975: /*rules*/ return new String[] {"code"};
1108        default: return super.getTypesForProperty(hash, name);
1109        }
1110
1111      }
1112
1113      @Override
1114      public Base addChild(String name) throws FHIRException {
1115        if (name.equals("discriminator")) {
1116          return addDiscriminator();
1117        }
1118        else if (name.equals("description")) {
1119          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.slicing.description");
1120        }
1121        else if (name.equals("ordered")) {
1122          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.slicing.ordered");
1123        }
1124        else if (name.equals("rules")) {
1125          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.slicing.rules");
1126        }
1127        else
1128          return super.addChild(name);
1129      }
1130
1131      public ElementDefinitionSlicingComponent copy() {
1132        ElementDefinitionSlicingComponent dst = new ElementDefinitionSlicingComponent();
1133        copyValues(dst);
1134        return dst;
1135      }
1136
1137      public void copyValues(ElementDefinitionSlicingComponent dst) {
1138        super.copyValues(dst);
1139        if (discriminator != null) {
1140          dst.discriminator = new ArrayList<ElementDefinitionSlicingDiscriminatorComponent>();
1141          for (ElementDefinitionSlicingDiscriminatorComponent i : discriminator)
1142            dst.discriminator.add(i.copy());
1143        };
1144        dst.description = description == null ? null : description.copy();
1145        dst.ordered = ordered == null ? null : ordered.copy();
1146        dst.rules = rules == null ? null : rules.copy();
1147      }
1148
1149      @Override
1150      public boolean equalsDeep(Base other_) {
1151        if (!super.equalsDeep(other_))
1152          return false;
1153        if (!(other_ instanceof ElementDefinitionSlicingComponent))
1154          return false;
1155        ElementDefinitionSlicingComponent o = (ElementDefinitionSlicingComponent) other_;
1156        return compareDeep(discriminator, o.discriminator, true) && compareDeep(description, o.description, true)
1157           && compareDeep(ordered, o.ordered, true) && compareDeep(rules, o.rules, true);
1158      }
1159
1160      @Override
1161      public boolean equalsShallow(Base other_) {
1162        if (!super.equalsShallow(other_))
1163          return false;
1164        if (!(other_ instanceof ElementDefinitionSlicingComponent))
1165          return false;
1166        ElementDefinitionSlicingComponent o = (ElementDefinitionSlicingComponent) other_;
1167        return compareValues(description, o.description, true) && compareValues(ordered, o.ordered, true) && compareValues(rules, o.rules, true)
1168          ;
1169      }
1170
1171      public boolean isEmpty() {
1172        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(discriminator, description
1173          , ordered, rules);
1174      }
1175
1176  public String fhirType() {
1177    return "ElementDefinition.slicing";
1178
1179  }
1180
1181  }
1182
1183    @Block()
1184    public static class ElementDefinitionSlicingDiscriminatorComponent extends Element implements IBaseDatatypeElement {
1185        /**
1186         * How the element value is interpreted when discrimination is evaluated.
1187         */
1188        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1189        @Description(shortDefinition="value | exists | pattern | type | profile", formalDefinition="How the element value is interpreted when discrimination is evaluated." )
1190        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/discriminator-type")
1191        protected Enumeration<DiscriminatorType> type;
1192
1193        /**
1194         * A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.
1195         */
1196        @Child(name = "path", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true)
1197        @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." )
1198        protected StringType path;
1199
1200        private static final long serialVersionUID = 1151159293L;
1201
1202    /**
1203     * Constructor
1204     */
1205      public ElementDefinitionSlicingDiscriminatorComponent() {
1206        super();
1207      }
1208
1209    /**
1210     * Constructor
1211     */
1212      public ElementDefinitionSlicingDiscriminatorComponent(DiscriminatorType type, String path) {
1213        super();
1214        this.setType(type);
1215        this.setPath(path);
1216      }
1217
1218        /**
1219         * @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
1220         */
1221        public Enumeration<DiscriminatorType> getTypeElement() { 
1222          if (this.type == null)
1223            if (Configuration.errorOnAutoCreate())
1224              throw new Error("Attempt to auto-create ElementDefinitionSlicingDiscriminatorComponent.type");
1225            else if (Configuration.doAutoCreate())
1226              this.type = new Enumeration<DiscriminatorType>(new DiscriminatorTypeEnumFactory()); // bb
1227          return this.type;
1228        }
1229
1230        public boolean hasTypeElement() { 
1231          return this.type != null && !this.type.isEmpty();
1232        }
1233
1234        public boolean hasType() { 
1235          return this.type != null && !this.type.isEmpty();
1236        }
1237
1238        /**
1239         * @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
1240         */
1241        public ElementDefinitionSlicingDiscriminatorComponent setTypeElement(Enumeration<DiscriminatorType> value) { 
1242          this.type = value;
1243          return this;
1244        }
1245
1246        /**
1247         * @return How the element value is interpreted when discrimination is evaluated.
1248         */
1249        public DiscriminatorType getType() { 
1250          return this.type == null ? null : this.type.getValue();
1251        }
1252
1253        /**
1254         * @param value How the element value is interpreted when discrimination is evaluated.
1255         */
1256        public ElementDefinitionSlicingDiscriminatorComponent setType(DiscriminatorType value) { 
1257            if (this.type == null)
1258              this.type = new Enumeration<DiscriminatorType>(new DiscriminatorTypeEnumFactory());
1259            this.type.setValue(value);
1260          return this;
1261        }
1262
1263        /**
1264         * @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
1265         */
1266        public StringType getPathElement() { 
1267          if (this.path == null)
1268            if (Configuration.errorOnAutoCreate())
1269              throw new Error("Attempt to auto-create ElementDefinitionSlicingDiscriminatorComponent.path");
1270            else if (Configuration.doAutoCreate())
1271              this.path = new StringType(); // bb
1272          return this.path;
1273        }
1274
1275        public boolean hasPathElement() { 
1276          return this.path != null && !this.path.isEmpty();
1277        }
1278
1279        public boolean hasPath() { 
1280          return this.path != null && !this.path.isEmpty();
1281        }
1282
1283        /**
1284         * @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
1285         */
1286        public ElementDefinitionSlicingDiscriminatorComponent setPathElement(StringType value) { 
1287          this.path = value;
1288          return this;
1289        }
1290
1291        /**
1292         * @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.
1293         */
1294        public String getPath() { 
1295          return this.path == null ? null : this.path.getValue();
1296        }
1297
1298        /**
1299         * @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.
1300         */
1301        public ElementDefinitionSlicingDiscriminatorComponent setPath(String value) { 
1302            if (this.path == null)
1303              this.path = new StringType();
1304            this.path.setValue(value);
1305          return this;
1306        }
1307
1308        protected void listChildren(List<Property> children) {
1309          super.listChildren(children);
1310          children.add(new Property("type", "code", "How the element value is interpreted when discrimination is evaluated.", 0, 1, type));
1311          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));
1312        }
1313
1314        @Override
1315        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1316          switch (_hash) {
1317          case 3575610: /*type*/  return new Property("type", "code", "How the element value is interpreted when discrimination is evaluated.", 0, 1, type);
1318          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);
1319          default: return super.getNamedProperty(_hash, _name, _checkValid);
1320          }
1321
1322        }
1323
1324      @Override
1325      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1326        switch (hash) {
1327        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DiscriminatorType>
1328        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
1329        default: return super.getProperty(hash, name, checkValid);
1330        }
1331
1332      }
1333
1334      @Override
1335      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1336        switch (hash) {
1337        case 3575610: // type
1338          value = new DiscriminatorTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1339          this.type = (Enumeration) value; // Enumeration<DiscriminatorType>
1340          return value;
1341        case 3433509: // path
1342          this.path = TypeConvertor.castToString(value); // StringType
1343          return value;
1344        default: return super.setProperty(hash, name, value);
1345        }
1346
1347      }
1348
1349      @Override
1350      public Base setProperty(String name, Base value) throws FHIRException {
1351        if (name.equals("type")) {
1352          value = new DiscriminatorTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1353          this.type = (Enumeration) value; // Enumeration<DiscriminatorType>
1354        } else if (name.equals("path")) {
1355          this.path = TypeConvertor.castToString(value); // StringType
1356        } else
1357          return super.setProperty(name, value);
1358        return value;
1359      }
1360
1361      @Override
1362      public Base makeProperty(int hash, String name) throws FHIRException {
1363        switch (hash) {
1364        case 3575610:  return getTypeElement();
1365        case 3433509:  return getPathElement();
1366        default: return super.makeProperty(hash, name);
1367        }
1368
1369      }
1370
1371      @Override
1372      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1373        switch (hash) {
1374        case 3575610: /*type*/ return new String[] {"code"};
1375        case 3433509: /*path*/ return new String[] {"string"};
1376        default: return super.getTypesForProperty(hash, name);
1377        }
1378
1379      }
1380
1381      @Override
1382      public Base addChild(String name) throws FHIRException {
1383        if (name.equals("type")) {
1384          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.slicing.discriminator.type");
1385        }
1386        else if (name.equals("path")) {
1387          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.slicing.discriminator.path");
1388        }
1389        else
1390          return super.addChild(name);
1391      }
1392
1393      public ElementDefinitionSlicingDiscriminatorComponent copy() {
1394        ElementDefinitionSlicingDiscriminatorComponent dst = new ElementDefinitionSlicingDiscriminatorComponent();
1395        copyValues(dst);
1396        return dst;
1397      }
1398
1399      public void copyValues(ElementDefinitionSlicingDiscriminatorComponent dst) {
1400        super.copyValues(dst);
1401        dst.type = type == null ? null : type.copy();
1402        dst.path = path == null ? null : path.copy();
1403      }
1404
1405      @Override
1406      public boolean equalsDeep(Base other_) {
1407        if (!super.equalsDeep(other_))
1408          return false;
1409        if (!(other_ instanceof ElementDefinitionSlicingDiscriminatorComponent))
1410          return false;
1411        ElementDefinitionSlicingDiscriminatorComponent o = (ElementDefinitionSlicingDiscriminatorComponent) other_;
1412        return compareDeep(type, o.type, true) && compareDeep(path, o.path, true);
1413      }
1414
1415      @Override
1416      public boolean equalsShallow(Base other_) {
1417        if (!super.equalsShallow(other_))
1418          return false;
1419        if (!(other_ instanceof ElementDefinitionSlicingDiscriminatorComponent))
1420          return false;
1421        ElementDefinitionSlicingDiscriminatorComponent o = (ElementDefinitionSlicingDiscriminatorComponent) other_;
1422        return compareValues(type, o.type, true) && compareValues(path, o.path, true);
1423      }
1424
1425      public boolean isEmpty() {
1426        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, path);
1427      }
1428
1429  public String fhirType() {
1430    return "ElementDefinition.slicing.discriminator";
1431
1432  }
1433
1434  }
1435
1436    @Block()
1437    public static class ElementDefinitionBaseComponent extends Element implements IBaseDatatypeElement {
1438        /**
1439         * 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.
1440         */
1441        @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1442        @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." )
1443        protected StringType path;
1444
1445        /**
1446         * Minimum cardinality of the base element identified by the path.
1447         */
1448        @Child(name = "min", type = {UnsignedIntType.class}, order=2, min=1, max=1, modifier=false, summary=true)
1449        @Description(shortDefinition="Min cardinality of the base element", formalDefinition="Minimum cardinality of the base element identified by the path." )
1450        protected UnsignedIntType min;
1451
1452        /**
1453         * Maximum cardinality of the base element identified by the path.
1454         */
1455        @Child(name = "max", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1456        @Description(shortDefinition="Max cardinality of the base element", formalDefinition="Maximum cardinality of the base element identified by the path." )
1457        protected StringType max;
1458
1459        private static final long serialVersionUID = -1412704221L;
1460
1461    /**
1462     * Constructor
1463     */
1464      public ElementDefinitionBaseComponent() {
1465        super();
1466      }
1467
1468    /**
1469     * Constructor
1470     */
1471      public ElementDefinitionBaseComponent(String path, int min, String max) {
1472        super();
1473        this.setPath(path);
1474        this.setMin(min);
1475        this.setMax(max);
1476      }
1477
1478        /**
1479         * @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
1480         */
1481        public StringType getPathElement() { 
1482          if (this.path == null)
1483            if (Configuration.errorOnAutoCreate())
1484              throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.path");
1485            else if (Configuration.doAutoCreate())
1486              this.path = new StringType(); // bb
1487          return this.path;
1488        }
1489
1490        public boolean hasPathElement() { 
1491          return this.path != null && !this.path.isEmpty();
1492        }
1493
1494        public boolean hasPath() { 
1495          return this.path != null && !this.path.isEmpty();
1496        }
1497
1498        /**
1499         * @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
1500         */
1501        public ElementDefinitionBaseComponent setPathElement(StringType value) { 
1502          this.path = value;
1503          return this;
1504        }
1505
1506        /**
1507         * @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.
1508         */
1509        public String getPath() { 
1510          return this.path == null ? null : this.path.getValue();
1511        }
1512
1513        /**
1514         * @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.
1515         */
1516        public ElementDefinitionBaseComponent setPath(String value) { 
1517            if (this.path == null)
1518              this.path = new StringType();
1519            this.path.setValue(value);
1520          return this;
1521        }
1522
1523        /**
1524         * @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
1525         */
1526        public UnsignedIntType getMinElement() { 
1527          if (this.min == null)
1528            if (Configuration.errorOnAutoCreate())
1529              throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.min");
1530            else if (Configuration.doAutoCreate())
1531              this.min = new UnsignedIntType(); // bb
1532          return this.min;
1533        }
1534
1535        public boolean hasMinElement() { 
1536          return this.min != null && !this.min.isEmpty();
1537        }
1538
1539        public boolean hasMin() { 
1540          return this.min != null && !this.min.isEmpty();
1541        }
1542
1543        /**
1544         * @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
1545         */
1546        public ElementDefinitionBaseComponent setMinElement(UnsignedIntType value) { 
1547          this.min = value;
1548          return this;
1549        }
1550
1551        /**
1552         * @return Minimum cardinality of the base element identified by the path.
1553         */
1554        public int getMin() { 
1555          return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue();
1556        }
1557
1558        /**
1559         * @param value Minimum cardinality of the base element identified by the path.
1560         */
1561        public ElementDefinitionBaseComponent setMin(int value) { 
1562            if (this.min == null)
1563              this.min = new UnsignedIntType();
1564            this.min.setValue(value);
1565          return this;
1566        }
1567
1568        /**
1569         * @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
1570         */
1571        public StringType getMaxElement() { 
1572          if (this.max == null)
1573            if (Configuration.errorOnAutoCreate())
1574              throw new Error("Attempt to auto-create ElementDefinitionBaseComponent.max");
1575            else if (Configuration.doAutoCreate())
1576              this.max = new StringType(); // bb
1577          return this.max;
1578        }
1579
1580        public boolean hasMaxElement() { 
1581          return this.max != null && !this.max.isEmpty();
1582        }
1583
1584        public boolean hasMax() { 
1585          return this.max != null && !this.max.isEmpty();
1586        }
1587
1588        /**
1589         * @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
1590         */
1591        public ElementDefinitionBaseComponent setMaxElement(StringType value) { 
1592          this.max = value;
1593          return this;
1594        }
1595
1596        /**
1597         * @return Maximum cardinality of the base element identified by the path.
1598         */
1599        public String getMax() { 
1600          return this.max == null ? null : this.max.getValue();
1601        }
1602
1603        /**
1604         * @param value Maximum cardinality of the base element identified by the path.
1605         */
1606        public ElementDefinitionBaseComponent setMax(String value) { 
1607            if (this.max == null)
1608              this.max = new StringType();
1609            this.max.setValue(value);
1610          return this;
1611        }
1612
1613        protected void listChildren(List<Property> children) {
1614          super.listChildren(children);
1615          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));
1616          children.add(new Property("min", "unsignedInt", "Minimum cardinality of the base element identified by the path.", 0, 1, min));
1617          children.add(new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, 1, max));
1618        }
1619
1620        @Override
1621        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1622          switch (_hash) {
1623          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);
1624          case 108114: /*min*/  return new Property("min", "unsignedInt", "Minimum cardinality of the base element identified by the path.", 0, 1, min);
1625          case 107876: /*max*/  return new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, 1, max);
1626          default: return super.getNamedProperty(_hash, _name, _checkValid);
1627          }
1628
1629        }
1630
1631      @Override
1632      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1633        switch (hash) {
1634        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
1635        case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // UnsignedIntType
1636        case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
1637        default: return super.getProperty(hash, name, checkValid);
1638        }
1639
1640      }
1641
1642      @Override
1643      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1644        switch (hash) {
1645        case 3433509: // path
1646          this.path = TypeConvertor.castToString(value); // StringType
1647          return value;
1648        case 108114: // min
1649          this.min = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1650          return value;
1651        case 107876: // max
1652          this.max = TypeConvertor.castToString(value); // StringType
1653          return value;
1654        default: return super.setProperty(hash, name, value);
1655        }
1656
1657      }
1658
1659      @Override
1660      public Base setProperty(String name, Base value) throws FHIRException {
1661        if (name.equals("path")) {
1662          this.path = TypeConvertor.castToString(value); // StringType
1663        } else if (name.equals("min")) {
1664          this.min = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1665        } else if (name.equals("max")) {
1666          this.max = TypeConvertor.castToString(value); // StringType
1667        } else
1668          return super.setProperty(name, value);
1669        return value;
1670      }
1671
1672      @Override
1673      public Base makeProperty(int hash, String name) throws FHIRException {
1674        switch (hash) {
1675        case 3433509:  return getPathElement();
1676        case 108114:  return getMinElement();
1677        case 107876:  return getMaxElement();
1678        default: return super.makeProperty(hash, name);
1679        }
1680
1681      }
1682
1683      @Override
1684      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1685        switch (hash) {
1686        case 3433509: /*path*/ return new String[] {"string"};
1687        case 108114: /*min*/ return new String[] {"unsignedInt"};
1688        case 107876: /*max*/ return new String[] {"string"};
1689        default: return super.getTypesForProperty(hash, name);
1690        }
1691
1692      }
1693
1694      @Override
1695      public Base addChild(String name) throws FHIRException {
1696        if (name.equals("path")) {
1697          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.base.path");
1698        }
1699        else if (name.equals("min")) {
1700          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.base.min");
1701        }
1702        else if (name.equals("max")) {
1703          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.base.max");
1704        }
1705        else
1706          return super.addChild(name);
1707      }
1708
1709      public ElementDefinitionBaseComponent copy() {
1710        ElementDefinitionBaseComponent dst = new ElementDefinitionBaseComponent();
1711        copyValues(dst);
1712        return dst;
1713      }
1714
1715      public void copyValues(ElementDefinitionBaseComponent dst) {
1716        super.copyValues(dst);
1717        dst.path = path == null ? null : path.copy();
1718        dst.min = min == null ? null : min.copy();
1719        dst.max = max == null ? null : max.copy();
1720      }
1721
1722      @Override
1723      public boolean equalsDeep(Base other_) {
1724        if (!super.equalsDeep(other_))
1725          return false;
1726        if (!(other_ instanceof ElementDefinitionBaseComponent))
1727          return false;
1728        ElementDefinitionBaseComponent o = (ElementDefinitionBaseComponent) other_;
1729        return compareDeep(path, o.path, true) && compareDeep(min, o.min, true) && compareDeep(max, o.max, true)
1730          ;
1731      }
1732
1733      @Override
1734      public boolean equalsShallow(Base other_) {
1735        if (!super.equalsShallow(other_))
1736          return false;
1737        if (!(other_ instanceof ElementDefinitionBaseComponent))
1738          return false;
1739        ElementDefinitionBaseComponent o = (ElementDefinitionBaseComponent) other_;
1740        return compareValues(path, o.path, true) && compareValues(min, o.min, true) && compareValues(max, o.max, true)
1741          ;
1742      }
1743
1744      public boolean isEmpty() {
1745        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, min, max);
1746      }
1747
1748  public String fhirType() {
1749    return "ElementDefinition.base";
1750
1751  }
1752
1753  }
1754
1755    @Block()
1756    public static class TypeRefComponent extends Element implements IBaseDatatypeElement {
1757        /**
1758         * 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.
1759         */
1760        @Child(name = "code", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1761        @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." )
1762        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types")
1763        protected UriType code;
1764
1765        /**
1766         * 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.
1767         */
1768        @Child(name = "profile", type = {CanonicalType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1769        @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." )
1770        protected List<CanonicalType> profile;
1771
1772        /**
1773         * 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.
1774         */
1775        @Child(name = "targetProfile", type = {CanonicalType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1776        @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." )
1777        protected List<CanonicalType> targetProfile;
1778
1779        /**
1780         * 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.
1781         */
1782        @Child(name = "aggregation", type = {CodeType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1783        @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." )
1784        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-aggregation-mode")
1785        protected List<Enumeration<AggregationMode>> aggregation;
1786
1787        /**
1788         * Whether this reference needs to be version specific or version independent, or whether either can be used.
1789         */
1790        @Child(name = "versioning", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1791        @Description(shortDefinition="either | independent | specific", formalDefinition="Whether this reference needs to be version specific or version independent, or whether either can be used." )
1792        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reference-version-rules")
1793        protected Enumeration<ReferenceVersionRules> versioning;
1794
1795        private static final long serialVersionUID = 957891653L;
1796
1797    /**
1798     * Constructor
1799     */
1800      public TypeRefComponent() {
1801        super();
1802      }
1803
1804    /**
1805     * Constructor
1806     */
1807      public TypeRefComponent(String code) {
1808        super();
1809        this.setCode(code);
1810      }
1811
1812        /**
1813         * @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
1814         */
1815        public UriType getCodeElement() { 
1816          if (this.code == null)
1817            if (Configuration.errorOnAutoCreate())
1818              throw new Error("Attempt to auto-create TypeRefComponent.code");
1819            else if (Configuration.doAutoCreate())
1820              this.code = new UriType(); // bb
1821          return this.code;
1822        }
1823
1824        public boolean hasCodeElement() { 
1825          return this.code != null && !this.code.isEmpty();
1826        }
1827
1828        public boolean hasCode() { 
1829          return this.code != null && !this.code.isEmpty();
1830        }
1831
1832        /**
1833         * @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
1834         */
1835        public TypeRefComponent setCodeElement(UriType value) { 
1836          this.code = value;
1837          return this;
1838        }
1839
1840        /**
1841         * @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.
1842         */
1843        public String getCode() { 
1844          return this.code == null ? null : this.code.getValue();
1845        }
1846
1847        /**
1848         * @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.
1849         */
1850        public TypeRefComponent setCode(String value) { 
1851            if (this.code == null)
1852              this.code = new UriType();
1853            this.code.setValue(value);
1854          return this;
1855        }
1856
1857        /**
1858         * @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.)
1859         */
1860        public List<CanonicalType> getProfile() { 
1861          if (this.profile == null)
1862            this.profile = new ArrayList<CanonicalType>();
1863          return this.profile;
1864        }
1865
1866        /**
1867         * @return Returns a reference to <code>this</code> for easy method chaining
1868         */
1869        public TypeRefComponent setProfile(List<CanonicalType> theProfile) { 
1870          this.profile = theProfile;
1871          return this;
1872        }
1873
1874        public boolean hasProfile() { 
1875          if (this.profile == null)
1876            return false;
1877          for (CanonicalType item : this.profile)
1878            if (!item.isEmpty())
1879              return true;
1880          return false;
1881        }
1882
1883        /**
1884         * @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.)
1885         */
1886        public CanonicalType addProfileElement() {//2 
1887          CanonicalType t = new CanonicalType();
1888          if (this.profile == null)
1889            this.profile = new ArrayList<CanonicalType>();
1890          this.profile.add(t);
1891          return t;
1892        }
1893
1894        /**
1895         * @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.)
1896         */
1897        public TypeRefComponent addProfile(String value) { //1
1898          CanonicalType t = new CanonicalType();
1899          t.setValue(value);
1900          if (this.profile == null)
1901            this.profile = new ArrayList<CanonicalType>();
1902          this.profile.add(t);
1903          return this;
1904        }
1905
1906        /**
1907         * @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.)
1908         */
1909        public boolean hasProfile(String value) { 
1910          if (this.profile == null)
1911            return false;
1912          for (CanonicalType v : this.profile)
1913            if (v.getValue().equals(value)) // canonical
1914              return true;
1915          return false;
1916        }
1917
1918        /**
1919         * @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.)
1920         */
1921        public List<CanonicalType> getTargetProfile() { 
1922          if (this.targetProfile == null)
1923            this.targetProfile = new ArrayList<CanonicalType>();
1924          return this.targetProfile;
1925        }
1926
1927        /**
1928         * @return Returns a reference to <code>this</code> for easy method chaining
1929         */
1930        public TypeRefComponent setTargetProfile(List<CanonicalType> theTargetProfile) { 
1931          this.targetProfile = theTargetProfile;
1932          return this;
1933        }
1934
1935        public boolean hasTargetProfile() { 
1936          if (this.targetProfile == null)
1937            return false;
1938          for (CanonicalType item : this.targetProfile)
1939            if (!item.isEmpty())
1940              return true;
1941          return false;
1942        }
1943
1944        /**
1945         * @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.)
1946         */
1947        public CanonicalType addTargetProfileElement() {//2 
1948          CanonicalType t = new CanonicalType();
1949          if (this.targetProfile == null)
1950            this.targetProfile = new ArrayList<CanonicalType>();
1951          this.targetProfile.add(t);
1952          return t;
1953        }
1954
1955        /**
1956         * @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.)
1957         */
1958        public TypeRefComponent addTargetProfile(String value) { //1
1959          CanonicalType t = new CanonicalType();
1960          t.setValue(value);
1961          if (this.targetProfile == null)
1962            this.targetProfile = new ArrayList<CanonicalType>();
1963          this.targetProfile.add(t);
1964          return this;
1965        }
1966
1967        /**
1968         * @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.)
1969         */
1970        public boolean hasTargetProfile(String value) { 
1971          if (this.targetProfile == null)
1972            return false;
1973          for (CanonicalType v : this.targetProfile)
1974            if (v.getValue().equals(value)) // canonical
1975              return true;
1976          return false;
1977        }
1978
1979        /**
1980         * @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.)
1981         */
1982        public List<Enumeration<AggregationMode>> getAggregation() { 
1983          if (this.aggregation == null)
1984            this.aggregation = new ArrayList<Enumeration<AggregationMode>>();
1985          return this.aggregation;
1986        }
1987
1988        /**
1989         * @return Returns a reference to <code>this</code> for easy method chaining
1990         */
1991        public TypeRefComponent setAggregation(List<Enumeration<AggregationMode>> theAggregation) { 
1992          this.aggregation = theAggregation;
1993          return this;
1994        }
1995
1996        public boolean hasAggregation() { 
1997          if (this.aggregation == null)
1998            return false;
1999          for (Enumeration<AggregationMode> item : this.aggregation)
2000            if (!item.isEmpty())
2001              return true;
2002          return false;
2003        }
2004
2005        /**
2006         * @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.)
2007         */
2008        public Enumeration<AggregationMode> addAggregationElement() {//2 
2009          Enumeration<AggregationMode> t = new Enumeration<AggregationMode>(new AggregationModeEnumFactory());
2010          if (this.aggregation == null)
2011            this.aggregation = new ArrayList<Enumeration<AggregationMode>>();
2012          this.aggregation.add(t);
2013          return t;
2014        }
2015
2016        /**
2017         * @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.)
2018         */
2019        public TypeRefComponent addAggregation(AggregationMode value) { //1
2020          Enumeration<AggregationMode> t = new Enumeration<AggregationMode>(new AggregationModeEnumFactory());
2021          t.setValue(value);
2022          if (this.aggregation == null)
2023            this.aggregation = new ArrayList<Enumeration<AggregationMode>>();
2024          this.aggregation.add(t);
2025          return this;
2026        }
2027
2028        /**
2029         * @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.)
2030         */
2031        public boolean hasAggregation(AggregationMode value) { 
2032          if (this.aggregation == null)
2033            return false;
2034          for (Enumeration<AggregationMode> v : this.aggregation)
2035            if (v.getValue().equals(value)) // code
2036              return true;
2037          return false;
2038        }
2039
2040        /**
2041         * @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
2042         */
2043        public Enumeration<ReferenceVersionRules> getVersioningElement() { 
2044          if (this.versioning == null)
2045            if (Configuration.errorOnAutoCreate())
2046              throw new Error("Attempt to auto-create TypeRefComponent.versioning");
2047            else if (Configuration.doAutoCreate())
2048              this.versioning = new Enumeration<ReferenceVersionRules>(new ReferenceVersionRulesEnumFactory()); // bb
2049          return this.versioning;
2050        }
2051
2052        public boolean hasVersioningElement() { 
2053          return this.versioning != null && !this.versioning.isEmpty();
2054        }
2055
2056        public boolean hasVersioning() { 
2057          return this.versioning != null && !this.versioning.isEmpty();
2058        }
2059
2060        /**
2061         * @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
2062         */
2063        public TypeRefComponent setVersioningElement(Enumeration<ReferenceVersionRules> value) { 
2064          this.versioning = value;
2065          return this;
2066        }
2067
2068        /**
2069         * @return Whether this reference needs to be version specific or version independent, or whether either can be used.
2070         */
2071        public ReferenceVersionRules getVersioning() { 
2072          return this.versioning == null ? null : this.versioning.getValue();
2073        }
2074
2075        /**
2076         * @param value Whether this reference needs to be version specific or version independent, or whether either can be used.
2077         */
2078        public TypeRefComponent setVersioning(ReferenceVersionRules value) { 
2079          if (value == null)
2080            this.versioning = null;
2081          else {
2082            if (this.versioning == null)
2083              this.versioning = new Enumeration<ReferenceVersionRules>(new ReferenceVersionRulesEnumFactory());
2084            this.versioning.setValue(value);
2085          }
2086          return this;
2087        }
2088
2089        protected void listChildren(List<Property> children) {
2090          super.listChildren(children);
2091          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));
2092          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));
2093          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));
2094          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));
2095          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));
2096        }
2097
2098        @Override
2099        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2100          switch (_hash) {
2101          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);
2102          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);
2103          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);
2104          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);
2105          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);
2106          default: return super.getNamedProperty(_hash, _name, _checkValid);
2107          }
2108
2109        }
2110
2111      @Override
2112      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2113        switch (hash) {
2114        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // UriType
2115        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // CanonicalType
2116        case 1994521304: /*targetProfile*/ return this.targetProfile == null ? new Base[0] : this.targetProfile.toArray(new Base[this.targetProfile.size()]); // CanonicalType
2117        case 841524962: /*aggregation*/ return this.aggregation == null ? new Base[0] : this.aggregation.toArray(new Base[this.aggregation.size()]); // Enumeration<AggregationMode>
2118        case -670487542: /*versioning*/ return this.versioning == null ? new Base[0] : new Base[] {this.versioning}; // Enumeration<ReferenceVersionRules>
2119        default: return super.getProperty(hash, name, checkValid);
2120        }
2121
2122      }
2123
2124      @Override
2125      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2126        switch (hash) {
2127        case 3059181: // code
2128          this.code = TypeConvertor.castToUri(value); // UriType
2129          return value;
2130        case -309425751: // profile
2131          this.getProfile().add(TypeConvertor.castToCanonical(value)); // CanonicalType
2132          return value;
2133        case 1994521304: // targetProfile
2134          this.getTargetProfile().add(TypeConvertor.castToCanonical(value)); // CanonicalType
2135          return value;
2136        case 841524962: // aggregation
2137          value = new AggregationModeEnumFactory().fromType(TypeConvertor.castToCode(value));
2138          this.getAggregation().add((Enumeration) value); // Enumeration<AggregationMode>
2139          return value;
2140        case -670487542: // versioning
2141          value = new ReferenceVersionRulesEnumFactory().fromType(TypeConvertor.castToCode(value));
2142          this.versioning = (Enumeration) value; // Enumeration<ReferenceVersionRules>
2143          return value;
2144        default: return super.setProperty(hash, name, value);
2145        }
2146
2147      }
2148
2149      @Override
2150      public Base setProperty(String name, Base value) throws FHIRException {
2151        if (name.equals("code")) {
2152          this.code = TypeConvertor.castToUri(value); // UriType
2153        } else if (name.equals("profile")) {
2154          this.getProfile().add(TypeConvertor.castToCanonical(value));
2155        } else if (name.equals("targetProfile")) {
2156          this.getTargetProfile().add(TypeConvertor.castToCanonical(value));
2157        } else if (name.equals("aggregation")) {
2158          value = new AggregationModeEnumFactory().fromType(TypeConvertor.castToCode(value));
2159          this.getAggregation().add((Enumeration) value);
2160        } else if (name.equals("versioning")) {
2161          value = new ReferenceVersionRulesEnumFactory().fromType(TypeConvertor.castToCode(value));
2162          this.versioning = (Enumeration) value; // Enumeration<ReferenceVersionRules>
2163        } else
2164          return super.setProperty(name, value);
2165        return value;
2166      }
2167
2168      @Override
2169      public Base makeProperty(int hash, String name) throws FHIRException {
2170        switch (hash) {
2171        case 3059181:  return getCodeElement();
2172        case -309425751:  return addProfileElement();
2173        case 1994521304:  return addTargetProfileElement();
2174        case 841524962:  return addAggregationElement();
2175        case -670487542:  return getVersioningElement();
2176        default: return super.makeProperty(hash, name);
2177        }
2178
2179      }
2180
2181      @Override
2182      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2183        switch (hash) {
2184        case 3059181: /*code*/ return new String[] {"uri"};
2185        case -309425751: /*profile*/ return new String[] {"canonical"};
2186        case 1994521304: /*targetProfile*/ return new String[] {"canonical"};
2187        case 841524962: /*aggregation*/ return new String[] {"code"};
2188        case -670487542: /*versioning*/ return new String[] {"code"};
2189        default: return super.getTypesForProperty(hash, name);
2190        }
2191
2192      }
2193
2194      @Override
2195      public Base addChild(String name) throws FHIRException {
2196        if (name.equals("code")) {
2197          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.type.code");
2198        }
2199        else if (name.equals("profile")) {
2200          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.type.profile");
2201        }
2202        else if (name.equals("targetProfile")) {
2203          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.type.targetProfile");
2204        }
2205        else if (name.equals("aggregation")) {
2206          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.type.aggregation");
2207        }
2208        else if (name.equals("versioning")) {
2209          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.type.versioning");
2210        }
2211        else
2212          return super.addChild(name);
2213      }
2214
2215      public TypeRefComponent copy() {
2216        TypeRefComponent dst = new TypeRefComponent();
2217        copyValues(dst);
2218        return dst;
2219      }
2220
2221      public void copyValues(TypeRefComponent dst) {
2222        super.copyValues(dst);
2223        dst.code = code == null ? null : code.copy();
2224        if (profile != null) {
2225          dst.profile = new ArrayList<CanonicalType>();
2226          for (CanonicalType i : profile)
2227            dst.profile.add(i.copy());
2228        };
2229        if (targetProfile != null) {
2230          dst.targetProfile = new ArrayList<CanonicalType>();
2231          for (CanonicalType i : targetProfile)
2232            dst.targetProfile.add(i.copy());
2233        };
2234        if (aggregation != null) {
2235          dst.aggregation = new ArrayList<Enumeration<AggregationMode>>();
2236          for (Enumeration<AggregationMode> i : aggregation)
2237            dst.aggregation.add(i.copy());
2238        };
2239        dst.versioning = versioning == null ? null : versioning.copy();
2240      }
2241
2242      @Override
2243      public boolean equalsDeep(Base other_) {
2244        if (!super.equalsDeep(other_))
2245          return false;
2246        if (!(other_ instanceof TypeRefComponent))
2247          return false;
2248        TypeRefComponent o = (TypeRefComponent) other_;
2249        return compareDeep(code, o.code, true) && compareDeep(profile, o.profile, true) && compareDeep(targetProfile, o.targetProfile, true)
2250           && compareDeep(aggregation, o.aggregation, true) && compareDeep(versioning, o.versioning, true)
2251          ;
2252      }
2253
2254      @Override
2255      public boolean equalsShallow(Base other_) {
2256        if (!super.equalsShallow(other_))
2257          return false;
2258        if (!(other_ instanceof TypeRefComponent))
2259          return false;
2260        TypeRefComponent o = (TypeRefComponent) other_;
2261        return compareValues(code, o.code, true) && compareValues(profile, o.profile, true) && compareValues(targetProfile, o.targetProfile, true)
2262           && compareValues(aggregation, o.aggregation, true) && compareValues(versioning, o.versioning, true)
2263          ;
2264      }
2265
2266      public boolean isEmpty() {
2267        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, profile, targetProfile
2268          , aggregation, versioning);
2269      }
2270
2271  public String fhirType() {
2272    return "ElementDefinition.type";
2273
2274  }
2275
2276// added from java-adornments.txt:
2277public boolean hasTarget() {
2278    return Utilities.existsInList(getCode(), "Reference", "canonical", "CodeableReference");
2279  }
2280  
2281    /**
2282   * This code checks for the system prefix and returns the FHIR type
2283   * 
2284   * @return
2285   */
2286  public String getWorkingCode() {
2287    if (hasExtension(ToolingExtensions.EXT_FHIR_TYPE))
2288      return getExtensionString(ToolingExtensions.EXT_FHIR_TYPE);
2289    if (!hasCodeElement()) 
2290      return null;
2291    if (getCodeElement().hasExtension(ToolingExtensions.EXT_XML_TYPE)) {
2292      String s = getCodeElement().getExtensionString(ToolingExtensions.EXT_XML_TYPE);
2293      if ("xsd:gYear OR xsd:gYearMonth OR xsd:date OR xsd:dateTime".equalsIgnoreCase(s))
2294        return "dateTime";
2295      if ("xsd:gYear OR xsd:gYearMonth OR xsd:date".equalsIgnoreCase(s))
2296        return "date";
2297      if ("xsd:dateTime".equalsIgnoreCase(s))
2298        return "instant";
2299      if ("xsd:token".equals(s))
2300        return "code";
2301      if ("xsd:boolean".equals(s))
2302        return "boolean";
2303      if ("xsd:string".equals(s))
2304        return "string";
2305      if ("xsd:time".equals(s))
2306        return "time";
2307      if ("xsd:int".equals(s))
2308        return "integer";
2309      if ("xsd:decimal OR xsd:double".equals(s))
2310        return "decimal";
2311      if ("xsd:decimal".equalsIgnoreCase(s))
2312        return "decimal";
2313      if ("xsd:base64Binary".equalsIgnoreCase(s))
2314        return "base64Binary";
2315      if ("xsd:positiveInteger".equalsIgnoreCase(s))
2316        return "positiveInt";
2317      if ("xsd:nonNegativeInteger".equalsIgnoreCase(s))
2318        return "unsignedInt";
2319      if ("xsd:anyURI".equalsIgnoreCase(s))
2320        return "uri";
2321      
2322      throw new Error("Unknown xml type '"+s+"'");
2323    }
2324    return getCode();
2325  }
2326
2327  @Override
2328  public String toString() {
2329    String res = getCode();
2330    if (hasProfile()) {
2331      res = res + "{";
2332      boolean first = true;
2333      for (CanonicalType s : getProfile()) {
2334        if (first) first = false; else res = res + "|";
2335        res = res + s.getValue();
2336      }
2337      res = res + "}";
2338    }
2339    if (hasTargetProfile()) {
2340      res = res + "->(";
2341      boolean first = true;
2342      for (CanonicalType s : getTargetProfile()) {
2343        if (first) first = false; else res = res + "|";
2344        res = res + s.getValue();
2345      }
2346      res = res + ")";
2347    }    
2348    return res;
2349  }
2350
2351  public String getName() {
2352    return getWorkingCode();
2353  }
2354
2355  public boolean isResourceReference() {
2356    return "Reference".equals(getCode()) && hasTargetProfile();
2357  }
2358// end addition
2359  }
2360
2361    @Block()
2362    public static class ElementDefinitionExampleComponent extends Element implements IBaseDatatypeElement {
2363        /**
2364         * Describes the purpose of this example amoung the set of examples.
2365         */
2366        @Child(name = "label", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
2367        @Description(shortDefinition="Describes the purpose of this example", formalDefinition="Describes the purpose of this example amoung the set of examples." )
2368        protected StringType label;
2369
2370        /**
2371         * The actual value for the element, which must be one of the types allowed for this element.
2372         */
2373        @Child(name = "value", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.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, Contributor.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Dosage.class, Meta.class}, order=2, min=1, max=1, modifier=false, summary=true)
2374        @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." )
2375        protected DataType value;
2376
2377        private static final long serialVersionUID = 463190922L;
2378
2379    /**
2380     * Constructor
2381     */
2382      public ElementDefinitionExampleComponent() {
2383        super();
2384      }
2385
2386    /**
2387     * Constructor
2388     */
2389      public ElementDefinitionExampleComponent(String label, DataType value) {
2390        super();
2391        this.setLabel(label);
2392        this.setValue(value);
2393      }
2394
2395        /**
2396         * @return {@link #label} (Describes the purpose of this example amoung the set of examples.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
2397         */
2398        public StringType getLabelElement() { 
2399          if (this.label == null)
2400            if (Configuration.errorOnAutoCreate())
2401              throw new Error("Attempt to auto-create ElementDefinitionExampleComponent.label");
2402            else if (Configuration.doAutoCreate())
2403              this.label = new StringType(); // bb
2404          return this.label;
2405        }
2406
2407        public boolean hasLabelElement() { 
2408          return this.label != null && !this.label.isEmpty();
2409        }
2410
2411        public boolean hasLabel() { 
2412          return this.label != null && !this.label.isEmpty();
2413        }
2414
2415        /**
2416         * @param value {@link #label} (Describes the purpose of this example amoung the set of examples.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
2417         */
2418        public ElementDefinitionExampleComponent setLabelElement(StringType value) { 
2419          this.label = value;
2420          return this;
2421        }
2422
2423        /**
2424         * @return Describes the purpose of this example amoung the set of examples.
2425         */
2426        public String getLabel() { 
2427          return this.label == null ? null : this.label.getValue();
2428        }
2429
2430        /**
2431         * @param value Describes the purpose of this example amoung the set of examples.
2432         */
2433        public ElementDefinitionExampleComponent setLabel(String value) { 
2434            if (this.label == null)
2435              this.label = new StringType();
2436            this.label.setValue(value);
2437          return this;
2438        }
2439
2440        /**
2441         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2442         */
2443        public DataType getValue() { 
2444          return this.value;
2445        }
2446
2447        /**
2448         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2449         */
2450        public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 
2451          if (this.value == null)
2452            this.value = new Base64BinaryType();
2453          if (!(this.value instanceof Base64BinaryType))
2454            throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered");
2455          return (Base64BinaryType) this.value;
2456        }
2457
2458        public boolean hasValueBase64BinaryType() { 
2459          return this != null && this.value instanceof Base64BinaryType;
2460        }
2461
2462        /**
2463         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2464         */
2465        public BooleanType getValueBooleanType() throws FHIRException { 
2466          if (this.value == null)
2467            this.value = new BooleanType();
2468          if (!(this.value instanceof BooleanType))
2469            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
2470          return (BooleanType) this.value;
2471        }
2472
2473        public boolean hasValueBooleanType() { 
2474          return this != null && this.value instanceof BooleanType;
2475        }
2476
2477        /**
2478         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2479         */
2480        public CanonicalType getValueCanonicalType() throws FHIRException { 
2481          if (this.value == null)
2482            this.value = new CanonicalType();
2483          if (!(this.value instanceof CanonicalType))
2484            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered");
2485          return (CanonicalType) this.value;
2486        }
2487
2488        public boolean hasValueCanonicalType() { 
2489          return this != null && this.value instanceof CanonicalType;
2490        }
2491
2492        /**
2493         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2494         */
2495        public CodeType getValueCodeType() throws FHIRException { 
2496          if (this.value == null)
2497            this.value = new CodeType();
2498          if (!(this.value instanceof CodeType))
2499            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
2500          return (CodeType) this.value;
2501        }
2502
2503        public boolean hasValueCodeType() { 
2504          return this != null && this.value instanceof CodeType;
2505        }
2506
2507        /**
2508         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2509         */
2510        public DateType getValueDateType() throws FHIRException { 
2511          if (this.value == null)
2512            this.value = new DateType();
2513          if (!(this.value instanceof DateType))
2514            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered");
2515          return (DateType) this.value;
2516        }
2517
2518        public boolean hasValueDateType() { 
2519          return this != null && this.value instanceof DateType;
2520        }
2521
2522        /**
2523         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2524         */
2525        public DateTimeType getValueDateTimeType() throws FHIRException { 
2526          if (this.value == null)
2527            this.value = new DateTimeType();
2528          if (!(this.value instanceof DateTimeType))
2529            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2530          return (DateTimeType) this.value;
2531        }
2532
2533        public boolean hasValueDateTimeType() { 
2534          return this != null && this.value instanceof DateTimeType;
2535        }
2536
2537        /**
2538         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2539         */
2540        public DecimalType getValueDecimalType() throws FHIRException { 
2541          if (this.value == null)
2542            this.value = new DecimalType();
2543          if (!(this.value instanceof DecimalType))
2544            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
2545          return (DecimalType) this.value;
2546        }
2547
2548        public boolean hasValueDecimalType() { 
2549          return this != null && this.value instanceof DecimalType;
2550        }
2551
2552        /**
2553         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2554         */
2555        public IdType getValueIdType() throws FHIRException { 
2556          if (this.value == null)
2557            this.value = new IdType();
2558          if (!(this.value instanceof IdType))
2559            throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered");
2560          return (IdType) this.value;
2561        }
2562
2563        public boolean hasValueIdType() { 
2564          return this != null && this.value instanceof IdType;
2565        }
2566
2567        /**
2568         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2569         */
2570        public InstantType getValueInstantType() throws FHIRException { 
2571          if (this.value == null)
2572            this.value = new InstantType();
2573          if (!(this.value instanceof InstantType))
2574            throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered");
2575          return (InstantType) this.value;
2576        }
2577
2578        public boolean hasValueInstantType() { 
2579          return this != null && this.value instanceof InstantType;
2580        }
2581
2582        /**
2583         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2584         */
2585        public IntegerType getValueIntegerType() throws FHIRException { 
2586          if (this.value == null)
2587            this.value = new IntegerType();
2588          if (!(this.value instanceof IntegerType))
2589            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
2590          return (IntegerType) this.value;
2591        }
2592
2593        public boolean hasValueIntegerType() { 
2594          return this != null && this.value instanceof IntegerType;
2595        }
2596
2597        /**
2598         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2599         */
2600        public MarkdownType getValueMarkdownType() throws FHIRException { 
2601          if (this.value == null)
2602            this.value = new MarkdownType();
2603          if (!(this.value instanceof MarkdownType))
2604            throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered");
2605          return (MarkdownType) this.value;
2606        }
2607
2608        public boolean hasValueMarkdownType() { 
2609          return this != null && this.value instanceof MarkdownType;
2610        }
2611
2612        /**
2613         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2614         */
2615        public OidType getValueOidType() throws FHIRException { 
2616          if (this.value == null)
2617            this.value = new OidType();
2618          if (!(this.value instanceof OidType))
2619            throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered");
2620          return (OidType) this.value;
2621        }
2622
2623        public boolean hasValueOidType() { 
2624          return this != null && this.value instanceof OidType;
2625        }
2626
2627        /**
2628         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2629         */
2630        public PositiveIntType getValuePositiveIntType() throws FHIRException { 
2631          if (this.value == null)
2632            this.value = new PositiveIntType();
2633          if (!(this.value instanceof PositiveIntType))
2634            throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2635          return (PositiveIntType) this.value;
2636        }
2637
2638        public boolean hasValuePositiveIntType() { 
2639          return this != null && this.value instanceof PositiveIntType;
2640        }
2641
2642        /**
2643         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2644         */
2645        public StringType getValueStringType() throws FHIRException { 
2646          if (this.value == null)
2647            this.value = new StringType();
2648          if (!(this.value instanceof StringType))
2649            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
2650          return (StringType) this.value;
2651        }
2652
2653        public boolean hasValueStringType() { 
2654          return this != null && this.value instanceof StringType;
2655        }
2656
2657        /**
2658         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2659         */
2660        public TimeType getValueTimeType() throws FHIRException { 
2661          if (this.value == null)
2662            this.value = new TimeType();
2663          if (!(this.value instanceof TimeType))
2664            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2665          return (TimeType) this.value;
2666        }
2667
2668        public boolean hasValueTimeType() { 
2669          return this != null && this.value instanceof TimeType;
2670        }
2671
2672        /**
2673         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2674         */
2675        public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 
2676          if (this.value == null)
2677            this.value = new UnsignedIntType();
2678          if (!(this.value instanceof UnsignedIntType))
2679            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2680          return (UnsignedIntType) this.value;
2681        }
2682
2683        public boolean hasValueUnsignedIntType() { 
2684          return this != null && this.value instanceof UnsignedIntType;
2685        }
2686
2687        /**
2688         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2689         */
2690        public UriType getValueUriType() throws FHIRException { 
2691          if (this.value == null)
2692            this.value = new UriType();
2693          if (!(this.value instanceof UriType))
2694            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
2695          return (UriType) this.value;
2696        }
2697
2698        public boolean hasValueUriType() { 
2699          return this != null && this.value instanceof UriType;
2700        }
2701
2702        /**
2703         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2704         */
2705        public UrlType getValueUrlType() throws FHIRException { 
2706          if (this.value == null)
2707            this.value = new UrlType();
2708          if (!(this.value instanceof UrlType))
2709            throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered");
2710          return (UrlType) this.value;
2711        }
2712
2713        public boolean hasValueUrlType() { 
2714          return this != null && this.value instanceof UrlType;
2715        }
2716
2717        /**
2718         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2719         */
2720        public UuidType getValueUuidType() throws FHIRException { 
2721          if (this.value == null)
2722            this.value = new UuidType();
2723          if (!(this.value instanceof UuidType))
2724            throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered");
2725          return (UuidType) this.value;
2726        }
2727
2728        public boolean hasValueUuidType() { 
2729          return this != null && this.value instanceof UuidType;
2730        }
2731
2732        /**
2733         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2734         */
2735        public Address getValueAddress() throws FHIRException { 
2736          if (this.value == null)
2737            this.value = new Address();
2738          if (!(this.value instanceof Address))
2739            throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered");
2740          return (Address) this.value;
2741        }
2742
2743        public boolean hasValueAddress() { 
2744          return this != null && this.value instanceof Address;
2745        }
2746
2747        /**
2748         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2749         */
2750        public Age getValueAge() throws FHIRException { 
2751          if (this.value == null)
2752            this.value = new Age();
2753          if (!(this.value instanceof Age))
2754            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered");
2755          return (Age) this.value;
2756        }
2757
2758        public boolean hasValueAge() { 
2759          return this != null && this.value instanceof Age;
2760        }
2761
2762        /**
2763         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2764         */
2765        public Annotation getValueAnnotation() throws FHIRException { 
2766          if (this.value == null)
2767            this.value = new Annotation();
2768          if (!(this.value instanceof Annotation))
2769            throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered");
2770          return (Annotation) this.value;
2771        }
2772
2773        public boolean hasValueAnnotation() { 
2774          return this != null && this.value instanceof Annotation;
2775        }
2776
2777        /**
2778         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2779         */
2780        public Attachment getValueAttachment() throws FHIRException { 
2781          if (this.value == null)
2782            this.value = new Attachment();
2783          if (!(this.value instanceof Attachment))
2784            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
2785          return (Attachment) this.value;
2786        }
2787
2788        public boolean hasValueAttachment() { 
2789          return this != null && this.value instanceof Attachment;
2790        }
2791
2792        /**
2793         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2794         */
2795        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
2796          if (this.value == null)
2797            this.value = new CodeableConcept();
2798          if (!(this.value instanceof CodeableConcept))
2799            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
2800          return (CodeableConcept) this.value;
2801        }
2802
2803        public boolean hasValueCodeableConcept() { 
2804          return this != null && this.value instanceof CodeableConcept;
2805        }
2806
2807        /**
2808         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2809         */
2810        public CodeableReference getValueCodeableReference() throws FHIRException { 
2811          if (this.value == null)
2812            this.value = new CodeableReference();
2813          if (!(this.value instanceof CodeableReference))
2814            throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.value.getClass().getName()+" was encountered");
2815          return (CodeableReference) this.value;
2816        }
2817
2818        public boolean hasValueCodeableReference() { 
2819          return this != null && this.value instanceof CodeableReference;
2820        }
2821
2822        /**
2823         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2824         */
2825        public Coding getValueCoding() throws FHIRException { 
2826          if (this.value == null)
2827            this.value = new Coding();
2828          if (!(this.value instanceof Coding))
2829            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
2830          return (Coding) this.value;
2831        }
2832
2833        public boolean hasValueCoding() { 
2834          return this != null && this.value instanceof Coding;
2835        }
2836
2837        /**
2838         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2839         */
2840        public ContactPoint getValueContactPoint() throws FHIRException { 
2841          if (this.value == null)
2842            this.value = new ContactPoint();
2843          if (!(this.value instanceof ContactPoint))
2844            throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered");
2845          return (ContactPoint) this.value;
2846        }
2847
2848        public boolean hasValueContactPoint() { 
2849          return this != null && this.value instanceof ContactPoint;
2850        }
2851
2852        /**
2853         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2854         */
2855        public Count getValueCount() throws FHIRException { 
2856          if (this.value == null)
2857            this.value = new Count();
2858          if (!(this.value instanceof Count))
2859            throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered");
2860          return (Count) this.value;
2861        }
2862
2863        public boolean hasValueCount() { 
2864          return this != null && this.value instanceof Count;
2865        }
2866
2867        /**
2868         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2869         */
2870        public Distance getValueDistance() throws FHIRException { 
2871          if (this.value == null)
2872            this.value = new Distance();
2873          if (!(this.value instanceof Distance))
2874            throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered");
2875          return (Distance) this.value;
2876        }
2877
2878        public boolean hasValueDistance() { 
2879          return this != null && this.value instanceof Distance;
2880        }
2881
2882        /**
2883         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2884         */
2885        public Duration getValueDuration() throws FHIRException { 
2886          if (this.value == null)
2887            this.value = new Duration();
2888          if (!(this.value instanceof Duration))
2889            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered");
2890          return (Duration) this.value;
2891        }
2892
2893        public boolean hasValueDuration() { 
2894          return this != null && this.value instanceof Duration;
2895        }
2896
2897        /**
2898         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2899         */
2900        public HumanName getValueHumanName() throws FHIRException { 
2901          if (this.value == null)
2902            this.value = new HumanName();
2903          if (!(this.value instanceof HumanName))
2904            throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered");
2905          return (HumanName) this.value;
2906        }
2907
2908        public boolean hasValueHumanName() { 
2909          return this != null && this.value instanceof HumanName;
2910        }
2911
2912        /**
2913         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2914         */
2915        public Identifier getValueIdentifier() throws FHIRException { 
2916          if (this.value == null)
2917            this.value = new Identifier();
2918          if (!(this.value instanceof Identifier))
2919            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered");
2920          return (Identifier) this.value;
2921        }
2922
2923        public boolean hasValueIdentifier() { 
2924          return this != null && this.value instanceof Identifier;
2925        }
2926
2927        /**
2928         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2929         */
2930        public Money getValueMoney() throws FHIRException { 
2931          if (this.value == null)
2932            this.value = new Money();
2933          if (!(this.value instanceof Money))
2934            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered");
2935          return (Money) this.value;
2936        }
2937
2938        public boolean hasValueMoney() { 
2939          return this != null && this.value instanceof Money;
2940        }
2941
2942        /**
2943         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2944         */
2945        public Period getValuePeriod() throws FHIRException { 
2946          if (this.value == null)
2947            this.value = new Period();
2948          if (!(this.value instanceof Period))
2949            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
2950          return (Period) this.value;
2951        }
2952
2953        public boolean hasValuePeriod() { 
2954          return this != null && this.value instanceof Period;
2955        }
2956
2957        /**
2958         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2959         */
2960        public Quantity getValueQuantity() throws FHIRException { 
2961          if (this.value == null)
2962            this.value = new Quantity();
2963          if (!(this.value instanceof Quantity))
2964            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
2965          return (Quantity) this.value;
2966        }
2967
2968        public boolean hasValueQuantity() { 
2969          return this != null && this.value instanceof Quantity;
2970        }
2971
2972        /**
2973         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2974         */
2975        public Range getValueRange() throws FHIRException { 
2976          if (this.value == null)
2977            this.value = new Range();
2978          if (!(this.value instanceof Range))
2979            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
2980          return (Range) this.value;
2981        }
2982
2983        public boolean hasValueRange() { 
2984          return this != null && this.value instanceof Range;
2985        }
2986
2987        /**
2988         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
2989         */
2990        public Ratio getValueRatio() throws FHIRException { 
2991          if (this.value == null)
2992            this.value = new Ratio();
2993          if (!(this.value instanceof Ratio))
2994            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
2995          return (Ratio) this.value;
2996        }
2997
2998        public boolean hasValueRatio() { 
2999          return this != null && this.value instanceof Ratio;
3000        }
3001
3002        /**
3003         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3004         */
3005        public RatioRange getValueRatioRange() throws FHIRException { 
3006          if (this.value == null)
3007            this.value = new RatioRange();
3008          if (!(this.value instanceof RatioRange))
3009            throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.value.getClass().getName()+" was encountered");
3010          return (RatioRange) this.value;
3011        }
3012
3013        public boolean hasValueRatioRange() { 
3014          return this != null && this.value instanceof RatioRange;
3015        }
3016
3017        /**
3018         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3019         */
3020        public Reference getValueReference() throws FHIRException { 
3021          if (this.value == null)
3022            this.value = new Reference();
3023          if (!(this.value instanceof Reference))
3024            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
3025          return (Reference) this.value;
3026        }
3027
3028        public boolean hasValueReference() { 
3029          return this != null && this.value instanceof Reference;
3030        }
3031
3032        /**
3033         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3034         */
3035        public SampledData getValueSampledData() throws FHIRException { 
3036          if (this.value == null)
3037            this.value = new SampledData();
3038          if (!(this.value instanceof SampledData))
3039            throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
3040          return (SampledData) this.value;
3041        }
3042
3043        public boolean hasValueSampledData() { 
3044          return this != null && this.value instanceof SampledData;
3045        }
3046
3047        /**
3048         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3049         */
3050        public Signature getValueSignature() throws FHIRException { 
3051          if (this.value == null)
3052            this.value = new Signature();
3053          if (!(this.value instanceof Signature))
3054            throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered");
3055          return (Signature) this.value;
3056        }
3057
3058        public boolean hasValueSignature() { 
3059          return this != null && this.value instanceof Signature;
3060        }
3061
3062        /**
3063         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3064         */
3065        public Timing getValueTiming() throws FHIRException { 
3066          if (this.value == null)
3067            this.value = new Timing();
3068          if (!(this.value instanceof Timing))
3069            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered");
3070          return (Timing) this.value;
3071        }
3072
3073        public boolean hasValueTiming() { 
3074          return this != null && this.value instanceof Timing;
3075        }
3076
3077        /**
3078         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3079         */
3080        public ContactDetail getValueContactDetail() throws FHIRException { 
3081          if (this.value == null)
3082            this.value = new ContactDetail();
3083          if (!(this.value instanceof ContactDetail))
3084            throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
3085          return (ContactDetail) this.value;
3086        }
3087
3088        public boolean hasValueContactDetail() { 
3089          return this != null && this.value instanceof ContactDetail;
3090        }
3091
3092        /**
3093         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3094         */
3095        public Contributor getValueContributor() throws FHIRException { 
3096          if (this.value == null)
3097            this.value = new Contributor();
3098          if (!(this.value instanceof Contributor))
3099            throw new FHIRException("Type mismatch: the type Contributor was expected, but "+this.value.getClass().getName()+" was encountered");
3100          return (Contributor) this.value;
3101        }
3102
3103        public boolean hasValueContributor() { 
3104          return this != null && this.value instanceof Contributor;
3105        }
3106
3107        /**
3108         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3109         */
3110        public DataRequirement getValueDataRequirement() throws FHIRException { 
3111          if (this.value == null)
3112            this.value = new DataRequirement();
3113          if (!(this.value instanceof DataRequirement))
3114            throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered");
3115          return (DataRequirement) this.value;
3116        }
3117
3118        public boolean hasValueDataRequirement() { 
3119          return this != null && this.value instanceof DataRequirement;
3120        }
3121
3122        /**
3123         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3124         */
3125        public Expression getValueExpression() throws FHIRException { 
3126          if (this.value == null)
3127            this.value = new Expression();
3128          if (!(this.value instanceof Expression))
3129            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered");
3130          return (Expression) this.value;
3131        }
3132
3133        public boolean hasValueExpression() { 
3134          return this != null && this.value instanceof Expression;
3135        }
3136
3137        /**
3138         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3139         */
3140        public ParameterDefinition getValueParameterDefinition() throws FHIRException { 
3141          if (this.value == null)
3142            this.value = new ParameterDefinition();
3143          if (!(this.value instanceof ParameterDefinition))
3144            throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
3145          return (ParameterDefinition) this.value;
3146        }
3147
3148        public boolean hasValueParameterDefinition() { 
3149          return this != null && this.value instanceof ParameterDefinition;
3150        }
3151
3152        /**
3153         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3154         */
3155        public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 
3156          if (this.value == null)
3157            this.value = new RelatedArtifact();
3158          if (!(this.value instanceof RelatedArtifact))
3159            throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered");
3160          return (RelatedArtifact) this.value;
3161        }
3162
3163        public boolean hasValueRelatedArtifact() { 
3164          return this != null && this.value instanceof RelatedArtifact;
3165        }
3166
3167        /**
3168         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3169         */
3170        public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 
3171          if (this.value == null)
3172            this.value = new TriggerDefinition();
3173          if (!(this.value instanceof TriggerDefinition))
3174            throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
3175          return (TriggerDefinition) this.value;
3176        }
3177
3178        public boolean hasValueTriggerDefinition() { 
3179          return this != null && this.value instanceof TriggerDefinition;
3180        }
3181
3182        /**
3183         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3184         */
3185        public UsageContext getValueUsageContext() throws FHIRException { 
3186          if (this.value == null)
3187            this.value = new UsageContext();
3188          if (!(this.value instanceof UsageContext))
3189            throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered");
3190          return (UsageContext) this.value;
3191        }
3192
3193        public boolean hasValueUsageContext() { 
3194          return this != null && this.value instanceof UsageContext;
3195        }
3196
3197        /**
3198         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3199         */
3200        public Dosage getValueDosage() throws FHIRException { 
3201          if (this.value == null)
3202            this.value = new Dosage();
3203          if (!(this.value instanceof Dosage))
3204            throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered");
3205          return (Dosage) this.value;
3206        }
3207
3208        public boolean hasValueDosage() { 
3209          return this != null && this.value instanceof Dosage;
3210        }
3211
3212        /**
3213         * @return {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3214         */
3215        public Meta getValueMeta() throws FHIRException { 
3216          if (this.value == null)
3217            this.value = new Meta();
3218          if (!(this.value instanceof Meta))
3219            throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered");
3220          return (Meta) this.value;
3221        }
3222
3223        public boolean hasValueMeta() { 
3224          return this != null && this.value instanceof Meta;
3225        }
3226
3227        public boolean hasValue() { 
3228          return this.value != null && !this.value.isEmpty();
3229        }
3230
3231        /**
3232         * @param value {@link #value} (The actual value for the element, which must be one of the types allowed for this element.)
3233         */
3234        public ElementDefinitionExampleComponent setValue(DataType value) { 
3235          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 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 Contributor || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Dosage || value instanceof Meta))
3236            throw new Error("Not the right type for ElementDefinition.example.value[x]: "+value.fhirType());
3237          this.value = value;
3238          return this;
3239        }
3240
3241        protected void listChildren(List<Property> children) {
3242          super.listChildren(children);
3243          children.add(new Property("label", "string", "Describes the purpose of this example amoung the set of examples.", 0, 1, label));
3244          children.add(new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value));
3245        }
3246
3247        @Override
3248        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3249          switch (_hash) {
3250          case 102727412: /*label*/  return new Property("label", "string", "Describes the purpose of this example amoung the set of examples.", 0, 1, label);
3251          case -1410166417: /*value[x]*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3252          case 111972721: /*value*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3253          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);
3254          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);
3255          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);
3256          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);
3257          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);
3258          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);
3259          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);
3260          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);
3261          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);
3262          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);
3263          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);
3264          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);
3265          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);
3266          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);
3267          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);
3268          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);
3269          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);
3270          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);
3271          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);
3272          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);
3273          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);
3274          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);
3275          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);
3276          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);
3277          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);
3278          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);
3279          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);
3280          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);
3281          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);
3282          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);
3283          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);
3284          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);
3285          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);
3286          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);
3287          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);
3288          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);
3289          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);
3290          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);
3291          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);
3292          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);
3293          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);
3294          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);
3295          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);
3296          case 1281021610: /*valueContributor*/  return new Property("value[x]", "Contributor", "The actual value for the element, which must be one of the types allowed for this element.", 0, 1, value);
3297          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);
3298          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);
3299          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);
3300          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);
3301          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);
3302          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);
3303          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);
3304          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);
3305          default: return super.getNamedProperty(_hash, _name, _checkValid);
3306          }
3307
3308        }
3309
3310      @Override
3311      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3312        switch (hash) {
3313        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
3314        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
3315        default: return super.getProperty(hash, name, checkValid);
3316        }
3317
3318      }
3319
3320      @Override
3321      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3322        switch (hash) {
3323        case 102727412: // label
3324          this.label = TypeConvertor.castToString(value); // StringType
3325          return value;
3326        case 111972721: // value
3327          this.value = TypeConvertor.castToType(value); // DataType
3328          return value;
3329        default: return super.setProperty(hash, name, value);
3330        }
3331
3332      }
3333
3334      @Override
3335      public Base setProperty(String name, Base value) throws FHIRException {
3336        if (name.equals("label")) {
3337          this.label = TypeConvertor.castToString(value); // StringType
3338        } else if (name.equals("value[x]")) {
3339          this.value = TypeConvertor.castToType(value); // DataType
3340        } else
3341          return super.setProperty(name, value);
3342        return value;
3343      }
3344
3345      @Override
3346      public Base makeProperty(int hash, String name) throws FHIRException {
3347        switch (hash) {
3348        case 102727412:  return getLabelElement();
3349        case -1410166417:  return getValue();
3350        case 111972721:  return getValue();
3351        default: return super.makeProperty(hash, name);
3352        }
3353
3354      }
3355
3356      @Override
3357      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3358        switch (hash) {
3359        case 102727412: /*label*/ return new String[] {"string"};
3360        case 111972721: /*value*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "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", "Contributor", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Dosage", "Meta"};
3361        default: return super.getTypesForProperty(hash, name);
3362        }
3363
3364      }
3365
3366      @Override
3367      public Base addChild(String name) throws FHIRException {
3368        if (name.equals("label")) {
3369          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.example.label");
3370        }
3371        else if (name.equals("valueBase64Binary")) {
3372          this.value = new Base64BinaryType();
3373          return this.value;
3374        }
3375        else if (name.equals("valueBoolean")) {
3376          this.value = new BooleanType();
3377          return this.value;
3378        }
3379        else if (name.equals("valueCanonical")) {
3380          this.value = new CanonicalType();
3381          return this.value;
3382        }
3383        else if (name.equals("valueCode")) {
3384          this.value = new CodeType();
3385          return this.value;
3386        }
3387        else if (name.equals("valueDate")) {
3388          this.value = new DateType();
3389          return this.value;
3390        }
3391        else if (name.equals("valueDateTime")) {
3392          this.value = new DateTimeType();
3393          return this.value;
3394        }
3395        else if (name.equals("valueDecimal")) {
3396          this.value = new DecimalType();
3397          return this.value;
3398        }
3399        else if (name.equals("valueId")) {
3400          this.value = new IdType();
3401          return this.value;
3402        }
3403        else if (name.equals("valueInstant")) {
3404          this.value = new InstantType();
3405          return this.value;
3406        }
3407        else if (name.equals("valueInteger")) {
3408          this.value = new IntegerType();
3409          return this.value;
3410        }
3411        else if (name.equals("valueMarkdown")) {
3412          this.value = new MarkdownType();
3413          return this.value;
3414        }
3415        else if (name.equals("valueOid")) {
3416          this.value = new OidType();
3417          return this.value;
3418        }
3419        else if (name.equals("valuePositiveInt")) {
3420          this.value = new PositiveIntType();
3421          return this.value;
3422        }
3423        else if (name.equals("valueString")) {
3424          this.value = new StringType();
3425          return this.value;
3426        }
3427        else if (name.equals("valueTime")) {
3428          this.value = new TimeType();
3429          return this.value;
3430        }
3431        else if (name.equals("valueUnsignedInt")) {
3432          this.value = new UnsignedIntType();
3433          return this.value;
3434        }
3435        else if (name.equals("valueUri")) {
3436          this.value = new UriType();
3437          return this.value;
3438        }
3439        else if (name.equals("valueUrl")) {
3440          this.value = new UrlType();
3441          return this.value;
3442        }
3443        else if (name.equals("valueUuid")) {
3444          this.value = new UuidType();
3445          return this.value;
3446        }
3447        else if (name.equals("valueAddress")) {
3448          this.value = new Address();
3449          return this.value;
3450        }
3451        else if (name.equals("valueAge")) {
3452          this.value = new Age();
3453          return this.value;
3454        }
3455        else if (name.equals("valueAnnotation")) {
3456          this.value = new Annotation();
3457          return this.value;
3458        }
3459        else if (name.equals("valueAttachment")) {
3460          this.value = new Attachment();
3461          return this.value;
3462        }
3463        else if (name.equals("valueCodeableConcept")) {
3464          this.value = new CodeableConcept();
3465          return this.value;
3466        }
3467        else if (name.equals("valueCodeableReference")) {
3468          this.value = new CodeableReference();
3469          return this.value;
3470        }
3471        else if (name.equals("valueCoding")) {
3472          this.value = new Coding();
3473          return this.value;
3474        }
3475        else if (name.equals("valueContactPoint")) {
3476          this.value = new ContactPoint();
3477          return this.value;
3478        }
3479        else if (name.equals("valueCount")) {
3480          this.value = new Count();
3481          return this.value;
3482        }
3483        else if (name.equals("valueDistance")) {
3484          this.value = new Distance();
3485          return this.value;
3486        }
3487        else if (name.equals("valueDuration")) {
3488          this.value = new Duration();
3489          return this.value;
3490        }
3491        else if (name.equals("valueHumanName")) {
3492          this.value = new HumanName();
3493          return this.value;
3494        }
3495        else if (name.equals("valueIdentifier")) {
3496          this.value = new Identifier();
3497          return this.value;
3498        }
3499        else if (name.equals("valueMoney")) {
3500          this.value = new Money();
3501          return this.value;
3502        }
3503        else if (name.equals("valuePeriod")) {
3504          this.value = new Period();
3505          return this.value;
3506        }
3507        else if (name.equals("valueQuantity")) {
3508          this.value = new Quantity();
3509          return this.value;
3510        }
3511        else if (name.equals("valueRange")) {
3512          this.value = new Range();
3513          return this.value;
3514        }
3515        else if (name.equals("valueRatio")) {
3516          this.value = new Ratio();
3517          return this.value;
3518        }
3519        else if (name.equals("valueRatioRange")) {
3520          this.value = new RatioRange();
3521          return this.value;
3522        }
3523        else if (name.equals("valueReference")) {
3524          this.value = new Reference();
3525          return this.value;
3526        }
3527        else if (name.equals("valueSampledData")) {
3528          this.value = new SampledData();
3529          return this.value;
3530        }
3531        else if (name.equals("valueSignature")) {
3532          this.value = new Signature();
3533          return this.value;
3534        }
3535        else if (name.equals("valueTiming")) {
3536          this.value = new Timing();
3537          return this.value;
3538        }
3539        else if (name.equals("valueContactDetail")) {
3540          this.value = new ContactDetail();
3541          return this.value;
3542        }
3543        else if (name.equals("valueContributor")) {
3544          this.value = new Contributor();
3545          return this.value;
3546        }
3547        else if (name.equals("valueDataRequirement")) {
3548          this.value = new DataRequirement();
3549          return this.value;
3550        }
3551        else if (name.equals("valueExpression")) {
3552          this.value = new Expression();
3553          return this.value;
3554        }
3555        else if (name.equals("valueParameterDefinition")) {
3556          this.value = new ParameterDefinition();
3557          return this.value;
3558        }
3559        else if (name.equals("valueRelatedArtifact")) {
3560          this.value = new RelatedArtifact();
3561          return this.value;
3562        }
3563        else if (name.equals("valueTriggerDefinition")) {
3564          this.value = new TriggerDefinition();
3565          return this.value;
3566        }
3567        else if (name.equals("valueUsageContext")) {
3568          this.value = new UsageContext();
3569          return this.value;
3570        }
3571        else if (name.equals("valueDosage")) {
3572          this.value = new Dosage();
3573          return this.value;
3574        }
3575        else if (name.equals("valueMeta")) {
3576          this.value = new Meta();
3577          return this.value;
3578        }
3579        else
3580          return super.addChild(name);
3581      }
3582
3583      public ElementDefinitionExampleComponent copy() {
3584        ElementDefinitionExampleComponent dst = new ElementDefinitionExampleComponent();
3585        copyValues(dst);
3586        return dst;
3587      }
3588
3589      public void copyValues(ElementDefinitionExampleComponent dst) {
3590        super.copyValues(dst);
3591        dst.label = label == null ? null : label.copy();
3592        dst.value = value == null ? null : value.copy();
3593      }
3594
3595      @Override
3596      public boolean equalsDeep(Base other_) {
3597        if (!super.equalsDeep(other_))
3598          return false;
3599        if (!(other_ instanceof ElementDefinitionExampleComponent))
3600          return false;
3601        ElementDefinitionExampleComponent o = (ElementDefinitionExampleComponent) other_;
3602        return compareDeep(label, o.label, true) && compareDeep(value, o.value, true);
3603      }
3604
3605      @Override
3606      public boolean equalsShallow(Base other_) {
3607        if (!super.equalsShallow(other_))
3608          return false;
3609        if (!(other_ instanceof ElementDefinitionExampleComponent))
3610          return false;
3611        ElementDefinitionExampleComponent o = (ElementDefinitionExampleComponent) other_;
3612        return compareValues(label, o.label, true);
3613      }
3614
3615      public boolean isEmpty() {
3616        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, value);
3617      }
3618
3619  public String fhirType() {
3620    return "ElementDefinition.example";
3621
3622  }
3623
3624  }
3625
3626    @Block()
3627    public static class ElementDefinitionConstraintComponent extends Element implements IBaseDatatypeElement {
3628        /**
3629         * Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.
3630         */
3631        @Child(name = "key", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true)
3632        @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." )
3633        protected IdType key;
3634
3635        /**
3636         * Description of why this constraint is necessary or appropriate.
3637         */
3638        @Child(name = "requirements", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
3639        @Description(shortDefinition="Why this constraint is necessary or appropriate", formalDefinition="Description of why this constraint is necessary or appropriate." )
3640        protected StringType requirements;
3641
3642        /**
3643         * Identifies the impact constraint violation has on the conformance of the instance.
3644         */
3645        @Child(name = "severity", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true)
3646        @Description(shortDefinition="error | warning", formalDefinition="Identifies the impact constraint violation has on the conformance of the instance." )
3647        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/constraint-severity")
3648        protected Enumeration<ConstraintSeverity> severity;
3649
3650        /**
3651         * Text that can be used to describe the constraint in messages identifying that the constraint has been violated.
3652         */
3653        @Child(name = "human", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=true)
3654        @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." )
3655        protected StringType human;
3656
3657        /**
3658         * A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.
3659         */
3660        @Child(name = "expression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
3661        @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." )
3662        protected StringType expression;
3663
3664        /**
3665         * An XPath expression of constraint that can be executed to see if this constraint is met.
3666         */
3667        @Child(name = "xpath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true)
3668        @Description(shortDefinition="XPath expression of constraint", formalDefinition="An XPath expression of constraint that can be executed to see if this constraint is met." )
3669        protected StringType xpath;
3670
3671        /**
3672         * A reference to the original source of the constraint, for traceability purposes.
3673         */
3674        @Child(name = "source", type = {CanonicalType.class}, order=7, min=0, max=1, modifier=false, summary=true)
3675        @Description(shortDefinition="Reference to original source of constraint", formalDefinition="A reference to the original source of the constraint, for traceability purposes." )
3676        protected CanonicalType source;
3677
3678        private static final long serialVersionUID = 1048354565L;
3679
3680    /**
3681     * Constructor
3682     */
3683      public ElementDefinitionConstraintComponent() {
3684        super();
3685      }
3686
3687    /**
3688     * Constructor
3689     */
3690      public ElementDefinitionConstraintComponent(String key, ConstraintSeverity severity, String human) {
3691        super();
3692        this.setKey(key);
3693        this.setSeverity(severity);
3694        this.setHuman(human);
3695      }
3696
3697        /**
3698         * @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
3699         */
3700        public IdType getKeyElement() { 
3701          if (this.key == null)
3702            if (Configuration.errorOnAutoCreate())
3703              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.key");
3704            else if (Configuration.doAutoCreate())
3705              this.key = new IdType(); // bb
3706          return this.key;
3707        }
3708
3709        public boolean hasKeyElement() { 
3710          return this.key != null && !this.key.isEmpty();
3711        }
3712
3713        public boolean hasKey() { 
3714          return this.key != null && !this.key.isEmpty();
3715        }
3716
3717        /**
3718         * @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
3719         */
3720        public ElementDefinitionConstraintComponent setKeyElement(IdType value) { 
3721          this.key = value;
3722          return this;
3723        }
3724
3725        /**
3726         * @return Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.
3727         */
3728        public String getKey() { 
3729          return this.key == null ? null : this.key.getValue();
3730        }
3731
3732        /**
3733         * @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.
3734         */
3735        public ElementDefinitionConstraintComponent setKey(String value) { 
3736            if (this.key == null)
3737              this.key = new IdType();
3738            this.key.setValue(value);
3739          return this;
3740        }
3741
3742        /**
3743         * @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
3744         */
3745        public StringType getRequirementsElement() { 
3746          if (this.requirements == null)
3747            if (Configuration.errorOnAutoCreate())
3748              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.requirements");
3749            else if (Configuration.doAutoCreate())
3750              this.requirements = new StringType(); // bb
3751          return this.requirements;
3752        }
3753
3754        public boolean hasRequirementsElement() { 
3755          return this.requirements != null && !this.requirements.isEmpty();
3756        }
3757
3758        public boolean hasRequirements() { 
3759          return this.requirements != null && !this.requirements.isEmpty();
3760        }
3761
3762        /**
3763         * @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
3764         */
3765        public ElementDefinitionConstraintComponent setRequirementsElement(StringType value) { 
3766          this.requirements = value;
3767          return this;
3768        }
3769
3770        /**
3771         * @return Description of why this constraint is necessary or appropriate.
3772         */
3773        public String getRequirements() { 
3774          return this.requirements == null ? null : this.requirements.getValue();
3775        }
3776
3777        /**
3778         * @param value Description of why this constraint is necessary or appropriate.
3779         */
3780        public ElementDefinitionConstraintComponent setRequirements(String value) { 
3781          if (Utilities.noString(value))
3782            this.requirements = null;
3783          else {
3784            if (this.requirements == null)
3785              this.requirements = new StringType();
3786            this.requirements.setValue(value);
3787          }
3788          return this;
3789        }
3790
3791        /**
3792         * @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
3793         */
3794        public Enumeration<ConstraintSeverity> getSeverityElement() { 
3795          if (this.severity == null)
3796            if (Configuration.errorOnAutoCreate())
3797              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.severity");
3798            else if (Configuration.doAutoCreate())
3799              this.severity = new Enumeration<ConstraintSeverity>(new ConstraintSeverityEnumFactory()); // bb
3800          return this.severity;
3801        }
3802
3803        public boolean hasSeverityElement() { 
3804          return this.severity != null && !this.severity.isEmpty();
3805        }
3806
3807        public boolean hasSeverity() { 
3808          return this.severity != null && !this.severity.isEmpty();
3809        }
3810
3811        /**
3812         * @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
3813         */
3814        public ElementDefinitionConstraintComponent setSeverityElement(Enumeration<ConstraintSeverity> value) { 
3815          this.severity = value;
3816          return this;
3817        }
3818
3819        /**
3820         * @return Identifies the impact constraint violation has on the conformance of the instance.
3821         */
3822        public ConstraintSeverity getSeverity() { 
3823          return this.severity == null ? null : this.severity.getValue();
3824        }
3825
3826        /**
3827         * @param value Identifies the impact constraint violation has on the conformance of the instance.
3828         */
3829        public ElementDefinitionConstraintComponent setSeverity(ConstraintSeverity value) { 
3830            if (this.severity == null)
3831              this.severity = new Enumeration<ConstraintSeverity>(new ConstraintSeverityEnumFactory());
3832            this.severity.setValue(value);
3833          return this;
3834        }
3835
3836        /**
3837         * @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
3838         */
3839        public StringType getHumanElement() { 
3840          if (this.human == null)
3841            if (Configuration.errorOnAutoCreate())
3842              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.human");
3843            else if (Configuration.doAutoCreate())
3844              this.human = new StringType(); // bb
3845          return this.human;
3846        }
3847
3848        public boolean hasHumanElement() { 
3849          return this.human != null && !this.human.isEmpty();
3850        }
3851
3852        public boolean hasHuman() { 
3853          return this.human != null && !this.human.isEmpty();
3854        }
3855
3856        /**
3857         * @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
3858         */
3859        public ElementDefinitionConstraintComponent setHumanElement(StringType value) { 
3860          this.human = value;
3861          return this;
3862        }
3863
3864        /**
3865         * @return Text that can be used to describe the constraint in messages identifying that the constraint has been violated.
3866         */
3867        public String getHuman() { 
3868          return this.human == null ? null : this.human.getValue();
3869        }
3870
3871        /**
3872         * @param value Text that can be used to describe the constraint in messages identifying that the constraint has been violated.
3873         */
3874        public ElementDefinitionConstraintComponent setHuman(String value) { 
3875            if (this.human == null)
3876              this.human = new StringType();
3877            this.human.setValue(value);
3878          return this;
3879        }
3880
3881        /**
3882         * @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
3883         */
3884        public StringType getExpressionElement() { 
3885          if (this.expression == null)
3886            if (Configuration.errorOnAutoCreate())
3887              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.expression");
3888            else if (Configuration.doAutoCreate())
3889              this.expression = new StringType(); // bb
3890          return this.expression;
3891        }
3892
3893        public boolean hasExpressionElement() { 
3894          return this.expression != null && !this.expression.isEmpty();
3895        }
3896
3897        public boolean hasExpression() { 
3898          return this.expression != null && !this.expression.isEmpty();
3899        }
3900
3901        /**
3902         * @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
3903         */
3904        public ElementDefinitionConstraintComponent setExpressionElement(StringType value) { 
3905          this.expression = value;
3906          return this;
3907        }
3908
3909        /**
3910         * @return A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.
3911         */
3912        public String getExpression() { 
3913          return this.expression == null ? null : this.expression.getValue();
3914        }
3915
3916        /**
3917         * @param value A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.
3918         */
3919        public ElementDefinitionConstraintComponent setExpression(String value) { 
3920          if (Utilities.noString(value))
3921            this.expression = null;
3922          else {
3923            if (this.expression == null)
3924              this.expression = new StringType();
3925            this.expression.setValue(value);
3926          }
3927          return this;
3928        }
3929
3930        /**
3931         * @return {@link #xpath} (An XPath 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 "getXpath" gives direct access to the value
3932         */
3933        public StringType getXpathElement() { 
3934          if (this.xpath == null)
3935            if (Configuration.errorOnAutoCreate())
3936              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.xpath");
3937            else if (Configuration.doAutoCreate())
3938              this.xpath = new StringType(); // bb
3939          return this.xpath;
3940        }
3941
3942        public boolean hasXpathElement() { 
3943          return this.xpath != null && !this.xpath.isEmpty();
3944        }
3945
3946        public boolean hasXpath() { 
3947          return this.xpath != null && !this.xpath.isEmpty();
3948        }
3949
3950        /**
3951         * @param value {@link #xpath} (An XPath 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 "getXpath" gives direct access to the value
3952         */
3953        public ElementDefinitionConstraintComponent setXpathElement(StringType value) { 
3954          this.xpath = value;
3955          return this;
3956        }
3957
3958        /**
3959         * @return An XPath expression of constraint that can be executed to see if this constraint is met.
3960         */
3961        public String getXpath() { 
3962          return this.xpath == null ? null : this.xpath.getValue();
3963        }
3964
3965        /**
3966         * @param value An XPath expression of constraint that can be executed to see if this constraint is met.
3967         */
3968        public ElementDefinitionConstraintComponent setXpath(String value) { 
3969          if (Utilities.noString(value))
3970            this.xpath = null;
3971          else {
3972            if (this.xpath == null)
3973              this.xpath = new StringType();
3974            this.xpath.setValue(value);
3975          }
3976          return this;
3977        }
3978
3979        /**
3980         * @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
3981         */
3982        public CanonicalType getSourceElement() { 
3983          if (this.source == null)
3984            if (Configuration.errorOnAutoCreate())
3985              throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.source");
3986            else if (Configuration.doAutoCreate())
3987              this.source = new CanonicalType(); // bb
3988          return this.source;
3989        }
3990
3991        public boolean hasSourceElement() { 
3992          return this.source != null && !this.source.isEmpty();
3993        }
3994
3995        public boolean hasSource() { 
3996          return this.source != null && !this.source.isEmpty();
3997        }
3998
3999        /**
4000         * @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
4001         */
4002        public ElementDefinitionConstraintComponent setSourceElement(CanonicalType value) { 
4003          this.source = value;
4004          return this;
4005        }
4006
4007        /**
4008         * @return A reference to the original source of the constraint, for traceability purposes.
4009         */
4010        public String getSource() { 
4011          return this.source == null ? null : this.source.getValue();
4012        }
4013
4014        /**
4015         * @param value A reference to the original source of the constraint, for traceability purposes.
4016         */
4017        public ElementDefinitionConstraintComponent setSource(String value) { 
4018          if (Utilities.noString(value))
4019            this.source = null;
4020          else {
4021            if (this.source == null)
4022              this.source = new CanonicalType();
4023            this.source.setValue(value);
4024          }
4025          return this;
4026        }
4027
4028        protected void listChildren(List<Property> children) {
4029          super.listChildren(children);
4030          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));
4031          children.add(new Property("requirements", "string", "Description of why this constraint is necessary or appropriate.", 0, 1, requirements));
4032          children.add(new Property("severity", "code", "Identifies the impact constraint violation has on the conformance of the instance.", 0, 1, severity));
4033          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));
4034          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));
4035          children.add(new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, 1, xpath));
4036          children.add(new Property("source", "canonical(StructureDefinition)", "A reference to the original source of the constraint, for traceability purposes.", 0, 1, source));
4037        }
4038
4039        @Override
4040        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4041          switch (_hash) {
4042          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);
4043          case -1619874672: /*requirements*/  return new Property("requirements", "string", "Description of why this constraint is necessary or appropriate.", 0, 1, requirements);
4044          case 1478300413: /*severity*/  return new Property("severity", "code", "Identifies the impact constraint violation has on the conformance of the instance.", 0, 1, severity);
4045          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);
4046          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);
4047          case 114256029: /*xpath*/  return new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, 1, xpath);
4048          case -896505829: /*source*/  return new Property("source", "canonical(StructureDefinition)", "A reference to the original source of the constraint, for traceability purposes.", 0, 1, source);
4049          default: return super.getNamedProperty(_hash, _name, _checkValid);
4050          }
4051
4052        }
4053
4054      @Override
4055      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4056        switch (hash) {
4057        case 106079: /*key*/ return this.key == null ? new Base[0] : new Base[] {this.key}; // IdType
4058        case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // StringType
4059        case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // Enumeration<ConstraintSeverity>
4060        case 99639597: /*human*/ return this.human == null ? new Base[0] : new Base[] {this.human}; // StringType
4061        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
4062        case 114256029: /*xpath*/ return this.xpath == null ? new Base[0] : new Base[] {this.xpath}; // StringType
4063        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // CanonicalType
4064        default: return super.getProperty(hash, name, checkValid);
4065        }
4066
4067      }
4068
4069      @Override
4070      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4071        switch (hash) {
4072        case 106079: // key
4073          this.key = TypeConvertor.castToId(value); // IdType
4074          return value;
4075        case -1619874672: // requirements
4076          this.requirements = TypeConvertor.castToString(value); // StringType
4077          return value;
4078        case 1478300413: // severity
4079          value = new ConstraintSeverityEnumFactory().fromType(TypeConvertor.castToCode(value));
4080          this.severity = (Enumeration) value; // Enumeration<ConstraintSeverity>
4081          return value;
4082        case 99639597: // human
4083          this.human = TypeConvertor.castToString(value); // StringType
4084          return value;
4085        case -1795452264: // expression
4086          this.expression = TypeConvertor.castToString(value); // StringType
4087          return value;
4088        case 114256029: // xpath
4089          this.xpath = TypeConvertor.castToString(value); // StringType
4090          return value;
4091        case -896505829: // source
4092          this.source = TypeConvertor.castToCanonical(value); // CanonicalType
4093          return value;
4094        default: return super.setProperty(hash, name, value);
4095        }
4096
4097      }
4098
4099      @Override
4100      public Base setProperty(String name, Base value) throws FHIRException {
4101        if (name.equals("key")) {
4102          this.key = TypeConvertor.castToId(value); // IdType
4103        } else if (name.equals("requirements")) {
4104          this.requirements = TypeConvertor.castToString(value); // StringType
4105        } else if (name.equals("severity")) {
4106          value = new ConstraintSeverityEnumFactory().fromType(TypeConvertor.castToCode(value));
4107          this.severity = (Enumeration) value; // Enumeration<ConstraintSeverity>
4108        } else if (name.equals("human")) {
4109          this.human = TypeConvertor.castToString(value); // StringType
4110        } else if (name.equals("expression")) {
4111          this.expression = TypeConvertor.castToString(value); // StringType
4112        } else if (name.equals("xpath")) {
4113          this.xpath = TypeConvertor.castToString(value); // StringType
4114        } else if (name.equals("source")) {
4115          this.source = TypeConvertor.castToCanonical(value); // CanonicalType
4116        } else
4117          return super.setProperty(name, value);
4118        return value;
4119      }
4120
4121      @Override
4122      public Base makeProperty(int hash, String name) throws FHIRException {
4123        switch (hash) {
4124        case 106079:  return getKeyElement();
4125        case -1619874672:  return getRequirementsElement();
4126        case 1478300413:  return getSeverityElement();
4127        case 99639597:  return getHumanElement();
4128        case -1795452264:  return getExpressionElement();
4129        case 114256029:  return getXpathElement();
4130        case -896505829:  return getSourceElement();
4131        default: return super.makeProperty(hash, name);
4132        }
4133
4134      }
4135
4136      @Override
4137      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4138        switch (hash) {
4139        case 106079: /*key*/ return new String[] {"id"};
4140        case -1619874672: /*requirements*/ return new String[] {"string"};
4141        case 1478300413: /*severity*/ return new String[] {"code"};
4142        case 99639597: /*human*/ return new String[] {"string"};
4143        case -1795452264: /*expression*/ return new String[] {"string"};
4144        case 114256029: /*xpath*/ return new String[] {"string"};
4145        case -896505829: /*source*/ return new String[] {"canonical"};
4146        default: return super.getTypesForProperty(hash, name);
4147        }
4148
4149      }
4150
4151      @Override
4152      public Base addChild(String name) throws FHIRException {
4153        if (name.equals("key")) {
4154          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.constraint.key");
4155        }
4156        else if (name.equals("requirements")) {
4157          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.constraint.requirements");
4158        }
4159        else if (name.equals("severity")) {
4160          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.constraint.severity");
4161        }
4162        else if (name.equals("human")) {
4163          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.constraint.human");
4164        }
4165        else if (name.equals("expression")) {
4166          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.constraint.expression");
4167        }
4168        else if (name.equals("xpath")) {
4169          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.constraint.xpath");
4170        }
4171        else if (name.equals("source")) {
4172          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.constraint.source");
4173        }
4174        else
4175          return super.addChild(name);
4176      }
4177
4178      public ElementDefinitionConstraintComponent copy() {
4179        ElementDefinitionConstraintComponent dst = new ElementDefinitionConstraintComponent();
4180        copyValues(dst);
4181        return dst;
4182      }
4183
4184      public void copyValues(ElementDefinitionConstraintComponent dst) {
4185        super.copyValues(dst);
4186        dst.key = key == null ? null : key.copy();
4187        dst.requirements = requirements == null ? null : requirements.copy();
4188        dst.severity = severity == null ? null : severity.copy();
4189        dst.human = human == null ? null : human.copy();
4190        dst.expression = expression == null ? null : expression.copy();
4191        dst.xpath = xpath == null ? null : xpath.copy();
4192        dst.source = source == null ? null : source.copy();
4193      }
4194
4195      @Override
4196      public boolean equalsDeep(Base other_) {
4197        if (!super.equalsDeep(other_))
4198          return false;
4199        if (!(other_ instanceof ElementDefinitionConstraintComponent))
4200          return false;
4201        ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other_;
4202        return compareDeep(key, o.key, true) && compareDeep(requirements, o.requirements, true) && compareDeep(severity, o.severity, true)
4203           && compareDeep(human, o.human, true) && compareDeep(expression, o.expression, true) && compareDeep(xpath, o.xpath, true)
4204           && compareDeep(source, o.source, true);
4205      }
4206
4207      @Override
4208      public boolean equalsShallow(Base other_) {
4209        if (!super.equalsShallow(other_))
4210          return false;
4211        if (!(other_ instanceof ElementDefinitionConstraintComponent))
4212          return false;
4213        ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other_;
4214        return compareValues(key, o.key, true) && compareValues(requirements, o.requirements, true) && compareValues(severity, o.severity, true)
4215           && compareValues(human, o.human, true) && compareValues(expression, o.expression, true) && compareValues(xpath, o.xpath, true)
4216           && compareValues(source, o.source, true);
4217      }
4218
4219      public boolean isEmpty() {
4220        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(key, requirements, severity
4221          , human, expression, xpath, source);
4222      }
4223
4224  public String fhirType() {
4225    return "ElementDefinition.constraint";
4226
4227  }
4228
4229  }
4230
4231    @Block()
4232    public static class ElementDefinitionBindingComponent extends Element implements IBaseDatatypeElement {
4233        /**
4234         * 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.
4235         */
4236        @Child(name = "strength", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
4237        @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." )
4238        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/binding-strength")
4239        protected Enumeration<BindingStrength> strength;
4240
4241        /**
4242         * Describes the intended use of this particular set of codes.
4243         */
4244        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
4245        @Description(shortDefinition="Human explanation of the value set", formalDefinition="Describes the intended use of this particular set of codes." )
4246        protected StringType description;
4247
4248        /**
4249         * Refers to the value set that identifies the set of codes the binding refers to.
4250         */
4251        @Child(name = "valueSet", type = {CanonicalType.class}, order=3, min=0, max=1, modifier=false, summary=true)
4252        @Description(shortDefinition="Source of value set", formalDefinition="Refers to the value set that identifies the set of codes the binding refers to." )
4253        protected CanonicalType valueSet;
4254
4255        private static final long serialVersionUID = -514477030L;
4256
4257    /**
4258     * Constructor
4259     */
4260      public ElementDefinitionBindingComponent() {
4261        super();
4262      }
4263
4264    /**
4265     * Constructor
4266     */
4267      public ElementDefinitionBindingComponent(BindingStrength strength) {
4268        super();
4269        this.setStrength(strength);
4270      }
4271
4272        /**
4273         * @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
4274         */
4275        public Enumeration<BindingStrength> getStrengthElement() { 
4276          if (this.strength == null)
4277            if (Configuration.errorOnAutoCreate())
4278              throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.strength");
4279            else if (Configuration.doAutoCreate())
4280              this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory()); // bb
4281          return this.strength;
4282        }
4283
4284        public boolean hasStrengthElement() { 
4285          return this.strength != null && !this.strength.isEmpty();
4286        }
4287
4288        public boolean hasStrength() { 
4289          return this.strength != null && !this.strength.isEmpty();
4290        }
4291
4292        /**
4293         * @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
4294         */
4295        public ElementDefinitionBindingComponent setStrengthElement(Enumeration<BindingStrength> value) { 
4296          this.strength = value;
4297          return this;
4298        }
4299
4300        /**
4301         * @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.
4302         */
4303        public BindingStrength getStrength() { 
4304          return this.strength == null ? null : this.strength.getValue();
4305        }
4306
4307        /**
4308         * @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.
4309         */
4310        public ElementDefinitionBindingComponent setStrength(BindingStrength value) { 
4311            if (this.strength == null)
4312              this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory());
4313            this.strength.setValue(value);
4314          return this;
4315        }
4316
4317        /**
4318         * @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
4319         */
4320        public StringType getDescriptionElement() { 
4321          if (this.description == null)
4322            if (Configuration.errorOnAutoCreate())
4323              throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.description");
4324            else if (Configuration.doAutoCreate())
4325              this.description = new StringType(); // bb
4326          return this.description;
4327        }
4328
4329        public boolean hasDescriptionElement() { 
4330          return this.description != null && !this.description.isEmpty();
4331        }
4332
4333        public boolean hasDescription() { 
4334          return this.description != null && !this.description.isEmpty();
4335        }
4336
4337        /**
4338         * @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
4339         */
4340        public ElementDefinitionBindingComponent setDescriptionElement(StringType value) { 
4341          this.description = value;
4342          return this;
4343        }
4344
4345        /**
4346         * @return Describes the intended use of this particular set of codes.
4347         */
4348        public String getDescription() { 
4349          return this.description == null ? null : this.description.getValue();
4350        }
4351
4352        /**
4353         * @param value Describes the intended use of this particular set of codes.
4354         */
4355        public ElementDefinitionBindingComponent setDescription(String value) { 
4356          if (Utilities.noString(value))
4357            this.description = null;
4358          else {
4359            if (this.description == null)
4360              this.description = new StringType();
4361            this.description.setValue(value);
4362          }
4363          return this;
4364        }
4365
4366        /**
4367         * @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
4368         */
4369        public CanonicalType getValueSetElement() { 
4370          if (this.valueSet == null)
4371            if (Configuration.errorOnAutoCreate())
4372              throw new Error("Attempt to auto-create ElementDefinitionBindingComponent.valueSet");
4373            else if (Configuration.doAutoCreate())
4374              this.valueSet = new CanonicalType(); // bb
4375          return this.valueSet;
4376        }
4377
4378        public boolean hasValueSetElement() { 
4379          return this.valueSet != null && !this.valueSet.isEmpty();
4380        }
4381
4382        public boolean hasValueSet() { 
4383          return this.valueSet != null && !this.valueSet.isEmpty();
4384        }
4385
4386        /**
4387         * @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
4388         */
4389        public ElementDefinitionBindingComponent setValueSetElement(CanonicalType value) { 
4390          this.valueSet = value;
4391          return this;
4392        }
4393
4394        /**
4395         * @return Refers to the value set that identifies the set of codes the binding refers to.
4396         */
4397        public String getValueSet() { 
4398          return this.valueSet == null ? null : this.valueSet.getValue();
4399        }
4400
4401        /**
4402         * @param value Refers to the value set that identifies the set of codes the binding refers to.
4403         */
4404        public ElementDefinitionBindingComponent setValueSet(String value) { 
4405          if (Utilities.noString(value))
4406            this.valueSet = null;
4407          else {
4408            if (this.valueSet == null)
4409              this.valueSet = new CanonicalType();
4410            this.valueSet.setValue(value);
4411          }
4412          return this;
4413        }
4414
4415        protected void listChildren(List<Property> children) {
4416          super.listChildren(children);
4417          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));
4418          children.add(new Property("description", "string", "Describes the intended use of this particular set of codes.", 0, 1, description));
4419          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));
4420        }
4421
4422        @Override
4423        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4424          switch (_hash) {
4425          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);
4426          case -1724546052: /*description*/  return new Property("description", "string", "Describes the intended use of this particular set of codes.", 0, 1, description);
4427          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);
4428          default: return super.getNamedProperty(_hash, _name, _checkValid);
4429          }
4430
4431        }
4432
4433      @Override
4434      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4435        switch (hash) {
4436        case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : new Base[] {this.strength}; // Enumeration<BindingStrength>
4437        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
4438        case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // CanonicalType
4439        default: return super.getProperty(hash, name, checkValid);
4440        }
4441
4442      }
4443
4444      @Override
4445      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4446        switch (hash) {
4447        case 1791316033: // strength
4448          value = new BindingStrengthEnumFactory().fromType(TypeConvertor.castToCode(value));
4449          this.strength = (Enumeration) value; // Enumeration<BindingStrength>
4450          return value;
4451        case -1724546052: // description
4452          this.description = TypeConvertor.castToString(value); // StringType
4453          return value;
4454        case -1410174671: // valueSet
4455          this.valueSet = TypeConvertor.castToCanonical(value); // CanonicalType
4456          return value;
4457        default: return super.setProperty(hash, name, value);
4458        }
4459
4460      }
4461
4462      @Override
4463      public Base setProperty(String name, Base value) throws FHIRException {
4464        if (name.equals("strength")) {
4465          value = new BindingStrengthEnumFactory().fromType(TypeConvertor.castToCode(value));
4466          this.strength = (Enumeration) value; // Enumeration<BindingStrength>
4467        } else if (name.equals("description")) {
4468          this.description = TypeConvertor.castToString(value); // StringType
4469        } else if (name.equals("valueSet")) {
4470          this.valueSet = TypeConvertor.castToCanonical(value); // CanonicalType
4471        } else
4472          return super.setProperty(name, value);
4473        return value;
4474      }
4475
4476      @Override
4477      public Base makeProperty(int hash, String name) throws FHIRException {
4478        switch (hash) {
4479        case 1791316033:  return getStrengthElement();
4480        case -1724546052:  return getDescriptionElement();
4481        case -1410174671:  return getValueSetElement();
4482        default: return super.makeProperty(hash, name);
4483        }
4484
4485      }
4486
4487      @Override
4488      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4489        switch (hash) {
4490        case 1791316033: /*strength*/ return new String[] {"code"};
4491        case -1724546052: /*description*/ return new String[] {"string"};
4492        case -1410174671: /*valueSet*/ return new String[] {"canonical"};
4493        default: return super.getTypesForProperty(hash, name);
4494        }
4495
4496      }
4497
4498      @Override
4499      public Base addChild(String name) throws FHIRException {
4500        if (name.equals("strength")) {
4501          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.binding.strength");
4502        }
4503        else if (name.equals("description")) {
4504          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.binding.description");
4505        }
4506        else if (name.equals("valueSet")) {
4507          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.binding.valueSet");
4508        }
4509        else
4510          return super.addChild(name);
4511      }
4512
4513      public ElementDefinitionBindingComponent copy() {
4514        ElementDefinitionBindingComponent dst = new ElementDefinitionBindingComponent();
4515        copyValues(dst);
4516        return dst;
4517      }
4518
4519      public void copyValues(ElementDefinitionBindingComponent dst) {
4520        super.copyValues(dst);
4521        dst.strength = strength == null ? null : strength.copy();
4522        dst.description = description == null ? null : description.copy();
4523        dst.valueSet = valueSet == null ? null : valueSet.copy();
4524      }
4525
4526      @Override
4527      public boolean equalsDeep(Base other_) {
4528        if (!super.equalsDeep(other_))
4529          return false;
4530        if (!(other_ instanceof ElementDefinitionBindingComponent))
4531          return false;
4532        ElementDefinitionBindingComponent o = (ElementDefinitionBindingComponent) other_;
4533        return compareDeep(strength, o.strength, true) && compareDeep(description, o.description, true)
4534           && compareDeep(valueSet, o.valueSet, true);
4535      }
4536
4537      @Override
4538      public boolean equalsShallow(Base other_) {
4539        if (!super.equalsShallow(other_))
4540          return false;
4541        if (!(other_ instanceof ElementDefinitionBindingComponent))
4542          return false;
4543        ElementDefinitionBindingComponent o = (ElementDefinitionBindingComponent) other_;
4544        return compareValues(strength, o.strength, true) && compareValues(description, o.description, true)
4545           && compareValues(valueSet, o.valueSet, true);
4546      }
4547
4548      public boolean isEmpty() {
4549        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(strength, description, valueSet
4550          );
4551      }
4552
4553  public String fhirType() {
4554    return "ElementDefinition.binding";
4555
4556  }
4557
4558  }
4559
4560    @Block()
4561    public static class ElementDefinitionMappingComponent extends Element implements IBaseDatatypeElement {
4562        /**
4563         * An internal reference to the definition of a mapping.
4564         */
4565        @Child(name = "identity", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true)
4566        @Description(shortDefinition="Reference to mapping declaration", formalDefinition="An internal reference to the definition of a mapping." )
4567        protected IdType identity;
4568
4569        /**
4570         * Identifies the computable language in which mapping.map is expressed.
4571         */
4572        @Child(name = "language", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true)
4573        @Description(shortDefinition="Computable language of mapping", formalDefinition="Identifies the computable language in which mapping.map is expressed." )
4574        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
4575        protected CodeType language;
4576
4577        /**
4578         * Expresses what part of the target specification corresponds to this element.
4579         */
4580        @Child(name = "map", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true)
4581        @Description(shortDefinition="Details of the mapping", formalDefinition="Expresses what part of the target specification corresponds to this element." )
4582        protected StringType map;
4583
4584        /**
4585         * Comments that provide information about the mapping or its use.
4586         */
4587        @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
4588        @Description(shortDefinition="Comments about the mapping or its use", formalDefinition="Comments that provide information about the mapping or its use." )
4589        protected StringType comment;
4590
4591        private static final long serialVersionUID = 1386816887L;
4592
4593    /**
4594     * Constructor
4595     */
4596      public ElementDefinitionMappingComponent() {
4597        super();
4598      }
4599
4600    /**
4601     * Constructor
4602     */
4603      public ElementDefinitionMappingComponent(String identity, String map) {
4604        super();
4605        this.setIdentity(identity);
4606        this.setMap(map);
4607      }
4608
4609        /**
4610         * @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
4611         */
4612        public IdType getIdentityElement() { 
4613          if (this.identity == null)
4614            if (Configuration.errorOnAutoCreate())
4615              throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.identity");
4616            else if (Configuration.doAutoCreate())
4617              this.identity = new IdType(); // bb
4618          return this.identity;
4619        }
4620
4621        public boolean hasIdentityElement() { 
4622          return this.identity != null && !this.identity.isEmpty();
4623        }
4624
4625        public boolean hasIdentity() { 
4626          return this.identity != null && !this.identity.isEmpty();
4627        }
4628
4629        /**
4630         * @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
4631         */
4632        public ElementDefinitionMappingComponent setIdentityElement(IdType value) { 
4633          this.identity = value;
4634          return this;
4635        }
4636
4637        /**
4638         * @return An internal reference to the definition of a mapping.
4639         */
4640        public String getIdentity() { 
4641          return this.identity == null ? null : this.identity.getValue();
4642        }
4643
4644        /**
4645         * @param value An internal reference to the definition of a mapping.
4646         */
4647        public ElementDefinitionMappingComponent setIdentity(String value) { 
4648            if (this.identity == null)
4649              this.identity = new IdType();
4650            this.identity.setValue(value);
4651          return this;
4652        }
4653
4654        /**
4655         * @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
4656         */
4657        public CodeType getLanguageElement() { 
4658          if (this.language == null)
4659            if (Configuration.errorOnAutoCreate())
4660              throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.language");
4661            else if (Configuration.doAutoCreate())
4662              this.language = new CodeType(); // bb
4663          return this.language;
4664        }
4665
4666        public boolean hasLanguageElement() { 
4667          return this.language != null && !this.language.isEmpty();
4668        }
4669
4670        public boolean hasLanguage() { 
4671          return this.language != null && !this.language.isEmpty();
4672        }
4673
4674        /**
4675         * @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
4676         */
4677        public ElementDefinitionMappingComponent setLanguageElement(CodeType value) { 
4678          this.language = value;
4679          return this;
4680        }
4681
4682        /**
4683         * @return Identifies the computable language in which mapping.map is expressed.
4684         */
4685        public String getLanguage() { 
4686          return this.language == null ? null : this.language.getValue();
4687        }
4688
4689        /**
4690         * @param value Identifies the computable language in which mapping.map is expressed.
4691         */
4692        public ElementDefinitionMappingComponent setLanguage(String value) { 
4693          if (Utilities.noString(value))
4694            this.language = null;
4695          else {
4696            if (this.language == null)
4697              this.language = new CodeType();
4698            this.language.setValue(value);
4699          }
4700          return this;
4701        }
4702
4703        /**
4704         * @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
4705         */
4706        public StringType getMapElement() { 
4707          if (this.map == null)
4708            if (Configuration.errorOnAutoCreate())
4709              throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.map");
4710            else if (Configuration.doAutoCreate())
4711              this.map = new StringType(); // bb
4712          return this.map;
4713        }
4714
4715        public boolean hasMapElement() { 
4716          return this.map != null && !this.map.isEmpty();
4717        }
4718
4719        public boolean hasMap() { 
4720          return this.map != null && !this.map.isEmpty();
4721        }
4722
4723        /**
4724         * @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
4725         */
4726        public ElementDefinitionMappingComponent setMapElement(StringType value) { 
4727          this.map = value;
4728          return this;
4729        }
4730
4731        /**
4732         * @return Expresses what part of the target specification corresponds to this element.
4733         */
4734        public String getMap() { 
4735          return this.map == null ? null : this.map.getValue();
4736        }
4737
4738        /**
4739         * @param value Expresses what part of the target specification corresponds to this element.
4740         */
4741        public ElementDefinitionMappingComponent setMap(String value) { 
4742            if (this.map == null)
4743              this.map = new StringType();
4744            this.map.setValue(value);
4745          return this;
4746        }
4747
4748        /**
4749         * @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
4750         */
4751        public StringType getCommentElement() { 
4752          if (this.comment == null)
4753            if (Configuration.errorOnAutoCreate())
4754              throw new Error("Attempt to auto-create ElementDefinitionMappingComponent.comment");
4755            else if (Configuration.doAutoCreate())
4756              this.comment = new StringType(); // bb
4757          return this.comment;
4758        }
4759
4760        public boolean hasCommentElement() { 
4761          return this.comment != null && !this.comment.isEmpty();
4762        }
4763
4764        public boolean hasComment() { 
4765          return this.comment != null && !this.comment.isEmpty();
4766        }
4767
4768        /**
4769         * @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
4770         */
4771        public ElementDefinitionMappingComponent setCommentElement(StringType value) { 
4772          this.comment = value;
4773          return this;
4774        }
4775
4776        /**
4777         * @return Comments that provide information about the mapping or its use.
4778         */
4779        public String getComment() { 
4780          return this.comment == null ? null : this.comment.getValue();
4781        }
4782
4783        /**
4784         * @param value Comments that provide information about the mapping or its use.
4785         */
4786        public ElementDefinitionMappingComponent setComment(String value) { 
4787          if (Utilities.noString(value))
4788            this.comment = null;
4789          else {
4790            if (this.comment == null)
4791              this.comment = new StringType();
4792            this.comment.setValue(value);
4793          }
4794          return this;
4795        }
4796
4797        protected void listChildren(List<Property> children) {
4798          super.listChildren(children);
4799          children.add(new Property("identity", "id", "An internal reference to the definition of a mapping.", 0, 1, identity));
4800          children.add(new Property("language", "code", "Identifies the computable language in which mapping.map is expressed.", 0, 1, language));
4801          children.add(new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, 1, map));
4802          children.add(new Property("comment", "string", "Comments that provide information about the mapping or its use.", 0, 1, comment));
4803        }
4804
4805        @Override
4806        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4807          switch (_hash) {
4808          case -135761730: /*identity*/  return new Property("identity", "id", "An internal reference to the definition of a mapping.", 0, 1, identity);
4809          case -1613589672: /*language*/  return new Property("language", "code", "Identifies the computable language in which mapping.map is expressed.", 0, 1, language);
4810          case 107868: /*map*/  return new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, 1, map);
4811          case 950398559: /*comment*/  return new Property("comment", "string", "Comments that provide information about the mapping or its use.", 0, 1, comment);
4812          default: return super.getNamedProperty(_hash, _name, _checkValid);
4813          }
4814
4815        }
4816
4817      @Override
4818      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4819        switch (hash) {
4820        case -135761730: /*identity*/ return this.identity == null ? new Base[0] : new Base[] {this.identity}; // IdType
4821        case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType
4822        case 107868: /*map*/ return this.map == null ? new Base[0] : new Base[] {this.map}; // StringType
4823        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
4824        default: return super.getProperty(hash, name, checkValid);
4825        }
4826
4827      }
4828
4829      @Override
4830      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4831        switch (hash) {
4832        case -135761730: // identity
4833          this.identity = TypeConvertor.castToId(value); // IdType
4834          return value;
4835        case -1613589672: // language
4836          this.language = TypeConvertor.castToCode(value); // CodeType
4837          return value;
4838        case 107868: // map
4839          this.map = TypeConvertor.castToString(value); // StringType
4840          return value;
4841        case 950398559: // comment
4842          this.comment = TypeConvertor.castToString(value); // StringType
4843          return value;
4844        default: return super.setProperty(hash, name, value);
4845        }
4846
4847      }
4848
4849      @Override
4850      public Base setProperty(String name, Base value) throws FHIRException {
4851        if (name.equals("identity")) {
4852          this.identity = TypeConvertor.castToId(value); // IdType
4853        } else if (name.equals("language")) {
4854          this.language = TypeConvertor.castToCode(value); // CodeType
4855        } else if (name.equals("map")) {
4856          this.map = TypeConvertor.castToString(value); // StringType
4857        } else if (name.equals("comment")) {
4858          this.comment = TypeConvertor.castToString(value); // StringType
4859        } else
4860          return super.setProperty(name, value);
4861        return value;
4862      }
4863
4864      @Override
4865      public Base makeProperty(int hash, String name) throws FHIRException {
4866        switch (hash) {
4867        case -135761730:  return getIdentityElement();
4868        case -1613589672:  return getLanguageElement();
4869        case 107868:  return getMapElement();
4870        case 950398559:  return getCommentElement();
4871        default: return super.makeProperty(hash, name);
4872        }
4873
4874      }
4875
4876      @Override
4877      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4878        switch (hash) {
4879        case -135761730: /*identity*/ return new String[] {"id"};
4880        case -1613589672: /*language*/ return new String[] {"code"};
4881        case 107868: /*map*/ return new String[] {"string"};
4882        case 950398559: /*comment*/ return new String[] {"string"};
4883        default: return super.getTypesForProperty(hash, name);
4884        }
4885
4886      }
4887
4888      @Override
4889      public Base addChild(String name) throws FHIRException {
4890        if (name.equals("identity")) {
4891          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.mapping.identity");
4892        }
4893        else if (name.equals("language")) {
4894          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.mapping.language");
4895        }
4896        else if (name.equals("map")) {
4897          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.mapping.map");
4898        }
4899        else if (name.equals("comment")) {
4900          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.mapping.comment");
4901        }
4902        else
4903          return super.addChild(name);
4904      }
4905
4906      public ElementDefinitionMappingComponent copy() {
4907        ElementDefinitionMappingComponent dst = new ElementDefinitionMappingComponent();
4908        copyValues(dst);
4909        return dst;
4910      }
4911
4912      public void copyValues(ElementDefinitionMappingComponent dst) {
4913        super.copyValues(dst);
4914        dst.identity = identity == null ? null : identity.copy();
4915        dst.language = language == null ? null : language.copy();
4916        dst.map = map == null ? null : map.copy();
4917        dst.comment = comment == null ? null : comment.copy();
4918      }
4919
4920      @Override
4921      public boolean equalsDeep(Base other_) {
4922        if (!super.equalsDeep(other_))
4923          return false;
4924        if (!(other_ instanceof ElementDefinitionMappingComponent))
4925          return false;
4926        ElementDefinitionMappingComponent o = (ElementDefinitionMappingComponent) other_;
4927        return compareDeep(identity, o.identity, true) && compareDeep(language, o.language, true) && compareDeep(map, o.map, true)
4928           && compareDeep(comment, o.comment, true);
4929      }
4930
4931      @Override
4932      public boolean equalsShallow(Base other_) {
4933        if (!super.equalsShallow(other_))
4934          return false;
4935        if (!(other_ instanceof ElementDefinitionMappingComponent))
4936          return false;
4937        ElementDefinitionMappingComponent o = (ElementDefinitionMappingComponent) other_;
4938        return compareValues(identity, o.identity, true) && compareValues(language, o.language, true) && compareValues(map, o.map, true)
4939           && compareValues(comment, o.comment, true);
4940      }
4941
4942      public boolean isEmpty() {
4943        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identity, language, map
4944          , comment);
4945      }
4946
4947  public String fhirType() {
4948    return "ElementDefinition.mapping";
4949
4950  }
4951
4952  }
4953
4954    /**
4955     * The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.
4956     */
4957    @Child(name = "path", type = {StringType.class}, order=0, min=1, max=1, modifier=false, summary=true)
4958    @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." )
4959    protected StringType path;
4960
4961    /**
4962     * Codes that define how this element is represented in instances, when the deviation varies from the normal case.
4963     */
4964    @Child(name = "representation", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4965    @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." )
4966    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/property-representation")
4967    protected List<Enumeration<PropertyRepresentation>> representation;
4968
4969    /**
4970     * 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.
4971     */
4972    @Child(name = "sliceName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
4973    @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." )
4974    protected StringType sliceName;
4975
4976    /**
4977     * 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.
4978     */
4979    @Child(name = "sliceIsConstraining", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true)
4980    @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." )
4981    protected BooleanType sliceIsConstraining;
4982
4983    /**
4984     * 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.
4985     */
4986    @Child(name = "label", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
4987    @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." )
4988    protected StringType label;
4989
4990    /**
4991     * A code that has the same meaning as the element in a particular terminology.
4992     */
4993    @Child(name = "code", type = {Coding.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4994    @Description(shortDefinition="Corresponding codes in terminologies", formalDefinition="A code that has the same meaning as the element in a particular terminology." )
4995    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes")
4996    protected List<Coding> code;
4997
4998    /**
4999     * 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).
5000     */
5001    @Child(name = "slicing", type = {}, order=6, min=0, max=1, modifier=false, summary=true)
5002    @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)." )
5003    protected ElementDefinitionSlicingComponent slicing;
5004
5005    /**
5006     * A concise description of what this element means (e.g. for use in autogenerated summaries).
5007     */
5008    @Child(name = "short", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true)
5009    @Description(shortDefinition="Concise definition for space-constrained presentation", formalDefinition="A concise description of what this element means (e.g. for use in autogenerated summaries)." )
5010    protected StringType short_;
5011
5012    /**
5013     * 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).
5014     */
5015    @Child(name = "definition", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=true)
5016    @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)." )
5017    protected MarkdownType definition;
5018
5019    /**
5020     * 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).
5021     */
5022    @Child(name = "comment", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true)
5023    @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)." )
5024    protected MarkdownType comment;
5025
5026    /**
5027     * 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.
5028     */
5029    @Child(name = "requirements", type = {MarkdownType.class}, order=10, min=0, max=1, modifier=false, summary=true)
5030    @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." )
5031    protected MarkdownType requirements;
5032
5033    /**
5034     * Identifies additional names by which this element might also be known.
5035     */
5036    @Child(name = "alias", type = {StringType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5037    @Description(shortDefinition="Other names", formalDefinition="Identifies additional names by which this element might also be known." )
5038    protected List<StringType> alias;
5039
5040    /**
5041     * The minimum number of times this element SHALL appear in the instance.
5042     */
5043    @Child(name = "min", type = {UnsignedIntType.class}, order=12, min=0, max=1, modifier=false, summary=true)
5044    @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this element SHALL appear in the instance." )
5045    protected UnsignedIntType min;
5046
5047    /**
5048     * The maximum number of times this element is permitted to appear in the instance.
5049     */
5050    @Child(name = "max", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=true)
5051    @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the instance." )
5052    protected StringType max;
5053
5054    /**
5055     * 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 - i.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.
5056     */
5057    @Child(name = "base", type = {}, order=14, min=0, max=1, modifier=false, summary=true)
5058    @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 - i.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." )
5059    protected ElementDefinitionBaseComponent base;
5060
5061    /**
5062     * 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.
5063     */
5064    @Child(name = "contentReference", type = {UriType.class}, order=15, min=0, max=1, modifier=false, summary=true)
5065    @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." )
5066    protected UriType contentReference;
5067
5068    /**
5069     * The data type or resource that the value of this element is permitted to be.
5070     */
5071    @Child(name = "type", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5072    @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." )
5073    protected List<TypeRefComponent> type;
5074
5075    /**
5076     * 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').
5077     */
5078    @Child(name = "defaultValue", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.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, Contributor.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Dosage.class, Meta.class}, order=17, min=0, max=1, modifier=false, summary=true)
5079    @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')." )
5080    protected DataType defaultValue;
5081
5082    /**
5083     * The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').
5084     */
5085    @Child(name = "meaningWhenMissing", type = {MarkdownType.class}, order=18, min=0, max=1, modifier=false, summary=true)
5086    @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')." )
5087    protected MarkdownType meaningWhenMissing;
5088
5089    /**
5090     * 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.
5091     */
5092    @Child(name = "orderMeaning", type = {StringType.class}, order=19, min=0, max=1, modifier=false, summary=true)
5093    @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." )
5094    protected StringType orderMeaning;
5095
5096    /**
5097     * Specifies a value that SHALL be exactly the value  for this element in the instance. 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.
5098     */
5099    @Child(name = "fixed", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.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, Contributor.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Dosage.class, Meta.class}, order=20, min=0, max=1, modifier=false, summary=true)
5100    @Description(shortDefinition="Value must be exactly this", formalDefinition="Specifies a value that SHALL be exactly the value  for this element in the instance. 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." )
5101    protected DataType fixed;
5102
5103    /**
5104     * Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
5105
5106When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
5107
5108When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
5109
5110When 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.,
5111
51121. If primitive: it must match exactly the pattern value
51132. If a complex object: it must match (recursively) the pattern value
51143. If an array: it must match (recursively) the pattern value.
5115     */
5116    @Child(name = "pattern", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.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, Contributor.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Dosage.class, Meta.class}, order=21, min=0, max=1, modifier=false, summary=true)
5117    @Description(shortDefinition="Value must have at least these property values", formalDefinition="Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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." )
5118    protected DataType pattern;
5119
5120    /**
5121     * A sample value for this element demonstrating the type of information that would typically be found in the element.
5122     */
5123    @Child(name = "example", type = {}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5124    @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." )
5125    protected List<ElementDefinitionExampleComponent> example;
5126
5127    /**
5128     * 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.
5129     */
5130    @Child(name = "minValue", type = {DateType.class, DateTimeType.class, InstantType.class, TimeType.class, DecimalType.class, IntegerType.class, PositiveIntType.class, UnsignedIntType.class, Quantity.class}, order=23, min=0, max=1, modifier=false, summary=true)
5131    @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." )
5132    protected DataType minValue;
5133
5134    /**
5135     * 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.
5136     */
5137    @Child(name = "maxValue", type = {DateType.class, DateTimeType.class, InstantType.class, TimeType.class, DecimalType.class, IntegerType.class, PositiveIntType.class, UnsignedIntType.class, Quantity.class}, order=24, min=0, max=1, modifier=false, summary=true)
5138    @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." )
5139    protected DataType maxValue;
5140
5141    /**
5142     * 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.
5143     */
5144    @Child(name = "maxLength", type = {IntegerType.class}, order=25, min=0, max=1, modifier=false, summary=true)
5145    @Description(shortDefinition="Max length for strings", 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." )
5146    protected IntegerType maxLength;
5147
5148    /**
5149     * A reference to an invariant that may make additional statements about the cardinality or value in the instance.
5150     */
5151    @Child(name = "condition", type = {IdType.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5152    @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." )
5153    protected List<IdType> condition;
5154
5155    /**
5156     * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.
5157     */
5158    @Child(name = "constraint", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5159    @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." )
5160    protected List<ElementDefinitionConstraintComponent> constraint;
5161
5162    /**
5163     * If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way.  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.
5164     */
5165    @Child(name = "mustSupport", type = {BooleanType.class}, order=28, min=0, max=1, modifier=false, summary=true)
5166    @Description(shortDefinition="If the element must be supported", formalDefinition="If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way.  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." )
5167    protected BooleanType mustSupport;
5168
5169    /**
5170     * 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.
5171     */
5172    @Child(name = "isModifier", type = {BooleanType.class}, order=29, min=0, max=1, modifier=false, summary=true)
5173    @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." )
5174    protected BooleanType isModifier;
5175
5176    /**
5177     * Explains how that element affects the interpretation of the resource or element that contains it.
5178     */
5179    @Child(name = "isModifierReason", type = {StringType.class}, order=30, min=0, max=1, modifier=false, summary=true)
5180    @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." )
5181    protected StringType isModifierReason;
5182
5183    /**
5184     * Whether the element should be included if a client requests a search with the parameter _summary=true.
5185     */
5186    @Child(name = "isSummary", type = {BooleanType.class}, order=31, min=0, max=1, modifier=false, summary=true)
5187    @Description(shortDefinition="Include when _summary = true?", formalDefinition="Whether the element should be included if a client requests a search with the parameter _summary=true." )
5188    protected BooleanType isSummary;
5189
5190    /**
5191     * Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).
5192     */
5193    @Child(name = "binding", type = {}, order=32, min=0, max=1, modifier=false, summary=true)
5194    @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)." )
5195    protected ElementDefinitionBindingComponent binding;
5196
5197    /**
5198     * Identifies a concept from an external specification that roughly corresponds to this element.
5199     */
5200    @Child(name = "mapping", type = {}, order=33, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
5201    @Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." )
5202    protected List<ElementDefinitionMappingComponent> mapping;
5203
5204    private static final long serialVersionUID = 821951601L;
5205
5206  /**
5207   * Constructor
5208   */
5209    public ElementDefinition() {
5210      super();
5211    }
5212
5213  /**
5214   * Constructor
5215   */
5216    public ElementDefinition(String path) {
5217      super();
5218      this.setPath(path);
5219    }
5220
5221    /**
5222     * @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
5223     */
5224    public StringType getPathElement() { 
5225      if (this.path == null)
5226        if (Configuration.errorOnAutoCreate())
5227          throw new Error("Attempt to auto-create ElementDefinition.path");
5228        else if (Configuration.doAutoCreate())
5229          this.path = new StringType(); // bb
5230      return this.path;
5231    }
5232
5233    public boolean hasPathElement() { 
5234      return this.path != null && !this.path.isEmpty();
5235    }
5236
5237    public boolean hasPath() { 
5238      return this.path != null && !this.path.isEmpty();
5239    }
5240
5241    /**
5242     * @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
5243     */
5244    public ElementDefinition setPathElement(StringType value) { 
5245      this.path = value;
5246      return this;
5247    }
5248
5249    /**
5250     * @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.
5251     */
5252    public String getPath() { 
5253      return this.path == null ? null : this.path.getValue();
5254    }
5255
5256    /**
5257     * @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.
5258     */
5259    public ElementDefinition setPath(String value) { 
5260        if (this.path == null)
5261          this.path = new StringType();
5262        this.path.setValue(value);
5263      return this;
5264    }
5265
5266    /**
5267     * @return {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.)
5268     */
5269    public List<Enumeration<PropertyRepresentation>> getRepresentation() { 
5270      if (this.representation == null)
5271        this.representation = new ArrayList<Enumeration<PropertyRepresentation>>();
5272      return this.representation;
5273    }
5274
5275    /**
5276     * @return Returns a reference to <code>this</code> for easy method chaining
5277     */
5278    public ElementDefinition setRepresentation(List<Enumeration<PropertyRepresentation>> theRepresentation) { 
5279      this.representation = theRepresentation;
5280      return this;
5281    }
5282
5283    public boolean hasRepresentation() { 
5284      if (this.representation == null)
5285        return false;
5286      for (Enumeration<PropertyRepresentation> item : this.representation)
5287        if (!item.isEmpty())
5288          return true;
5289      return false;
5290    }
5291
5292    /**
5293     * @return {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.)
5294     */
5295    public Enumeration<PropertyRepresentation> addRepresentationElement() {//2 
5296      Enumeration<PropertyRepresentation> t = new Enumeration<PropertyRepresentation>(new PropertyRepresentationEnumFactory());
5297      if (this.representation == null)
5298        this.representation = new ArrayList<Enumeration<PropertyRepresentation>>();
5299      this.representation.add(t);
5300      return t;
5301    }
5302
5303    /**
5304     * @param value {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.)
5305     */
5306    public ElementDefinition addRepresentation(PropertyRepresentation value) { //1
5307      Enumeration<PropertyRepresentation> t = new Enumeration<PropertyRepresentation>(new PropertyRepresentationEnumFactory());
5308      t.setValue(value);
5309      if (this.representation == null)
5310        this.representation = new ArrayList<Enumeration<PropertyRepresentation>>();
5311      this.representation.add(t);
5312      return this;
5313    }
5314
5315    /**
5316     * @param value {@link #representation} (Codes that define how this element is represented in instances, when the deviation varies from the normal case.)
5317     */
5318    public boolean hasRepresentation(PropertyRepresentation value) { 
5319      if (this.representation == null)
5320        return false;
5321      for (Enumeration<PropertyRepresentation> v : this.representation)
5322        if (v.getValue().equals(value)) // code
5323          return true;
5324      return false;
5325    }
5326
5327    /**
5328     * @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
5329     */
5330    public StringType getSliceNameElement() { 
5331      if (this.sliceName == null)
5332        if (Configuration.errorOnAutoCreate())
5333          throw new Error("Attempt to auto-create ElementDefinition.sliceName");
5334        else if (Configuration.doAutoCreate())
5335          this.sliceName = new StringType(); // bb
5336      return this.sliceName;
5337    }
5338
5339    public boolean hasSliceNameElement() { 
5340      return this.sliceName != null && !this.sliceName.isEmpty();
5341    }
5342
5343    public boolean hasSliceName() { 
5344      return this.sliceName != null && !this.sliceName.isEmpty();
5345    }
5346
5347    /**
5348     * @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
5349     */
5350    public ElementDefinition setSliceNameElement(StringType value) { 
5351      this.sliceName = value;
5352      return this;
5353    }
5354
5355    /**
5356     * @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.
5357     */
5358    public String getSliceName() { 
5359      return this.sliceName == null ? null : this.sliceName.getValue();
5360    }
5361
5362    /**
5363     * @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.
5364     */
5365    public ElementDefinition setSliceName(String value) { 
5366      if (Utilities.noString(value))
5367        this.sliceName = null;
5368      else {
5369        if (this.sliceName == null)
5370          this.sliceName = new StringType();
5371        this.sliceName.setValue(value);
5372      }
5373      return this;
5374    }
5375
5376    /**
5377     * @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
5378     */
5379    public BooleanType getSliceIsConstrainingElement() { 
5380      if (this.sliceIsConstraining == null)
5381        if (Configuration.errorOnAutoCreate())
5382          throw new Error("Attempt to auto-create ElementDefinition.sliceIsConstraining");
5383        else if (Configuration.doAutoCreate())
5384          this.sliceIsConstraining = new BooleanType(); // bb
5385      return this.sliceIsConstraining;
5386    }
5387
5388    public boolean hasSliceIsConstrainingElement() { 
5389      return this.sliceIsConstraining != null && !this.sliceIsConstraining.isEmpty();
5390    }
5391
5392    public boolean hasSliceIsConstraining() { 
5393      return this.sliceIsConstraining != null && !this.sliceIsConstraining.isEmpty();
5394    }
5395
5396    /**
5397     * @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
5398     */
5399    public ElementDefinition setSliceIsConstrainingElement(BooleanType value) { 
5400      this.sliceIsConstraining = value;
5401      return this;
5402    }
5403
5404    /**
5405     * @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.
5406     */
5407    public boolean getSliceIsConstraining() { 
5408      return this.sliceIsConstraining == null || this.sliceIsConstraining.isEmpty() ? false : this.sliceIsConstraining.getValue();
5409    }
5410
5411    /**
5412     * @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.
5413     */
5414    public ElementDefinition setSliceIsConstraining(boolean value) { 
5415        if (this.sliceIsConstraining == null)
5416          this.sliceIsConstraining = new BooleanType();
5417        this.sliceIsConstraining.setValue(value);
5418      return this;
5419    }
5420
5421    /**
5422     * @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
5423     */
5424    public StringType getLabelElement() { 
5425      if (this.label == null)
5426        if (Configuration.errorOnAutoCreate())
5427          throw new Error("Attempt to auto-create ElementDefinition.label");
5428        else if (Configuration.doAutoCreate())
5429          this.label = new StringType(); // bb
5430      return this.label;
5431    }
5432
5433    public boolean hasLabelElement() { 
5434      return this.label != null && !this.label.isEmpty();
5435    }
5436
5437    public boolean hasLabel() { 
5438      return this.label != null && !this.label.isEmpty();
5439    }
5440
5441    /**
5442     * @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
5443     */
5444    public ElementDefinition setLabelElement(StringType value) { 
5445      this.label = value;
5446      return this;
5447    }
5448
5449    /**
5450     * @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.
5451     */
5452    public String getLabel() { 
5453      return this.label == null ? null : this.label.getValue();
5454    }
5455
5456    /**
5457     * @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.
5458     */
5459    public ElementDefinition setLabel(String value) { 
5460      if (Utilities.noString(value))
5461        this.label = null;
5462      else {
5463        if (this.label == null)
5464          this.label = new StringType();
5465        this.label.setValue(value);
5466      }
5467      return this;
5468    }
5469
5470    /**
5471     * @return {@link #code} (A code that has the same meaning as the element in a particular terminology.)
5472     */
5473    public List<Coding> getCode() { 
5474      if (this.code == null)
5475        this.code = new ArrayList<Coding>();
5476      return this.code;
5477    }
5478
5479    /**
5480     * @return Returns a reference to <code>this</code> for easy method chaining
5481     */
5482    public ElementDefinition setCode(List<Coding> theCode) { 
5483      this.code = theCode;
5484      return this;
5485    }
5486
5487    public boolean hasCode() { 
5488      if (this.code == null)
5489        return false;
5490      for (Coding item : this.code)
5491        if (!item.isEmpty())
5492          return true;
5493      return false;
5494    }
5495
5496    public Coding addCode() { //3
5497      Coding t = new Coding();
5498      if (this.code == null)
5499        this.code = new ArrayList<Coding>();
5500      this.code.add(t);
5501      return t;
5502    }
5503
5504    public ElementDefinition addCode(Coding t) { //3
5505      if (t == null)
5506        return this;
5507      if (this.code == null)
5508        this.code = new ArrayList<Coding>();
5509      this.code.add(t);
5510      return this;
5511    }
5512
5513    /**
5514     * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist {3}
5515     */
5516    public Coding getCodeFirstRep() { 
5517      if (getCode().isEmpty()) {
5518        addCode();
5519      }
5520      return getCode().get(0);
5521    }
5522
5523    /**
5524     * @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).)
5525     */
5526    public ElementDefinitionSlicingComponent getSlicing() { 
5527      if (this.slicing == null)
5528        if (Configuration.errorOnAutoCreate())
5529          throw new Error("Attempt to auto-create ElementDefinition.slicing");
5530        else if (Configuration.doAutoCreate())
5531          this.slicing = new ElementDefinitionSlicingComponent(); // cc
5532      return this.slicing;
5533    }
5534
5535    public boolean hasSlicing() { 
5536      return this.slicing != null && !this.slicing.isEmpty();
5537    }
5538
5539    /**
5540     * @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).)
5541     */
5542    public ElementDefinition setSlicing(ElementDefinitionSlicingComponent value) { 
5543      this.slicing = value;
5544      return this;
5545    }
5546
5547    /**
5548     * @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
5549     */
5550    public StringType getShortElement() { 
5551      if (this.short_ == null)
5552        if (Configuration.errorOnAutoCreate())
5553          throw new Error("Attempt to auto-create ElementDefinition.short_");
5554        else if (Configuration.doAutoCreate())
5555          this.short_ = new StringType(); // bb
5556      return this.short_;
5557    }
5558
5559    public boolean hasShortElement() { 
5560      return this.short_ != null && !this.short_.isEmpty();
5561    }
5562
5563    public boolean hasShort() { 
5564      return this.short_ != null && !this.short_.isEmpty();
5565    }
5566
5567    /**
5568     * @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
5569     */
5570    public ElementDefinition setShortElement(StringType value) { 
5571      this.short_ = value;
5572      return this;
5573    }
5574
5575    /**
5576     * @return A concise description of what this element means (e.g. for use in autogenerated summaries).
5577     */
5578    public String getShort() { 
5579      return this.short_ == null ? null : this.short_.getValue();
5580    }
5581
5582    /**
5583     * @param value A concise description of what this element means (e.g. for use in autogenerated summaries).
5584     */
5585    public ElementDefinition setShort(String value) { 
5586      if (Utilities.noString(value))
5587        this.short_ = null;
5588      else {
5589        if (this.short_ == null)
5590          this.short_ = new StringType();
5591        this.short_.setValue(value);
5592      }
5593      return this;
5594    }
5595
5596    /**
5597     * @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
5598     */
5599    public MarkdownType getDefinitionElement() { 
5600      if (this.definition == null)
5601        if (Configuration.errorOnAutoCreate())
5602          throw new Error("Attempt to auto-create ElementDefinition.definition");
5603        else if (Configuration.doAutoCreate())
5604          this.definition = new MarkdownType(); // bb
5605      return this.definition;
5606    }
5607
5608    public boolean hasDefinitionElement() { 
5609      return this.definition != null && !this.definition.isEmpty();
5610    }
5611
5612    public boolean hasDefinition() { 
5613      return this.definition != null && !this.definition.isEmpty();
5614    }
5615
5616    /**
5617     * @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
5618     */
5619    public ElementDefinition setDefinitionElement(MarkdownType value) { 
5620      this.definition = value;
5621      return this;
5622    }
5623
5624    /**
5625     * @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).
5626     */
5627    public String getDefinition() { 
5628      return this.definition == null ? null : this.definition.getValue();
5629    }
5630
5631    /**
5632     * @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).
5633     */
5634    public ElementDefinition setDefinition(String value) { 
5635      if (value == null)
5636        this.definition = null;
5637      else {
5638        if (this.definition == null)
5639          this.definition = new MarkdownType();
5640        this.definition.setValue(value);
5641      }
5642      return this;
5643    }
5644
5645    /**
5646     * @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
5647     */
5648    public MarkdownType getCommentElement() { 
5649      if (this.comment == null)
5650        if (Configuration.errorOnAutoCreate())
5651          throw new Error("Attempt to auto-create ElementDefinition.comment");
5652        else if (Configuration.doAutoCreate())
5653          this.comment = new MarkdownType(); // bb
5654      return this.comment;
5655    }
5656
5657    public boolean hasCommentElement() { 
5658      return this.comment != null && !this.comment.isEmpty();
5659    }
5660
5661    public boolean hasComment() { 
5662      return this.comment != null && !this.comment.isEmpty();
5663    }
5664
5665    /**
5666     * @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
5667     */
5668    public ElementDefinition setCommentElement(MarkdownType value) { 
5669      this.comment = value;
5670      return this;
5671    }
5672
5673    /**
5674     * @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).
5675     */
5676    public String getComment() { 
5677      return this.comment == null ? null : this.comment.getValue();
5678    }
5679
5680    /**
5681     * @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).
5682     */
5683    public ElementDefinition setComment(String value) { 
5684      if (value == null)
5685        this.comment = null;
5686      else {
5687        if (this.comment == null)
5688          this.comment = new MarkdownType();
5689        this.comment.setValue(value);
5690      }
5691      return this;
5692    }
5693
5694    /**
5695     * @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
5696     */
5697    public MarkdownType getRequirementsElement() { 
5698      if (this.requirements == null)
5699        if (Configuration.errorOnAutoCreate())
5700          throw new Error("Attempt to auto-create ElementDefinition.requirements");
5701        else if (Configuration.doAutoCreate())
5702          this.requirements = new MarkdownType(); // bb
5703      return this.requirements;
5704    }
5705
5706    public boolean hasRequirementsElement() { 
5707      return this.requirements != null && !this.requirements.isEmpty();
5708    }
5709
5710    public boolean hasRequirements() { 
5711      return this.requirements != null && !this.requirements.isEmpty();
5712    }
5713
5714    /**
5715     * @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
5716     */
5717    public ElementDefinition setRequirementsElement(MarkdownType value) { 
5718      this.requirements = value;
5719      return this;
5720    }
5721
5722    /**
5723     * @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.
5724     */
5725    public String getRequirements() { 
5726      return this.requirements == null ? null : this.requirements.getValue();
5727    }
5728
5729    /**
5730     * @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.
5731     */
5732    public ElementDefinition setRequirements(String value) { 
5733      if (value == null)
5734        this.requirements = null;
5735      else {
5736        if (this.requirements == null)
5737          this.requirements = new MarkdownType();
5738        this.requirements.setValue(value);
5739      }
5740      return this;
5741    }
5742
5743    /**
5744     * @return {@link #alias} (Identifies additional names by which this element might also be known.)
5745     */
5746    public List<StringType> getAlias() { 
5747      if (this.alias == null)
5748        this.alias = new ArrayList<StringType>();
5749      return this.alias;
5750    }
5751
5752    /**
5753     * @return Returns a reference to <code>this</code> for easy method chaining
5754     */
5755    public ElementDefinition setAlias(List<StringType> theAlias) { 
5756      this.alias = theAlias;
5757      return this;
5758    }
5759
5760    public boolean hasAlias() { 
5761      if (this.alias == null)
5762        return false;
5763      for (StringType item : this.alias)
5764        if (!item.isEmpty())
5765          return true;
5766      return false;
5767    }
5768
5769    /**
5770     * @return {@link #alias} (Identifies additional names by which this element might also be known.)
5771     */
5772    public StringType addAliasElement() {//2 
5773      StringType t = new StringType();
5774      if (this.alias == null)
5775        this.alias = new ArrayList<StringType>();
5776      this.alias.add(t);
5777      return t;
5778    }
5779
5780    /**
5781     * @param value {@link #alias} (Identifies additional names by which this element might also be known.)
5782     */
5783    public ElementDefinition addAlias(String value) { //1
5784      StringType t = new StringType();
5785      t.setValue(value);
5786      if (this.alias == null)
5787        this.alias = new ArrayList<StringType>();
5788      this.alias.add(t);
5789      return this;
5790    }
5791
5792    /**
5793     * @param value {@link #alias} (Identifies additional names by which this element might also be known.)
5794     */
5795    public boolean hasAlias(String value) { 
5796      if (this.alias == null)
5797        return false;
5798      for (StringType v : this.alias)
5799        if (v.getValue().equals(value)) // string
5800          return true;
5801      return false;
5802    }
5803
5804    /**
5805     * @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
5806     */
5807    public UnsignedIntType getMinElement() { 
5808      if (this.min == null)
5809        if (Configuration.errorOnAutoCreate())
5810          throw new Error("Attempt to auto-create ElementDefinition.min");
5811        else if (Configuration.doAutoCreate())
5812          this.min = new UnsignedIntType(); // bb
5813      return this.min;
5814    }
5815
5816    public boolean hasMinElement() { 
5817      return this.min != null && !this.min.isEmpty();
5818    }
5819
5820    public boolean hasMin() { 
5821      return this.min != null && !this.min.isEmpty();
5822    }
5823
5824    /**
5825     * @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
5826     */
5827    public ElementDefinition setMinElement(UnsignedIntType value) { 
5828      this.min = value;
5829      return this;
5830    }
5831
5832    /**
5833     * @return The minimum number of times this element SHALL appear in the instance.
5834     */
5835    public int getMin() { 
5836      return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue();
5837    }
5838
5839    /**
5840     * @param value The minimum number of times this element SHALL appear in the instance.
5841     */
5842    public ElementDefinition setMin(int value) { 
5843        if (this.min == null)
5844          this.min = new UnsignedIntType();
5845        this.min.setValue(value);
5846      return this;
5847    }
5848
5849    /**
5850     * @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
5851     */
5852    public StringType getMaxElement() { 
5853      if (this.max == null)
5854        if (Configuration.errorOnAutoCreate())
5855          throw new Error("Attempt to auto-create ElementDefinition.max");
5856        else if (Configuration.doAutoCreate())
5857          this.max = new StringType(); // bb
5858      return this.max;
5859    }
5860
5861    public boolean hasMaxElement() { 
5862      return this.max != null && !this.max.isEmpty();
5863    }
5864
5865    public boolean hasMax() { 
5866      return this.max != null && !this.max.isEmpty();
5867    }
5868
5869    /**
5870     * @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
5871     */
5872    public ElementDefinition setMaxElement(StringType value) { 
5873      this.max = value;
5874      return this;
5875    }
5876
5877    /**
5878     * @return The maximum number of times this element is permitted to appear in the instance.
5879     */
5880    public String getMax() { 
5881      return this.max == null ? null : this.max.getValue();
5882    }
5883
5884    /**
5885     * @param value The maximum number of times this element is permitted to appear in the instance.
5886     */
5887    public ElementDefinition setMax(String value) { 
5888      if (Utilities.noString(value))
5889        this.max = null;
5890      else {
5891        if (this.max == null)
5892          this.max = new StringType();
5893        this.max.setValue(value);
5894      }
5895      return this;
5896    }
5897
5898    /**
5899     * @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 - i.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.)
5900     */
5901    public ElementDefinitionBaseComponent getBase() { 
5902      if (this.base == null)
5903        if (Configuration.errorOnAutoCreate())
5904          throw new Error("Attempt to auto-create ElementDefinition.base");
5905        else if (Configuration.doAutoCreate())
5906          this.base = new ElementDefinitionBaseComponent(); // cc
5907      return this.base;
5908    }
5909
5910    public boolean hasBase() { 
5911      return this.base != null && !this.base.isEmpty();
5912    }
5913
5914    /**
5915     * @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 - i.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.)
5916     */
5917    public ElementDefinition setBase(ElementDefinitionBaseComponent value) { 
5918      this.base = value;
5919      return this;
5920    }
5921
5922    /**
5923     * @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
5924     */
5925    public UriType getContentReferenceElement() { 
5926      if (this.contentReference == null)
5927        if (Configuration.errorOnAutoCreate())
5928          throw new Error("Attempt to auto-create ElementDefinition.contentReference");
5929        else if (Configuration.doAutoCreate())
5930          this.contentReference = new UriType(); // bb
5931      return this.contentReference;
5932    }
5933
5934    public boolean hasContentReferenceElement() { 
5935      return this.contentReference != null && !this.contentReference.isEmpty();
5936    }
5937
5938    public boolean hasContentReference() { 
5939      return this.contentReference != null && !this.contentReference.isEmpty();
5940    }
5941
5942    /**
5943     * @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
5944     */
5945    public ElementDefinition setContentReferenceElement(UriType value) { 
5946      this.contentReference = value;
5947      return this;
5948    }
5949
5950    /**
5951     * @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.
5952     */
5953    public String getContentReference() { 
5954      return this.contentReference == null ? null : this.contentReference.getValue();
5955    }
5956
5957    /**
5958     * @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.
5959     */
5960    public ElementDefinition setContentReference(String value) { 
5961      if (Utilities.noString(value))
5962        this.contentReference = null;
5963      else {
5964        if (this.contentReference == null)
5965          this.contentReference = new UriType();
5966        this.contentReference.setValue(value);
5967      }
5968      return this;
5969    }
5970
5971    /**
5972     * @return {@link #type} (The data type or resource that the value of this element is permitted to be.)
5973     */
5974    public List<TypeRefComponent> getType() { 
5975      if (this.type == null)
5976        this.type = new ArrayList<TypeRefComponent>();
5977      return this.type;
5978    }
5979
5980    /**
5981     * @return Returns a reference to <code>this</code> for easy method chaining
5982     */
5983    public ElementDefinition setType(List<TypeRefComponent> theType) { 
5984      this.type = theType;
5985      return this;
5986    }
5987
5988    public boolean hasType() { 
5989      if (this.type == null)
5990        return false;
5991      for (TypeRefComponent item : this.type)
5992        if (!item.isEmpty())
5993          return true;
5994      return false;
5995    }
5996
5997    public TypeRefComponent addType() { //3
5998      TypeRefComponent t = new TypeRefComponent();
5999      if (this.type == null)
6000        this.type = new ArrayList<TypeRefComponent>();
6001      this.type.add(t);
6002      return t;
6003    }
6004
6005    public ElementDefinition addType(TypeRefComponent t) { //3
6006      if (t == null)
6007        return this;
6008      if (this.type == null)
6009        this.type = new ArrayList<TypeRefComponent>();
6010      this.type.add(t);
6011      return this;
6012    }
6013
6014    /**
6015     * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3}
6016     */
6017    public TypeRefComponent getTypeFirstRep() { 
6018      if (getType().isEmpty()) {
6019        addType();
6020      }
6021      return getType().get(0);
6022    }
6023
6024    /**
6025     * @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').)
6026     */
6027    public DataType getDefaultValue() { 
6028      return this.defaultValue;
6029    }
6030
6031    /**
6032     * @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').)
6033     */
6034    public Base64BinaryType getDefaultValueBase64BinaryType() throws FHIRException { 
6035      if (this.defaultValue == null)
6036        this.defaultValue = new Base64BinaryType();
6037      if (!(this.defaultValue instanceof Base64BinaryType))
6038        throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6039      return (Base64BinaryType) this.defaultValue;
6040    }
6041
6042    public boolean hasDefaultValueBase64BinaryType() { 
6043      return this != null && this.defaultValue instanceof Base64BinaryType;
6044    }
6045
6046    /**
6047     * @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').)
6048     */
6049    public BooleanType getDefaultValueBooleanType() throws FHIRException { 
6050      if (this.defaultValue == null)
6051        this.defaultValue = new BooleanType();
6052      if (!(this.defaultValue instanceof BooleanType))
6053        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6054      return (BooleanType) this.defaultValue;
6055    }
6056
6057    public boolean hasDefaultValueBooleanType() { 
6058      return this != null && this.defaultValue instanceof BooleanType;
6059    }
6060
6061    /**
6062     * @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').)
6063     */
6064    public CanonicalType getDefaultValueCanonicalType() throws FHIRException { 
6065      if (this.defaultValue == null)
6066        this.defaultValue = new CanonicalType();
6067      if (!(this.defaultValue instanceof CanonicalType))
6068        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6069      return (CanonicalType) this.defaultValue;
6070    }
6071
6072    public boolean hasDefaultValueCanonicalType() { 
6073      return this != null && this.defaultValue instanceof CanonicalType;
6074    }
6075
6076    /**
6077     * @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').)
6078     */
6079    public CodeType getDefaultValueCodeType() throws FHIRException { 
6080      if (this.defaultValue == null)
6081        this.defaultValue = new CodeType();
6082      if (!(this.defaultValue instanceof CodeType))
6083        throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6084      return (CodeType) this.defaultValue;
6085    }
6086
6087    public boolean hasDefaultValueCodeType() { 
6088      return this != null && this.defaultValue instanceof CodeType;
6089    }
6090
6091    /**
6092     * @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').)
6093     */
6094    public DateType getDefaultValueDateType() throws FHIRException { 
6095      if (this.defaultValue == null)
6096        this.defaultValue = new DateType();
6097      if (!(this.defaultValue instanceof DateType))
6098        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6099      return (DateType) this.defaultValue;
6100    }
6101
6102    public boolean hasDefaultValueDateType() { 
6103      return this != null && this.defaultValue instanceof DateType;
6104    }
6105
6106    /**
6107     * @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').)
6108     */
6109    public DateTimeType getDefaultValueDateTimeType() throws FHIRException { 
6110      if (this.defaultValue == null)
6111        this.defaultValue = new DateTimeType();
6112      if (!(this.defaultValue instanceof DateTimeType))
6113        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6114      return (DateTimeType) this.defaultValue;
6115    }
6116
6117    public boolean hasDefaultValueDateTimeType() { 
6118      return this != null && this.defaultValue instanceof DateTimeType;
6119    }
6120
6121    /**
6122     * @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').)
6123     */
6124    public DecimalType getDefaultValueDecimalType() throws FHIRException { 
6125      if (this.defaultValue == null)
6126        this.defaultValue = new DecimalType();
6127      if (!(this.defaultValue instanceof DecimalType))
6128        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6129      return (DecimalType) this.defaultValue;
6130    }
6131
6132    public boolean hasDefaultValueDecimalType() { 
6133      return this != null && this.defaultValue instanceof DecimalType;
6134    }
6135
6136    /**
6137     * @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').)
6138     */
6139    public IdType getDefaultValueIdType() throws FHIRException { 
6140      if (this.defaultValue == null)
6141        this.defaultValue = new IdType();
6142      if (!(this.defaultValue instanceof IdType))
6143        throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6144      return (IdType) this.defaultValue;
6145    }
6146
6147    public boolean hasDefaultValueIdType() { 
6148      return this != null && this.defaultValue instanceof IdType;
6149    }
6150
6151    /**
6152     * @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').)
6153     */
6154    public InstantType getDefaultValueInstantType() throws FHIRException { 
6155      if (this.defaultValue == null)
6156        this.defaultValue = new InstantType();
6157      if (!(this.defaultValue instanceof InstantType))
6158        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6159      return (InstantType) this.defaultValue;
6160    }
6161
6162    public boolean hasDefaultValueInstantType() { 
6163      return this != null && this.defaultValue instanceof InstantType;
6164    }
6165
6166    /**
6167     * @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').)
6168     */
6169    public IntegerType getDefaultValueIntegerType() throws FHIRException { 
6170      if (this.defaultValue == null)
6171        this.defaultValue = new IntegerType();
6172      if (!(this.defaultValue instanceof IntegerType))
6173        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6174      return (IntegerType) this.defaultValue;
6175    }
6176
6177    public boolean hasDefaultValueIntegerType() { 
6178      return this != null && this.defaultValue instanceof IntegerType;
6179    }
6180
6181    /**
6182     * @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').)
6183     */
6184    public MarkdownType getDefaultValueMarkdownType() throws FHIRException { 
6185      if (this.defaultValue == null)
6186        this.defaultValue = new MarkdownType();
6187      if (!(this.defaultValue instanceof MarkdownType))
6188        throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6189      return (MarkdownType) this.defaultValue;
6190    }
6191
6192    public boolean hasDefaultValueMarkdownType() { 
6193      return this != null && this.defaultValue instanceof MarkdownType;
6194    }
6195
6196    /**
6197     * @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').)
6198     */
6199    public OidType getDefaultValueOidType() throws FHIRException { 
6200      if (this.defaultValue == null)
6201        this.defaultValue = new OidType();
6202      if (!(this.defaultValue instanceof OidType))
6203        throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6204      return (OidType) this.defaultValue;
6205    }
6206
6207    public boolean hasDefaultValueOidType() { 
6208      return this != null && this.defaultValue instanceof OidType;
6209    }
6210
6211    /**
6212     * @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').)
6213     */
6214    public PositiveIntType getDefaultValuePositiveIntType() throws FHIRException { 
6215      if (this.defaultValue == null)
6216        this.defaultValue = new PositiveIntType();
6217      if (!(this.defaultValue instanceof PositiveIntType))
6218        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6219      return (PositiveIntType) this.defaultValue;
6220    }
6221
6222    public boolean hasDefaultValuePositiveIntType() { 
6223      return this != null && this.defaultValue instanceof PositiveIntType;
6224    }
6225
6226    /**
6227     * @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').)
6228     */
6229    public StringType getDefaultValueStringType() throws FHIRException { 
6230      if (this.defaultValue == null)
6231        this.defaultValue = new StringType();
6232      if (!(this.defaultValue instanceof StringType))
6233        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6234      return (StringType) this.defaultValue;
6235    }
6236
6237    public boolean hasDefaultValueStringType() { 
6238      return this != null && this.defaultValue instanceof StringType;
6239    }
6240
6241    /**
6242     * @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').)
6243     */
6244    public TimeType getDefaultValueTimeType() throws FHIRException { 
6245      if (this.defaultValue == null)
6246        this.defaultValue = new TimeType();
6247      if (!(this.defaultValue instanceof TimeType))
6248        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6249      return (TimeType) this.defaultValue;
6250    }
6251
6252    public boolean hasDefaultValueTimeType() { 
6253      return this != null && this.defaultValue instanceof TimeType;
6254    }
6255
6256    /**
6257     * @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').)
6258     */
6259    public UnsignedIntType getDefaultValueUnsignedIntType() throws FHIRException { 
6260      if (this.defaultValue == null)
6261        this.defaultValue = new UnsignedIntType();
6262      if (!(this.defaultValue instanceof UnsignedIntType))
6263        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6264      return (UnsignedIntType) this.defaultValue;
6265    }
6266
6267    public boolean hasDefaultValueUnsignedIntType() { 
6268      return this != null && this.defaultValue instanceof UnsignedIntType;
6269    }
6270
6271    /**
6272     * @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').)
6273     */
6274    public UriType getDefaultValueUriType() throws FHIRException { 
6275      if (this.defaultValue == null)
6276        this.defaultValue = new UriType();
6277      if (!(this.defaultValue instanceof UriType))
6278        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6279      return (UriType) this.defaultValue;
6280    }
6281
6282    public boolean hasDefaultValueUriType() { 
6283      return this != null && this.defaultValue instanceof UriType;
6284    }
6285
6286    /**
6287     * @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').)
6288     */
6289    public UrlType getDefaultValueUrlType() throws FHIRException { 
6290      if (this.defaultValue == null)
6291        this.defaultValue = new UrlType();
6292      if (!(this.defaultValue instanceof UrlType))
6293        throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6294      return (UrlType) this.defaultValue;
6295    }
6296
6297    public boolean hasDefaultValueUrlType() { 
6298      return this != null && this.defaultValue instanceof UrlType;
6299    }
6300
6301    /**
6302     * @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').)
6303     */
6304    public UuidType getDefaultValueUuidType() throws FHIRException { 
6305      if (this.defaultValue == null)
6306        this.defaultValue = new UuidType();
6307      if (!(this.defaultValue instanceof UuidType))
6308        throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6309      return (UuidType) this.defaultValue;
6310    }
6311
6312    public boolean hasDefaultValueUuidType() { 
6313      return this != null && this.defaultValue instanceof UuidType;
6314    }
6315
6316    /**
6317     * @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').)
6318     */
6319    public Address getDefaultValueAddress() throws FHIRException { 
6320      if (this.defaultValue == null)
6321        this.defaultValue = new Address();
6322      if (!(this.defaultValue instanceof Address))
6323        throw new FHIRException("Type mismatch: the type Address was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6324      return (Address) this.defaultValue;
6325    }
6326
6327    public boolean hasDefaultValueAddress() { 
6328      return this != null && this.defaultValue instanceof Address;
6329    }
6330
6331    /**
6332     * @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').)
6333     */
6334    public Age getDefaultValueAge() throws FHIRException { 
6335      if (this.defaultValue == null)
6336        this.defaultValue = new Age();
6337      if (!(this.defaultValue instanceof Age))
6338        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6339      return (Age) this.defaultValue;
6340    }
6341
6342    public boolean hasDefaultValueAge() { 
6343      return this != null && this.defaultValue instanceof Age;
6344    }
6345
6346    /**
6347     * @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').)
6348     */
6349    public Annotation getDefaultValueAnnotation() throws FHIRException { 
6350      if (this.defaultValue == null)
6351        this.defaultValue = new Annotation();
6352      if (!(this.defaultValue instanceof Annotation))
6353        throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6354      return (Annotation) this.defaultValue;
6355    }
6356
6357    public boolean hasDefaultValueAnnotation() { 
6358      return this != null && this.defaultValue instanceof Annotation;
6359    }
6360
6361    /**
6362     * @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').)
6363     */
6364    public Attachment getDefaultValueAttachment() throws FHIRException { 
6365      if (this.defaultValue == null)
6366        this.defaultValue = new Attachment();
6367      if (!(this.defaultValue instanceof Attachment))
6368        throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6369      return (Attachment) this.defaultValue;
6370    }
6371
6372    public boolean hasDefaultValueAttachment() { 
6373      return this != null && this.defaultValue instanceof Attachment;
6374    }
6375
6376    /**
6377     * @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').)
6378     */
6379    public CodeableConcept getDefaultValueCodeableConcept() throws FHIRException { 
6380      if (this.defaultValue == null)
6381        this.defaultValue = new CodeableConcept();
6382      if (!(this.defaultValue instanceof CodeableConcept))
6383        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6384      return (CodeableConcept) this.defaultValue;
6385    }
6386
6387    public boolean hasDefaultValueCodeableConcept() { 
6388      return this != null && this.defaultValue instanceof CodeableConcept;
6389    }
6390
6391    /**
6392     * @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').)
6393     */
6394    public CodeableReference getDefaultValueCodeableReference() throws FHIRException { 
6395      if (this.defaultValue == null)
6396        this.defaultValue = new CodeableReference();
6397      if (!(this.defaultValue instanceof CodeableReference))
6398        throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6399      return (CodeableReference) this.defaultValue;
6400    }
6401
6402    public boolean hasDefaultValueCodeableReference() { 
6403      return this != null && this.defaultValue instanceof CodeableReference;
6404    }
6405
6406    /**
6407     * @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').)
6408     */
6409    public Coding getDefaultValueCoding() throws FHIRException { 
6410      if (this.defaultValue == null)
6411        this.defaultValue = new Coding();
6412      if (!(this.defaultValue instanceof Coding))
6413        throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6414      return (Coding) this.defaultValue;
6415    }
6416
6417    public boolean hasDefaultValueCoding() { 
6418      return this != null && this.defaultValue instanceof Coding;
6419    }
6420
6421    /**
6422     * @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').)
6423     */
6424    public ContactPoint getDefaultValueContactPoint() throws FHIRException { 
6425      if (this.defaultValue == null)
6426        this.defaultValue = new ContactPoint();
6427      if (!(this.defaultValue instanceof ContactPoint))
6428        throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6429      return (ContactPoint) this.defaultValue;
6430    }
6431
6432    public boolean hasDefaultValueContactPoint() { 
6433      return this != null && this.defaultValue instanceof ContactPoint;
6434    }
6435
6436    /**
6437     * @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').)
6438     */
6439    public Count getDefaultValueCount() throws FHIRException { 
6440      if (this.defaultValue == null)
6441        this.defaultValue = new Count();
6442      if (!(this.defaultValue instanceof Count))
6443        throw new FHIRException("Type mismatch: the type Count was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6444      return (Count) this.defaultValue;
6445    }
6446
6447    public boolean hasDefaultValueCount() { 
6448      return this != null && this.defaultValue instanceof Count;
6449    }
6450
6451    /**
6452     * @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').)
6453     */
6454    public Distance getDefaultValueDistance() throws FHIRException { 
6455      if (this.defaultValue == null)
6456        this.defaultValue = new Distance();
6457      if (!(this.defaultValue instanceof Distance))
6458        throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6459      return (Distance) this.defaultValue;
6460    }
6461
6462    public boolean hasDefaultValueDistance() { 
6463      return this != null && this.defaultValue instanceof Distance;
6464    }
6465
6466    /**
6467     * @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').)
6468     */
6469    public Duration getDefaultValueDuration() throws FHIRException { 
6470      if (this.defaultValue == null)
6471        this.defaultValue = new Duration();
6472      if (!(this.defaultValue instanceof Duration))
6473        throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6474      return (Duration) this.defaultValue;
6475    }
6476
6477    public boolean hasDefaultValueDuration() { 
6478      return this != null && this.defaultValue instanceof Duration;
6479    }
6480
6481    /**
6482     * @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').)
6483     */
6484    public HumanName getDefaultValueHumanName() throws FHIRException { 
6485      if (this.defaultValue == null)
6486        this.defaultValue = new HumanName();
6487      if (!(this.defaultValue instanceof HumanName))
6488        throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6489      return (HumanName) this.defaultValue;
6490    }
6491
6492    public boolean hasDefaultValueHumanName() { 
6493      return this != null && this.defaultValue instanceof HumanName;
6494    }
6495
6496    /**
6497     * @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').)
6498     */
6499    public Identifier getDefaultValueIdentifier() throws FHIRException { 
6500      if (this.defaultValue == null)
6501        this.defaultValue = new Identifier();
6502      if (!(this.defaultValue instanceof Identifier))
6503        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6504      return (Identifier) this.defaultValue;
6505    }
6506
6507    public boolean hasDefaultValueIdentifier() { 
6508      return this != null && this.defaultValue instanceof Identifier;
6509    }
6510
6511    /**
6512     * @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').)
6513     */
6514    public Money getDefaultValueMoney() throws FHIRException { 
6515      if (this.defaultValue == null)
6516        this.defaultValue = new Money();
6517      if (!(this.defaultValue instanceof Money))
6518        throw new FHIRException("Type mismatch: the type Money was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6519      return (Money) this.defaultValue;
6520    }
6521
6522    public boolean hasDefaultValueMoney() { 
6523      return this != null && this.defaultValue instanceof Money;
6524    }
6525
6526    /**
6527     * @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').)
6528     */
6529    public Period getDefaultValuePeriod() throws FHIRException { 
6530      if (this.defaultValue == null)
6531        this.defaultValue = new Period();
6532      if (!(this.defaultValue instanceof Period))
6533        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6534      return (Period) this.defaultValue;
6535    }
6536
6537    public boolean hasDefaultValuePeriod() { 
6538      return this != null && this.defaultValue instanceof Period;
6539    }
6540
6541    /**
6542     * @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').)
6543     */
6544    public Quantity getDefaultValueQuantity() throws FHIRException { 
6545      if (this.defaultValue == null)
6546        this.defaultValue = new Quantity();
6547      if (!(this.defaultValue instanceof Quantity))
6548        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6549      return (Quantity) this.defaultValue;
6550    }
6551
6552    public boolean hasDefaultValueQuantity() { 
6553      return this != null && this.defaultValue instanceof Quantity;
6554    }
6555
6556    /**
6557     * @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').)
6558     */
6559    public Range getDefaultValueRange() throws FHIRException { 
6560      if (this.defaultValue == null)
6561        this.defaultValue = new Range();
6562      if (!(this.defaultValue instanceof Range))
6563        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6564      return (Range) this.defaultValue;
6565    }
6566
6567    public boolean hasDefaultValueRange() { 
6568      return this != null && this.defaultValue instanceof Range;
6569    }
6570
6571    /**
6572     * @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').)
6573     */
6574    public Ratio getDefaultValueRatio() throws FHIRException { 
6575      if (this.defaultValue == null)
6576        this.defaultValue = new Ratio();
6577      if (!(this.defaultValue instanceof Ratio))
6578        throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6579      return (Ratio) this.defaultValue;
6580    }
6581
6582    public boolean hasDefaultValueRatio() { 
6583      return this != null && this.defaultValue instanceof Ratio;
6584    }
6585
6586    /**
6587     * @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').)
6588     */
6589    public RatioRange getDefaultValueRatioRange() throws FHIRException { 
6590      if (this.defaultValue == null)
6591        this.defaultValue = new RatioRange();
6592      if (!(this.defaultValue instanceof RatioRange))
6593        throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6594      return (RatioRange) this.defaultValue;
6595    }
6596
6597    public boolean hasDefaultValueRatioRange() { 
6598      return this != null && this.defaultValue instanceof RatioRange;
6599    }
6600
6601    /**
6602     * @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').)
6603     */
6604    public Reference getDefaultValueReference() throws FHIRException { 
6605      if (this.defaultValue == null)
6606        this.defaultValue = new Reference();
6607      if (!(this.defaultValue instanceof Reference))
6608        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6609      return (Reference) this.defaultValue;
6610    }
6611
6612    public boolean hasDefaultValueReference() { 
6613      return this != null && this.defaultValue instanceof Reference;
6614    }
6615
6616    /**
6617     * @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').)
6618     */
6619    public SampledData getDefaultValueSampledData() throws FHIRException { 
6620      if (this.defaultValue == null)
6621        this.defaultValue = new SampledData();
6622      if (!(this.defaultValue instanceof SampledData))
6623        throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6624      return (SampledData) this.defaultValue;
6625    }
6626
6627    public boolean hasDefaultValueSampledData() { 
6628      return this != null && this.defaultValue instanceof SampledData;
6629    }
6630
6631    /**
6632     * @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').)
6633     */
6634    public Signature getDefaultValueSignature() throws FHIRException { 
6635      if (this.defaultValue == null)
6636        this.defaultValue = new Signature();
6637      if (!(this.defaultValue instanceof Signature))
6638        throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6639      return (Signature) this.defaultValue;
6640    }
6641
6642    public boolean hasDefaultValueSignature() { 
6643      return this != null && this.defaultValue instanceof Signature;
6644    }
6645
6646    /**
6647     * @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').)
6648     */
6649    public Timing getDefaultValueTiming() throws FHIRException { 
6650      if (this.defaultValue == null)
6651        this.defaultValue = new Timing();
6652      if (!(this.defaultValue instanceof Timing))
6653        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6654      return (Timing) this.defaultValue;
6655    }
6656
6657    public boolean hasDefaultValueTiming() { 
6658      return this != null && this.defaultValue instanceof Timing;
6659    }
6660
6661    /**
6662     * @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').)
6663     */
6664    public ContactDetail getDefaultValueContactDetail() throws FHIRException { 
6665      if (this.defaultValue == null)
6666        this.defaultValue = new ContactDetail();
6667      if (!(this.defaultValue instanceof ContactDetail))
6668        throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6669      return (ContactDetail) this.defaultValue;
6670    }
6671
6672    public boolean hasDefaultValueContactDetail() { 
6673      return this != null && this.defaultValue instanceof ContactDetail;
6674    }
6675
6676    /**
6677     * @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').)
6678     */
6679    public Contributor getDefaultValueContributor() throws FHIRException { 
6680      if (this.defaultValue == null)
6681        this.defaultValue = new Contributor();
6682      if (!(this.defaultValue instanceof Contributor))
6683        throw new FHIRException("Type mismatch: the type Contributor was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6684      return (Contributor) this.defaultValue;
6685    }
6686
6687    public boolean hasDefaultValueContributor() { 
6688      return this != null && this.defaultValue instanceof Contributor;
6689    }
6690
6691    /**
6692     * @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').)
6693     */
6694    public DataRequirement getDefaultValueDataRequirement() throws FHIRException { 
6695      if (this.defaultValue == null)
6696        this.defaultValue = new DataRequirement();
6697      if (!(this.defaultValue instanceof DataRequirement))
6698        throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6699      return (DataRequirement) this.defaultValue;
6700    }
6701
6702    public boolean hasDefaultValueDataRequirement() { 
6703      return this != null && this.defaultValue instanceof DataRequirement;
6704    }
6705
6706    /**
6707     * @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').)
6708     */
6709    public Expression getDefaultValueExpression() throws FHIRException { 
6710      if (this.defaultValue == null)
6711        this.defaultValue = new Expression();
6712      if (!(this.defaultValue instanceof Expression))
6713        throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6714      return (Expression) this.defaultValue;
6715    }
6716
6717    public boolean hasDefaultValueExpression() { 
6718      return this != null && this.defaultValue instanceof Expression;
6719    }
6720
6721    /**
6722     * @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').)
6723     */
6724    public ParameterDefinition getDefaultValueParameterDefinition() throws FHIRException { 
6725      if (this.defaultValue == null)
6726        this.defaultValue = new ParameterDefinition();
6727      if (!(this.defaultValue instanceof ParameterDefinition))
6728        throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6729      return (ParameterDefinition) this.defaultValue;
6730    }
6731
6732    public boolean hasDefaultValueParameterDefinition() { 
6733      return this != null && this.defaultValue instanceof ParameterDefinition;
6734    }
6735
6736    /**
6737     * @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').)
6738     */
6739    public RelatedArtifact getDefaultValueRelatedArtifact() throws FHIRException { 
6740      if (this.defaultValue == null)
6741        this.defaultValue = new RelatedArtifact();
6742      if (!(this.defaultValue instanceof RelatedArtifact))
6743        throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6744      return (RelatedArtifact) this.defaultValue;
6745    }
6746
6747    public boolean hasDefaultValueRelatedArtifact() { 
6748      return this != null && this.defaultValue instanceof RelatedArtifact;
6749    }
6750
6751    /**
6752     * @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').)
6753     */
6754    public TriggerDefinition getDefaultValueTriggerDefinition() throws FHIRException { 
6755      if (this.defaultValue == null)
6756        this.defaultValue = new TriggerDefinition();
6757      if (!(this.defaultValue instanceof TriggerDefinition))
6758        throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6759      return (TriggerDefinition) this.defaultValue;
6760    }
6761
6762    public boolean hasDefaultValueTriggerDefinition() { 
6763      return this != null && this.defaultValue instanceof TriggerDefinition;
6764    }
6765
6766    /**
6767     * @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').)
6768     */
6769    public UsageContext getDefaultValueUsageContext() throws FHIRException { 
6770      if (this.defaultValue == null)
6771        this.defaultValue = new UsageContext();
6772      if (!(this.defaultValue instanceof UsageContext))
6773        throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6774      return (UsageContext) this.defaultValue;
6775    }
6776
6777    public boolean hasDefaultValueUsageContext() { 
6778      return this != null && this.defaultValue instanceof UsageContext;
6779    }
6780
6781    /**
6782     * @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').)
6783     */
6784    public Dosage getDefaultValueDosage() throws FHIRException { 
6785      if (this.defaultValue == null)
6786        this.defaultValue = new Dosage();
6787      if (!(this.defaultValue instanceof Dosage))
6788        throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6789      return (Dosage) this.defaultValue;
6790    }
6791
6792    public boolean hasDefaultValueDosage() { 
6793      return this != null && this.defaultValue instanceof Dosage;
6794    }
6795
6796    /**
6797     * @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').)
6798     */
6799    public Meta getDefaultValueMeta() throws FHIRException { 
6800      if (this.defaultValue == null)
6801        this.defaultValue = new Meta();
6802      if (!(this.defaultValue instanceof Meta))
6803        throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.defaultValue.getClass().getName()+" was encountered");
6804      return (Meta) this.defaultValue;
6805    }
6806
6807    public boolean hasDefaultValueMeta() { 
6808      return this != null && this.defaultValue instanceof Meta;
6809    }
6810
6811    public boolean hasDefaultValue() { 
6812      return this.defaultValue != null && !this.defaultValue.isEmpty();
6813    }
6814
6815    /**
6816     * @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').)
6817     */
6818    public ElementDefinition setDefaultValue(DataType value) { 
6819      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 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 Contributor || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Dosage || value instanceof Meta))
6820        throw new Error("Not the right type for ElementDefinition.defaultValue[x]: "+value.fhirType());
6821      this.defaultValue = value;
6822      return this;
6823    }
6824
6825    /**
6826     * @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
6827     */
6828    public MarkdownType getMeaningWhenMissingElement() { 
6829      if (this.meaningWhenMissing == null)
6830        if (Configuration.errorOnAutoCreate())
6831          throw new Error("Attempt to auto-create ElementDefinition.meaningWhenMissing");
6832        else if (Configuration.doAutoCreate())
6833          this.meaningWhenMissing = new MarkdownType(); // bb
6834      return this.meaningWhenMissing;
6835    }
6836
6837    public boolean hasMeaningWhenMissingElement() { 
6838      return this.meaningWhenMissing != null && !this.meaningWhenMissing.isEmpty();
6839    }
6840
6841    public boolean hasMeaningWhenMissing() { 
6842      return this.meaningWhenMissing != null && !this.meaningWhenMissing.isEmpty();
6843    }
6844
6845    /**
6846     * @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
6847     */
6848    public ElementDefinition setMeaningWhenMissingElement(MarkdownType value) { 
6849      this.meaningWhenMissing = value;
6850      return this;
6851    }
6852
6853    /**
6854     * @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').
6855     */
6856    public String getMeaningWhenMissing() { 
6857      return this.meaningWhenMissing == null ? null : this.meaningWhenMissing.getValue();
6858    }
6859
6860    /**
6861     * @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').
6862     */
6863    public ElementDefinition setMeaningWhenMissing(String value) { 
6864      if (value == null)
6865        this.meaningWhenMissing = null;
6866      else {
6867        if (this.meaningWhenMissing == null)
6868          this.meaningWhenMissing = new MarkdownType();
6869        this.meaningWhenMissing.setValue(value);
6870      }
6871      return this;
6872    }
6873
6874    /**
6875     * @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
6876     */
6877    public StringType getOrderMeaningElement() { 
6878      if (this.orderMeaning == null)
6879        if (Configuration.errorOnAutoCreate())
6880          throw new Error("Attempt to auto-create ElementDefinition.orderMeaning");
6881        else if (Configuration.doAutoCreate())
6882          this.orderMeaning = new StringType(); // bb
6883      return this.orderMeaning;
6884    }
6885
6886    public boolean hasOrderMeaningElement() { 
6887      return this.orderMeaning != null && !this.orderMeaning.isEmpty();
6888    }
6889
6890    public boolean hasOrderMeaning() { 
6891      return this.orderMeaning != null && !this.orderMeaning.isEmpty();
6892    }
6893
6894    /**
6895     * @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
6896     */
6897    public ElementDefinition setOrderMeaningElement(StringType value) { 
6898      this.orderMeaning = value;
6899      return this;
6900    }
6901
6902    /**
6903     * @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.
6904     */
6905    public String getOrderMeaning() { 
6906      return this.orderMeaning == null ? null : this.orderMeaning.getValue();
6907    }
6908
6909    /**
6910     * @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.
6911     */
6912    public ElementDefinition setOrderMeaning(String value) { 
6913      if (Utilities.noString(value))
6914        this.orderMeaning = null;
6915      else {
6916        if (this.orderMeaning == null)
6917          this.orderMeaning = new StringType();
6918        this.orderMeaning.setValue(value);
6919      }
6920      return this;
6921    }
6922
6923    /**
6924     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
6925     */
6926    public DataType getFixed() { 
6927      return this.fixed;
6928    }
6929
6930    /**
6931     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
6932     */
6933    public Base64BinaryType getFixedBase64BinaryType() throws FHIRException { 
6934      if (this.fixed == null)
6935        this.fixed = new Base64BinaryType();
6936      if (!(this.fixed instanceof Base64BinaryType))
6937        throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.fixed.getClass().getName()+" was encountered");
6938      return (Base64BinaryType) this.fixed;
6939    }
6940
6941    public boolean hasFixedBase64BinaryType() { 
6942      return this != null && this.fixed instanceof Base64BinaryType;
6943    }
6944
6945    /**
6946     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
6947     */
6948    public BooleanType getFixedBooleanType() throws FHIRException { 
6949      if (this.fixed == null)
6950        this.fixed = new BooleanType();
6951      if (!(this.fixed instanceof BooleanType))
6952        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.fixed.getClass().getName()+" was encountered");
6953      return (BooleanType) this.fixed;
6954    }
6955
6956    public boolean hasFixedBooleanType() { 
6957      return this != null && this.fixed instanceof BooleanType;
6958    }
6959
6960    /**
6961     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
6962     */
6963    public CanonicalType getFixedCanonicalType() throws FHIRException { 
6964      if (this.fixed == null)
6965        this.fixed = new CanonicalType();
6966      if (!(this.fixed instanceof CanonicalType))
6967        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.fixed.getClass().getName()+" was encountered");
6968      return (CanonicalType) this.fixed;
6969    }
6970
6971    public boolean hasFixedCanonicalType() { 
6972      return this != null && this.fixed instanceof CanonicalType;
6973    }
6974
6975    /**
6976     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
6977     */
6978    public CodeType getFixedCodeType() throws FHIRException { 
6979      if (this.fixed == null)
6980        this.fixed = new CodeType();
6981      if (!(this.fixed instanceof CodeType))
6982        throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.fixed.getClass().getName()+" was encountered");
6983      return (CodeType) this.fixed;
6984    }
6985
6986    public boolean hasFixedCodeType() { 
6987      return this != null && this.fixed instanceof CodeType;
6988    }
6989
6990    /**
6991     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
6992     */
6993    public DateType getFixedDateType() throws FHIRException { 
6994      if (this.fixed == null)
6995        this.fixed = new DateType();
6996      if (!(this.fixed instanceof DateType))
6997        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.fixed.getClass().getName()+" was encountered");
6998      return (DateType) this.fixed;
6999    }
7000
7001    public boolean hasFixedDateType() { 
7002      return this != null && this.fixed instanceof DateType;
7003    }
7004
7005    /**
7006     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7007     */
7008    public DateTimeType getFixedDateTimeType() throws FHIRException { 
7009      if (this.fixed == null)
7010        this.fixed = new DateTimeType();
7011      if (!(this.fixed instanceof DateTimeType))
7012        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7013      return (DateTimeType) this.fixed;
7014    }
7015
7016    public boolean hasFixedDateTimeType() { 
7017      return this != null && this.fixed instanceof DateTimeType;
7018    }
7019
7020    /**
7021     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7022     */
7023    public DecimalType getFixedDecimalType() throws FHIRException { 
7024      if (this.fixed == null)
7025        this.fixed = new DecimalType();
7026      if (!(this.fixed instanceof DecimalType))
7027        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7028      return (DecimalType) this.fixed;
7029    }
7030
7031    public boolean hasFixedDecimalType() { 
7032      return this != null && this.fixed instanceof DecimalType;
7033    }
7034
7035    /**
7036     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7037     */
7038    public IdType getFixedIdType() throws FHIRException { 
7039      if (this.fixed == null)
7040        this.fixed = new IdType();
7041      if (!(this.fixed instanceof IdType))
7042        throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7043      return (IdType) this.fixed;
7044    }
7045
7046    public boolean hasFixedIdType() { 
7047      return this != null && this.fixed instanceof IdType;
7048    }
7049
7050    /**
7051     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7052     */
7053    public InstantType getFixedInstantType() throws FHIRException { 
7054      if (this.fixed == null)
7055        this.fixed = new InstantType();
7056      if (!(this.fixed instanceof InstantType))
7057        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7058      return (InstantType) this.fixed;
7059    }
7060
7061    public boolean hasFixedInstantType() { 
7062      return this != null && this.fixed instanceof InstantType;
7063    }
7064
7065    /**
7066     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7067     */
7068    public IntegerType getFixedIntegerType() throws FHIRException { 
7069      if (this.fixed == null)
7070        this.fixed = new IntegerType();
7071      if (!(this.fixed instanceof IntegerType))
7072        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7073      return (IntegerType) this.fixed;
7074    }
7075
7076    public boolean hasFixedIntegerType() { 
7077      return this != null && this.fixed instanceof IntegerType;
7078    }
7079
7080    /**
7081     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7082     */
7083    public MarkdownType getFixedMarkdownType() throws FHIRException { 
7084      if (this.fixed == null)
7085        this.fixed = new MarkdownType();
7086      if (!(this.fixed instanceof MarkdownType))
7087        throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7088      return (MarkdownType) this.fixed;
7089    }
7090
7091    public boolean hasFixedMarkdownType() { 
7092      return this != null && this.fixed instanceof MarkdownType;
7093    }
7094
7095    /**
7096     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7097     */
7098    public OidType getFixedOidType() throws FHIRException { 
7099      if (this.fixed == null)
7100        this.fixed = new OidType();
7101      if (!(this.fixed instanceof OidType))
7102        throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7103      return (OidType) this.fixed;
7104    }
7105
7106    public boolean hasFixedOidType() { 
7107      return this != null && this.fixed instanceof OidType;
7108    }
7109
7110    /**
7111     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7112     */
7113    public PositiveIntType getFixedPositiveIntType() throws FHIRException { 
7114      if (this.fixed == null)
7115        this.fixed = new PositiveIntType();
7116      if (!(this.fixed instanceof PositiveIntType))
7117        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7118      return (PositiveIntType) this.fixed;
7119    }
7120
7121    public boolean hasFixedPositiveIntType() { 
7122      return this != null && this.fixed instanceof PositiveIntType;
7123    }
7124
7125    /**
7126     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7127     */
7128    public StringType getFixedStringType() throws FHIRException { 
7129      if (this.fixed == null)
7130        this.fixed = new StringType();
7131      if (!(this.fixed instanceof StringType))
7132        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7133      return (StringType) this.fixed;
7134    }
7135
7136    public boolean hasFixedStringType() { 
7137      return this != null && this.fixed instanceof StringType;
7138    }
7139
7140    /**
7141     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7142     */
7143    public TimeType getFixedTimeType() throws FHIRException { 
7144      if (this.fixed == null)
7145        this.fixed = new TimeType();
7146      if (!(this.fixed instanceof TimeType))
7147        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7148      return (TimeType) this.fixed;
7149    }
7150
7151    public boolean hasFixedTimeType() { 
7152      return this != null && this.fixed instanceof TimeType;
7153    }
7154
7155    /**
7156     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7157     */
7158    public UnsignedIntType getFixedUnsignedIntType() throws FHIRException { 
7159      if (this.fixed == null)
7160        this.fixed = new UnsignedIntType();
7161      if (!(this.fixed instanceof UnsignedIntType))
7162        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7163      return (UnsignedIntType) this.fixed;
7164    }
7165
7166    public boolean hasFixedUnsignedIntType() { 
7167      return this != null && this.fixed instanceof UnsignedIntType;
7168    }
7169
7170    /**
7171     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7172     */
7173    public UriType getFixedUriType() throws FHIRException { 
7174      if (this.fixed == null)
7175        this.fixed = new UriType();
7176      if (!(this.fixed instanceof UriType))
7177        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7178      return (UriType) this.fixed;
7179    }
7180
7181    public boolean hasFixedUriType() { 
7182      return this != null && this.fixed instanceof UriType;
7183    }
7184
7185    /**
7186     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7187     */
7188    public UrlType getFixedUrlType() throws FHIRException { 
7189      if (this.fixed == null)
7190        this.fixed = new UrlType();
7191      if (!(this.fixed instanceof UrlType))
7192        throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7193      return (UrlType) this.fixed;
7194    }
7195
7196    public boolean hasFixedUrlType() { 
7197      return this != null && this.fixed instanceof UrlType;
7198    }
7199
7200    /**
7201     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7202     */
7203    public UuidType getFixedUuidType() throws FHIRException { 
7204      if (this.fixed == null)
7205        this.fixed = new UuidType();
7206      if (!(this.fixed instanceof UuidType))
7207        throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.fixed.getClass().getName()+" was encountered");
7208      return (UuidType) this.fixed;
7209    }
7210
7211    public boolean hasFixedUuidType() { 
7212      return this != null && this.fixed instanceof UuidType;
7213    }
7214
7215    /**
7216     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7217     */
7218    public Address getFixedAddress() throws FHIRException { 
7219      if (this.fixed == null)
7220        this.fixed = new Address();
7221      if (!(this.fixed instanceof Address))
7222        throw new FHIRException("Type mismatch: the type Address was expected, but "+this.fixed.getClass().getName()+" was encountered");
7223      return (Address) this.fixed;
7224    }
7225
7226    public boolean hasFixedAddress() { 
7227      return this != null && this.fixed instanceof Address;
7228    }
7229
7230    /**
7231     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7232     */
7233    public Age getFixedAge() throws FHIRException { 
7234      if (this.fixed == null)
7235        this.fixed = new Age();
7236      if (!(this.fixed instanceof Age))
7237        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.fixed.getClass().getName()+" was encountered");
7238      return (Age) this.fixed;
7239    }
7240
7241    public boolean hasFixedAge() { 
7242      return this != null && this.fixed instanceof Age;
7243    }
7244
7245    /**
7246     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7247     */
7248    public Annotation getFixedAnnotation() throws FHIRException { 
7249      if (this.fixed == null)
7250        this.fixed = new Annotation();
7251      if (!(this.fixed instanceof Annotation))
7252        throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.fixed.getClass().getName()+" was encountered");
7253      return (Annotation) this.fixed;
7254    }
7255
7256    public boolean hasFixedAnnotation() { 
7257      return this != null && this.fixed instanceof Annotation;
7258    }
7259
7260    /**
7261     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7262     */
7263    public Attachment getFixedAttachment() throws FHIRException { 
7264      if (this.fixed == null)
7265        this.fixed = new Attachment();
7266      if (!(this.fixed instanceof Attachment))
7267        throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.fixed.getClass().getName()+" was encountered");
7268      return (Attachment) this.fixed;
7269    }
7270
7271    public boolean hasFixedAttachment() { 
7272      return this != null && this.fixed instanceof Attachment;
7273    }
7274
7275    /**
7276     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7277     */
7278    public CodeableConcept getFixedCodeableConcept() throws FHIRException { 
7279      if (this.fixed == null)
7280        this.fixed = new CodeableConcept();
7281      if (!(this.fixed instanceof CodeableConcept))
7282        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.fixed.getClass().getName()+" was encountered");
7283      return (CodeableConcept) this.fixed;
7284    }
7285
7286    public boolean hasFixedCodeableConcept() { 
7287      return this != null && this.fixed instanceof CodeableConcept;
7288    }
7289
7290    /**
7291     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7292     */
7293    public CodeableReference getFixedCodeableReference() throws FHIRException { 
7294      if (this.fixed == null)
7295        this.fixed = new CodeableReference();
7296      if (!(this.fixed instanceof CodeableReference))
7297        throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.fixed.getClass().getName()+" was encountered");
7298      return (CodeableReference) this.fixed;
7299    }
7300
7301    public boolean hasFixedCodeableReference() { 
7302      return this != null && this.fixed instanceof CodeableReference;
7303    }
7304
7305    /**
7306     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7307     */
7308    public Coding getFixedCoding() throws FHIRException { 
7309      if (this.fixed == null)
7310        this.fixed = new Coding();
7311      if (!(this.fixed instanceof Coding))
7312        throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.fixed.getClass().getName()+" was encountered");
7313      return (Coding) this.fixed;
7314    }
7315
7316    public boolean hasFixedCoding() { 
7317      return this != null && this.fixed instanceof Coding;
7318    }
7319
7320    /**
7321     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7322     */
7323    public ContactPoint getFixedContactPoint() throws FHIRException { 
7324      if (this.fixed == null)
7325        this.fixed = new ContactPoint();
7326      if (!(this.fixed instanceof ContactPoint))
7327        throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.fixed.getClass().getName()+" was encountered");
7328      return (ContactPoint) this.fixed;
7329    }
7330
7331    public boolean hasFixedContactPoint() { 
7332      return this != null && this.fixed instanceof ContactPoint;
7333    }
7334
7335    /**
7336     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7337     */
7338    public Count getFixedCount() throws FHIRException { 
7339      if (this.fixed == null)
7340        this.fixed = new Count();
7341      if (!(this.fixed instanceof Count))
7342        throw new FHIRException("Type mismatch: the type Count was expected, but "+this.fixed.getClass().getName()+" was encountered");
7343      return (Count) this.fixed;
7344    }
7345
7346    public boolean hasFixedCount() { 
7347      return this != null && this.fixed instanceof Count;
7348    }
7349
7350    /**
7351     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7352     */
7353    public Distance getFixedDistance() throws FHIRException { 
7354      if (this.fixed == null)
7355        this.fixed = new Distance();
7356      if (!(this.fixed instanceof Distance))
7357        throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.fixed.getClass().getName()+" was encountered");
7358      return (Distance) this.fixed;
7359    }
7360
7361    public boolean hasFixedDistance() { 
7362      return this != null && this.fixed instanceof Distance;
7363    }
7364
7365    /**
7366     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7367     */
7368    public Duration getFixedDuration() throws FHIRException { 
7369      if (this.fixed == null)
7370        this.fixed = new Duration();
7371      if (!(this.fixed instanceof Duration))
7372        throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.fixed.getClass().getName()+" was encountered");
7373      return (Duration) this.fixed;
7374    }
7375
7376    public boolean hasFixedDuration() { 
7377      return this != null && this.fixed instanceof Duration;
7378    }
7379
7380    /**
7381     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7382     */
7383    public HumanName getFixedHumanName() throws FHIRException { 
7384      if (this.fixed == null)
7385        this.fixed = new HumanName();
7386      if (!(this.fixed instanceof HumanName))
7387        throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.fixed.getClass().getName()+" was encountered");
7388      return (HumanName) this.fixed;
7389    }
7390
7391    public boolean hasFixedHumanName() { 
7392      return this != null && this.fixed instanceof HumanName;
7393    }
7394
7395    /**
7396     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7397     */
7398    public Identifier getFixedIdentifier() throws FHIRException { 
7399      if (this.fixed == null)
7400        this.fixed = new Identifier();
7401      if (!(this.fixed instanceof Identifier))
7402        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.fixed.getClass().getName()+" was encountered");
7403      return (Identifier) this.fixed;
7404    }
7405
7406    public boolean hasFixedIdentifier() { 
7407      return this != null && this.fixed instanceof Identifier;
7408    }
7409
7410    /**
7411     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7412     */
7413    public Money getFixedMoney() throws FHIRException { 
7414      if (this.fixed == null)
7415        this.fixed = new Money();
7416      if (!(this.fixed instanceof Money))
7417        throw new FHIRException("Type mismatch: the type Money was expected, but "+this.fixed.getClass().getName()+" was encountered");
7418      return (Money) this.fixed;
7419    }
7420
7421    public boolean hasFixedMoney() { 
7422      return this != null && this.fixed instanceof Money;
7423    }
7424
7425    /**
7426     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7427     */
7428    public Period getFixedPeriod() throws FHIRException { 
7429      if (this.fixed == null)
7430        this.fixed = new Period();
7431      if (!(this.fixed instanceof Period))
7432        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.fixed.getClass().getName()+" was encountered");
7433      return (Period) this.fixed;
7434    }
7435
7436    public boolean hasFixedPeriod() { 
7437      return this != null && this.fixed instanceof Period;
7438    }
7439
7440    /**
7441     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7442     */
7443    public Quantity getFixedQuantity() throws FHIRException { 
7444      if (this.fixed == null)
7445        this.fixed = new Quantity();
7446      if (!(this.fixed instanceof Quantity))
7447        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.fixed.getClass().getName()+" was encountered");
7448      return (Quantity) this.fixed;
7449    }
7450
7451    public boolean hasFixedQuantity() { 
7452      return this != null && this.fixed instanceof Quantity;
7453    }
7454
7455    /**
7456     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7457     */
7458    public Range getFixedRange() throws FHIRException { 
7459      if (this.fixed == null)
7460        this.fixed = new Range();
7461      if (!(this.fixed instanceof Range))
7462        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.fixed.getClass().getName()+" was encountered");
7463      return (Range) this.fixed;
7464    }
7465
7466    public boolean hasFixedRange() { 
7467      return this != null && this.fixed instanceof Range;
7468    }
7469
7470    /**
7471     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7472     */
7473    public Ratio getFixedRatio() throws FHIRException { 
7474      if (this.fixed == null)
7475        this.fixed = new Ratio();
7476      if (!(this.fixed instanceof Ratio))
7477        throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.fixed.getClass().getName()+" was encountered");
7478      return (Ratio) this.fixed;
7479    }
7480
7481    public boolean hasFixedRatio() { 
7482      return this != null && this.fixed instanceof Ratio;
7483    }
7484
7485    /**
7486     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7487     */
7488    public RatioRange getFixedRatioRange() throws FHIRException { 
7489      if (this.fixed == null)
7490        this.fixed = new RatioRange();
7491      if (!(this.fixed instanceof RatioRange))
7492        throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.fixed.getClass().getName()+" was encountered");
7493      return (RatioRange) this.fixed;
7494    }
7495
7496    public boolean hasFixedRatioRange() { 
7497      return this != null && this.fixed instanceof RatioRange;
7498    }
7499
7500    /**
7501     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7502     */
7503    public Reference getFixedReference() throws FHIRException { 
7504      if (this.fixed == null)
7505        this.fixed = new Reference();
7506      if (!(this.fixed instanceof Reference))
7507        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.fixed.getClass().getName()+" was encountered");
7508      return (Reference) this.fixed;
7509    }
7510
7511    public boolean hasFixedReference() { 
7512      return this != null && this.fixed instanceof Reference;
7513    }
7514
7515    /**
7516     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7517     */
7518    public SampledData getFixedSampledData() throws FHIRException { 
7519      if (this.fixed == null)
7520        this.fixed = new SampledData();
7521      if (!(this.fixed instanceof SampledData))
7522        throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.fixed.getClass().getName()+" was encountered");
7523      return (SampledData) this.fixed;
7524    }
7525
7526    public boolean hasFixedSampledData() { 
7527      return this != null && this.fixed instanceof SampledData;
7528    }
7529
7530    /**
7531     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7532     */
7533    public Signature getFixedSignature() throws FHIRException { 
7534      if (this.fixed == null)
7535        this.fixed = new Signature();
7536      if (!(this.fixed instanceof Signature))
7537        throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.fixed.getClass().getName()+" was encountered");
7538      return (Signature) this.fixed;
7539    }
7540
7541    public boolean hasFixedSignature() { 
7542      return this != null && this.fixed instanceof Signature;
7543    }
7544
7545    /**
7546     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7547     */
7548    public Timing getFixedTiming() throws FHIRException { 
7549      if (this.fixed == null)
7550        this.fixed = new Timing();
7551      if (!(this.fixed instanceof Timing))
7552        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.fixed.getClass().getName()+" was encountered");
7553      return (Timing) this.fixed;
7554    }
7555
7556    public boolean hasFixedTiming() { 
7557      return this != null && this.fixed instanceof Timing;
7558    }
7559
7560    /**
7561     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7562     */
7563    public ContactDetail getFixedContactDetail() throws FHIRException { 
7564      if (this.fixed == null)
7565        this.fixed = new ContactDetail();
7566      if (!(this.fixed instanceof ContactDetail))
7567        throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.fixed.getClass().getName()+" was encountered");
7568      return (ContactDetail) this.fixed;
7569    }
7570
7571    public boolean hasFixedContactDetail() { 
7572      return this != null && this.fixed instanceof ContactDetail;
7573    }
7574
7575    /**
7576     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7577     */
7578    public Contributor getFixedContributor() throws FHIRException { 
7579      if (this.fixed == null)
7580        this.fixed = new Contributor();
7581      if (!(this.fixed instanceof Contributor))
7582        throw new FHIRException("Type mismatch: the type Contributor was expected, but "+this.fixed.getClass().getName()+" was encountered");
7583      return (Contributor) this.fixed;
7584    }
7585
7586    public boolean hasFixedContributor() { 
7587      return this != null && this.fixed instanceof Contributor;
7588    }
7589
7590    /**
7591     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7592     */
7593    public DataRequirement getFixedDataRequirement() throws FHIRException { 
7594      if (this.fixed == null)
7595        this.fixed = new DataRequirement();
7596      if (!(this.fixed instanceof DataRequirement))
7597        throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.fixed.getClass().getName()+" was encountered");
7598      return (DataRequirement) this.fixed;
7599    }
7600
7601    public boolean hasFixedDataRequirement() { 
7602      return this != null && this.fixed instanceof DataRequirement;
7603    }
7604
7605    /**
7606     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7607     */
7608    public Expression getFixedExpression() throws FHIRException { 
7609      if (this.fixed == null)
7610        this.fixed = new Expression();
7611      if (!(this.fixed instanceof Expression))
7612        throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.fixed.getClass().getName()+" was encountered");
7613      return (Expression) this.fixed;
7614    }
7615
7616    public boolean hasFixedExpression() { 
7617      return this != null && this.fixed instanceof Expression;
7618    }
7619
7620    /**
7621     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7622     */
7623    public ParameterDefinition getFixedParameterDefinition() throws FHIRException { 
7624      if (this.fixed == null)
7625        this.fixed = new ParameterDefinition();
7626      if (!(this.fixed instanceof ParameterDefinition))
7627        throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.fixed.getClass().getName()+" was encountered");
7628      return (ParameterDefinition) this.fixed;
7629    }
7630
7631    public boolean hasFixedParameterDefinition() { 
7632      return this != null && this.fixed instanceof ParameterDefinition;
7633    }
7634
7635    /**
7636     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7637     */
7638    public RelatedArtifact getFixedRelatedArtifact() throws FHIRException { 
7639      if (this.fixed == null)
7640        this.fixed = new RelatedArtifact();
7641      if (!(this.fixed instanceof RelatedArtifact))
7642        throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.fixed.getClass().getName()+" was encountered");
7643      return (RelatedArtifact) this.fixed;
7644    }
7645
7646    public boolean hasFixedRelatedArtifact() { 
7647      return this != null && this.fixed instanceof RelatedArtifact;
7648    }
7649
7650    /**
7651     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7652     */
7653    public TriggerDefinition getFixedTriggerDefinition() throws FHIRException { 
7654      if (this.fixed == null)
7655        this.fixed = new TriggerDefinition();
7656      if (!(this.fixed instanceof TriggerDefinition))
7657        throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.fixed.getClass().getName()+" was encountered");
7658      return (TriggerDefinition) this.fixed;
7659    }
7660
7661    public boolean hasFixedTriggerDefinition() { 
7662      return this != null && this.fixed instanceof TriggerDefinition;
7663    }
7664
7665    /**
7666     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7667     */
7668    public UsageContext getFixedUsageContext() throws FHIRException { 
7669      if (this.fixed == null)
7670        this.fixed = new UsageContext();
7671      if (!(this.fixed instanceof UsageContext))
7672        throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.fixed.getClass().getName()+" was encountered");
7673      return (UsageContext) this.fixed;
7674    }
7675
7676    public boolean hasFixedUsageContext() { 
7677      return this != null && this.fixed instanceof UsageContext;
7678    }
7679
7680    /**
7681     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7682     */
7683    public Dosage getFixedDosage() throws FHIRException { 
7684      if (this.fixed == null)
7685        this.fixed = new Dosage();
7686      if (!(this.fixed instanceof Dosage))
7687        throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.fixed.getClass().getName()+" was encountered");
7688      return (Dosage) this.fixed;
7689    }
7690
7691    public boolean hasFixedDosage() { 
7692      return this != null && this.fixed instanceof Dosage;
7693    }
7694
7695    /**
7696     * @return {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7697     */
7698    public Meta getFixedMeta() throws FHIRException { 
7699      if (this.fixed == null)
7700        this.fixed = new Meta();
7701      if (!(this.fixed instanceof Meta))
7702        throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.fixed.getClass().getName()+" was encountered");
7703      return (Meta) this.fixed;
7704    }
7705
7706    public boolean hasFixedMeta() { 
7707      return this != null && this.fixed instanceof Meta;
7708    }
7709
7710    public boolean hasFixed() { 
7711      return this.fixed != null && !this.fixed.isEmpty();
7712    }
7713
7714    /**
7715     * @param value {@link #fixed} (Specifies a value that SHALL be exactly the value  for this element in the instance. 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.)
7716     */
7717    public ElementDefinition setFixed(DataType value) { 
7718      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 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 Contributor || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Dosage || value instanceof Meta))
7719        throw new Error("Not the right type for ElementDefinition.fixed[x]: "+value.fhirType());
7720      this.fixed = value;
7721      return this;
7722    }
7723
7724    /**
7725     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7726
7727When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7728
7729When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7730
7731When 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.,
7732
77331. If primitive: it must match exactly the pattern value
77342. If a complex object: it must match (recursively) the pattern value
77353. If an array: it must match (recursively) the pattern value.)
7736     */
7737    public DataType getPattern() { 
7738      return this.pattern;
7739    }
7740
7741    /**
7742     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7743
7744When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7745
7746When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7747
7748When 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.,
7749
77501. If primitive: it must match exactly the pattern value
77512. If a complex object: it must match (recursively) the pattern value
77523. If an array: it must match (recursively) the pattern value.)
7753     */
7754    public Base64BinaryType getPatternBase64BinaryType() throws FHIRException { 
7755      if (this.pattern == null)
7756        this.pattern = new Base64BinaryType();
7757      if (!(this.pattern instanceof Base64BinaryType))
7758        throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7759      return (Base64BinaryType) this.pattern;
7760    }
7761
7762    public boolean hasPatternBase64BinaryType() { 
7763      return this != null && this.pattern instanceof Base64BinaryType;
7764    }
7765
7766    /**
7767     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7768
7769When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7770
7771When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7772
7773When 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.,
7774
77751. If primitive: it must match exactly the pattern value
77762. If a complex object: it must match (recursively) the pattern value
77773. If an array: it must match (recursively) the pattern value.)
7778     */
7779    public BooleanType getPatternBooleanType() throws FHIRException { 
7780      if (this.pattern == null)
7781        this.pattern = new BooleanType();
7782      if (!(this.pattern instanceof BooleanType))
7783        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7784      return (BooleanType) this.pattern;
7785    }
7786
7787    public boolean hasPatternBooleanType() { 
7788      return this != null && this.pattern instanceof BooleanType;
7789    }
7790
7791    /**
7792     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7793
7794When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7795
7796When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7797
7798When 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.,
7799
78001. If primitive: it must match exactly the pattern value
78012. If a complex object: it must match (recursively) the pattern value
78023. If an array: it must match (recursively) the pattern value.)
7803     */
7804    public CanonicalType getPatternCanonicalType() throws FHIRException { 
7805      if (this.pattern == null)
7806        this.pattern = new CanonicalType();
7807      if (!(this.pattern instanceof CanonicalType))
7808        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7809      return (CanonicalType) this.pattern;
7810    }
7811
7812    public boolean hasPatternCanonicalType() { 
7813      return this != null && this.pattern instanceof CanonicalType;
7814    }
7815
7816    /**
7817     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7818
7819When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7820
7821When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7822
7823When 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.,
7824
78251. If primitive: it must match exactly the pattern value
78262. If a complex object: it must match (recursively) the pattern value
78273. If an array: it must match (recursively) the pattern value.)
7828     */
7829    public CodeType getPatternCodeType() throws FHIRException { 
7830      if (this.pattern == null)
7831        this.pattern = new CodeType();
7832      if (!(this.pattern instanceof CodeType))
7833        throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7834      return (CodeType) this.pattern;
7835    }
7836
7837    public boolean hasPatternCodeType() { 
7838      return this != null && this.pattern instanceof CodeType;
7839    }
7840
7841    /**
7842     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7843
7844When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7845
7846When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7847
7848When 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.,
7849
78501. If primitive: it must match exactly the pattern value
78512. If a complex object: it must match (recursively) the pattern value
78523. If an array: it must match (recursively) the pattern value.)
7853     */
7854    public DateType getPatternDateType() throws FHIRException { 
7855      if (this.pattern == null)
7856        this.pattern = new DateType();
7857      if (!(this.pattern instanceof DateType))
7858        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7859      return (DateType) this.pattern;
7860    }
7861
7862    public boolean hasPatternDateType() { 
7863      return this != null && this.pattern instanceof DateType;
7864    }
7865
7866    /**
7867     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7868
7869When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7870
7871When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7872
7873When 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.,
7874
78751. If primitive: it must match exactly the pattern value
78762. If a complex object: it must match (recursively) the pattern value
78773. If an array: it must match (recursively) the pattern value.)
7878     */
7879    public DateTimeType getPatternDateTimeType() throws FHIRException { 
7880      if (this.pattern == null)
7881        this.pattern = new DateTimeType();
7882      if (!(this.pattern instanceof DateTimeType))
7883        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7884      return (DateTimeType) this.pattern;
7885    }
7886
7887    public boolean hasPatternDateTimeType() { 
7888      return this != null && this.pattern instanceof DateTimeType;
7889    }
7890
7891    /**
7892     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7893
7894When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7895
7896When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7897
7898When 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.,
7899
79001. If primitive: it must match exactly the pattern value
79012. If a complex object: it must match (recursively) the pattern value
79023. If an array: it must match (recursively) the pattern value.)
7903     */
7904    public DecimalType getPatternDecimalType() throws FHIRException { 
7905      if (this.pattern == null)
7906        this.pattern = new DecimalType();
7907      if (!(this.pattern instanceof DecimalType))
7908        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7909      return (DecimalType) this.pattern;
7910    }
7911
7912    public boolean hasPatternDecimalType() { 
7913      return this != null && this.pattern instanceof DecimalType;
7914    }
7915
7916    /**
7917     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7918
7919When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7920
7921When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7922
7923When 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.,
7924
79251. If primitive: it must match exactly the pattern value
79262. If a complex object: it must match (recursively) the pattern value
79273. If an array: it must match (recursively) the pattern value.)
7928     */
7929    public IdType getPatternIdType() throws FHIRException { 
7930      if (this.pattern == null)
7931        this.pattern = new IdType();
7932      if (!(this.pattern instanceof IdType))
7933        throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7934      return (IdType) this.pattern;
7935    }
7936
7937    public boolean hasPatternIdType() { 
7938      return this != null && this.pattern instanceof IdType;
7939    }
7940
7941    /**
7942     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7943
7944When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7945
7946When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7947
7948When 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.,
7949
79501. If primitive: it must match exactly the pattern value
79512. If a complex object: it must match (recursively) the pattern value
79523. If an array: it must match (recursively) the pattern value.)
7953     */
7954    public InstantType getPatternInstantType() throws FHIRException { 
7955      if (this.pattern == null)
7956        this.pattern = new InstantType();
7957      if (!(this.pattern instanceof InstantType))
7958        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7959      return (InstantType) this.pattern;
7960    }
7961
7962    public boolean hasPatternInstantType() { 
7963      return this != null && this.pattern instanceof InstantType;
7964    }
7965
7966    /**
7967     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7968
7969When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7970
7971When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7972
7973When 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.,
7974
79751. If primitive: it must match exactly the pattern value
79762. If a complex object: it must match (recursively) the pattern value
79773. If an array: it must match (recursively) the pattern value.)
7978     */
7979    public IntegerType getPatternIntegerType() throws FHIRException { 
7980      if (this.pattern == null)
7981        this.pattern = new IntegerType();
7982      if (!(this.pattern instanceof IntegerType))
7983        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.pattern.getClass().getName()+" was encountered");
7984      return (IntegerType) this.pattern;
7985    }
7986
7987    public boolean hasPatternIntegerType() { 
7988      return this != null && this.pattern instanceof IntegerType;
7989    }
7990
7991    /**
7992     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
7993
7994When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
7995
7996When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
7997
7998When 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.,
7999
80001. If primitive: it must match exactly the pattern value
80012. If a complex object: it must match (recursively) the pattern value
80023. If an array: it must match (recursively) the pattern value.)
8003     */
8004    public MarkdownType getPatternMarkdownType() throws FHIRException { 
8005      if (this.pattern == null)
8006        this.pattern = new MarkdownType();
8007      if (!(this.pattern instanceof MarkdownType))
8008        throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8009      return (MarkdownType) this.pattern;
8010    }
8011
8012    public boolean hasPatternMarkdownType() { 
8013      return this != null && this.pattern instanceof MarkdownType;
8014    }
8015
8016    /**
8017     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8018
8019When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8020
8021When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8022
8023When 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.,
8024
80251. If primitive: it must match exactly the pattern value
80262. If a complex object: it must match (recursively) the pattern value
80273. If an array: it must match (recursively) the pattern value.)
8028     */
8029    public OidType getPatternOidType() throws FHIRException { 
8030      if (this.pattern == null)
8031        this.pattern = new OidType();
8032      if (!(this.pattern instanceof OidType))
8033        throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8034      return (OidType) this.pattern;
8035    }
8036
8037    public boolean hasPatternOidType() { 
8038      return this != null && this.pattern instanceof OidType;
8039    }
8040
8041    /**
8042     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8043
8044When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8045
8046When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8047
8048When 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.,
8049
80501. If primitive: it must match exactly the pattern value
80512. If a complex object: it must match (recursively) the pattern value
80523. If an array: it must match (recursively) the pattern value.)
8053     */
8054    public PositiveIntType getPatternPositiveIntType() throws FHIRException { 
8055      if (this.pattern == null)
8056        this.pattern = new PositiveIntType();
8057      if (!(this.pattern instanceof PositiveIntType))
8058        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8059      return (PositiveIntType) this.pattern;
8060    }
8061
8062    public boolean hasPatternPositiveIntType() { 
8063      return this != null && this.pattern instanceof PositiveIntType;
8064    }
8065
8066    /**
8067     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8068
8069When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8070
8071When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8072
8073When 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.,
8074
80751. If primitive: it must match exactly the pattern value
80762. If a complex object: it must match (recursively) the pattern value
80773. If an array: it must match (recursively) the pattern value.)
8078     */
8079    public StringType getPatternStringType() throws FHIRException { 
8080      if (this.pattern == null)
8081        this.pattern = new StringType();
8082      if (!(this.pattern instanceof StringType))
8083        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8084      return (StringType) this.pattern;
8085    }
8086
8087    public boolean hasPatternStringType() { 
8088      return this != null && this.pattern instanceof StringType;
8089    }
8090
8091    /**
8092     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8093
8094When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8095
8096When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8097
8098When 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.,
8099
81001. If primitive: it must match exactly the pattern value
81012. If a complex object: it must match (recursively) the pattern value
81023. If an array: it must match (recursively) the pattern value.)
8103     */
8104    public TimeType getPatternTimeType() throws FHIRException { 
8105      if (this.pattern == null)
8106        this.pattern = new TimeType();
8107      if (!(this.pattern instanceof TimeType))
8108        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8109      return (TimeType) this.pattern;
8110    }
8111
8112    public boolean hasPatternTimeType() { 
8113      return this != null && this.pattern instanceof TimeType;
8114    }
8115
8116    /**
8117     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8118
8119When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8120
8121When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8122
8123When 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.,
8124
81251. If primitive: it must match exactly the pattern value
81262. If a complex object: it must match (recursively) the pattern value
81273. If an array: it must match (recursively) the pattern value.)
8128     */
8129    public UnsignedIntType getPatternUnsignedIntType() throws FHIRException { 
8130      if (this.pattern == null)
8131        this.pattern = new UnsignedIntType();
8132      if (!(this.pattern instanceof UnsignedIntType))
8133        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8134      return (UnsignedIntType) this.pattern;
8135    }
8136
8137    public boolean hasPatternUnsignedIntType() { 
8138      return this != null && this.pattern instanceof UnsignedIntType;
8139    }
8140
8141    /**
8142     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8143
8144When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8145
8146When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8147
8148When 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.,
8149
81501. If primitive: it must match exactly the pattern value
81512. If a complex object: it must match (recursively) the pattern value
81523. If an array: it must match (recursively) the pattern value.)
8153     */
8154    public UriType getPatternUriType() throws FHIRException { 
8155      if (this.pattern == null)
8156        this.pattern = new UriType();
8157      if (!(this.pattern instanceof UriType))
8158        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8159      return (UriType) this.pattern;
8160    }
8161
8162    public boolean hasPatternUriType() { 
8163      return this != null && this.pattern instanceof UriType;
8164    }
8165
8166    /**
8167     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8168
8169When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8170
8171When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8172
8173When 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.,
8174
81751. If primitive: it must match exactly the pattern value
81762. If a complex object: it must match (recursively) the pattern value
81773. If an array: it must match (recursively) the pattern value.)
8178     */
8179    public UrlType getPatternUrlType() throws FHIRException { 
8180      if (this.pattern == null)
8181        this.pattern = new UrlType();
8182      if (!(this.pattern instanceof UrlType))
8183        throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8184      return (UrlType) this.pattern;
8185    }
8186
8187    public boolean hasPatternUrlType() { 
8188      return this != null && this.pattern instanceof UrlType;
8189    }
8190
8191    /**
8192     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8193
8194When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8195
8196When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8197
8198When 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.,
8199
82001. If primitive: it must match exactly the pattern value
82012. If a complex object: it must match (recursively) the pattern value
82023. If an array: it must match (recursively) the pattern value.)
8203     */
8204    public UuidType getPatternUuidType() throws FHIRException { 
8205      if (this.pattern == null)
8206        this.pattern = new UuidType();
8207      if (!(this.pattern instanceof UuidType))
8208        throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.pattern.getClass().getName()+" was encountered");
8209      return (UuidType) this.pattern;
8210    }
8211
8212    public boolean hasPatternUuidType() { 
8213      return this != null && this.pattern instanceof UuidType;
8214    }
8215
8216    /**
8217     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8218
8219When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8220
8221When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8222
8223When 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.,
8224
82251. If primitive: it must match exactly the pattern value
82262. If a complex object: it must match (recursively) the pattern value
82273. If an array: it must match (recursively) the pattern value.)
8228     */
8229    public Address getPatternAddress() throws FHIRException { 
8230      if (this.pattern == null)
8231        this.pattern = new Address();
8232      if (!(this.pattern instanceof Address))
8233        throw new FHIRException("Type mismatch: the type Address was expected, but "+this.pattern.getClass().getName()+" was encountered");
8234      return (Address) this.pattern;
8235    }
8236
8237    public boolean hasPatternAddress() { 
8238      return this != null && this.pattern instanceof Address;
8239    }
8240
8241    /**
8242     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8243
8244When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8245
8246When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8247
8248When 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.,
8249
82501. If primitive: it must match exactly the pattern value
82512. If a complex object: it must match (recursively) the pattern value
82523. If an array: it must match (recursively) the pattern value.)
8253     */
8254    public Age getPatternAge() throws FHIRException { 
8255      if (this.pattern == null)
8256        this.pattern = new Age();
8257      if (!(this.pattern instanceof Age))
8258        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.pattern.getClass().getName()+" was encountered");
8259      return (Age) this.pattern;
8260    }
8261
8262    public boolean hasPatternAge() { 
8263      return this != null && this.pattern instanceof Age;
8264    }
8265
8266    /**
8267     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8268
8269When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8270
8271When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8272
8273When 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.,
8274
82751. If primitive: it must match exactly the pattern value
82762. If a complex object: it must match (recursively) the pattern value
82773. If an array: it must match (recursively) the pattern value.)
8278     */
8279    public Annotation getPatternAnnotation() throws FHIRException { 
8280      if (this.pattern == null)
8281        this.pattern = new Annotation();
8282      if (!(this.pattern instanceof Annotation))
8283        throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.pattern.getClass().getName()+" was encountered");
8284      return (Annotation) this.pattern;
8285    }
8286
8287    public boolean hasPatternAnnotation() { 
8288      return this != null && this.pattern instanceof Annotation;
8289    }
8290
8291    /**
8292     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8293
8294When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8295
8296When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8297
8298When 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.,
8299
83001. If primitive: it must match exactly the pattern value
83012. If a complex object: it must match (recursively) the pattern value
83023. If an array: it must match (recursively) the pattern value.)
8303     */
8304    public Attachment getPatternAttachment() throws FHIRException { 
8305      if (this.pattern == null)
8306        this.pattern = new Attachment();
8307      if (!(this.pattern instanceof Attachment))
8308        throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.pattern.getClass().getName()+" was encountered");
8309      return (Attachment) this.pattern;
8310    }
8311
8312    public boolean hasPatternAttachment() { 
8313      return this != null && this.pattern instanceof Attachment;
8314    }
8315
8316    /**
8317     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8318
8319When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8320
8321When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8322
8323When 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.,
8324
83251. If primitive: it must match exactly the pattern value
83262. If a complex object: it must match (recursively) the pattern value
83273. If an array: it must match (recursively) the pattern value.)
8328     */
8329    public CodeableConcept getPatternCodeableConcept() throws FHIRException { 
8330      if (this.pattern == null)
8331        this.pattern = new CodeableConcept();
8332      if (!(this.pattern instanceof CodeableConcept))
8333        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.pattern.getClass().getName()+" was encountered");
8334      return (CodeableConcept) this.pattern;
8335    }
8336
8337    public boolean hasPatternCodeableConcept() { 
8338      return this != null && this.pattern instanceof CodeableConcept;
8339    }
8340
8341    /**
8342     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8343
8344When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8345
8346When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8347
8348When 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.,
8349
83501. If primitive: it must match exactly the pattern value
83512. If a complex object: it must match (recursively) the pattern value
83523. If an array: it must match (recursively) the pattern value.)
8353     */
8354    public CodeableReference getPatternCodeableReference() throws FHIRException { 
8355      if (this.pattern == null)
8356        this.pattern = new CodeableReference();
8357      if (!(this.pattern instanceof CodeableReference))
8358        throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.pattern.getClass().getName()+" was encountered");
8359      return (CodeableReference) this.pattern;
8360    }
8361
8362    public boolean hasPatternCodeableReference() { 
8363      return this != null && this.pattern instanceof CodeableReference;
8364    }
8365
8366    /**
8367     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8368
8369When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8370
8371When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8372
8373When 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.,
8374
83751. If primitive: it must match exactly the pattern value
83762. If a complex object: it must match (recursively) the pattern value
83773. If an array: it must match (recursively) the pattern value.)
8378     */
8379    public Coding getPatternCoding() throws FHIRException { 
8380      if (this.pattern == null)
8381        this.pattern = new Coding();
8382      if (!(this.pattern instanceof Coding))
8383        throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.pattern.getClass().getName()+" was encountered");
8384      return (Coding) this.pattern;
8385    }
8386
8387    public boolean hasPatternCoding() { 
8388      return this != null && this.pattern instanceof Coding;
8389    }
8390
8391    /**
8392     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8393
8394When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8395
8396When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8397
8398When 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.,
8399
84001. If primitive: it must match exactly the pattern value
84012. If a complex object: it must match (recursively) the pattern value
84023. If an array: it must match (recursively) the pattern value.)
8403     */
8404    public ContactPoint getPatternContactPoint() throws FHIRException { 
8405      if (this.pattern == null)
8406        this.pattern = new ContactPoint();
8407      if (!(this.pattern instanceof ContactPoint))
8408        throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.pattern.getClass().getName()+" was encountered");
8409      return (ContactPoint) this.pattern;
8410    }
8411
8412    public boolean hasPatternContactPoint() { 
8413      return this != null && this.pattern instanceof ContactPoint;
8414    }
8415
8416    /**
8417     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8418
8419When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8420
8421When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8422
8423When 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.,
8424
84251. If primitive: it must match exactly the pattern value
84262. If a complex object: it must match (recursively) the pattern value
84273. If an array: it must match (recursively) the pattern value.)
8428     */
8429    public Count getPatternCount() throws FHIRException { 
8430      if (this.pattern == null)
8431        this.pattern = new Count();
8432      if (!(this.pattern instanceof Count))
8433        throw new FHIRException("Type mismatch: the type Count was expected, but "+this.pattern.getClass().getName()+" was encountered");
8434      return (Count) this.pattern;
8435    }
8436
8437    public boolean hasPatternCount() { 
8438      return this != null && this.pattern instanceof Count;
8439    }
8440
8441    /**
8442     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8443
8444When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8445
8446When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8447
8448When 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.,
8449
84501. If primitive: it must match exactly the pattern value
84512. If a complex object: it must match (recursively) the pattern value
84523. If an array: it must match (recursively) the pattern value.)
8453     */
8454    public Distance getPatternDistance() throws FHIRException { 
8455      if (this.pattern == null)
8456        this.pattern = new Distance();
8457      if (!(this.pattern instanceof Distance))
8458        throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.pattern.getClass().getName()+" was encountered");
8459      return (Distance) this.pattern;
8460    }
8461
8462    public boolean hasPatternDistance() { 
8463      return this != null && this.pattern instanceof Distance;
8464    }
8465
8466    /**
8467     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8468
8469When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8470
8471When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8472
8473When 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.,
8474
84751. If primitive: it must match exactly the pattern value
84762. If a complex object: it must match (recursively) the pattern value
84773. If an array: it must match (recursively) the pattern value.)
8478     */
8479    public Duration getPatternDuration() throws FHIRException { 
8480      if (this.pattern == null)
8481        this.pattern = new Duration();
8482      if (!(this.pattern instanceof Duration))
8483        throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.pattern.getClass().getName()+" was encountered");
8484      return (Duration) this.pattern;
8485    }
8486
8487    public boolean hasPatternDuration() { 
8488      return this != null && this.pattern instanceof Duration;
8489    }
8490
8491    /**
8492     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8493
8494When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8495
8496When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8497
8498When 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.,
8499
85001. If primitive: it must match exactly the pattern value
85012. If a complex object: it must match (recursively) the pattern value
85023. If an array: it must match (recursively) the pattern value.)
8503     */
8504    public HumanName getPatternHumanName() throws FHIRException { 
8505      if (this.pattern == null)
8506        this.pattern = new HumanName();
8507      if (!(this.pattern instanceof HumanName))
8508        throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.pattern.getClass().getName()+" was encountered");
8509      return (HumanName) this.pattern;
8510    }
8511
8512    public boolean hasPatternHumanName() { 
8513      return this != null && this.pattern instanceof HumanName;
8514    }
8515
8516    /**
8517     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8518
8519When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8520
8521When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8522
8523When 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.,
8524
85251. If primitive: it must match exactly the pattern value
85262. If a complex object: it must match (recursively) the pattern value
85273. If an array: it must match (recursively) the pattern value.)
8528     */
8529    public Identifier getPatternIdentifier() throws FHIRException { 
8530      if (this.pattern == null)
8531        this.pattern = new Identifier();
8532      if (!(this.pattern instanceof Identifier))
8533        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.pattern.getClass().getName()+" was encountered");
8534      return (Identifier) this.pattern;
8535    }
8536
8537    public boolean hasPatternIdentifier() { 
8538      return this != null && this.pattern instanceof Identifier;
8539    }
8540
8541    /**
8542     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8543
8544When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8545
8546When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8547
8548When 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.,
8549
85501. If primitive: it must match exactly the pattern value
85512. If a complex object: it must match (recursively) the pattern value
85523. If an array: it must match (recursively) the pattern value.)
8553     */
8554    public Money getPatternMoney() throws FHIRException { 
8555      if (this.pattern == null)
8556        this.pattern = new Money();
8557      if (!(this.pattern instanceof Money))
8558        throw new FHIRException("Type mismatch: the type Money was expected, but "+this.pattern.getClass().getName()+" was encountered");
8559      return (Money) this.pattern;
8560    }
8561
8562    public boolean hasPatternMoney() { 
8563      return this != null && this.pattern instanceof Money;
8564    }
8565
8566    /**
8567     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8568
8569When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8570
8571When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8572
8573When 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.,
8574
85751. If primitive: it must match exactly the pattern value
85762. If a complex object: it must match (recursively) the pattern value
85773. If an array: it must match (recursively) the pattern value.)
8578     */
8579    public Period getPatternPeriod() throws FHIRException { 
8580      if (this.pattern == null)
8581        this.pattern = new Period();
8582      if (!(this.pattern instanceof Period))
8583        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.pattern.getClass().getName()+" was encountered");
8584      return (Period) this.pattern;
8585    }
8586
8587    public boolean hasPatternPeriod() { 
8588      return this != null && this.pattern instanceof Period;
8589    }
8590
8591    /**
8592     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8593
8594When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8595
8596When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8597
8598When 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.,
8599
86001. If primitive: it must match exactly the pattern value
86012. If a complex object: it must match (recursively) the pattern value
86023. If an array: it must match (recursively) the pattern value.)
8603     */
8604    public Quantity getPatternQuantity() throws FHIRException { 
8605      if (this.pattern == null)
8606        this.pattern = new Quantity();
8607      if (!(this.pattern instanceof Quantity))
8608        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.pattern.getClass().getName()+" was encountered");
8609      return (Quantity) this.pattern;
8610    }
8611
8612    public boolean hasPatternQuantity() { 
8613      return this != null && this.pattern instanceof Quantity;
8614    }
8615
8616    /**
8617     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8618
8619When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8620
8621When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8622
8623When 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.,
8624
86251. If primitive: it must match exactly the pattern value
86262. If a complex object: it must match (recursively) the pattern value
86273. If an array: it must match (recursively) the pattern value.)
8628     */
8629    public Range getPatternRange() throws FHIRException { 
8630      if (this.pattern == null)
8631        this.pattern = new Range();
8632      if (!(this.pattern instanceof Range))
8633        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.pattern.getClass().getName()+" was encountered");
8634      return (Range) this.pattern;
8635    }
8636
8637    public boolean hasPatternRange() { 
8638      return this != null && this.pattern instanceof Range;
8639    }
8640
8641    /**
8642     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8643
8644When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8645
8646When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8647
8648When 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.,
8649
86501. If primitive: it must match exactly the pattern value
86512. If a complex object: it must match (recursively) the pattern value
86523. If an array: it must match (recursively) the pattern value.)
8653     */
8654    public Ratio getPatternRatio() throws FHIRException { 
8655      if (this.pattern == null)
8656        this.pattern = new Ratio();
8657      if (!(this.pattern instanceof Ratio))
8658        throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.pattern.getClass().getName()+" was encountered");
8659      return (Ratio) this.pattern;
8660    }
8661
8662    public boolean hasPatternRatio() { 
8663      return this != null && this.pattern instanceof Ratio;
8664    }
8665
8666    /**
8667     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8668
8669When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8670
8671When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8672
8673When 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.,
8674
86751. If primitive: it must match exactly the pattern value
86762. If a complex object: it must match (recursively) the pattern value
86773. If an array: it must match (recursively) the pattern value.)
8678     */
8679    public RatioRange getPatternRatioRange() throws FHIRException { 
8680      if (this.pattern == null)
8681        this.pattern = new RatioRange();
8682      if (!(this.pattern instanceof RatioRange))
8683        throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.pattern.getClass().getName()+" was encountered");
8684      return (RatioRange) this.pattern;
8685    }
8686
8687    public boolean hasPatternRatioRange() { 
8688      return this != null && this.pattern instanceof RatioRange;
8689    }
8690
8691    /**
8692     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8693
8694When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8695
8696When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8697
8698When 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.,
8699
87001. If primitive: it must match exactly the pattern value
87012. If a complex object: it must match (recursively) the pattern value
87023. If an array: it must match (recursively) the pattern value.)
8703     */
8704    public Reference getPatternReference() throws FHIRException { 
8705      if (this.pattern == null)
8706        this.pattern = new Reference();
8707      if (!(this.pattern instanceof Reference))
8708        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.pattern.getClass().getName()+" was encountered");
8709      return (Reference) this.pattern;
8710    }
8711
8712    public boolean hasPatternReference() { 
8713      return this != null && this.pattern instanceof Reference;
8714    }
8715
8716    /**
8717     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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     */
8729    public SampledData getPatternSampledData() throws FHIRException { 
8730      if (this.pattern == null)
8731        this.pattern = new SampledData();
8732      if (!(this.pattern instanceof SampledData))
8733        throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.pattern.getClass().getName()+" was encountered");
8734      return (SampledData) this.pattern;
8735    }
8736
8737    public boolean hasPatternSampledData() { 
8738      return this != null && this.pattern instanceof SampledData;
8739    }
8740
8741    /**
8742     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8743
8744When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8745
8746When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8747
8748When 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.,
8749
87501. If primitive: it must match exactly the pattern value
87512. If a complex object: it must match (recursively) the pattern value
87523. If an array: it must match (recursively) the pattern value.)
8753     */
8754    public Signature getPatternSignature() throws FHIRException { 
8755      if (this.pattern == null)
8756        this.pattern = new Signature();
8757      if (!(this.pattern instanceof Signature))
8758        throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.pattern.getClass().getName()+" was encountered");
8759      return (Signature) this.pattern;
8760    }
8761
8762    public boolean hasPatternSignature() { 
8763      return this != null && this.pattern instanceof Signature;
8764    }
8765
8766    /**
8767     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8768
8769When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8770
8771When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8772
8773When 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.,
8774
87751. If primitive: it must match exactly the pattern value
87762. If a complex object: it must match (recursively) the pattern value
87773. If an array: it must match (recursively) the pattern value.)
8778     */
8779    public Timing getPatternTiming() throws FHIRException { 
8780      if (this.pattern == null)
8781        this.pattern = new Timing();
8782      if (!(this.pattern instanceof Timing))
8783        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.pattern.getClass().getName()+" was encountered");
8784      return (Timing) this.pattern;
8785    }
8786
8787    public boolean hasPatternTiming() { 
8788      return this != null && this.pattern instanceof Timing;
8789    }
8790
8791    /**
8792     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8793
8794When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8795
8796When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8797
8798When 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.,
8799
88001. If primitive: it must match exactly the pattern value
88012. If a complex object: it must match (recursively) the pattern value
88023. If an array: it must match (recursively) the pattern value.)
8803     */
8804    public ContactDetail getPatternContactDetail() throws FHIRException { 
8805      if (this.pattern == null)
8806        this.pattern = new ContactDetail();
8807      if (!(this.pattern instanceof ContactDetail))
8808        throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.pattern.getClass().getName()+" was encountered");
8809      return (ContactDetail) this.pattern;
8810    }
8811
8812    public boolean hasPatternContactDetail() { 
8813      return this != null && this.pattern instanceof ContactDetail;
8814    }
8815
8816    /**
8817     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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     */
8829    public Contributor getPatternContributor() throws FHIRException { 
8830      if (this.pattern == null)
8831        this.pattern = new Contributor();
8832      if (!(this.pattern instanceof Contributor))
8833        throw new FHIRException("Type mismatch: the type Contributor was expected, but "+this.pattern.getClass().getName()+" was encountered");
8834      return (Contributor) this.pattern;
8835    }
8836
8837    public boolean hasPatternContributor() { 
8838      return this != null && this.pattern instanceof Contributor;
8839    }
8840
8841    /**
8842     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8843
8844When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8845
8846When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8847
8848When 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.,
8849
88501. If primitive: it must match exactly the pattern value
88512. If a complex object: it must match (recursively) the pattern value
88523. If an array: it must match (recursively) the pattern value.)
8853     */
8854    public DataRequirement getPatternDataRequirement() throws FHIRException { 
8855      if (this.pattern == null)
8856        this.pattern = new DataRequirement();
8857      if (!(this.pattern instanceof DataRequirement))
8858        throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.pattern.getClass().getName()+" was encountered");
8859      return (DataRequirement) this.pattern;
8860    }
8861
8862    public boolean hasPatternDataRequirement() { 
8863      return this != null && this.pattern instanceof DataRequirement;
8864    }
8865
8866    /**
8867     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8868
8869When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8870
8871When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8872
8873When 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.,
8874
88751. If primitive: it must match exactly the pattern value
88762. If a complex object: it must match (recursively) the pattern value
88773. If an array: it must match (recursively) the pattern value.)
8878     */
8879    public Expression getPatternExpression() throws FHIRException { 
8880      if (this.pattern == null)
8881        this.pattern = new Expression();
8882      if (!(this.pattern instanceof Expression))
8883        throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.pattern.getClass().getName()+" was encountered");
8884      return (Expression) this.pattern;
8885    }
8886
8887    public boolean hasPatternExpression() { 
8888      return this != null && this.pattern instanceof Expression;
8889    }
8890
8891    /**
8892     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8893
8894When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8895
8896When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8897
8898When 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.,
8899
89001. If primitive: it must match exactly the pattern value
89012. If a complex object: it must match (recursively) the pattern value
89023. If an array: it must match (recursively) the pattern value.)
8903     */
8904    public ParameterDefinition getPatternParameterDefinition() throws FHIRException { 
8905      if (this.pattern == null)
8906        this.pattern = new ParameterDefinition();
8907      if (!(this.pattern instanceof ParameterDefinition))
8908        throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.pattern.getClass().getName()+" was encountered");
8909      return (ParameterDefinition) this.pattern;
8910    }
8911
8912    public boolean hasPatternParameterDefinition() { 
8913      return this != null && this.pattern instanceof ParameterDefinition;
8914    }
8915
8916    /**
8917     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8918
8919When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8920
8921When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8922
8923When 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.,
8924
89251. If primitive: it must match exactly the pattern value
89262. If a complex object: it must match (recursively) the pattern value
89273. If an array: it must match (recursively) the pattern value.)
8928     */
8929    public RelatedArtifact getPatternRelatedArtifact() throws FHIRException { 
8930      if (this.pattern == null)
8931        this.pattern = new RelatedArtifact();
8932      if (!(this.pattern instanceof RelatedArtifact))
8933        throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.pattern.getClass().getName()+" was encountered");
8934      return (RelatedArtifact) this.pattern;
8935    }
8936
8937    public boolean hasPatternRelatedArtifact() { 
8938      return this != null && this.pattern instanceof RelatedArtifact;
8939    }
8940
8941    /**
8942     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8943
8944When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8945
8946When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8947
8948When 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.,
8949
89501. If primitive: it must match exactly the pattern value
89512. If a complex object: it must match (recursively) the pattern value
89523. If an array: it must match (recursively) the pattern value.)
8953     */
8954    public TriggerDefinition getPatternTriggerDefinition() throws FHIRException { 
8955      if (this.pattern == null)
8956        this.pattern = new TriggerDefinition();
8957      if (!(this.pattern instanceof TriggerDefinition))
8958        throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.pattern.getClass().getName()+" was encountered");
8959      return (TriggerDefinition) this.pattern;
8960    }
8961
8962    public boolean hasPatternTriggerDefinition() { 
8963      return this != null && this.pattern instanceof TriggerDefinition;
8964    }
8965
8966    /**
8967     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8968
8969When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8970
8971When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8972
8973When 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.,
8974
89751. If primitive: it must match exactly the pattern value
89762. If a complex object: it must match (recursively) the pattern value
89773. If an array: it must match (recursively) the pattern value.)
8978     */
8979    public UsageContext getPatternUsageContext() throws FHIRException { 
8980      if (this.pattern == null)
8981        this.pattern = new UsageContext();
8982      if (!(this.pattern instanceof UsageContext))
8983        throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.pattern.getClass().getName()+" was encountered");
8984      return (UsageContext) this.pattern;
8985    }
8986
8987    public boolean hasPatternUsageContext() { 
8988      return this != null && this.pattern instanceof UsageContext;
8989    }
8990
8991    /**
8992     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
8993
8994When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
8995
8996When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
8997
8998When 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.,
8999
90001. If primitive: it must match exactly the pattern value
90012. If a complex object: it must match (recursively) the pattern value
90023. If an array: it must match (recursively) the pattern value.)
9003     */
9004    public Dosage getPatternDosage() throws FHIRException { 
9005      if (this.pattern == null)
9006        this.pattern = new Dosage();
9007      if (!(this.pattern instanceof Dosage))
9008        throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.pattern.getClass().getName()+" was encountered");
9009      return (Dosage) this.pattern;
9010    }
9011
9012    public boolean hasPatternDosage() { 
9013      return this != null && this.pattern instanceof Dosage;
9014    }
9015
9016    /**
9017     * @return {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
9018
9019When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9020
9021When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
9022
9023When 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.,
9024
90251. If primitive: it must match exactly the pattern value
90262. If a complex object: it must match (recursively) the pattern value
90273. If an array: it must match (recursively) the pattern value.)
9028     */
9029    public Meta getPatternMeta() throws FHIRException { 
9030      if (this.pattern == null)
9031        this.pattern = new Meta();
9032      if (!(this.pattern instanceof Meta))
9033        throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.pattern.getClass().getName()+" was encountered");
9034      return (Meta) this.pattern;
9035    }
9036
9037    public boolean hasPatternMeta() { 
9038      return this != null && this.pattern instanceof Meta;
9039    }
9040
9041    public boolean hasPattern() { 
9042      return this.pattern != null && !this.pattern.isEmpty();
9043    }
9044
9045    /**
9046     * @param value {@link #pattern} (Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example.  
9047
9048When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
9049
9050When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array.
9051
9052When 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.,
9053
90541. If primitive: it must match exactly the pattern value
90552. If a complex object: it must match (recursively) the pattern value
90563. If an array: it must match (recursively) the pattern value.)
9057     */
9058    public ElementDefinition setPattern(DataType value) { 
9059      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 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 Contributor || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Dosage || value instanceof Meta))
9060        throw new Error("Not the right type for ElementDefinition.pattern[x]: "+value.fhirType());
9061      this.pattern = value;
9062      return this;
9063    }
9064
9065    /**
9066     * @return {@link #example} (A sample value for this element demonstrating the type of information that would typically be found in the element.)
9067     */
9068    public List<ElementDefinitionExampleComponent> getExample() { 
9069      if (this.example == null)
9070        this.example = new ArrayList<ElementDefinitionExampleComponent>();
9071      return this.example;
9072    }
9073
9074    /**
9075     * @return Returns a reference to <code>this</code> for easy method chaining
9076     */
9077    public ElementDefinition setExample(List<ElementDefinitionExampleComponent> theExample) { 
9078      this.example = theExample;
9079      return this;
9080    }
9081
9082    public boolean hasExample() { 
9083      if (this.example == null)
9084        return false;
9085      for (ElementDefinitionExampleComponent item : this.example)
9086        if (!item.isEmpty())
9087          return true;
9088      return false;
9089    }
9090
9091    public ElementDefinitionExampleComponent addExample() { //3
9092      ElementDefinitionExampleComponent t = new ElementDefinitionExampleComponent();
9093      if (this.example == null)
9094        this.example = new ArrayList<ElementDefinitionExampleComponent>();
9095      this.example.add(t);
9096      return t;
9097    }
9098
9099    public ElementDefinition addExample(ElementDefinitionExampleComponent t) { //3
9100      if (t == null)
9101        return this;
9102      if (this.example == null)
9103        this.example = new ArrayList<ElementDefinitionExampleComponent>();
9104      this.example.add(t);
9105      return this;
9106    }
9107
9108    /**
9109     * @return The first repetition of repeating field {@link #example}, creating it if it does not already exist {3}
9110     */
9111    public ElementDefinitionExampleComponent getExampleFirstRep() { 
9112      if (getExample().isEmpty()) {
9113        addExample();
9114      }
9115      return getExample().get(0);
9116    }
9117
9118    /**
9119     * @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.)
9120     */
9121    public DataType getMinValue() { 
9122      return this.minValue;
9123    }
9124
9125    /**
9126     * @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.)
9127     */
9128    public DateType getMinValueDateType() throws FHIRException { 
9129      if (this.minValue == null)
9130        this.minValue = new DateType();
9131      if (!(this.minValue instanceof DateType))
9132        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.minValue.getClass().getName()+" was encountered");
9133      return (DateType) this.minValue;
9134    }
9135
9136    public boolean hasMinValueDateType() { 
9137      return this != null && this.minValue instanceof DateType;
9138    }
9139
9140    /**
9141     * @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.)
9142     */
9143    public DateTimeType getMinValueDateTimeType() throws FHIRException { 
9144      if (this.minValue == null)
9145        this.minValue = new DateTimeType();
9146      if (!(this.minValue instanceof DateTimeType))
9147        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.minValue.getClass().getName()+" was encountered");
9148      return (DateTimeType) this.minValue;
9149    }
9150
9151    public boolean hasMinValueDateTimeType() { 
9152      return this != null && this.minValue instanceof DateTimeType;
9153    }
9154
9155    /**
9156     * @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.)
9157     */
9158    public InstantType getMinValueInstantType() throws FHIRException { 
9159      if (this.minValue == null)
9160        this.minValue = new InstantType();
9161      if (!(this.minValue instanceof InstantType))
9162        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.minValue.getClass().getName()+" was encountered");
9163      return (InstantType) this.minValue;
9164    }
9165
9166    public boolean hasMinValueInstantType() { 
9167      return this != null && this.minValue instanceof InstantType;
9168    }
9169
9170    /**
9171     * @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.)
9172     */
9173    public TimeType getMinValueTimeType() throws FHIRException { 
9174      if (this.minValue == null)
9175        this.minValue = new TimeType();
9176      if (!(this.minValue instanceof TimeType))
9177        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.minValue.getClass().getName()+" was encountered");
9178      return (TimeType) this.minValue;
9179    }
9180
9181    public boolean hasMinValueTimeType() { 
9182      return this != null && this.minValue instanceof TimeType;
9183    }
9184
9185    /**
9186     * @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.)
9187     */
9188    public DecimalType getMinValueDecimalType() throws FHIRException { 
9189      if (this.minValue == null)
9190        this.minValue = new DecimalType();
9191      if (!(this.minValue instanceof DecimalType))
9192        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.minValue.getClass().getName()+" was encountered");
9193      return (DecimalType) this.minValue;
9194    }
9195
9196    public boolean hasMinValueDecimalType() { 
9197      return this != null && this.minValue instanceof DecimalType;
9198    }
9199
9200    /**
9201     * @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.)
9202     */
9203    public IntegerType getMinValueIntegerType() throws FHIRException { 
9204      if (this.minValue == null)
9205        this.minValue = new IntegerType();
9206      if (!(this.minValue instanceof IntegerType))
9207        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.minValue.getClass().getName()+" was encountered");
9208      return (IntegerType) this.minValue;
9209    }
9210
9211    public boolean hasMinValueIntegerType() { 
9212      return this != null && this.minValue instanceof IntegerType;
9213    }
9214
9215    /**
9216     * @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.)
9217     */
9218    public PositiveIntType getMinValuePositiveIntType() throws FHIRException { 
9219      if (this.minValue == null)
9220        this.minValue = new PositiveIntType();
9221      if (!(this.minValue instanceof PositiveIntType))
9222        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.minValue.getClass().getName()+" was encountered");
9223      return (PositiveIntType) this.minValue;
9224    }
9225
9226    public boolean hasMinValuePositiveIntType() { 
9227      return this != null && this.minValue instanceof PositiveIntType;
9228    }
9229
9230    /**
9231     * @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.)
9232     */
9233    public UnsignedIntType getMinValueUnsignedIntType() throws FHIRException { 
9234      if (this.minValue == null)
9235        this.minValue = new UnsignedIntType();
9236      if (!(this.minValue instanceof UnsignedIntType))
9237        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.minValue.getClass().getName()+" was encountered");
9238      return (UnsignedIntType) this.minValue;
9239    }
9240
9241    public boolean hasMinValueUnsignedIntType() { 
9242      return this != null && this.minValue instanceof UnsignedIntType;
9243    }
9244
9245    /**
9246     * @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.)
9247     */
9248    public Quantity getMinValueQuantity() throws FHIRException { 
9249      if (this.minValue == null)
9250        this.minValue = new Quantity();
9251      if (!(this.minValue instanceof Quantity))
9252        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.minValue.getClass().getName()+" was encountered");
9253      return (Quantity) this.minValue;
9254    }
9255
9256    public boolean hasMinValueQuantity() { 
9257      return this != null && this.minValue instanceof Quantity;
9258    }
9259
9260    public boolean hasMinValue() { 
9261      return this.minValue != null && !this.minValue.isEmpty();
9262    }
9263
9264    /**
9265     * @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.)
9266     */
9267    public ElementDefinition setMinValue(DataType value) { 
9268      if (value != null && !(value instanceof DateType || value instanceof DateTimeType || value instanceof InstantType || value instanceof TimeType || value instanceof DecimalType || value instanceof IntegerType || value instanceof PositiveIntType || value instanceof UnsignedIntType || value instanceof Quantity))
9269        throw new Error("Not the right type for ElementDefinition.minValue[x]: "+value.fhirType());
9270      this.minValue = value;
9271      return this;
9272    }
9273
9274    /**
9275     * @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.)
9276     */
9277    public DataType getMaxValue() { 
9278      return this.maxValue;
9279    }
9280
9281    /**
9282     * @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.)
9283     */
9284    public DateType getMaxValueDateType() throws FHIRException { 
9285      if (this.maxValue == null)
9286        this.maxValue = new DateType();
9287      if (!(this.maxValue instanceof DateType))
9288        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
9289      return (DateType) this.maxValue;
9290    }
9291
9292    public boolean hasMaxValueDateType() { 
9293      return this != null && this.maxValue instanceof DateType;
9294    }
9295
9296    /**
9297     * @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.)
9298     */
9299    public DateTimeType getMaxValueDateTimeType() throws FHIRException { 
9300      if (this.maxValue == null)
9301        this.maxValue = new DateTimeType();
9302      if (!(this.maxValue instanceof DateTimeType))
9303        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
9304      return (DateTimeType) this.maxValue;
9305    }
9306
9307    public boolean hasMaxValueDateTimeType() { 
9308      return this != null && this.maxValue instanceof DateTimeType;
9309    }
9310
9311    /**
9312     * @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.)
9313     */
9314    public InstantType getMaxValueInstantType() throws FHIRException { 
9315      if (this.maxValue == null)
9316        this.maxValue = new InstantType();
9317      if (!(this.maxValue instanceof InstantType))
9318        throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
9319      return (InstantType) this.maxValue;
9320    }
9321
9322    public boolean hasMaxValueInstantType() { 
9323      return this != null && this.maxValue instanceof InstantType;
9324    }
9325
9326    /**
9327     * @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.)
9328     */
9329    public TimeType getMaxValueTimeType() throws FHIRException { 
9330      if (this.maxValue == null)
9331        this.maxValue = new TimeType();
9332      if (!(this.maxValue instanceof TimeType))
9333        throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
9334      return (TimeType) this.maxValue;
9335    }
9336
9337    public boolean hasMaxValueTimeType() { 
9338      return this != null && this.maxValue instanceof TimeType;
9339    }
9340
9341    /**
9342     * @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.)
9343     */
9344    public DecimalType getMaxValueDecimalType() throws FHIRException { 
9345      if (this.maxValue == null)
9346        this.maxValue = new DecimalType();
9347      if (!(this.maxValue instanceof DecimalType))
9348        throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
9349      return (DecimalType) this.maxValue;
9350    }
9351
9352    public boolean hasMaxValueDecimalType() { 
9353      return this != null && this.maxValue instanceof DecimalType;
9354    }
9355
9356    /**
9357     * @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.)
9358     */
9359    public IntegerType getMaxValueIntegerType() throws FHIRException { 
9360      if (this.maxValue == null)
9361        this.maxValue = new IntegerType();
9362      if (!(this.maxValue instanceof IntegerType))
9363        throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
9364      return (IntegerType) this.maxValue;
9365    }
9366
9367    public boolean hasMaxValueIntegerType() { 
9368      return this != null && this.maxValue instanceof IntegerType;
9369    }
9370
9371    /**
9372     * @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.)
9373     */
9374    public PositiveIntType getMaxValuePositiveIntType() throws FHIRException { 
9375      if (this.maxValue == null)
9376        this.maxValue = new PositiveIntType();
9377      if (!(this.maxValue instanceof PositiveIntType))
9378        throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
9379      return (PositiveIntType) this.maxValue;
9380    }
9381
9382    public boolean hasMaxValuePositiveIntType() { 
9383      return this != null && this.maxValue instanceof PositiveIntType;
9384    }
9385
9386    /**
9387     * @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.)
9388     */
9389    public UnsignedIntType getMaxValueUnsignedIntType() throws FHIRException { 
9390      if (this.maxValue == null)
9391        this.maxValue = new UnsignedIntType();
9392      if (!(this.maxValue instanceof UnsignedIntType))
9393        throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.maxValue.getClass().getName()+" was encountered");
9394      return (UnsignedIntType) this.maxValue;
9395    }
9396
9397    public boolean hasMaxValueUnsignedIntType() { 
9398      return this != null && this.maxValue instanceof UnsignedIntType;
9399    }
9400
9401    /**
9402     * @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.)
9403     */
9404    public Quantity getMaxValueQuantity() throws FHIRException { 
9405      if (this.maxValue == null)
9406        this.maxValue = new Quantity();
9407      if (!(this.maxValue instanceof Quantity))
9408        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.maxValue.getClass().getName()+" was encountered");
9409      return (Quantity) this.maxValue;
9410    }
9411
9412    public boolean hasMaxValueQuantity() { 
9413      return this != null && this.maxValue instanceof Quantity;
9414    }
9415
9416    public boolean hasMaxValue() { 
9417      return this.maxValue != null && !this.maxValue.isEmpty();
9418    }
9419
9420    /**
9421     * @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.)
9422     */
9423    public ElementDefinition setMaxValue(DataType value) { 
9424      if (value != null && !(value instanceof DateType || value instanceof DateTimeType || value instanceof InstantType || value instanceof TimeType || value instanceof DecimalType || value instanceof IntegerType || value instanceof PositiveIntType || value instanceof UnsignedIntType || value instanceof Quantity))
9425        throw new Error("Not the right type for ElementDefinition.maxValue[x]: "+value.fhirType());
9426      this.maxValue = value;
9427      return this;
9428    }
9429
9430    /**
9431     * @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.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value
9432     */
9433    public IntegerType getMaxLengthElement() { 
9434      if (this.maxLength == null)
9435        if (Configuration.errorOnAutoCreate())
9436          throw new Error("Attempt to auto-create ElementDefinition.maxLength");
9437        else if (Configuration.doAutoCreate())
9438          this.maxLength = new IntegerType(); // bb
9439      return this.maxLength;
9440    }
9441
9442    public boolean hasMaxLengthElement() { 
9443      return this.maxLength != null && !this.maxLength.isEmpty();
9444    }
9445
9446    public boolean hasMaxLength() { 
9447      return this.maxLength != null && !this.maxLength.isEmpty();
9448    }
9449
9450    /**
9451     * @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.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value
9452     */
9453    public ElementDefinition setMaxLengthElement(IntegerType value) { 
9454      this.maxLength = value;
9455      return this;
9456    }
9457
9458    /**
9459     * @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.
9460     */
9461    public int getMaxLength() { 
9462      return this.maxLength == null || this.maxLength.isEmpty() ? 0 : this.maxLength.getValue();
9463    }
9464
9465    /**
9466     * @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.
9467     */
9468    public ElementDefinition setMaxLength(int value) { 
9469        if (this.maxLength == null)
9470          this.maxLength = new IntegerType();
9471        this.maxLength.setValue(value);
9472      return this;
9473    }
9474
9475    /**
9476     * @return {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.)
9477     */
9478    public List<IdType> getCondition() { 
9479      if (this.condition == null)
9480        this.condition = new ArrayList<IdType>();
9481      return this.condition;
9482    }
9483
9484    /**
9485     * @return Returns a reference to <code>this</code> for easy method chaining
9486     */
9487    public ElementDefinition setCondition(List<IdType> theCondition) { 
9488      this.condition = theCondition;
9489      return this;
9490    }
9491
9492    public boolean hasCondition() { 
9493      if (this.condition == null)
9494        return false;
9495      for (IdType item : this.condition)
9496        if (!item.isEmpty())
9497          return true;
9498      return false;
9499    }
9500
9501    /**
9502     * @return {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.)
9503     */
9504    public IdType addConditionElement() {//2 
9505      IdType t = new IdType();
9506      if (this.condition == null)
9507        this.condition = new ArrayList<IdType>();
9508      this.condition.add(t);
9509      return t;
9510    }
9511
9512    /**
9513     * @param value {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.)
9514     */
9515    public ElementDefinition addCondition(String value) { //1
9516      IdType t = new IdType();
9517      t.setValue(value);
9518      if (this.condition == null)
9519        this.condition = new ArrayList<IdType>();
9520      this.condition.add(t);
9521      return this;
9522    }
9523
9524    /**
9525     * @param value {@link #condition} (A reference to an invariant that may make additional statements about the cardinality or value in the instance.)
9526     */
9527    public boolean hasCondition(String value) { 
9528      if (this.condition == null)
9529        return false;
9530      for (IdType v : this.condition)
9531        if (v.getValue().equals(value)) // id
9532          return true;
9533      return false;
9534    }
9535
9536    /**
9537     * @return {@link #constraint} (Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.)
9538     */
9539    public List<ElementDefinitionConstraintComponent> getConstraint() { 
9540      if (this.constraint == null)
9541        this.constraint = new ArrayList<ElementDefinitionConstraintComponent>();
9542      return this.constraint;
9543    }
9544
9545    /**
9546     * @return Returns a reference to <code>this</code> for easy method chaining
9547     */
9548    public ElementDefinition setConstraint(List<ElementDefinitionConstraintComponent> theConstraint) { 
9549      this.constraint = theConstraint;
9550      return this;
9551    }
9552
9553    public boolean hasConstraint() { 
9554      if (this.constraint == null)
9555        return false;
9556      for (ElementDefinitionConstraintComponent item : this.constraint)
9557        if (!item.isEmpty())
9558          return true;
9559      return false;
9560    }
9561
9562    public ElementDefinitionConstraintComponent addConstraint() { //3
9563      ElementDefinitionConstraintComponent t = new ElementDefinitionConstraintComponent();
9564      if (this.constraint == null)
9565        this.constraint = new ArrayList<ElementDefinitionConstraintComponent>();
9566      this.constraint.add(t);
9567      return t;
9568    }
9569
9570    public ElementDefinition addConstraint(ElementDefinitionConstraintComponent t) { //3
9571      if (t == null)
9572        return this;
9573      if (this.constraint == null)
9574        this.constraint = new ArrayList<ElementDefinitionConstraintComponent>();
9575      this.constraint.add(t);
9576      return this;
9577    }
9578
9579    /**
9580     * @return The first repetition of repeating field {@link #constraint}, creating it if it does not already exist {3}
9581     */
9582    public ElementDefinitionConstraintComponent getConstraintFirstRep() { 
9583      if (getConstraint().isEmpty()) {
9584        addConstraint();
9585      }
9586      return getConstraint().get(0);
9587    }
9588
9589    /**
9590     * @return {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way.  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
9591     */
9592    public BooleanType getMustSupportElement() { 
9593      if (this.mustSupport == null)
9594        if (Configuration.errorOnAutoCreate())
9595          throw new Error("Attempt to auto-create ElementDefinition.mustSupport");
9596        else if (Configuration.doAutoCreate())
9597          this.mustSupport = new BooleanType(); // bb
9598      return this.mustSupport;
9599    }
9600
9601    public boolean hasMustSupportElement() { 
9602      return this.mustSupport != null && !this.mustSupport.isEmpty();
9603    }
9604
9605    public boolean hasMustSupport() { 
9606      return this.mustSupport != null && !this.mustSupport.isEmpty();
9607    }
9608
9609    /**
9610     * @param value {@link #mustSupport} (If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way.  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
9611     */
9612    public ElementDefinition setMustSupportElement(BooleanType value) { 
9613      this.mustSupport = value;
9614      return this;
9615    }
9616
9617    /**
9618     * @return If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way.  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.
9619     */
9620    public boolean getMustSupport() { 
9621      return this.mustSupport == null || this.mustSupport.isEmpty() ? false : this.mustSupport.getValue();
9622    }
9623
9624    /**
9625     * @param value If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way.  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.
9626     */
9627    public ElementDefinition setMustSupport(boolean value) { 
9628        if (this.mustSupport == null)
9629          this.mustSupport = new BooleanType();
9630        this.mustSupport.setValue(value);
9631      return this;
9632    }
9633
9634    /**
9635     * @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.). This is the underlying object with id, value and extensions. The accessor "getIsModifier" gives direct access to the value
9636     */
9637    public BooleanType getIsModifierElement() { 
9638      if (this.isModifier == null)
9639        if (Configuration.errorOnAutoCreate())
9640          throw new Error("Attempt to auto-create ElementDefinition.isModifier");
9641        else if (Configuration.doAutoCreate())
9642          this.isModifier = new BooleanType(); // bb
9643      return this.isModifier;
9644    }
9645
9646    public boolean hasIsModifierElement() { 
9647      return this.isModifier != null && !this.isModifier.isEmpty();
9648    }
9649
9650    public boolean hasIsModifier() { 
9651      return this.isModifier != null && !this.isModifier.isEmpty();
9652    }
9653
9654    /**
9655     * @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.). This is the underlying object with id, value and extensions. The accessor "getIsModifier" gives direct access to the value
9656     */
9657    public ElementDefinition setIsModifierElement(BooleanType value) { 
9658      this.isModifier = value;
9659      return this;
9660    }
9661
9662    /**
9663     * @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.
9664     */
9665    public boolean getIsModifier() { 
9666      return this.isModifier == null || this.isModifier.isEmpty() ? false : this.isModifier.getValue();
9667    }
9668
9669    /**
9670     * @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.
9671     */
9672    public ElementDefinition setIsModifier(boolean value) { 
9673        if (this.isModifier == null)
9674          this.isModifier = new BooleanType();
9675        this.isModifier.setValue(value);
9676      return this;
9677    }
9678
9679    /**
9680     * @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
9681     */
9682    public StringType getIsModifierReasonElement() { 
9683      if (this.isModifierReason == null)
9684        if (Configuration.errorOnAutoCreate())
9685          throw new Error("Attempt to auto-create ElementDefinition.isModifierReason");
9686        else if (Configuration.doAutoCreate())
9687          this.isModifierReason = new StringType(); // bb
9688      return this.isModifierReason;
9689    }
9690
9691    public boolean hasIsModifierReasonElement() { 
9692      return this.isModifierReason != null && !this.isModifierReason.isEmpty();
9693    }
9694
9695    public boolean hasIsModifierReason() { 
9696      return this.isModifierReason != null && !this.isModifierReason.isEmpty();
9697    }
9698
9699    /**
9700     * @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
9701     */
9702    public ElementDefinition setIsModifierReasonElement(StringType value) { 
9703      this.isModifierReason = value;
9704      return this;
9705    }
9706
9707    /**
9708     * @return Explains how that element affects the interpretation of the resource or element that contains it.
9709     */
9710    public String getIsModifierReason() { 
9711      return this.isModifierReason == null ? null : this.isModifierReason.getValue();
9712    }
9713
9714    /**
9715     * @param value Explains how that element affects the interpretation of the resource or element that contains it.
9716     */
9717    public ElementDefinition setIsModifierReason(String value) { 
9718      if (Utilities.noString(value))
9719        this.isModifierReason = null;
9720      else {
9721        if (this.isModifierReason == null)
9722          this.isModifierReason = new StringType();
9723        this.isModifierReason.setValue(value);
9724      }
9725      return this;
9726    }
9727
9728    /**
9729     * @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
9730     */
9731    public BooleanType getIsSummaryElement() { 
9732      if (this.isSummary == null)
9733        if (Configuration.errorOnAutoCreate())
9734          throw new Error("Attempt to auto-create ElementDefinition.isSummary");
9735        else if (Configuration.doAutoCreate())
9736          this.isSummary = new BooleanType(); // bb
9737      return this.isSummary;
9738    }
9739
9740    public boolean hasIsSummaryElement() { 
9741      return this.isSummary != null && !this.isSummary.isEmpty();
9742    }
9743
9744    public boolean hasIsSummary() { 
9745      return this.isSummary != null && !this.isSummary.isEmpty();
9746    }
9747
9748    /**
9749     * @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
9750     */
9751    public ElementDefinition setIsSummaryElement(BooleanType value) { 
9752      this.isSummary = value;
9753      return this;
9754    }
9755
9756    /**
9757     * @return Whether the element should be included if a client requests a search with the parameter _summary=true.
9758     */
9759    public boolean getIsSummary() { 
9760      return this.isSummary == null || this.isSummary.isEmpty() ? false : this.isSummary.getValue();
9761    }
9762
9763    /**
9764     * @param value Whether the element should be included if a client requests a search with the parameter _summary=true.
9765     */
9766    public ElementDefinition setIsSummary(boolean value) { 
9767        if (this.isSummary == null)
9768          this.isSummary = new BooleanType();
9769        this.isSummary.setValue(value);
9770      return this;
9771    }
9772
9773    /**
9774     * @return {@link #binding} (Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).)
9775     */
9776    public ElementDefinitionBindingComponent getBinding() { 
9777      if (this.binding == null)
9778        if (Configuration.errorOnAutoCreate())
9779          throw new Error("Attempt to auto-create ElementDefinition.binding");
9780        else if (Configuration.doAutoCreate())
9781          this.binding = new ElementDefinitionBindingComponent(); // cc
9782      return this.binding;
9783    }
9784
9785    public boolean hasBinding() { 
9786      return this.binding != null && !this.binding.isEmpty();
9787    }
9788
9789    /**
9790     * @param value {@link #binding} (Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).)
9791     */
9792    public ElementDefinition setBinding(ElementDefinitionBindingComponent value) { 
9793      this.binding = value;
9794      return this;
9795    }
9796
9797    /**
9798     * @return {@link #mapping} (Identifies a concept from an external specification that roughly corresponds to this element.)
9799     */
9800    public List<ElementDefinitionMappingComponent> getMapping() { 
9801      if (this.mapping == null)
9802        this.mapping = new ArrayList<ElementDefinitionMappingComponent>();
9803      return this.mapping;
9804    }
9805
9806    /**
9807     * @return Returns a reference to <code>this</code> for easy method chaining
9808     */
9809    public ElementDefinition setMapping(List<ElementDefinitionMappingComponent> theMapping) { 
9810      this.mapping = theMapping;
9811      return this;
9812    }
9813
9814    public boolean hasMapping() { 
9815      if (this.mapping == null)
9816        return false;
9817      for (ElementDefinitionMappingComponent item : this.mapping)
9818        if (!item.isEmpty())
9819          return true;
9820      return false;
9821    }
9822
9823    public ElementDefinitionMappingComponent addMapping() { //3
9824      ElementDefinitionMappingComponent t = new ElementDefinitionMappingComponent();
9825      if (this.mapping == null)
9826        this.mapping = new ArrayList<ElementDefinitionMappingComponent>();
9827      this.mapping.add(t);
9828      return t;
9829    }
9830
9831    public ElementDefinition addMapping(ElementDefinitionMappingComponent t) { //3
9832      if (t == null)
9833        return this;
9834      if (this.mapping == null)
9835        this.mapping = new ArrayList<ElementDefinitionMappingComponent>();
9836      this.mapping.add(t);
9837      return this;
9838    }
9839
9840    /**
9841     * @return The first repetition of repeating field {@link #mapping}, creating it if it does not already exist {3}
9842     */
9843    public ElementDefinitionMappingComponent getMappingFirstRep() { 
9844      if (getMapping().isEmpty()) {
9845        addMapping();
9846      }
9847      return getMapping().get(0);
9848    }
9849
9850      protected void listChildren(List<Property> children) {
9851        super.listChildren(children);
9852        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));
9853        children.add(new Property("representation", "code", "Codes that define how this element is represented in instances, when the deviation varies from the normal case.", 0, java.lang.Integer.MAX_VALUE, representation));
9854        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));
9855        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));
9856        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));
9857        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));
9858        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));
9859        children.add(new Property("short", "string", "A concise description of what this element means (e.g. for use in autogenerated summaries).", 0, 1, short_));
9860        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));
9861        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));
9862        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));
9863        children.add(new Property("alias", "string", "Identifies additional names by which this element might also be known.", 0, java.lang.Integer.MAX_VALUE, alias));
9864        children.add(new Property("min", "unsignedInt", "The minimum number of times this element SHALL appear in the instance.", 0, 1, min));
9865        children.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the instance.", 0, 1, max));
9866        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 - i.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));
9867        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));
9868        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));
9869        children.add(new Property("defaultValue[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|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));
9870        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));
9871        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));
9872        children.add(new Property("fixed[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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));
9873        children.add(new Property("pattern[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern));
9874        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));
9875        children.add(new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|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));
9876        children.add(new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|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));
9877        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.", 0, 1, maxLength));
9878        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));
9879        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));
9880        children.add(new Property("mustSupport", "boolean", "If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way.  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));
9881        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.", 0, 1, isModifier));
9882        children.add(new Property("isModifierReason", "string", "Explains how that element affects the interpretation of the resource or element that contains it.", 0, 1, isModifierReason));
9883        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));
9884        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));
9885        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));
9886      }
9887
9888      @Override
9889      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9890        switch (_hash) {
9891        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);
9892        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.", 0, java.lang.Integer.MAX_VALUE, representation);
9893        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);
9894        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);
9895        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);
9896        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);
9897        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);
9898        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_);
9899        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);
9900        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);
9901        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);
9902        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);
9903        case 108114: /*min*/  return new Property("min", "unsignedInt", "The minimum number of times this element SHALL appear in the instance.", 0, 1, min);
9904        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);
9905        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 - i.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);
9906        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);
9907        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);
9908        case 587922128: /*defaultValue[x]*/  return new Property("defaultValue[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|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);
9909        case -659125328: /*defaultValue*/  return new Property("defaultValue[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|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);
9910        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);
9911        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);
9912        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);
9913        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);
9914        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);
9915        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);
9916        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);
9917        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);
9918        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);
9919        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);
9920        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);
9921        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);
9922        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);
9923        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);
9924        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);
9925        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);
9926        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);
9927        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);
9928        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);
9929        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);
9930        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);
9931        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);
9932        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);
9933        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);
9934        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);
9935        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);
9936        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);
9937        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);
9938        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);
9939        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);
9940        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);
9941        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);
9942        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);
9943        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);
9944        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);
9945        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);
9946        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);
9947        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);
9948        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);
9949        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);
9950        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);
9951        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);
9952        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);
9953        case 1793609483: /*defaultValueContributor*/  return new Property("defaultValue[x]", "Contributor", "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);
9954        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);
9955        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);
9956        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);
9957        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);
9958        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);
9959        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);
9960        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);
9961        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);
9962        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);
9963        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);
9964        case -391522164: /*fixed[x]*/  return new Property("fixed[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9965        case 97445748: /*fixed*/  return new Property("fixed[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9966        case -799290428: /*fixedBase64Binary*/  return new Property("fixed[x]", "base64Binary", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9967        case 520851988: /*fixedBoolean*/  return new Property("fixed[x]", "boolean", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9968        case 1092485088: /*fixedCanonical*/  return new Property("fixed[x]", "canonical", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9969        case 746991489: /*fixedCode*/  return new Property("fixed[x]", "code", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9970        case 747008322: /*fixedDate*/  return new Property("fixed[x]", "date", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9971        case -1246771409: /*fixedDateTime*/  return new Property("fixed[x]", "dateTime", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9972        case 1998403901: /*fixedDecimal*/  return new Property("fixed[x]", "decimal", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9973        case -843914321: /*fixedId*/  return new Property("fixed[x]", "id", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9974        case -1881257011: /*fixedInstant*/  return new Property("fixed[x]", "instant", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9975        case -1880774870: /*fixedInteger*/  return new Property("fixed[x]", "integer", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9976        case 1502385283: /*fixedMarkdown*/  return new Property("fixed[x]", "markdown", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9977        case -391534154: /*fixedOid*/  return new Property("fixed[x]", "oid", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9978        case 297821986: /*fixedPositiveInt*/  return new Property("fixed[x]", "positiveInt", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9979        case 1062390949: /*fixedString*/  return new Property("fixed[x]", "string", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9980        case 747492449: /*fixedTime*/  return new Property("fixed[x]", "time", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9981        case 1574283430: /*fixedUnsignedInt*/  return new Property("fixed[x]", "unsignedInt", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9982        case -391528104: /*fixedUri*/  return new Property("fixed[x]", "uri", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9983        case -391528101: /*fixedUrl*/  return new Property("fixed[x]", "url", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9984        case 747533647: /*fixedUuid*/  return new Property("fixed[x]", "uuid", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9985        case -691551776: /*fixedAddress*/  return new Property("fixed[x]", "Address", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9986        case -391547669: /*fixedAge*/  return new Property("fixed[x]", "Age", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9987        case -1956844093: /*fixedAnnotation*/  return new Property("fixed[x]", "Annotation", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9988        case 1929665463: /*fixedAttachment*/  return new Property("fixed[x]", "Attachment", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9989        case 1962764685: /*fixedCodeableConcept*/  return new Property("fixed[x]", "CodeableConcept", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9990        case 694810928: /*fixedCodeableReference*/  return new Property("fixed[x]", "CodeableReference", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9991        case 599289854: /*fixedCoding*/  return new Property("fixed[x]", "Coding", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9992        case 1680638692: /*fixedContactPoint*/  return new Property("fixed[x]", "ContactPoint", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9993        case 1681916411: /*fixedCount*/  return new Property("fixed[x]", "Count", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9994        case 1543906185: /*fixedDistance*/  return new Property("fixed[x]", "Distance", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9995        case -736565976: /*fixedDuration*/  return new Property("fixed[x]", "Duration", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9996        case -147502012: /*fixedHumanName*/  return new Property("fixed[x]", "HumanName", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9997        case -2020233411: /*fixedIdentifier*/  return new Property("fixed[x]", "Identifier", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9998        case 1691144620: /*fixedMoney*/  return new Property("fixed[x]", "Money", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
9999        case 962650709: /*fixedPeriod*/  return new Property("fixed[x]", "Period", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10000        case -29557729: /*fixedQuantity*/  return new Property("fixed[x]", "Quantity", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10001        case 1695345193: /*fixedRange*/  return new Property("fixed[x]", "Range", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10002        case 1695351031: /*fixedRatio*/  return new Property("fixed[x]", "Ratio", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10003        case 1698777734: /*fixedRatioRange*/  return new Property("fixed[x]", "RatioRange", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10004        case -661022153: /*fixedReference*/  return new Property("fixed[x]", "Reference", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10005        case 585524912: /*fixedSampledData*/  return new Property("fixed[x]", "SampledData", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10006        case 1337717668: /*fixedSignature*/  return new Property("fixed[x]", "Signature", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10007        case 1080712414: /*fixedTiming*/  return new Property("fixed[x]", "Timing", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10008        case 207721853: /*fixedContactDetail*/  return new Property("fixed[x]", "ContactDetail", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10009        case -1466191673: /*fixedContributor*/  return new Property("fixed[x]", "Contributor", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10010        case -1546551259: /*fixedDataRequirement*/  return new Property("fixed[x]", "DataRequirement", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10011        case 2097714476: /*fixedExpression*/  return new Property("fixed[x]", "Expression", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10012        case -2126861880: /*fixedParameterDefinition*/  return new Property("fixed[x]", "ParameterDefinition", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10013        case -1508891383: /*fixedRelatedArtifact*/  return new Property("fixed[x]", "RelatedArtifact", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10014        case 1929596951: /*fixedTriggerDefinition*/  return new Property("fixed[x]", "TriggerDefinition", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10015        case 1323734626: /*fixedUsageContext*/  return new Property("fixed[x]", "UsageContext", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10016        case 628357963: /*fixedDosage*/  return new Property("fixed[x]", "Dosage", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10017        case 747280281: /*fixedMeta*/  return new Property("fixed[x]", "Meta", "Specifies a value that SHALL be exactly the value  for this element in the instance. 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);
10018        case -885125392: /*pattern[x]*/  return new Property("pattern[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10019        case -791090288: /*pattern*/  return new Property("pattern[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|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|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10020        case 2127857120: /*patternBase64Binary*/  return new Property("pattern[x]", "base64Binary", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10021        case -1776945544: /*patternBoolean*/  return new Property("pattern[x]", "boolean", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10022        case 522246980: /*patternCanonical*/  return new Property("pattern[x]", "canonical", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10023        case -1669806691: /*patternCode*/  return new Property("pattern[x]", "code", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10024        case -1669789858: /*patternDate*/  return new Property("pattern[x]", "date", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10025        case 535949131: /*patternDateTime*/  return new Property("pattern[x]", "dateTime", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10026        case -299393631: /*patternDecimal*/  return new Property("pattern[x]", "decimal", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10027        case -28553013: /*patternId*/  return new Property("pattern[x]", "id", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10028        case 115912753: /*patternInstant*/  return new Property("pattern[x]", "instant", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10029        case 116394894: /*patternInteger*/  return new Property("pattern[x]", "integer", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10030        case -1009861473: /*patternMarkdown*/  return new Property("pattern[x]", "markdown", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10031        case -885137382: /*patternOid*/  return new Property("pattern[x]", "oid", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10032        case 2054814086: /*patternPositiveInt*/  return new Property("pattern[x]", "positiveInt", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10033        case 2096647105: /*patternString*/  return new Property("pattern[x]", "string", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10034        case -1669305731: /*patternTime*/  return new Property("pattern[x]", "time", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10035        case -963691766: /*patternUnsignedInt*/  return new Property("pattern[x]", "unsignedInt", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10036        case -885131332: /*patternUri*/  return new Property("pattern[x]", "uri", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10037        case -885131329: /*patternUrl*/  return new Property("pattern[x]", "url", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10038        case -1669264533: /*patternUuid*/  return new Property("pattern[x]", "uuid", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10039        case 1305617988: /*patternAddress*/  return new Property("pattern[x]", "Address", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10040        case -885150897: /*patternAge*/  return new Property("pattern[x]", "Age", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10041        case 1840611039: /*patternAnnotation*/  return new Property("pattern[x]", "Annotation", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10042        case 1432153299: /*patternAttachment*/  return new Property("pattern[x]", "Attachment", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10043        case -400610831: /*patternCodeableConcept*/  return new Property("pattern[x]", "CodeableConcept", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10044        case 1528639636: /*patternCodeableReference*/  return new Property("pattern[x]", "CodeableReference", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10045        case 1633546010: /*patternCoding*/  return new Property("pattern[x]", "Coding", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10046        case 312818944: /*patternContactPoint*/  return new Property("pattern[x]", "ContactPoint", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10047        case -224383137: /*patternCount*/  return new Property("pattern[x]", "Count", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10048        case -968340571: /*patternDistance*/  return new Property("pattern[x]", "Distance", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10049        case 1046154564: /*patternDuration*/  return new Property("pattern[x]", "Duration", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10050        case -717740120: /*patternHumanName*/  return new Property("pattern[x]", "HumanName", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10051        case 1777221721: /*patternIdentifier*/  return new Property("pattern[x]", "Identifier", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10052        case -215154928: /*patternMoney*/  return new Property("pattern[x]", "Money", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10053        case 1996906865: /*patternPeriod*/  return new Property("pattern[x]", "Period", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10054        case 1753162811: /*patternQuantity*/  return new Property("pattern[x]", "Quantity", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10055        case -210954355: /*patternRange*/  return new Property("pattern[x]", "Range", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10056        case -210948517: /*patternRatio*/  return new Property("pattern[x]", "Ratio", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10057        case 1201265570: /*patternRatioRange*/  return new Property("pattern[x]", "RatioRange", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10058        case -1231260261: /*patternReference*/  return new Property("pattern[x]", "Reference", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10059        case -1952450284: /*patternSampledData*/  return new Property("pattern[x]", "SampledData", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10060        case 767479560: /*patternSignature*/  return new Property("pattern[x]", "Signature", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10061        case 2114968570: /*patternTiming*/  return new Property("pattern[x]", "Timing", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10062        case 754982625: /*patternContactDetail*/  return new Property("pattern[x]", "ContactDetail", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10063        case 290800427: /*patternContributor*/  return new Property("pattern[x]", "Contributor", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10064        case 385040521: /*patternDataRequirement*/  return new Property("pattern[x]", "DataRequirement", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10065        case 1600202312: /*patternExpression*/  return new Property("pattern[x]", "Expression", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10066        case 318609452: /*patternParameterDefinition*/  return new Property("pattern[x]", "ParameterDefinition", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10067        case 422700397: /*patternRelatedArtifact*/  return new Property("pattern[x]", "RelatedArtifact", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10068        case -1531541637: /*patternTriggerDefinition*/  return new Property("pattern[x]", "TriggerDefinition", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10069        case -44085122: /*patternUsageContext*/  return new Property("pattern[x]", "UsageContext", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10070        case 1662614119: /*patternDosage*/  return new Property("pattern[x]", "Dosage", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10071        case -1669517899: /*patternMeta*/  return new Property("pattern[x]", "Meta", "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. 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 pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array 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.", 0, 1, pattern);
10072        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);
10073        case -55301663: /*minValue[x]*/  return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|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);
10074        case -1376969153: /*minValue*/  return new Property("minValue[x]", "date|dateTime|instant|time|decimal|integer|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);
10075        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);
10076        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);
10077        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);
10078        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);
10079        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);
10080        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);
10081        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);
10082        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);
10083        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);
10084        case 622130931: /*maxValue[x]*/  return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|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);
10085        case 399227501: /*maxValue*/  return new Property("maxValue[x]", "date|dateTime|instant|time|decimal|integer|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);
10086        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);
10087        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);
10088        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);
10089        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);
10090        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);
10091        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);
10092        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);
10093        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);
10094        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);
10095        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.", 0, 1, maxLength);
10096        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);
10097        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);
10098        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.  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);
10099        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.", 0, 1, isModifier);
10100        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);
10101        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);
10102        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);
10103        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);
10104        default: return super.getNamedProperty(_hash, _name, _checkValid);
10105        }
10106
10107      }
10108
10109      @Override
10110      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
10111        switch (hash) {
10112        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
10113        case -671065907: /*representation*/ return this.representation == null ? new Base[0] : this.representation.toArray(new Base[this.representation.size()]); // Enumeration<PropertyRepresentation>
10114        case -825289923: /*sliceName*/ return this.sliceName == null ? new Base[0] : new Base[] {this.sliceName}; // StringType
10115        case 333040519: /*sliceIsConstraining*/ return this.sliceIsConstraining == null ? new Base[0] : new Base[] {this.sliceIsConstraining}; // BooleanType
10116        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
10117        case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // Coding
10118        case -2119287345: /*slicing*/ return this.slicing == null ? new Base[0] : new Base[] {this.slicing}; // ElementDefinitionSlicingComponent
10119        case 109413500: /*short*/ return this.short_ == null ? new Base[0] : new Base[] {this.short_}; // StringType
10120        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // MarkdownType
10121        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // MarkdownType
10122        case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // MarkdownType
10123        case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType
10124        case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // UnsignedIntType
10125        case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
10126        case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // ElementDefinitionBaseComponent
10127        case 1193747154: /*contentReference*/ return this.contentReference == null ? new Base[0] : new Base[] {this.contentReference}; // UriType
10128        case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // TypeRefComponent
10129        case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // DataType
10130        case 1857257103: /*meaningWhenMissing*/ return this.meaningWhenMissing == null ? new Base[0] : new Base[] {this.meaningWhenMissing}; // MarkdownType
10131        case 1828196047: /*orderMeaning*/ return this.orderMeaning == null ? new Base[0] : new Base[] {this.orderMeaning}; // StringType
10132        case 97445748: /*fixed*/ return this.fixed == null ? new Base[0] : new Base[] {this.fixed}; // DataType
10133        case -791090288: /*pattern*/ return this.pattern == null ? new Base[0] : new Base[] {this.pattern}; // DataType
10134        case -1322970774: /*example*/ return this.example == null ? new Base[0] : this.example.toArray(new Base[this.example.size()]); // ElementDefinitionExampleComponent
10135        case -1376969153: /*minValue*/ return this.minValue == null ? new Base[0] : new Base[] {this.minValue}; // DataType
10136        case 399227501: /*maxValue*/ return this.maxValue == null ? new Base[0] : new Base[] {this.maxValue}; // DataType
10137        case -791400086: /*maxLength*/ return this.maxLength == null ? new Base[0] : new Base[] {this.maxLength}; // IntegerType
10138        case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // IdType
10139        case -190376483: /*constraint*/ return this.constraint == null ? new Base[0] : this.constraint.toArray(new Base[this.constraint.size()]); // ElementDefinitionConstraintComponent
10140        case -1402857082: /*mustSupport*/ return this.mustSupport == null ? new Base[0] : new Base[] {this.mustSupport}; // BooleanType
10141        case -1408783839: /*isModifier*/ return this.isModifier == null ? new Base[0] : new Base[] {this.isModifier}; // BooleanType
10142        case -1854387259: /*isModifierReason*/ return this.isModifierReason == null ? new Base[0] : new Base[] {this.isModifierReason}; // StringType
10143        case 1857548060: /*isSummary*/ return this.isSummary == null ? new Base[0] : new Base[] {this.isSummary}; // BooleanType
10144        case -108220795: /*binding*/ return this.binding == null ? new Base[0] : new Base[] {this.binding}; // ElementDefinitionBindingComponent
10145        case 837556430: /*mapping*/ return this.mapping == null ? new Base[0] : this.mapping.toArray(new Base[this.mapping.size()]); // ElementDefinitionMappingComponent
10146        default: return super.getProperty(hash, name, checkValid);
10147        }
10148
10149      }
10150
10151      @Override
10152      public Base setProperty(int hash, String name, Base value) throws FHIRException {
10153        switch (hash) {
10154        case 3433509: // path
10155          this.path = TypeConvertor.castToString(value); // StringType
10156          return value;
10157        case -671065907: // representation
10158          value = new PropertyRepresentationEnumFactory().fromType(TypeConvertor.castToCode(value));
10159          this.getRepresentation().add((Enumeration) value); // Enumeration<PropertyRepresentation>
10160          return value;
10161        case -825289923: // sliceName
10162          this.sliceName = TypeConvertor.castToString(value); // StringType
10163          return value;
10164        case 333040519: // sliceIsConstraining
10165          this.sliceIsConstraining = TypeConvertor.castToBoolean(value); // BooleanType
10166          return value;
10167        case 102727412: // label
10168          this.label = TypeConvertor.castToString(value); // StringType
10169          return value;
10170        case 3059181: // code
10171          this.getCode().add(TypeConvertor.castToCoding(value)); // Coding
10172          return value;
10173        case -2119287345: // slicing
10174          this.slicing = (ElementDefinitionSlicingComponent) value; // ElementDefinitionSlicingComponent
10175          return value;
10176        case 109413500: // short
10177          this.short_ = TypeConvertor.castToString(value); // StringType
10178          return value;
10179        case -1014418093: // definition
10180          this.definition = TypeConvertor.castToMarkdown(value); // MarkdownType
10181          return value;
10182        case 950398559: // comment
10183          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
10184          return value;
10185        case -1619874672: // requirements
10186          this.requirements = TypeConvertor.castToMarkdown(value); // MarkdownType
10187          return value;
10188        case 92902992: // alias
10189          this.getAlias().add(TypeConvertor.castToString(value)); // StringType
10190          return value;
10191        case 108114: // min
10192          this.min = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
10193          return value;
10194        case 107876: // max
10195          this.max = TypeConvertor.castToString(value); // StringType
10196          return value;
10197        case 3016401: // base
10198          this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent
10199          return value;
10200        case 1193747154: // contentReference
10201          this.contentReference = TypeConvertor.castToUri(value); // UriType
10202          return value;
10203        case 3575610: // type
10204          this.getType().add((TypeRefComponent) value); // TypeRefComponent
10205          return value;
10206        case -659125328: // defaultValue
10207          this.defaultValue = TypeConvertor.castToType(value); // DataType
10208          return value;
10209        case 1857257103: // meaningWhenMissing
10210          this.meaningWhenMissing = TypeConvertor.castToMarkdown(value); // MarkdownType
10211          return value;
10212        case 1828196047: // orderMeaning
10213          this.orderMeaning = TypeConvertor.castToString(value); // StringType
10214          return value;
10215        case 97445748: // fixed
10216          this.fixed = TypeConvertor.castToType(value); // DataType
10217          return value;
10218        case -791090288: // pattern
10219          this.pattern = TypeConvertor.castToType(value); // DataType
10220          return value;
10221        case -1322970774: // example
10222          this.getExample().add((ElementDefinitionExampleComponent) value); // ElementDefinitionExampleComponent
10223          return value;
10224        case -1376969153: // minValue
10225          this.minValue = TypeConvertor.castToType(value); // DataType
10226          return value;
10227        case 399227501: // maxValue
10228          this.maxValue = TypeConvertor.castToType(value); // DataType
10229          return value;
10230        case -791400086: // maxLength
10231          this.maxLength = TypeConvertor.castToInteger(value); // IntegerType
10232          return value;
10233        case -861311717: // condition
10234          this.getCondition().add(TypeConvertor.castToId(value)); // IdType
10235          return value;
10236        case -190376483: // constraint
10237          this.getConstraint().add((ElementDefinitionConstraintComponent) value); // ElementDefinitionConstraintComponent
10238          return value;
10239        case -1402857082: // mustSupport
10240          this.mustSupport = TypeConvertor.castToBoolean(value); // BooleanType
10241          return value;
10242        case -1408783839: // isModifier
10243          this.isModifier = TypeConvertor.castToBoolean(value); // BooleanType
10244          return value;
10245        case -1854387259: // isModifierReason
10246          this.isModifierReason = TypeConvertor.castToString(value); // StringType
10247          return value;
10248        case 1857548060: // isSummary
10249          this.isSummary = TypeConvertor.castToBoolean(value); // BooleanType
10250          return value;
10251        case -108220795: // binding
10252          this.binding = (ElementDefinitionBindingComponent) value; // ElementDefinitionBindingComponent
10253          return value;
10254        case 837556430: // mapping
10255          this.getMapping().add((ElementDefinitionMappingComponent) value); // ElementDefinitionMappingComponent
10256          return value;
10257        default: return super.setProperty(hash, name, value);
10258        }
10259
10260      }
10261
10262      @Override
10263      public Base setProperty(String name, Base value) throws FHIRException {
10264        if (name.equals("path")) {
10265          this.path = TypeConvertor.castToString(value); // StringType
10266        } else if (name.equals("representation")) {
10267          value = new PropertyRepresentationEnumFactory().fromType(TypeConvertor.castToCode(value));
10268          this.getRepresentation().add((Enumeration) value);
10269        } else if (name.equals("sliceName")) {
10270          this.sliceName = TypeConvertor.castToString(value); // StringType
10271        } else if (name.equals("sliceIsConstraining")) {
10272          this.sliceIsConstraining = TypeConvertor.castToBoolean(value); // BooleanType
10273        } else if (name.equals("label")) {
10274          this.label = TypeConvertor.castToString(value); // StringType
10275        } else if (name.equals("code")) {
10276          this.getCode().add(TypeConvertor.castToCoding(value));
10277        } else if (name.equals("slicing")) {
10278          this.slicing = (ElementDefinitionSlicingComponent) value; // ElementDefinitionSlicingComponent
10279        } else if (name.equals("short")) {
10280          this.short_ = TypeConvertor.castToString(value); // StringType
10281        } else if (name.equals("definition")) {
10282          this.definition = TypeConvertor.castToMarkdown(value); // MarkdownType
10283        } else if (name.equals("comment")) {
10284          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
10285        } else if (name.equals("requirements")) {
10286          this.requirements = TypeConvertor.castToMarkdown(value); // MarkdownType
10287        } else if (name.equals("alias")) {
10288          this.getAlias().add(TypeConvertor.castToString(value));
10289        } else if (name.equals("min")) {
10290          this.min = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
10291        } else if (name.equals("max")) {
10292          this.max = TypeConvertor.castToString(value); // StringType
10293        } else if (name.equals("base")) {
10294          this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent
10295        } else if (name.equals("contentReference")) {
10296          this.contentReference = TypeConvertor.castToUri(value); // UriType
10297        } else if (name.equals("type")) {
10298          this.getType().add((TypeRefComponent) value);
10299        } else if (name.equals("defaultValue[x]")) {
10300          this.defaultValue = TypeConvertor.castToType(value); // DataType
10301        } else if (name.equals("meaningWhenMissing")) {
10302          this.meaningWhenMissing = TypeConvertor.castToMarkdown(value); // MarkdownType
10303        } else if (name.equals("orderMeaning")) {
10304          this.orderMeaning = TypeConvertor.castToString(value); // StringType
10305        } else if (name.equals("fixed[x]")) {
10306          this.fixed = TypeConvertor.castToType(value); // DataType
10307        } else if (name.equals("pattern[x]")) {
10308          this.pattern = TypeConvertor.castToType(value); // DataType
10309        } else if (name.equals("example")) {
10310          this.getExample().add((ElementDefinitionExampleComponent) value);
10311        } else if (name.equals("minValue[x]")) {
10312          this.minValue = TypeConvertor.castToType(value); // DataType
10313        } else if (name.equals("maxValue[x]")) {
10314          this.maxValue = TypeConvertor.castToType(value); // DataType
10315        } else if (name.equals("maxLength")) {
10316          this.maxLength = TypeConvertor.castToInteger(value); // IntegerType
10317        } else if (name.equals("condition")) {
10318          this.getCondition().add(TypeConvertor.castToId(value));
10319        } else if (name.equals("constraint")) {
10320          this.getConstraint().add((ElementDefinitionConstraintComponent) value);
10321        } else if (name.equals("mustSupport")) {
10322          this.mustSupport = TypeConvertor.castToBoolean(value); // BooleanType
10323        } else if (name.equals("isModifier")) {
10324          this.isModifier = TypeConvertor.castToBoolean(value); // BooleanType
10325        } else if (name.equals("isModifierReason")) {
10326          this.isModifierReason = TypeConvertor.castToString(value); // StringType
10327        } else if (name.equals("isSummary")) {
10328          this.isSummary = TypeConvertor.castToBoolean(value); // BooleanType
10329        } else if (name.equals("binding")) {
10330          this.binding = (ElementDefinitionBindingComponent) value; // ElementDefinitionBindingComponent
10331        } else if (name.equals("mapping")) {
10332          this.getMapping().add((ElementDefinitionMappingComponent) value);
10333        } else
10334          return super.setProperty(name, value);
10335        return value;
10336      }
10337
10338      @Override
10339      public Base makeProperty(int hash, String name) throws FHIRException {
10340        switch (hash) {
10341        case 3433509:  return getPathElement();
10342        case -671065907:  return addRepresentationElement();
10343        case -825289923:  return getSliceNameElement();
10344        case 333040519:  return getSliceIsConstrainingElement();
10345        case 102727412:  return getLabelElement();
10346        case 3059181:  return addCode(); 
10347        case -2119287345:  return getSlicing();
10348        case 109413500:  return getShortElement();
10349        case -1014418093:  return getDefinitionElement();
10350        case 950398559:  return getCommentElement();
10351        case -1619874672:  return getRequirementsElement();
10352        case 92902992:  return addAliasElement();
10353        case 108114:  return getMinElement();
10354        case 107876:  return getMaxElement();
10355        case 3016401:  return getBase();
10356        case 1193747154:  return getContentReferenceElement();
10357        case 3575610:  return addType(); 
10358        case 587922128:  return getDefaultValue();
10359        case -659125328:  return getDefaultValue();
10360        case 1857257103:  return getMeaningWhenMissingElement();
10361        case 1828196047:  return getOrderMeaningElement();
10362        case -391522164:  return getFixed();
10363        case 97445748:  return getFixed();
10364        case -885125392:  return getPattern();
10365        case -791090288:  return getPattern();
10366        case -1322970774:  return addExample(); 
10367        case -55301663:  return getMinValue();
10368        case -1376969153:  return getMinValue();
10369        case 622130931:  return getMaxValue();
10370        case 399227501:  return getMaxValue();
10371        case -791400086:  return getMaxLengthElement();
10372        case -861311717:  return addConditionElement();
10373        case -190376483:  return addConstraint(); 
10374        case -1402857082:  return getMustSupportElement();
10375        case -1408783839:  return getIsModifierElement();
10376        case -1854387259:  return getIsModifierReasonElement();
10377        case 1857548060:  return getIsSummaryElement();
10378        case -108220795:  return getBinding();
10379        case 837556430:  return addMapping(); 
10380        default: return super.makeProperty(hash, name);
10381        }
10382
10383      }
10384
10385      @Override
10386      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
10387        switch (hash) {
10388        case 3433509: /*path*/ return new String[] {"string"};
10389        case -671065907: /*representation*/ return new String[] {"code"};
10390        case -825289923: /*sliceName*/ return new String[] {"string"};
10391        case 333040519: /*sliceIsConstraining*/ return new String[] {"boolean"};
10392        case 102727412: /*label*/ return new String[] {"string"};
10393        case 3059181: /*code*/ return new String[] {"Coding"};
10394        case -2119287345: /*slicing*/ return new String[] {};
10395        case 109413500: /*short*/ return new String[] {"string"};
10396        case -1014418093: /*definition*/ return new String[] {"markdown"};
10397        case 950398559: /*comment*/ return new String[] {"markdown"};
10398        case -1619874672: /*requirements*/ return new String[] {"markdown"};
10399        case 92902992: /*alias*/ return new String[] {"string"};
10400        case 108114: /*min*/ return new String[] {"unsignedInt"};
10401        case 107876: /*max*/ return new String[] {"string"};
10402        case 3016401: /*base*/ return new String[] {};
10403        case 1193747154: /*contentReference*/ return new String[] {"uri"};
10404        case 3575610: /*type*/ return new String[] {};
10405        case -659125328: /*defaultValue*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "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", "Contributor", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Dosage", "Meta"};
10406        case 1857257103: /*meaningWhenMissing*/ return new String[] {"markdown"};
10407        case 1828196047: /*orderMeaning*/ return new String[] {"string"};
10408        case 97445748: /*fixed*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "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", "Contributor", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Dosage", "Meta"};
10409        case -791090288: /*pattern*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "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", "Contributor", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Dosage", "Meta"};
10410        case -1322970774: /*example*/ return new String[] {};
10411        case -1376969153: /*minValue*/ return new String[] {"date", "dateTime", "instant", "time", "decimal", "integer", "positiveInt", "unsignedInt", "Quantity"};
10412        case 399227501: /*maxValue*/ return new String[] {"date", "dateTime", "instant", "time", "decimal", "integer", "positiveInt", "unsignedInt", "Quantity"};
10413        case -791400086: /*maxLength*/ return new String[] {"integer"};
10414        case -861311717: /*condition*/ return new String[] {"id"};
10415        case -190376483: /*constraint*/ return new String[] {};
10416        case -1402857082: /*mustSupport*/ return new String[] {"boolean"};
10417        case -1408783839: /*isModifier*/ return new String[] {"boolean"};
10418        case -1854387259: /*isModifierReason*/ return new String[] {"string"};
10419        case 1857548060: /*isSummary*/ return new String[] {"boolean"};
10420        case -108220795: /*binding*/ return new String[] {};
10421        case 837556430: /*mapping*/ return new String[] {};
10422        default: return super.getTypesForProperty(hash, name);
10423        }
10424
10425      }
10426
10427      @Override
10428      public Base addChild(String name) throws FHIRException {
10429        if (name.equals("path")) {
10430          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.path");
10431        }
10432        else if (name.equals("representation")) {
10433          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.representation");
10434        }
10435        else if (name.equals("sliceName")) {
10436          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.sliceName");
10437        }
10438        else if (name.equals("sliceIsConstraining")) {
10439          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.sliceIsConstraining");
10440        }
10441        else if (name.equals("label")) {
10442          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.label");
10443        }
10444        else if (name.equals("code")) {
10445          return addCode();
10446        }
10447        else if (name.equals("slicing")) {
10448          this.slicing = new ElementDefinitionSlicingComponent();
10449          return this.slicing;
10450        }
10451        else if (name.equals("short")) {
10452          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.short");
10453        }
10454        else if (name.equals("definition")) {
10455          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.definition");
10456        }
10457        else if (name.equals("comment")) {
10458          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.comment");
10459        }
10460        else if (name.equals("requirements")) {
10461          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.requirements");
10462        }
10463        else if (name.equals("alias")) {
10464          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.alias");
10465        }
10466        else if (name.equals("min")) {
10467          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.min");
10468        }
10469        else if (name.equals("max")) {
10470          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.max");
10471        }
10472        else if (name.equals("base")) {
10473          this.base = new ElementDefinitionBaseComponent();
10474          return this.base;
10475        }
10476        else if (name.equals("contentReference")) {
10477          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.contentReference");
10478        }
10479        else if (name.equals("type")) {
10480          return addType();
10481        }
10482        else if (name.equals("defaultValueBase64Binary")) {
10483          this.defaultValue = new Base64BinaryType();
10484          return this.defaultValue;
10485        }
10486        else if (name.equals("defaultValueBoolean")) {
10487          this.defaultValue = new BooleanType();
10488          return this.defaultValue;
10489        }
10490        else if (name.equals("defaultValueCanonical")) {
10491          this.defaultValue = new CanonicalType();
10492          return this.defaultValue;
10493        }
10494        else if (name.equals("defaultValueCode")) {
10495          this.defaultValue = new CodeType();
10496          return this.defaultValue;
10497        }
10498        else if (name.equals("defaultValueDate")) {
10499          this.defaultValue = new DateType();
10500          return this.defaultValue;
10501        }
10502        else if (name.equals("defaultValueDateTime")) {
10503          this.defaultValue = new DateTimeType();
10504          return this.defaultValue;
10505        }
10506        else if (name.equals("defaultValueDecimal")) {
10507          this.defaultValue = new DecimalType();
10508          return this.defaultValue;
10509        }
10510        else if (name.equals("defaultValueId")) {
10511          this.defaultValue = new IdType();
10512          return this.defaultValue;
10513        }
10514        else if (name.equals("defaultValueInstant")) {
10515          this.defaultValue = new InstantType();
10516          return this.defaultValue;
10517        }
10518        else if (name.equals("defaultValueInteger")) {
10519          this.defaultValue = new IntegerType();
10520          return this.defaultValue;
10521        }
10522        else if (name.equals("defaultValueMarkdown")) {
10523          this.defaultValue = new MarkdownType();
10524          return this.defaultValue;
10525        }
10526        else if (name.equals("defaultValueOid")) {
10527          this.defaultValue = new OidType();
10528          return this.defaultValue;
10529        }
10530        else if (name.equals("defaultValuePositiveInt")) {
10531          this.defaultValue = new PositiveIntType();
10532          return this.defaultValue;
10533        }
10534        else if (name.equals("defaultValueString")) {
10535          this.defaultValue = new StringType();
10536          return this.defaultValue;
10537        }
10538        else if (name.equals("defaultValueTime")) {
10539          this.defaultValue = new TimeType();
10540          return this.defaultValue;
10541        }
10542        else if (name.equals("defaultValueUnsignedInt")) {
10543          this.defaultValue = new UnsignedIntType();
10544          return this.defaultValue;
10545        }
10546        else if (name.equals("defaultValueUri")) {
10547          this.defaultValue = new UriType();
10548          return this.defaultValue;
10549        }
10550        else if (name.equals("defaultValueUrl")) {
10551          this.defaultValue = new UrlType();
10552          return this.defaultValue;
10553        }
10554        else if (name.equals("defaultValueUuid")) {
10555          this.defaultValue = new UuidType();
10556          return this.defaultValue;
10557        }
10558        else if (name.equals("defaultValueAddress")) {
10559          this.defaultValue = new Address();
10560          return this.defaultValue;
10561        }
10562        else if (name.equals("defaultValueAge")) {
10563          this.defaultValue = new Age();
10564          return this.defaultValue;
10565        }
10566        else if (name.equals("defaultValueAnnotation")) {
10567          this.defaultValue = new Annotation();
10568          return this.defaultValue;
10569        }
10570        else if (name.equals("defaultValueAttachment")) {
10571          this.defaultValue = new Attachment();
10572          return this.defaultValue;
10573        }
10574        else if (name.equals("defaultValueCodeableConcept")) {
10575          this.defaultValue = new CodeableConcept();
10576          return this.defaultValue;
10577        }
10578        else if (name.equals("defaultValueCodeableReference")) {
10579          this.defaultValue = new CodeableReference();
10580          return this.defaultValue;
10581        }
10582        else if (name.equals("defaultValueCoding")) {
10583          this.defaultValue = new Coding();
10584          return this.defaultValue;
10585        }
10586        else if (name.equals("defaultValueContactPoint")) {
10587          this.defaultValue = new ContactPoint();
10588          return this.defaultValue;
10589        }
10590        else if (name.equals("defaultValueCount")) {
10591          this.defaultValue = new Count();
10592          return this.defaultValue;
10593        }
10594        else if (name.equals("defaultValueDistance")) {
10595          this.defaultValue = new Distance();
10596          return this.defaultValue;
10597        }
10598        else if (name.equals("defaultValueDuration")) {
10599          this.defaultValue = new Duration();
10600          return this.defaultValue;
10601        }
10602        else if (name.equals("defaultValueHumanName")) {
10603          this.defaultValue = new HumanName();
10604          return this.defaultValue;
10605        }
10606        else if (name.equals("defaultValueIdentifier")) {
10607          this.defaultValue = new Identifier();
10608          return this.defaultValue;
10609        }
10610        else if (name.equals("defaultValueMoney")) {
10611          this.defaultValue = new Money();
10612          return this.defaultValue;
10613        }
10614        else if (name.equals("defaultValuePeriod")) {
10615          this.defaultValue = new Period();
10616          return this.defaultValue;
10617        }
10618        else if (name.equals("defaultValueQuantity")) {
10619          this.defaultValue = new Quantity();
10620          return this.defaultValue;
10621        }
10622        else if (name.equals("defaultValueRange")) {
10623          this.defaultValue = new Range();
10624          return this.defaultValue;
10625        }
10626        else if (name.equals("defaultValueRatio")) {
10627          this.defaultValue = new Ratio();
10628          return this.defaultValue;
10629        }
10630        else if (name.equals("defaultValueRatioRange")) {
10631          this.defaultValue = new RatioRange();
10632          return this.defaultValue;
10633        }
10634        else if (name.equals("defaultValueReference")) {
10635          this.defaultValue = new Reference();
10636          return this.defaultValue;
10637        }
10638        else if (name.equals("defaultValueSampledData")) {
10639          this.defaultValue = new SampledData();
10640          return this.defaultValue;
10641        }
10642        else if (name.equals("defaultValueSignature")) {
10643          this.defaultValue = new Signature();
10644          return this.defaultValue;
10645        }
10646        else if (name.equals("defaultValueTiming")) {
10647          this.defaultValue = new Timing();
10648          return this.defaultValue;
10649        }
10650        else if (name.equals("defaultValueContactDetail")) {
10651          this.defaultValue = new ContactDetail();
10652          return this.defaultValue;
10653        }
10654        else if (name.equals("defaultValueContributor")) {
10655          this.defaultValue = new Contributor();
10656          return this.defaultValue;
10657        }
10658        else if (name.equals("defaultValueDataRequirement")) {
10659          this.defaultValue = new DataRequirement();
10660          return this.defaultValue;
10661        }
10662        else if (name.equals("defaultValueExpression")) {
10663          this.defaultValue = new Expression();
10664          return this.defaultValue;
10665        }
10666        else if (name.equals("defaultValueParameterDefinition")) {
10667          this.defaultValue = new ParameterDefinition();
10668          return this.defaultValue;
10669        }
10670        else if (name.equals("defaultValueRelatedArtifact")) {
10671          this.defaultValue = new RelatedArtifact();
10672          return this.defaultValue;
10673        }
10674        else if (name.equals("defaultValueTriggerDefinition")) {
10675          this.defaultValue = new TriggerDefinition();
10676          return this.defaultValue;
10677        }
10678        else if (name.equals("defaultValueUsageContext")) {
10679          this.defaultValue = new UsageContext();
10680          return this.defaultValue;
10681        }
10682        else if (name.equals("defaultValueDosage")) {
10683          this.defaultValue = new Dosage();
10684          return this.defaultValue;
10685        }
10686        else if (name.equals("defaultValueMeta")) {
10687          this.defaultValue = new Meta();
10688          return this.defaultValue;
10689        }
10690        else if (name.equals("meaningWhenMissing")) {
10691          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.meaningWhenMissing");
10692        }
10693        else if (name.equals("orderMeaning")) {
10694          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.orderMeaning");
10695        }
10696        else if (name.equals("fixedBase64Binary")) {
10697          this.fixed = new Base64BinaryType();
10698          return this.fixed;
10699        }
10700        else if (name.equals("fixedBoolean")) {
10701          this.fixed = new BooleanType();
10702          return this.fixed;
10703        }
10704        else if (name.equals("fixedCanonical")) {
10705          this.fixed = new CanonicalType();
10706          return this.fixed;
10707        }
10708        else if (name.equals("fixedCode")) {
10709          this.fixed = new CodeType();
10710          return this.fixed;
10711        }
10712        else if (name.equals("fixedDate")) {
10713          this.fixed = new DateType();
10714          return this.fixed;
10715        }
10716        else if (name.equals("fixedDateTime")) {
10717          this.fixed = new DateTimeType();
10718          return this.fixed;
10719        }
10720        else if (name.equals("fixedDecimal")) {
10721          this.fixed = new DecimalType();
10722          return this.fixed;
10723        }
10724        else if (name.equals("fixedId")) {
10725          this.fixed = new IdType();
10726          return this.fixed;
10727        }
10728        else if (name.equals("fixedInstant")) {
10729          this.fixed = new InstantType();
10730          return this.fixed;
10731        }
10732        else if (name.equals("fixedInteger")) {
10733          this.fixed = new IntegerType();
10734          return this.fixed;
10735        }
10736        else if (name.equals("fixedMarkdown")) {
10737          this.fixed = new MarkdownType();
10738          return this.fixed;
10739        }
10740        else if (name.equals("fixedOid")) {
10741          this.fixed = new OidType();
10742          return this.fixed;
10743        }
10744        else if (name.equals("fixedPositiveInt")) {
10745          this.fixed = new PositiveIntType();
10746          return this.fixed;
10747        }
10748        else if (name.equals("fixedString")) {
10749          this.fixed = new StringType();
10750          return this.fixed;
10751        }
10752        else if (name.equals("fixedTime")) {
10753          this.fixed = new TimeType();
10754          return this.fixed;
10755        }
10756        else if (name.equals("fixedUnsignedInt")) {
10757          this.fixed = new UnsignedIntType();
10758          return this.fixed;
10759        }
10760        else if (name.equals("fixedUri")) {
10761          this.fixed = new UriType();
10762          return this.fixed;
10763        }
10764        else if (name.equals("fixedUrl")) {
10765          this.fixed = new UrlType();
10766          return this.fixed;
10767        }
10768        else if (name.equals("fixedUuid")) {
10769          this.fixed = new UuidType();
10770          return this.fixed;
10771        }
10772        else if (name.equals("fixedAddress")) {
10773          this.fixed = new Address();
10774          return this.fixed;
10775        }
10776        else if (name.equals("fixedAge")) {
10777          this.fixed = new Age();
10778          return this.fixed;
10779        }
10780        else if (name.equals("fixedAnnotation")) {
10781          this.fixed = new Annotation();
10782          return this.fixed;
10783        }
10784        else if (name.equals("fixedAttachment")) {
10785          this.fixed = new Attachment();
10786          return this.fixed;
10787        }
10788        else if (name.equals("fixedCodeableConcept")) {
10789          this.fixed = new CodeableConcept();
10790          return this.fixed;
10791        }
10792        else if (name.equals("fixedCodeableReference")) {
10793          this.fixed = new CodeableReference();
10794          return this.fixed;
10795        }
10796        else if (name.equals("fixedCoding")) {
10797          this.fixed = new Coding();
10798          return this.fixed;
10799        }
10800        else if (name.equals("fixedContactPoint")) {
10801          this.fixed = new ContactPoint();
10802          return this.fixed;
10803        }
10804        else if (name.equals("fixedCount")) {
10805          this.fixed = new Count();
10806          return this.fixed;
10807        }
10808        else if (name.equals("fixedDistance")) {
10809          this.fixed = new Distance();
10810          return this.fixed;
10811        }
10812        else if (name.equals("fixedDuration")) {
10813          this.fixed = new Duration();
10814          return this.fixed;
10815        }
10816        else if (name.equals("fixedHumanName")) {
10817          this.fixed = new HumanName();
10818          return this.fixed;
10819        }
10820        else if (name.equals("fixedIdentifier")) {
10821          this.fixed = new Identifier();
10822          return this.fixed;
10823        }
10824        else if (name.equals("fixedMoney")) {
10825          this.fixed = new Money();
10826          return this.fixed;
10827        }
10828        else if (name.equals("fixedPeriod")) {
10829          this.fixed = new Period();
10830          return this.fixed;
10831        }
10832        else if (name.equals("fixedQuantity")) {
10833          this.fixed = new Quantity();
10834          return this.fixed;
10835        }
10836        else if (name.equals("fixedRange")) {
10837          this.fixed = new Range();
10838          return this.fixed;
10839        }
10840        else if (name.equals("fixedRatio")) {
10841          this.fixed = new Ratio();
10842          return this.fixed;
10843        }
10844        else if (name.equals("fixedRatioRange")) {
10845          this.fixed = new RatioRange();
10846          return this.fixed;
10847        }
10848        else if (name.equals("fixedReference")) {
10849          this.fixed = new Reference();
10850          return this.fixed;
10851        }
10852        else if (name.equals("fixedSampledData")) {
10853          this.fixed = new SampledData();
10854          return this.fixed;
10855        }
10856        else if (name.equals("fixedSignature")) {
10857          this.fixed = new Signature();
10858          return this.fixed;
10859        }
10860        else if (name.equals("fixedTiming")) {
10861          this.fixed = new Timing();
10862          return this.fixed;
10863        }
10864        else if (name.equals("fixedContactDetail")) {
10865          this.fixed = new ContactDetail();
10866          return this.fixed;
10867        }
10868        else if (name.equals("fixedContributor")) {
10869          this.fixed = new Contributor();
10870          return this.fixed;
10871        }
10872        else if (name.equals("fixedDataRequirement")) {
10873          this.fixed = new DataRequirement();
10874          return this.fixed;
10875        }
10876        else if (name.equals("fixedExpression")) {
10877          this.fixed = new Expression();
10878          return this.fixed;
10879        }
10880        else if (name.equals("fixedParameterDefinition")) {
10881          this.fixed = new ParameterDefinition();
10882          return this.fixed;
10883        }
10884        else if (name.equals("fixedRelatedArtifact")) {
10885          this.fixed = new RelatedArtifact();
10886          return this.fixed;
10887        }
10888        else if (name.equals("fixedTriggerDefinition")) {
10889          this.fixed = new TriggerDefinition();
10890          return this.fixed;
10891        }
10892        else if (name.equals("fixedUsageContext")) {
10893          this.fixed = new UsageContext();
10894          return this.fixed;
10895        }
10896        else if (name.equals("fixedDosage")) {
10897          this.fixed = new Dosage();
10898          return this.fixed;
10899        }
10900        else if (name.equals("fixedMeta")) {
10901          this.fixed = new Meta();
10902          return this.fixed;
10903        }
10904        else if (name.equals("patternBase64Binary")) {
10905          this.pattern = new Base64BinaryType();
10906          return this.pattern;
10907        }
10908        else if (name.equals("patternBoolean")) {
10909          this.pattern = new BooleanType();
10910          return this.pattern;
10911        }
10912        else if (name.equals("patternCanonical")) {
10913          this.pattern = new CanonicalType();
10914          return this.pattern;
10915        }
10916        else if (name.equals("patternCode")) {
10917          this.pattern = new CodeType();
10918          return this.pattern;
10919        }
10920        else if (name.equals("patternDate")) {
10921          this.pattern = new DateType();
10922          return this.pattern;
10923        }
10924        else if (name.equals("patternDateTime")) {
10925          this.pattern = new DateTimeType();
10926          return this.pattern;
10927        }
10928        else if (name.equals("patternDecimal")) {
10929          this.pattern = new DecimalType();
10930          return this.pattern;
10931        }
10932        else if (name.equals("patternId")) {
10933          this.pattern = new IdType();
10934          return this.pattern;
10935        }
10936        else if (name.equals("patternInstant")) {
10937          this.pattern = new InstantType();
10938          return this.pattern;
10939        }
10940        else if (name.equals("patternInteger")) {
10941          this.pattern = new IntegerType();
10942          return this.pattern;
10943        }
10944        else if (name.equals("patternMarkdown")) {
10945          this.pattern = new MarkdownType();
10946          return this.pattern;
10947        }
10948        else if (name.equals("patternOid")) {
10949          this.pattern = new OidType();
10950          return this.pattern;
10951        }
10952        else if (name.equals("patternPositiveInt")) {
10953          this.pattern = new PositiveIntType();
10954          return this.pattern;
10955        }
10956        else if (name.equals("patternString")) {
10957          this.pattern = new StringType();
10958          return this.pattern;
10959        }
10960        else if (name.equals("patternTime")) {
10961          this.pattern = new TimeType();
10962          return this.pattern;
10963        }
10964        else if (name.equals("patternUnsignedInt")) {
10965          this.pattern = new UnsignedIntType();
10966          return this.pattern;
10967        }
10968        else if (name.equals("patternUri")) {
10969          this.pattern = new UriType();
10970          return this.pattern;
10971        }
10972        else if (name.equals("patternUrl")) {
10973          this.pattern = new UrlType();
10974          return this.pattern;
10975        }
10976        else if (name.equals("patternUuid")) {
10977          this.pattern = new UuidType();
10978          return this.pattern;
10979        }
10980        else if (name.equals("patternAddress")) {
10981          this.pattern = new Address();
10982          return this.pattern;
10983        }
10984        else if (name.equals("patternAge")) {
10985          this.pattern = new Age();
10986          return this.pattern;
10987        }
10988        else if (name.equals("patternAnnotation")) {
10989          this.pattern = new Annotation();
10990          return this.pattern;
10991        }
10992        else if (name.equals("patternAttachment")) {
10993          this.pattern = new Attachment();
10994          return this.pattern;
10995        }
10996        else if (name.equals("patternCodeableConcept")) {
10997          this.pattern = new CodeableConcept();
10998          return this.pattern;
10999        }
11000        else if (name.equals("patternCodeableReference")) {
11001          this.pattern = new CodeableReference();
11002          return this.pattern;
11003        }
11004        else if (name.equals("patternCoding")) {
11005          this.pattern = new Coding();
11006          return this.pattern;
11007        }
11008        else if (name.equals("patternContactPoint")) {
11009          this.pattern = new ContactPoint();
11010          return this.pattern;
11011        }
11012        else if (name.equals("patternCount")) {
11013          this.pattern = new Count();
11014          return this.pattern;
11015        }
11016        else if (name.equals("patternDistance")) {
11017          this.pattern = new Distance();
11018          return this.pattern;
11019        }
11020        else if (name.equals("patternDuration")) {
11021          this.pattern = new Duration();
11022          return this.pattern;
11023        }
11024        else if (name.equals("patternHumanName")) {
11025          this.pattern = new HumanName();
11026          return this.pattern;
11027        }
11028        else if (name.equals("patternIdentifier")) {
11029          this.pattern = new Identifier();
11030          return this.pattern;
11031        }
11032        else if (name.equals("patternMoney")) {
11033          this.pattern = new Money();
11034          return this.pattern;
11035        }
11036        else if (name.equals("patternPeriod")) {
11037          this.pattern = new Period();
11038          return this.pattern;
11039        }
11040        else if (name.equals("patternQuantity")) {
11041          this.pattern = new Quantity();
11042          return this.pattern;
11043        }
11044        else if (name.equals("patternRange")) {
11045          this.pattern = new Range();
11046          return this.pattern;
11047        }
11048        else if (name.equals("patternRatio")) {
11049          this.pattern = new Ratio();
11050          return this.pattern;
11051        }
11052        else if (name.equals("patternRatioRange")) {
11053          this.pattern = new RatioRange();
11054          return this.pattern;
11055        }
11056        else if (name.equals("patternReference")) {
11057          this.pattern = new Reference();
11058          return this.pattern;
11059        }
11060        else if (name.equals("patternSampledData")) {
11061          this.pattern = new SampledData();
11062          return this.pattern;
11063        }
11064        else if (name.equals("patternSignature")) {
11065          this.pattern = new Signature();
11066          return this.pattern;
11067        }
11068        else if (name.equals("patternTiming")) {
11069          this.pattern = new Timing();
11070          return this.pattern;
11071        }
11072        else if (name.equals("patternContactDetail")) {
11073          this.pattern = new ContactDetail();
11074          return this.pattern;
11075        }
11076        else if (name.equals("patternContributor")) {
11077          this.pattern = new Contributor();
11078          return this.pattern;
11079        }
11080        else if (name.equals("patternDataRequirement")) {
11081          this.pattern = new DataRequirement();
11082          return this.pattern;
11083        }
11084        else if (name.equals("patternExpression")) {
11085          this.pattern = new Expression();
11086          return this.pattern;
11087        }
11088        else if (name.equals("patternParameterDefinition")) {
11089          this.pattern = new ParameterDefinition();
11090          return this.pattern;
11091        }
11092        else if (name.equals("patternRelatedArtifact")) {
11093          this.pattern = new RelatedArtifact();
11094          return this.pattern;
11095        }
11096        else if (name.equals("patternTriggerDefinition")) {
11097          this.pattern = new TriggerDefinition();
11098          return this.pattern;
11099        }
11100        else if (name.equals("patternUsageContext")) {
11101          this.pattern = new UsageContext();
11102          return this.pattern;
11103        }
11104        else if (name.equals("patternDosage")) {
11105          this.pattern = new Dosage();
11106          return this.pattern;
11107        }
11108        else if (name.equals("patternMeta")) {
11109          this.pattern = new Meta();
11110          return this.pattern;
11111        }
11112        else if (name.equals("example")) {
11113          return addExample();
11114        }
11115        else if (name.equals("minValueDate")) {
11116          this.minValue = new DateType();
11117          return this.minValue;
11118        }
11119        else if (name.equals("minValueDateTime")) {
11120          this.minValue = new DateTimeType();
11121          return this.minValue;
11122        }
11123        else if (name.equals("minValueInstant")) {
11124          this.minValue = new InstantType();
11125          return this.minValue;
11126        }
11127        else if (name.equals("minValueTime")) {
11128          this.minValue = new TimeType();
11129          return this.minValue;
11130        }
11131        else if (name.equals("minValueDecimal")) {
11132          this.minValue = new DecimalType();
11133          return this.minValue;
11134        }
11135        else if (name.equals("minValueInteger")) {
11136          this.minValue = new IntegerType();
11137          return this.minValue;
11138        }
11139        else if (name.equals("minValuePositiveInt")) {
11140          this.minValue = new PositiveIntType();
11141          return this.minValue;
11142        }
11143        else if (name.equals("minValueUnsignedInt")) {
11144          this.minValue = new UnsignedIntType();
11145          return this.minValue;
11146        }
11147        else if (name.equals("minValueQuantity")) {
11148          this.minValue = new Quantity();
11149          return this.minValue;
11150        }
11151        else if (name.equals("maxValueDate")) {
11152          this.maxValue = new DateType();
11153          return this.maxValue;
11154        }
11155        else if (name.equals("maxValueDateTime")) {
11156          this.maxValue = new DateTimeType();
11157          return this.maxValue;
11158        }
11159        else if (name.equals("maxValueInstant")) {
11160          this.maxValue = new InstantType();
11161          return this.maxValue;
11162        }
11163        else if (name.equals("maxValueTime")) {
11164          this.maxValue = new TimeType();
11165          return this.maxValue;
11166        }
11167        else if (name.equals("maxValueDecimal")) {
11168          this.maxValue = new DecimalType();
11169          return this.maxValue;
11170        }
11171        else if (name.equals("maxValueInteger")) {
11172          this.maxValue = new IntegerType();
11173          return this.maxValue;
11174        }
11175        else if (name.equals("maxValuePositiveInt")) {
11176          this.maxValue = new PositiveIntType();
11177          return this.maxValue;
11178        }
11179        else if (name.equals("maxValueUnsignedInt")) {
11180          this.maxValue = new UnsignedIntType();
11181          return this.maxValue;
11182        }
11183        else if (name.equals("maxValueQuantity")) {
11184          this.maxValue = new Quantity();
11185          return this.maxValue;
11186        }
11187        else if (name.equals("maxLength")) {
11188          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.maxLength");
11189        }
11190        else if (name.equals("condition")) {
11191          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.condition");
11192        }
11193        else if (name.equals("constraint")) {
11194          return addConstraint();
11195        }
11196        else if (name.equals("mustSupport")) {
11197          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.mustSupport");
11198        }
11199        else if (name.equals("isModifier")) {
11200          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.isModifier");
11201        }
11202        else if (name.equals("isModifierReason")) {
11203          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.isModifierReason");
11204        }
11205        else if (name.equals("isSummary")) {
11206          throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.isSummary");
11207        }
11208        else if (name.equals("binding")) {
11209          this.binding = new ElementDefinitionBindingComponent();
11210          return this.binding;
11211        }
11212        else if (name.equals("mapping")) {
11213          return addMapping();
11214        }
11215        else
11216          return super.addChild(name);
11217      }
11218
11219  public String fhirType() {
11220    return "ElementDefinition";
11221
11222  }
11223
11224      public ElementDefinition copy() {
11225        ElementDefinition dst = new ElementDefinition();
11226        copyValues(dst);
11227        return dst;
11228      }
11229
11230      public void copyValues(ElementDefinition dst) {
11231        super.copyValues(dst);
11232        dst.path = path == null ? null : path.copy();
11233        if (representation != null) {
11234          dst.representation = new ArrayList<Enumeration<PropertyRepresentation>>();
11235          for (Enumeration<PropertyRepresentation> i : representation)
11236            dst.representation.add(i.copy());
11237        };
11238        dst.sliceName = sliceName == null ? null : sliceName.copy();
11239        dst.sliceIsConstraining = sliceIsConstraining == null ? null : sliceIsConstraining.copy();
11240        dst.label = label == null ? null : label.copy();
11241        if (code != null) {
11242          dst.code = new ArrayList<Coding>();
11243          for (Coding i : code)
11244            dst.code.add(i.copy());
11245        };
11246        dst.slicing = slicing == null ? null : slicing.copy();
11247        dst.short_ = short_ == null ? null : short_.copy();
11248        dst.definition = definition == null ? null : definition.copy();
11249        dst.comment = comment == null ? null : comment.copy();
11250        dst.requirements = requirements == null ? null : requirements.copy();
11251        if (alias != null) {
11252          dst.alias = new ArrayList<StringType>();
11253          for (StringType i : alias)
11254            dst.alias.add(i.copy());
11255        };
11256        dst.min = min == null ? null : min.copy();
11257        dst.max = max == null ? null : max.copy();
11258        dst.base = base == null ? null : base.copy();
11259        dst.contentReference = contentReference == null ? null : contentReference.copy();
11260        if (type != null) {
11261          dst.type = new ArrayList<TypeRefComponent>();
11262          for (TypeRefComponent i : type)
11263            dst.type.add(i.copy());
11264        };
11265        dst.defaultValue = defaultValue == null ? null : defaultValue.copy();
11266        dst.meaningWhenMissing = meaningWhenMissing == null ? null : meaningWhenMissing.copy();
11267        dst.orderMeaning = orderMeaning == null ? null : orderMeaning.copy();
11268        dst.fixed = fixed == null ? null : fixed.copy();
11269        dst.pattern = pattern == null ? null : pattern.copy();
11270        if (example != null) {
11271          dst.example = new ArrayList<ElementDefinitionExampleComponent>();
11272          for (ElementDefinitionExampleComponent i : example)
11273            dst.example.add(i.copy());
11274        };
11275        dst.minValue = minValue == null ? null : minValue.copy();
11276        dst.maxValue = maxValue == null ? null : maxValue.copy();
11277        dst.maxLength = maxLength == null ? null : maxLength.copy();
11278        if (condition != null) {
11279          dst.condition = new ArrayList<IdType>();
11280          for (IdType i : condition)
11281            dst.condition.add(i.copy());
11282        };
11283        if (constraint != null) {
11284          dst.constraint = new ArrayList<ElementDefinitionConstraintComponent>();
11285          for (ElementDefinitionConstraintComponent i : constraint)
11286            dst.constraint.add(i.copy());
11287        };
11288        dst.mustSupport = mustSupport == null ? null : mustSupport.copy();
11289        dst.isModifier = isModifier == null ? null : isModifier.copy();
11290        dst.isModifierReason = isModifierReason == null ? null : isModifierReason.copy();
11291        dst.isSummary = isSummary == null ? null : isSummary.copy();
11292        dst.binding = binding == null ? null : binding.copy();
11293        if (mapping != null) {
11294          dst.mapping = new ArrayList<ElementDefinitionMappingComponent>();
11295          for (ElementDefinitionMappingComponent i : mapping)
11296            dst.mapping.add(i.copy());
11297        };
11298      }
11299
11300      protected ElementDefinition typedCopy() {
11301        return copy();
11302      }
11303
11304      @Override
11305      public boolean equalsDeep(Base other_) {
11306        if (!super.equalsDeep(other_))
11307          return false;
11308        if (!(other_ instanceof ElementDefinition))
11309          return false;
11310        ElementDefinition o = (ElementDefinition) other_;
11311        return compareDeep(path, o.path, true) && compareDeep(representation, o.representation, true) && compareDeep(sliceName, o.sliceName, true)
11312           && compareDeep(sliceIsConstraining, o.sliceIsConstraining, true) && compareDeep(label, o.label, true)
11313           && compareDeep(code, o.code, true) && compareDeep(slicing, o.slicing, true) && compareDeep(short_, o.short_, true)
11314           && compareDeep(definition, o.definition, true) && compareDeep(comment, o.comment, true) && compareDeep(requirements, o.requirements, true)
11315           && compareDeep(alias, o.alias, true) && compareDeep(min, o.min, true) && compareDeep(max, o.max, true)
11316           && compareDeep(base, o.base, true) && compareDeep(contentReference, o.contentReference, true) && compareDeep(type, o.type, true)
11317           && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(meaningWhenMissing, o.meaningWhenMissing, true)
11318           && compareDeep(orderMeaning, o.orderMeaning, true) && compareDeep(fixed, o.fixed, true) && compareDeep(pattern, o.pattern, true)
11319           && compareDeep(example, o.example, true) && compareDeep(minValue, o.minValue, true) && compareDeep(maxValue, o.maxValue, true)
11320           && compareDeep(maxLength, o.maxLength, true) && compareDeep(condition, o.condition, true) && compareDeep(constraint, o.constraint, true)
11321           && compareDeep(mustSupport, o.mustSupport, true) && compareDeep(isModifier, o.isModifier, true)
11322           && compareDeep(isModifierReason, o.isModifierReason, true) && compareDeep(isSummary, o.isSummary, true)
11323           && compareDeep(binding, o.binding, true) && compareDeep(mapping, o.mapping, true);
11324      }
11325
11326      @Override
11327      public boolean equalsShallow(Base other_) {
11328        if (!super.equalsShallow(other_))
11329          return false;
11330        if (!(other_ instanceof ElementDefinition))
11331          return false;
11332        ElementDefinition o = (ElementDefinition) other_;
11333        return compareValues(path, o.path, true) && compareValues(representation, o.representation, true) && compareValues(sliceName, o.sliceName, true)
11334           && compareValues(sliceIsConstraining, o.sliceIsConstraining, true) && compareValues(label, o.label, true)
11335           && compareValues(short_, o.short_, true) && compareValues(definition, o.definition, true) && compareValues(comment, o.comment, true)
11336           && compareValues(requirements, o.requirements, true) && compareValues(alias, o.alias, true) && compareValues(min, o.min, true)
11337           && compareValues(max, o.max, true) && compareValues(contentReference, o.contentReference, true) && compareValues(meaningWhenMissing, o.meaningWhenMissing, true)
11338           && compareValues(orderMeaning, o.orderMeaning, true) && compareValues(maxLength, o.maxLength, true)
11339           && compareValues(condition, o.condition, true) && compareValues(mustSupport, o.mustSupport, true) && compareValues(isModifier, o.isModifier, true)
11340           && compareValues(isModifierReason, o.isModifierReason, true) && compareValues(isSummary, o.isSummary, true)
11341          ;
11342      }
11343
11344      public boolean isEmpty() {
11345        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, representation, sliceName
11346          , sliceIsConstraining, label, code, slicing, short_, definition, comment, requirements
11347          , alias, min, max, base, contentReference, type, defaultValue, meaningWhenMissing
11348          , orderMeaning, fixed, pattern, example, minValue, maxValue, maxLength, condition
11349          , constraint, mustSupport, isModifier, isModifierReason, isSummary, binding, mapping
11350          );
11351      }
11352
11353// Manual code (from Configuration.txt):
11354
11355  public String toString() {
11356    if (hasId())
11357      return getId();
11358    if (hasSliceName())
11359      return getPath()+":"+getSliceName();
11360    else
11361      return getPath();
11362  }
11363    
11364  public void makeBase(String path, int min, String max) {
11365    ElementDefinitionBaseComponent self = getBase();
11366    self.setPath(path);
11367    self.setMin(min);
11368    self.setMax(max);
11369  }
11370  
11371  public void makeBase() {
11372    ElementDefinitionBaseComponent self = getBase();
11373    self.setPath(getPath());
11374    self.setMin(getMin());
11375    self.setMax(getMax());
11376  }
11377 
11378  
11379  public String typeSummary() {
11380    CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
11381    for (TypeRefComponent tr : getType()) {
11382      if (tr.hasCode())
11383        b.append(tr.getWorkingCode());
11384    }
11385    return b.toString();
11386  }
11387  
11388  public String typeSummaryVB() {
11389    CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder("|");
11390    for (TypeRefComponent tr : getType()) {
11391      if (tr.hasCode())
11392        b.append(tr.getWorkingCode());
11393    }
11394    return b.toString().replace(" ", "");
11395  }
11396  
11397  public TypeRefComponent getType(String code) {
11398    for (TypeRefComponent tr : getType()) 
11399      if (tr.getCode().equals(code))
11400        return tr;
11401    TypeRefComponent tr = new TypeRefComponent();
11402    tr.setCode(code);
11403    type.add(tr);
11404    return tr;
11405  }
11406
11407  public static final boolean NOT_MODIFIER = false;
11408  public static final boolean NOT_IN_SUMMARY = false;
11409  public static final boolean IS_MODIFIER = true;
11410  public static final boolean IS_IN_SUMMARY = true;
11411  public ElementDefinition(boolean defaults, boolean modifier, boolean inSummary) {
11412    super();
11413    if (defaults) {
11414      setIsModifier(modifier);
11415      setIsSummary(inSummary);
11416    }
11417  }  
11418
11419 public String present() {
11420    return hasId() ? getId() : getPath();
11421  }
11422
11423  public boolean hasCondition(IdType id) {
11424    for (IdType c : getCondition()) {
11425      if (c.primitiveValue().equals(id.primitiveValue()))
11426        return true;
11427    }
11428    return false;
11429  }
11430
11431  public boolean hasConstraint(String key) {
11432    for (ElementDefinitionConstraintComponent c : getConstraint()) {
11433      if (c.getKey().equals(key))
11434        return true;
11435    }
11436    return false;
11437  }
11438
11439  public boolean hasCode(Coding c) {
11440    for (Coding t : getCode()) {
11441      if (t.getSystem().equals(c.getSystem()) && t.getCode().equals(c.getCode()))
11442        return true;
11443    }
11444    return false;
11445  }  
11446
11447  public boolean isChoice() {
11448    return getPath().endsWith("[x]");
11449  }  
11450
11451  public String getName() {
11452    return hasPath() ? getPath().contains(".") ? getPath().substring(getPath().lastIndexOf(".")+1) : getPath() : null;
11453  }
11454
11455  public boolean unbounded() {
11456    return getMax().equals("*") || Integer.parseInt(getMax()) > 1;
11457  }
11458
11459  public boolean isMandatory() {
11460    return getMin() > 0;
11461  }
11462
11463  public boolean isInlineType() {
11464    return getType().size() == 1 && Utilities.existsInList(getType().get(0).getCode(), "Element", "BackboneElement");
11465  }  
11466
11467
11468// end addition
11469
11470}
11471