001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Fri, Jul 15, 2022 11:20+1000 for FHIR v5.0.0-snapshot2
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import java.math.*;
038import org.hl7.fhir.utilities.Utilities;
039import org.hl7.fhir.r5.model.Enumerations.*;
040import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
041import org.hl7.fhir.exceptions.FHIRException;
042import org.hl7.fhir.instance.model.api.ICompositeType;
043import ca.uhn.fhir.model.api.annotation.ResourceDef;
044import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
045import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
046import ca.uhn.fhir.model.api.annotation.Child;
047import ca.uhn.fhir.model.api.annotation.ChildOrder;
048import ca.uhn.fhir.model.api.annotation.Description;
049import ca.uhn.fhir.model.api.annotation.Block;
050
051/**
052 * The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.
053 */
054@ResourceDef(name="Evidence", profile="http://hl7.org/fhir/StructureDefinition/Evidence")
055public class Evidence extends MetadataResource {
056
057    @Block()
058    public static class EvidenceVariableDefinitionComponent extends BackboneElement implements IBaseBackboneElement {
059        /**
060         * A text description or summary of the variable.
061         */
062        @Child(name = "description", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
063        @Description(shortDefinition="A text description or summary of the variable", formalDefinition="A text description or summary of the variable." )
064        protected MarkdownType description;
065
066        /**
067         * Footnotes and/or explanatory notes.
068         */
069        @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
070        @Description(shortDefinition="Footnotes and/or explanatory notes", formalDefinition="Footnotes and/or explanatory notes." )
071        protected List<Annotation> note;
072
073        /**
074         * population | subpopulation | exposure | referenceExposure | measuredVariable | confounder.
075         */
076        @Child(name = "variableRole", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true)
077        @Description(shortDefinition="population | subpopulation | exposure | referenceExposure | measuredVariable | confounder", formalDefinition="population | subpopulation | exposure | referenceExposure | measuredVariable | confounder." )
078        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/variable-role")
079        protected CodeableConcept variableRole;
080
081        /**
082         * Definition of the actual variable related to the statistic(s).
083         */
084        @Child(name = "observed", type = {Group.class, EvidenceVariable.class}, order=4, min=0, max=1, modifier=false, summary=true)
085        @Description(shortDefinition="Definition of the actual variable related to the statistic(s)", formalDefinition="Definition of the actual variable related to the statistic(s)." )
086        protected Reference observed;
087
088        /**
089         * Definition of the intended variable related to the Evidence.
090         */
091        @Child(name = "intended", type = {Group.class, EvidenceVariable.class}, order=5, min=0, max=1, modifier=false, summary=false)
092        @Description(shortDefinition="Definition of the intended variable related to the Evidence", formalDefinition="Definition of the intended variable related to the Evidence." )
093        protected Reference intended;
094
095        /**
096         * Indication of quality of match between intended variable to actual variable.
097         */
098        @Child(name = "directnessMatch", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false)
099        @Description(shortDefinition="low | moderate | high | exact", formalDefinition="Indication of quality of match between intended variable to actual variable." )
100        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/directness")
101        protected CodeableConcept directnessMatch;
102
103        private static final long serialVersionUID = -702346164L;
104
105    /**
106     * Constructor
107     */
108      public EvidenceVariableDefinitionComponent() {
109        super();
110      }
111
112    /**
113     * Constructor
114     */
115      public EvidenceVariableDefinitionComponent(CodeableConcept variableRole) {
116        super();
117        this.setVariableRole(variableRole);
118      }
119
120        /**
121         * @return {@link #description} (A text description or summary of the variable.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
122         */
123        public MarkdownType getDescriptionElement() { 
124          if (this.description == null)
125            if (Configuration.errorOnAutoCreate())
126              throw new Error("Attempt to auto-create EvidenceVariableDefinitionComponent.description");
127            else if (Configuration.doAutoCreate())
128              this.description = new MarkdownType(); // bb
129          return this.description;
130        }
131
132        public boolean hasDescriptionElement() { 
133          return this.description != null && !this.description.isEmpty();
134        }
135
136        public boolean hasDescription() { 
137          return this.description != null && !this.description.isEmpty();
138        }
139
140        /**
141         * @param value {@link #description} (A text description or summary of the variable.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
142         */
143        public EvidenceVariableDefinitionComponent setDescriptionElement(MarkdownType value) { 
144          this.description = value;
145          return this;
146        }
147
148        /**
149         * @return A text description or summary of the variable.
150         */
151        public String getDescription() { 
152          return this.description == null ? null : this.description.getValue();
153        }
154
155        /**
156         * @param value A text description or summary of the variable.
157         */
158        public EvidenceVariableDefinitionComponent setDescription(String value) { 
159          if (value == null)
160            this.description = null;
161          else {
162            if (this.description == null)
163              this.description = new MarkdownType();
164            this.description.setValue(value);
165          }
166          return this;
167        }
168
169        /**
170         * @return {@link #note} (Footnotes and/or explanatory notes.)
171         */
172        public List<Annotation> getNote() { 
173          if (this.note == null)
174            this.note = new ArrayList<Annotation>();
175          return this.note;
176        }
177
178        /**
179         * @return Returns a reference to <code>this</code> for easy method chaining
180         */
181        public EvidenceVariableDefinitionComponent setNote(List<Annotation> theNote) { 
182          this.note = theNote;
183          return this;
184        }
185
186        public boolean hasNote() { 
187          if (this.note == null)
188            return false;
189          for (Annotation item : this.note)
190            if (!item.isEmpty())
191              return true;
192          return false;
193        }
194
195        public Annotation addNote() { //3
196          Annotation t = new Annotation();
197          if (this.note == null)
198            this.note = new ArrayList<Annotation>();
199          this.note.add(t);
200          return t;
201        }
202
203        public EvidenceVariableDefinitionComponent addNote(Annotation t) { //3
204          if (t == null)
205            return this;
206          if (this.note == null)
207            this.note = new ArrayList<Annotation>();
208          this.note.add(t);
209          return this;
210        }
211
212        /**
213         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
214         */
215        public Annotation getNoteFirstRep() { 
216          if (getNote().isEmpty()) {
217            addNote();
218          }
219          return getNote().get(0);
220        }
221
222        /**
223         * @return {@link #variableRole} (population | subpopulation | exposure | referenceExposure | measuredVariable | confounder.)
224         */
225        public CodeableConcept getVariableRole() { 
226          if (this.variableRole == null)
227            if (Configuration.errorOnAutoCreate())
228              throw new Error("Attempt to auto-create EvidenceVariableDefinitionComponent.variableRole");
229            else if (Configuration.doAutoCreate())
230              this.variableRole = new CodeableConcept(); // cc
231          return this.variableRole;
232        }
233
234        public boolean hasVariableRole() { 
235          return this.variableRole != null && !this.variableRole.isEmpty();
236        }
237
238        /**
239         * @param value {@link #variableRole} (population | subpopulation | exposure | referenceExposure | measuredVariable | confounder.)
240         */
241        public EvidenceVariableDefinitionComponent setVariableRole(CodeableConcept value) { 
242          this.variableRole = value;
243          return this;
244        }
245
246        /**
247         * @return {@link #observed} (Definition of the actual variable related to the statistic(s).)
248         */
249        public Reference getObserved() { 
250          if (this.observed == null)
251            if (Configuration.errorOnAutoCreate())
252              throw new Error("Attempt to auto-create EvidenceVariableDefinitionComponent.observed");
253            else if (Configuration.doAutoCreate())
254              this.observed = new Reference(); // cc
255          return this.observed;
256        }
257
258        public boolean hasObserved() { 
259          return this.observed != null && !this.observed.isEmpty();
260        }
261
262        /**
263         * @param value {@link #observed} (Definition of the actual variable related to the statistic(s).)
264         */
265        public EvidenceVariableDefinitionComponent setObserved(Reference value) { 
266          this.observed = value;
267          return this;
268        }
269
270        /**
271         * @return {@link #intended} (Definition of the intended variable related to the Evidence.)
272         */
273        public Reference getIntended() { 
274          if (this.intended == null)
275            if (Configuration.errorOnAutoCreate())
276              throw new Error("Attempt to auto-create EvidenceVariableDefinitionComponent.intended");
277            else if (Configuration.doAutoCreate())
278              this.intended = new Reference(); // cc
279          return this.intended;
280        }
281
282        public boolean hasIntended() { 
283          return this.intended != null && !this.intended.isEmpty();
284        }
285
286        /**
287         * @param value {@link #intended} (Definition of the intended variable related to the Evidence.)
288         */
289        public EvidenceVariableDefinitionComponent setIntended(Reference value) { 
290          this.intended = value;
291          return this;
292        }
293
294        /**
295         * @return {@link #directnessMatch} (Indication of quality of match between intended variable to actual variable.)
296         */
297        public CodeableConcept getDirectnessMatch() { 
298          if (this.directnessMatch == null)
299            if (Configuration.errorOnAutoCreate())
300              throw new Error("Attempt to auto-create EvidenceVariableDefinitionComponent.directnessMatch");
301            else if (Configuration.doAutoCreate())
302              this.directnessMatch = new CodeableConcept(); // cc
303          return this.directnessMatch;
304        }
305
306        public boolean hasDirectnessMatch() { 
307          return this.directnessMatch != null && !this.directnessMatch.isEmpty();
308        }
309
310        /**
311         * @param value {@link #directnessMatch} (Indication of quality of match between intended variable to actual variable.)
312         */
313        public EvidenceVariableDefinitionComponent setDirectnessMatch(CodeableConcept value) { 
314          this.directnessMatch = value;
315          return this;
316        }
317
318        protected void listChildren(List<Property> children) {
319          super.listChildren(children);
320          children.add(new Property("description", "markdown", "A text description or summary of the variable.", 0, 1, description));
321          children.add(new Property("note", "Annotation", "Footnotes and/or explanatory notes.", 0, java.lang.Integer.MAX_VALUE, note));
322          children.add(new Property("variableRole", "CodeableConcept", "population | subpopulation | exposure | referenceExposure | measuredVariable | confounder.", 0, 1, variableRole));
323          children.add(new Property("observed", "Reference(Group|EvidenceVariable)", "Definition of the actual variable related to the statistic(s).", 0, 1, observed));
324          children.add(new Property("intended", "Reference(Group|EvidenceVariable)", "Definition of the intended variable related to the Evidence.", 0, 1, intended));
325          children.add(new Property("directnessMatch", "CodeableConcept", "Indication of quality of match between intended variable to actual variable.", 0, 1, directnessMatch));
326        }
327
328        @Override
329        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
330          switch (_hash) {
331          case -1724546052: /*description*/  return new Property("description", "markdown", "A text description or summary of the variable.", 0, 1, description);
332          case 3387378: /*note*/  return new Property("note", "Annotation", "Footnotes and/or explanatory notes.", 0, java.lang.Integer.MAX_VALUE, note);
333          case -372889326: /*variableRole*/  return new Property("variableRole", "CodeableConcept", "population | subpopulation | exposure | referenceExposure | measuredVariable | confounder.", 0, 1, variableRole);
334          case 348607176: /*observed*/  return new Property("observed", "Reference(Group|EvidenceVariable)", "Definition of the actual variable related to the statistic(s).", 0, 1, observed);
335          case 570282027: /*intended*/  return new Property("intended", "Reference(Group|EvidenceVariable)", "Definition of the intended variable related to the Evidence.", 0, 1, intended);
336          case -2144864283: /*directnessMatch*/  return new Property("directnessMatch", "CodeableConcept", "Indication of quality of match between intended variable to actual variable.", 0, 1, directnessMatch);
337          default: return super.getNamedProperty(_hash, _name, _checkValid);
338          }
339
340        }
341
342      @Override
343      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
344        switch (hash) {
345        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
346        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
347        case -372889326: /*variableRole*/ return this.variableRole == null ? new Base[0] : new Base[] {this.variableRole}; // CodeableConcept
348        case 348607176: /*observed*/ return this.observed == null ? new Base[0] : new Base[] {this.observed}; // Reference
349        case 570282027: /*intended*/ return this.intended == null ? new Base[0] : new Base[] {this.intended}; // Reference
350        case -2144864283: /*directnessMatch*/ return this.directnessMatch == null ? new Base[0] : new Base[] {this.directnessMatch}; // CodeableConcept
351        default: return super.getProperty(hash, name, checkValid);
352        }
353
354      }
355
356      @Override
357      public Base setProperty(int hash, String name, Base value) throws FHIRException {
358        switch (hash) {
359        case -1724546052: // description
360          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
361          return value;
362        case 3387378: // note
363          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
364          return value;
365        case -372889326: // variableRole
366          this.variableRole = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
367          return value;
368        case 348607176: // observed
369          this.observed = TypeConvertor.castToReference(value); // Reference
370          return value;
371        case 570282027: // intended
372          this.intended = TypeConvertor.castToReference(value); // Reference
373          return value;
374        case -2144864283: // directnessMatch
375          this.directnessMatch = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
376          return value;
377        default: return super.setProperty(hash, name, value);
378        }
379
380      }
381
382      @Override
383      public Base setProperty(String name, Base value) throws FHIRException {
384        if (name.equals("description")) {
385          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
386        } else if (name.equals("note")) {
387          this.getNote().add(TypeConvertor.castToAnnotation(value));
388        } else if (name.equals("variableRole")) {
389          this.variableRole = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
390        } else if (name.equals("observed")) {
391          this.observed = TypeConvertor.castToReference(value); // Reference
392        } else if (name.equals("intended")) {
393          this.intended = TypeConvertor.castToReference(value); // Reference
394        } else if (name.equals("directnessMatch")) {
395          this.directnessMatch = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
396        } else
397          return super.setProperty(name, value);
398        return value;
399      }
400
401      @Override
402      public Base makeProperty(int hash, String name) throws FHIRException {
403        switch (hash) {
404        case -1724546052:  return getDescriptionElement();
405        case 3387378:  return addNote(); 
406        case -372889326:  return getVariableRole();
407        case 348607176:  return getObserved();
408        case 570282027:  return getIntended();
409        case -2144864283:  return getDirectnessMatch();
410        default: return super.makeProperty(hash, name);
411        }
412
413      }
414
415      @Override
416      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
417        switch (hash) {
418        case -1724546052: /*description*/ return new String[] {"markdown"};
419        case 3387378: /*note*/ return new String[] {"Annotation"};
420        case -372889326: /*variableRole*/ return new String[] {"CodeableConcept"};
421        case 348607176: /*observed*/ return new String[] {"Reference"};
422        case 570282027: /*intended*/ return new String[] {"Reference"};
423        case -2144864283: /*directnessMatch*/ return new String[] {"CodeableConcept"};
424        default: return super.getTypesForProperty(hash, name);
425        }
426
427      }
428
429      @Override
430      public Base addChild(String name) throws FHIRException {
431        if (name.equals("description")) {
432          throw new FHIRException("Cannot call addChild on a primitive type Evidence.variableDefinition.description");
433        }
434        else if (name.equals("note")) {
435          return addNote();
436        }
437        else if (name.equals("variableRole")) {
438          this.variableRole = new CodeableConcept();
439          return this.variableRole;
440        }
441        else if (name.equals("observed")) {
442          this.observed = new Reference();
443          return this.observed;
444        }
445        else if (name.equals("intended")) {
446          this.intended = new Reference();
447          return this.intended;
448        }
449        else if (name.equals("directnessMatch")) {
450          this.directnessMatch = new CodeableConcept();
451          return this.directnessMatch;
452        }
453        else
454          return super.addChild(name);
455      }
456
457      public EvidenceVariableDefinitionComponent copy() {
458        EvidenceVariableDefinitionComponent dst = new EvidenceVariableDefinitionComponent();
459        copyValues(dst);
460        return dst;
461      }
462
463      public void copyValues(EvidenceVariableDefinitionComponent dst) {
464        super.copyValues(dst);
465        dst.description = description == null ? null : description.copy();
466        if (note != null) {
467          dst.note = new ArrayList<Annotation>();
468          for (Annotation i : note)
469            dst.note.add(i.copy());
470        };
471        dst.variableRole = variableRole == null ? null : variableRole.copy();
472        dst.observed = observed == null ? null : observed.copy();
473        dst.intended = intended == null ? null : intended.copy();
474        dst.directnessMatch = directnessMatch == null ? null : directnessMatch.copy();
475      }
476
477      @Override
478      public boolean equalsDeep(Base other_) {
479        if (!super.equalsDeep(other_))
480          return false;
481        if (!(other_ instanceof EvidenceVariableDefinitionComponent))
482          return false;
483        EvidenceVariableDefinitionComponent o = (EvidenceVariableDefinitionComponent) other_;
484        return compareDeep(description, o.description, true) && compareDeep(note, o.note, true) && compareDeep(variableRole, o.variableRole, true)
485           && compareDeep(observed, o.observed, true) && compareDeep(intended, o.intended, true) && compareDeep(directnessMatch, o.directnessMatch, true)
486          ;
487      }
488
489      @Override
490      public boolean equalsShallow(Base other_) {
491        if (!super.equalsShallow(other_))
492          return false;
493        if (!(other_ instanceof EvidenceVariableDefinitionComponent))
494          return false;
495        EvidenceVariableDefinitionComponent o = (EvidenceVariableDefinitionComponent) other_;
496        return compareValues(description, o.description, true);
497      }
498
499      public boolean isEmpty() {
500        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, note, variableRole
501          , observed, intended, directnessMatch);
502      }
503
504  public String fhirType() {
505    return "Evidence.variableDefinition";
506
507  }
508
509  }
510
511    @Block()
512    public static class EvidenceStatisticComponent extends BackboneElement implements IBaseBackboneElement {
513        /**
514         * A description of the content value of the statistic.
515         */
516        @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
517        @Description(shortDefinition="Description of content", formalDefinition="A description of the content value of the statistic." )
518        protected StringType description;
519
520        /**
521         * Footnotes and/or explanatory notes.
522         */
523        @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
524        @Description(shortDefinition="Footnotes and/or explanatory notes", formalDefinition="Footnotes and/or explanatory notes." )
525        protected List<Annotation> note;
526
527        /**
528         * Type of statistic, e.g., relative risk.
529         */
530        @Child(name = "statisticType", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
531        @Description(shortDefinition="Type of statistic, e.g., relative risk", formalDefinition="Type of statistic, e.g., relative risk." )
532        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/statistic-type")
533        protected CodeableConcept statisticType;
534
535        /**
536         * When the measured variable is handled categorically, the category element is used to define which category the statistic is reporting.
537         */
538        @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
539        @Description(shortDefinition="Associated category for categorical variable", formalDefinition="When the measured variable is handled categorically, the category element is used to define which category the statistic is reporting." )
540        protected CodeableConcept category;
541
542        /**
543         * Statistic value.
544         */
545        @Child(name = "quantity", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false)
546        @Description(shortDefinition="Statistic value", formalDefinition="Statistic value." )
547        protected Quantity quantity;
548
549        /**
550         * The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants.
551         */
552        @Child(name = "numberOfEvents", type = {UnsignedIntType.class}, order=6, min=0, max=1, modifier=false, summary=false)
553        @Description(shortDefinition="The number of events associated with the statistic", formalDefinition="The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants." )
554        protected UnsignedIntType numberOfEvents;
555
556        /**
557         * The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants.
558         */
559        @Child(name = "numberAffected", type = {UnsignedIntType.class}, order=7, min=0, max=1, modifier=false, summary=false)
560        @Description(shortDefinition="The number of participants affected", formalDefinition="The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants." )
561        protected UnsignedIntType numberAffected;
562
563        /**
564         * Number of samples in the statistic.
565         */
566        @Child(name = "sampleSize", type = {}, order=8, min=0, max=1, modifier=false, summary=false)
567        @Description(shortDefinition="Number of samples in the statistic", formalDefinition="Number of samples in the statistic." )
568        protected EvidenceStatisticSampleSizeComponent sampleSize;
569
570        /**
571         * A statistical attribute of the statistic such as a measure of heterogeneity.
572         */
573        @Child(name = "attributeEstimate", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
574        @Description(shortDefinition="An attribute of the Statistic", formalDefinition="A statistical attribute of the statistic such as a measure of heterogeneity." )
575        protected List<EvidenceStatisticAttributeEstimateComponent> attributeEstimate;
576
577        /**
578         * A component of the method to generate the statistic.
579         */
580        @Child(name = "modelCharacteristic", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
581        @Description(shortDefinition="An aspect of the statistical model", formalDefinition="A component of the method to generate the statistic." )
582        protected List<EvidenceStatisticModelCharacteristicComponent> modelCharacteristic;
583
584        private static final long serialVersionUID = 479247832L;
585
586    /**
587     * Constructor
588     */
589      public EvidenceStatisticComponent() {
590        super();
591      }
592
593        /**
594         * @return {@link #description} (A description of the content value of the statistic.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
595         */
596        public StringType getDescriptionElement() { 
597          if (this.description == null)
598            if (Configuration.errorOnAutoCreate())
599              throw new Error("Attempt to auto-create EvidenceStatisticComponent.description");
600            else if (Configuration.doAutoCreate())
601              this.description = new StringType(); // bb
602          return this.description;
603        }
604
605        public boolean hasDescriptionElement() { 
606          return this.description != null && !this.description.isEmpty();
607        }
608
609        public boolean hasDescription() { 
610          return this.description != null && !this.description.isEmpty();
611        }
612
613        /**
614         * @param value {@link #description} (A description of the content value of the statistic.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
615         */
616        public EvidenceStatisticComponent setDescriptionElement(StringType value) { 
617          this.description = value;
618          return this;
619        }
620
621        /**
622         * @return A description of the content value of the statistic.
623         */
624        public String getDescription() { 
625          return this.description == null ? null : this.description.getValue();
626        }
627
628        /**
629         * @param value A description of the content value of the statistic.
630         */
631        public EvidenceStatisticComponent setDescription(String value) { 
632          if (Utilities.noString(value))
633            this.description = null;
634          else {
635            if (this.description == null)
636              this.description = new StringType();
637            this.description.setValue(value);
638          }
639          return this;
640        }
641
642        /**
643         * @return {@link #note} (Footnotes and/or explanatory notes.)
644         */
645        public List<Annotation> getNote() { 
646          if (this.note == null)
647            this.note = new ArrayList<Annotation>();
648          return this.note;
649        }
650
651        /**
652         * @return Returns a reference to <code>this</code> for easy method chaining
653         */
654        public EvidenceStatisticComponent setNote(List<Annotation> theNote) { 
655          this.note = theNote;
656          return this;
657        }
658
659        public boolean hasNote() { 
660          if (this.note == null)
661            return false;
662          for (Annotation item : this.note)
663            if (!item.isEmpty())
664              return true;
665          return false;
666        }
667
668        public Annotation addNote() { //3
669          Annotation t = new Annotation();
670          if (this.note == null)
671            this.note = new ArrayList<Annotation>();
672          this.note.add(t);
673          return t;
674        }
675
676        public EvidenceStatisticComponent addNote(Annotation t) { //3
677          if (t == null)
678            return this;
679          if (this.note == null)
680            this.note = new ArrayList<Annotation>();
681          this.note.add(t);
682          return this;
683        }
684
685        /**
686         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
687         */
688        public Annotation getNoteFirstRep() { 
689          if (getNote().isEmpty()) {
690            addNote();
691          }
692          return getNote().get(0);
693        }
694
695        /**
696         * @return {@link #statisticType} (Type of statistic, e.g., relative risk.)
697         */
698        public CodeableConcept getStatisticType() { 
699          if (this.statisticType == null)
700            if (Configuration.errorOnAutoCreate())
701              throw new Error("Attempt to auto-create EvidenceStatisticComponent.statisticType");
702            else if (Configuration.doAutoCreate())
703              this.statisticType = new CodeableConcept(); // cc
704          return this.statisticType;
705        }
706
707        public boolean hasStatisticType() { 
708          return this.statisticType != null && !this.statisticType.isEmpty();
709        }
710
711        /**
712         * @param value {@link #statisticType} (Type of statistic, e.g., relative risk.)
713         */
714        public EvidenceStatisticComponent setStatisticType(CodeableConcept value) { 
715          this.statisticType = value;
716          return this;
717        }
718
719        /**
720         * @return {@link #category} (When the measured variable is handled categorically, the category element is used to define which category the statistic is reporting.)
721         */
722        public CodeableConcept getCategory() { 
723          if (this.category == null)
724            if (Configuration.errorOnAutoCreate())
725              throw new Error("Attempt to auto-create EvidenceStatisticComponent.category");
726            else if (Configuration.doAutoCreate())
727              this.category = new CodeableConcept(); // cc
728          return this.category;
729        }
730
731        public boolean hasCategory() { 
732          return this.category != null && !this.category.isEmpty();
733        }
734
735        /**
736         * @param value {@link #category} (When the measured variable is handled categorically, the category element is used to define which category the statistic is reporting.)
737         */
738        public EvidenceStatisticComponent setCategory(CodeableConcept value) { 
739          this.category = value;
740          return this;
741        }
742
743        /**
744         * @return {@link #quantity} (Statistic value.)
745         */
746        public Quantity getQuantity() { 
747          if (this.quantity == null)
748            if (Configuration.errorOnAutoCreate())
749              throw new Error("Attempt to auto-create EvidenceStatisticComponent.quantity");
750            else if (Configuration.doAutoCreate())
751              this.quantity = new Quantity(); // cc
752          return this.quantity;
753        }
754
755        public boolean hasQuantity() { 
756          return this.quantity != null && !this.quantity.isEmpty();
757        }
758
759        /**
760         * @param value {@link #quantity} (Statistic value.)
761         */
762        public EvidenceStatisticComponent setQuantity(Quantity value) { 
763          this.quantity = value;
764          return this;
765        }
766
767        /**
768         * @return {@link #numberOfEvents} (The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants.). This is the underlying object with id, value and extensions. The accessor "getNumberOfEvents" gives direct access to the value
769         */
770        public UnsignedIntType getNumberOfEventsElement() { 
771          if (this.numberOfEvents == null)
772            if (Configuration.errorOnAutoCreate())
773              throw new Error("Attempt to auto-create EvidenceStatisticComponent.numberOfEvents");
774            else if (Configuration.doAutoCreate())
775              this.numberOfEvents = new UnsignedIntType(); // bb
776          return this.numberOfEvents;
777        }
778
779        public boolean hasNumberOfEventsElement() { 
780          return this.numberOfEvents != null && !this.numberOfEvents.isEmpty();
781        }
782
783        public boolean hasNumberOfEvents() { 
784          return this.numberOfEvents != null && !this.numberOfEvents.isEmpty();
785        }
786
787        /**
788         * @param value {@link #numberOfEvents} (The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants.). This is the underlying object with id, value and extensions. The accessor "getNumberOfEvents" gives direct access to the value
789         */
790        public EvidenceStatisticComponent setNumberOfEventsElement(UnsignedIntType value) { 
791          this.numberOfEvents = value;
792          return this;
793        }
794
795        /**
796         * @return The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants.
797         */
798        public int getNumberOfEvents() { 
799          return this.numberOfEvents == null || this.numberOfEvents.isEmpty() ? 0 : this.numberOfEvents.getValue();
800        }
801
802        /**
803         * @param value The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants.
804         */
805        public EvidenceStatisticComponent setNumberOfEvents(int value) { 
806            if (this.numberOfEvents == null)
807              this.numberOfEvents = new UnsignedIntType();
808            this.numberOfEvents.setValue(value);
809          return this;
810        }
811
812        /**
813         * @return {@link #numberAffected} (The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants.). This is the underlying object with id, value and extensions. The accessor "getNumberAffected" gives direct access to the value
814         */
815        public UnsignedIntType getNumberAffectedElement() { 
816          if (this.numberAffected == null)
817            if (Configuration.errorOnAutoCreate())
818              throw new Error("Attempt to auto-create EvidenceStatisticComponent.numberAffected");
819            else if (Configuration.doAutoCreate())
820              this.numberAffected = new UnsignedIntType(); // bb
821          return this.numberAffected;
822        }
823
824        public boolean hasNumberAffectedElement() { 
825          return this.numberAffected != null && !this.numberAffected.isEmpty();
826        }
827
828        public boolean hasNumberAffected() { 
829          return this.numberAffected != null && !this.numberAffected.isEmpty();
830        }
831
832        /**
833         * @param value {@link #numberAffected} (The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants.). This is the underlying object with id, value and extensions. The accessor "getNumberAffected" gives direct access to the value
834         */
835        public EvidenceStatisticComponent setNumberAffectedElement(UnsignedIntType value) { 
836          this.numberAffected = value;
837          return this;
838        }
839
840        /**
841         * @return The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants.
842         */
843        public int getNumberAffected() { 
844          return this.numberAffected == null || this.numberAffected.isEmpty() ? 0 : this.numberAffected.getValue();
845        }
846
847        /**
848         * @param value The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants.
849         */
850        public EvidenceStatisticComponent setNumberAffected(int value) { 
851            if (this.numberAffected == null)
852              this.numberAffected = new UnsignedIntType();
853            this.numberAffected.setValue(value);
854          return this;
855        }
856
857        /**
858         * @return {@link #sampleSize} (Number of samples in the statistic.)
859         */
860        public EvidenceStatisticSampleSizeComponent getSampleSize() { 
861          if (this.sampleSize == null)
862            if (Configuration.errorOnAutoCreate())
863              throw new Error("Attempt to auto-create EvidenceStatisticComponent.sampleSize");
864            else if (Configuration.doAutoCreate())
865              this.sampleSize = new EvidenceStatisticSampleSizeComponent(); // cc
866          return this.sampleSize;
867        }
868
869        public boolean hasSampleSize() { 
870          return this.sampleSize != null && !this.sampleSize.isEmpty();
871        }
872
873        /**
874         * @param value {@link #sampleSize} (Number of samples in the statistic.)
875         */
876        public EvidenceStatisticComponent setSampleSize(EvidenceStatisticSampleSizeComponent value) { 
877          this.sampleSize = value;
878          return this;
879        }
880
881        /**
882         * @return {@link #attributeEstimate} (A statistical attribute of the statistic such as a measure of heterogeneity.)
883         */
884        public List<EvidenceStatisticAttributeEstimateComponent> getAttributeEstimate() { 
885          if (this.attributeEstimate == null)
886            this.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
887          return this.attributeEstimate;
888        }
889
890        /**
891         * @return Returns a reference to <code>this</code> for easy method chaining
892         */
893        public EvidenceStatisticComponent setAttributeEstimate(List<EvidenceStatisticAttributeEstimateComponent> theAttributeEstimate) { 
894          this.attributeEstimate = theAttributeEstimate;
895          return this;
896        }
897
898        public boolean hasAttributeEstimate() { 
899          if (this.attributeEstimate == null)
900            return false;
901          for (EvidenceStatisticAttributeEstimateComponent item : this.attributeEstimate)
902            if (!item.isEmpty())
903              return true;
904          return false;
905        }
906
907        public EvidenceStatisticAttributeEstimateComponent addAttributeEstimate() { //3
908          EvidenceStatisticAttributeEstimateComponent t = new EvidenceStatisticAttributeEstimateComponent();
909          if (this.attributeEstimate == null)
910            this.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
911          this.attributeEstimate.add(t);
912          return t;
913        }
914
915        public EvidenceStatisticComponent addAttributeEstimate(EvidenceStatisticAttributeEstimateComponent t) { //3
916          if (t == null)
917            return this;
918          if (this.attributeEstimate == null)
919            this.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
920          this.attributeEstimate.add(t);
921          return this;
922        }
923
924        /**
925         * @return The first repetition of repeating field {@link #attributeEstimate}, creating it if it does not already exist {3}
926         */
927        public EvidenceStatisticAttributeEstimateComponent getAttributeEstimateFirstRep() { 
928          if (getAttributeEstimate().isEmpty()) {
929            addAttributeEstimate();
930          }
931          return getAttributeEstimate().get(0);
932        }
933
934        /**
935         * @return {@link #modelCharacteristic} (A component of the method to generate the statistic.)
936         */
937        public List<EvidenceStatisticModelCharacteristicComponent> getModelCharacteristic() { 
938          if (this.modelCharacteristic == null)
939            this.modelCharacteristic = new ArrayList<EvidenceStatisticModelCharacteristicComponent>();
940          return this.modelCharacteristic;
941        }
942
943        /**
944         * @return Returns a reference to <code>this</code> for easy method chaining
945         */
946        public EvidenceStatisticComponent setModelCharacteristic(List<EvidenceStatisticModelCharacteristicComponent> theModelCharacteristic) { 
947          this.modelCharacteristic = theModelCharacteristic;
948          return this;
949        }
950
951        public boolean hasModelCharacteristic() { 
952          if (this.modelCharacteristic == null)
953            return false;
954          for (EvidenceStatisticModelCharacteristicComponent item : this.modelCharacteristic)
955            if (!item.isEmpty())
956              return true;
957          return false;
958        }
959
960        public EvidenceStatisticModelCharacteristicComponent addModelCharacteristic() { //3
961          EvidenceStatisticModelCharacteristicComponent t = new EvidenceStatisticModelCharacteristicComponent();
962          if (this.modelCharacteristic == null)
963            this.modelCharacteristic = new ArrayList<EvidenceStatisticModelCharacteristicComponent>();
964          this.modelCharacteristic.add(t);
965          return t;
966        }
967
968        public EvidenceStatisticComponent addModelCharacteristic(EvidenceStatisticModelCharacteristicComponent t) { //3
969          if (t == null)
970            return this;
971          if (this.modelCharacteristic == null)
972            this.modelCharacteristic = new ArrayList<EvidenceStatisticModelCharacteristicComponent>();
973          this.modelCharacteristic.add(t);
974          return this;
975        }
976
977        /**
978         * @return The first repetition of repeating field {@link #modelCharacteristic}, creating it if it does not already exist {3}
979         */
980        public EvidenceStatisticModelCharacteristicComponent getModelCharacteristicFirstRep() { 
981          if (getModelCharacteristic().isEmpty()) {
982            addModelCharacteristic();
983          }
984          return getModelCharacteristic().get(0);
985        }
986
987        protected void listChildren(List<Property> children) {
988          super.listChildren(children);
989          children.add(new Property("description", "string", "A description of the content value of the statistic.", 0, 1, description));
990          children.add(new Property("note", "Annotation", "Footnotes and/or explanatory notes.", 0, java.lang.Integer.MAX_VALUE, note));
991          children.add(new Property("statisticType", "CodeableConcept", "Type of statistic, e.g., relative risk.", 0, 1, statisticType));
992          children.add(new Property("category", "CodeableConcept", "When the measured variable is handled categorically, the category element is used to define which category the statistic is reporting.", 0, 1, category));
993          children.add(new Property("quantity", "Quantity", "Statistic value.", 0, 1, quantity));
994          children.add(new Property("numberOfEvents", "unsignedInt", "The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants.", 0, 1, numberOfEvents));
995          children.add(new Property("numberAffected", "unsignedInt", "The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants.", 0, 1, numberAffected));
996          children.add(new Property("sampleSize", "", "Number of samples in the statistic.", 0, 1, sampleSize));
997          children.add(new Property("attributeEstimate", "", "A statistical attribute of the statistic such as a measure of heterogeneity.", 0, java.lang.Integer.MAX_VALUE, attributeEstimate));
998          children.add(new Property("modelCharacteristic", "", "A component of the method to generate the statistic.", 0, java.lang.Integer.MAX_VALUE, modelCharacteristic));
999        }
1000
1001        @Override
1002        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1003          switch (_hash) {
1004          case -1724546052: /*description*/  return new Property("description", "string", "A description of the content value of the statistic.", 0, 1, description);
1005          case 3387378: /*note*/  return new Property("note", "Annotation", "Footnotes and/or explanatory notes.", 0, java.lang.Integer.MAX_VALUE, note);
1006          case -392342358: /*statisticType*/  return new Property("statisticType", "CodeableConcept", "Type of statistic, e.g., relative risk.", 0, 1, statisticType);
1007          case 50511102: /*category*/  return new Property("category", "CodeableConcept", "When the measured variable is handled categorically, the category element is used to define which category the statistic is reporting.", 0, 1, category);
1008          case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "Statistic value.", 0, 1, quantity);
1009          case 1534510137: /*numberOfEvents*/  return new Property("numberOfEvents", "unsignedInt", "The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants.", 0, 1, numberOfEvents);
1010          case -460990243: /*numberAffected*/  return new Property("numberAffected", "unsignedInt", "The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants.", 0, 1, numberAffected);
1011          case 143123659: /*sampleSize*/  return new Property("sampleSize", "", "Number of samples in the statistic.", 0, 1, sampleSize);
1012          case -1539581980: /*attributeEstimate*/  return new Property("attributeEstimate", "", "A statistical attribute of the statistic such as a measure of heterogeneity.", 0, java.lang.Integer.MAX_VALUE, attributeEstimate);
1013          case 274795812: /*modelCharacteristic*/  return new Property("modelCharacteristic", "", "A component of the method to generate the statistic.", 0, java.lang.Integer.MAX_VALUE, modelCharacteristic);
1014          default: return super.getNamedProperty(_hash, _name, _checkValid);
1015          }
1016
1017        }
1018
1019      @Override
1020      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1021        switch (hash) {
1022        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1023        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1024        case -392342358: /*statisticType*/ return this.statisticType == null ? new Base[0] : new Base[] {this.statisticType}; // CodeableConcept
1025        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
1026        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
1027        case 1534510137: /*numberOfEvents*/ return this.numberOfEvents == null ? new Base[0] : new Base[] {this.numberOfEvents}; // UnsignedIntType
1028        case -460990243: /*numberAffected*/ return this.numberAffected == null ? new Base[0] : new Base[] {this.numberAffected}; // UnsignedIntType
1029        case 143123659: /*sampleSize*/ return this.sampleSize == null ? new Base[0] : new Base[] {this.sampleSize}; // EvidenceStatisticSampleSizeComponent
1030        case -1539581980: /*attributeEstimate*/ return this.attributeEstimate == null ? new Base[0] : this.attributeEstimate.toArray(new Base[this.attributeEstimate.size()]); // EvidenceStatisticAttributeEstimateComponent
1031        case 274795812: /*modelCharacteristic*/ return this.modelCharacteristic == null ? new Base[0] : this.modelCharacteristic.toArray(new Base[this.modelCharacteristic.size()]); // EvidenceStatisticModelCharacteristicComponent
1032        default: return super.getProperty(hash, name, checkValid);
1033        }
1034
1035      }
1036
1037      @Override
1038      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1039        switch (hash) {
1040        case -1724546052: // description
1041          this.description = TypeConvertor.castToString(value); // StringType
1042          return value;
1043        case 3387378: // note
1044          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1045          return value;
1046        case -392342358: // statisticType
1047          this.statisticType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1048          return value;
1049        case 50511102: // category
1050          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1051          return value;
1052        case -1285004149: // quantity
1053          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1054          return value;
1055        case 1534510137: // numberOfEvents
1056          this.numberOfEvents = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1057          return value;
1058        case -460990243: // numberAffected
1059          this.numberAffected = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1060          return value;
1061        case 143123659: // sampleSize
1062          this.sampleSize = (EvidenceStatisticSampleSizeComponent) value; // EvidenceStatisticSampleSizeComponent
1063          return value;
1064        case -1539581980: // attributeEstimate
1065          this.getAttributeEstimate().add((EvidenceStatisticAttributeEstimateComponent) value); // EvidenceStatisticAttributeEstimateComponent
1066          return value;
1067        case 274795812: // modelCharacteristic
1068          this.getModelCharacteristic().add((EvidenceStatisticModelCharacteristicComponent) value); // EvidenceStatisticModelCharacteristicComponent
1069          return value;
1070        default: return super.setProperty(hash, name, value);
1071        }
1072
1073      }
1074
1075      @Override
1076      public Base setProperty(String name, Base value) throws FHIRException {
1077        if (name.equals("description")) {
1078          this.description = TypeConvertor.castToString(value); // StringType
1079        } else if (name.equals("note")) {
1080          this.getNote().add(TypeConvertor.castToAnnotation(value));
1081        } else if (name.equals("statisticType")) {
1082          this.statisticType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1083        } else if (name.equals("category")) {
1084          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1085        } else if (name.equals("quantity")) {
1086          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1087        } else if (name.equals("numberOfEvents")) {
1088          this.numberOfEvents = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1089        } else if (name.equals("numberAffected")) {
1090          this.numberAffected = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1091        } else if (name.equals("sampleSize")) {
1092          this.sampleSize = (EvidenceStatisticSampleSizeComponent) value; // EvidenceStatisticSampleSizeComponent
1093        } else if (name.equals("attributeEstimate")) {
1094          this.getAttributeEstimate().add((EvidenceStatisticAttributeEstimateComponent) value);
1095        } else if (name.equals("modelCharacteristic")) {
1096          this.getModelCharacteristic().add((EvidenceStatisticModelCharacteristicComponent) value);
1097        } else
1098          return super.setProperty(name, value);
1099        return value;
1100      }
1101
1102      @Override
1103      public Base makeProperty(int hash, String name) throws FHIRException {
1104        switch (hash) {
1105        case -1724546052:  return getDescriptionElement();
1106        case 3387378:  return addNote(); 
1107        case -392342358:  return getStatisticType();
1108        case 50511102:  return getCategory();
1109        case -1285004149:  return getQuantity();
1110        case 1534510137:  return getNumberOfEventsElement();
1111        case -460990243:  return getNumberAffectedElement();
1112        case 143123659:  return getSampleSize();
1113        case -1539581980:  return addAttributeEstimate(); 
1114        case 274795812:  return addModelCharacteristic(); 
1115        default: return super.makeProperty(hash, name);
1116        }
1117
1118      }
1119
1120      @Override
1121      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1122        switch (hash) {
1123        case -1724546052: /*description*/ return new String[] {"string"};
1124        case 3387378: /*note*/ return new String[] {"Annotation"};
1125        case -392342358: /*statisticType*/ return new String[] {"CodeableConcept"};
1126        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1127        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
1128        case 1534510137: /*numberOfEvents*/ return new String[] {"unsignedInt"};
1129        case -460990243: /*numberAffected*/ return new String[] {"unsignedInt"};
1130        case 143123659: /*sampleSize*/ return new String[] {};
1131        case -1539581980: /*attributeEstimate*/ return new String[] {};
1132        case 274795812: /*modelCharacteristic*/ return new String[] {};
1133        default: return super.getTypesForProperty(hash, name);
1134        }
1135
1136      }
1137
1138      @Override
1139      public Base addChild(String name) throws FHIRException {
1140        if (name.equals("description")) {
1141          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.description");
1142        }
1143        else if (name.equals("note")) {
1144          return addNote();
1145        }
1146        else if (name.equals("statisticType")) {
1147          this.statisticType = new CodeableConcept();
1148          return this.statisticType;
1149        }
1150        else if (name.equals("category")) {
1151          this.category = new CodeableConcept();
1152          return this.category;
1153        }
1154        else if (name.equals("quantity")) {
1155          this.quantity = new Quantity();
1156          return this.quantity;
1157        }
1158        else if (name.equals("numberOfEvents")) {
1159          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.numberOfEvents");
1160        }
1161        else if (name.equals("numberAffected")) {
1162          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.numberAffected");
1163        }
1164        else if (name.equals("sampleSize")) {
1165          this.sampleSize = new EvidenceStatisticSampleSizeComponent();
1166          return this.sampleSize;
1167        }
1168        else if (name.equals("attributeEstimate")) {
1169          return addAttributeEstimate();
1170        }
1171        else if (name.equals("modelCharacteristic")) {
1172          return addModelCharacteristic();
1173        }
1174        else
1175          return super.addChild(name);
1176      }
1177
1178      public EvidenceStatisticComponent copy() {
1179        EvidenceStatisticComponent dst = new EvidenceStatisticComponent();
1180        copyValues(dst);
1181        return dst;
1182      }
1183
1184      public void copyValues(EvidenceStatisticComponent dst) {
1185        super.copyValues(dst);
1186        dst.description = description == null ? null : description.copy();
1187        if (note != null) {
1188          dst.note = new ArrayList<Annotation>();
1189          for (Annotation i : note)
1190            dst.note.add(i.copy());
1191        };
1192        dst.statisticType = statisticType == null ? null : statisticType.copy();
1193        dst.category = category == null ? null : category.copy();
1194        dst.quantity = quantity == null ? null : quantity.copy();
1195        dst.numberOfEvents = numberOfEvents == null ? null : numberOfEvents.copy();
1196        dst.numberAffected = numberAffected == null ? null : numberAffected.copy();
1197        dst.sampleSize = sampleSize == null ? null : sampleSize.copy();
1198        if (attributeEstimate != null) {
1199          dst.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
1200          for (EvidenceStatisticAttributeEstimateComponent i : attributeEstimate)
1201            dst.attributeEstimate.add(i.copy());
1202        };
1203        if (modelCharacteristic != null) {
1204          dst.modelCharacteristic = new ArrayList<EvidenceStatisticModelCharacteristicComponent>();
1205          for (EvidenceStatisticModelCharacteristicComponent i : modelCharacteristic)
1206            dst.modelCharacteristic.add(i.copy());
1207        };
1208      }
1209
1210      @Override
1211      public boolean equalsDeep(Base other_) {
1212        if (!super.equalsDeep(other_))
1213          return false;
1214        if (!(other_ instanceof EvidenceStatisticComponent))
1215          return false;
1216        EvidenceStatisticComponent o = (EvidenceStatisticComponent) other_;
1217        return compareDeep(description, o.description, true) && compareDeep(note, o.note, true) && compareDeep(statisticType, o.statisticType, true)
1218           && compareDeep(category, o.category, true) && compareDeep(quantity, o.quantity, true) && compareDeep(numberOfEvents, o.numberOfEvents, true)
1219           && compareDeep(numberAffected, o.numberAffected, true) && compareDeep(sampleSize, o.sampleSize, true)
1220           && compareDeep(attributeEstimate, o.attributeEstimate, true) && compareDeep(modelCharacteristic, o.modelCharacteristic, true)
1221          ;
1222      }
1223
1224      @Override
1225      public boolean equalsShallow(Base other_) {
1226        if (!super.equalsShallow(other_))
1227          return false;
1228        if (!(other_ instanceof EvidenceStatisticComponent))
1229          return false;
1230        EvidenceStatisticComponent o = (EvidenceStatisticComponent) other_;
1231        return compareValues(description, o.description, true) && compareValues(numberOfEvents, o.numberOfEvents, true)
1232           && compareValues(numberAffected, o.numberAffected, true);
1233      }
1234
1235      public boolean isEmpty() {
1236        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, note, statisticType
1237          , category, quantity, numberOfEvents, numberAffected, sampleSize, attributeEstimate
1238          , modelCharacteristic);
1239      }
1240
1241  public String fhirType() {
1242    return "Evidence.statistic";
1243
1244  }
1245
1246  }
1247
1248    @Block()
1249    public static class EvidenceStatisticSampleSizeComponent extends BackboneElement implements IBaseBackboneElement {
1250        /**
1251         * Human-readable summary of population sample size.
1252         */
1253        @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
1254        @Description(shortDefinition="Textual description of sample size for statistic", formalDefinition="Human-readable summary of population sample size." )
1255        protected StringType description;
1256
1257        /**
1258         * Footnote or explanatory note about the sample size.
1259         */
1260        @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1261        @Description(shortDefinition="Footnote or explanatory note about the sample size", formalDefinition="Footnote or explanatory note about the sample size." )
1262        protected List<Annotation> note;
1263
1264        /**
1265         * Number of participants in the population.
1266         */
1267        @Child(name = "numberOfStudies", type = {UnsignedIntType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1268        @Description(shortDefinition="Number of contributing studies", formalDefinition="Number of participants in the population." )
1269        protected UnsignedIntType numberOfStudies;
1270
1271        /**
1272         * A human-readable string to clarify or explain concepts about the sample size.
1273         */
1274        @Child(name = "numberOfParticipants", type = {UnsignedIntType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1275        @Description(shortDefinition="Cumulative number of participants", formalDefinition="A human-readable string to clarify or explain concepts about the sample size." )
1276        protected UnsignedIntType numberOfParticipants;
1277
1278        /**
1279         * Number of participants with known results for measured variables.
1280         */
1281        @Child(name = "knownDataCount", type = {UnsignedIntType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1282        @Description(shortDefinition="Number of participants with known results for measured variables", formalDefinition="Number of participants with known results for measured variables." )
1283        protected UnsignedIntType knownDataCount;
1284
1285        private static final long serialVersionUID = -1870635979L;
1286
1287    /**
1288     * Constructor
1289     */
1290      public EvidenceStatisticSampleSizeComponent() {
1291        super();
1292      }
1293
1294        /**
1295         * @return {@link #description} (Human-readable summary of population sample size.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1296         */
1297        public StringType getDescriptionElement() { 
1298          if (this.description == null)
1299            if (Configuration.errorOnAutoCreate())
1300              throw new Error("Attempt to auto-create EvidenceStatisticSampleSizeComponent.description");
1301            else if (Configuration.doAutoCreate())
1302              this.description = new StringType(); // bb
1303          return this.description;
1304        }
1305
1306        public boolean hasDescriptionElement() { 
1307          return this.description != null && !this.description.isEmpty();
1308        }
1309
1310        public boolean hasDescription() { 
1311          return this.description != null && !this.description.isEmpty();
1312        }
1313
1314        /**
1315         * @param value {@link #description} (Human-readable summary of population sample size.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1316         */
1317        public EvidenceStatisticSampleSizeComponent setDescriptionElement(StringType value) { 
1318          this.description = value;
1319          return this;
1320        }
1321
1322        /**
1323         * @return Human-readable summary of population sample size.
1324         */
1325        public String getDescription() { 
1326          return this.description == null ? null : this.description.getValue();
1327        }
1328
1329        /**
1330         * @param value Human-readable summary of population sample size.
1331         */
1332        public EvidenceStatisticSampleSizeComponent setDescription(String value) { 
1333          if (Utilities.noString(value))
1334            this.description = null;
1335          else {
1336            if (this.description == null)
1337              this.description = new StringType();
1338            this.description.setValue(value);
1339          }
1340          return this;
1341        }
1342
1343        /**
1344         * @return {@link #note} (Footnote or explanatory note about the sample size.)
1345         */
1346        public List<Annotation> getNote() { 
1347          if (this.note == null)
1348            this.note = new ArrayList<Annotation>();
1349          return this.note;
1350        }
1351
1352        /**
1353         * @return Returns a reference to <code>this</code> for easy method chaining
1354         */
1355        public EvidenceStatisticSampleSizeComponent setNote(List<Annotation> theNote) { 
1356          this.note = theNote;
1357          return this;
1358        }
1359
1360        public boolean hasNote() { 
1361          if (this.note == null)
1362            return false;
1363          for (Annotation item : this.note)
1364            if (!item.isEmpty())
1365              return true;
1366          return false;
1367        }
1368
1369        public Annotation addNote() { //3
1370          Annotation t = new Annotation();
1371          if (this.note == null)
1372            this.note = new ArrayList<Annotation>();
1373          this.note.add(t);
1374          return t;
1375        }
1376
1377        public EvidenceStatisticSampleSizeComponent addNote(Annotation t) { //3
1378          if (t == null)
1379            return this;
1380          if (this.note == null)
1381            this.note = new ArrayList<Annotation>();
1382          this.note.add(t);
1383          return this;
1384        }
1385
1386        /**
1387         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1388         */
1389        public Annotation getNoteFirstRep() { 
1390          if (getNote().isEmpty()) {
1391            addNote();
1392          }
1393          return getNote().get(0);
1394        }
1395
1396        /**
1397         * @return {@link #numberOfStudies} (Number of participants in the population.). This is the underlying object with id, value and extensions. The accessor "getNumberOfStudies" gives direct access to the value
1398         */
1399        public UnsignedIntType getNumberOfStudiesElement() { 
1400          if (this.numberOfStudies == null)
1401            if (Configuration.errorOnAutoCreate())
1402              throw new Error("Attempt to auto-create EvidenceStatisticSampleSizeComponent.numberOfStudies");
1403            else if (Configuration.doAutoCreate())
1404              this.numberOfStudies = new UnsignedIntType(); // bb
1405          return this.numberOfStudies;
1406        }
1407
1408        public boolean hasNumberOfStudiesElement() { 
1409          return this.numberOfStudies != null && !this.numberOfStudies.isEmpty();
1410        }
1411
1412        public boolean hasNumberOfStudies() { 
1413          return this.numberOfStudies != null && !this.numberOfStudies.isEmpty();
1414        }
1415
1416        /**
1417         * @param value {@link #numberOfStudies} (Number of participants in the population.). This is the underlying object with id, value and extensions. The accessor "getNumberOfStudies" gives direct access to the value
1418         */
1419        public EvidenceStatisticSampleSizeComponent setNumberOfStudiesElement(UnsignedIntType value) { 
1420          this.numberOfStudies = value;
1421          return this;
1422        }
1423
1424        /**
1425         * @return Number of participants in the population.
1426         */
1427        public int getNumberOfStudies() { 
1428          return this.numberOfStudies == null || this.numberOfStudies.isEmpty() ? 0 : this.numberOfStudies.getValue();
1429        }
1430
1431        /**
1432         * @param value Number of participants in the population.
1433         */
1434        public EvidenceStatisticSampleSizeComponent setNumberOfStudies(int value) { 
1435            if (this.numberOfStudies == null)
1436              this.numberOfStudies = new UnsignedIntType();
1437            this.numberOfStudies.setValue(value);
1438          return this;
1439        }
1440
1441        /**
1442         * @return {@link #numberOfParticipants} (A human-readable string to clarify or explain concepts about the sample size.). This is the underlying object with id, value and extensions. The accessor "getNumberOfParticipants" gives direct access to the value
1443         */
1444        public UnsignedIntType getNumberOfParticipantsElement() { 
1445          if (this.numberOfParticipants == null)
1446            if (Configuration.errorOnAutoCreate())
1447              throw new Error("Attempt to auto-create EvidenceStatisticSampleSizeComponent.numberOfParticipants");
1448            else if (Configuration.doAutoCreate())
1449              this.numberOfParticipants = new UnsignedIntType(); // bb
1450          return this.numberOfParticipants;
1451        }
1452
1453        public boolean hasNumberOfParticipantsElement() { 
1454          return this.numberOfParticipants != null && !this.numberOfParticipants.isEmpty();
1455        }
1456
1457        public boolean hasNumberOfParticipants() { 
1458          return this.numberOfParticipants != null && !this.numberOfParticipants.isEmpty();
1459        }
1460
1461        /**
1462         * @param value {@link #numberOfParticipants} (A human-readable string to clarify or explain concepts about the sample size.). This is the underlying object with id, value and extensions. The accessor "getNumberOfParticipants" gives direct access to the value
1463         */
1464        public EvidenceStatisticSampleSizeComponent setNumberOfParticipantsElement(UnsignedIntType value) { 
1465          this.numberOfParticipants = value;
1466          return this;
1467        }
1468
1469        /**
1470         * @return A human-readable string to clarify or explain concepts about the sample size.
1471         */
1472        public int getNumberOfParticipants() { 
1473          return this.numberOfParticipants == null || this.numberOfParticipants.isEmpty() ? 0 : this.numberOfParticipants.getValue();
1474        }
1475
1476        /**
1477         * @param value A human-readable string to clarify or explain concepts about the sample size.
1478         */
1479        public EvidenceStatisticSampleSizeComponent setNumberOfParticipants(int value) { 
1480            if (this.numberOfParticipants == null)
1481              this.numberOfParticipants = new UnsignedIntType();
1482            this.numberOfParticipants.setValue(value);
1483          return this;
1484        }
1485
1486        /**
1487         * @return {@link #knownDataCount} (Number of participants with known results for measured variables.). This is the underlying object with id, value and extensions. The accessor "getKnownDataCount" gives direct access to the value
1488         */
1489        public UnsignedIntType getKnownDataCountElement() { 
1490          if (this.knownDataCount == null)
1491            if (Configuration.errorOnAutoCreate())
1492              throw new Error("Attempt to auto-create EvidenceStatisticSampleSizeComponent.knownDataCount");
1493            else if (Configuration.doAutoCreate())
1494              this.knownDataCount = new UnsignedIntType(); // bb
1495          return this.knownDataCount;
1496        }
1497
1498        public boolean hasKnownDataCountElement() { 
1499          return this.knownDataCount != null && !this.knownDataCount.isEmpty();
1500        }
1501
1502        public boolean hasKnownDataCount() { 
1503          return this.knownDataCount != null && !this.knownDataCount.isEmpty();
1504        }
1505
1506        /**
1507         * @param value {@link #knownDataCount} (Number of participants with known results for measured variables.). This is the underlying object with id, value and extensions. The accessor "getKnownDataCount" gives direct access to the value
1508         */
1509        public EvidenceStatisticSampleSizeComponent setKnownDataCountElement(UnsignedIntType value) { 
1510          this.knownDataCount = value;
1511          return this;
1512        }
1513
1514        /**
1515         * @return Number of participants with known results for measured variables.
1516         */
1517        public int getKnownDataCount() { 
1518          return this.knownDataCount == null || this.knownDataCount.isEmpty() ? 0 : this.knownDataCount.getValue();
1519        }
1520
1521        /**
1522         * @param value Number of participants with known results for measured variables.
1523         */
1524        public EvidenceStatisticSampleSizeComponent setKnownDataCount(int value) { 
1525            if (this.knownDataCount == null)
1526              this.knownDataCount = new UnsignedIntType();
1527            this.knownDataCount.setValue(value);
1528          return this;
1529        }
1530
1531        protected void listChildren(List<Property> children) {
1532          super.listChildren(children);
1533          children.add(new Property("description", "string", "Human-readable summary of population sample size.", 0, 1, description));
1534          children.add(new Property("note", "Annotation", "Footnote or explanatory note about the sample size.", 0, java.lang.Integer.MAX_VALUE, note));
1535          children.add(new Property("numberOfStudies", "unsignedInt", "Number of participants in the population.", 0, 1, numberOfStudies));
1536          children.add(new Property("numberOfParticipants", "unsignedInt", "A human-readable string to clarify or explain concepts about the sample size.", 0, 1, numberOfParticipants));
1537          children.add(new Property("knownDataCount", "unsignedInt", "Number of participants with known results for measured variables.", 0, 1, knownDataCount));
1538        }
1539
1540        @Override
1541        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1542          switch (_hash) {
1543          case -1724546052: /*description*/  return new Property("description", "string", "Human-readable summary of population sample size.", 0, 1, description);
1544          case 3387378: /*note*/  return new Property("note", "Annotation", "Footnote or explanatory note about the sample size.", 0, java.lang.Integer.MAX_VALUE, note);
1545          case -177467129: /*numberOfStudies*/  return new Property("numberOfStudies", "unsignedInt", "Number of participants in the population.", 0, 1, numberOfStudies);
1546          case 1799357120: /*numberOfParticipants*/  return new Property("numberOfParticipants", "unsignedInt", "A human-readable string to clarify or explain concepts about the sample size.", 0, 1, numberOfParticipants);
1547          case -937344126: /*knownDataCount*/  return new Property("knownDataCount", "unsignedInt", "Number of participants with known results for measured variables.", 0, 1, knownDataCount);
1548          default: return super.getNamedProperty(_hash, _name, _checkValid);
1549          }
1550
1551        }
1552
1553      @Override
1554      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1555        switch (hash) {
1556        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1557        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1558        case -177467129: /*numberOfStudies*/ return this.numberOfStudies == null ? new Base[0] : new Base[] {this.numberOfStudies}; // UnsignedIntType
1559        case 1799357120: /*numberOfParticipants*/ return this.numberOfParticipants == null ? new Base[0] : new Base[] {this.numberOfParticipants}; // UnsignedIntType
1560        case -937344126: /*knownDataCount*/ return this.knownDataCount == null ? new Base[0] : new Base[] {this.knownDataCount}; // UnsignedIntType
1561        default: return super.getProperty(hash, name, checkValid);
1562        }
1563
1564      }
1565
1566      @Override
1567      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1568        switch (hash) {
1569        case -1724546052: // description
1570          this.description = TypeConvertor.castToString(value); // StringType
1571          return value;
1572        case 3387378: // note
1573          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1574          return value;
1575        case -177467129: // numberOfStudies
1576          this.numberOfStudies = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1577          return value;
1578        case 1799357120: // numberOfParticipants
1579          this.numberOfParticipants = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1580          return value;
1581        case -937344126: // knownDataCount
1582          this.knownDataCount = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1583          return value;
1584        default: return super.setProperty(hash, name, value);
1585        }
1586
1587      }
1588
1589      @Override
1590      public Base setProperty(String name, Base value) throws FHIRException {
1591        if (name.equals("description")) {
1592          this.description = TypeConvertor.castToString(value); // StringType
1593        } else if (name.equals("note")) {
1594          this.getNote().add(TypeConvertor.castToAnnotation(value));
1595        } else if (name.equals("numberOfStudies")) {
1596          this.numberOfStudies = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1597        } else if (name.equals("numberOfParticipants")) {
1598          this.numberOfParticipants = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1599        } else if (name.equals("knownDataCount")) {
1600          this.knownDataCount = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1601        } else
1602          return super.setProperty(name, value);
1603        return value;
1604      }
1605
1606      @Override
1607      public Base makeProperty(int hash, String name) throws FHIRException {
1608        switch (hash) {
1609        case -1724546052:  return getDescriptionElement();
1610        case 3387378:  return addNote(); 
1611        case -177467129:  return getNumberOfStudiesElement();
1612        case 1799357120:  return getNumberOfParticipantsElement();
1613        case -937344126:  return getKnownDataCountElement();
1614        default: return super.makeProperty(hash, name);
1615        }
1616
1617      }
1618
1619      @Override
1620      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1621        switch (hash) {
1622        case -1724546052: /*description*/ return new String[] {"string"};
1623        case 3387378: /*note*/ return new String[] {"Annotation"};
1624        case -177467129: /*numberOfStudies*/ return new String[] {"unsignedInt"};
1625        case 1799357120: /*numberOfParticipants*/ return new String[] {"unsignedInt"};
1626        case -937344126: /*knownDataCount*/ return new String[] {"unsignedInt"};
1627        default: return super.getTypesForProperty(hash, name);
1628        }
1629
1630      }
1631
1632      @Override
1633      public Base addChild(String name) throws FHIRException {
1634        if (name.equals("description")) {
1635          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.sampleSize.description");
1636        }
1637        else if (name.equals("note")) {
1638          return addNote();
1639        }
1640        else if (name.equals("numberOfStudies")) {
1641          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.sampleSize.numberOfStudies");
1642        }
1643        else if (name.equals("numberOfParticipants")) {
1644          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.sampleSize.numberOfParticipants");
1645        }
1646        else if (name.equals("knownDataCount")) {
1647          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.sampleSize.knownDataCount");
1648        }
1649        else
1650          return super.addChild(name);
1651      }
1652
1653      public EvidenceStatisticSampleSizeComponent copy() {
1654        EvidenceStatisticSampleSizeComponent dst = new EvidenceStatisticSampleSizeComponent();
1655        copyValues(dst);
1656        return dst;
1657      }
1658
1659      public void copyValues(EvidenceStatisticSampleSizeComponent dst) {
1660        super.copyValues(dst);
1661        dst.description = description == null ? null : description.copy();
1662        if (note != null) {
1663          dst.note = new ArrayList<Annotation>();
1664          for (Annotation i : note)
1665            dst.note.add(i.copy());
1666        };
1667        dst.numberOfStudies = numberOfStudies == null ? null : numberOfStudies.copy();
1668        dst.numberOfParticipants = numberOfParticipants == null ? null : numberOfParticipants.copy();
1669        dst.knownDataCount = knownDataCount == null ? null : knownDataCount.copy();
1670      }
1671
1672      @Override
1673      public boolean equalsDeep(Base other_) {
1674        if (!super.equalsDeep(other_))
1675          return false;
1676        if (!(other_ instanceof EvidenceStatisticSampleSizeComponent))
1677          return false;
1678        EvidenceStatisticSampleSizeComponent o = (EvidenceStatisticSampleSizeComponent) other_;
1679        return compareDeep(description, o.description, true) && compareDeep(note, o.note, true) && compareDeep(numberOfStudies, o.numberOfStudies, true)
1680           && compareDeep(numberOfParticipants, o.numberOfParticipants, true) && compareDeep(knownDataCount, o.knownDataCount, true)
1681          ;
1682      }
1683
1684      @Override
1685      public boolean equalsShallow(Base other_) {
1686        if (!super.equalsShallow(other_))
1687          return false;
1688        if (!(other_ instanceof EvidenceStatisticSampleSizeComponent))
1689          return false;
1690        EvidenceStatisticSampleSizeComponent o = (EvidenceStatisticSampleSizeComponent) other_;
1691        return compareValues(description, o.description, true) && compareValues(numberOfStudies, o.numberOfStudies, true)
1692           && compareValues(numberOfParticipants, o.numberOfParticipants, true) && compareValues(knownDataCount, o.knownDataCount, true)
1693          ;
1694      }
1695
1696      public boolean isEmpty() {
1697        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, note, numberOfStudies
1698          , numberOfParticipants, knownDataCount);
1699      }
1700
1701  public String fhirType() {
1702    return "Evidence.statistic.sampleSize";
1703
1704  }
1705
1706  }
1707
1708    @Block()
1709    public static class EvidenceStatisticAttributeEstimateComponent extends BackboneElement implements IBaseBackboneElement {
1710        /**
1711         * Human-readable summary of the estimate.
1712         */
1713        @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
1714        @Description(shortDefinition="Textual description of the attribute estimate", formalDefinition="Human-readable summary of the estimate." )
1715        protected StringType description;
1716
1717        /**
1718         * Footnote or explanatory note about the estimate.
1719         */
1720        @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1721        @Description(shortDefinition="Footnote or explanatory note about the estimate", formalDefinition="Footnote or explanatory note about the estimate." )
1722        protected List<Annotation> note;
1723
1724        /**
1725         * The type of attribute estimate, e.g., confidence interval or p value.
1726         */
1727        @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
1728        @Description(shortDefinition="The type of attribute estimate, e.g., confidence interval or p value", formalDefinition="The type of attribute estimate, e.g., confidence interval or p value." )
1729        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/attribute-estimate-type")
1730        protected CodeableConcept type;
1731
1732        /**
1733         * The singular quantity of the attribute estimate, for attribute estimates represented as single values; also used to report unit of measure.
1734         */
1735        @Child(name = "quantity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=false)
1736        @Description(shortDefinition="The singular quantity of the attribute estimate, for attribute estimates represented as single values; also used to report unit of measure", formalDefinition="The singular quantity of the attribute estimate, for attribute estimates represented as single values; also used to report unit of measure." )
1737        protected Quantity quantity;
1738
1739        /**
1740         * Use 95 for a 95% confidence interval.
1741         */
1742        @Child(name = "level", type = {DecimalType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1743        @Description(shortDefinition="Level of confidence interval, e.g., 0.95 for 95% confidence interval", formalDefinition="Use 95 for a 95% confidence interval." )
1744        protected DecimalType level;
1745
1746        /**
1747         * Lower bound of confidence interval.
1748         */
1749        @Child(name = "range", type = {Range.class}, order=6, min=0, max=1, modifier=false, summary=false)
1750        @Description(shortDefinition="Lower and upper bound values of the attribute estimate", formalDefinition="Lower bound of confidence interval." )
1751        protected Range range;
1752
1753        /**
1754         * A nested attribute estimate; which is the attribute estimate of an attribute estimate.
1755         */
1756        @Child(name = "attributeEstimate", type = {EvidenceStatisticAttributeEstimateComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1757        @Description(shortDefinition="A nested attribute estimate; which is the attribute estimate of an attribute estimate", formalDefinition="A nested attribute estimate; which is the attribute estimate of an attribute estimate." )
1758        protected List<EvidenceStatisticAttributeEstimateComponent> attributeEstimate;
1759
1760        private static final long serialVersionUID = -1654630186L;
1761
1762    /**
1763     * Constructor
1764     */
1765      public EvidenceStatisticAttributeEstimateComponent() {
1766        super();
1767      }
1768
1769        /**
1770         * @return {@link #description} (Human-readable summary of the estimate.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1771         */
1772        public StringType getDescriptionElement() { 
1773          if (this.description == null)
1774            if (Configuration.errorOnAutoCreate())
1775              throw new Error("Attempt to auto-create EvidenceStatisticAttributeEstimateComponent.description");
1776            else if (Configuration.doAutoCreate())
1777              this.description = new StringType(); // bb
1778          return this.description;
1779        }
1780
1781        public boolean hasDescriptionElement() { 
1782          return this.description != null && !this.description.isEmpty();
1783        }
1784
1785        public boolean hasDescription() { 
1786          return this.description != null && !this.description.isEmpty();
1787        }
1788
1789        /**
1790         * @param value {@link #description} (Human-readable summary of the estimate.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1791         */
1792        public EvidenceStatisticAttributeEstimateComponent setDescriptionElement(StringType value) { 
1793          this.description = value;
1794          return this;
1795        }
1796
1797        /**
1798         * @return Human-readable summary of the estimate.
1799         */
1800        public String getDescription() { 
1801          return this.description == null ? null : this.description.getValue();
1802        }
1803
1804        /**
1805         * @param value Human-readable summary of the estimate.
1806         */
1807        public EvidenceStatisticAttributeEstimateComponent setDescription(String value) { 
1808          if (Utilities.noString(value))
1809            this.description = null;
1810          else {
1811            if (this.description == null)
1812              this.description = new StringType();
1813            this.description.setValue(value);
1814          }
1815          return this;
1816        }
1817
1818        /**
1819         * @return {@link #note} (Footnote or explanatory note about the estimate.)
1820         */
1821        public List<Annotation> getNote() { 
1822          if (this.note == null)
1823            this.note = new ArrayList<Annotation>();
1824          return this.note;
1825        }
1826
1827        /**
1828         * @return Returns a reference to <code>this</code> for easy method chaining
1829         */
1830        public EvidenceStatisticAttributeEstimateComponent setNote(List<Annotation> theNote) { 
1831          this.note = theNote;
1832          return this;
1833        }
1834
1835        public boolean hasNote() { 
1836          if (this.note == null)
1837            return false;
1838          for (Annotation item : this.note)
1839            if (!item.isEmpty())
1840              return true;
1841          return false;
1842        }
1843
1844        public Annotation addNote() { //3
1845          Annotation t = new Annotation();
1846          if (this.note == null)
1847            this.note = new ArrayList<Annotation>();
1848          this.note.add(t);
1849          return t;
1850        }
1851
1852        public EvidenceStatisticAttributeEstimateComponent addNote(Annotation t) { //3
1853          if (t == null)
1854            return this;
1855          if (this.note == null)
1856            this.note = new ArrayList<Annotation>();
1857          this.note.add(t);
1858          return this;
1859        }
1860
1861        /**
1862         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1863         */
1864        public Annotation getNoteFirstRep() { 
1865          if (getNote().isEmpty()) {
1866            addNote();
1867          }
1868          return getNote().get(0);
1869        }
1870
1871        /**
1872         * @return {@link #type} (The type of attribute estimate, e.g., confidence interval or p value.)
1873         */
1874        public CodeableConcept getType() { 
1875          if (this.type == null)
1876            if (Configuration.errorOnAutoCreate())
1877              throw new Error("Attempt to auto-create EvidenceStatisticAttributeEstimateComponent.type");
1878            else if (Configuration.doAutoCreate())
1879              this.type = new CodeableConcept(); // cc
1880          return this.type;
1881        }
1882
1883        public boolean hasType() { 
1884          return this.type != null && !this.type.isEmpty();
1885        }
1886
1887        /**
1888         * @param value {@link #type} (The type of attribute estimate, e.g., confidence interval or p value.)
1889         */
1890        public EvidenceStatisticAttributeEstimateComponent setType(CodeableConcept value) { 
1891          this.type = value;
1892          return this;
1893        }
1894
1895        /**
1896         * @return {@link #quantity} (The singular quantity of the attribute estimate, for attribute estimates represented as single values; also used to report unit of measure.)
1897         */
1898        public Quantity getQuantity() { 
1899          if (this.quantity == null)
1900            if (Configuration.errorOnAutoCreate())
1901              throw new Error("Attempt to auto-create EvidenceStatisticAttributeEstimateComponent.quantity");
1902            else if (Configuration.doAutoCreate())
1903              this.quantity = new Quantity(); // cc
1904          return this.quantity;
1905        }
1906
1907        public boolean hasQuantity() { 
1908          return this.quantity != null && !this.quantity.isEmpty();
1909        }
1910
1911        /**
1912         * @param value {@link #quantity} (The singular quantity of the attribute estimate, for attribute estimates represented as single values; also used to report unit of measure.)
1913         */
1914        public EvidenceStatisticAttributeEstimateComponent setQuantity(Quantity value) { 
1915          this.quantity = value;
1916          return this;
1917        }
1918
1919        /**
1920         * @return {@link #level} (Use 95 for a 95% confidence interval.). This is the underlying object with id, value and extensions. The accessor "getLevel" gives direct access to the value
1921         */
1922        public DecimalType getLevelElement() { 
1923          if (this.level == null)
1924            if (Configuration.errorOnAutoCreate())
1925              throw new Error("Attempt to auto-create EvidenceStatisticAttributeEstimateComponent.level");
1926            else if (Configuration.doAutoCreate())
1927              this.level = new DecimalType(); // bb
1928          return this.level;
1929        }
1930
1931        public boolean hasLevelElement() { 
1932          return this.level != null && !this.level.isEmpty();
1933        }
1934
1935        public boolean hasLevel() { 
1936          return this.level != null && !this.level.isEmpty();
1937        }
1938
1939        /**
1940         * @param value {@link #level} (Use 95 for a 95% confidence interval.). This is the underlying object with id, value and extensions. The accessor "getLevel" gives direct access to the value
1941         */
1942        public EvidenceStatisticAttributeEstimateComponent setLevelElement(DecimalType value) { 
1943          this.level = value;
1944          return this;
1945        }
1946
1947        /**
1948         * @return Use 95 for a 95% confidence interval.
1949         */
1950        public BigDecimal getLevel() { 
1951          return this.level == null ? null : this.level.getValue();
1952        }
1953
1954        /**
1955         * @param value Use 95 for a 95% confidence interval.
1956         */
1957        public EvidenceStatisticAttributeEstimateComponent setLevel(BigDecimal value) { 
1958          if (value == null)
1959            this.level = null;
1960          else {
1961            if (this.level == null)
1962              this.level = new DecimalType();
1963            this.level.setValue(value);
1964          }
1965          return this;
1966        }
1967
1968        /**
1969         * @param value Use 95 for a 95% confidence interval.
1970         */
1971        public EvidenceStatisticAttributeEstimateComponent setLevel(long value) { 
1972              this.level = new DecimalType();
1973            this.level.setValue(value);
1974          return this;
1975        }
1976
1977        /**
1978         * @param value Use 95 for a 95% confidence interval.
1979         */
1980        public EvidenceStatisticAttributeEstimateComponent setLevel(double value) { 
1981              this.level = new DecimalType();
1982            this.level.setValue(value);
1983          return this;
1984        }
1985
1986        /**
1987         * @return {@link #range} (Lower bound of confidence interval.)
1988         */
1989        public Range getRange() { 
1990          if (this.range == null)
1991            if (Configuration.errorOnAutoCreate())
1992              throw new Error("Attempt to auto-create EvidenceStatisticAttributeEstimateComponent.range");
1993            else if (Configuration.doAutoCreate())
1994              this.range = new Range(); // cc
1995          return this.range;
1996        }
1997
1998        public boolean hasRange() { 
1999          return this.range != null && !this.range.isEmpty();
2000        }
2001
2002        /**
2003         * @param value {@link #range} (Lower bound of confidence interval.)
2004         */
2005        public EvidenceStatisticAttributeEstimateComponent setRange(Range value) { 
2006          this.range = value;
2007          return this;
2008        }
2009
2010        /**
2011         * @return {@link #attributeEstimate} (A nested attribute estimate; which is the attribute estimate of an attribute estimate.)
2012         */
2013        public List<EvidenceStatisticAttributeEstimateComponent> getAttributeEstimate() { 
2014          if (this.attributeEstimate == null)
2015            this.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
2016          return this.attributeEstimate;
2017        }
2018
2019        /**
2020         * @return Returns a reference to <code>this</code> for easy method chaining
2021         */
2022        public EvidenceStatisticAttributeEstimateComponent setAttributeEstimate(List<EvidenceStatisticAttributeEstimateComponent> theAttributeEstimate) { 
2023          this.attributeEstimate = theAttributeEstimate;
2024          return this;
2025        }
2026
2027        public boolean hasAttributeEstimate() { 
2028          if (this.attributeEstimate == null)
2029            return false;
2030          for (EvidenceStatisticAttributeEstimateComponent item : this.attributeEstimate)
2031            if (!item.isEmpty())
2032              return true;
2033          return false;
2034        }
2035
2036        public EvidenceStatisticAttributeEstimateComponent addAttributeEstimate() { //3
2037          EvidenceStatisticAttributeEstimateComponent t = new EvidenceStatisticAttributeEstimateComponent();
2038          if (this.attributeEstimate == null)
2039            this.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
2040          this.attributeEstimate.add(t);
2041          return t;
2042        }
2043
2044        public EvidenceStatisticAttributeEstimateComponent addAttributeEstimate(EvidenceStatisticAttributeEstimateComponent t) { //3
2045          if (t == null)
2046            return this;
2047          if (this.attributeEstimate == null)
2048            this.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
2049          this.attributeEstimate.add(t);
2050          return this;
2051        }
2052
2053        /**
2054         * @return The first repetition of repeating field {@link #attributeEstimate}, creating it if it does not already exist {3}
2055         */
2056        public EvidenceStatisticAttributeEstimateComponent getAttributeEstimateFirstRep() { 
2057          if (getAttributeEstimate().isEmpty()) {
2058            addAttributeEstimate();
2059          }
2060          return getAttributeEstimate().get(0);
2061        }
2062
2063        protected void listChildren(List<Property> children) {
2064          super.listChildren(children);
2065          children.add(new Property("description", "string", "Human-readable summary of the estimate.", 0, 1, description));
2066          children.add(new Property("note", "Annotation", "Footnote or explanatory note about the estimate.", 0, java.lang.Integer.MAX_VALUE, note));
2067          children.add(new Property("type", "CodeableConcept", "The type of attribute estimate, e.g., confidence interval or p value.", 0, 1, type));
2068          children.add(new Property("quantity", "Quantity", "The singular quantity of the attribute estimate, for attribute estimates represented as single values; also used to report unit of measure.", 0, 1, quantity));
2069          children.add(new Property("level", "decimal", "Use 95 for a 95% confidence interval.", 0, 1, level));
2070          children.add(new Property("range", "Range", "Lower bound of confidence interval.", 0, 1, range));
2071          children.add(new Property("attributeEstimate", "@Evidence.statistic.attributeEstimate", "A nested attribute estimate; which is the attribute estimate of an attribute estimate.", 0, java.lang.Integer.MAX_VALUE, attributeEstimate));
2072        }
2073
2074        @Override
2075        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2076          switch (_hash) {
2077          case -1724546052: /*description*/  return new Property("description", "string", "Human-readable summary of the estimate.", 0, 1, description);
2078          case 3387378: /*note*/  return new Property("note", "Annotation", "Footnote or explanatory note about the estimate.", 0, java.lang.Integer.MAX_VALUE, note);
2079          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The type of attribute estimate, e.g., confidence interval or p value.", 0, 1, type);
2080          case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "The singular quantity of the attribute estimate, for attribute estimates represented as single values; also used to report unit of measure.", 0, 1, quantity);
2081          case 102865796: /*level*/  return new Property("level", "decimal", "Use 95 for a 95% confidence interval.", 0, 1, level);
2082          case 108280125: /*range*/  return new Property("range", "Range", "Lower bound of confidence interval.", 0, 1, range);
2083          case -1539581980: /*attributeEstimate*/  return new Property("attributeEstimate", "@Evidence.statistic.attributeEstimate", "A nested attribute estimate; which is the attribute estimate of an attribute estimate.", 0, java.lang.Integer.MAX_VALUE, attributeEstimate);
2084          default: return super.getNamedProperty(_hash, _name, _checkValid);
2085          }
2086
2087        }
2088
2089      @Override
2090      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2091        switch (hash) {
2092        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
2093        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
2094        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
2095        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
2096        case 102865796: /*level*/ return this.level == null ? new Base[0] : new Base[] {this.level}; // DecimalType
2097        case 108280125: /*range*/ return this.range == null ? new Base[0] : new Base[] {this.range}; // Range
2098        case -1539581980: /*attributeEstimate*/ return this.attributeEstimate == null ? new Base[0] : this.attributeEstimate.toArray(new Base[this.attributeEstimate.size()]); // EvidenceStatisticAttributeEstimateComponent
2099        default: return super.getProperty(hash, name, checkValid);
2100        }
2101
2102      }
2103
2104      @Override
2105      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2106        switch (hash) {
2107        case -1724546052: // description
2108          this.description = TypeConvertor.castToString(value); // StringType
2109          return value;
2110        case 3387378: // note
2111          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
2112          return value;
2113        case 3575610: // type
2114          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2115          return value;
2116        case -1285004149: // quantity
2117          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
2118          return value;
2119        case 102865796: // level
2120          this.level = TypeConvertor.castToDecimal(value); // DecimalType
2121          return value;
2122        case 108280125: // range
2123          this.range = TypeConvertor.castToRange(value); // Range
2124          return value;
2125        case -1539581980: // attributeEstimate
2126          this.getAttributeEstimate().add((EvidenceStatisticAttributeEstimateComponent) value); // EvidenceStatisticAttributeEstimateComponent
2127          return value;
2128        default: return super.setProperty(hash, name, value);
2129        }
2130
2131      }
2132
2133      @Override
2134      public Base setProperty(String name, Base value) throws FHIRException {
2135        if (name.equals("description")) {
2136          this.description = TypeConvertor.castToString(value); // StringType
2137        } else if (name.equals("note")) {
2138          this.getNote().add(TypeConvertor.castToAnnotation(value));
2139        } else if (name.equals("type")) {
2140          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2141        } else if (name.equals("quantity")) {
2142          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
2143        } else if (name.equals("level")) {
2144          this.level = TypeConvertor.castToDecimal(value); // DecimalType
2145        } else if (name.equals("range")) {
2146          this.range = TypeConvertor.castToRange(value); // Range
2147        } else if (name.equals("attributeEstimate")) {
2148          this.getAttributeEstimate().add((EvidenceStatisticAttributeEstimateComponent) value);
2149        } else
2150          return super.setProperty(name, value);
2151        return value;
2152      }
2153
2154      @Override
2155      public Base makeProperty(int hash, String name) throws FHIRException {
2156        switch (hash) {
2157        case -1724546052:  return getDescriptionElement();
2158        case 3387378:  return addNote(); 
2159        case 3575610:  return getType();
2160        case -1285004149:  return getQuantity();
2161        case 102865796:  return getLevelElement();
2162        case 108280125:  return getRange();
2163        case -1539581980:  return addAttributeEstimate(); 
2164        default: return super.makeProperty(hash, name);
2165        }
2166
2167      }
2168
2169      @Override
2170      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2171        switch (hash) {
2172        case -1724546052: /*description*/ return new String[] {"string"};
2173        case 3387378: /*note*/ return new String[] {"Annotation"};
2174        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
2175        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
2176        case 102865796: /*level*/ return new String[] {"decimal"};
2177        case 108280125: /*range*/ return new String[] {"Range"};
2178        case -1539581980: /*attributeEstimate*/ return new String[] {"@Evidence.statistic.attributeEstimate"};
2179        default: return super.getTypesForProperty(hash, name);
2180        }
2181
2182      }
2183
2184      @Override
2185      public Base addChild(String name) throws FHIRException {
2186        if (name.equals("description")) {
2187          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.attributeEstimate.description");
2188        }
2189        else if (name.equals("note")) {
2190          return addNote();
2191        }
2192        else if (name.equals("type")) {
2193          this.type = new CodeableConcept();
2194          return this.type;
2195        }
2196        else if (name.equals("quantity")) {
2197          this.quantity = new Quantity();
2198          return this.quantity;
2199        }
2200        else if (name.equals("level")) {
2201          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.attributeEstimate.level");
2202        }
2203        else if (name.equals("range")) {
2204          this.range = new Range();
2205          return this.range;
2206        }
2207        else if (name.equals("attributeEstimate")) {
2208          return addAttributeEstimate();
2209        }
2210        else
2211          return super.addChild(name);
2212      }
2213
2214      public EvidenceStatisticAttributeEstimateComponent copy() {
2215        EvidenceStatisticAttributeEstimateComponent dst = new EvidenceStatisticAttributeEstimateComponent();
2216        copyValues(dst);
2217        return dst;
2218      }
2219
2220      public void copyValues(EvidenceStatisticAttributeEstimateComponent dst) {
2221        super.copyValues(dst);
2222        dst.description = description == null ? null : description.copy();
2223        if (note != null) {
2224          dst.note = new ArrayList<Annotation>();
2225          for (Annotation i : note)
2226            dst.note.add(i.copy());
2227        };
2228        dst.type = type == null ? null : type.copy();
2229        dst.quantity = quantity == null ? null : quantity.copy();
2230        dst.level = level == null ? null : level.copy();
2231        dst.range = range == null ? null : range.copy();
2232        if (attributeEstimate != null) {
2233          dst.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
2234          for (EvidenceStatisticAttributeEstimateComponent i : attributeEstimate)
2235            dst.attributeEstimate.add(i.copy());
2236        };
2237      }
2238
2239      @Override
2240      public boolean equalsDeep(Base other_) {
2241        if (!super.equalsDeep(other_))
2242          return false;
2243        if (!(other_ instanceof EvidenceStatisticAttributeEstimateComponent))
2244          return false;
2245        EvidenceStatisticAttributeEstimateComponent o = (EvidenceStatisticAttributeEstimateComponent) other_;
2246        return compareDeep(description, o.description, true) && compareDeep(note, o.note, true) && compareDeep(type, o.type, true)
2247           && compareDeep(quantity, o.quantity, true) && compareDeep(level, o.level, true) && compareDeep(range, o.range, true)
2248           && compareDeep(attributeEstimate, o.attributeEstimate, true);
2249      }
2250
2251      @Override
2252      public boolean equalsShallow(Base other_) {
2253        if (!super.equalsShallow(other_))
2254          return false;
2255        if (!(other_ instanceof EvidenceStatisticAttributeEstimateComponent))
2256          return false;
2257        EvidenceStatisticAttributeEstimateComponent o = (EvidenceStatisticAttributeEstimateComponent) other_;
2258        return compareValues(description, o.description, true) && compareValues(level, o.level, true);
2259      }
2260
2261      public boolean isEmpty() {
2262        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, note, type
2263          , quantity, level, range, attributeEstimate);
2264      }
2265
2266  public String fhirType() {
2267    return "Evidence.statistic.attributeEstimate";
2268
2269  }
2270
2271  }
2272
2273    @Block()
2274    public static class EvidenceStatisticModelCharacteristicComponent extends BackboneElement implements IBaseBackboneElement {
2275        /**
2276         * Description of a component of the method to generate the statistic.
2277         */
2278        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
2279        @Description(shortDefinition="Model specification", formalDefinition="Description of a component of the method to generate the statistic." )
2280        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/statistic-model-code")
2281        protected CodeableConcept code;
2282
2283        /**
2284         * Further specification of the quantified value of the component of the method to generate the statistic.
2285         */
2286        @Child(name = "value", type = {Quantity.class}, order=2, min=0, max=1, modifier=false, summary=false)
2287        @Description(shortDefinition="Numerical value to complete model specification", formalDefinition="Further specification of the quantified value of the component of the method to generate the statistic." )
2288        protected Quantity value;
2289
2290        /**
2291         * A variable adjusted for in the adjusted analysis.
2292         */
2293        @Child(name = "variable", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2294        @Description(shortDefinition="A variable adjusted for in the adjusted analysis", formalDefinition="A variable adjusted for in the adjusted analysis." )
2295        protected List<EvidenceStatisticModelCharacteristicVariableComponent> variable;
2296
2297        /**
2298         * An attribute of the statistic used as a model characteristic.
2299         */
2300        @Child(name = "attributeEstimate", type = {EvidenceStatisticAttributeEstimateComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2301        @Description(shortDefinition="An attribute of the statistic used as a model characteristic", formalDefinition="An attribute of the statistic used as a model characteristic." )
2302        protected List<EvidenceStatisticAttributeEstimateComponent> attributeEstimate;
2303
2304        private static final long serialVersionUID = 1787793468L;
2305
2306    /**
2307     * Constructor
2308     */
2309      public EvidenceStatisticModelCharacteristicComponent() {
2310        super();
2311      }
2312
2313    /**
2314     * Constructor
2315     */
2316      public EvidenceStatisticModelCharacteristicComponent(CodeableConcept code) {
2317        super();
2318        this.setCode(code);
2319      }
2320
2321        /**
2322         * @return {@link #code} (Description of a component of the method to generate the statistic.)
2323         */
2324        public CodeableConcept getCode() { 
2325          if (this.code == null)
2326            if (Configuration.errorOnAutoCreate())
2327              throw new Error("Attempt to auto-create EvidenceStatisticModelCharacteristicComponent.code");
2328            else if (Configuration.doAutoCreate())
2329              this.code = new CodeableConcept(); // cc
2330          return this.code;
2331        }
2332
2333        public boolean hasCode() { 
2334          return this.code != null && !this.code.isEmpty();
2335        }
2336
2337        /**
2338         * @param value {@link #code} (Description of a component of the method to generate the statistic.)
2339         */
2340        public EvidenceStatisticModelCharacteristicComponent setCode(CodeableConcept value) { 
2341          this.code = value;
2342          return this;
2343        }
2344
2345        /**
2346         * @return {@link #value} (Further specification of the quantified value of the component of the method to generate the statistic.)
2347         */
2348        public Quantity getValue() { 
2349          if (this.value == null)
2350            if (Configuration.errorOnAutoCreate())
2351              throw new Error("Attempt to auto-create EvidenceStatisticModelCharacteristicComponent.value");
2352            else if (Configuration.doAutoCreate())
2353              this.value = new Quantity(); // cc
2354          return this.value;
2355        }
2356
2357        public boolean hasValue() { 
2358          return this.value != null && !this.value.isEmpty();
2359        }
2360
2361        /**
2362         * @param value {@link #value} (Further specification of the quantified value of the component of the method to generate the statistic.)
2363         */
2364        public EvidenceStatisticModelCharacteristicComponent setValue(Quantity value) { 
2365          this.value = value;
2366          return this;
2367        }
2368
2369        /**
2370         * @return {@link #variable} (A variable adjusted for in the adjusted analysis.)
2371         */
2372        public List<EvidenceStatisticModelCharacteristicVariableComponent> getVariable() { 
2373          if (this.variable == null)
2374            this.variable = new ArrayList<EvidenceStatisticModelCharacteristicVariableComponent>();
2375          return this.variable;
2376        }
2377
2378        /**
2379         * @return Returns a reference to <code>this</code> for easy method chaining
2380         */
2381        public EvidenceStatisticModelCharacteristicComponent setVariable(List<EvidenceStatisticModelCharacteristicVariableComponent> theVariable) { 
2382          this.variable = theVariable;
2383          return this;
2384        }
2385
2386        public boolean hasVariable() { 
2387          if (this.variable == null)
2388            return false;
2389          for (EvidenceStatisticModelCharacteristicVariableComponent item : this.variable)
2390            if (!item.isEmpty())
2391              return true;
2392          return false;
2393        }
2394
2395        public EvidenceStatisticModelCharacteristicVariableComponent addVariable() { //3
2396          EvidenceStatisticModelCharacteristicVariableComponent t = new EvidenceStatisticModelCharacteristicVariableComponent();
2397          if (this.variable == null)
2398            this.variable = new ArrayList<EvidenceStatisticModelCharacteristicVariableComponent>();
2399          this.variable.add(t);
2400          return t;
2401        }
2402
2403        public EvidenceStatisticModelCharacteristicComponent addVariable(EvidenceStatisticModelCharacteristicVariableComponent t) { //3
2404          if (t == null)
2405            return this;
2406          if (this.variable == null)
2407            this.variable = new ArrayList<EvidenceStatisticModelCharacteristicVariableComponent>();
2408          this.variable.add(t);
2409          return this;
2410        }
2411
2412        /**
2413         * @return The first repetition of repeating field {@link #variable}, creating it if it does not already exist {3}
2414         */
2415        public EvidenceStatisticModelCharacteristicVariableComponent getVariableFirstRep() { 
2416          if (getVariable().isEmpty()) {
2417            addVariable();
2418          }
2419          return getVariable().get(0);
2420        }
2421
2422        /**
2423         * @return {@link #attributeEstimate} (An attribute of the statistic used as a model characteristic.)
2424         */
2425        public List<EvidenceStatisticAttributeEstimateComponent> getAttributeEstimate() { 
2426          if (this.attributeEstimate == null)
2427            this.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
2428          return this.attributeEstimate;
2429        }
2430
2431        /**
2432         * @return Returns a reference to <code>this</code> for easy method chaining
2433         */
2434        public EvidenceStatisticModelCharacteristicComponent setAttributeEstimate(List<EvidenceStatisticAttributeEstimateComponent> theAttributeEstimate) { 
2435          this.attributeEstimate = theAttributeEstimate;
2436          return this;
2437        }
2438
2439        public boolean hasAttributeEstimate() { 
2440          if (this.attributeEstimate == null)
2441            return false;
2442          for (EvidenceStatisticAttributeEstimateComponent item : this.attributeEstimate)
2443            if (!item.isEmpty())
2444              return true;
2445          return false;
2446        }
2447
2448        public EvidenceStatisticAttributeEstimateComponent addAttributeEstimate() { //3
2449          EvidenceStatisticAttributeEstimateComponent t = new EvidenceStatisticAttributeEstimateComponent();
2450          if (this.attributeEstimate == null)
2451            this.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
2452          this.attributeEstimate.add(t);
2453          return t;
2454        }
2455
2456        public EvidenceStatisticModelCharacteristicComponent addAttributeEstimate(EvidenceStatisticAttributeEstimateComponent t) { //3
2457          if (t == null)
2458            return this;
2459          if (this.attributeEstimate == null)
2460            this.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
2461          this.attributeEstimate.add(t);
2462          return this;
2463        }
2464
2465        /**
2466         * @return The first repetition of repeating field {@link #attributeEstimate}, creating it if it does not already exist {3}
2467         */
2468        public EvidenceStatisticAttributeEstimateComponent getAttributeEstimateFirstRep() { 
2469          if (getAttributeEstimate().isEmpty()) {
2470            addAttributeEstimate();
2471          }
2472          return getAttributeEstimate().get(0);
2473        }
2474
2475        protected void listChildren(List<Property> children) {
2476          super.listChildren(children);
2477          children.add(new Property("code", "CodeableConcept", "Description of a component of the method to generate the statistic.", 0, 1, code));
2478          children.add(new Property("value", "Quantity", "Further specification of the quantified value of the component of the method to generate the statistic.", 0, 1, value));
2479          children.add(new Property("variable", "", "A variable adjusted for in the adjusted analysis.", 0, java.lang.Integer.MAX_VALUE, variable));
2480          children.add(new Property("attributeEstimate", "@Evidence.statistic.attributeEstimate", "An attribute of the statistic used as a model characteristic.", 0, java.lang.Integer.MAX_VALUE, attributeEstimate));
2481        }
2482
2483        @Override
2484        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2485          switch (_hash) {
2486          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Description of a component of the method to generate the statistic.", 0, 1, code);
2487          case 111972721: /*value*/  return new Property("value", "Quantity", "Further specification of the quantified value of the component of the method to generate the statistic.", 0, 1, value);
2488          case -1249586564: /*variable*/  return new Property("variable", "", "A variable adjusted for in the adjusted analysis.", 0, java.lang.Integer.MAX_VALUE, variable);
2489          case -1539581980: /*attributeEstimate*/  return new Property("attributeEstimate", "@Evidence.statistic.attributeEstimate", "An attribute of the statistic used as a model characteristic.", 0, java.lang.Integer.MAX_VALUE, attributeEstimate);
2490          default: return super.getNamedProperty(_hash, _name, _checkValid);
2491          }
2492
2493        }
2494
2495      @Override
2496      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2497        switch (hash) {
2498        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
2499        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Quantity
2500        case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // EvidenceStatisticModelCharacteristicVariableComponent
2501        case -1539581980: /*attributeEstimate*/ return this.attributeEstimate == null ? new Base[0] : this.attributeEstimate.toArray(new Base[this.attributeEstimate.size()]); // EvidenceStatisticAttributeEstimateComponent
2502        default: return super.getProperty(hash, name, checkValid);
2503        }
2504
2505      }
2506
2507      @Override
2508      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2509        switch (hash) {
2510        case 3059181: // code
2511          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2512          return value;
2513        case 111972721: // value
2514          this.value = TypeConvertor.castToQuantity(value); // Quantity
2515          return value;
2516        case -1249586564: // variable
2517          this.getVariable().add((EvidenceStatisticModelCharacteristicVariableComponent) value); // EvidenceStatisticModelCharacteristicVariableComponent
2518          return value;
2519        case -1539581980: // attributeEstimate
2520          this.getAttributeEstimate().add((EvidenceStatisticAttributeEstimateComponent) value); // EvidenceStatisticAttributeEstimateComponent
2521          return value;
2522        default: return super.setProperty(hash, name, value);
2523        }
2524
2525      }
2526
2527      @Override
2528      public Base setProperty(String name, Base value) throws FHIRException {
2529        if (name.equals("code")) {
2530          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2531        } else if (name.equals("value")) {
2532          this.value = TypeConvertor.castToQuantity(value); // Quantity
2533        } else if (name.equals("variable")) {
2534          this.getVariable().add((EvidenceStatisticModelCharacteristicVariableComponent) value);
2535        } else if (name.equals("attributeEstimate")) {
2536          this.getAttributeEstimate().add((EvidenceStatisticAttributeEstimateComponent) value);
2537        } else
2538          return super.setProperty(name, value);
2539        return value;
2540      }
2541
2542      @Override
2543      public Base makeProperty(int hash, String name) throws FHIRException {
2544        switch (hash) {
2545        case 3059181:  return getCode();
2546        case 111972721:  return getValue();
2547        case -1249586564:  return addVariable(); 
2548        case -1539581980:  return addAttributeEstimate(); 
2549        default: return super.makeProperty(hash, name);
2550        }
2551
2552      }
2553
2554      @Override
2555      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2556        switch (hash) {
2557        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
2558        case 111972721: /*value*/ return new String[] {"Quantity"};
2559        case -1249586564: /*variable*/ return new String[] {};
2560        case -1539581980: /*attributeEstimate*/ return new String[] {"@Evidence.statistic.attributeEstimate"};
2561        default: return super.getTypesForProperty(hash, name);
2562        }
2563
2564      }
2565
2566      @Override
2567      public Base addChild(String name) throws FHIRException {
2568        if (name.equals("code")) {
2569          this.code = new CodeableConcept();
2570          return this.code;
2571        }
2572        else if (name.equals("value")) {
2573          this.value = new Quantity();
2574          return this.value;
2575        }
2576        else if (name.equals("variable")) {
2577          return addVariable();
2578        }
2579        else if (name.equals("attributeEstimate")) {
2580          return addAttributeEstimate();
2581        }
2582        else
2583          return super.addChild(name);
2584      }
2585
2586      public EvidenceStatisticModelCharacteristicComponent copy() {
2587        EvidenceStatisticModelCharacteristicComponent dst = new EvidenceStatisticModelCharacteristicComponent();
2588        copyValues(dst);
2589        return dst;
2590      }
2591
2592      public void copyValues(EvidenceStatisticModelCharacteristicComponent dst) {
2593        super.copyValues(dst);
2594        dst.code = code == null ? null : code.copy();
2595        dst.value = value == null ? null : value.copy();
2596        if (variable != null) {
2597          dst.variable = new ArrayList<EvidenceStatisticModelCharacteristicVariableComponent>();
2598          for (EvidenceStatisticModelCharacteristicVariableComponent i : variable)
2599            dst.variable.add(i.copy());
2600        };
2601        if (attributeEstimate != null) {
2602          dst.attributeEstimate = new ArrayList<EvidenceStatisticAttributeEstimateComponent>();
2603          for (EvidenceStatisticAttributeEstimateComponent i : attributeEstimate)
2604            dst.attributeEstimate.add(i.copy());
2605        };
2606      }
2607
2608      @Override
2609      public boolean equalsDeep(Base other_) {
2610        if (!super.equalsDeep(other_))
2611          return false;
2612        if (!(other_ instanceof EvidenceStatisticModelCharacteristicComponent))
2613          return false;
2614        EvidenceStatisticModelCharacteristicComponent o = (EvidenceStatisticModelCharacteristicComponent) other_;
2615        return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(variable, o.variable, true)
2616           && compareDeep(attributeEstimate, o.attributeEstimate, true);
2617      }
2618
2619      @Override
2620      public boolean equalsShallow(Base other_) {
2621        if (!super.equalsShallow(other_))
2622          return false;
2623        if (!(other_ instanceof EvidenceStatisticModelCharacteristicComponent))
2624          return false;
2625        EvidenceStatisticModelCharacteristicComponent o = (EvidenceStatisticModelCharacteristicComponent) other_;
2626        return true;
2627      }
2628
2629      public boolean isEmpty() {
2630        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value, variable, attributeEstimate
2631          );
2632      }
2633
2634  public String fhirType() {
2635    return "Evidence.statistic.modelCharacteristic";
2636
2637  }
2638
2639  }
2640
2641    @Block()
2642    public static class EvidenceStatisticModelCharacteristicVariableComponent extends BackboneElement implements IBaseBackboneElement {
2643        /**
2644         * Description of the variable.
2645         */
2646        @Child(name = "variableDefinition", type = {Group.class, EvidenceVariable.class}, order=1, min=1, max=1, modifier=false, summary=false)
2647        @Description(shortDefinition="Description of the variable", formalDefinition="Description of the variable." )
2648        protected Reference variableDefinition;
2649
2650        /**
2651         * How the variable is classified for use in adjusted analysis.
2652         */
2653        @Child(name = "handling", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2654        @Description(shortDefinition="continuous | dichotomous | ordinal | polychotomous", formalDefinition="How the variable is classified for use in adjusted analysis." )
2655        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/variable-handling")
2656        protected Enumeration<EvidenceVariableHandling> handling;
2657
2658        /**
2659         * Description for grouping of ordinal or polychotomous variables.
2660         */
2661        @Child(name = "valueCategory", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2662        @Description(shortDefinition="Description for grouping of ordinal or polychotomous variables", formalDefinition="Description for grouping of ordinal or polychotomous variables." )
2663        protected List<CodeableConcept> valueCategory;
2664
2665        /**
2666         * Discrete value for grouping of ordinal or polychotomous variables.
2667         */
2668        @Child(name = "valueQuantity", type = {Quantity.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2669        @Description(shortDefinition="Discrete value for grouping of ordinal or polychotomous variables", formalDefinition="Discrete value for grouping of ordinal or polychotomous variables." )
2670        protected List<Quantity> valueQuantity;
2671
2672        /**
2673         * Range of values for grouping of ordinal or polychotomous variables.
2674         */
2675        @Child(name = "valueRange", type = {Range.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2676        @Description(shortDefinition="Range of values for grouping of ordinal or polychotomous variables", formalDefinition="Range of values for grouping of ordinal or polychotomous variables." )
2677        protected List<Range> valueRange;
2678
2679        private static final long serialVersionUID = 1516174900L;
2680
2681    /**
2682     * Constructor
2683     */
2684      public EvidenceStatisticModelCharacteristicVariableComponent() {
2685        super();
2686      }
2687
2688    /**
2689     * Constructor
2690     */
2691      public EvidenceStatisticModelCharacteristicVariableComponent(Reference variableDefinition) {
2692        super();
2693        this.setVariableDefinition(variableDefinition);
2694      }
2695
2696        /**
2697         * @return {@link #variableDefinition} (Description of the variable.)
2698         */
2699        public Reference getVariableDefinition() { 
2700          if (this.variableDefinition == null)
2701            if (Configuration.errorOnAutoCreate())
2702              throw new Error("Attempt to auto-create EvidenceStatisticModelCharacteristicVariableComponent.variableDefinition");
2703            else if (Configuration.doAutoCreate())
2704              this.variableDefinition = new Reference(); // cc
2705          return this.variableDefinition;
2706        }
2707
2708        public boolean hasVariableDefinition() { 
2709          return this.variableDefinition != null && !this.variableDefinition.isEmpty();
2710        }
2711
2712        /**
2713         * @param value {@link #variableDefinition} (Description of the variable.)
2714         */
2715        public EvidenceStatisticModelCharacteristicVariableComponent setVariableDefinition(Reference value) { 
2716          this.variableDefinition = value;
2717          return this;
2718        }
2719
2720        /**
2721         * @return {@link #handling} (How the variable is classified for use in adjusted analysis.). This is the underlying object with id, value and extensions. The accessor "getHandling" gives direct access to the value
2722         */
2723        public Enumeration<EvidenceVariableHandling> getHandlingElement() { 
2724          if (this.handling == null)
2725            if (Configuration.errorOnAutoCreate())
2726              throw new Error("Attempt to auto-create EvidenceStatisticModelCharacteristicVariableComponent.handling");
2727            else if (Configuration.doAutoCreate())
2728              this.handling = new Enumeration<EvidenceVariableHandling>(new EvidenceVariableHandlingEnumFactory()); // bb
2729          return this.handling;
2730        }
2731
2732        public boolean hasHandlingElement() { 
2733          return this.handling != null && !this.handling.isEmpty();
2734        }
2735
2736        public boolean hasHandling() { 
2737          return this.handling != null && !this.handling.isEmpty();
2738        }
2739
2740        /**
2741         * @param value {@link #handling} (How the variable is classified for use in adjusted analysis.). This is the underlying object with id, value and extensions. The accessor "getHandling" gives direct access to the value
2742         */
2743        public EvidenceStatisticModelCharacteristicVariableComponent setHandlingElement(Enumeration<EvidenceVariableHandling> value) { 
2744          this.handling = value;
2745          return this;
2746        }
2747
2748        /**
2749         * @return How the variable is classified for use in adjusted analysis.
2750         */
2751        public EvidenceVariableHandling getHandling() { 
2752          return this.handling == null ? null : this.handling.getValue();
2753        }
2754
2755        /**
2756         * @param value How the variable is classified for use in adjusted analysis.
2757         */
2758        public EvidenceStatisticModelCharacteristicVariableComponent setHandling(EvidenceVariableHandling value) { 
2759          if (value == null)
2760            this.handling = null;
2761          else {
2762            if (this.handling == null)
2763              this.handling = new Enumeration<EvidenceVariableHandling>(new EvidenceVariableHandlingEnumFactory());
2764            this.handling.setValue(value);
2765          }
2766          return this;
2767        }
2768
2769        /**
2770         * @return {@link #valueCategory} (Description for grouping of ordinal or polychotomous variables.)
2771         */
2772        public List<CodeableConcept> getValueCategory() { 
2773          if (this.valueCategory == null)
2774            this.valueCategory = new ArrayList<CodeableConcept>();
2775          return this.valueCategory;
2776        }
2777
2778        /**
2779         * @return Returns a reference to <code>this</code> for easy method chaining
2780         */
2781        public EvidenceStatisticModelCharacteristicVariableComponent setValueCategory(List<CodeableConcept> theValueCategory) { 
2782          this.valueCategory = theValueCategory;
2783          return this;
2784        }
2785
2786        public boolean hasValueCategory() { 
2787          if (this.valueCategory == null)
2788            return false;
2789          for (CodeableConcept item : this.valueCategory)
2790            if (!item.isEmpty())
2791              return true;
2792          return false;
2793        }
2794
2795        public CodeableConcept addValueCategory() { //3
2796          CodeableConcept t = new CodeableConcept();
2797          if (this.valueCategory == null)
2798            this.valueCategory = new ArrayList<CodeableConcept>();
2799          this.valueCategory.add(t);
2800          return t;
2801        }
2802
2803        public EvidenceStatisticModelCharacteristicVariableComponent addValueCategory(CodeableConcept t) { //3
2804          if (t == null)
2805            return this;
2806          if (this.valueCategory == null)
2807            this.valueCategory = new ArrayList<CodeableConcept>();
2808          this.valueCategory.add(t);
2809          return this;
2810        }
2811
2812        /**
2813         * @return The first repetition of repeating field {@link #valueCategory}, creating it if it does not already exist {3}
2814         */
2815        public CodeableConcept getValueCategoryFirstRep() { 
2816          if (getValueCategory().isEmpty()) {
2817            addValueCategory();
2818          }
2819          return getValueCategory().get(0);
2820        }
2821
2822        /**
2823         * @return {@link #valueQuantity} (Discrete value for grouping of ordinal or polychotomous variables.)
2824         */
2825        public List<Quantity> getValueQuantity() { 
2826          if (this.valueQuantity == null)
2827            this.valueQuantity = new ArrayList<Quantity>();
2828          return this.valueQuantity;
2829        }
2830
2831        /**
2832         * @return Returns a reference to <code>this</code> for easy method chaining
2833         */
2834        public EvidenceStatisticModelCharacteristicVariableComponent setValueQuantity(List<Quantity> theValueQuantity) { 
2835          this.valueQuantity = theValueQuantity;
2836          return this;
2837        }
2838
2839        public boolean hasValueQuantity() { 
2840          if (this.valueQuantity == null)
2841            return false;
2842          for (Quantity item : this.valueQuantity)
2843            if (!item.isEmpty())
2844              return true;
2845          return false;
2846        }
2847
2848        public Quantity addValueQuantity() { //3
2849          Quantity t = new Quantity();
2850          if (this.valueQuantity == null)
2851            this.valueQuantity = new ArrayList<Quantity>();
2852          this.valueQuantity.add(t);
2853          return t;
2854        }
2855
2856        public EvidenceStatisticModelCharacteristicVariableComponent addValueQuantity(Quantity t) { //3
2857          if (t == null)
2858            return this;
2859          if (this.valueQuantity == null)
2860            this.valueQuantity = new ArrayList<Quantity>();
2861          this.valueQuantity.add(t);
2862          return this;
2863        }
2864
2865        /**
2866         * @return The first repetition of repeating field {@link #valueQuantity}, creating it if it does not already exist {3}
2867         */
2868        public Quantity getValueQuantityFirstRep() { 
2869          if (getValueQuantity().isEmpty()) {
2870            addValueQuantity();
2871          }
2872          return getValueQuantity().get(0);
2873        }
2874
2875        /**
2876         * @return {@link #valueRange} (Range of values for grouping of ordinal or polychotomous variables.)
2877         */
2878        public List<Range> getValueRange() { 
2879          if (this.valueRange == null)
2880            this.valueRange = new ArrayList<Range>();
2881          return this.valueRange;
2882        }
2883
2884        /**
2885         * @return Returns a reference to <code>this</code> for easy method chaining
2886         */
2887        public EvidenceStatisticModelCharacteristicVariableComponent setValueRange(List<Range> theValueRange) { 
2888          this.valueRange = theValueRange;
2889          return this;
2890        }
2891
2892        public boolean hasValueRange() { 
2893          if (this.valueRange == null)
2894            return false;
2895          for (Range item : this.valueRange)
2896            if (!item.isEmpty())
2897              return true;
2898          return false;
2899        }
2900
2901        public Range addValueRange() { //3
2902          Range t = new Range();
2903          if (this.valueRange == null)
2904            this.valueRange = new ArrayList<Range>();
2905          this.valueRange.add(t);
2906          return t;
2907        }
2908
2909        public EvidenceStatisticModelCharacteristicVariableComponent addValueRange(Range t) { //3
2910          if (t == null)
2911            return this;
2912          if (this.valueRange == null)
2913            this.valueRange = new ArrayList<Range>();
2914          this.valueRange.add(t);
2915          return this;
2916        }
2917
2918        /**
2919         * @return The first repetition of repeating field {@link #valueRange}, creating it if it does not already exist {3}
2920         */
2921        public Range getValueRangeFirstRep() { 
2922          if (getValueRange().isEmpty()) {
2923            addValueRange();
2924          }
2925          return getValueRange().get(0);
2926        }
2927
2928        protected void listChildren(List<Property> children) {
2929          super.listChildren(children);
2930          children.add(new Property("variableDefinition", "Reference(Group|EvidenceVariable)", "Description of the variable.", 0, 1, variableDefinition));
2931          children.add(new Property("handling", "code", "How the variable is classified for use in adjusted analysis.", 0, 1, handling));
2932          children.add(new Property("valueCategory", "CodeableConcept", "Description for grouping of ordinal or polychotomous variables.", 0, java.lang.Integer.MAX_VALUE, valueCategory));
2933          children.add(new Property("valueQuantity", "Quantity", "Discrete value for grouping of ordinal or polychotomous variables.", 0, java.lang.Integer.MAX_VALUE, valueQuantity));
2934          children.add(new Property("valueRange", "Range", "Range of values for grouping of ordinal or polychotomous variables.", 0, java.lang.Integer.MAX_VALUE, valueRange));
2935        }
2936
2937        @Override
2938        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2939          switch (_hash) {
2940          case -1807222545: /*variableDefinition*/  return new Property("variableDefinition", "Reference(Group|EvidenceVariable)", "Description of the variable.", 0, 1, variableDefinition);
2941          case 2072805: /*handling*/  return new Property("handling", "code", "How the variable is classified for use in adjusted analysis.", 0, 1, handling);
2942          case -694308465: /*valueCategory*/  return new Property("valueCategory", "CodeableConcept", "Description for grouping of ordinal or polychotomous variables.", 0, java.lang.Integer.MAX_VALUE, valueCategory);
2943          case -2029823716: /*valueQuantity*/  return new Property("valueQuantity", "Quantity", "Discrete value for grouping of ordinal or polychotomous variables.", 0, java.lang.Integer.MAX_VALUE, valueQuantity);
2944          case 2030761548: /*valueRange*/  return new Property("valueRange", "Range", "Range of values for grouping of ordinal or polychotomous variables.", 0, java.lang.Integer.MAX_VALUE, valueRange);
2945          default: return super.getNamedProperty(_hash, _name, _checkValid);
2946          }
2947
2948        }
2949
2950      @Override
2951      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2952        switch (hash) {
2953        case -1807222545: /*variableDefinition*/ return this.variableDefinition == null ? new Base[0] : new Base[] {this.variableDefinition}; // Reference
2954        case 2072805: /*handling*/ return this.handling == null ? new Base[0] : new Base[] {this.handling}; // Enumeration<EvidenceVariableHandling>
2955        case -694308465: /*valueCategory*/ return this.valueCategory == null ? new Base[0] : this.valueCategory.toArray(new Base[this.valueCategory.size()]); // CodeableConcept
2956        case -2029823716: /*valueQuantity*/ return this.valueQuantity == null ? new Base[0] : this.valueQuantity.toArray(new Base[this.valueQuantity.size()]); // Quantity
2957        case 2030761548: /*valueRange*/ return this.valueRange == null ? new Base[0] : this.valueRange.toArray(new Base[this.valueRange.size()]); // Range
2958        default: return super.getProperty(hash, name, checkValid);
2959        }
2960
2961      }
2962
2963      @Override
2964      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2965        switch (hash) {
2966        case -1807222545: // variableDefinition
2967          this.variableDefinition = TypeConvertor.castToReference(value); // Reference
2968          return value;
2969        case 2072805: // handling
2970          value = new EvidenceVariableHandlingEnumFactory().fromType(TypeConvertor.castToCode(value));
2971          this.handling = (Enumeration) value; // Enumeration<EvidenceVariableHandling>
2972          return value;
2973        case -694308465: // valueCategory
2974          this.getValueCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
2975          return value;
2976        case -2029823716: // valueQuantity
2977          this.getValueQuantity().add(TypeConvertor.castToQuantity(value)); // Quantity
2978          return value;
2979        case 2030761548: // valueRange
2980          this.getValueRange().add(TypeConvertor.castToRange(value)); // Range
2981          return value;
2982        default: return super.setProperty(hash, name, value);
2983        }
2984
2985      }
2986
2987      @Override
2988      public Base setProperty(String name, Base value) throws FHIRException {
2989        if (name.equals("variableDefinition")) {
2990          this.variableDefinition = TypeConvertor.castToReference(value); // Reference
2991        } else if (name.equals("handling")) {
2992          value = new EvidenceVariableHandlingEnumFactory().fromType(TypeConvertor.castToCode(value));
2993          this.handling = (Enumeration) value; // Enumeration<EvidenceVariableHandling>
2994        } else if (name.equals("valueCategory")) {
2995          this.getValueCategory().add(TypeConvertor.castToCodeableConcept(value));
2996        } else if (name.equals("valueQuantity")) {
2997          this.getValueQuantity().add(TypeConvertor.castToQuantity(value));
2998        } else if (name.equals("valueRange")) {
2999          this.getValueRange().add(TypeConvertor.castToRange(value));
3000        } else
3001          return super.setProperty(name, value);
3002        return value;
3003      }
3004
3005      @Override
3006      public Base makeProperty(int hash, String name) throws FHIRException {
3007        switch (hash) {
3008        case -1807222545:  return getVariableDefinition();
3009        case 2072805:  return getHandlingElement();
3010        case -694308465:  return addValueCategory(); 
3011        case -2029823716:  return addValueQuantity(); 
3012        case 2030761548:  return addValueRange(); 
3013        default: return super.makeProperty(hash, name);
3014        }
3015
3016      }
3017
3018      @Override
3019      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3020        switch (hash) {
3021        case -1807222545: /*variableDefinition*/ return new String[] {"Reference"};
3022        case 2072805: /*handling*/ return new String[] {"code"};
3023        case -694308465: /*valueCategory*/ return new String[] {"CodeableConcept"};
3024        case -2029823716: /*valueQuantity*/ return new String[] {"Quantity"};
3025        case 2030761548: /*valueRange*/ return new String[] {"Range"};
3026        default: return super.getTypesForProperty(hash, name);
3027        }
3028
3029      }
3030
3031      @Override
3032      public Base addChild(String name) throws FHIRException {
3033        if (name.equals("variableDefinition")) {
3034          this.variableDefinition = new Reference();
3035          return this.variableDefinition;
3036        }
3037        else if (name.equals("handling")) {
3038          throw new FHIRException("Cannot call addChild on a primitive type Evidence.statistic.modelCharacteristic.variable.handling");
3039        }
3040        else if (name.equals("valueCategory")) {
3041          return addValueCategory();
3042        }
3043        else if (name.equals("valueQuantity")) {
3044          return addValueQuantity();
3045        }
3046        else if (name.equals("valueRange")) {
3047          return addValueRange();
3048        }
3049        else
3050          return super.addChild(name);
3051      }
3052
3053      public EvidenceStatisticModelCharacteristicVariableComponent copy() {
3054        EvidenceStatisticModelCharacteristicVariableComponent dst = new EvidenceStatisticModelCharacteristicVariableComponent();
3055        copyValues(dst);
3056        return dst;
3057      }
3058
3059      public void copyValues(EvidenceStatisticModelCharacteristicVariableComponent dst) {
3060        super.copyValues(dst);
3061        dst.variableDefinition = variableDefinition == null ? null : variableDefinition.copy();
3062        dst.handling = handling == null ? null : handling.copy();
3063        if (valueCategory != null) {
3064          dst.valueCategory = new ArrayList<CodeableConcept>();
3065          for (CodeableConcept i : valueCategory)
3066            dst.valueCategory.add(i.copy());
3067        };
3068        if (valueQuantity != null) {
3069          dst.valueQuantity = new ArrayList<Quantity>();
3070          for (Quantity i : valueQuantity)
3071            dst.valueQuantity.add(i.copy());
3072        };
3073        if (valueRange != null) {
3074          dst.valueRange = new ArrayList<Range>();
3075          for (Range i : valueRange)
3076            dst.valueRange.add(i.copy());
3077        };
3078      }
3079
3080      @Override
3081      public boolean equalsDeep(Base other_) {
3082        if (!super.equalsDeep(other_))
3083          return false;
3084        if (!(other_ instanceof EvidenceStatisticModelCharacteristicVariableComponent))
3085          return false;
3086        EvidenceStatisticModelCharacteristicVariableComponent o = (EvidenceStatisticModelCharacteristicVariableComponent) other_;
3087        return compareDeep(variableDefinition, o.variableDefinition, true) && compareDeep(handling, o.handling, true)
3088           && compareDeep(valueCategory, o.valueCategory, true) && compareDeep(valueQuantity, o.valueQuantity, true)
3089           && compareDeep(valueRange, o.valueRange, true);
3090      }
3091
3092      @Override
3093      public boolean equalsShallow(Base other_) {
3094        if (!super.equalsShallow(other_))
3095          return false;
3096        if (!(other_ instanceof EvidenceStatisticModelCharacteristicVariableComponent))
3097          return false;
3098        EvidenceStatisticModelCharacteristicVariableComponent o = (EvidenceStatisticModelCharacteristicVariableComponent) other_;
3099        return compareValues(handling, o.handling, true);
3100      }
3101
3102      public boolean isEmpty() {
3103        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(variableDefinition, handling
3104          , valueCategory, valueQuantity, valueRange);
3105      }
3106
3107  public String fhirType() {
3108    return "Evidence.statistic.modelCharacteristic.variable";
3109
3110  }
3111
3112  }
3113
3114    @Block()
3115    public static class EvidenceCertaintyComponent extends BackboneElement implements IBaseBackboneElement {
3116        /**
3117         * Textual description of certainty.
3118         */
3119        @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
3120        @Description(shortDefinition="Textual description of certainty", formalDefinition="Textual description of certainty." )
3121        protected StringType description;
3122
3123        /**
3124         * Footnotes and/or explanatory notes.
3125         */
3126        @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3127        @Description(shortDefinition="Footnotes and/or explanatory notes", formalDefinition="Footnotes and/or explanatory notes." )
3128        protected List<Annotation> note;
3129
3130        /**
3131         * Aspect of certainty being rated.
3132         */
3133        @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
3134        @Description(shortDefinition="Aspect of certainty being rated", formalDefinition="Aspect of certainty being rated." )
3135        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/certainty-type")
3136        protected CodeableConcept type;
3137
3138        /**
3139         * Assessment or judgement of the aspect.
3140         */
3141        @Child(name = "rating", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
3142        @Description(shortDefinition="Assessment or judgement of the aspect", formalDefinition="Assessment or judgement of the aspect." )
3143        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/certainty-rating")
3144        protected CodeableConcept rating;
3145
3146        /**
3147         * Individual or group who did the rating.
3148         */
3149        @Child(name = "rater", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
3150        @Description(shortDefinition="Individual or group who did the rating", formalDefinition="Individual or group who did the rating." )
3151        protected StringType rater;
3152
3153        /**
3154         * A domain or subdomain of certainty.
3155         */
3156        @Child(name = "subcomponent", type = {EvidenceCertaintyComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3157        @Description(shortDefinition="A domain or subdomain of certainty", formalDefinition="A domain or subdomain of certainty." )
3158        protected List<EvidenceCertaintyComponent> subcomponent;
3159
3160        private static final long serialVersionUID = 432882532L;
3161
3162    /**
3163     * Constructor
3164     */
3165      public EvidenceCertaintyComponent() {
3166        super();
3167      }
3168
3169        /**
3170         * @return {@link #description} (Textual description of certainty.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3171         */
3172        public StringType getDescriptionElement() { 
3173          if (this.description == null)
3174            if (Configuration.errorOnAutoCreate())
3175              throw new Error("Attempt to auto-create EvidenceCertaintyComponent.description");
3176            else if (Configuration.doAutoCreate())
3177              this.description = new StringType(); // bb
3178          return this.description;
3179        }
3180
3181        public boolean hasDescriptionElement() { 
3182          return this.description != null && !this.description.isEmpty();
3183        }
3184
3185        public boolean hasDescription() { 
3186          return this.description != null && !this.description.isEmpty();
3187        }
3188
3189        /**
3190         * @param value {@link #description} (Textual description of certainty.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3191         */
3192        public EvidenceCertaintyComponent setDescriptionElement(StringType value) { 
3193          this.description = value;
3194          return this;
3195        }
3196
3197        /**
3198         * @return Textual description of certainty.
3199         */
3200        public String getDescription() { 
3201          return this.description == null ? null : this.description.getValue();
3202        }
3203
3204        /**
3205         * @param value Textual description of certainty.
3206         */
3207        public EvidenceCertaintyComponent setDescription(String value) { 
3208          if (Utilities.noString(value))
3209            this.description = null;
3210          else {
3211            if (this.description == null)
3212              this.description = new StringType();
3213            this.description.setValue(value);
3214          }
3215          return this;
3216        }
3217
3218        /**
3219         * @return {@link #note} (Footnotes and/or explanatory notes.)
3220         */
3221        public List<Annotation> getNote() { 
3222          if (this.note == null)
3223            this.note = new ArrayList<Annotation>();
3224          return this.note;
3225        }
3226
3227        /**
3228         * @return Returns a reference to <code>this</code> for easy method chaining
3229         */
3230        public EvidenceCertaintyComponent setNote(List<Annotation> theNote) { 
3231          this.note = theNote;
3232          return this;
3233        }
3234
3235        public boolean hasNote() { 
3236          if (this.note == null)
3237            return false;
3238          for (Annotation item : this.note)
3239            if (!item.isEmpty())
3240              return true;
3241          return false;
3242        }
3243
3244        public Annotation addNote() { //3
3245          Annotation t = new Annotation();
3246          if (this.note == null)
3247            this.note = new ArrayList<Annotation>();
3248          this.note.add(t);
3249          return t;
3250        }
3251
3252        public EvidenceCertaintyComponent addNote(Annotation t) { //3
3253          if (t == null)
3254            return this;
3255          if (this.note == null)
3256            this.note = new ArrayList<Annotation>();
3257          this.note.add(t);
3258          return this;
3259        }
3260
3261        /**
3262         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
3263         */
3264        public Annotation getNoteFirstRep() { 
3265          if (getNote().isEmpty()) {
3266            addNote();
3267          }
3268          return getNote().get(0);
3269        }
3270
3271        /**
3272         * @return {@link #type} (Aspect of certainty being rated.)
3273         */
3274        public CodeableConcept getType() { 
3275          if (this.type == null)
3276            if (Configuration.errorOnAutoCreate())
3277              throw new Error("Attempt to auto-create EvidenceCertaintyComponent.type");
3278            else if (Configuration.doAutoCreate())
3279              this.type = new CodeableConcept(); // cc
3280          return this.type;
3281        }
3282
3283        public boolean hasType() { 
3284          return this.type != null && !this.type.isEmpty();
3285        }
3286
3287        /**
3288         * @param value {@link #type} (Aspect of certainty being rated.)
3289         */
3290        public EvidenceCertaintyComponent setType(CodeableConcept value) { 
3291          this.type = value;
3292          return this;
3293        }
3294
3295        /**
3296         * @return {@link #rating} (Assessment or judgement of the aspect.)
3297         */
3298        public CodeableConcept getRating() { 
3299          if (this.rating == null)
3300            if (Configuration.errorOnAutoCreate())
3301              throw new Error("Attempt to auto-create EvidenceCertaintyComponent.rating");
3302            else if (Configuration.doAutoCreate())
3303              this.rating = new CodeableConcept(); // cc
3304          return this.rating;
3305        }
3306
3307        public boolean hasRating() { 
3308          return this.rating != null && !this.rating.isEmpty();
3309        }
3310
3311        /**
3312         * @param value {@link #rating} (Assessment or judgement of the aspect.)
3313         */
3314        public EvidenceCertaintyComponent setRating(CodeableConcept value) { 
3315          this.rating = value;
3316          return this;
3317        }
3318
3319        /**
3320         * @return {@link #rater} (Individual or group who did the rating.). This is the underlying object with id, value and extensions. The accessor "getRater" gives direct access to the value
3321         */
3322        public StringType getRaterElement() { 
3323          if (this.rater == null)
3324            if (Configuration.errorOnAutoCreate())
3325              throw new Error("Attempt to auto-create EvidenceCertaintyComponent.rater");
3326            else if (Configuration.doAutoCreate())
3327              this.rater = new StringType(); // bb
3328          return this.rater;
3329        }
3330
3331        public boolean hasRaterElement() { 
3332          return this.rater != null && !this.rater.isEmpty();
3333        }
3334
3335        public boolean hasRater() { 
3336          return this.rater != null && !this.rater.isEmpty();
3337        }
3338
3339        /**
3340         * @param value {@link #rater} (Individual or group who did the rating.). This is the underlying object with id, value and extensions. The accessor "getRater" gives direct access to the value
3341         */
3342        public EvidenceCertaintyComponent setRaterElement(StringType value) { 
3343          this.rater = value;
3344          return this;
3345        }
3346
3347        /**
3348         * @return Individual or group who did the rating.
3349         */
3350        public String getRater() { 
3351          return this.rater == null ? null : this.rater.getValue();
3352        }
3353
3354        /**
3355         * @param value Individual or group who did the rating.
3356         */
3357        public EvidenceCertaintyComponent setRater(String value) { 
3358          if (Utilities.noString(value))
3359            this.rater = null;
3360          else {
3361            if (this.rater == null)
3362              this.rater = new StringType();
3363            this.rater.setValue(value);
3364          }
3365          return this;
3366        }
3367
3368        /**
3369         * @return {@link #subcomponent} (A domain or subdomain of certainty.)
3370         */
3371        public List<EvidenceCertaintyComponent> getSubcomponent() { 
3372          if (this.subcomponent == null)
3373            this.subcomponent = new ArrayList<EvidenceCertaintyComponent>();
3374          return this.subcomponent;
3375        }
3376
3377        /**
3378         * @return Returns a reference to <code>this</code> for easy method chaining
3379         */
3380        public EvidenceCertaintyComponent setSubcomponent(List<EvidenceCertaintyComponent> theSubcomponent) { 
3381          this.subcomponent = theSubcomponent;
3382          return this;
3383        }
3384
3385        public boolean hasSubcomponent() { 
3386          if (this.subcomponent == null)
3387            return false;
3388          for (EvidenceCertaintyComponent item : this.subcomponent)
3389            if (!item.isEmpty())
3390              return true;
3391          return false;
3392        }
3393
3394        public EvidenceCertaintyComponent addSubcomponent() { //3
3395          EvidenceCertaintyComponent t = new EvidenceCertaintyComponent();
3396          if (this.subcomponent == null)
3397            this.subcomponent = new ArrayList<EvidenceCertaintyComponent>();
3398          this.subcomponent.add(t);
3399          return t;
3400        }
3401
3402        public EvidenceCertaintyComponent addSubcomponent(EvidenceCertaintyComponent t) { //3
3403          if (t == null)
3404            return this;
3405          if (this.subcomponent == null)
3406            this.subcomponent = new ArrayList<EvidenceCertaintyComponent>();
3407          this.subcomponent.add(t);
3408          return this;
3409        }
3410
3411        /**
3412         * @return The first repetition of repeating field {@link #subcomponent}, creating it if it does not already exist {3}
3413         */
3414        public EvidenceCertaintyComponent getSubcomponentFirstRep() { 
3415          if (getSubcomponent().isEmpty()) {
3416            addSubcomponent();
3417          }
3418          return getSubcomponent().get(0);
3419        }
3420
3421        protected void listChildren(List<Property> children) {
3422          super.listChildren(children);
3423          children.add(new Property("description", "string", "Textual description of certainty.", 0, 1, description));
3424          children.add(new Property("note", "Annotation", "Footnotes and/or explanatory notes.", 0, java.lang.Integer.MAX_VALUE, note));
3425          children.add(new Property("type", "CodeableConcept", "Aspect of certainty being rated.", 0, 1, type));
3426          children.add(new Property("rating", "CodeableConcept", "Assessment or judgement of the aspect.", 0, 1, rating));
3427          children.add(new Property("rater", "string", "Individual or group who did the rating.", 0, 1, rater));
3428          children.add(new Property("subcomponent", "@Evidence.certainty", "A domain or subdomain of certainty.", 0, java.lang.Integer.MAX_VALUE, subcomponent));
3429        }
3430
3431        @Override
3432        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3433          switch (_hash) {
3434          case -1724546052: /*description*/  return new Property("description", "string", "Textual description of certainty.", 0, 1, description);
3435          case 3387378: /*note*/  return new Property("note", "Annotation", "Footnotes and/or explanatory notes.", 0, java.lang.Integer.MAX_VALUE, note);
3436          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Aspect of certainty being rated.", 0, 1, type);
3437          case -938102371: /*rating*/  return new Property("rating", "CodeableConcept", "Assessment or judgement of the aspect.", 0, 1, rating);
3438          case 108285842: /*rater*/  return new Property("rater", "string", "Individual or group who did the rating.", 0, 1, rater);
3439          case -1308662083: /*subcomponent*/  return new Property("subcomponent", "@Evidence.certainty", "A domain or subdomain of certainty.", 0, java.lang.Integer.MAX_VALUE, subcomponent);
3440          default: return super.getNamedProperty(_hash, _name, _checkValid);
3441          }
3442
3443        }
3444
3445      @Override
3446      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3447        switch (hash) {
3448        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
3449        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
3450        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
3451        case -938102371: /*rating*/ return this.rating == null ? new Base[0] : new Base[] {this.rating}; // CodeableConcept
3452        case 108285842: /*rater*/ return this.rater == null ? new Base[0] : new Base[] {this.rater}; // StringType
3453        case -1308662083: /*subcomponent*/ return this.subcomponent == null ? new Base[0] : this.subcomponent.toArray(new Base[this.subcomponent.size()]); // EvidenceCertaintyComponent
3454        default: return super.getProperty(hash, name, checkValid);
3455        }
3456
3457      }
3458
3459      @Override
3460      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3461        switch (hash) {
3462        case -1724546052: // description
3463          this.description = TypeConvertor.castToString(value); // StringType
3464          return value;
3465        case 3387378: // note
3466          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
3467          return value;
3468        case 3575610: // type
3469          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3470          return value;
3471        case -938102371: // rating
3472          this.rating = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3473          return value;
3474        case 108285842: // rater
3475          this.rater = TypeConvertor.castToString(value); // StringType
3476          return value;
3477        case -1308662083: // subcomponent
3478          this.getSubcomponent().add((EvidenceCertaintyComponent) value); // EvidenceCertaintyComponent
3479          return value;
3480        default: return super.setProperty(hash, name, value);
3481        }
3482
3483      }
3484
3485      @Override
3486      public Base setProperty(String name, Base value) throws FHIRException {
3487        if (name.equals("description")) {
3488          this.description = TypeConvertor.castToString(value); // StringType
3489        } else if (name.equals("note")) {
3490          this.getNote().add(TypeConvertor.castToAnnotation(value));
3491        } else if (name.equals("type")) {
3492          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3493        } else if (name.equals("rating")) {
3494          this.rating = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3495        } else if (name.equals("rater")) {
3496          this.rater = TypeConvertor.castToString(value); // StringType
3497        } else if (name.equals("subcomponent")) {
3498          this.getSubcomponent().add((EvidenceCertaintyComponent) value);
3499        } else
3500          return super.setProperty(name, value);
3501        return value;
3502      }
3503
3504      @Override
3505      public Base makeProperty(int hash, String name) throws FHIRException {
3506        switch (hash) {
3507        case -1724546052:  return getDescriptionElement();
3508        case 3387378:  return addNote(); 
3509        case 3575610:  return getType();
3510        case -938102371:  return getRating();
3511        case 108285842:  return getRaterElement();
3512        case -1308662083:  return addSubcomponent(); 
3513        default: return super.makeProperty(hash, name);
3514        }
3515
3516      }
3517
3518      @Override
3519      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3520        switch (hash) {
3521        case -1724546052: /*description*/ return new String[] {"string"};
3522        case 3387378: /*note*/ return new String[] {"Annotation"};
3523        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
3524        case -938102371: /*rating*/ return new String[] {"CodeableConcept"};
3525        case 108285842: /*rater*/ return new String[] {"string"};
3526        case -1308662083: /*subcomponent*/ return new String[] {"@Evidence.certainty"};
3527        default: return super.getTypesForProperty(hash, name);
3528        }
3529
3530      }
3531
3532      @Override
3533      public Base addChild(String name) throws FHIRException {
3534        if (name.equals("description")) {
3535          throw new FHIRException("Cannot call addChild on a primitive type Evidence.certainty.description");
3536        }
3537        else if (name.equals("note")) {
3538          return addNote();
3539        }
3540        else if (name.equals("type")) {
3541          this.type = new CodeableConcept();
3542          return this.type;
3543        }
3544        else if (name.equals("rating")) {
3545          this.rating = new CodeableConcept();
3546          return this.rating;
3547        }
3548        else if (name.equals("rater")) {
3549          throw new FHIRException("Cannot call addChild on a primitive type Evidence.certainty.rater");
3550        }
3551        else if (name.equals("subcomponent")) {
3552          return addSubcomponent();
3553        }
3554        else
3555          return super.addChild(name);
3556      }
3557
3558      public EvidenceCertaintyComponent copy() {
3559        EvidenceCertaintyComponent dst = new EvidenceCertaintyComponent();
3560        copyValues(dst);
3561        return dst;
3562      }
3563
3564      public void copyValues(EvidenceCertaintyComponent dst) {
3565        super.copyValues(dst);
3566        dst.description = description == null ? null : description.copy();
3567        if (note != null) {
3568          dst.note = new ArrayList<Annotation>();
3569          for (Annotation i : note)
3570            dst.note.add(i.copy());
3571        };
3572        dst.type = type == null ? null : type.copy();
3573        dst.rating = rating == null ? null : rating.copy();
3574        dst.rater = rater == null ? null : rater.copy();
3575        if (subcomponent != null) {
3576          dst.subcomponent = new ArrayList<EvidenceCertaintyComponent>();
3577          for (EvidenceCertaintyComponent i : subcomponent)
3578            dst.subcomponent.add(i.copy());
3579        };
3580      }
3581
3582      @Override
3583      public boolean equalsDeep(Base other_) {
3584        if (!super.equalsDeep(other_))
3585          return false;
3586        if (!(other_ instanceof EvidenceCertaintyComponent))
3587          return false;
3588        EvidenceCertaintyComponent o = (EvidenceCertaintyComponent) other_;
3589        return compareDeep(description, o.description, true) && compareDeep(note, o.note, true) && compareDeep(type, o.type, true)
3590           && compareDeep(rating, o.rating, true) && compareDeep(rater, o.rater, true) && compareDeep(subcomponent, o.subcomponent, true)
3591          ;
3592      }
3593
3594      @Override
3595      public boolean equalsShallow(Base other_) {
3596        if (!super.equalsShallow(other_))
3597          return false;
3598        if (!(other_ instanceof EvidenceCertaintyComponent))
3599          return false;
3600        EvidenceCertaintyComponent o = (EvidenceCertaintyComponent) other_;
3601        return compareValues(description, o.description, true) && compareValues(rater, o.rater, true);
3602      }
3603
3604      public boolean isEmpty() {
3605        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, note, type
3606          , rating, rater, subcomponent);
3607      }
3608
3609  public String fhirType() {
3610    return "Evidence.certainty";
3611
3612  }
3613
3614  }
3615
3616    /**
3617     * An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.
3618     */
3619    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
3620    @Description(shortDefinition="Canonical identifier for this evidence, represented as a globally unique URI", formalDefinition="An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers." )
3621    protected UriType url;
3622
3623    /**
3624     * A formal identifier that is used to identify this summary when it is represented in other formats, or referenced in a specification, model, design or an instance.
3625     */
3626    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3627    @Description(shortDefinition="Additional identifier for the summary", formalDefinition="A formal identifier that is used to identify this summary when it is represented in other formats, or referenced in a specification, model, design or an instance." )
3628    protected List<Identifier> identifier;
3629
3630    /**
3631     * The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
3632     */
3633    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
3634    @Description(shortDefinition="Business version of this summary", formalDefinition="The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." )
3635    protected StringType version;
3636
3637    /**
3638     * A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.
3639     */
3640    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
3641    @Description(shortDefinition="Name for this summary (machine friendly)", formalDefinition="A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation." )
3642    protected StringType name;
3643
3644    /**
3645     * A short, descriptive, user-friendly title for the summary.
3646     */
3647    @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
3648    @Description(shortDefinition="Name for this summary (human friendly)", formalDefinition="A short, descriptive, user-friendly title for the summary." )
3649    protected StringType title;
3650
3651    /**
3652     * Citation Resource or display of suggested citation for this evidence.
3653     */
3654    @Child(name = "citeAs", type = {Citation.class, MarkdownType.class}, order=5, min=0, max=1, modifier=false, summary=false)
3655    @Description(shortDefinition="Citation for this evidence", formalDefinition="Citation Resource or display of suggested citation for this evidence." )
3656    protected DataType citeAs;
3657
3658    /**
3659     * The status of this summary. Enables tracking the life-cycle of the content.
3660     */
3661    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
3662    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this summary. Enables tracking the life-cycle of the content." )
3663    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
3664    protected Enumeration<PublicationStatus> status;
3665
3666    /**
3667     * A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
3668     */
3669    @Child(name = "experimental", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false)
3670    @Description(shortDefinition="For testing purposes, not real usage", formalDefinition="A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." )
3671    protected BooleanType experimental;
3672
3673    /**
3674     * The date  (and optionally time) when the summary was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes.
3675     */
3676    @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true)
3677    @Description(shortDefinition="Date last changed", formalDefinition="The date  (and optionally time) when the summary was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes." )
3678    protected DateTimeType date;
3679
3680    /**
3681     * The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances.
3682     */
3683    @Child(name = "useContext", type = {UsageContext.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3684    @Description(shortDefinition="The context that the content is intended to support", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances." )
3685    protected List<UsageContext> useContext;
3686
3687    /**
3688     * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
3689     */
3690    @Child(name = "approvalDate", type = {DateType.class}, order=10, min=0, max=1, modifier=false, summary=false)
3691    @Description(shortDefinition="When the summary was approved by publisher", formalDefinition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." )
3692    protected DateType approvalDate;
3693
3694    /**
3695     * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
3696     */
3697    @Child(name = "lastReviewDate", type = {DateType.class}, order=11, min=0, max=1, modifier=false, summary=false)
3698    @Description(shortDefinition="When the summary was last reviewed", formalDefinition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." )
3699    protected DateType lastReviewDate;
3700
3701    /**
3702     * The name of the organization or individual that published the evidence.
3703     */
3704    @Child(name = "publisher", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true)
3705    @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the organization or individual that published the evidence." )
3706    protected StringType publisher;
3707
3708    /**
3709     * Contact details to assist a user in finding and communicating with the publisher.
3710     */
3711    @Child(name = "contact", type = {ContactDetail.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3712    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
3713    protected List<ContactDetail> contact;
3714
3715    /**
3716     * An individiual, organization, or device primarily involved in the creation and maintenance of the content.
3717     */
3718    @Child(name = "author", type = {ContactDetail.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3719    @Description(shortDefinition="Who authored the content", formalDefinition="An individiual, organization, or device primarily involved in the creation and maintenance of the content." )
3720    protected List<ContactDetail> author;
3721
3722    /**
3723     * An individiual, organization, or device primarily responsible for internal coherence of the content.
3724     */
3725    @Child(name = "editor", type = {ContactDetail.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3726    @Description(shortDefinition="Who edited the content", formalDefinition="An individiual, organization, or device primarily responsible for internal coherence of the content." )
3727    protected List<ContactDetail> editor;
3728
3729    /**
3730     * An individiual, organization, or device primarily responsible for review of some aspect of the content.
3731     */
3732    @Child(name = "reviewer", type = {ContactDetail.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3733    @Description(shortDefinition="Who reviewed the content", formalDefinition="An individiual, organization, or device primarily responsible for review of some aspect of the content." )
3734    protected List<ContactDetail> reviewer;
3735
3736    /**
3737     * An individiual, organization, or device responsible for officially endorsing the content for use in some setting.
3738     */
3739    @Child(name = "endorser", type = {ContactDetail.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3740    @Description(shortDefinition="Who endorsed the content", formalDefinition="An individiual, organization, or device responsible for officially endorsing the content for use in some setting." )
3741    protected List<ContactDetail> endorser;
3742
3743    /**
3744     * Link or citation to artifact associated with the summary.
3745     */
3746    @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3747    @Description(shortDefinition="Link or citation to artifact associated with the summary", formalDefinition="Link or citation to artifact associated with the summary." )
3748    protected List<RelatedArtifact> relatedArtifact;
3749
3750    /**
3751     * A free text natural language description of the evidence from a consumer's perspective.
3752     */
3753    @Child(name = "description", type = {MarkdownType.class}, order=19, min=0, max=1, modifier=false, summary=false)
3754    @Description(shortDefinition="Description of the particular summary", formalDefinition="A free text natural language description of the evidence from a consumer's perspective." )
3755    protected MarkdownType description;
3756
3757    /**
3758     * Declarative description of the Evidence.
3759     */
3760    @Child(name = "assertion", type = {MarkdownType.class}, order=20, min=0, max=1, modifier=false, summary=false)
3761    @Description(shortDefinition="Declarative description of the Evidence", formalDefinition="Declarative description of the Evidence." )
3762    protected MarkdownType assertion;
3763
3764    /**
3765     * Footnotes and/or explanatory notes.
3766     */
3767    @Child(name = "note", type = {Annotation.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3768    @Description(shortDefinition="Footnotes and/or explanatory notes", formalDefinition="Footnotes and/or explanatory notes." )
3769    protected List<Annotation> note;
3770
3771    /**
3772     * Evidence variable such as population, exposure, or outcome.
3773     */
3774    @Child(name = "variableDefinition", type = {}, order=22, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3775    @Description(shortDefinition="Evidence variable such as population, exposure, or outcome", formalDefinition="Evidence variable such as population, exposure, or outcome." )
3776    protected List<EvidenceVariableDefinitionComponent> variableDefinition;
3777
3778    /**
3779     * The method to combine studies.
3780     */
3781    @Child(name = "synthesisType", type = {CodeableConcept.class}, order=23, min=0, max=1, modifier=false, summary=false)
3782    @Description(shortDefinition="The method to combine studies", formalDefinition="The method to combine studies." )
3783    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/synthesis-type")
3784    protected CodeableConcept synthesisType;
3785
3786    /**
3787     * The type of study that produced this evidence.
3788     */
3789    @Child(name = "studyType", type = {CodeableConcept.class}, order=24, min=0, max=1, modifier=false, summary=false)
3790    @Description(shortDefinition="The type of study that produced this evidence", formalDefinition="The type of study that produced this evidence." )
3791    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/study-type")
3792    protected CodeableConcept studyType;
3793
3794    /**
3795     * Values and parameters for a single statistic.
3796     */
3797    @Child(name = "statistic", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3798    @Description(shortDefinition="Values and parameters for a single statistic", formalDefinition="Values and parameters for a single statistic." )
3799    protected List<EvidenceStatisticComponent> statistic;
3800
3801    /**
3802     * Assessment of certainty, confidence in the estimates, or quality of the evidence.
3803     */
3804    @Child(name = "certainty", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3805    @Description(shortDefinition="Certainty or quality of the evidence", formalDefinition="Assessment of certainty, confidence in the estimates, or quality of the evidence." )
3806    protected List<EvidenceCertaintyComponent> certainty;
3807
3808    private static final long serialVersionUID = 1922265062L;
3809
3810  /**
3811   * Constructor
3812   */
3813    public Evidence() {
3814      super();
3815    }
3816
3817  /**
3818   * Constructor
3819   */
3820    public Evidence(PublicationStatus status, EvidenceVariableDefinitionComponent variableDefinition) {
3821      super();
3822      this.setStatus(status);
3823      this.addVariableDefinition(variableDefinition);
3824    }
3825
3826    /**
3827     * @return {@link #url} (An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
3828     */
3829    public UriType getUrlElement() { 
3830      if (this.url == null)
3831        if (Configuration.errorOnAutoCreate())
3832          throw new Error("Attempt to auto-create Evidence.url");
3833        else if (Configuration.doAutoCreate())
3834          this.url = new UriType(); // bb
3835      return this.url;
3836    }
3837
3838    public boolean hasUrlElement() { 
3839      return this.url != null && !this.url.isEmpty();
3840    }
3841
3842    public boolean hasUrl() { 
3843      return this.url != null && !this.url.isEmpty();
3844    }
3845
3846    /**
3847     * @param value {@link #url} (An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
3848     */
3849    public Evidence setUrlElement(UriType value) { 
3850      this.url = value;
3851      return this;
3852    }
3853
3854    /**
3855     * @return An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.
3856     */
3857    public String getUrl() { 
3858      return this.url == null ? null : this.url.getValue();
3859    }
3860
3861    /**
3862     * @param value An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.
3863     */
3864    public Evidence setUrl(String value) { 
3865      if (Utilities.noString(value))
3866        this.url = null;
3867      else {
3868        if (this.url == null)
3869          this.url = new UriType();
3870        this.url.setValue(value);
3871      }
3872      return this;
3873    }
3874
3875    /**
3876     * @return {@link #identifier} (A formal identifier that is used to identify this summary when it is represented in other formats, or referenced in a specification, model, design or an instance.)
3877     */
3878    public List<Identifier> getIdentifier() { 
3879      if (this.identifier == null)
3880        this.identifier = new ArrayList<Identifier>();
3881      return this.identifier;
3882    }
3883
3884    /**
3885     * @return Returns a reference to <code>this</code> for easy method chaining
3886     */
3887    public Evidence setIdentifier(List<Identifier> theIdentifier) { 
3888      this.identifier = theIdentifier;
3889      return this;
3890    }
3891
3892    public boolean hasIdentifier() { 
3893      if (this.identifier == null)
3894        return false;
3895      for (Identifier item : this.identifier)
3896        if (!item.isEmpty())
3897          return true;
3898      return false;
3899    }
3900
3901    public Identifier addIdentifier() { //3
3902      Identifier t = new Identifier();
3903      if (this.identifier == null)
3904        this.identifier = new ArrayList<Identifier>();
3905      this.identifier.add(t);
3906      return t;
3907    }
3908
3909    public Evidence addIdentifier(Identifier t) { //3
3910      if (t == null)
3911        return this;
3912      if (this.identifier == null)
3913        this.identifier = new ArrayList<Identifier>();
3914      this.identifier.add(t);
3915      return this;
3916    }
3917
3918    /**
3919     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
3920     */
3921    public Identifier getIdentifierFirstRep() { 
3922      if (getIdentifier().isEmpty()) {
3923        addIdentifier();
3924      }
3925      return getIdentifier().get(0);
3926    }
3927
3928    /**
3929     * @return {@link #version} (The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
3930     */
3931    public StringType getVersionElement() { 
3932      if (this.version == null)
3933        if (Configuration.errorOnAutoCreate())
3934          throw new Error("Attempt to auto-create Evidence.version");
3935        else if (Configuration.doAutoCreate())
3936          this.version = new StringType(); // bb
3937      return this.version;
3938    }
3939
3940    public boolean hasVersionElement() { 
3941      return this.version != null && !this.version.isEmpty();
3942    }
3943
3944    public boolean hasVersion() { 
3945      return this.version != null && !this.version.isEmpty();
3946    }
3947
3948    /**
3949     * @param value {@link #version} (The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
3950     */
3951    public Evidence setVersionElement(StringType value) { 
3952      this.version = value;
3953      return this;
3954    }
3955
3956    /**
3957     * @return The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
3958     */
3959    public String getVersion() { 
3960      return this.version == null ? null : this.version.getValue();
3961    }
3962
3963    /**
3964     * @param value The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
3965     */
3966    public Evidence setVersion(String value) { 
3967      if (Utilities.noString(value))
3968        this.version = null;
3969      else {
3970        if (this.version == null)
3971          this.version = new StringType();
3972        this.version.setValue(value);
3973      }
3974      return this;
3975    }
3976
3977    /**
3978     * @return {@link #name} (A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3979     */
3980    public StringType getNameElement() { 
3981      if (this.name == null)
3982        if (Configuration.errorOnAutoCreate())
3983          throw new Error("Attempt to auto-create Evidence.name");
3984        else if (Configuration.doAutoCreate())
3985          this.name = new StringType(); // bb
3986      return this.name;
3987    }
3988
3989    public boolean hasNameElement() { 
3990      return this.name != null && !this.name.isEmpty();
3991    }
3992
3993    public boolean hasName() { 
3994      return this.name != null && !this.name.isEmpty();
3995    }
3996
3997    /**
3998     * @param value {@link #name} (A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3999     */
4000    public Evidence setNameElement(StringType value) { 
4001      this.name = value;
4002      return this;
4003    }
4004
4005    /**
4006     * @return A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.
4007     */
4008    public String getName() { 
4009      return this.name == null ? null : this.name.getValue();
4010    }
4011
4012    /**
4013     * @param value A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.
4014     */
4015    public Evidence setName(String value) { 
4016      if (Utilities.noString(value))
4017        this.name = null;
4018      else {
4019        if (this.name == null)
4020          this.name = new StringType();
4021        this.name.setValue(value);
4022      }
4023      return this;
4024    }
4025
4026    /**
4027     * @return {@link #title} (A short, descriptive, user-friendly title for the summary.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
4028     */
4029    public StringType getTitleElement() { 
4030      if (this.title == null)
4031        if (Configuration.errorOnAutoCreate())
4032          throw new Error("Attempt to auto-create Evidence.title");
4033        else if (Configuration.doAutoCreate())
4034          this.title = new StringType(); // bb
4035      return this.title;
4036    }
4037
4038    public boolean hasTitleElement() { 
4039      return this.title != null && !this.title.isEmpty();
4040    }
4041
4042    public boolean hasTitle() { 
4043      return this.title != null && !this.title.isEmpty();
4044    }
4045
4046    /**
4047     * @param value {@link #title} (A short, descriptive, user-friendly title for the summary.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
4048     */
4049    public Evidence setTitleElement(StringType value) { 
4050      this.title = value;
4051      return this;
4052    }
4053
4054    /**
4055     * @return A short, descriptive, user-friendly title for the summary.
4056     */
4057    public String getTitle() { 
4058      return this.title == null ? null : this.title.getValue();
4059    }
4060
4061    /**
4062     * @param value A short, descriptive, user-friendly title for the summary.
4063     */
4064    public Evidence setTitle(String value) { 
4065      if (Utilities.noString(value))
4066        this.title = null;
4067      else {
4068        if (this.title == null)
4069          this.title = new StringType();
4070        this.title.setValue(value);
4071      }
4072      return this;
4073    }
4074
4075    /**
4076     * @return {@link #citeAs} (Citation Resource or display of suggested citation for this evidence.)
4077     */
4078    public DataType getCiteAs() { 
4079      return this.citeAs;
4080    }
4081
4082    /**
4083     * @return {@link #citeAs} (Citation Resource or display of suggested citation for this evidence.)
4084     */
4085    public Reference getCiteAsReference() throws FHIRException { 
4086      if (this.citeAs == null)
4087        this.citeAs = new Reference();
4088      if (!(this.citeAs instanceof Reference))
4089        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.citeAs.getClass().getName()+" was encountered");
4090      return (Reference) this.citeAs;
4091    }
4092
4093    public boolean hasCiteAsReference() { 
4094      return this != null && this.citeAs instanceof Reference;
4095    }
4096
4097    /**
4098     * @return {@link #citeAs} (Citation Resource or display of suggested citation for this evidence.)
4099     */
4100    public MarkdownType getCiteAsMarkdownType() throws FHIRException { 
4101      if (this.citeAs == null)
4102        this.citeAs = new MarkdownType();
4103      if (!(this.citeAs instanceof MarkdownType))
4104        throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.citeAs.getClass().getName()+" was encountered");
4105      return (MarkdownType) this.citeAs;
4106    }
4107
4108    public boolean hasCiteAsMarkdownType() { 
4109      return this != null && this.citeAs instanceof MarkdownType;
4110    }
4111
4112    public boolean hasCiteAs() { 
4113      return this.citeAs != null && !this.citeAs.isEmpty();
4114    }
4115
4116    /**
4117     * @param value {@link #citeAs} (Citation Resource or display of suggested citation for this evidence.)
4118     */
4119    public Evidence setCiteAs(DataType value) { 
4120      if (value != null && !(value instanceof Reference || value instanceof MarkdownType))
4121        throw new Error("Not the right type for Evidence.citeAs[x]: "+value.fhirType());
4122      this.citeAs = value;
4123      return this;
4124    }
4125
4126    /**
4127     * @return {@link #status} (The status of this summary. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
4128     */
4129    public Enumeration<PublicationStatus> getStatusElement() { 
4130      if (this.status == null)
4131        if (Configuration.errorOnAutoCreate())
4132          throw new Error("Attempt to auto-create Evidence.status");
4133        else if (Configuration.doAutoCreate())
4134          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
4135      return this.status;
4136    }
4137
4138    public boolean hasStatusElement() { 
4139      return this.status != null && !this.status.isEmpty();
4140    }
4141
4142    public boolean hasStatus() { 
4143      return this.status != null && !this.status.isEmpty();
4144    }
4145
4146    /**
4147     * @param value {@link #status} (The status of this summary. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
4148     */
4149    public Evidence setStatusElement(Enumeration<PublicationStatus> value) { 
4150      this.status = value;
4151      return this;
4152    }
4153
4154    /**
4155     * @return The status of this summary. Enables tracking the life-cycle of the content.
4156     */
4157    public PublicationStatus getStatus() { 
4158      return this.status == null ? null : this.status.getValue();
4159    }
4160
4161    /**
4162     * @param value The status of this summary. Enables tracking the life-cycle of the content.
4163     */
4164    public Evidence setStatus(PublicationStatus value) { 
4165        if (this.status == null)
4166          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
4167        this.status.setValue(value);
4168      return this;
4169    }
4170
4171    /**
4172     * @return {@link #experimental} (A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
4173     */
4174    public BooleanType getExperimentalElement() { 
4175      if (this.experimental == null)
4176        if (Configuration.errorOnAutoCreate())
4177          throw new Error("Attempt to auto-create Evidence.experimental");
4178        else if (Configuration.doAutoCreate())
4179          this.experimental = new BooleanType(); // bb
4180      return this.experimental;
4181    }
4182
4183    public boolean hasExperimentalElement() { 
4184      return this.experimental != null && !this.experimental.isEmpty();
4185    }
4186
4187    public boolean hasExperimental() { 
4188      return this.experimental != null && !this.experimental.isEmpty();
4189    }
4190
4191    /**
4192     * @param value {@link #experimental} (A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
4193     */
4194    public Evidence setExperimentalElement(BooleanType value) { 
4195      this.experimental = value;
4196      return this;
4197    }
4198
4199    /**
4200     * @return A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
4201     */
4202    public boolean getExperimental() { 
4203      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
4204    }
4205
4206    /**
4207     * @param value A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
4208     */
4209    public Evidence setExperimental(boolean value) { 
4210        if (this.experimental == null)
4211          this.experimental = new BooleanType();
4212        this.experimental.setValue(value);
4213      return this;
4214    }
4215
4216    /**
4217     * @return {@link #date} (The date  (and optionally time) when the summary was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
4218     */
4219    public DateTimeType getDateElement() { 
4220      if (this.date == null)
4221        if (Configuration.errorOnAutoCreate())
4222          throw new Error("Attempt to auto-create Evidence.date");
4223        else if (Configuration.doAutoCreate())
4224          this.date = new DateTimeType(); // bb
4225      return this.date;
4226    }
4227
4228    public boolean hasDateElement() { 
4229      return this.date != null && !this.date.isEmpty();
4230    }
4231
4232    public boolean hasDate() { 
4233      return this.date != null && !this.date.isEmpty();
4234    }
4235
4236    /**
4237     * @param value {@link #date} (The date  (and optionally time) when the summary was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
4238     */
4239    public Evidence setDateElement(DateTimeType value) { 
4240      this.date = value;
4241      return this;
4242    }
4243
4244    /**
4245     * @return The date  (and optionally time) when the summary was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes.
4246     */
4247    public Date getDate() { 
4248      return this.date == null ? null : this.date.getValue();
4249    }
4250
4251    /**
4252     * @param value The date  (and optionally time) when the summary was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes.
4253     */
4254    public Evidence setDate(Date value) { 
4255      if (value == null)
4256        this.date = null;
4257      else {
4258        if (this.date == null)
4259          this.date = new DateTimeType();
4260        this.date.setValue(value);
4261      }
4262      return this;
4263    }
4264
4265    /**
4266     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances.)
4267     */
4268    public List<UsageContext> getUseContext() { 
4269      if (this.useContext == null)
4270        this.useContext = new ArrayList<UsageContext>();
4271      return this.useContext;
4272    }
4273
4274    /**
4275     * @return Returns a reference to <code>this</code> for easy method chaining
4276     */
4277    public Evidence setUseContext(List<UsageContext> theUseContext) { 
4278      this.useContext = theUseContext;
4279      return this;
4280    }
4281
4282    public boolean hasUseContext() { 
4283      if (this.useContext == null)
4284        return false;
4285      for (UsageContext item : this.useContext)
4286        if (!item.isEmpty())
4287          return true;
4288      return false;
4289    }
4290
4291    public UsageContext addUseContext() { //3
4292      UsageContext t = new UsageContext();
4293      if (this.useContext == null)
4294        this.useContext = new ArrayList<UsageContext>();
4295      this.useContext.add(t);
4296      return t;
4297    }
4298
4299    public Evidence addUseContext(UsageContext t) { //3
4300      if (t == null)
4301        return this;
4302      if (this.useContext == null)
4303        this.useContext = new ArrayList<UsageContext>();
4304      this.useContext.add(t);
4305      return this;
4306    }
4307
4308    /**
4309     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
4310     */
4311    public UsageContext getUseContextFirstRep() { 
4312      if (getUseContext().isEmpty()) {
4313        addUseContext();
4314      }
4315      return getUseContext().get(0);
4316    }
4317
4318    /**
4319     * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
4320     */
4321    public DateType getApprovalDateElement() { 
4322      if (this.approvalDate == null)
4323        if (Configuration.errorOnAutoCreate())
4324          throw new Error("Attempt to auto-create Evidence.approvalDate");
4325        else if (Configuration.doAutoCreate())
4326          this.approvalDate = new DateType(); // bb
4327      return this.approvalDate;
4328    }
4329
4330    public boolean hasApprovalDateElement() { 
4331      return this.approvalDate != null && !this.approvalDate.isEmpty();
4332    }
4333
4334    public boolean hasApprovalDate() { 
4335      return this.approvalDate != null && !this.approvalDate.isEmpty();
4336    }
4337
4338    /**
4339     * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
4340     */
4341    public Evidence setApprovalDateElement(DateType value) { 
4342      this.approvalDate = value;
4343      return this;
4344    }
4345
4346    /**
4347     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
4348     */
4349    public Date getApprovalDate() { 
4350      return this.approvalDate == null ? null : this.approvalDate.getValue();
4351    }
4352
4353    /**
4354     * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
4355     */
4356    public Evidence setApprovalDate(Date value) { 
4357      if (value == null)
4358        this.approvalDate = null;
4359      else {
4360        if (this.approvalDate == null)
4361          this.approvalDate = new DateType();
4362        this.approvalDate.setValue(value);
4363      }
4364      return this;
4365    }
4366
4367    /**
4368     * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
4369     */
4370    public DateType getLastReviewDateElement() { 
4371      if (this.lastReviewDate == null)
4372        if (Configuration.errorOnAutoCreate())
4373          throw new Error("Attempt to auto-create Evidence.lastReviewDate");
4374        else if (Configuration.doAutoCreate())
4375          this.lastReviewDate = new DateType(); // bb
4376      return this.lastReviewDate;
4377    }
4378
4379    public boolean hasLastReviewDateElement() { 
4380      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
4381    }
4382
4383    public boolean hasLastReviewDate() { 
4384      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
4385    }
4386
4387    /**
4388     * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
4389     */
4390    public Evidence setLastReviewDateElement(DateType value) { 
4391      this.lastReviewDate = value;
4392      return this;
4393    }
4394
4395    /**
4396     * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
4397     */
4398    public Date getLastReviewDate() { 
4399      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
4400    }
4401
4402    /**
4403     * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
4404     */
4405    public Evidence setLastReviewDate(Date value) { 
4406      if (value == null)
4407        this.lastReviewDate = null;
4408      else {
4409        if (this.lastReviewDate == null)
4410          this.lastReviewDate = new DateType();
4411        this.lastReviewDate.setValue(value);
4412      }
4413      return this;
4414    }
4415
4416    /**
4417     * @return {@link #publisher} (The name of the organization or individual that published the evidence.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
4418     */
4419    public StringType getPublisherElement() { 
4420      if (this.publisher == null)
4421        if (Configuration.errorOnAutoCreate())
4422          throw new Error("Attempt to auto-create Evidence.publisher");
4423        else if (Configuration.doAutoCreate())
4424          this.publisher = new StringType(); // bb
4425      return this.publisher;
4426    }
4427
4428    public boolean hasPublisherElement() { 
4429      return this.publisher != null && !this.publisher.isEmpty();
4430    }
4431
4432    public boolean hasPublisher() { 
4433      return this.publisher != null && !this.publisher.isEmpty();
4434    }
4435
4436    /**
4437     * @param value {@link #publisher} (The name of the organization or individual that published the evidence.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
4438     */
4439    public Evidence setPublisherElement(StringType value) { 
4440      this.publisher = value;
4441      return this;
4442    }
4443
4444    /**
4445     * @return The name of the organization or individual that published the evidence.
4446     */
4447    public String getPublisher() { 
4448      return this.publisher == null ? null : this.publisher.getValue();
4449    }
4450
4451    /**
4452     * @param value The name of the organization or individual that published the evidence.
4453     */
4454    public Evidence setPublisher(String value) { 
4455      if (Utilities.noString(value))
4456        this.publisher = null;
4457      else {
4458        if (this.publisher == null)
4459          this.publisher = new StringType();
4460        this.publisher.setValue(value);
4461      }
4462      return this;
4463    }
4464
4465    /**
4466     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
4467     */
4468    public List<ContactDetail> getContact() { 
4469      if (this.contact == null)
4470        this.contact = new ArrayList<ContactDetail>();
4471      return this.contact;
4472    }
4473
4474    /**
4475     * @return Returns a reference to <code>this</code> for easy method chaining
4476     */
4477    public Evidence setContact(List<ContactDetail> theContact) { 
4478      this.contact = theContact;
4479      return this;
4480    }
4481
4482    public boolean hasContact() { 
4483      if (this.contact == null)
4484        return false;
4485      for (ContactDetail item : this.contact)
4486        if (!item.isEmpty())
4487          return true;
4488      return false;
4489    }
4490
4491    public ContactDetail addContact() { //3
4492      ContactDetail t = new ContactDetail();
4493      if (this.contact == null)
4494        this.contact = new ArrayList<ContactDetail>();
4495      this.contact.add(t);
4496      return t;
4497    }
4498
4499    public Evidence addContact(ContactDetail t) { //3
4500      if (t == null)
4501        return this;
4502      if (this.contact == null)
4503        this.contact = new ArrayList<ContactDetail>();
4504      this.contact.add(t);
4505      return this;
4506    }
4507
4508    /**
4509     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
4510     */
4511    public ContactDetail getContactFirstRep() { 
4512      if (getContact().isEmpty()) {
4513        addContact();
4514      }
4515      return getContact().get(0);
4516    }
4517
4518    /**
4519     * @return {@link #author} (An individiual, organization, or device primarily involved in the creation and maintenance of the content.)
4520     */
4521    public List<ContactDetail> getAuthor() { 
4522      if (this.author == null)
4523        this.author = new ArrayList<ContactDetail>();
4524      return this.author;
4525    }
4526
4527    /**
4528     * @return Returns a reference to <code>this</code> for easy method chaining
4529     */
4530    public Evidence setAuthor(List<ContactDetail> theAuthor) { 
4531      this.author = theAuthor;
4532      return this;
4533    }
4534
4535    public boolean hasAuthor() { 
4536      if (this.author == null)
4537        return false;
4538      for (ContactDetail item : this.author)
4539        if (!item.isEmpty())
4540          return true;
4541      return false;
4542    }
4543
4544    public ContactDetail addAuthor() { //3
4545      ContactDetail t = new ContactDetail();
4546      if (this.author == null)
4547        this.author = new ArrayList<ContactDetail>();
4548      this.author.add(t);
4549      return t;
4550    }
4551
4552    public Evidence addAuthor(ContactDetail t) { //3
4553      if (t == null)
4554        return this;
4555      if (this.author == null)
4556        this.author = new ArrayList<ContactDetail>();
4557      this.author.add(t);
4558      return this;
4559    }
4560
4561    /**
4562     * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {3}
4563     */
4564    public ContactDetail getAuthorFirstRep() { 
4565      if (getAuthor().isEmpty()) {
4566        addAuthor();
4567      }
4568      return getAuthor().get(0);
4569    }
4570
4571    /**
4572     * @return {@link #editor} (An individiual, organization, or device primarily responsible for internal coherence of the content.)
4573     */
4574    public List<ContactDetail> getEditor() { 
4575      if (this.editor == null)
4576        this.editor = new ArrayList<ContactDetail>();
4577      return this.editor;
4578    }
4579
4580    /**
4581     * @return Returns a reference to <code>this</code> for easy method chaining
4582     */
4583    public Evidence setEditor(List<ContactDetail> theEditor) { 
4584      this.editor = theEditor;
4585      return this;
4586    }
4587
4588    public boolean hasEditor() { 
4589      if (this.editor == null)
4590        return false;
4591      for (ContactDetail item : this.editor)
4592        if (!item.isEmpty())
4593          return true;
4594      return false;
4595    }
4596
4597    public ContactDetail addEditor() { //3
4598      ContactDetail t = new ContactDetail();
4599      if (this.editor == null)
4600        this.editor = new ArrayList<ContactDetail>();
4601      this.editor.add(t);
4602      return t;
4603    }
4604
4605    public Evidence addEditor(ContactDetail t) { //3
4606      if (t == null)
4607        return this;
4608      if (this.editor == null)
4609        this.editor = new ArrayList<ContactDetail>();
4610      this.editor.add(t);
4611      return this;
4612    }
4613
4614    /**
4615     * @return The first repetition of repeating field {@link #editor}, creating it if it does not already exist {3}
4616     */
4617    public ContactDetail getEditorFirstRep() { 
4618      if (getEditor().isEmpty()) {
4619        addEditor();
4620      }
4621      return getEditor().get(0);
4622    }
4623
4624    /**
4625     * @return {@link #reviewer} (An individiual, organization, or device primarily responsible for review of some aspect of the content.)
4626     */
4627    public List<ContactDetail> getReviewer() { 
4628      if (this.reviewer == null)
4629        this.reviewer = new ArrayList<ContactDetail>();
4630      return this.reviewer;
4631    }
4632
4633    /**
4634     * @return Returns a reference to <code>this</code> for easy method chaining
4635     */
4636    public Evidence setReviewer(List<ContactDetail> theReviewer) { 
4637      this.reviewer = theReviewer;
4638      return this;
4639    }
4640
4641    public boolean hasReviewer() { 
4642      if (this.reviewer == null)
4643        return false;
4644      for (ContactDetail item : this.reviewer)
4645        if (!item.isEmpty())
4646          return true;
4647      return false;
4648    }
4649
4650    public ContactDetail addReviewer() { //3
4651      ContactDetail t = new ContactDetail();
4652      if (this.reviewer == null)
4653        this.reviewer = new ArrayList<ContactDetail>();
4654      this.reviewer.add(t);
4655      return t;
4656    }
4657
4658    public Evidence addReviewer(ContactDetail t) { //3
4659      if (t == null)
4660        return this;
4661      if (this.reviewer == null)
4662        this.reviewer = new ArrayList<ContactDetail>();
4663      this.reviewer.add(t);
4664      return this;
4665    }
4666
4667    /**
4668     * @return The first repetition of repeating field {@link #reviewer}, creating it if it does not already exist {3}
4669     */
4670    public ContactDetail getReviewerFirstRep() { 
4671      if (getReviewer().isEmpty()) {
4672        addReviewer();
4673      }
4674      return getReviewer().get(0);
4675    }
4676
4677    /**
4678     * @return {@link #endorser} (An individiual, organization, or device responsible for officially endorsing the content for use in some setting.)
4679     */
4680    public List<ContactDetail> getEndorser() { 
4681      if (this.endorser == null)
4682        this.endorser = new ArrayList<ContactDetail>();
4683      return this.endorser;
4684    }
4685
4686    /**
4687     * @return Returns a reference to <code>this</code> for easy method chaining
4688     */
4689    public Evidence setEndorser(List<ContactDetail> theEndorser) { 
4690      this.endorser = theEndorser;
4691      return this;
4692    }
4693
4694    public boolean hasEndorser() { 
4695      if (this.endorser == null)
4696        return false;
4697      for (ContactDetail item : this.endorser)
4698        if (!item.isEmpty())
4699          return true;
4700      return false;
4701    }
4702
4703    public ContactDetail addEndorser() { //3
4704      ContactDetail t = new ContactDetail();
4705      if (this.endorser == null)
4706        this.endorser = new ArrayList<ContactDetail>();
4707      this.endorser.add(t);
4708      return t;
4709    }
4710
4711    public Evidence addEndorser(ContactDetail t) { //3
4712      if (t == null)
4713        return this;
4714      if (this.endorser == null)
4715        this.endorser = new ArrayList<ContactDetail>();
4716      this.endorser.add(t);
4717      return this;
4718    }
4719
4720    /**
4721     * @return The first repetition of repeating field {@link #endorser}, creating it if it does not already exist {3}
4722     */
4723    public ContactDetail getEndorserFirstRep() { 
4724      if (getEndorser().isEmpty()) {
4725        addEndorser();
4726      }
4727      return getEndorser().get(0);
4728    }
4729
4730    /**
4731     * @return {@link #relatedArtifact} (Link or citation to artifact associated with the summary.)
4732     */
4733    public List<RelatedArtifact> getRelatedArtifact() { 
4734      if (this.relatedArtifact == null)
4735        this.relatedArtifact = new ArrayList<RelatedArtifact>();
4736      return this.relatedArtifact;
4737    }
4738
4739    /**
4740     * @return Returns a reference to <code>this</code> for easy method chaining
4741     */
4742    public Evidence setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
4743      this.relatedArtifact = theRelatedArtifact;
4744      return this;
4745    }
4746
4747    public boolean hasRelatedArtifact() { 
4748      if (this.relatedArtifact == null)
4749        return false;
4750      for (RelatedArtifact item : this.relatedArtifact)
4751        if (!item.isEmpty())
4752          return true;
4753      return false;
4754    }
4755
4756    public RelatedArtifact addRelatedArtifact() { //3
4757      RelatedArtifact t = new RelatedArtifact();
4758      if (this.relatedArtifact == null)
4759        this.relatedArtifact = new ArrayList<RelatedArtifact>();
4760      this.relatedArtifact.add(t);
4761      return t;
4762    }
4763
4764    public Evidence addRelatedArtifact(RelatedArtifact t) { //3
4765      if (t == null)
4766        return this;
4767      if (this.relatedArtifact == null)
4768        this.relatedArtifact = new ArrayList<RelatedArtifact>();
4769      this.relatedArtifact.add(t);
4770      return this;
4771    }
4772
4773    /**
4774     * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {3}
4775     */
4776    public RelatedArtifact getRelatedArtifactFirstRep() { 
4777      if (getRelatedArtifact().isEmpty()) {
4778        addRelatedArtifact();
4779      }
4780      return getRelatedArtifact().get(0);
4781    }
4782
4783    /**
4784     * @return {@link #description} (A free text natural language description of the evidence from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4785     */
4786    public MarkdownType getDescriptionElement() { 
4787      if (this.description == null)
4788        if (Configuration.errorOnAutoCreate())
4789          throw new Error("Attempt to auto-create Evidence.description");
4790        else if (Configuration.doAutoCreate())
4791          this.description = new MarkdownType(); // bb
4792      return this.description;
4793    }
4794
4795    public boolean hasDescriptionElement() { 
4796      return this.description != null && !this.description.isEmpty();
4797    }
4798
4799    public boolean hasDescription() { 
4800      return this.description != null && !this.description.isEmpty();
4801    }
4802
4803    /**
4804     * @param value {@link #description} (A free text natural language description of the evidence from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4805     */
4806    public Evidence setDescriptionElement(MarkdownType value) { 
4807      this.description = value;
4808      return this;
4809    }
4810
4811    /**
4812     * @return A free text natural language description of the evidence from a consumer's perspective.
4813     */
4814    public String getDescription() { 
4815      return this.description == null ? null : this.description.getValue();
4816    }
4817
4818    /**
4819     * @param value A free text natural language description of the evidence from a consumer's perspective.
4820     */
4821    public Evidence setDescription(String value) { 
4822      if (value == null)
4823        this.description = null;
4824      else {
4825        if (this.description == null)
4826          this.description = new MarkdownType();
4827        this.description.setValue(value);
4828      }
4829      return this;
4830    }
4831
4832    /**
4833     * @return {@link #assertion} (Declarative description of the Evidence.). This is the underlying object with id, value and extensions. The accessor "getAssertion" gives direct access to the value
4834     */
4835    public MarkdownType getAssertionElement() { 
4836      if (this.assertion == null)
4837        if (Configuration.errorOnAutoCreate())
4838          throw new Error("Attempt to auto-create Evidence.assertion");
4839        else if (Configuration.doAutoCreate())
4840          this.assertion = new MarkdownType(); // bb
4841      return this.assertion;
4842    }
4843
4844    public boolean hasAssertionElement() { 
4845      return this.assertion != null && !this.assertion.isEmpty();
4846    }
4847
4848    public boolean hasAssertion() { 
4849      return this.assertion != null && !this.assertion.isEmpty();
4850    }
4851
4852    /**
4853     * @param value {@link #assertion} (Declarative description of the Evidence.). This is the underlying object with id, value and extensions. The accessor "getAssertion" gives direct access to the value
4854     */
4855    public Evidence setAssertionElement(MarkdownType value) { 
4856      this.assertion = value;
4857      return this;
4858    }
4859
4860    /**
4861     * @return Declarative description of the Evidence.
4862     */
4863    public String getAssertion() { 
4864      return this.assertion == null ? null : this.assertion.getValue();
4865    }
4866
4867    /**
4868     * @param value Declarative description of the Evidence.
4869     */
4870    public Evidence setAssertion(String value) { 
4871      if (value == null)
4872        this.assertion = null;
4873      else {
4874        if (this.assertion == null)
4875          this.assertion = new MarkdownType();
4876        this.assertion.setValue(value);
4877      }
4878      return this;
4879    }
4880
4881    /**
4882     * @return {@link #note} (Footnotes and/or explanatory notes.)
4883     */
4884    public List<Annotation> getNote() { 
4885      if (this.note == null)
4886        this.note = new ArrayList<Annotation>();
4887      return this.note;
4888    }
4889
4890    /**
4891     * @return Returns a reference to <code>this</code> for easy method chaining
4892     */
4893    public Evidence setNote(List<Annotation> theNote) { 
4894      this.note = theNote;
4895      return this;
4896    }
4897
4898    public boolean hasNote() { 
4899      if (this.note == null)
4900        return false;
4901      for (Annotation item : this.note)
4902        if (!item.isEmpty())
4903          return true;
4904      return false;
4905    }
4906
4907    public Annotation addNote() { //3
4908      Annotation t = new Annotation();
4909      if (this.note == null)
4910        this.note = new ArrayList<Annotation>();
4911      this.note.add(t);
4912      return t;
4913    }
4914
4915    public Evidence addNote(Annotation t) { //3
4916      if (t == null)
4917        return this;
4918      if (this.note == null)
4919        this.note = new ArrayList<Annotation>();
4920      this.note.add(t);
4921      return this;
4922    }
4923
4924    /**
4925     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
4926     */
4927    public Annotation getNoteFirstRep() { 
4928      if (getNote().isEmpty()) {
4929        addNote();
4930      }
4931      return getNote().get(0);
4932    }
4933
4934    /**
4935     * @return {@link #variableDefinition} (Evidence variable such as population, exposure, or outcome.)
4936     */
4937    public List<EvidenceVariableDefinitionComponent> getVariableDefinition() { 
4938      if (this.variableDefinition == null)
4939        this.variableDefinition = new ArrayList<EvidenceVariableDefinitionComponent>();
4940      return this.variableDefinition;
4941    }
4942
4943    /**
4944     * @return Returns a reference to <code>this</code> for easy method chaining
4945     */
4946    public Evidence setVariableDefinition(List<EvidenceVariableDefinitionComponent> theVariableDefinition) { 
4947      this.variableDefinition = theVariableDefinition;
4948      return this;
4949    }
4950
4951    public boolean hasVariableDefinition() { 
4952      if (this.variableDefinition == null)
4953        return false;
4954      for (EvidenceVariableDefinitionComponent item : this.variableDefinition)
4955        if (!item.isEmpty())
4956          return true;
4957      return false;
4958    }
4959
4960    public EvidenceVariableDefinitionComponent addVariableDefinition() { //3
4961      EvidenceVariableDefinitionComponent t = new EvidenceVariableDefinitionComponent();
4962      if (this.variableDefinition == null)
4963        this.variableDefinition = new ArrayList<EvidenceVariableDefinitionComponent>();
4964      this.variableDefinition.add(t);
4965      return t;
4966    }
4967
4968    public Evidence addVariableDefinition(EvidenceVariableDefinitionComponent t) { //3
4969      if (t == null)
4970        return this;
4971      if (this.variableDefinition == null)
4972        this.variableDefinition = new ArrayList<EvidenceVariableDefinitionComponent>();
4973      this.variableDefinition.add(t);
4974      return this;
4975    }
4976
4977    /**
4978     * @return The first repetition of repeating field {@link #variableDefinition}, creating it if it does not already exist {3}
4979     */
4980    public EvidenceVariableDefinitionComponent getVariableDefinitionFirstRep() { 
4981      if (getVariableDefinition().isEmpty()) {
4982        addVariableDefinition();
4983      }
4984      return getVariableDefinition().get(0);
4985    }
4986
4987    /**
4988     * @return {@link #synthesisType} (The method to combine studies.)
4989     */
4990    public CodeableConcept getSynthesisType() { 
4991      if (this.synthesisType == null)
4992        if (Configuration.errorOnAutoCreate())
4993          throw new Error("Attempt to auto-create Evidence.synthesisType");
4994        else if (Configuration.doAutoCreate())
4995          this.synthesisType = new CodeableConcept(); // cc
4996      return this.synthesisType;
4997    }
4998
4999    public boolean hasSynthesisType() { 
5000      return this.synthesisType != null && !this.synthesisType.isEmpty();
5001    }
5002
5003    /**
5004     * @param value {@link #synthesisType} (The method to combine studies.)
5005     */
5006    public Evidence setSynthesisType(CodeableConcept value) { 
5007      this.synthesisType = value;
5008      return this;
5009    }
5010
5011    /**
5012     * @return {@link #studyType} (The type of study that produced this evidence.)
5013     */
5014    public CodeableConcept getStudyType() { 
5015      if (this.studyType == null)
5016        if (Configuration.errorOnAutoCreate())
5017          throw new Error("Attempt to auto-create Evidence.studyType");
5018        else if (Configuration.doAutoCreate())
5019          this.studyType = new CodeableConcept(); // cc
5020      return this.studyType;
5021    }
5022
5023    public boolean hasStudyType() { 
5024      return this.studyType != null && !this.studyType.isEmpty();
5025    }
5026
5027    /**
5028     * @param value {@link #studyType} (The type of study that produced this evidence.)
5029     */
5030    public Evidence setStudyType(CodeableConcept value) { 
5031      this.studyType = value;
5032      return this;
5033    }
5034
5035    /**
5036     * @return {@link #statistic} (Values and parameters for a single statistic.)
5037     */
5038    public List<EvidenceStatisticComponent> getStatistic() { 
5039      if (this.statistic == null)
5040        this.statistic = new ArrayList<EvidenceStatisticComponent>();
5041      return this.statistic;
5042    }
5043
5044    /**
5045     * @return Returns a reference to <code>this</code> for easy method chaining
5046     */
5047    public Evidence setStatistic(List<EvidenceStatisticComponent> theStatistic) { 
5048      this.statistic = theStatistic;
5049      return this;
5050    }
5051
5052    public boolean hasStatistic() { 
5053      if (this.statistic == null)
5054        return false;
5055      for (EvidenceStatisticComponent item : this.statistic)
5056        if (!item.isEmpty())
5057          return true;
5058      return false;
5059    }
5060
5061    public EvidenceStatisticComponent addStatistic() { //3
5062      EvidenceStatisticComponent t = new EvidenceStatisticComponent();
5063      if (this.statistic == null)
5064        this.statistic = new ArrayList<EvidenceStatisticComponent>();
5065      this.statistic.add(t);
5066      return t;
5067    }
5068
5069    public Evidence addStatistic(EvidenceStatisticComponent t) { //3
5070      if (t == null)
5071        return this;
5072      if (this.statistic == null)
5073        this.statistic = new ArrayList<EvidenceStatisticComponent>();
5074      this.statistic.add(t);
5075      return this;
5076    }
5077
5078    /**
5079     * @return The first repetition of repeating field {@link #statistic}, creating it if it does not already exist {3}
5080     */
5081    public EvidenceStatisticComponent getStatisticFirstRep() { 
5082      if (getStatistic().isEmpty()) {
5083        addStatistic();
5084      }
5085      return getStatistic().get(0);
5086    }
5087
5088    /**
5089     * @return {@link #certainty} (Assessment of certainty, confidence in the estimates, or quality of the evidence.)
5090     */
5091    public List<EvidenceCertaintyComponent> getCertainty() { 
5092      if (this.certainty == null)
5093        this.certainty = new ArrayList<EvidenceCertaintyComponent>();
5094      return this.certainty;
5095    }
5096
5097    /**
5098     * @return Returns a reference to <code>this</code> for easy method chaining
5099     */
5100    public Evidence setCertainty(List<EvidenceCertaintyComponent> theCertainty) { 
5101      this.certainty = theCertainty;
5102      return this;
5103    }
5104
5105    public boolean hasCertainty() { 
5106      if (this.certainty == null)
5107        return false;
5108      for (EvidenceCertaintyComponent item : this.certainty)
5109        if (!item.isEmpty())
5110          return true;
5111      return false;
5112    }
5113
5114    public EvidenceCertaintyComponent addCertainty() { //3
5115      EvidenceCertaintyComponent t = new EvidenceCertaintyComponent();
5116      if (this.certainty == null)
5117        this.certainty = new ArrayList<EvidenceCertaintyComponent>();
5118      this.certainty.add(t);
5119      return t;
5120    }
5121
5122    public Evidence addCertainty(EvidenceCertaintyComponent t) { //3
5123      if (t == null)
5124        return this;
5125      if (this.certainty == null)
5126        this.certainty = new ArrayList<EvidenceCertaintyComponent>();
5127      this.certainty.add(t);
5128      return this;
5129    }
5130
5131    /**
5132     * @return The first repetition of repeating field {@link #certainty}, creating it if it does not already exist {3}
5133     */
5134    public EvidenceCertaintyComponent getCertaintyFirstRep() { 
5135      if (getCertainty().isEmpty()) {
5136        addCertainty();
5137      }
5138      return getCertainty().get(0);
5139    }
5140
5141    /**
5142     * not supported on this implementation
5143     */
5144    @Override
5145    public int getJurisdictionMax() { 
5146      return 0;
5147    }
5148    /**
5149     * @return {@link #jurisdiction} (A legal or geographic region in which the evidence is intended to be used.)
5150     */
5151    public List<CodeableConcept> getJurisdiction() { 
5152      return new ArrayList<>();
5153    }
5154    /**
5155     * @return Returns a reference to <code>this</code> for easy method chaining
5156     */
5157    public Evidence setJurisdiction(List<CodeableConcept> theJurisdiction) { 
5158      throw new Error("The resource type \"Evidence\" does not implement the property \"jurisdiction\"");
5159    }
5160    public boolean hasJurisdiction() { 
5161      return false;
5162    }
5163
5164    public CodeableConcept addJurisdiction() { //3
5165      throw new Error("The resource type \"Evidence\" does not implement the property \"jurisdiction\"");
5166    }
5167    public Evidence addJurisdiction(CodeableConcept t) { //3
5168      throw new Error("The resource type \"Evidence\" does not implement the property \"jurisdiction\"");
5169    }
5170    /**
5171     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {2}
5172     */
5173    public CodeableConcept getJurisdictionFirstRep() { 
5174      throw new Error("The resource type \"Evidence\" does not implement the property \"jurisdiction\"");
5175    }
5176    /**
5177     * not supported on this implementation
5178     */
5179    @Override
5180    public int getPurposeMax() { 
5181      return 0;
5182    }
5183    /**
5184     * @return {@link #purpose} (Explanation of why this evidence is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
5185     */
5186    public MarkdownType getPurposeElement() { 
5187      throw new Error("The resource type \"Evidence\" does not implement the property \"purpose\"");
5188    }
5189
5190    public boolean hasPurposeElement() { 
5191      return false;
5192    }
5193    public boolean hasPurpose() {
5194      return false;
5195    }
5196
5197    /**
5198     * @param value {@link #purpose} (Explanation of why this evidence is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
5199     */
5200    public Evidence setPurposeElement(MarkdownType value) { 
5201      throw new Error("The resource type \"Evidence\" does not implement the property \"purpose\"");
5202    }
5203    public String getPurpose() { 
5204      throw new Error("The resource type \"Evidence\" does not implement the property \"purpose\"");
5205    }
5206    /**
5207     * @param value Explanation of why this evidence is needed and why it has been designed as it has.
5208     */
5209    public Evidence setPurpose(String value) { 
5210      throw new Error("The resource type \"Evidence\" does not implement the property \"purpose\"");
5211    }
5212    /**
5213     * not supported on this implementation
5214     */
5215    @Override
5216    public int getCopyrightMax() { 
5217      return 0;
5218    }
5219    /**
5220     * @return {@link #copyright} (A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
5221     */
5222    public MarkdownType getCopyrightElement() { 
5223      throw new Error("The resource type \"Evidence\" does not implement the property \"copyright\"");
5224    }
5225
5226    public boolean hasCopyrightElement() { 
5227      return false;
5228    }
5229    public boolean hasCopyright() {
5230      return false;
5231    }
5232
5233    /**
5234     * @param value {@link #copyright} (A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
5235     */
5236    public Evidence setCopyrightElement(MarkdownType value) { 
5237      throw new Error("The resource type \"Evidence\" does not implement the property \"copyright\"");
5238    }
5239    public String getCopyright() { 
5240      throw new Error("The resource type \"Evidence\" does not implement the property \"copyright\"");
5241    }
5242    /**
5243     * @param value A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence.
5244     */
5245    public Evidence setCopyright(String value) { 
5246      throw new Error("The resource type \"Evidence\" does not implement the property \"copyright\"");
5247    }
5248    /**
5249     * not supported on this implementation
5250     */
5251    @Override
5252    public int getEffectivePeriodMax() { 
5253      return 0;
5254    }
5255    /**
5256     * @return {@link #effectivePeriod} (The period during which the evidence content was or is planned to be in active use.)
5257     */
5258    public Period getEffectivePeriod() { 
5259      throw new Error("The resource type \"Evidence\" does not implement the property \"effectivePeriod\"");
5260    }
5261    public boolean hasEffectivePeriod() { 
5262      return false;
5263    }
5264    /**
5265     * @param value {@link #effectivePeriod} (The period during which the evidence content was or is planned to be in active use.)
5266     */
5267    public Evidence setEffectivePeriod(Period value) { 
5268      throw new Error("The resource type \"Evidence\" does not implement the property \"effectivePeriod\"");
5269    }
5270
5271    /**
5272     * not supported on this implementation
5273     */
5274    @Override
5275    public int getTopicMax() { 
5276      return 0;
5277    }
5278    /**
5279     * @return {@link #topic} (Descriptive topics related to the content of the evidence. Topics provide a high-level categorization of the evidence that can be useful for filtering and searching.)
5280     */
5281    public List<CodeableConcept> getTopic() { 
5282      return new ArrayList<>();
5283    }
5284    /**
5285     * @return Returns a reference to <code>this</code> for easy method chaining
5286     */
5287    public Evidence setTopic(List<CodeableConcept> theTopic) { 
5288      throw new Error("The resource type \"Evidence\" does not implement the property \"topic\"");
5289    }
5290    public boolean hasTopic() { 
5291      return false;
5292    }
5293
5294    public CodeableConcept addTopic() { //3
5295      throw new Error("The resource type \"Evidence\" does not implement the property \"topic\"");
5296    }
5297    public Evidence addTopic(CodeableConcept t) { //3
5298      throw new Error("The resource type \"Evidence\" does not implement the property \"topic\"");
5299    }
5300    /**
5301     * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist {2}
5302     */
5303    public CodeableConcept getTopicFirstRep() { 
5304      throw new Error("The resource type \"Evidence\" does not implement the property \"topic\"");
5305    }
5306      protected void listChildren(List<Property> children) {
5307        super.listChildren(children);
5308        children.add(new Property("url", "uri", "An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.", 0, 1, url));
5309        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this summary when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
5310        children.add(new Property("version", "string", "The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version));
5311        children.add(new Property("name", "string", "A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
5312        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the summary.", 0, 1, title));
5313        children.add(new Property("citeAs[x]", "Reference(Citation)|markdown", "Citation Resource or display of suggested citation for this evidence.", 0, 1, citeAs));
5314        children.add(new Property("status", "code", "The status of this summary. Enables tracking the life-cycle of the content.", 0, 1, status));
5315        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
5316        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the summary was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes.", 0, 1, date));
5317        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
5318        children.add(new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate));
5319        children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate));
5320        children.add(new Property("publisher", "string", "The name of the organization or individual that published the evidence.", 0, 1, publisher));
5321        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
5322        children.add(new Property("author", "ContactDetail", "An individiual, organization, or device primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author));
5323        children.add(new Property("editor", "ContactDetail", "An individiual, organization, or device primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor));
5324        children.add(new Property("reviewer", "ContactDetail", "An individiual, organization, or device primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer));
5325        children.add(new Property("endorser", "ContactDetail", "An individiual, organization, or device responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser));
5326        children.add(new Property("relatedArtifact", "RelatedArtifact", "Link or citation to artifact associated with the summary.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact));
5327        children.add(new Property("description", "markdown", "A free text natural language description of the evidence from a consumer's perspective.", 0, 1, description));
5328        children.add(new Property("assertion", "markdown", "Declarative description of the Evidence.", 0, 1, assertion));
5329        children.add(new Property("note", "Annotation", "Footnotes and/or explanatory notes.", 0, java.lang.Integer.MAX_VALUE, note));
5330        children.add(new Property("variableDefinition", "", "Evidence variable such as population, exposure, or outcome.", 0, java.lang.Integer.MAX_VALUE, variableDefinition));
5331        children.add(new Property("synthesisType", "CodeableConcept", "The method to combine studies.", 0, 1, synthesisType));
5332        children.add(new Property("studyType", "CodeableConcept", "The type of study that produced this evidence.", 0, 1, studyType));
5333        children.add(new Property("statistic", "", "Values and parameters for a single statistic.", 0, java.lang.Integer.MAX_VALUE, statistic));
5334        children.add(new Property("certainty", "", "Assessment of certainty, confidence in the estimates, or quality of the evidence.", 0, java.lang.Integer.MAX_VALUE, certainty));
5335      }
5336
5337      @Override
5338      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5339        switch (_hash) {
5340        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.", 0, 1, url);
5341        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this summary when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
5342        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version);
5343        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
5344        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the summary.", 0, 1, title);
5345        case -1706539017: /*citeAs[x]*/  return new Property("citeAs[x]", "Reference(Citation)|markdown", "Citation Resource or display of suggested citation for this evidence.", 0, 1, citeAs);
5346        case -1360156695: /*citeAs*/  return new Property("citeAs[x]", "Reference(Citation)|markdown", "Citation Resource or display of suggested citation for this evidence.", 0, 1, citeAs);
5347        case 1269009762: /*citeAsReference*/  return new Property("citeAs[x]", "Reference(Citation)", "Citation Resource or display of suggested citation for this evidence.", 0, 1, citeAs);
5348        case 456265720: /*citeAsMarkdown*/  return new Property("citeAs[x]", "markdown", "Citation Resource or display of suggested citation for this evidence.", 0, 1, citeAs);
5349        case -892481550: /*status*/  return new Property("status", "code", "The status of this summary. Enables tracking the life-cycle of the content.", 0, 1, status);
5350        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
5351        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the summary was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes.", 0, 1, date);
5352        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
5353        case 223539345: /*approvalDate*/  return new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate);
5354        case -1687512484: /*lastReviewDate*/  return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate);
5355        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the evidence.", 0, 1, publisher);
5356        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
5357        case -1406328437: /*author*/  return new Property("author", "ContactDetail", "An individiual, organization, or device primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author);
5358        case -1307827859: /*editor*/  return new Property("editor", "ContactDetail", "An individiual, organization, or device primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor);
5359        case -261190139: /*reviewer*/  return new Property("reviewer", "ContactDetail", "An individiual, organization, or device primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer);
5360        case 1740277666: /*endorser*/  return new Property("endorser", "ContactDetail", "An individiual, organization, or device responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser);
5361        case 666807069: /*relatedArtifact*/  return new Property("relatedArtifact", "RelatedArtifact", "Link or citation to artifact associated with the summary.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact);
5362        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the evidence from a consumer's perspective.", 0, 1, description);
5363        case 1314395906: /*assertion*/  return new Property("assertion", "markdown", "Declarative description of the Evidence.", 0, 1, assertion);
5364        case 3387378: /*note*/  return new Property("note", "Annotation", "Footnotes and/or explanatory notes.", 0, java.lang.Integer.MAX_VALUE, note);
5365        case -1807222545: /*variableDefinition*/  return new Property("variableDefinition", "", "Evidence variable such as population, exposure, or outcome.", 0, java.lang.Integer.MAX_VALUE, variableDefinition);
5366        case 672726254: /*synthesisType*/  return new Property("synthesisType", "CodeableConcept", "The method to combine studies.", 0, 1, synthesisType);
5367        case -1955265373: /*studyType*/  return new Property("studyType", "CodeableConcept", "The type of study that produced this evidence.", 0, 1, studyType);
5368        case -2081261232: /*statistic*/  return new Property("statistic", "", "Values and parameters for a single statistic.", 0, java.lang.Integer.MAX_VALUE, statistic);
5369        case -1404142937: /*certainty*/  return new Property("certainty", "", "Assessment of certainty, confidence in the estimates, or quality of the evidence.", 0, java.lang.Integer.MAX_VALUE, certainty);
5370        default: return super.getNamedProperty(_hash, _name, _checkValid);
5371        }
5372
5373      }
5374
5375      @Override
5376      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5377        switch (hash) {
5378        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
5379        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
5380        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
5381        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
5382        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
5383        case -1360156695: /*citeAs*/ return this.citeAs == null ? new Base[0] : new Base[] {this.citeAs}; // DataType
5384        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
5385        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
5386        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
5387        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
5388        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
5389        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
5390        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
5391        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
5392        case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail
5393        case -1307827859: /*editor*/ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail
5394        case -261190139: /*reviewer*/ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail
5395        case 1740277666: /*endorser*/ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail
5396        case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
5397        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
5398        case 1314395906: /*assertion*/ return this.assertion == null ? new Base[0] : new Base[] {this.assertion}; // MarkdownType
5399        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
5400        case -1807222545: /*variableDefinition*/ return this.variableDefinition == null ? new Base[0] : this.variableDefinition.toArray(new Base[this.variableDefinition.size()]); // EvidenceVariableDefinitionComponent
5401        case 672726254: /*synthesisType*/ return this.synthesisType == null ? new Base[0] : new Base[] {this.synthesisType}; // CodeableConcept
5402        case -1955265373: /*studyType*/ return this.studyType == null ? new Base[0] : new Base[] {this.studyType}; // CodeableConcept
5403        case -2081261232: /*statistic*/ return this.statistic == null ? new Base[0] : this.statistic.toArray(new Base[this.statistic.size()]); // EvidenceStatisticComponent
5404        case -1404142937: /*certainty*/ return this.certainty == null ? new Base[0] : this.certainty.toArray(new Base[this.certainty.size()]); // EvidenceCertaintyComponent
5405        default: return super.getProperty(hash, name, checkValid);
5406        }
5407
5408      }
5409
5410      @Override
5411      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5412        switch (hash) {
5413        case 116079: // url
5414          this.url = TypeConvertor.castToUri(value); // UriType
5415          return value;
5416        case -1618432855: // identifier
5417          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
5418          return value;
5419        case 351608024: // version
5420          this.version = TypeConvertor.castToString(value); // StringType
5421          return value;
5422        case 3373707: // name
5423          this.name = TypeConvertor.castToString(value); // StringType
5424          return value;
5425        case 110371416: // title
5426          this.title = TypeConvertor.castToString(value); // StringType
5427          return value;
5428        case -1360156695: // citeAs
5429          this.citeAs = TypeConvertor.castToType(value); // DataType
5430          return value;
5431        case -892481550: // status
5432          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
5433          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
5434          return value;
5435        case -404562712: // experimental
5436          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
5437          return value;
5438        case 3076014: // date
5439          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
5440          return value;
5441        case -669707736: // useContext
5442          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
5443          return value;
5444        case 223539345: // approvalDate
5445          this.approvalDate = TypeConvertor.castToDate(value); // DateType
5446          return value;
5447        case -1687512484: // lastReviewDate
5448          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
5449          return value;
5450        case 1447404028: // publisher
5451          this.publisher = TypeConvertor.castToString(value); // StringType
5452          return value;
5453        case 951526432: // contact
5454          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
5455          return value;
5456        case -1406328437: // author
5457          this.getAuthor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
5458          return value;
5459        case -1307827859: // editor
5460          this.getEditor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
5461          return value;
5462        case -261190139: // reviewer
5463          this.getReviewer().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
5464          return value;
5465        case 1740277666: // endorser
5466          this.getEndorser().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
5467          return value;
5468        case 666807069: // relatedArtifact
5469          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact
5470          return value;
5471        case -1724546052: // description
5472          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
5473          return value;
5474        case 1314395906: // assertion
5475          this.assertion = TypeConvertor.castToMarkdown(value); // MarkdownType
5476          return value;
5477        case 3387378: // note
5478          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
5479          return value;
5480        case -1807222545: // variableDefinition
5481          this.getVariableDefinition().add((EvidenceVariableDefinitionComponent) value); // EvidenceVariableDefinitionComponent
5482          return value;
5483        case 672726254: // synthesisType
5484          this.synthesisType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5485          return value;
5486        case -1955265373: // studyType
5487          this.studyType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5488          return value;
5489        case -2081261232: // statistic
5490          this.getStatistic().add((EvidenceStatisticComponent) value); // EvidenceStatisticComponent
5491          return value;
5492        case -1404142937: // certainty
5493          this.getCertainty().add((EvidenceCertaintyComponent) value); // EvidenceCertaintyComponent
5494          return value;
5495        default: return super.setProperty(hash, name, value);
5496        }
5497
5498      }
5499
5500      @Override
5501      public Base setProperty(String name, Base value) throws FHIRException {
5502        if (name.equals("url")) {
5503          this.url = TypeConvertor.castToUri(value); // UriType
5504        } else if (name.equals("identifier")) {
5505          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
5506        } else if (name.equals("version")) {
5507          this.version = TypeConvertor.castToString(value); // StringType
5508        } else if (name.equals("name")) {
5509          this.name = TypeConvertor.castToString(value); // StringType
5510        } else if (name.equals("title")) {
5511          this.title = TypeConvertor.castToString(value); // StringType
5512        } else if (name.equals("citeAs[x]")) {
5513          this.citeAs = TypeConvertor.castToType(value); // DataType
5514        } else if (name.equals("status")) {
5515          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
5516          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
5517        } else if (name.equals("experimental")) {
5518          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
5519        } else if (name.equals("date")) {
5520          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
5521        } else if (name.equals("useContext")) {
5522          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
5523        } else if (name.equals("approvalDate")) {
5524          this.approvalDate = TypeConvertor.castToDate(value); // DateType
5525        } else if (name.equals("lastReviewDate")) {
5526          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
5527        } else if (name.equals("publisher")) {
5528          this.publisher = TypeConvertor.castToString(value); // StringType
5529        } else if (name.equals("contact")) {
5530          this.getContact().add(TypeConvertor.castToContactDetail(value));
5531        } else if (name.equals("author")) {
5532          this.getAuthor().add(TypeConvertor.castToContactDetail(value));
5533        } else if (name.equals("editor")) {
5534          this.getEditor().add(TypeConvertor.castToContactDetail(value));
5535        } else if (name.equals("reviewer")) {
5536          this.getReviewer().add(TypeConvertor.castToContactDetail(value));
5537        } else if (name.equals("endorser")) {
5538          this.getEndorser().add(TypeConvertor.castToContactDetail(value));
5539        } else if (name.equals("relatedArtifact")) {
5540          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value));
5541        } else if (name.equals("description")) {
5542          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
5543        } else if (name.equals("assertion")) {
5544          this.assertion = TypeConvertor.castToMarkdown(value); // MarkdownType
5545        } else if (name.equals("note")) {
5546          this.getNote().add(TypeConvertor.castToAnnotation(value));
5547        } else if (name.equals("variableDefinition")) {
5548          this.getVariableDefinition().add((EvidenceVariableDefinitionComponent) value);
5549        } else if (name.equals("synthesisType")) {
5550          this.synthesisType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5551        } else if (name.equals("studyType")) {
5552          this.studyType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5553        } else if (name.equals("statistic")) {
5554          this.getStatistic().add((EvidenceStatisticComponent) value);
5555        } else if (name.equals("certainty")) {
5556          this.getCertainty().add((EvidenceCertaintyComponent) value);
5557        } else
5558          return super.setProperty(name, value);
5559        return value;
5560      }
5561
5562      @Override
5563      public Base makeProperty(int hash, String name) throws FHIRException {
5564        switch (hash) {
5565        case 116079:  return getUrlElement();
5566        case -1618432855:  return addIdentifier(); 
5567        case 351608024:  return getVersionElement();
5568        case 3373707:  return getNameElement();
5569        case 110371416:  return getTitleElement();
5570        case -1706539017:  return getCiteAs();
5571        case -1360156695:  return getCiteAs();
5572        case -892481550:  return getStatusElement();
5573        case -404562712:  return getExperimentalElement();
5574        case 3076014:  return getDateElement();
5575        case -669707736:  return addUseContext(); 
5576        case 223539345:  return getApprovalDateElement();
5577        case -1687512484:  return getLastReviewDateElement();
5578        case 1447404028:  return getPublisherElement();
5579        case 951526432:  return addContact(); 
5580        case -1406328437:  return addAuthor(); 
5581        case -1307827859:  return addEditor(); 
5582        case -261190139:  return addReviewer(); 
5583        case 1740277666:  return addEndorser(); 
5584        case 666807069:  return addRelatedArtifact(); 
5585        case -1724546052:  return getDescriptionElement();
5586        case 1314395906:  return getAssertionElement();
5587        case 3387378:  return addNote(); 
5588        case -1807222545:  return addVariableDefinition(); 
5589        case 672726254:  return getSynthesisType();
5590        case -1955265373:  return getStudyType();
5591        case -2081261232:  return addStatistic(); 
5592        case -1404142937:  return addCertainty(); 
5593        default: return super.makeProperty(hash, name);
5594        }
5595
5596      }
5597
5598      @Override
5599      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5600        switch (hash) {
5601        case 116079: /*url*/ return new String[] {"uri"};
5602        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
5603        case 351608024: /*version*/ return new String[] {"string"};
5604        case 3373707: /*name*/ return new String[] {"string"};
5605        case 110371416: /*title*/ return new String[] {"string"};
5606        case -1360156695: /*citeAs*/ return new String[] {"Reference", "markdown"};
5607        case -892481550: /*status*/ return new String[] {"code"};
5608        case -404562712: /*experimental*/ return new String[] {"boolean"};
5609        case 3076014: /*date*/ return new String[] {"dateTime"};
5610        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
5611        case 223539345: /*approvalDate*/ return new String[] {"date"};
5612        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
5613        case 1447404028: /*publisher*/ return new String[] {"string"};
5614        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
5615        case -1406328437: /*author*/ return new String[] {"ContactDetail"};
5616        case -1307827859: /*editor*/ return new String[] {"ContactDetail"};
5617        case -261190139: /*reviewer*/ return new String[] {"ContactDetail"};
5618        case 1740277666: /*endorser*/ return new String[] {"ContactDetail"};
5619        case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"};
5620        case -1724546052: /*description*/ return new String[] {"markdown"};
5621        case 1314395906: /*assertion*/ return new String[] {"markdown"};
5622        case 3387378: /*note*/ return new String[] {"Annotation"};
5623        case -1807222545: /*variableDefinition*/ return new String[] {};
5624        case 672726254: /*synthesisType*/ return new String[] {"CodeableConcept"};
5625        case -1955265373: /*studyType*/ return new String[] {"CodeableConcept"};
5626        case -2081261232: /*statistic*/ return new String[] {};
5627        case -1404142937: /*certainty*/ return new String[] {};
5628        default: return super.getTypesForProperty(hash, name);
5629        }
5630
5631      }
5632
5633      @Override
5634      public Base addChild(String name) throws FHIRException {
5635        if (name.equals("url")) {
5636          throw new FHIRException("Cannot call addChild on a primitive type Evidence.url");
5637        }
5638        else if (name.equals("identifier")) {
5639          return addIdentifier();
5640        }
5641        else if (name.equals("version")) {
5642          throw new FHIRException("Cannot call addChild on a primitive type Evidence.version");
5643        }
5644        else if (name.equals("name")) {
5645          throw new FHIRException("Cannot call addChild on a primitive type Evidence.name");
5646        }
5647        else if (name.equals("title")) {
5648          throw new FHIRException("Cannot call addChild on a primitive type Evidence.title");
5649        }
5650        else if (name.equals("citeAsReference")) {
5651          this.citeAs = new Reference();
5652          return this.citeAs;
5653        }
5654        else if (name.equals("citeAsMarkdown")) {
5655          this.citeAs = new MarkdownType();
5656          return this.citeAs;
5657        }
5658        else if (name.equals("status")) {
5659          throw new FHIRException("Cannot call addChild on a primitive type Evidence.status");
5660        }
5661        else if (name.equals("experimental")) {
5662          throw new FHIRException("Cannot call addChild on a primitive type Evidence.experimental");
5663        }
5664        else if (name.equals("date")) {
5665          throw new FHIRException("Cannot call addChild on a primitive type Evidence.date");
5666        }
5667        else if (name.equals("useContext")) {
5668          return addUseContext();
5669        }
5670        else if (name.equals("approvalDate")) {
5671          throw new FHIRException("Cannot call addChild on a primitive type Evidence.approvalDate");
5672        }
5673        else if (name.equals("lastReviewDate")) {
5674          throw new FHIRException("Cannot call addChild on a primitive type Evidence.lastReviewDate");
5675        }
5676        else if (name.equals("publisher")) {
5677          throw new FHIRException("Cannot call addChild on a primitive type Evidence.publisher");
5678        }
5679        else if (name.equals("contact")) {
5680          return addContact();
5681        }
5682        else if (name.equals("author")) {
5683          return addAuthor();
5684        }
5685        else if (name.equals("editor")) {
5686          return addEditor();
5687        }
5688        else if (name.equals("reviewer")) {
5689          return addReviewer();
5690        }
5691        else if (name.equals("endorser")) {
5692          return addEndorser();
5693        }
5694        else if (name.equals("relatedArtifact")) {
5695          return addRelatedArtifact();
5696        }
5697        else if (name.equals("description")) {
5698          throw new FHIRException("Cannot call addChild on a primitive type Evidence.description");
5699        }
5700        else if (name.equals("assertion")) {
5701          throw new FHIRException("Cannot call addChild on a primitive type Evidence.assertion");
5702        }
5703        else if (name.equals("note")) {
5704          return addNote();
5705        }
5706        else if (name.equals("variableDefinition")) {
5707          return addVariableDefinition();
5708        }
5709        else if (name.equals("synthesisType")) {
5710          this.synthesisType = new CodeableConcept();
5711          return this.synthesisType;
5712        }
5713        else if (name.equals("studyType")) {
5714          this.studyType = new CodeableConcept();
5715          return this.studyType;
5716        }
5717        else if (name.equals("statistic")) {
5718          return addStatistic();
5719        }
5720        else if (name.equals("certainty")) {
5721          return addCertainty();
5722        }
5723        else
5724          return super.addChild(name);
5725      }
5726
5727  public String fhirType() {
5728    return "Evidence";
5729
5730  }
5731
5732      public Evidence copy() {
5733        Evidence dst = new Evidence();
5734        copyValues(dst);
5735        return dst;
5736      }
5737
5738      public void copyValues(Evidence dst) {
5739        super.copyValues(dst);
5740        dst.url = url == null ? null : url.copy();
5741        if (identifier != null) {
5742          dst.identifier = new ArrayList<Identifier>();
5743          for (Identifier i : identifier)
5744            dst.identifier.add(i.copy());
5745        };
5746        dst.version = version == null ? null : version.copy();
5747        dst.name = name == null ? null : name.copy();
5748        dst.title = title == null ? null : title.copy();
5749        dst.citeAs = citeAs == null ? null : citeAs.copy();
5750        dst.status = status == null ? null : status.copy();
5751        dst.experimental = experimental == null ? null : experimental.copy();
5752        dst.date = date == null ? null : date.copy();
5753        if (useContext != null) {
5754          dst.useContext = new ArrayList<UsageContext>();
5755          for (UsageContext i : useContext)
5756            dst.useContext.add(i.copy());
5757        };
5758        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
5759        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
5760        dst.publisher = publisher == null ? null : publisher.copy();
5761        if (contact != null) {
5762          dst.contact = new ArrayList<ContactDetail>();
5763          for (ContactDetail i : contact)
5764            dst.contact.add(i.copy());
5765        };
5766        if (author != null) {
5767          dst.author = new ArrayList<ContactDetail>();
5768          for (ContactDetail i : author)
5769            dst.author.add(i.copy());
5770        };
5771        if (editor != null) {
5772          dst.editor = new ArrayList<ContactDetail>();
5773          for (ContactDetail i : editor)
5774            dst.editor.add(i.copy());
5775        };
5776        if (reviewer != null) {
5777          dst.reviewer = new ArrayList<ContactDetail>();
5778          for (ContactDetail i : reviewer)
5779            dst.reviewer.add(i.copy());
5780        };
5781        if (endorser != null) {
5782          dst.endorser = new ArrayList<ContactDetail>();
5783          for (ContactDetail i : endorser)
5784            dst.endorser.add(i.copy());
5785        };
5786        if (relatedArtifact != null) {
5787          dst.relatedArtifact = new ArrayList<RelatedArtifact>();
5788          for (RelatedArtifact i : relatedArtifact)
5789            dst.relatedArtifact.add(i.copy());
5790        };
5791        dst.description = description == null ? null : description.copy();
5792        dst.assertion = assertion == null ? null : assertion.copy();
5793        if (note != null) {
5794          dst.note = new ArrayList<Annotation>();
5795          for (Annotation i : note)
5796            dst.note.add(i.copy());
5797        };
5798        if (variableDefinition != null) {
5799          dst.variableDefinition = new ArrayList<EvidenceVariableDefinitionComponent>();
5800          for (EvidenceVariableDefinitionComponent i : variableDefinition)
5801            dst.variableDefinition.add(i.copy());
5802        };
5803        dst.synthesisType = synthesisType == null ? null : synthesisType.copy();
5804        dst.studyType = studyType == null ? null : studyType.copy();
5805        if (statistic != null) {
5806          dst.statistic = new ArrayList<EvidenceStatisticComponent>();
5807          for (EvidenceStatisticComponent i : statistic)
5808            dst.statistic.add(i.copy());
5809        };
5810        if (certainty != null) {
5811          dst.certainty = new ArrayList<EvidenceCertaintyComponent>();
5812          for (EvidenceCertaintyComponent i : certainty)
5813            dst.certainty.add(i.copy());
5814        };
5815      }
5816
5817      protected Evidence typedCopy() {
5818        return copy();
5819      }
5820
5821      @Override
5822      public boolean equalsDeep(Base other_) {
5823        if (!super.equalsDeep(other_))
5824          return false;
5825        if (!(other_ instanceof Evidence))
5826          return false;
5827        Evidence o = (Evidence) other_;
5828        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
5829           && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(citeAs, o.citeAs, true)
5830           && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(date, o.date, true)
5831           && compareDeep(useContext, o.useContext, true) && compareDeep(approvalDate, o.approvalDate, true)
5832           && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(publisher, o.publisher, true)
5833           && compareDeep(contact, o.contact, true) && compareDeep(author, o.author, true) && compareDeep(editor, o.editor, true)
5834           && compareDeep(reviewer, o.reviewer, true) && compareDeep(endorser, o.endorser, true) && compareDeep(relatedArtifact, o.relatedArtifact, true)
5835           && compareDeep(description, o.description, true) && compareDeep(assertion, o.assertion, true) && compareDeep(note, o.note, true)
5836           && compareDeep(variableDefinition, o.variableDefinition, true) && compareDeep(synthesisType, o.synthesisType, true)
5837           && compareDeep(studyType, o.studyType, true) && compareDeep(statistic, o.statistic, true) && compareDeep(certainty, o.certainty, true)
5838          ;
5839      }
5840
5841      @Override
5842      public boolean equalsShallow(Base other_) {
5843        if (!super.equalsShallow(other_))
5844          return false;
5845        if (!(other_ instanceof Evidence))
5846          return false;
5847        Evidence o = (Evidence) other_;
5848        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
5849           && compareValues(title, o.title, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true)
5850           && compareValues(date, o.date, true) && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true)
5851           && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(assertion, o.assertion, true)
5852          ;
5853      }
5854
5855      public boolean isEmpty() {
5856        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
5857          , name, title, citeAs, status, experimental, date, useContext, approvalDate
5858          , lastReviewDate, publisher, contact, author, editor, reviewer, endorser, relatedArtifact
5859          , description, assertion, note, variableDefinition, synthesisType, studyType, statistic
5860          , certainty);
5861      }
5862
5863  @Override
5864  public ResourceType getResourceType() {
5865    return ResourceType.Evidence;
5866   }
5867
5868 /**
5869   * Search parameter: <b>context-quantity</b>
5870   * <p>
5871   * Description: <b>A quantity- or range-valued use context assigned to the evidence</b><br>
5872   * Type: <b>quantity</b><br>
5873   * Path: <b>(Evidence.useContext.value as Quantity) | (Evidence.useContext.value as Range)</b><br>
5874   * </p>
5875   */
5876  @SearchParamDefinition(name="context-quantity", path="(Evidence.useContext.value as Quantity) | (Evidence.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the evidence", type="quantity" )
5877  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
5878 /**
5879   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
5880   * <p>
5881   * Description: <b>A quantity- or range-valued use context assigned to the evidence</b><br>
5882   * Type: <b>quantity</b><br>
5883   * Path: <b>(Evidence.useContext.value as Quantity) | (Evidence.useContext.value as Range)</b><br>
5884   * </p>
5885   */
5886  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
5887
5888 /**
5889   * Search parameter: <b>context-type-quantity</b>
5890   * <p>
5891   * Description: <b>A use context type and quantity- or range-based value assigned to the evidence</b><br>
5892   * Type: <b>composite</b><br>
5893   * Path: <b>Evidence.useContext</b><br>
5894   * </p>
5895   */
5896  @SearchParamDefinition(name="context-type-quantity", path="Evidence.useContext", description="A use context type and quantity- or range-based value assigned to the evidence", type="composite", compositeOf={"context-type", "context-quantity"} )
5897  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
5898 /**
5899   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
5900   * <p>
5901   * Description: <b>A use context type and quantity- or range-based value assigned to the evidence</b><br>
5902   * Type: <b>composite</b><br>
5903   * Path: <b>Evidence.useContext</b><br>
5904   * </p>
5905   */
5906  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
5907
5908 /**
5909   * Search parameter: <b>context-type-value</b>
5910   * <p>
5911   * Description: <b>A use context type and value assigned to the evidence</b><br>
5912   * Type: <b>composite</b><br>
5913   * Path: <b>Evidence.useContext</b><br>
5914   * </p>
5915   */
5916  @SearchParamDefinition(name="context-type-value", path="Evidence.useContext", description="A use context type and value assigned to the evidence", type="composite", compositeOf={"context-type", "context"} )
5917  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
5918 /**
5919   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
5920   * <p>
5921   * Description: <b>A use context type and value assigned to the evidence</b><br>
5922   * Type: <b>composite</b><br>
5923   * Path: <b>Evidence.useContext</b><br>
5924   * </p>
5925   */
5926  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
5927
5928 /**
5929   * Search parameter: <b>context-type</b>
5930   * <p>
5931   * Description: <b>A type of use context assigned to the evidence</b><br>
5932   * Type: <b>token</b><br>
5933   * Path: <b>Evidence.useContext.code</b><br>
5934   * </p>
5935   */
5936  @SearchParamDefinition(name="context-type", path="Evidence.useContext.code", description="A type of use context assigned to the evidence", type="token" )
5937  public static final String SP_CONTEXT_TYPE = "context-type";
5938 /**
5939   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
5940   * <p>
5941   * Description: <b>A type of use context assigned to the evidence</b><br>
5942   * Type: <b>token</b><br>
5943   * Path: <b>Evidence.useContext.code</b><br>
5944   * </p>
5945   */
5946  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
5947
5948 /**
5949   * Search parameter: <b>context</b>
5950   * <p>
5951   * Description: <b>A use context assigned to the evidence</b><br>
5952   * Type: <b>token</b><br>
5953   * Path: <b>(Evidence.useContext.value as CodeableConcept)</b><br>
5954   * </p>
5955   */
5956  @SearchParamDefinition(name="context", path="(Evidence.useContext.value as CodeableConcept)", description="A use context assigned to the evidence", type="token" )
5957  public static final String SP_CONTEXT = "context";
5958 /**
5959   * <b>Fluent Client</b> search parameter constant for <b>context</b>
5960   * <p>
5961   * Description: <b>A use context assigned to the evidence</b><br>
5962   * Type: <b>token</b><br>
5963   * Path: <b>(Evidence.useContext.value as CodeableConcept)</b><br>
5964   * </p>
5965   */
5966  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
5967
5968 /**
5969   * Search parameter: <b>date</b>
5970   * <p>
5971   * Description: <b>The evidence publication date</b><br>
5972   * Type: <b>date</b><br>
5973   * Path: <b>Evidence.date</b><br>
5974   * </p>
5975   */
5976  @SearchParamDefinition(name="date", path="Evidence.date", description="The evidence publication date", type="date" )
5977  public static final String SP_DATE = "date";
5978 /**
5979   * <b>Fluent Client</b> search parameter constant for <b>date</b>
5980   * <p>
5981   * Description: <b>The evidence publication date</b><br>
5982   * Type: <b>date</b><br>
5983   * Path: <b>Evidence.date</b><br>
5984   * </p>
5985   */
5986  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
5987
5988 /**
5989   * Search parameter: <b>description</b>
5990   * <p>
5991   * Description: <b>The description of the evidence</b><br>
5992   * Type: <b>string</b><br>
5993   * Path: <b>Evidence.description</b><br>
5994   * </p>
5995   */
5996  @SearchParamDefinition(name="description", path="Evidence.description", description="The description of the evidence", type="string" )
5997  public static final String SP_DESCRIPTION = "description";
5998 /**
5999   * <b>Fluent Client</b> search parameter constant for <b>description</b>
6000   * <p>
6001   * Description: <b>The description of the evidence</b><br>
6002   * Type: <b>string</b><br>
6003   * Path: <b>Evidence.description</b><br>
6004   * </p>
6005   */
6006  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
6007
6008 /**
6009   * Search parameter: <b>identifier</b>
6010   * <p>
6011   * Description: <b>External identifier for the evidence</b><br>
6012   * Type: <b>token</b><br>
6013   * Path: <b>Evidence.identifier</b><br>
6014   * </p>
6015   */
6016  @SearchParamDefinition(name="identifier", path="Evidence.identifier", description="External identifier for the evidence", type="token" )
6017  public static final String SP_IDENTIFIER = "identifier";
6018 /**
6019   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
6020   * <p>
6021   * Description: <b>External identifier for the evidence</b><br>
6022   * Type: <b>token</b><br>
6023   * Path: <b>Evidence.identifier</b><br>
6024   * </p>
6025   */
6026  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
6027
6028 /**
6029   * Search parameter: <b>publisher</b>
6030   * <p>
6031   * Description: <b>Name of the publisher of the evidence</b><br>
6032   * Type: <b>string</b><br>
6033   * Path: <b>Evidence.publisher</b><br>
6034   * </p>
6035   */
6036  @SearchParamDefinition(name="publisher", path="Evidence.publisher", description="Name of the publisher of the evidence", type="string" )
6037  public static final String SP_PUBLISHER = "publisher";
6038 /**
6039   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
6040   * <p>
6041   * Description: <b>Name of the publisher of the evidence</b><br>
6042   * Type: <b>string</b><br>
6043   * Path: <b>Evidence.publisher</b><br>
6044   * </p>
6045   */
6046  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
6047
6048 /**
6049   * Search parameter: <b>status</b>
6050   * <p>
6051   * Description: <b>The current status of the evidence</b><br>
6052   * Type: <b>token</b><br>
6053   * Path: <b>Evidence.status</b><br>
6054   * </p>
6055   */
6056  @SearchParamDefinition(name="status", path="Evidence.status", description="The current status of the evidence", type="token" )
6057  public static final String SP_STATUS = "status";
6058 /**
6059   * <b>Fluent Client</b> search parameter constant for <b>status</b>
6060   * <p>
6061   * Description: <b>The current status of the evidence</b><br>
6062   * Type: <b>token</b><br>
6063   * Path: <b>Evidence.status</b><br>
6064   * </p>
6065   */
6066  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
6067
6068 /**
6069   * Search parameter: <b>title</b>
6070   * <p>
6071   * Description: <b>The human-friendly name of the evidence</b><br>
6072   * Type: <b>string</b><br>
6073   * Path: <b>Evidence.title</b><br>
6074   * </p>
6075   */
6076  @SearchParamDefinition(name="title", path="Evidence.title", description="The human-friendly name of the evidence", type="string" )
6077  public static final String SP_TITLE = "title";
6078 /**
6079   * <b>Fluent Client</b> search parameter constant for <b>title</b>
6080   * <p>
6081   * Description: <b>The human-friendly name of the evidence</b><br>
6082   * Type: <b>string</b><br>
6083   * Path: <b>Evidence.title</b><br>
6084   * </p>
6085   */
6086  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
6087
6088 /**
6089   * Search parameter: <b>url</b>
6090   * <p>
6091   * Description: <b>The uri that identifies the evidence</b><br>
6092   * Type: <b>uri</b><br>
6093   * Path: <b>Evidence.url</b><br>
6094   * </p>
6095   */
6096  @SearchParamDefinition(name="url", path="Evidence.url", description="The uri that identifies the evidence", type="uri" )
6097  public static final String SP_URL = "url";
6098 /**
6099   * <b>Fluent Client</b> search parameter constant for <b>url</b>
6100   * <p>
6101   * Description: <b>The uri that identifies the evidence</b><br>
6102   * Type: <b>uri</b><br>
6103   * Path: <b>Evidence.url</b><br>
6104   * </p>
6105   */
6106  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
6107
6108 /**
6109   * Search parameter: <b>version</b>
6110   * <p>
6111   * Description: <b>The business version of the evidence</b><br>
6112   * Type: <b>token</b><br>
6113   * Path: <b>Evidence.version</b><br>
6114   * </p>
6115   */
6116  @SearchParamDefinition(name="version", path="Evidence.version", description="The business version of the evidence", type="token" )
6117  public static final String SP_VERSION = "version";
6118 /**
6119   * <b>Fluent Client</b> search parameter constant for <b>version</b>
6120   * <p>
6121   * Description: <b>The business version of the evidence</b><br>
6122   * Type: <b>token</b><br>
6123   * Path: <b>Evidence.version</b><br>
6124   * </p>
6125   */
6126  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
6127
6128
6129}
6130