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