001package org.hl7.fhir.r4b.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r4b.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * The EvidenceVariable resource describes an element that knowledge (Evidence) is about.
052 */
053@ResourceDef(name="EvidenceVariable", profile="http://hl7.org/fhir/StructureDefinition/EvidenceVariable")
054public class EvidenceVariable extends DomainResource {
055
056    public enum CharacteristicCombination {
057        /**
058         * Combine characteristics with AND.
059         */
060        INTERSECTION, 
061        /**
062         * Combine characteristics with OR.
063         */
064        UNION, 
065        /**
066         * added to help the parsers with the generic types
067         */
068        NULL;
069        public static CharacteristicCombination fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("intersection".equals(codeString))
073          return INTERSECTION;
074        if ("union".equals(codeString))
075          return UNION;
076        if (Configuration.isAcceptInvalidEnums())
077          return null;
078        else
079          throw new FHIRException("Unknown CharacteristicCombination code '"+codeString+"'");
080        }
081        public String toCode() {
082          switch (this) {
083            case INTERSECTION: return "intersection";
084            case UNION: return "union";
085            case NULL: return null;
086            default: return "?";
087          }
088        }
089        public String getSystem() {
090          switch (this) {
091            case INTERSECTION: return "http://hl7.org/fhir/characteristic-combination";
092            case UNION: return "http://hl7.org/fhir/characteristic-combination";
093            case NULL: return null;
094            default: return "?";
095          }
096        }
097        public String getDefinition() {
098          switch (this) {
099            case INTERSECTION: return "Combine characteristics with AND.";
100            case UNION: return "Combine characteristics with OR.";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDisplay() {
106          switch (this) {
107            case INTERSECTION: return "intersection";
108            case UNION: return "union";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113    }
114
115  public static class CharacteristicCombinationEnumFactory implements EnumFactory<CharacteristicCombination> {
116    public CharacteristicCombination fromCode(String codeString) throws IllegalArgumentException {
117      if (codeString == null || "".equals(codeString))
118            if (codeString == null || "".equals(codeString))
119                return null;
120        if ("intersection".equals(codeString))
121          return CharacteristicCombination.INTERSECTION;
122        if ("union".equals(codeString))
123          return CharacteristicCombination.UNION;
124        throw new IllegalArgumentException("Unknown CharacteristicCombination code '"+codeString+"'");
125        }
126        public Enumeration<CharacteristicCombination> fromType(Base code) throws FHIRException {
127          if (code == null)
128            return null;
129          if (code.isEmpty())
130            return new Enumeration<CharacteristicCombination>(this);
131          String codeString = ((PrimitiveType) code).asStringValue();
132          if (codeString == null || "".equals(codeString))
133            return null;
134        if ("intersection".equals(codeString))
135          return new Enumeration<CharacteristicCombination>(this, CharacteristicCombination.INTERSECTION);
136        if ("union".equals(codeString))
137          return new Enumeration<CharacteristicCombination>(this, CharacteristicCombination.UNION);
138        throw new FHIRException("Unknown CharacteristicCombination code '"+codeString+"'");
139        }
140    public String toCode(CharacteristicCombination code) {
141      if (code == CharacteristicCombination.INTERSECTION)
142        return "intersection";
143      if (code == CharacteristicCombination.UNION)
144        return "union";
145      return "?";
146      }
147    public String toSystem(CharacteristicCombination code) {
148      return code.getSystem();
149      }
150    }
151
152    @Block()
153    public static class EvidenceVariableCharacteristicComponent extends BackboneElement implements IBaseBackboneElement {
154        /**
155         * A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.
156         */
157        @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
158        @Description(shortDefinition="Natural language description of the characteristic", formalDefinition="A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user." )
159        protected StringType description;
160
161        /**
162         * Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).
163         */
164        @Child(name = "definition", type = {Group.class, EvidenceVariable.class, CanonicalType.class, CodeableConcept.class, Expression.class}, order=2, min=1, max=1, modifier=false, summary=true)
165        @Description(shortDefinition="What code or expression defines members?", formalDefinition="Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year)." )
166        protected DataType definition;
167
168        /**
169         * Method used for describing characteristic.
170         */
171        @Child(name = "method", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
172        @Description(shortDefinition="Method used for describing characteristic", formalDefinition="Method used for describing characteristic." )
173        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/characteristic-method")
174        protected CodeableConcept method;
175
176        /**
177         * Device used for determining characteristic.
178         */
179        @Child(name = "device", type = {Device.class, DeviceMetric.class}, order=4, min=0, max=1, modifier=false, summary=false)
180        @Description(shortDefinition="Device used for determining characteristic", formalDefinition="Device used for determining characteristic." )
181        protected Reference device;
182
183        /**
184         * When true, members with this characteristic are excluded from the element.
185         */
186        @Child(name = "exclude", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false)
187        @Description(shortDefinition="Whether the characteristic includes or excludes members", formalDefinition="When true, members with this characteristic are excluded from the element." )
188        protected BooleanType exclude;
189
190        /**
191         * Indicates duration, period, or point of observation from the participant's study entry.
192         */
193        @Child(name = "timeFromStart", type = {}, order=6, min=0, max=1, modifier=false, summary=false)
194        @Description(shortDefinition="Observation time from study start", formalDefinition="Indicates duration, period, or point of observation from the participant's study entry." )
195        protected EvidenceVariableCharacteristicTimeFromStartComponent timeFromStart;
196
197        /**
198         * Indicates how elements are aggregated within the study effective period.
199         */
200        @Child(name = "groupMeasure", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false)
201        @Description(shortDefinition="mean | median | mean-of-mean | mean-of-median | median-of-mean | median-of-median", formalDefinition="Indicates how elements are aggregated within the study effective period." )
202        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/group-measure")
203        protected Enumeration<GroupMeasure> groupMeasure;
204
205        private static final long serialVersionUID = 173999603L;
206
207    /**
208     * Constructor
209     */
210      public EvidenceVariableCharacteristicComponent() {
211        super();
212      }
213
214    /**
215     * Constructor
216     */
217      public EvidenceVariableCharacteristicComponent(DataType definition) {
218        super();
219        this.setDefinition(definition);
220      }
221
222        /**
223         * @return {@link #description} (A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
224         */
225        public StringType getDescriptionElement() { 
226          if (this.description == null)
227            if (Configuration.errorOnAutoCreate())
228              throw new Error("Attempt to auto-create EvidenceVariableCharacteristicComponent.description");
229            else if (Configuration.doAutoCreate())
230              this.description = new StringType(); // bb
231          return this.description;
232        }
233
234        public boolean hasDescriptionElement() { 
235          return this.description != null && !this.description.isEmpty();
236        }
237
238        public boolean hasDescription() { 
239          return this.description != null && !this.description.isEmpty();
240        }
241
242        /**
243         * @param value {@link #description} (A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
244         */
245        public EvidenceVariableCharacteristicComponent setDescriptionElement(StringType value) { 
246          this.description = value;
247          return this;
248        }
249
250        /**
251         * @return A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.
252         */
253        public String getDescription() { 
254          return this.description == null ? null : this.description.getValue();
255        }
256
257        /**
258         * @param value A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.
259         */
260        public EvidenceVariableCharacteristicComponent setDescription(String value) { 
261          if (Utilities.noString(value))
262            this.description = null;
263          else {
264            if (this.description == null)
265              this.description = new StringType();
266            this.description.setValue(value);
267          }
268          return this;
269        }
270
271        /**
272         * @return {@link #definition} (Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).)
273         */
274        public DataType getDefinition() { 
275          return this.definition;
276        }
277
278        /**
279         * @return {@link #definition} (Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).)
280         */
281        public Reference getDefinitionReference() throws FHIRException { 
282          if (this.definition == null)
283            this.definition = new Reference();
284          if (!(this.definition instanceof Reference))
285            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.definition.getClass().getName()+" was encountered");
286          return (Reference) this.definition;
287        }
288
289        public boolean hasDefinitionReference() { 
290          return this != null && this.definition instanceof Reference;
291        }
292
293        /**
294         * @return {@link #definition} (Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).)
295         */
296        public CanonicalType getDefinitionCanonicalType() throws FHIRException { 
297          if (this.definition == null)
298            this.definition = new CanonicalType();
299          if (!(this.definition instanceof CanonicalType))
300            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.definition.getClass().getName()+" was encountered");
301          return (CanonicalType) this.definition;
302        }
303
304        public boolean hasDefinitionCanonicalType() { 
305          return this != null && this.definition instanceof CanonicalType;
306        }
307
308        /**
309         * @return {@link #definition} (Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).)
310         */
311        public CodeableConcept getDefinitionCodeableConcept() throws FHIRException { 
312          if (this.definition == null)
313            this.definition = new CodeableConcept();
314          if (!(this.definition instanceof CodeableConcept))
315            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.definition.getClass().getName()+" was encountered");
316          return (CodeableConcept) this.definition;
317        }
318
319        public boolean hasDefinitionCodeableConcept() { 
320          return this != null && this.definition instanceof CodeableConcept;
321        }
322
323        /**
324         * @return {@link #definition} (Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).)
325         */
326        public Expression getDefinitionExpression() throws FHIRException { 
327          if (this.definition == null)
328            this.definition = new Expression();
329          if (!(this.definition instanceof Expression))
330            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.definition.getClass().getName()+" was encountered");
331          return (Expression) this.definition;
332        }
333
334        public boolean hasDefinitionExpression() { 
335          return this != null && this.definition instanceof Expression;
336        }
337
338        public boolean hasDefinition() { 
339          return this.definition != null && !this.definition.isEmpty();
340        }
341
342        /**
343         * @param value {@link #definition} (Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).)
344         */
345        public EvidenceVariableCharacteristicComponent setDefinition(DataType value) { 
346          if (value != null && !(value instanceof Reference || value instanceof CanonicalType || value instanceof CodeableConcept || value instanceof Expression))
347            throw new Error("Not the right type for EvidenceVariable.characteristic.definition[x]: "+value.fhirType());
348          this.definition = value;
349          return this;
350        }
351
352        /**
353         * @return {@link #method} (Method used for describing characteristic.)
354         */
355        public CodeableConcept getMethod() { 
356          if (this.method == null)
357            if (Configuration.errorOnAutoCreate())
358              throw new Error("Attempt to auto-create EvidenceVariableCharacteristicComponent.method");
359            else if (Configuration.doAutoCreate())
360              this.method = new CodeableConcept(); // cc
361          return this.method;
362        }
363
364        public boolean hasMethod() { 
365          return this.method != null && !this.method.isEmpty();
366        }
367
368        /**
369         * @param value {@link #method} (Method used for describing characteristic.)
370         */
371        public EvidenceVariableCharacteristicComponent setMethod(CodeableConcept value) { 
372          this.method = value;
373          return this;
374        }
375
376        /**
377         * @return {@link #device} (Device used for determining characteristic.)
378         */
379        public Reference getDevice() { 
380          if (this.device == null)
381            if (Configuration.errorOnAutoCreate())
382              throw new Error("Attempt to auto-create EvidenceVariableCharacteristicComponent.device");
383            else if (Configuration.doAutoCreate())
384              this.device = new Reference(); // cc
385          return this.device;
386        }
387
388        public boolean hasDevice() { 
389          return this.device != null && !this.device.isEmpty();
390        }
391
392        /**
393         * @param value {@link #device} (Device used for determining characteristic.)
394         */
395        public EvidenceVariableCharacteristicComponent setDevice(Reference value) { 
396          this.device = value;
397          return this;
398        }
399
400        /**
401         * @return {@link #exclude} (When true, members with this characteristic are excluded from the element.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value
402         */
403        public BooleanType getExcludeElement() { 
404          if (this.exclude == null)
405            if (Configuration.errorOnAutoCreate())
406              throw new Error("Attempt to auto-create EvidenceVariableCharacteristicComponent.exclude");
407            else if (Configuration.doAutoCreate())
408              this.exclude = new BooleanType(); // bb
409          return this.exclude;
410        }
411
412        public boolean hasExcludeElement() { 
413          return this.exclude != null && !this.exclude.isEmpty();
414        }
415
416        public boolean hasExclude() { 
417          return this.exclude != null && !this.exclude.isEmpty();
418        }
419
420        /**
421         * @param value {@link #exclude} (When true, members with this characteristic are excluded from the element.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value
422         */
423        public EvidenceVariableCharacteristicComponent setExcludeElement(BooleanType value) { 
424          this.exclude = value;
425          return this;
426        }
427
428        /**
429         * @return When true, members with this characteristic are excluded from the element.
430         */
431        public boolean getExclude() { 
432          return this.exclude == null || this.exclude.isEmpty() ? false : this.exclude.getValue();
433        }
434
435        /**
436         * @param value When true, members with this characteristic are excluded from the element.
437         */
438        public EvidenceVariableCharacteristicComponent setExclude(boolean value) { 
439            if (this.exclude == null)
440              this.exclude = new BooleanType();
441            this.exclude.setValue(value);
442          return this;
443        }
444
445        /**
446         * @return {@link #timeFromStart} (Indicates duration, period, or point of observation from the participant's study entry.)
447         */
448        public EvidenceVariableCharacteristicTimeFromStartComponent getTimeFromStart() { 
449          if (this.timeFromStart == null)
450            if (Configuration.errorOnAutoCreate())
451              throw new Error("Attempt to auto-create EvidenceVariableCharacteristicComponent.timeFromStart");
452            else if (Configuration.doAutoCreate())
453              this.timeFromStart = new EvidenceVariableCharacteristicTimeFromStartComponent(); // cc
454          return this.timeFromStart;
455        }
456
457        public boolean hasTimeFromStart() { 
458          return this.timeFromStart != null && !this.timeFromStart.isEmpty();
459        }
460
461        /**
462         * @param value {@link #timeFromStart} (Indicates duration, period, or point of observation from the participant's study entry.)
463         */
464        public EvidenceVariableCharacteristicComponent setTimeFromStart(EvidenceVariableCharacteristicTimeFromStartComponent value) { 
465          this.timeFromStart = value;
466          return this;
467        }
468
469        /**
470         * @return {@link #groupMeasure} (Indicates how elements are aggregated within the study effective period.). This is the underlying object with id, value and extensions. The accessor "getGroupMeasure" gives direct access to the value
471         */
472        public Enumeration<GroupMeasure> getGroupMeasureElement() { 
473          if (this.groupMeasure == null)
474            if (Configuration.errorOnAutoCreate())
475              throw new Error("Attempt to auto-create EvidenceVariableCharacteristicComponent.groupMeasure");
476            else if (Configuration.doAutoCreate())
477              this.groupMeasure = new Enumeration<GroupMeasure>(new GroupMeasureEnumFactory()); // bb
478          return this.groupMeasure;
479        }
480
481        public boolean hasGroupMeasureElement() { 
482          return this.groupMeasure != null && !this.groupMeasure.isEmpty();
483        }
484
485        public boolean hasGroupMeasure() { 
486          return this.groupMeasure != null && !this.groupMeasure.isEmpty();
487        }
488
489        /**
490         * @param value {@link #groupMeasure} (Indicates how elements are aggregated within the study effective period.). This is the underlying object with id, value and extensions. The accessor "getGroupMeasure" gives direct access to the value
491         */
492        public EvidenceVariableCharacteristicComponent setGroupMeasureElement(Enumeration<GroupMeasure> value) { 
493          this.groupMeasure = value;
494          return this;
495        }
496
497        /**
498         * @return Indicates how elements are aggregated within the study effective period.
499         */
500        public GroupMeasure getGroupMeasure() { 
501          return this.groupMeasure == null ? null : this.groupMeasure.getValue();
502        }
503
504        /**
505         * @param value Indicates how elements are aggregated within the study effective period.
506         */
507        public EvidenceVariableCharacteristicComponent setGroupMeasure(GroupMeasure value) { 
508          if (value == null)
509            this.groupMeasure = null;
510          else {
511            if (this.groupMeasure == null)
512              this.groupMeasure = new Enumeration<GroupMeasure>(new GroupMeasureEnumFactory());
513            this.groupMeasure.setValue(value);
514          }
515          return this;
516        }
517
518        protected void listChildren(List<Property> children) {
519          super.listChildren(children);
520          children.add(new Property("description", "string", "A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.", 0, 1, description));
521          children.add(new Property("definition[x]", "Reference(Group|EvidenceVariable)|canonical(Any)|CodeableConcept|Expression", "Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", 0, 1, definition));
522          children.add(new Property("method", "CodeableConcept", "Method used for describing characteristic.", 0, 1, method));
523          children.add(new Property("device", "Reference(Device|DeviceMetric)", "Device used for determining characteristic.", 0, 1, device));
524          children.add(new Property("exclude", "boolean", "When true, members with this characteristic are excluded from the element.", 0, 1, exclude));
525          children.add(new Property("timeFromStart", "", "Indicates duration, period, or point of observation from the participant's study entry.", 0, 1, timeFromStart));
526          children.add(new Property("groupMeasure", "code", "Indicates how elements are aggregated within the study effective period.", 0, 1, groupMeasure));
527        }
528
529        @Override
530        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
531          switch (_hash) {
532          case -1724546052: /*description*/  return new Property("description", "string", "A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.", 0, 1, description);
533          case -1139422643: /*definition[x]*/  return new Property("definition[x]", "Reference(Group|EvidenceVariable)|canonical(Any)|CodeableConcept|Expression", "Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", 0, 1, definition);
534          case -1014418093: /*definition*/  return new Property("definition[x]", "Reference(Group|EvidenceVariable)|canonical(Any)|CodeableConcept|Expression", "Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", 0, 1, definition);
535          case -820021448: /*definitionReference*/  return new Property("definition[x]", "Reference(Group|EvidenceVariable)", "Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", 0, 1, definition);
536          case 933485793: /*definitionCanonical*/  return new Property("definition[x]", "canonical(Any)", "Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", 0, 1, definition);
537          case -1446002226: /*definitionCodeableConcept*/  return new Property("definition[x]", "CodeableConcept", "Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", 0, 1, definition);
538          case 1463703627: /*definitionExpression*/  return new Property("definition[x]", "Expression", "Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).", 0, 1, definition);
539          case -1077554975: /*method*/  return new Property("method", "CodeableConcept", "Method used for describing characteristic.", 0, 1, method);
540          case -1335157162: /*device*/  return new Property("device", "Reference(Device|DeviceMetric)", "Device used for determining characteristic.", 0, 1, device);
541          case -1321148966: /*exclude*/  return new Property("exclude", "boolean", "When true, members with this characteristic are excluded from the element.", 0, 1, exclude);
542          case 2100140683: /*timeFromStart*/  return new Property("timeFromStart", "", "Indicates duration, period, or point of observation from the participant's study entry.", 0, 1, timeFromStart);
543          case 588892639: /*groupMeasure*/  return new Property("groupMeasure", "code", "Indicates how elements are aggregated within the study effective period.", 0, 1, groupMeasure);
544          default: return super.getNamedProperty(_hash, _name, _checkValid);
545          }
546
547        }
548
549      @Override
550      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
551        switch (hash) {
552        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
553        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // DataType
554        case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept
555        case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference
556        case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : new Base[] {this.exclude}; // BooleanType
557        case 2100140683: /*timeFromStart*/ return this.timeFromStart == null ? new Base[0] : new Base[] {this.timeFromStart}; // EvidenceVariableCharacteristicTimeFromStartComponent
558        case 588892639: /*groupMeasure*/ return this.groupMeasure == null ? new Base[0] : new Base[] {this.groupMeasure}; // Enumeration<GroupMeasure>
559        default: return super.getProperty(hash, name, checkValid);
560        }
561
562      }
563
564      @Override
565      public Base setProperty(int hash, String name, Base value) throws FHIRException {
566        switch (hash) {
567        case -1724546052: // description
568          this.description = TypeConvertor.castToString(value); // StringType
569          return value;
570        case -1014418093: // definition
571          this.definition = TypeConvertor.castToType(value); // DataType
572          return value;
573        case -1077554975: // method
574          this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
575          return value;
576        case -1335157162: // device
577          this.device = TypeConvertor.castToReference(value); // Reference
578          return value;
579        case -1321148966: // exclude
580          this.exclude = TypeConvertor.castToBoolean(value); // BooleanType
581          return value;
582        case 2100140683: // timeFromStart
583          this.timeFromStart = (EvidenceVariableCharacteristicTimeFromStartComponent) value; // EvidenceVariableCharacteristicTimeFromStartComponent
584          return value;
585        case 588892639: // groupMeasure
586          value = new GroupMeasureEnumFactory().fromType(TypeConvertor.castToCode(value));
587          this.groupMeasure = (Enumeration) value; // Enumeration<GroupMeasure>
588          return value;
589        default: return super.setProperty(hash, name, value);
590        }
591
592      }
593
594      @Override
595      public Base setProperty(String name, Base value) throws FHIRException {
596        if (name.equals("description")) {
597          this.description = TypeConvertor.castToString(value); // StringType
598        } else if (name.equals("definition[x]")) {
599          this.definition = TypeConvertor.castToType(value); // DataType
600        } else if (name.equals("method")) {
601          this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
602        } else if (name.equals("device")) {
603          this.device = TypeConvertor.castToReference(value); // Reference
604        } else if (name.equals("exclude")) {
605          this.exclude = TypeConvertor.castToBoolean(value); // BooleanType
606        } else if (name.equals("timeFromStart")) {
607          this.timeFromStart = (EvidenceVariableCharacteristicTimeFromStartComponent) value; // EvidenceVariableCharacteristicTimeFromStartComponent
608        } else if (name.equals("groupMeasure")) {
609          value = new GroupMeasureEnumFactory().fromType(TypeConvertor.castToCode(value));
610          this.groupMeasure = (Enumeration) value; // Enumeration<GroupMeasure>
611        } else
612          return super.setProperty(name, value);
613        return value;
614      }
615
616      @Override
617      public Base makeProperty(int hash, String name) throws FHIRException {
618        switch (hash) {
619        case -1724546052:  return getDescriptionElement();
620        case -1139422643:  return getDefinition();
621        case -1014418093:  return getDefinition();
622        case -1077554975:  return getMethod();
623        case -1335157162:  return getDevice();
624        case -1321148966:  return getExcludeElement();
625        case 2100140683:  return getTimeFromStart();
626        case 588892639:  return getGroupMeasureElement();
627        default: return super.makeProperty(hash, name);
628        }
629
630      }
631
632      @Override
633      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
634        switch (hash) {
635        case -1724546052: /*description*/ return new String[] {"string"};
636        case -1014418093: /*definition*/ return new String[] {"Reference", "canonical", "CodeableConcept", "Expression"};
637        case -1077554975: /*method*/ return new String[] {"CodeableConcept"};
638        case -1335157162: /*device*/ return new String[] {"Reference"};
639        case -1321148966: /*exclude*/ return new String[] {"boolean"};
640        case 2100140683: /*timeFromStart*/ return new String[] {};
641        case 588892639: /*groupMeasure*/ return new String[] {"code"};
642        default: return super.getTypesForProperty(hash, name);
643        }
644
645      }
646
647      @Override
648      public Base addChild(String name) throws FHIRException {
649        if (name.equals("description")) {
650          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.characteristic.description");
651        }
652        else if (name.equals("definitionReference")) {
653          this.definition = new Reference();
654          return this.definition;
655        }
656        else if (name.equals("definitionCanonical")) {
657          this.definition = new CanonicalType();
658          return this.definition;
659        }
660        else if (name.equals("definitionCodeableConcept")) {
661          this.definition = new CodeableConcept();
662          return this.definition;
663        }
664        else if (name.equals("definitionExpression")) {
665          this.definition = new Expression();
666          return this.definition;
667        }
668        else if (name.equals("method")) {
669          this.method = new CodeableConcept();
670          return this.method;
671        }
672        else if (name.equals("device")) {
673          this.device = new Reference();
674          return this.device;
675        }
676        else if (name.equals("exclude")) {
677          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.characteristic.exclude");
678        }
679        else if (name.equals("timeFromStart")) {
680          this.timeFromStart = new EvidenceVariableCharacteristicTimeFromStartComponent();
681          return this.timeFromStart;
682        }
683        else if (name.equals("groupMeasure")) {
684          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.characteristic.groupMeasure");
685        }
686        else
687          return super.addChild(name);
688      }
689
690      public EvidenceVariableCharacteristicComponent copy() {
691        EvidenceVariableCharacteristicComponent dst = new EvidenceVariableCharacteristicComponent();
692        copyValues(dst);
693        return dst;
694      }
695
696      public void copyValues(EvidenceVariableCharacteristicComponent dst) {
697        super.copyValues(dst);
698        dst.description = description == null ? null : description.copy();
699        dst.definition = definition == null ? null : definition.copy();
700        dst.method = method == null ? null : method.copy();
701        dst.device = device == null ? null : device.copy();
702        dst.exclude = exclude == null ? null : exclude.copy();
703        dst.timeFromStart = timeFromStart == null ? null : timeFromStart.copy();
704        dst.groupMeasure = groupMeasure == null ? null : groupMeasure.copy();
705      }
706
707      @Override
708      public boolean equalsDeep(Base other_) {
709        if (!super.equalsDeep(other_))
710          return false;
711        if (!(other_ instanceof EvidenceVariableCharacteristicComponent))
712          return false;
713        EvidenceVariableCharacteristicComponent o = (EvidenceVariableCharacteristicComponent) other_;
714        return compareDeep(description, o.description, true) && compareDeep(definition, o.definition, true)
715           && compareDeep(method, o.method, true) && compareDeep(device, o.device, true) && compareDeep(exclude, o.exclude, true)
716           && compareDeep(timeFromStart, o.timeFromStart, true) && compareDeep(groupMeasure, o.groupMeasure, true)
717          ;
718      }
719
720      @Override
721      public boolean equalsShallow(Base other_) {
722        if (!super.equalsShallow(other_))
723          return false;
724        if (!(other_ instanceof EvidenceVariableCharacteristicComponent))
725          return false;
726        EvidenceVariableCharacteristicComponent o = (EvidenceVariableCharacteristicComponent) other_;
727        return compareValues(description, o.description, true) && compareValues(exclude, o.exclude, true) && compareValues(groupMeasure, o.groupMeasure, true)
728          ;
729      }
730
731      public boolean isEmpty() {
732        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, definition, method
733          , device, exclude, timeFromStart, groupMeasure);
734      }
735
736  public String fhirType() {
737    return "EvidenceVariable.characteristic";
738
739  }
740
741  }
742
743    @Block()
744    public static class EvidenceVariableCharacteristicTimeFromStartComponent extends BackboneElement implements IBaseBackboneElement {
745        /**
746         * A short, natural language description.
747         */
748        @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
749        @Description(shortDefinition="Human readable description", formalDefinition="A short, natural language description." )
750        protected StringType description;
751
752        /**
753         * Used to express the observation at a defined amount of time after the study start.
754         */
755        @Child(name = "quantity", type = {Quantity.class}, order=2, min=0, max=1, modifier=false, summary=false)
756        @Description(shortDefinition="Used to express the observation at a defined amount of time after the study start", formalDefinition="Used to express the observation at a defined amount of time after the study start." )
757        protected Quantity quantity;
758
759        /**
760         * Used to express the observation within a period after the study start.
761         */
762        @Child(name = "range", type = {Range.class}, order=3, min=0, max=1, modifier=false, summary=false)
763        @Description(shortDefinition="Used to express the observation within a period after the study start", formalDefinition="Used to express the observation within a period after the study start." )
764        protected Range range;
765
766        /**
767         * A human-readable string to clarify or explain concepts about the resource.
768         */
769        @Child(name = "note", type = {Annotation.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
770        @Description(shortDefinition="Used for footnotes or explanatory notes", formalDefinition="A human-readable string to clarify or explain concepts about the resource." )
771        protected List<Annotation> note;
772
773        private static final long serialVersionUID = 949972898L;
774
775    /**
776     * Constructor
777     */
778      public EvidenceVariableCharacteristicTimeFromStartComponent() {
779        super();
780      }
781
782        /**
783         * @return {@link #description} (A short, natural language description.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
784         */
785        public StringType getDescriptionElement() { 
786          if (this.description == null)
787            if (Configuration.errorOnAutoCreate())
788              throw new Error("Attempt to auto-create EvidenceVariableCharacteristicTimeFromStartComponent.description");
789            else if (Configuration.doAutoCreate())
790              this.description = new StringType(); // bb
791          return this.description;
792        }
793
794        public boolean hasDescriptionElement() { 
795          return this.description != null && !this.description.isEmpty();
796        }
797
798        public boolean hasDescription() { 
799          return this.description != null && !this.description.isEmpty();
800        }
801
802        /**
803         * @param value {@link #description} (A short, natural language description.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
804         */
805        public EvidenceVariableCharacteristicTimeFromStartComponent setDescriptionElement(StringType value) { 
806          this.description = value;
807          return this;
808        }
809
810        /**
811         * @return A short, natural language description.
812         */
813        public String getDescription() { 
814          return this.description == null ? null : this.description.getValue();
815        }
816
817        /**
818         * @param value A short, natural language description.
819         */
820        public EvidenceVariableCharacteristicTimeFromStartComponent setDescription(String value) { 
821          if (Utilities.noString(value))
822            this.description = null;
823          else {
824            if (this.description == null)
825              this.description = new StringType();
826            this.description.setValue(value);
827          }
828          return this;
829        }
830
831        /**
832         * @return {@link #quantity} (Used to express the observation at a defined amount of time after the study start.)
833         */
834        public Quantity getQuantity() { 
835          if (this.quantity == null)
836            if (Configuration.errorOnAutoCreate())
837              throw new Error("Attempt to auto-create EvidenceVariableCharacteristicTimeFromStartComponent.quantity");
838            else if (Configuration.doAutoCreate())
839              this.quantity = new Quantity(); // cc
840          return this.quantity;
841        }
842
843        public boolean hasQuantity() { 
844          return this.quantity != null && !this.quantity.isEmpty();
845        }
846
847        /**
848         * @param value {@link #quantity} (Used to express the observation at a defined amount of time after the study start.)
849         */
850        public EvidenceVariableCharacteristicTimeFromStartComponent setQuantity(Quantity value) { 
851          this.quantity = value;
852          return this;
853        }
854
855        /**
856         * @return {@link #range} (Used to express the observation within a period after the study start.)
857         */
858        public Range getRange() { 
859          if (this.range == null)
860            if (Configuration.errorOnAutoCreate())
861              throw new Error("Attempt to auto-create EvidenceVariableCharacteristicTimeFromStartComponent.range");
862            else if (Configuration.doAutoCreate())
863              this.range = new Range(); // cc
864          return this.range;
865        }
866
867        public boolean hasRange() { 
868          return this.range != null && !this.range.isEmpty();
869        }
870
871        /**
872         * @param value {@link #range} (Used to express the observation within a period after the study start.)
873         */
874        public EvidenceVariableCharacteristicTimeFromStartComponent setRange(Range value) { 
875          this.range = value;
876          return this;
877        }
878
879        /**
880         * @return {@link #note} (A human-readable string to clarify or explain concepts about the resource.)
881         */
882        public List<Annotation> getNote() { 
883          if (this.note == null)
884            this.note = new ArrayList<Annotation>();
885          return this.note;
886        }
887
888        /**
889         * @return Returns a reference to <code>this</code> for easy method chaining
890         */
891        public EvidenceVariableCharacteristicTimeFromStartComponent setNote(List<Annotation> theNote) { 
892          this.note = theNote;
893          return this;
894        }
895
896        public boolean hasNote() { 
897          if (this.note == null)
898            return false;
899          for (Annotation item : this.note)
900            if (!item.isEmpty())
901              return true;
902          return false;
903        }
904
905        public Annotation addNote() { //3
906          Annotation t = new Annotation();
907          if (this.note == null)
908            this.note = new ArrayList<Annotation>();
909          this.note.add(t);
910          return t;
911        }
912
913        public EvidenceVariableCharacteristicTimeFromStartComponent addNote(Annotation t) { //3
914          if (t == null)
915            return this;
916          if (this.note == null)
917            this.note = new ArrayList<Annotation>();
918          this.note.add(t);
919          return this;
920        }
921
922        /**
923         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
924         */
925        public Annotation getNoteFirstRep() { 
926          if (getNote().isEmpty()) {
927            addNote();
928          }
929          return getNote().get(0);
930        }
931
932        protected void listChildren(List<Property> children) {
933          super.listChildren(children);
934          children.add(new Property("description", "string", "A short, natural language description.", 0, 1, description));
935          children.add(new Property("quantity", "Quantity", "Used to express the observation at a defined amount of time after the study start.", 0, 1, quantity));
936          children.add(new Property("range", "Range", "Used to express the observation within a period after the study start.", 0, 1, range));
937          children.add(new Property("note", "Annotation", "A human-readable string to clarify or explain concepts about the resource.", 0, java.lang.Integer.MAX_VALUE, note));
938        }
939
940        @Override
941        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
942          switch (_hash) {
943          case -1724546052: /*description*/  return new Property("description", "string", "A short, natural language description.", 0, 1, description);
944          case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "Used to express the observation at a defined amount of time after the study start.", 0, 1, quantity);
945          case 108280125: /*range*/  return new Property("range", "Range", "Used to express the observation within a period after the study start.", 0, 1, range);
946          case 3387378: /*note*/  return new Property("note", "Annotation", "A human-readable string to clarify or explain concepts about the resource.", 0, java.lang.Integer.MAX_VALUE, note);
947          default: return super.getNamedProperty(_hash, _name, _checkValid);
948          }
949
950        }
951
952      @Override
953      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
954        switch (hash) {
955        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
956        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
957        case 108280125: /*range*/ return this.range == null ? new Base[0] : new Base[] {this.range}; // Range
958        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
959        default: return super.getProperty(hash, name, checkValid);
960        }
961
962      }
963
964      @Override
965      public Base setProperty(int hash, String name, Base value) throws FHIRException {
966        switch (hash) {
967        case -1724546052: // description
968          this.description = TypeConvertor.castToString(value); // StringType
969          return value;
970        case -1285004149: // quantity
971          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
972          return value;
973        case 108280125: // range
974          this.range = TypeConvertor.castToRange(value); // Range
975          return value;
976        case 3387378: // note
977          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
978          return value;
979        default: return super.setProperty(hash, name, value);
980        }
981
982      }
983
984      @Override
985      public Base setProperty(String name, Base value) throws FHIRException {
986        if (name.equals("description")) {
987          this.description = TypeConvertor.castToString(value); // StringType
988        } else if (name.equals("quantity")) {
989          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
990        } else if (name.equals("range")) {
991          this.range = TypeConvertor.castToRange(value); // Range
992        } else if (name.equals("note")) {
993          this.getNote().add(TypeConvertor.castToAnnotation(value));
994        } else
995          return super.setProperty(name, value);
996        return value;
997      }
998
999      @Override
1000      public Base makeProperty(int hash, String name) throws FHIRException {
1001        switch (hash) {
1002        case -1724546052:  return getDescriptionElement();
1003        case -1285004149:  return getQuantity();
1004        case 108280125:  return getRange();
1005        case 3387378:  return addNote(); 
1006        default: return super.makeProperty(hash, name);
1007        }
1008
1009      }
1010
1011      @Override
1012      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1013        switch (hash) {
1014        case -1724546052: /*description*/ return new String[] {"string"};
1015        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
1016        case 108280125: /*range*/ return new String[] {"Range"};
1017        case 3387378: /*note*/ return new String[] {"Annotation"};
1018        default: return super.getTypesForProperty(hash, name);
1019        }
1020
1021      }
1022
1023      @Override
1024      public Base addChild(String name) throws FHIRException {
1025        if (name.equals("description")) {
1026          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.characteristic.timeFromStart.description");
1027        }
1028        else if (name.equals("quantity")) {
1029          this.quantity = new Quantity();
1030          return this.quantity;
1031        }
1032        else if (name.equals("range")) {
1033          this.range = new Range();
1034          return this.range;
1035        }
1036        else if (name.equals("note")) {
1037          return addNote();
1038        }
1039        else
1040          return super.addChild(name);
1041      }
1042
1043      public EvidenceVariableCharacteristicTimeFromStartComponent copy() {
1044        EvidenceVariableCharacteristicTimeFromStartComponent dst = new EvidenceVariableCharacteristicTimeFromStartComponent();
1045        copyValues(dst);
1046        return dst;
1047      }
1048
1049      public void copyValues(EvidenceVariableCharacteristicTimeFromStartComponent dst) {
1050        super.copyValues(dst);
1051        dst.description = description == null ? null : description.copy();
1052        dst.quantity = quantity == null ? null : quantity.copy();
1053        dst.range = range == null ? null : range.copy();
1054        if (note != null) {
1055          dst.note = new ArrayList<Annotation>();
1056          for (Annotation i : note)
1057            dst.note.add(i.copy());
1058        };
1059      }
1060
1061      @Override
1062      public boolean equalsDeep(Base other_) {
1063        if (!super.equalsDeep(other_))
1064          return false;
1065        if (!(other_ instanceof EvidenceVariableCharacteristicTimeFromStartComponent))
1066          return false;
1067        EvidenceVariableCharacteristicTimeFromStartComponent o = (EvidenceVariableCharacteristicTimeFromStartComponent) other_;
1068        return compareDeep(description, o.description, true) && compareDeep(quantity, o.quantity, true)
1069           && compareDeep(range, o.range, true) && compareDeep(note, o.note, true);
1070      }
1071
1072      @Override
1073      public boolean equalsShallow(Base other_) {
1074        if (!super.equalsShallow(other_))
1075          return false;
1076        if (!(other_ instanceof EvidenceVariableCharacteristicTimeFromStartComponent))
1077          return false;
1078        EvidenceVariableCharacteristicTimeFromStartComponent o = (EvidenceVariableCharacteristicTimeFromStartComponent) other_;
1079        return compareValues(description, o.description, true);
1080      }
1081
1082      public boolean isEmpty() {
1083        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, quantity, range
1084          , note);
1085      }
1086
1087  public String fhirType() {
1088    return "EvidenceVariable.characteristic.timeFromStart";
1089
1090  }
1091
1092  }
1093
1094    @Block()
1095    public static class EvidenceVariableCategoryComponent extends BackboneElement implements IBaseBackboneElement {
1096        /**
1097         * A human-readable title or representation of the grouping.
1098         */
1099        @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
1100        @Description(shortDefinition="Description of the grouping", formalDefinition="A human-readable title or representation of the grouping." )
1101        protected StringType name;
1102
1103        /**
1104         * Value or set of values that define the grouping.
1105         */
1106        @Child(name = "value", type = {CodeableConcept.class, Quantity.class, Range.class}, order=2, min=0, max=1, modifier=false, summary=false)
1107        @Description(shortDefinition="Definition of the grouping", formalDefinition="Value or set of values that define the grouping." )
1108        protected DataType value;
1109
1110        private static final long serialVersionUID = 1839679495L;
1111
1112    /**
1113     * Constructor
1114     */
1115      public EvidenceVariableCategoryComponent() {
1116        super();
1117      }
1118
1119        /**
1120         * @return {@link #name} (A human-readable title or representation of the grouping.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1121         */
1122        public StringType getNameElement() { 
1123          if (this.name == null)
1124            if (Configuration.errorOnAutoCreate())
1125              throw new Error("Attempt to auto-create EvidenceVariableCategoryComponent.name");
1126            else if (Configuration.doAutoCreate())
1127              this.name = new StringType(); // bb
1128          return this.name;
1129        }
1130
1131        public boolean hasNameElement() { 
1132          return this.name != null && !this.name.isEmpty();
1133        }
1134
1135        public boolean hasName() { 
1136          return this.name != null && !this.name.isEmpty();
1137        }
1138
1139        /**
1140         * @param value {@link #name} (A human-readable title or representation of the grouping.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1141         */
1142        public EvidenceVariableCategoryComponent setNameElement(StringType value) { 
1143          this.name = value;
1144          return this;
1145        }
1146
1147        /**
1148         * @return A human-readable title or representation of the grouping.
1149         */
1150        public String getName() { 
1151          return this.name == null ? null : this.name.getValue();
1152        }
1153
1154        /**
1155         * @param value A human-readable title or representation of the grouping.
1156         */
1157        public EvidenceVariableCategoryComponent setName(String value) { 
1158          if (Utilities.noString(value))
1159            this.name = null;
1160          else {
1161            if (this.name == null)
1162              this.name = new StringType();
1163            this.name.setValue(value);
1164          }
1165          return this;
1166        }
1167
1168        /**
1169         * @return {@link #value} (Value or set of values that define the grouping.)
1170         */
1171        public DataType getValue() { 
1172          return this.value;
1173        }
1174
1175        /**
1176         * @return {@link #value} (Value or set of values that define the grouping.)
1177         */
1178        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
1179          if (this.value == null)
1180            this.value = new CodeableConcept();
1181          if (!(this.value instanceof CodeableConcept))
1182            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
1183          return (CodeableConcept) this.value;
1184        }
1185
1186        public boolean hasValueCodeableConcept() { 
1187          return this != null && this.value instanceof CodeableConcept;
1188        }
1189
1190        /**
1191         * @return {@link #value} (Value or set of values that define the grouping.)
1192         */
1193        public Quantity getValueQuantity() throws FHIRException { 
1194          if (this.value == null)
1195            this.value = new Quantity();
1196          if (!(this.value instanceof Quantity))
1197            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
1198          return (Quantity) this.value;
1199        }
1200
1201        public boolean hasValueQuantity() { 
1202          return this != null && this.value instanceof Quantity;
1203        }
1204
1205        /**
1206         * @return {@link #value} (Value or set of values that define the grouping.)
1207         */
1208        public Range getValueRange() throws FHIRException { 
1209          if (this.value == null)
1210            this.value = new Range();
1211          if (!(this.value instanceof Range))
1212            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
1213          return (Range) this.value;
1214        }
1215
1216        public boolean hasValueRange() { 
1217          return this != null && this.value instanceof Range;
1218        }
1219
1220        public boolean hasValue() { 
1221          return this.value != null && !this.value.isEmpty();
1222        }
1223
1224        /**
1225         * @param value {@link #value} (Value or set of values that define the grouping.)
1226         */
1227        public EvidenceVariableCategoryComponent setValue(DataType value) { 
1228          if (value != null && !(value instanceof CodeableConcept || value instanceof Quantity || value instanceof Range))
1229            throw new Error("Not the right type for EvidenceVariable.category.value[x]: "+value.fhirType());
1230          this.value = value;
1231          return this;
1232        }
1233
1234        protected void listChildren(List<Property> children) {
1235          super.listChildren(children);
1236          children.add(new Property("name", "string", "A human-readable title or representation of the grouping.", 0, 1, name));
1237          children.add(new Property("value[x]", "CodeableConcept|Quantity|Range", "Value or set of values that define the grouping.", 0, 1, value));
1238        }
1239
1240        @Override
1241        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1242          switch (_hash) {
1243          case 3373707: /*name*/  return new Property("name", "string", "A human-readable title or representation of the grouping.", 0, 1, name);
1244          case -1410166417: /*value[x]*/  return new Property("value[x]", "CodeableConcept|Quantity|Range", "Value or set of values that define the grouping.", 0, 1, value);
1245          case 111972721: /*value*/  return new Property("value[x]", "CodeableConcept|Quantity|Range", "Value or set of values that define the grouping.", 0, 1, value);
1246          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "Value or set of values that define the grouping.", 0, 1, value);
1247          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "Value or set of values that define the grouping.", 0, 1, value);
1248          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "Value or set of values that define the grouping.", 0, 1, value);
1249          default: return super.getNamedProperty(_hash, _name, _checkValid);
1250          }
1251
1252        }
1253
1254      @Override
1255      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1256        switch (hash) {
1257        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1258        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
1259        default: return super.getProperty(hash, name, checkValid);
1260        }
1261
1262      }
1263
1264      @Override
1265      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1266        switch (hash) {
1267        case 3373707: // name
1268          this.name = TypeConvertor.castToString(value); // StringType
1269          return value;
1270        case 111972721: // value
1271          this.value = TypeConvertor.castToType(value); // DataType
1272          return value;
1273        default: return super.setProperty(hash, name, value);
1274        }
1275
1276      }
1277
1278      @Override
1279      public Base setProperty(String name, Base value) throws FHIRException {
1280        if (name.equals("name")) {
1281          this.name = TypeConvertor.castToString(value); // StringType
1282        } else if (name.equals("value[x]")) {
1283          this.value = TypeConvertor.castToType(value); // DataType
1284        } else
1285          return super.setProperty(name, value);
1286        return value;
1287      }
1288
1289      @Override
1290      public Base makeProperty(int hash, String name) throws FHIRException {
1291        switch (hash) {
1292        case 3373707:  return getNameElement();
1293        case -1410166417:  return getValue();
1294        case 111972721:  return getValue();
1295        default: return super.makeProperty(hash, name);
1296        }
1297
1298      }
1299
1300      @Override
1301      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1302        switch (hash) {
1303        case 3373707: /*name*/ return new String[] {"string"};
1304        case 111972721: /*value*/ return new String[] {"CodeableConcept", "Quantity", "Range"};
1305        default: return super.getTypesForProperty(hash, name);
1306        }
1307
1308      }
1309
1310      @Override
1311      public Base addChild(String name) throws FHIRException {
1312        if (name.equals("name")) {
1313          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.category.name");
1314        }
1315        else if (name.equals("valueCodeableConcept")) {
1316          this.value = new CodeableConcept();
1317          return this.value;
1318        }
1319        else if (name.equals("valueQuantity")) {
1320          this.value = new Quantity();
1321          return this.value;
1322        }
1323        else if (name.equals("valueRange")) {
1324          this.value = new Range();
1325          return this.value;
1326        }
1327        else
1328          return super.addChild(name);
1329      }
1330
1331      public EvidenceVariableCategoryComponent copy() {
1332        EvidenceVariableCategoryComponent dst = new EvidenceVariableCategoryComponent();
1333        copyValues(dst);
1334        return dst;
1335      }
1336
1337      public void copyValues(EvidenceVariableCategoryComponent dst) {
1338        super.copyValues(dst);
1339        dst.name = name == null ? null : name.copy();
1340        dst.value = value == null ? null : value.copy();
1341      }
1342
1343      @Override
1344      public boolean equalsDeep(Base other_) {
1345        if (!super.equalsDeep(other_))
1346          return false;
1347        if (!(other_ instanceof EvidenceVariableCategoryComponent))
1348          return false;
1349        EvidenceVariableCategoryComponent o = (EvidenceVariableCategoryComponent) other_;
1350        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
1351      }
1352
1353      @Override
1354      public boolean equalsShallow(Base other_) {
1355        if (!super.equalsShallow(other_))
1356          return false;
1357        if (!(other_ instanceof EvidenceVariableCategoryComponent))
1358          return false;
1359        EvidenceVariableCategoryComponent o = (EvidenceVariableCategoryComponent) other_;
1360        return compareValues(name, o.name, true);
1361      }
1362
1363      public boolean isEmpty() {
1364        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
1365      }
1366
1367  public String fhirType() {
1368    return "EvidenceVariable.category";
1369
1370  }
1371
1372  }
1373
1374    /**
1375     * An absolute URI that is used to identify this evidence variable 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 evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.
1376     */
1377    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
1378    @Description(shortDefinition="Canonical identifier for this evidence variable, represented as a URI (globally unique)", formalDefinition="An absolute URI that is used to identify this evidence variable 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 evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers." )
1379    protected UriType url;
1380
1381    /**
1382     * A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance.
1383     */
1384    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1385    @Description(shortDefinition="Additional identifier for the evidence variable", formalDefinition="A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance." )
1386    protected List<Identifier> identifier;
1387
1388    /**
1389     * The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.
1390     */
1391    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1392    @Description(shortDefinition="Business version of the evidence variable", formalDefinition="The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts." )
1393    protected StringType version;
1394
1395    /**
1396     * A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1397     */
1398    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1399    @Description(shortDefinition="Name for this evidence variable (computer friendly)", formalDefinition="A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation." )
1400    protected StringType name;
1401
1402    /**
1403     * A short, descriptive, user-friendly title for the evidence variable.
1404     */
1405    @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1406    @Description(shortDefinition="Name for this evidence variable (human friendly)", formalDefinition="A short, descriptive, user-friendly title for the evidence variable." )
1407    protected StringType title;
1408
1409    /**
1410     * The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.
1411     */
1412    @Child(name = "shortTitle", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1413    @Description(shortDefinition="Title for use in informal contexts", formalDefinition="The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary." )
1414    protected StringType shortTitle;
1415
1416    /**
1417     * An explanatory or alternate title for the EvidenceVariable giving additional information about its content.
1418     */
1419    @Child(name = "subtitle", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
1420    @Description(shortDefinition="Subordinate title of the EvidenceVariable", formalDefinition="An explanatory or alternate title for the EvidenceVariable giving additional information about its content." )
1421    protected StringType subtitle;
1422
1423    /**
1424     * The status of this evidence variable. Enables tracking the life-cycle of the content.
1425     */
1426    @Child(name = "status", type = {CodeType.class}, order=7, min=1, max=1, modifier=true, summary=true)
1427    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this evidence variable. Enables tracking the life-cycle of the content." )
1428    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
1429    protected Enumeration<PublicationStatus> status;
1430
1431    /**
1432     * The date  (and optionally time) when the evidence variable 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 evidence variable changes.
1433     */
1434    @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true)
1435    @Description(shortDefinition="Date last changed", formalDefinition="The date  (and optionally time) when the evidence variable 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 evidence variable changes." )
1436    protected DateTimeType date;
1437
1438    /**
1439     * A free text natural language description of the evidence variable from a consumer's perspective.
1440     */
1441    @Child(name = "description", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true)
1442    @Description(shortDefinition="Natural language description of the evidence variable", formalDefinition="A free text natural language description of the evidence variable from a consumer's perspective." )
1443    protected MarkdownType description;
1444
1445    /**
1446     * A human-readable string to clarify or explain concepts about the resource.
1447     */
1448    @Child(name = "note", type = {Annotation.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1449    @Description(shortDefinition="Used for footnotes or explanatory notes", formalDefinition="A human-readable string to clarify or explain concepts about the resource." )
1450    protected List<Annotation> note;
1451
1452    /**
1453     * The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances.
1454     */
1455    @Child(name = "useContext", type = {UsageContext.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1456    @Description(shortDefinition="The context that the content is intended to support", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances." )
1457    protected List<UsageContext> useContext;
1458
1459    /**
1460     * The name of the organization or individual that published the evidence variable.
1461     */
1462    @Child(name = "publisher", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true)
1463    @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the organization or individual that published the evidence variable." )
1464    protected StringType publisher;
1465
1466    /**
1467     * Contact details to assist a user in finding and communicating with the publisher.
1468     */
1469    @Child(name = "contact", type = {ContactDetail.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1470    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
1471    protected List<ContactDetail> contact;
1472
1473    /**
1474     * An individiual or organization primarily involved in the creation and maintenance of the content.
1475     */
1476    @Child(name = "author", type = {ContactDetail.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1477    @Description(shortDefinition="Who authored the content", formalDefinition="An individiual or organization primarily involved in the creation and maintenance of the content." )
1478    protected List<ContactDetail> author;
1479
1480    /**
1481     * An individual or organization primarily responsible for internal coherence of the content.
1482     */
1483    @Child(name = "editor", type = {ContactDetail.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1484    @Description(shortDefinition="Who edited the content", formalDefinition="An individual or organization primarily responsible for internal coherence of the content." )
1485    protected List<ContactDetail> editor;
1486
1487    /**
1488     * An individual or organization primarily responsible for review of some aspect of the content.
1489     */
1490    @Child(name = "reviewer", type = {ContactDetail.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1491    @Description(shortDefinition="Who reviewed the content", formalDefinition="An individual or organization primarily responsible for review of some aspect of the content." )
1492    protected List<ContactDetail> reviewer;
1493
1494    /**
1495     * An individual or organization responsible for officially endorsing the content for use in some setting.
1496     */
1497    @Child(name = "endorser", type = {ContactDetail.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1498    @Description(shortDefinition="Who endorsed the content", formalDefinition="An individual or organization responsible for officially endorsing the content for use in some setting." )
1499    protected List<ContactDetail> endorser;
1500
1501    /**
1502     * Related artifacts such as additional documentation, justification, or bibliographic references.
1503     */
1504    @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1505    @Description(shortDefinition="Additional documentation, citations, etc.", formalDefinition="Related artifacts such as additional documentation, justification, or bibliographic references." )
1506    protected List<RelatedArtifact> relatedArtifact;
1507
1508    /**
1509     * True if the actual variable measured, false if a conceptual representation of the intended variable.
1510     */
1511    @Child(name = "actual", type = {BooleanType.class}, order=19, min=0, max=1, modifier=false, summary=false)
1512    @Description(shortDefinition="Actual or conceptual", formalDefinition="True if the actual variable measured, false if a conceptual representation of the intended variable." )
1513    protected BooleanType actual;
1514
1515    /**
1516     * Used to specify if two or more characteristics are combined with OR or AND.
1517     */
1518    @Child(name = "characteristicCombination", type = {CodeType.class}, order=20, min=0, max=1, modifier=false, summary=false)
1519    @Description(shortDefinition="intersection | union", formalDefinition="Used to specify if two or more characteristics are combined with OR or AND." )
1520    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/characteristic-combination")
1521    protected Enumeration<CharacteristicCombination> characteristicCombination;
1522
1523    /**
1524     * A characteristic that defines the members of the evidence element. Multiple characteristics are applied with "and" semantics.
1525     */
1526    @Child(name = "characteristic", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1527    @Description(shortDefinition="What defines the members of the evidence element", formalDefinition="A characteristic that defines the members of the evidence element. Multiple characteristics are applied with \"and\" semantics." )
1528    protected List<EvidenceVariableCharacteristicComponent> characteristic;
1529
1530    /**
1531     * Used for an outcome to classify.
1532     */
1533    @Child(name = "handling", type = {CodeType.class}, order=22, min=0, max=1, modifier=false, summary=true)
1534    @Description(shortDefinition="continuous | dichotomous | ordinal | polychotomous", formalDefinition="Used for an outcome to classify." )
1535    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/variable-handling")
1536    protected Enumeration<EvidenceVariableHandling> handling;
1537
1538    /**
1539     * A grouping (or set of values) described along with other groupings to specify the set of groupings allowed for the variable.
1540     */
1541    @Child(name = "category", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1542    @Description(shortDefinition="A grouping for ordinal or polychotomous variables", formalDefinition="A grouping (or set of values) described along with other groupings to specify the set of groupings allowed for the variable." )
1543    protected List<EvidenceVariableCategoryComponent> category;
1544
1545    private static final long serialVersionUID = 449375263L;
1546
1547  /**
1548   * Constructor
1549   */
1550    public EvidenceVariable() {
1551      super();
1552    }
1553
1554  /**
1555   * Constructor
1556   */
1557    public EvidenceVariable(PublicationStatus status) {
1558      super();
1559      this.setStatus(status);
1560    }
1561
1562    /**
1563     * @return {@link #url} (An absolute URI that is used to identify this evidence variable 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 evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1564     */
1565    public UriType getUrlElement() { 
1566      if (this.url == null)
1567        if (Configuration.errorOnAutoCreate())
1568          throw new Error("Attempt to auto-create EvidenceVariable.url");
1569        else if (Configuration.doAutoCreate())
1570          this.url = new UriType(); // bb
1571      return this.url;
1572    }
1573
1574    public boolean hasUrlElement() { 
1575      return this.url != null && !this.url.isEmpty();
1576    }
1577
1578    public boolean hasUrl() { 
1579      return this.url != null && !this.url.isEmpty();
1580    }
1581
1582    /**
1583     * @param value {@link #url} (An absolute URI that is used to identify this evidence variable 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 evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1584     */
1585    public EvidenceVariable setUrlElement(UriType value) { 
1586      this.url = value;
1587      return this;
1588    }
1589
1590    /**
1591     * @return An absolute URI that is used to identify this evidence variable 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 evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.
1592     */
1593    public String getUrl() { 
1594      return this.url == null ? null : this.url.getValue();
1595    }
1596
1597    /**
1598     * @param value An absolute URI that is used to identify this evidence variable 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 evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.
1599     */
1600    public EvidenceVariable setUrl(String value) { 
1601      if (Utilities.noString(value))
1602        this.url = null;
1603      else {
1604        if (this.url == null)
1605          this.url = new UriType();
1606        this.url.setValue(value);
1607      }
1608      return this;
1609    }
1610
1611    /**
1612     * @return {@link #identifier} (A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance.)
1613     */
1614    public List<Identifier> getIdentifier() { 
1615      if (this.identifier == null)
1616        this.identifier = new ArrayList<Identifier>();
1617      return this.identifier;
1618    }
1619
1620    /**
1621     * @return Returns a reference to <code>this</code> for easy method chaining
1622     */
1623    public EvidenceVariable setIdentifier(List<Identifier> theIdentifier) { 
1624      this.identifier = theIdentifier;
1625      return this;
1626    }
1627
1628    public boolean hasIdentifier() { 
1629      if (this.identifier == null)
1630        return false;
1631      for (Identifier item : this.identifier)
1632        if (!item.isEmpty())
1633          return true;
1634      return false;
1635    }
1636
1637    public Identifier addIdentifier() { //3
1638      Identifier t = new Identifier();
1639      if (this.identifier == null)
1640        this.identifier = new ArrayList<Identifier>();
1641      this.identifier.add(t);
1642      return t;
1643    }
1644
1645    public EvidenceVariable addIdentifier(Identifier t) { //3
1646      if (t == null)
1647        return this;
1648      if (this.identifier == null)
1649        this.identifier = new ArrayList<Identifier>();
1650      this.identifier.add(t);
1651      return this;
1652    }
1653
1654    /**
1655     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1656     */
1657    public Identifier getIdentifierFirstRep() { 
1658      if (getIdentifier().isEmpty()) {
1659        addIdentifier();
1660      }
1661      return getIdentifier().get(0);
1662    }
1663
1664    /**
1665     * @return {@link #version} (The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1666     */
1667    public StringType getVersionElement() { 
1668      if (this.version == null)
1669        if (Configuration.errorOnAutoCreate())
1670          throw new Error("Attempt to auto-create EvidenceVariable.version");
1671        else if (Configuration.doAutoCreate())
1672          this.version = new StringType(); // bb
1673      return this.version;
1674    }
1675
1676    public boolean hasVersionElement() { 
1677      return this.version != null && !this.version.isEmpty();
1678    }
1679
1680    public boolean hasVersion() { 
1681      return this.version != null && !this.version.isEmpty();
1682    }
1683
1684    /**
1685     * @param value {@link #version} (The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1686     */
1687    public EvidenceVariable setVersionElement(StringType value) { 
1688      this.version = value;
1689      return this;
1690    }
1691
1692    /**
1693     * @return The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.
1694     */
1695    public String getVersion() { 
1696      return this.version == null ? null : this.version.getValue();
1697    }
1698
1699    /**
1700     * @param value The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.
1701     */
1702    public EvidenceVariable setVersion(String value) { 
1703      if (Utilities.noString(value))
1704        this.version = null;
1705      else {
1706        if (this.version == null)
1707          this.version = new StringType();
1708        this.version.setValue(value);
1709      }
1710      return this;
1711    }
1712
1713    /**
1714     * @return {@link #name} (A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1715     */
1716    public StringType getNameElement() { 
1717      if (this.name == null)
1718        if (Configuration.errorOnAutoCreate())
1719          throw new Error("Attempt to auto-create EvidenceVariable.name");
1720        else if (Configuration.doAutoCreate())
1721          this.name = new StringType(); // bb
1722      return this.name;
1723    }
1724
1725    public boolean hasNameElement() { 
1726      return this.name != null && !this.name.isEmpty();
1727    }
1728
1729    public boolean hasName() { 
1730      return this.name != null && !this.name.isEmpty();
1731    }
1732
1733    /**
1734     * @param value {@link #name} (A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1735     */
1736    public EvidenceVariable setNameElement(StringType value) { 
1737      this.name = value;
1738      return this;
1739    }
1740
1741    /**
1742     * @return A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1743     */
1744    public String getName() { 
1745      return this.name == null ? null : this.name.getValue();
1746    }
1747
1748    /**
1749     * @param value A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1750     */
1751    public EvidenceVariable setName(String value) { 
1752      if (Utilities.noString(value))
1753        this.name = null;
1754      else {
1755        if (this.name == null)
1756          this.name = new StringType();
1757        this.name.setValue(value);
1758      }
1759      return this;
1760    }
1761
1762    /**
1763     * @return {@link #title} (A short, descriptive, user-friendly title for the evidence variable.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1764     */
1765    public StringType getTitleElement() { 
1766      if (this.title == null)
1767        if (Configuration.errorOnAutoCreate())
1768          throw new Error("Attempt to auto-create EvidenceVariable.title");
1769        else if (Configuration.doAutoCreate())
1770          this.title = new StringType(); // bb
1771      return this.title;
1772    }
1773
1774    public boolean hasTitleElement() { 
1775      return this.title != null && !this.title.isEmpty();
1776    }
1777
1778    public boolean hasTitle() { 
1779      return this.title != null && !this.title.isEmpty();
1780    }
1781
1782    /**
1783     * @param value {@link #title} (A short, descriptive, user-friendly title for the evidence variable.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1784     */
1785    public EvidenceVariable setTitleElement(StringType value) { 
1786      this.title = value;
1787      return this;
1788    }
1789
1790    /**
1791     * @return A short, descriptive, user-friendly title for the evidence variable.
1792     */
1793    public String getTitle() { 
1794      return this.title == null ? null : this.title.getValue();
1795    }
1796
1797    /**
1798     * @param value A short, descriptive, user-friendly title for the evidence variable.
1799     */
1800    public EvidenceVariable setTitle(String value) { 
1801      if (Utilities.noString(value))
1802        this.title = null;
1803      else {
1804        if (this.title == null)
1805          this.title = new StringType();
1806        this.title.setValue(value);
1807      }
1808      return this;
1809    }
1810
1811    /**
1812     * @return {@link #shortTitle} (The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.). This is the underlying object with id, value and extensions. The accessor "getShortTitle" gives direct access to the value
1813     */
1814    public StringType getShortTitleElement() { 
1815      if (this.shortTitle == null)
1816        if (Configuration.errorOnAutoCreate())
1817          throw new Error("Attempt to auto-create EvidenceVariable.shortTitle");
1818        else if (Configuration.doAutoCreate())
1819          this.shortTitle = new StringType(); // bb
1820      return this.shortTitle;
1821    }
1822
1823    public boolean hasShortTitleElement() { 
1824      return this.shortTitle != null && !this.shortTitle.isEmpty();
1825    }
1826
1827    public boolean hasShortTitle() { 
1828      return this.shortTitle != null && !this.shortTitle.isEmpty();
1829    }
1830
1831    /**
1832     * @param value {@link #shortTitle} (The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.). This is the underlying object with id, value and extensions. The accessor "getShortTitle" gives direct access to the value
1833     */
1834    public EvidenceVariable setShortTitleElement(StringType value) { 
1835      this.shortTitle = value;
1836      return this;
1837    }
1838
1839    /**
1840     * @return The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.
1841     */
1842    public String getShortTitle() { 
1843      return this.shortTitle == null ? null : this.shortTitle.getValue();
1844    }
1845
1846    /**
1847     * @param value The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.
1848     */
1849    public EvidenceVariable setShortTitle(String value) { 
1850      if (Utilities.noString(value))
1851        this.shortTitle = null;
1852      else {
1853        if (this.shortTitle == null)
1854          this.shortTitle = new StringType();
1855        this.shortTitle.setValue(value);
1856      }
1857      return this;
1858    }
1859
1860    /**
1861     * @return {@link #subtitle} (An explanatory or alternate title for the EvidenceVariable giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value
1862     */
1863    public StringType getSubtitleElement() { 
1864      if (this.subtitle == null)
1865        if (Configuration.errorOnAutoCreate())
1866          throw new Error("Attempt to auto-create EvidenceVariable.subtitle");
1867        else if (Configuration.doAutoCreate())
1868          this.subtitle = new StringType(); // bb
1869      return this.subtitle;
1870    }
1871
1872    public boolean hasSubtitleElement() { 
1873      return this.subtitle != null && !this.subtitle.isEmpty();
1874    }
1875
1876    public boolean hasSubtitle() { 
1877      return this.subtitle != null && !this.subtitle.isEmpty();
1878    }
1879
1880    /**
1881     * @param value {@link #subtitle} (An explanatory or alternate title for the EvidenceVariable giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value
1882     */
1883    public EvidenceVariable setSubtitleElement(StringType value) { 
1884      this.subtitle = value;
1885      return this;
1886    }
1887
1888    /**
1889     * @return An explanatory or alternate title for the EvidenceVariable giving additional information about its content.
1890     */
1891    public String getSubtitle() { 
1892      return this.subtitle == null ? null : this.subtitle.getValue();
1893    }
1894
1895    /**
1896     * @param value An explanatory or alternate title for the EvidenceVariable giving additional information about its content.
1897     */
1898    public EvidenceVariable setSubtitle(String value) { 
1899      if (Utilities.noString(value))
1900        this.subtitle = null;
1901      else {
1902        if (this.subtitle == null)
1903          this.subtitle = new StringType();
1904        this.subtitle.setValue(value);
1905      }
1906      return this;
1907    }
1908
1909    /**
1910     * @return {@link #status} (The status of this evidence variable. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1911     */
1912    public Enumeration<PublicationStatus> getStatusElement() { 
1913      if (this.status == null)
1914        if (Configuration.errorOnAutoCreate())
1915          throw new Error("Attempt to auto-create EvidenceVariable.status");
1916        else if (Configuration.doAutoCreate())
1917          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
1918      return this.status;
1919    }
1920
1921    public boolean hasStatusElement() { 
1922      return this.status != null && !this.status.isEmpty();
1923    }
1924
1925    public boolean hasStatus() { 
1926      return this.status != null && !this.status.isEmpty();
1927    }
1928
1929    /**
1930     * @param value {@link #status} (The status of this evidence variable. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1931     */
1932    public EvidenceVariable setStatusElement(Enumeration<PublicationStatus> value) { 
1933      this.status = value;
1934      return this;
1935    }
1936
1937    /**
1938     * @return The status of this evidence variable. Enables tracking the life-cycle of the content.
1939     */
1940    public PublicationStatus getStatus() { 
1941      return this.status == null ? null : this.status.getValue();
1942    }
1943
1944    /**
1945     * @param value The status of this evidence variable. Enables tracking the life-cycle of the content.
1946     */
1947    public EvidenceVariable setStatus(PublicationStatus value) { 
1948        if (this.status == null)
1949          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
1950        this.status.setValue(value);
1951      return this;
1952    }
1953
1954    /**
1955     * @return {@link #date} (The date  (and optionally time) when the evidence variable 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 evidence variable changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1956     */
1957    public DateTimeType getDateElement() { 
1958      if (this.date == null)
1959        if (Configuration.errorOnAutoCreate())
1960          throw new Error("Attempt to auto-create EvidenceVariable.date");
1961        else if (Configuration.doAutoCreate())
1962          this.date = new DateTimeType(); // bb
1963      return this.date;
1964    }
1965
1966    public boolean hasDateElement() { 
1967      return this.date != null && !this.date.isEmpty();
1968    }
1969
1970    public boolean hasDate() { 
1971      return this.date != null && !this.date.isEmpty();
1972    }
1973
1974    /**
1975     * @param value {@link #date} (The date  (and optionally time) when the evidence variable 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 evidence variable changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1976     */
1977    public EvidenceVariable setDateElement(DateTimeType value) { 
1978      this.date = value;
1979      return this;
1980    }
1981
1982    /**
1983     * @return The date  (and optionally time) when the evidence variable 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 evidence variable changes.
1984     */
1985    public Date getDate() { 
1986      return this.date == null ? null : this.date.getValue();
1987    }
1988
1989    /**
1990     * @param value The date  (and optionally time) when the evidence variable 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 evidence variable changes.
1991     */
1992    public EvidenceVariable setDate(Date value) { 
1993      if (value == null)
1994        this.date = null;
1995      else {
1996        if (this.date == null)
1997          this.date = new DateTimeType();
1998        this.date.setValue(value);
1999      }
2000      return this;
2001    }
2002
2003    /**
2004     * @return {@link #description} (A free text natural language description of the evidence variable from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2005     */
2006    public MarkdownType getDescriptionElement() { 
2007      if (this.description == null)
2008        if (Configuration.errorOnAutoCreate())
2009          throw new Error("Attempt to auto-create EvidenceVariable.description");
2010        else if (Configuration.doAutoCreate())
2011          this.description = new MarkdownType(); // bb
2012      return this.description;
2013    }
2014
2015    public boolean hasDescriptionElement() { 
2016      return this.description != null && !this.description.isEmpty();
2017    }
2018
2019    public boolean hasDescription() { 
2020      return this.description != null && !this.description.isEmpty();
2021    }
2022
2023    /**
2024     * @param value {@link #description} (A free text natural language description of the evidence variable from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2025     */
2026    public EvidenceVariable setDescriptionElement(MarkdownType value) { 
2027      this.description = value;
2028      return this;
2029    }
2030
2031    /**
2032     * @return A free text natural language description of the evidence variable from a consumer's perspective.
2033     */
2034    public String getDescription() { 
2035      return this.description == null ? null : this.description.getValue();
2036    }
2037
2038    /**
2039     * @param value A free text natural language description of the evidence variable from a consumer's perspective.
2040     */
2041    public EvidenceVariable setDescription(String value) { 
2042      if (value == null)
2043        this.description = null;
2044      else {
2045        if (this.description == null)
2046          this.description = new MarkdownType();
2047        this.description.setValue(value);
2048      }
2049      return this;
2050    }
2051
2052    /**
2053     * @return {@link #note} (A human-readable string to clarify or explain concepts about the resource.)
2054     */
2055    public List<Annotation> getNote() { 
2056      if (this.note == null)
2057        this.note = new ArrayList<Annotation>();
2058      return this.note;
2059    }
2060
2061    /**
2062     * @return Returns a reference to <code>this</code> for easy method chaining
2063     */
2064    public EvidenceVariable setNote(List<Annotation> theNote) { 
2065      this.note = theNote;
2066      return this;
2067    }
2068
2069    public boolean hasNote() { 
2070      if (this.note == null)
2071        return false;
2072      for (Annotation item : this.note)
2073        if (!item.isEmpty())
2074          return true;
2075      return false;
2076    }
2077
2078    public Annotation addNote() { //3
2079      Annotation t = new Annotation();
2080      if (this.note == null)
2081        this.note = new ArrayList<Annotation>();
2082      this.note.add(t);
2083      return t;
2084    }
2085
2086    public EvidenceVariable addNote(Annotation t) { //3
2087      if (t == null)
2088        return this;
2089      if (this.note == null)
2090        this.note = new ArrayList<Annotation>();
2091      this.note.add(t);
2092      return this;
2093    }
2094
2095    /**
2096     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
2097     */
2098    public Annotation getNoteFirstRep() { 
2099      if (getNote().isEmpty()) {
2100        addNote();
2101      }
2102      return getNote().get(0);
2103    }
2104
2105    /**
2106     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances.)
2107     */
2108    public List<UsageContext> getUseContext() { 
2109      if (this.useContext == null)
2110        this.useContext = new ArrayList<UsageContext>();
2111      return this.useContext;
2112    }
2113
2114    /**
2115     * @return Returns a reference to <code>this</code> for easy method chaining
2116     */
2117    public EvidenceVariable setUseContext(List<UsageContext> theUseContext) { 
2118      this.useContext = theUseContext;
2119      return this;
2120    }
2121
2122    public boolean hasUseContext() { 
2123      if (this.useContext == null)
2124        return false;
2125      for (UsageContext item : this.useContext)
2126        if (!item.isEmpty())
2127          return true;
2128      return false;
2129    }
2130
2131    public UsageContext addUseContext() { //3
2132      UsageContext t = new UsageContext();
2133      if (this.useContext == null)
2134        this.useContext = new ArrayList<UsageContext>();
2135      this.useContext.add(t);
2136      return t;
2137    }
2138
2139    public EvidenceVariable addUseContext(UsageContext t) { //3
2140      if (t == null)
2141        return this;
2142      if (this.useContext == null)
2143        this.useContext = new ArrayList<UsageContext>();
2144      this.useContext.add(t);
2145      return this;
2146    }
2147
2148    /**
2149     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
2150     */
2151    public UsageContext getUseContextFirstRep() { 
2152      if (getUseContext().isEmpty()) {
2153        addUseContext();
2154      }
2155      return getUseContext().get(0);
2156    }
2157
2158    /**
2159     * @return {@link #publisher} (The name of the organization or individual that published the evidence variable.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2160     */
2161    public StringType getPublisherElement() { 
2162      if (this.publisher == null)
2163        if (Configuration.errorOnAutoCreate())
2164          throw new Error("Attempt to auto-create EvidenceVariable.publisher");
2165        else if (Configuration.doAutoCreate())
2166          this.publisher = new StringType(); // bb
2167      return this.publisher;
2168    }
2169
2170    public boolean hasPublisherElement() { 
2171      return this.publisher != null && !this.publisher.isEmpty();
2172    }
2173
2174    public boolean hasPublisher() { 
2175      return this.publisher != null && !this.publisher.isEmpty();
2176    }
2177
2178    /**
2179     * @param value {@link #publisher} (The name of the organization or individual that published the evidence variable.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2180     */
2181    public EvidenceVariable setPublisherElement(StringType value) { 
2182      this.publisher = value;
2183      return this;
2184    }
2185
2186    /**
2187     * @return The name of the organization or individual that published the evidence variable.
2188     */
2189    public String getPublisher() { 
2190      return this.publisher == null ? null : this.publisher.getValue();
2191    }
2192
2193    /**
2194     * @param value The name of the organization or individual that published the evidence variable.
2195     */
2196    public EvidenceVariable setPublisher(String value) { 
2197      if (Utilities.noString(value))
2198        this.publisher = null;
2199      else {
2200        if (this.publisher == null)
2201          this.publisher = new StringType();
2202        this.publisher.setValue(value);
2203      }
2204      return this;
2205    }
2206
2207    /**
2208     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2209     */
2210    public List<ContactDetail> getContact() { 
2211      if (this.contact == null)
2212        this.contact = new ArrayList<ContactDetail>();
2213      return this.contact;
2214    }
2215
2216    /**
2217     * @return Returns a reference to <code>this</code> for easy method chaining
2218     */
2219    public EvidenceVariable setContact(List<ContactDetail> theContact) { 
2220      this.contact = theContact;
2221      return this;
2222    }
2223
2224    public boolean hasContact() { 
2225      if (this.contact == null)
2226        return false;
2227      for (ContactDetail item : this.contact)
2228        if (!item.isEmpty())
2229          return true;
2230      return false;
2231    }
2232
2233    public ContactDetail addContact() { //3
2234      ContactDetail t = new ContactDetail();
2235      if (this.contact == null)
2236        this.contact = new ArrayList<ContactDetail>();
2237      this.contact.add(t);
2238      return t;
2239    }
2240
2241    public EvidenceVariable addContact(ContactDetail t) { //3
2242      if (t == null)
2243        return this;
2244      if (this.contact == null)
2245        this.contact = new ArrayList<ContactDetail>();
2246      this.contact.add(t);
2247      return this;
2248    }
2249
2250    /**
2251     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
2252     */
2253    public ContactDetail getContactFirstRep() { 
2254      if (getContact().isEmpty()) {
2255        addContact();
2256      }
2257      return getContact().get(0);
2258    }
2259
2260    /**
2261     * @return {@link #author} (An individiual or organization primarily involved in the creation and maintenance of the content.)
2262     */
2263    public List<ContactDetail> getAuthor() { 
2264      if (this.author == null)
2265        this.author = new ArrayList<ContactDetail>();
2266      return this.author;
2267    }
2268
2269    /**
2270     * @return Returns a reference to <code>this</code> for easy method chaining
2271     */
2272    public EvidenceVariable setAuthor(List<ContactDetail> theAuthor) { 
2273      this.author = theAuthor;
2274      return this;
2275    }
2276
2277    public boolean hasAuthor() { 
2278      if (this.author == null)
2279        return false;
2280      for (ContactDetail item : this.author)
2281        if (!item.isEmpty())
2282          return true;
2283      return false;
2284    }
2285
2286    public ContactDetail addAuthor() { //3
2287      ContactDetail t = new ContactDetail();
2288      if (this.author == null)
2289        this.author = new ArrayList<ContactDetail>();
2290      this.author.add(t);
2291      return t;
2292    }
2293
2294    public EvidenceVariable addAuthor(ContactDetail t) { //3
2295      if (t == null)
2296        return this;
2297      if (this.author == null)
2298        this.author = new ArrayList<ContactDetail>();
2299      this.author.add(t);
2300      return this;
2301    }
2302
2303    /**
2304     * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {3}
2305     */
2306    public ContactDetail getAuthorFirstRep() { 
2307      if (getAuthor().isEmpty()) {
2308        addAuthor();
2309      }
2310      return getAuthor().get(0);
2311    }
2312
2313    /**
2314     * @return {@link #editor} (An individual or organization primarily responsible for internal coherence of the content.)
2315     */
2316    public List<ContactDetail> getEditor() { 
2317      if (this.editor == null)
2318        this.editor = new ArrayList<ContactDetail>();
2319      return this.editor;
2320    }
2321
2322    /**
2323     * @return Returns a reference to <code>this</code> for easy method chaining
2324     */
2325    public EvidenceVariable setEditor(List<ContactDetail> theEditor) { 
2326      this.editor = theEditor;
2327      return this;
2328    }
2329
2330    public boolean hasEditor() { 
2331      if (this.editor == null)
2332        return false;
2333      for (ContactDetail item : this.editor)
2334        if (!item.isEmpty())
2335          return true;
2336      return false;
2337    }
2338
2339    public ContactDetail addEditor() { //3
2340      ContactDetail t = new ContactDetail();
2341      if (this.editor == null)
2342        this.editor = new ArrayList<ContactDetail>();
2343      this.editor.add(t);
2344      return t;
2345    }
2346
2347    public EvidenceVariable addEditor(ContactDetail t) { //3
2348      if (t == null)
2349        return this;
2350      if (this.editor == null)
2351        this.editor = new ArrayList<ContactDetail>();
2352      this.editor.add(t);
2353      return this;
2354    }
2355
2356    /**
2357     * @return The first repetition of repeating field {@link #editor}, creating it if it does not already exist {3}
2358     */
2359    public ContactDetail getEditorFirstRep() { 
2360      if (getEditor().isEmpty()) {
2361        addEditor();
2362      }
2363      return getEditor().get(0);
2364    }
2365
2366    /**
2367     * @return {@link #reviewer} (An individual or organization primarily responsible for review of some aspect of the content.)
2368     */
2369    public List<ContactDetail> getReviewer() { 
2370      if (this.reviewer == null)
2371        this.reviewer = new ArrayList<ContactDetail>();
2372      return this.reviewer;
2373    }
2374
2375    /**
2376     * @return Returns a reference to <code>this</code> for easy method chaining
2377     */
2378    public EvidenceVariable setReviewer(List<ContactDetail> theReviewer) { 
2379      this.reviewer = theReviewer;
2380      return this;
2381    }
2382
2383    public boolean hasReviewer() { 
2384      if (this.reviewer == null)
2385        return false;
2386      for (ContactDetail item : this.reviewer)
2387        if (!item.isEmpty())
2388          return true;
2389      return false;
2390    }
2391
2392    public ContactDetail addReviewer() { //3
2393      ContactDetail t = new ContactDetail();
2394      if (this.reviewer == null)
2395        this.reviewer = new ArrayList<ContactDetail>();
2396      this.reviewer.add(t);
2397      return t;
2398    }
2399
2400    public EvidenceVariable addReviewer(ContactDetail t) { //3
2401      if (t == null)
2402        return this;
2403      if (this.reviewer == null)
2404        this.reviewer = new ArrayList<ContactDetail>();
2405      this.reviewer.add(t);
2406      return this;
2407    }
2408
2409    /**
2410     * @return The first repetition of repeating field {@link #reviewer}, creating it if it does not already exist {3}
2411     */
2412    public ContactDetail getReviewerFirstRep() { 
2413      if (getReviewer().isEmpty()) {
2414        addReviewer();
2415      }
2416      return getReviewer().get(0);
2417    }
2418
2419    /**
2420     * @return {@link #endorser} (An individual or organization responsible for officially endorsing the content for use in some setting.)
2421     */
2422    public List<ContactDetail> getEndorser() { 
2423      if (this.endorser == null)
2424        this.endorser = new ArrayList<ContactDetail>();
2425      return this.endorser;
2426    }
2427
2428    /**
2429     * @return Returns a reference to <code>this</code> for easy method chaining
2430     */
2431    public EvidenceVariable setEndorser(List<ContactDetail> theEndorser) { 
2432      this.endorser = theEndorser;
2433      return this;
2434    }
2435
2436    public boolean hasEndorser() { 
2437      if (this.endorser == null)
2438        return false;
2439      for (ContactDetail item : this.endorser)
2440        if (!item.isEmpty())
2441          return true;
2442      return false;
2443    }
2444
2445    public ContactDetail addEndorser() { //3
2446      ContactDetail t = new ContactDetail();
2447      if (this.endorser == null)
2448        this.endorser = new ArrayList<ContactDetail>();
2449      this.endorser.add(t);
2450      return t;
2451    }
2452
2453    public EvidenceVariable addEndorser(ContactDetail t) { //3
2454      if (t == null)
2455        return this;
2456      if (this.endorser == null)
2457        this.endorser = new ArrayList<ContactDetail>();
2458      this.endorser.add(t);
2459      return this;
2460    }
2461
2462    /**
2463     * @return The first repetition of repeating field {@link #endorser}, creating it if it does not already exist {3}
2464     */
2465    public ContactDetail getEndorserFirstRep() { 
2466      if (getEndorser().isEmpty()) {
2467        addEndorser();
2468      }
2469      return getEndorser().get(0);
2470    }
2471
2472    /**
2473     * @return {@link #relatedArtifact} (Related artifacts such as additional documentation, justification, or bibliographic references.)
2474     */
2475    public List<RelatedArtifact> getRelatedArtifact() { 
2476      if (this.relatedArtifact == null)
2477        this.relatedArtifact = new ArrayList<RelatedArtifact>();
2478      return this.relatedArtifact;
2479    }
2480
2481    /**
2482     * @return Returns a reference to <code>this</code> for easy method chaining
2483     */
2484    public EvidenceVariable setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
2485      this.relatedArtifact = theRelatedArtifact;
2486      return this;
2487    }
2488
2489    public boolean hasRelatedArtifact() { 
2490      if (this.relatedArtifact == null)
2491        return false;
2492      for (RelatedArtifact item : this.relatedArtifact)
2493        if (!item.isEmpty())
2494          return true;
2495      return false;
2496    }
2497
2498    public RelatedArtifact addRelatedArtifact() { //3
2499      RelatedArtifact t = new RelatedArtifact();
2500      if (this.relatedArtifact == null)
2501        this.relatedArtifact = new ArrayList<RelatedArtifact>();
2502      this.relatedArtifact.add(t);
2503      return t;
2504    }
2505
2506    public EvidenceVariable addRelatedArtifact(RelatedArtifact t) { //3
2507      if (t == null)
2508        return this;
2509      if (this.relatedArtifact == null)
2510        this.relatedArtifact = new ArrayList<RelatedArtifact>();
2511      this.relatedArtifact.add(t);
2512      return this;
2513    }
2514
2515    /**
2516     * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {3}
2517     */
2518    public RelatedArtifact getRelatedArtifactFirstRep() { 
2519      if (getRelatedArtifact().isEmpty()) {
2520        addRelatedArtifact();
2521      }
2522      return getRelatedArtifact().get(0);
2523    }
2524
2525    /**
2526     * @return {@link #actual} (True if the actual variable measured, false if a conceptual representation of the intended variable.). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value
2527     */
2528    public BooleanType getActualElement() { 
2529      if (this.actual == null)
2530        if (Configuration.errorOnAutoCreate())
2531          throw new Error("Attempt to auto-create EvidenceVariable.actual");
2532        else if (Configuration.doAutoCreate())
2533          this.actual = new BooleanType(); // bb
2534      return this.actual;
2535    }
2536
2537    public boolean hasActualElement() { 
2538      return this.actual != null && !this.actual.isEmpty();
2539    }
2540
2541    public boolean hasActual() { 
2542      return this.actual != null && !this.actual.isEmpty();
2543    }
2544
2545    /**
2546     * @param value {@link #actual} (True if the actual variable measured, false if a conceptual representation of the intended variable.). This is the underlying object with id, value and extensions. The accessor "getActual" gives direct access to the value
2547     */
2548    public EvidenceVariable setActualElement(BooleanType value) { 
2549      this.actual = value;
2550      return this;
2551    }
2552
2553    /**
2554     * @return True if the actual variable measured, false if a conceptual representation of the intended variable.
2555     */
2556    public boolean getActual() { 
2557      return this.actual == null || this.actual.isEmpty() ? false : this.actual.getValue();
2558    }
2559
2560    /**
2561     * @param value True if the actual variable measured, false if a conceptual representation of the intended variable.
2562     */
2563    public EvidenceVariable setActual(boolean value) { 
2564        if (this.actual == null)
2565          this.actual = new BooleanType();
2566        this.actual.setValue(value);
2567      return this;
2568    }
2569
2570    /**
2571     * @return {@link #characteristicCombination} (Used to specify if two or more characteristics are combined with OR or AND.). This is the underlying object with id, value and extensions. The accessor "getCharacteristicCombination" gives direct access to the value
2572     */
2573    public Enumeration<CharacteristicCombination> getCharacteristicCombinationElement() { 
2574      if (this.characteristicCombination == null)
2575        if (Configuration.errorOnAutoCreate())
2576          throw new Error("Attempt to auto-create EvidenceVariable.characteristicCombination");
2577        else if (Configuration.doAutoCreate())
2578          this.characteristicCombination = new Enumeration<CharacteristicCombination>(new CharacteristicCombinationEnumFactory()); // bb
2579      return this.characteristicCombination;
2580    }
2581
2582    public boolean hasCharacteristicCombinationElement() { 
2583      return this.characteristicCombination != null && !this.characteristicCombination.isEmpty();
2584    }
2585
2586    public boolean hasCharacteristicCombination() { 
2587      return this.characteristicCombination != null && !this.characteristicCombination.isEmpty();
2588    }
2589
2590    /**
2591     * @param value {@link #characteristicCombination} (Used to specify if two or more characteristics are combined with OR or AND.). This is the underlying object with id, value and extensions. The accessor "getCharacteristicCombination" gives direct access to the value
2592     */
2593    public EvidenceVariable setCharacteristicCombinationElement(Enumeration<CharacteristicCombination> value) { 
2594      this.characteristicCombination = value;
2595      return this;
2596    }
2597
2598    /**
2599     * @return Used to specify if two or more characteristics are combined with OR or AND.
2600     */
2601    public CharacteristicCombination getCharacteristicCombination() { 
2602      return this.characteristicCombination == null ? null : this.characteristicCombination.getValue();
2603    }
2604
2605    /**
2606     * @param value Used to specify if two or more characteristics are combined with OR or AND.
2607     */
2608    public EvidenceVariable setCharacteristicCombination(CharacteristicCombination value) { 
2609      if (value == null)
2610        this.characteristicCombination = null;
2611      else {
2612        if (this.characteristicCombination == null)
2613          this.characteristicCombination = new Enumeration<CharacteristicCombination>(new CharacteristicCombinationEnumFactory());
2614        this.characteristicCombination.setValue(value);
2615      }
2616      return this;
2617    }
2618
2619    /**
2620     * @return {@link #characteristic} (A characteristic that defines the members of the evidence element. Multiple characteristics are applied with "and" semantics.)
2621     */
2622    public List<EvidenceVariableCharacteristicComponent> getCharacteristic() { 
2623      if (this.characteristic == null)
2624        this.characteristic = new ArrayList<EvidenceVariableCharacteristicComponent>();
2625      return this.characteristic;
2626    }
2627
2628    /**
2629     * @return Returns a reference to <code>this</code> for easy method chaining
2630     */
2631    public EvidenceVariable setCharacteristic(List<EvidenceVariableCharacteristicComponent> theCharacteristic) { 
2632      this.characteristic = theCharacteristic;
2633      return this;
2634    }
2635
2636    public boolean hasCharacteristic() { 
2637      if (this.characteristic == null)
2638        return false;
2639      for (EvidenceVariableCharacteristicComponent item : this.characteristic)
2640        if (!item.isEmpty())
2641          return true;
2642      return false;
2643    }
2644
2645    public EvidenceVariableCharacteristicComponent addCharacteristic() { //3
2646      EvidenceVariableCharacteristicComponent t = new EvidenceVariableCharacteristicComponent();
2647      if (this.characteristic == null)
2648        this.characteristic = new ArrayList<EvidenceVariableCharacteristicComponent>();
2649      this.characteristic.add(t);
2650      return t;
2651    }
2652
2653    public EvidenceVariable addCharacteristic(EvidenceVariableCharacteristicComponent t) { //3
2654      if (t == null)
2655        return this;
2656      if (this.characteristic == null)
2657        this.characteristic = new ArrayList<EvidenceVariableCharacteristicComponent>();
2658      this.characteristic.add(t);
2659      return this;
2660    }
2661
2662    /**
2663     * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist {3}
2664     */
2665    public EvidenceVariableCharacteristicComponent getCharacteristicFirstRep() { 
2666      if (getCharacteristic().isEmpty()) {
2667        addCharacteristic();
2668      }
2669      return getCharacteristic().get(0);
2670    }
2671
2672    /**
2673     * @return {@link #handling} (Used for an outcome to classify.). This is the underlying object with id, value and extensions. The accessor "getHandling" gives direct access to the value
2674     */
2675    public Enumeration<EvidenceVariableHandling> getHandlingElement() { 
2676      if (this.handling == null)
2677        if (Configuration.errorOnAutoCreate())
2678          throw new Error("Attempt to auto-create EvidenceVariable.handling");
2679        else if (Configuration.doAutoCreate())
2680          this.handling = new Enumeration<EvidenceVariableHandling>(new EvidenceVariableHandlingEnumFactory()); // bb
2681      return this.handling;
2682    }
2683
2684    public boolean hasHandlingElement() { 
2685      return this.handling != null && !this.handling.isEmpty();
2686    }
2687
2688    public boolean hasHandling() { 
2689      return this.handling != null && !this.handling.isEmpty();
2690    }
2691
2692    /**
2693     * @param value {@link #handling} (Used for an outcome to classify.). This is the underlying object with id, value and extensions. The accessor "getHandling" gives direct access to the value
2694     */
2695    public EvidenceVariable setHandlingElement(Enumeration<EvidenceVariableHandling> value) { 
2696      this.handling = value;
2697      return this;
2698    }
2699
2700    /**
2701     * @return Used for an outcome to classify.
2702     */
2703    public EvidenceVariableHandling getHandling() { 
2704      return this.handling == null ? null : this.handling.getValue();
2705    }
2706
2707    /**
2708     * @param value Used for an outcome to classify.
2709     */
2710    public EvidenceVariable setHandling(EvidenceVariableHandling value) { 
2711      if (value == null)
2712        this.handling = null;
2713      else {
2714        if (this.handling == null)
2715          this.handling = new Enumeration<EvidenceVariableHandling>(new EvidenceVariableHandlingEnumFactory());
2716        this.handling.setValue(value);
2717      }
2718      return this;
2719    }
2720
2721    /**
2722     * @return {@link #category} (A grouping (or set of values) described along with other groupings to specify the set of groupings allowed for the variable.)
2723     */
2724    public List<EvidenceVariableCategoryComponent> getCategory() { 
2725      if (this.category == null)
2726        this.category = new ArrayList<EvidenceVariableCategoryComponent>();
2727      return this.category;
2728    }
2729
2730    /**
2731     * @return Returns a reference to <code>this</code> for easy method chaining
2732     */
2733    public EvidenceVariable setCategory(List<EvidenceVariableCategoryComponent> theCategory) { 
2734      this.category = theCategory;
2735      return this;
2736    }
2737
2738    public boolean hasCategory() { 
2739      if (this.category == null)
2740        return false;
2741      for (EvidenceVariableCategoryComponent item : this.category)
2742        if (!item.isEmpty())
2743          return true;
2744      return false;
2745    }
2746
2747    public EvidenceVariableCategoryComponent addCategory() { //3
2748      EvidenceVariableCategoryComponent t = new EvidenceVariableCategoryComponent();
2749      if (this.category == null)
2750        this.category = new ArrayList<EvidenceVariableCategoryComponent>();
2751      this.category.add(t);
2752      return t;
2753    }
2754
2755    public EvidenceVariable addCategory(EvidenceVariableCategoryComponent t) { //3
2756      if (t == null)
2757        return this;
2758      if (this.category == null)
2759        this.category = new ArrayList<EvidenceVariableCategoryComponent>();
2760      this.category.add(t);
2761      return this;
2762    }
2763
2764    /**
2765     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
2766     */
2767    public EvidenceVariableCategoryComponent getCategoryFirstRep() { 
2768      if (getCategory().isEmpty()) {
2769        addCategory();
2770      }
2771      return getCategory().get(0);
2772    }
2773
2774      protected void listChildren(List<Property> children) {
2775        super.listChildren(children);
2776        children.add(new Property("url", "uri", "An absolute URI that is used to identify this evidence variable 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 evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.", 0, 1, url));
2777        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
2778        children.add(new Property("version", "string", "The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", 0, 1, version));
2779        children.add(new Property("name", "string", "A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
2780        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the evidence variable.", 0, 1, title));
2781        children.add(new Property("shortTitle", "string", "The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.", 0, 1, shortTitle));
2782        children.add(new Property("subtitle", "string", "An explanatory or alternate title for the EvidenceVariable giving additional information about its content.", 0, 1, subtitle));
2783        children.add(new Property("status", "code", "The status of this evidence variable. Enables tracking the life-cycle of the content.", 0, 1, status));
2784        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the evidence variable 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 evidence variable changes.", 0, 1, date));
2785        children.add(new Property("description", "markdown", "A free text natural language description of the evidence variable from a consumer's perspective.", 0, 1, description));
2786        children.add(new Property("note", "Annotation", "A human-readable string to clarify or explain concepts about the resource.", 0, java.lang.Integer.MAX_VALUE, note));
2787        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
2788        children.add(new Property("publisher", "string", "The name of the organization or individual that published the evidence variable.", 0, 1, publisher));
2789        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
2790        children.add(new Property("author", "ContactDetail", "An individiual or organization primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author));
2791        children.add(new Property("editor", "ContactDetail", "An individual or organization primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor));
2792        children.add(new Property("reviewer", "ContactDetail", "An individual or organization primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer));
2793        children.add(new Property("endorser", "ContactDetail", "An individual or organization responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser));
2794        children.add(new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact));
2795        children.add(new Property("actual", "boolean", "True if the actual variable measured, false if a conceptual representation of the intended variable.", 0, 1, actual));
2796        children.add(new Property("characteristicCombination", "code", "Used to specify if two or more characteristics are combined with OR or AND.", 0, 1, characteristicCombination));
2797        children.add(new Property("characteristic", "", "A characteristic that defines the members of the evidence element. Multiple characteristics are applied with \"and\" semantics.", 0, java.lang.Integer.MAX_VALUE, characteristic));
2798        children.add(new Property("handling", "code", "Used for an outcome to classify.", 0, 1, handling));
2799        children.add(new Property("category", "", "A grouping (or set of values) described along with other groupings to specify the set of groupings allowed for the variable.", 0, java.lang.Integer.MAX_VALUE, category));
2800      }
2801
2802      @Override
2803      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2804        switch (_hash) {
2805        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this evidence variable 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 evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.", 0, 1, url);
2806        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
2807        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable 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. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.", 0, 1, version);
2808        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
2809        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the evidence variable.", 0, 1, title);
2810        case 1555503932: /*shortTitle*/  return new Property("shortTitle", "string", "The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.", 0, 1, shortTitle);
2811        case -2060497896: /*subtitle*/  return new Property("subtitle", "string", "An explanatory or alternate title for the EvidenceVariable giving additional information about its content.", 0, 1, subtitle);
2812        case -892481550: /*status*/  return new Property("status", "code", "The status of this evidence variable. Enables tracking the life-cycle of the content.", 0, 1, status);
2813        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the evidence variable 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 evidence variable changes.", 0, 1, date);
2814        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the evidence variable from a consumer's perspective.", 0, 1, description);
2815        case 3387378: /*note*/  return new Property("note", "Annotation", "A human-readable string to clarify or explain concepts about the resource.", 0, java.lang.Integer.MAX_VALUE, note);
2816        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
2817        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the evidence variable.", 0, 1, publisher);
2818        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
2819        case -1406328437: /*author*/  return new Property("author", "ContactDetail", "An individiual or organization primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author);
2820        case -1307827859: /*editor*/  return new Property("editor", "ContactDetail", "An individual or organization primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor);
2821        case -261190139: /*reviewer*/  return new Property("reviewer", "ContactDetail", "An individual or organization primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer);
2822        case 1740277666: /*endorser*/  return new Property("endorser", "ContactDetail", "An individual or organization responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser);
2823        case 666807069: /*relatedArtifact*/  return new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact);
2824        case -1422939762: /*actual*/  return new Property("actual", "boolean", "True if the actual variable measured, false if a conceptual representation of the intended variable.", 0, 1, actual);
2825        case -861347276: /*characteristicCombination*/  return new Property("characteristicCombination", "code", "Used to specify if two or more characteristics are combined with OR or AND.", 0, 1, characteristicCombination);
2826        case 366313883: /*characteristic*/  return new Property("characteristic", "", "A characteristic that defines the members of the evidence element. Multiple characteristics are applied with \"and\" semantics.", 0, java.lang.Integer.MAX_VALUE, characteristic);
2827        case 2072805: /*handling*/  return new Property("handling", "code", "Used for an outcome to classify.", 0, 1, handling);
2828        case 50511102: /*category*/  return new Property("category", "", "A grouping (or set of values) described along with other groupings to specify the set of groupings allowed for the variable.", 0, java.lang.Integer.MAX_VALUE, category);
2829        default: return super.getNamedProperty(_hash, _name, _checkValid);
2830        }
2831
2832      }
2833
2834      @Override
2835      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2836        switch (hash) {
2837        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
2838        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2839        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
2840        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
2841        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
2842        case 1555503932: /*shortTitle*/ return this.shortTitle == null ? new Base[0] : new Base[] {this.shortTitle}; // StringType
2843        case -2060497896: /*subtitle*/ return this.subtitle == null ? new Base[0] : new Base[] {this.subtitle}; // StringType
2844        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
2845        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2846        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
2847        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
2848        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
2849        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
2850        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
2851        case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail
2852        case -1307827859: /*editor*/ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail
2853        case -261190139: /*reviewer*/ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail
2854        case 1740277666: /*endorser*/ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail
2855        case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
2856        case -1422939762: /*actual*/ return this.actual == null ? new Base[0] : new Base[] {this.actual}; // BooleanType
2857        case -861347276: /*characteristicCombination*/ return this.characteristicCombination == null ? new Base[0] : new Base[] {this.characteristicCombination}; // Enumeration<CharacteristicCombination>
2858        case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // EvidenceVariableCharacteristicComponent
2859        case 2072805: /*handling*/ return this.handling == null ? new Base[0] : new Base[] {this.handling}; // Enumeration<EvidenceVariableHandling>
2860        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // EvidenceVariableCategoryComponent
2861        default: return super.getProperty(hash, name, checkValid);
2862        }
2863
2864      }
2865
2866      @Override
2867      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2868        switch (hash) {
2869        case 116079: // url
2870          this.url = TypeConvertor.castToUri(value); // UriType
2871          return value;
2872        case -1618432855: // identifier
2873          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2874          return value;
2875        case 351608024: // version
2876          this.version = TypeConvertor.castToString(value); // StringType
2877          return value;
2878        case 3373707: // name
2879          this.name = TypeConvertor.castToString(value); // StringType
2880          return value;
2881        case 110371416: // title
2882          this.title = TypeConvertor.castToString(value); // StringType
2883          return value;
2884        case 1555503932: // shortTitle
2885          this.shortTitle = TypeConvertor.castToString(value); // StringType
2886          return value;
2887        case -2060497896: // subtitle
2888          this.subtitle = TypeConvertor.castToString(value); // StringType
2889          return value;
2890        case -892481550: // status
2891          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2892          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2893          return value;
2894        case 3076014: // date
2895          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2896          return value;
2897        case -1724546052: // description
2898          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
2899          return value;
2900        case 3387378: // note
2901          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
2902          return value;
2903        case -669707736: // useContext
2904          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
2905          return value;
2906        case 1447404028: // publisher
2907          this.publisher = TypeConvertor.castToString(value); // StringType
2908          return value;
2909        case 951526432: // contact
2910          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2911          return value;
2912        case -1406328437: // author
2913          this.getAuthor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2914          return value;
2915        case -1307827859: // editor
2916          this.getEditor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2917          return value;
2918        case -261190139: // reviewer
2919          this.getReviewer().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2920          return value;
2921        case 1740277666: // endorser
2922          this.getEndorser().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2923          return value;
2924        case 666807069: // relatedArtifact
2925          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact
2926          return value;
2927        case -1422939762: // actual
2928          this.actual = TypeConvertor.castToBoolean(value); // BooleanType
2929          return value;
2930        case -861347276: // characteristicCombination
2931          value = new CharacteristicCombinationEnumFactory().fromType(TypeConvertor.castToCode(value));
2932          this.characteristicCombination = (Enumeration) value; // Enumeration<CharacteristicCombination>
2933          return value;
2934        case 366313883: // characteristic
2935          this.getCharacteristic().add((EvidenceVariableCharacteristicComponent) value); // EvidenceVariableCharacteristicComponent
2936          return value;
2937        case 2072805: // handling
2938          value = new EvidenceVariableHandlingEnumFactory().fromType(TypeConvertor.castToCode(value));
2939          this.handling = (Enumeration) value; // Enumeration<EvidenceVariableHandling>
2940          return value;
2941        case 50511102: // category
2942          this.getCategory().add((EvidenceVariableCategoryComponent) value); // EvidenceVariableCategoryComponent
2943          return value;
2944        default: return super.setProperty(hash, name, value);
2945        }
2946
2947      }
2948
2949      @Override
2950      public Base setProperty(String name, Base value) throws FHIRException {
2951        if (name.equals("url")) {
2952          this.url = TypeConvertor.castToUri(value); // UriType
2953        } else if (name.equals("identifier")) {
2954          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2955        } else if (name.equals("version")) {
2956          this.version = TypeConvertor.castToString(value); // StringType
2957        } else if (name.equals("name")) {
2958          this.name = TypeConvertor.castToString(value); // StringType
2959        } else if (name.equals("title")) {
2960          this.title = TypeConvertor.castToString(value); // StringType
2961        } else if (name.equals("shortTitle")) {
2962          this.shortTitle = TypeConvertor.castToString(value); // StringType
2963        } else if (name.equals("subtitle")) {
2964          this.subtitle = TypeConvertor.castToString(value); // StringType
2965        } else if (name.equals("status")) {
2966          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2967          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2968        } else if (name.equals("date")) {
2969          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2970        } else if (name.equals("description")) {
2971          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
2972        } else if (name.equals("note")) {
2973          this.getNote().add(TypeConvertor.castToAnnotation(value));
2974        } else if (name.equals("useContext")) {
2975          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
2976        } else if (name.equals("publisher")) {
2977          this.publisher = TypeConvertor.castToString(value); // StringType
2978        } else if (name.equals("contact")) {
2979          this.getContact().add(TypeConvertor.castToContactDetail(value));
2980        } else if (name.equals("author")) {
2981          this.getAuthor().add(TypeConvertor.castToContactDetail(value));
2982        } else if (name.equals("editor")) {
2983          this.getEditor().add(TypeConvertor.castToContactDetail(value));
2984        } else if (name.equals("reviewer")) {
2985          this.getReviewer().add(TypeConvertor.castToContactDetail(value));
2986        } else if (name.equals("endorser")) {
2987          this.getEndorser().add(TypeConvertor.castToContactDetail(value));
2988        } else if (name.equals("relatedArtifact")) {
2989          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value));
2990        } else if (name.equals("actual")) {
2991          this.actual = TypeConvertor.castToBoolean(value); // BooleanType
2992        } else if (name.equals("characteristicCombination")) {
2993          value = new CharacteristicCombinationEnumFactory().fromType(TypeConvertor.castToCode(value));
2994          this.characteristicCombination = (Enumeration) value; // Enumeration<CharacteristicCombination>
2995        } else if (name.equals("characteristic")) {
2996          this.getCharacteristic().add((EvidenceVariableCharacteristicComponent) value);
2997        } else if (name.equals("handling")) {
2998          value = new EvidenceVariableHandlingEnumFactory().fromType(TypeConvertor.castToCode(value));
2999          this.handling = (Enumeration) value; // Enumeration<EvidenceVariableHandling>
3000        } else if (name.equals("category")) {
3001          this.getCategory().add((EvidenceVariableCategoryComponent) value);
3002        } else
3003          return super.setProperty(name, value);
3004        return value;
3005      }
3006
3007      @Override
3008      public Base makeProperty(int hash, String name) throws FHIRException {
3009        switch (hash) {
3010        case 116079:  return getUrlElement();
3011        case -1618432855:  return addIdentifier(); 
3012        case 351608024:  return getVersionElement();
3013        case 3373707:  return getNameElement();
3014        case 110371416:  return getTitleElement();
3015        case 1555503932:  return getShortTitleElement();
3016        case -2060497896:  return getSubtitleElement();
3017        case -892481550:  return getStatusElement();
3018        case 3076014:  return getDateElement();
3019        case -1724546052:  return getDescriptionElement();
3020        case 3387378:  return addNote(); 
3021        case -669707736:  return addUseContext(); 
3022        case 1447404028:  return getPublisherElement();
3023        case 951526432:  return addContact(); 
3024        case -1406328437:  return addAuthor(); 
3025        case -1307827859:  return addEditor(); 
3026        case -261190139:  return addReviewer(); 
3027        case 1740277666:  return addEndorser(); 
3028        case 666807069:  return addRelatedArtifact(); 
3029        case -1422939762:  return getActualElement();
3030        case -861347276:  return getCharacteristicCombinationElement();
3031        case 366313883:  return addCharacteristic(); 
3032        case 2072805:  return getHandlingElement();
3033        case 50511102:  return addCategory(); 
3034        default: return super.makeProperty(hash, name);
3035        }
3036
3037      }
3038
3039      @Override
3040      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3041        switch (hash) {
3042        case 116079: /*url*/ return new String[] {"uri"};
3043        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3044        case 351608024: /*version*/ return new String[] {"string"};
3045        case 3373707: /*name*/ return new String[] {"string"};
3046        case 110371416: /*title*/ return new String[] {"string"};
3047        case 1555503932: /*shortTitle*/ return new String[] {"string"};
3048        case -2060497896: /*subtitle*/ return new String[] {"string"};
3049        case -892481550: /*status*/ return new String[] {"code"};
3050        case 3076014: /*date*/ return new String[] {"dateTime"};
3051        case -1724546052: /*description*/ return new String[] {"markdown"};
3052        case 3387378: /*note*/ return new String[] {"Annotation"};
3053        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
3054        case 1447404028: /*publisher*/ return new String[] {"string"};
3055        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
3056        case -1406328437: /*author*/ return new String[] {"ContactDetail"};
3057        case -1307827859: /*editor*/ return new String[] {"ContactDetail"};
3058        case -261190139: /*reviewer*/ return new String[] {"ContactDetail"};
3059        case 1740277666: /*endorser*/ return new String[] {"ContactDetail"};
3060        case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"};
3061        case -1422939762: /*actual*/ return new String[] {"boolean"};
3062        case -861347276: /*characteristicCombination*/ return new String[] {"code"};
3063        case 366313883: /*characteristic*/ return new String[] {};
3064        case 2072805: /*handling*/ return new String[] {"code"};
3065        case 50511102: /*category*/ return new String[] {};
3066        default: return super.getTypesForProperty(hash, name);
3067        }
3068
3069      }
3070
3071      @Override
3072      public Base addChild(String name) throws FHIRException {
3073        if (name.equals("url")) {
3074          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.url");
3075        }
3076        else if (name.equals("identifier")) {
3077          return addIdentifier();
3078        }
3079        else if (name.equals("version")) {
3080          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.version");
3081        }
3082        else if (name.equals("name")) {
3083          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.name");
3084        }
3085        else if (name.equals("title")) {
3086          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.title");
3087        }
3088        else if (name.equals("shortTitle")) {
3089          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.shortTitle");
3090        }
3091        else if (name.equals("subtitle")) {
3092          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.subtitle");
3093        }
3094        else if (name.equals("status")) {
3095          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.status");
3096        }
3097        else if (name.equals("date")) {
3098          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.date");
3099        }
3100        else if (name.equals("description")) {
3101          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.description");
3102        }
3103        else if (name.equals("note")) {
3104          return addNote();
3105        }
3106        else if (name.equals("useContext")) {
3107          return addUseContext();
3108        }
3109        else if (name.equals("publisher")) {
3110          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.publisher");
3111        }
3112        else if (name.equals("contact")) {
3113          return addContact();
3114        }
3115        else if (name.equals("author")) {
3116          return addAuthor();
3117        }
3118        else if (name.equals("editor")) {
3119          return addEditor();
3120        }
3121        else if (name.equals("reviewer")) {
3122          return addReviewer();
3123        }
3124        else if (name.equals("endorser")) {
3125          return addEndorser();
3126        }
3127        else if (name.equals("relatedArtifact")) {
3128          return addRelatedArtifact();
3129        }
3130        else if (name.equals("actual")) {
3131          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.actual");
3132        }
3133        else if (name.equals("characteristicCombination")) {
3134          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.characteristicCombination");
3135        }
3136        else if (name.equals("characteristic")) {
3137          return addCharacteristic();
3138        }
3139        else if (name.equals("handling")) {
3140          throw new FHIRException("Cannot call addChild on a primitive type EvidenceVariable.handling");
3141        }
3142        else if (name.equals("category")) {
3143          return addCategory();
3144        }
3145        else
3146          return super.addChild(name);
3147      }
3148
3149  public String fhirType() {
3150    return "EvidenceVariable";
3151
3152  }
3153
3154      public EvidenceVariable copy() {
3155        EvidenceVariable dst = new EvidenceVariable();
3156        copyValues(dst);
3157        return dst;
3158      }
3159
3160      public void copyValues(EvidenceVariable dst) {
3161        super.copyValues(dst);
3162        dst.url = url == null ? null : url.copy();
3163        if (identifier != null) {
3164          dst.identifier = new ArrayList<Identifier>();
3165          for (Identifier i : identifier)
3166            dst.identifier.add(i.copy());
3167        };
3168        dst.version = version == null ? null : version.copy();
3169        dst.name = name == null ? null : name.copy();
3170        dst.title = title == null ? null : title.copy();
3171        dst.shortTitle = shortTitle == null ? null : shortTitle.copy();
3172        dst.subtitle = subtitle == null ? null : subtitle.copy();
3173        dst.status = status == null ? null : status.copy();
3174        dst.date = date == null ? null : date.copy();
3175        dst.description = description == null ? null : description.copy();
3176        if (note != null) {
3177          dst.note = new ArrayList<Annotation>();
3178          for (Annotation i : note)
3179            dst.note.add(i.copy());
3180        };
3181        if (useContext != null) {
3182          dst.useContext = new ArrayList<UsageContext>();
3183          for (UsageContext i : useContext)
3184            dst.useContext.add(i.copy());
3185        };
3186        dst.publisher = publisher == null ? null : publisher.copy();
3187        if (contact != null) {
3188          dst.contact = new ArrayList<ContactDetail>();
3189          for (ContactDetail i : contact)
3190            dst.contact.add(i.copy());
3191        };
3192        if (author != null) {
3193          dst.author = new ArrayList<ContactDetail>();
3194          for (ContactDetail i : author)
3195            dst.author.add(i.copy());
3196        };
3197        if (editor != null) {
3198          dst.editor = new ArrayList<ContactDetail>();
3199          for (ContactDetail i : editor)
3200            dst.editor.add(i.copy());
3201        };
3202        if (reviewer != null) {
3203          dst.reviewer = new ArrayList<ContactDetail>();
3204          for (ContactDetail i : reviewer)
3205            dst.reviewer.add(i.copy());
3206        };
3207        if (endorser != null) {
3208          dst.endorser = new ArrayList<ContactDetail>();
3209          for (ContactDetail i : endorser)
3210            dst.endorser.add(i.copy());
3211        };
3212        if (relatedArtifact != null) {
3213          dst.relatedArtifact = new ArrayList<RelatedArtifact>();
3214          for (RelatedArtifact i : relatedArtifact)
3215            dst.relatedArtifact.add(i.copy());
3216        };
3217        dst.actual = actual == null ? null : actual.copy();
3218        dst.characteristicCombination = characteristicCombination == null ? null : characteristicCombination.copy();
3219        if (characteristic != null) {
3220          dst.characteristic = new ArrayList<EvidenceVariableCharacteristicComponent>();
3221          for (EvidenceVariableCharacteristicComponent i : characteristic)
3222            dst.characteristic.add(i.copy());
3223        };
3224        dst.handling = handling == null ? null : handling.copy();
3225        if (category != null) {
3226          dst.category = new ArrayList<EvidenceVariableCategoryComponent>();
3227          for (EvidenceVariableCategoryComponent i : category)
3228            dst.category.add(i.copy());
3229        };
3230      }
3231
3232      protected EvidenceVariable typedCopy() {
3233        return copy();
3234      }
3235
3236      @Override
3237      public boolean equalsDeep(Base other_) {
3238        if (!super.equalsDeep(other_))
3239          return false;
3240        if (!(other_ instanceof EvidenceVariable))
3241          return false;
3242        EvidenceVariable o = (EvidenceVariable) other_;
3243        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
3244           && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(shortTitle, o.shortTitle, true)
3245           && compareDeep(subtitle, o.subtitle, true) && compareDeep(status, o.status, true) && compareDeep(date, o.date, true)
3246           && compareDeep(description, o.description, true) && compareDeep(note, o.note, true) && compareDeep(useContext, o.useContext, true)
3247           && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(author, o.author, true)
3248           && compareDeep(editor, o.editor, true) && compareDeep(reviewer, o.reviewer, true) && compareDeep(endorser, o.endorser, true)
3249           && compareDeep(relatedArtifact, o.relatedArtifact, true) && compareDeep(actual, o.actual, true)
3250           && compareDeep(characteristicCombination, o.characteristicCombination, true) && compareDeep(characteristic, o.characteristic, true)
3251           && compareDeep(handling, o.handling, true) && compareDeep(category, o.category, true);
3252      }
3253
3254      @Override
3255      public boolean equalsShallow(Base other_) {
3256        if (!super.equalsShallow(other_))
3257          return false;
3258        if (!(other_ instanceof EvidenceVariable))
3259          return false;
3260        EvidenceVariable o = (EvidenceVariable) other_;
3261        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
3262           && compareValues(title, o.title, true) && compareValues(shortTitle, o.shortTitle, true) && compareValues(subtitle, o.subtitle, true)
3263           && compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true)
3264           && compareValues(publisher, o.publisher, true) && compareValues(actual, o.actual, true) && compareValues(characteristicCombination, o.characteristicCombination, true)
3265           && compareValues(handling, o.handling, true);
3266      }
3267
3268      public boolean isEmpty() {
3269        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
3270          , name, title, shortTitle, subtitle, status, date, description, note, useContext
3271          , publisher, contact, author, editor, reviewer, endorser, relatedArtifact, actual
3272          , characteristicCombination, characteristic, handling, category);
3273      }
3274
3275  @Override
3276  public ResourceType getResourceType() {
3277    return ResourceType.EvidenceVariable;
3278   }
3279
3280 /**
3281   * Search parameter: <b>context-quantity</b>
3282   * <p>
3283   * Description: <b>A quantity- or range-valued use context assigned to the evidence variable</b><br>
3284   * Type: <b>quantity</b><br>
3285   * Path: <b>(EvidenceVariable.useContext.value as Quantity) | (EvidenceVariable.useContext.value as Range)</b><br>
3286   * </p>
3287   */
3288  @SearchParamDefinition(name="context-quantity", path="(EvidenceVariable.useContext.value as Quantity) | (EvidenceVariable.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the evidence variable", type="quantity" )
3289  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
3290 /**
3291   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
3292   * <p>
3293   * Description: <b>A quantity- or range-valued use context assigned to the evidence variable</b><br>
3294   * Type: <b>quantity</b><br>
3295   * Path: <b>(EvidenceVariable.useContext.value as Quantity) | (EvidenceVariable.useContext.value as Range)</b><br>
3296   * </p>
3297   */
3298  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
3299
3300 /**
3301   * Search parameter: <b>context-type-quantity</b>
3302   * <p>
3303   * Description: <b>A use context type and quantity- or range-based value assigned to the evidence variable</b><br>
3304   * Type: <b>composite</b><br>
3305   * Path: <b>EvidenceVariable.useContext</b><br>
3306   * </p>
3307   */
3308  @SearchParamDefinition(name="context-type-quantity", path="EvidenceVariable.useContext", description="A use context type and quantity- or range-based value assigned to the evidence variable", type="composite", compositeOf={"context-type", "context-quantity"} )
3309  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
3310 /**
3311   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
3312   * <p>
3313   * Description: <b>A use context type and quantity- or range-based value assigned to the evidence variable</b><br>
3314   * Type: <b>composite</b><br>
3315   * Path: <b>EvidenceVariable.useContext</b><br>
3316   * </p>
3317   */
3318  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
3319
3320 /**
3321   * Search parameter: <b>context-type-value</b>
3322   * <p>
3323   * Description: <b>A use context type and value assigned to the evidence variable</b><br>
3324   * Type: <b>composite</b><br>
3325   * Path: <b>EvidenceVariable.useContext</b><br>
3326   * </p>
3327   */
3328  @SearchParamDefinition(name="context-type-value", path="EvidenceVariable.useContext", description="A use context type and value assigned to the evidence variable", type="composite", compositeOf={"context-type", "context"} )
3329  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
3330 /**
3331   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
3332   * <p>
3333   * Description: <b>A use context type and value assigned to the evidence variable</b><br>
3334   * Type: <b>composite</b><br>
3335   * Path: <b>EvidenceVariable.useContext</b><br>
3336   * </p>
3337   */
3338  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
3339
3340 /**
3341   * Search parameter: <b>context-type</b>
3342   * <p>
3343   * Description: <b>A type of use context assigned to the evidence variable</b><br>
3344   * Type: <b>token</b><br>
3345   * Path: <b>EvidenceVariable.useContext.code</b><br>
3346   * </p>
3347   */
3348  @SearchParamDefinition(name="context-type", path="EvidenceVariable.useContext.code", description="A type of use context assigned to the evidence variable", type="token" )
3349  public static final String SP_CONTEXT_TYPE = "context-type";
3350 /**
3351   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
3352   * <p>
3353   * Description: <b>A type of use context assigned to the evidence variable</b><br>
3354   * Type: <b>token</b><br>
3355   * Path: <b>EvidenceVariable.useContext.code</b><br>
3356   * </p>
3357   */
3358  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
3359
3360 /**
3361   * Search parameter: <b>context</b>
3362   * <p>
3363   * Description: <b>A use context assigned to the evidence variable</b><br>
3364   * Type: <b>token</b><br>
3365   * Path: <b>(EvidenceVariable.useContext.value as CodeableConcept)</b><br>
3366   * </p>
3367   */
3368  @SearchParamDefinition(name="context", path="(EvidenceVariable.useContext.value as CodeableConcept)", description="A use context assigned to the evidence variable", type="token" )
3369  public static final String SP_CONTEXT = "context";
3370 /**
3371   * <b>Fluent Client</b> search parameter constant for <b>context</b>
3372   * <p>
3373   * Description: <b>A use context assigned to the evidence variable</b><br>
3374   * Type: <b>token</b><br>
3375   * Path: <b>(EvidenceVariable.useContext.value as CodeableConcept)</b><br>
3376   * </p>
3377   */
3378  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
3379
3380 /**
3381   * Search parameter: <b>date</b>
3382   * <p>
3383   * Description: <b>The evidence variable publication date</b><br>
3384   * Type: <b>date</b><br>
3385   * Path: <b>EvidenceVariable.date</b><br>
3386   * </p>
3387   */
3388  @SearchParamDefinition(name="date", path="EvidenceVariable.date", description="The evidence variable publication date", type="date" )
3389  public static final String SP_DATE = "date";
3390 /**
3391   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3392   * <p>
3393   * Description: <b>The evidence variable publication date</b><br>
3394   * Type: <b>date</b><br>
3395   * Path: <b>EvidenceVariable.date</b><br>
3396   * </p>
3397   */
3398  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3399
3400 /**
3401   * Search parameter: <b>description</b>
3402   * <p>
3403   * Description: <b>The description of the evidence variable</b><br>
3404   * Type: <b>string</b><br>
3405   * Path: <b>EvidenceVariable.description</b><br>
3406   * </p>
3407   */
3408  @SearchParamDefinition(name="description", path="EvidenceVariable.description", description="The description of the evidence variable", type="string" )
3409  public static final String SP_DESCRIPTION = "description";
3410 /**
3411   * <b>Fluent Client</b> search parameter constant for <b>description</b>
3412   * <p>
3413   * Description: <b>The description of the evidence variable</b><br>
3414   * Type: <b>string</b><br>
3415   * Path: <b>EvidenceVariable.description</b><br>
3416   * </p>
3417   */
3418  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
3419
3420 /**
3421   * Search parameter: <b>identifier</b>
3422   * <p>
3423   * Description: <b>External identifier for the evidence variable</b><br>
3424   * Type: <b>token</b><br>
3425   * Path: <b>EvidenceVariable.identifier</b><br>
3426   * </p>
3427   */
3428  @SearchParamDefinition(name="identifier", path="EvidenceVariable.identifier", description="External identifier for the evidence variable", type="token" )
3429  public static final String SP_IDENTIFIER = "identifier";
3430 /**
3431   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3432   * <p>
3433   * Description: <b>External identifier for the evidence variable</b><br>
3434   * Type: <b>token</b><br>
3435   * Path: <b>EvidenceVariable.identifier</b><br>
3436   * </p>
3437   */
3438  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3439
3440 /**
3441   * Search parameter: <b>name</b>
3442   * <p>
3443   * Description: <b>Computationally friendly name of the evidence variable</b><br>
3444   * Type: <b>string</b><br>
3445   * Path: <b>EvidenceVariable.name</b><br>
3446   * </p>
3447   */
3448  @SearchParamDefinition(name="name", path="EvidenceVariable.name", description="Computationally friendly name of the evidence variable", type="string" )
3449  public static final String SP_NAME = "name";
3450 /**
3451   * <b>Fluent Client</b> search parameter constant for <b>name</b>
3452   * <p>
3453   * Description: <b>Computationally friendly name of the evidence variable</b><br>
3454   * Type: <b>string</b><br>
3455   * Path: <b>EvidenceVariable.name</b><br>
3456   * </p>
3457   */
3458  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
3459
3460 /**
3461   * Search parameter: <b>publisher</b>
3462   * <p>
3463   * Description: <b>Name of the publisher of the evidence variable</b><br>
3464   * Type: <b>string</b><br>
3465   * Path: <b>EvidenceVariable.publisher</b><br>
3466   * </p>
3467   */
3468  @SearchParamDefinition(name="publisher", path="EvidenceVariable.publisher", description="Name of the publisher of the evidence variable", type="string" )
3469  public static final String SP_PUBLISHER = "publisher";
3470 /**
3471   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
3472   * <p>
3473   * Description: <b>Name of the publisher of the evidence variable</b><br>
3474   * Type: <b>string</b><br>
3475   * Path: <b>EvidenceVariable.publisher</b><br>
3476   * </p>
3477   */
3478  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
3479
3480 /**
3481   * Search parameter: <b>status</b>
3482   * <p>
3483   * Description: <b>The current status of the evidence variable</b><br>
3484   * Type: <b>token</b><br>
3485   * Path: <b>EvidenceVariable.status</b><br>
3486   * </p>
3487   */
3488  @SearchParamDefinition(name="status", path="EvidenceVariable.status", description="The current status of the evidence variable", type="token" )
3489  public static final String SP_STATUS = "status";
3490 /**
3491   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3492   * <p>
3493   * Description: <b>The current status of the evidence variable</b><br>
3494   * Type: <b>token</b><br>
3495   * Path: <b>EvidenceVariable.status</b><br>
3496   * </p>
3497   */
3498  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3499
3500 /**
3501   * Search parameter: <b>title</b>
3502   * <p>
3503   * Description: <b>The human-friendly name of the evidence variable</b><br>
3504   * Type: <b>string</b><br>
3505   * Path: <b>EvidenceVariable.title</b><br>
3506   * </p>
3507   */
3508  @SearchParamDefinition(name="title", path="EvidenceVariable.title", description="The human-friendly name of the evidence variable", type="string" )
3509  public static final String SP_TITLE = "title";
3510 /**
3511   * <b>Fluent Client</b> search parameter constant for <b>title</b>
3512   * <p>
3513   * Description: <b>The human-friendly name of the evidence variable</b><br>
3514   * Type: <b>string</b><br>
3515   * Path: <b>EvidenceVariable.title</b><br>
3516   * </p>
3517   */
3518  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
3519
3520 /**
3521   * Search parameter: <b>url</b>
3522   * <p>
3523   * Description: <b>The uri that identifies the evidence variable</b><br>
3524   * Type: <b>uri</b><br>
3525   * Path: <b>EvidenceVariable.url</b><br>
3526   * </p>
3527   */
3528  @SearchParamDefinition(name="url", path="EvidenceVariable.url", description="The uri that identifies the evidence variable", type="uri" )
3529  public static final String SP_URL = "url";
3530 /**
3531   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3532   * <p>
3533   * Description: <b>The uri that identifies the evidence variable</b><br>
3534   * Type: <b>uri</b><br>
3535   * Path: <b>EvidenceVariable.url</b><br>
3536   * </p>
3537   */
3538  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3539
3540 /**
3541   * Search parameter: <b>version</b>
3542   * <p>
3543   * Description: <b>The business version of the evidence variable</b><br>
3544   * Type: <b>token</b><br>
3545   * Path: <b>EvidenceVariable.version</b><br>
3546   * </p>
3547   */
3548  @SearchParamDefinition(name="version", path="EvidenceVariable.version", description="The business version of the evidence variable", type="token" )
3549  public static final String SP_VERSION = "version";
3550 /**
3551   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3552   * <p>
3553   * Description: <b>The business version of the evidence variable</b><br>
3554   * Type: <b>token</b><br>
3555   * Path: <b>EvidenceVariable.version</b><br>
3556   * </p>
3557   */
3558  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
3559
3560
3561}
3562