001package org.hl7.fhir.r4.model;
002
003
004
005/*
006  Copyright (c) 2011+, HL7, Inc.
007  All rights reserved.
008  
009  Redistribution and use in source and binary forms, with or without modification, 
010  are permitted provided that the following conditions are met:
011  
012   * Redistributions of source code must retain the above copyright notice, this 
013     list of conditions and the following disclaimer.
014   * Redistributions in binary form must reproduce the above copyright notice, 
015     this list of conditions and the following disclaimer in the documentation 
016     and/or other materials provided with the distribution.
017   * Neither the name of HL7 nor the names of its contributors may be used to 
018     endorse or promote products derived from this software without specific 
019     prior written permission.
020  
021  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
022  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
023  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
024  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
025  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
026  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
027  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
028  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
029  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
030  POSSIBILITY OF SUCH DAMAGE.
031  
032*/
033
034
035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1
036
037import java.util.*;
038
039import org.hl7.fhir.utilities.Utilities;
040import org.hl7.fhir.r4.model.Enumerations.*;
041import ca.uhn.fhir.model.api.annotation.ResourceDef;
042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
043import ca.uhn.fhir.model.api.annotation.Child;
044import ca.uhn.fhir.model.api.annotation.ChildOrder;
045import ca.uhn.fhir.model.api.annotation.Description;
046import ca.uhn.fhir.model.api.annotation.Block;
047import org.hl7.fhir.instance.model.api.*;
048import org.hl7.fhir.exceptions.FHIRException;
049/**
050 * The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.
051 */
052@ResourceDef(name="ResearchElementDefinition", profile="http://hl7.org/fhir/StructureDefinition/ResearchElementDefinition")
053@ChildOrder(names={"url", "identifier", "version", "name", "title", "shortTitle", "subtitle", "status", "experimental", "subject[x]", "date", "publisher", "contact", "description", "comment", "useContext", "jurisdiction", "purpose", "usage", "copyright", "approvalDate", "lastReviewDate", "effectivePeriod", "topic", "author", "editor", "reviewer", "endorser", "relatedArtifact", "library", "type", "variableType", "characteristic"})
054public class ResearchElementDefinition extends MetadataResource {
055
056    public enum ResearchElementType {
057        /**
058         * The element defines the population that forms the basis for research.
059         */
060        POPULATION, 
061        /**
062         * The element defines an exposure within the population that is being researched.
063         */
064        EXPOSURE, 
065        /**
066         * The element defines an outcome within the population that is being researched.
067         */
068        OUTCOME, 
069        /**
070         * added to help the parsers with the generic types
071         */
072        NULL;
073        public static ResearchElementType fromCode(String codeString) throws FHIRException {
074            if (codeString == null || "".equals(codeString))
075                return null;
076        if ("population".equals(codeString))
077          return POPULATION;
078        if ("exposure".equals(codeString))
079          return EXPOSURE;
080        if ("outcome".equals(codeString))
081          return OUTCOME;
082        if (Configuration.isAcceptInvalidEnums())
083          return null;
084        else
085          throw new FHIRException("Unknown ResearchElementType code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case POPULATION: return "population";
090            case EXPOSURE: return "exposure";
091            case OUTCOME: return "outcome";
092            default: return "?";
093          }
094        }
095        public String getSystem() {
096          switch (this) {
097            case POPULATION: return "http://hl7.org/fhir/research-element-type";
098            case EXPOSURE: return "http://hl7.org/fhir/research-element-type";
099            case OUTCOME: return "http://hl7.org/fhir/research-element-type";
100            default: return "?";
101          }
102        }
103        public String getDefinition() {
104          switch (this) {
105            case POPULATION: return "The element defines the population that forms the basis for research.";
106            case EXPOSURE: return "The element defines an exposure within the population that is being researched.";
107            case OUTCOME: return "The element defines an outcome within the population that is being researched.";
108            default: return "?";
109          }
110        }
111        public String getDisplay() {
112          switch (this) {
113            case POPULATION: return "Population";
114            case EXPOSURE: return "Exposure";
115            case OUTCOME: return "Outcome";
116            default: return "?";
117          }
118        }
119    }
120
121  public static class ResearchElementTypeEnumFactory implements EnumFactory<ResearchElementType> {
122    public ResearchElementType fromCode(String codeString) throws IllegalArgumentException {
123      if (codeString == null || "".equals(codeString))
124            if (codeString == null || "".equals(codeString))
125                return null;
126        if ("population".equals(codeString))
127          return ResearchElementType.POPULATION;
128        if ("exposure".equals(codeString))
129          return ResearchElementType.EXPOSURE;
130        if ("outcome".equals(codeString))
131          return ResearchElementType.OUTCOME;
132        throw new IllegalArgumentException("Unknown ResearchElementType code '"+codeString+"'");
133        }
134        public Enumeration<ResearchElementType> fromType(Base code) throws FHIRException {
135          if (code == null)
136            return null;
137          if (code.isEmpty())
138            return new Enumeration<ResearchElementType>(this);
139          String codeString = ((PrimitiveType) code).asStringValue();
140          if (codeString == null || "".equals(codeString))
141            return null;
142        if ("population".equals(codeString))
143          return new Enumeration<ResearchElementType>(this, ResearchElementType.POPULATION);
144        if ("exposure".equals(codeString))
145          return new Enumeration<ResearchElementType>(this, ResearchElementType.EXPOSURE);
146        if ("outcome".equals(codeString))
147          return new Enumeration<ResearchElementType>(this, ResearchElementType.OUTCOME);
148        throw new FHIRException("Unknown ResearchElementType code '"+codeString+"'");
149        }
150    public String toCode(ResearchElementType code) {
151      if (code == ResearchElementType.POPULATION)
152        return "population";
153      if (code == ResearchElementType.EXPOSURE)
154        return "exposure";
155      if (code == ResearchElementType.OUTCOME)
156        return "outcome";
157      return "?";
158      }
159    public String toSystem(ResearchElementType code) {
160      return code.getSystem();
161      }
162    }
163
164    public enum VariableType {
165        /**
166         * The variable is dichotomous, such as present or absent.
167         */
168        DICHOTOMOUS, 
169        /**
170         * The variable is a continuous result such as a quantity.
171         */
172        CONTINUOUS, 
173        /**
174         * The variable is described narratively rather than quantitatively.
175         */
176        DESCRIPTIVE, 
177        /**
178         * added to help the parsers with the generic types
179         */
180        NULL;
181        public static VariableType fromCode(String codeString) throws FHIRException {
182            if (codeString == null || "".equals(codeString))
183                return null;
184        if ("dichotomous".equals(codeString))
185          return DICHOTOMOUS;
186        if ("continuous".equals(codeString))
187          return CONTINUOUS;
188        if ("descriptive".equals(codeString))
189          return DESCRIPTIVE;
190        if (Configuration.isAcceptInvalidEnums())
191          return null;
192        else
193          throw new FHIRException("Unknown VariableType code '"+codeString+"'");
194        }
195        public String toCode() {
196          switch (this) {
197            case DICHOTOMOUS: return "dichotomous";
198            case CONTINUOUS: return "continuous";
199            case DESCRIPTIVE: return "descriptive";
200            default: return "?";
201          }
202        }
203        public String getSystem() {
204          switch (this) {
205            case DICHOTOMOUS: return "http://hl7.org/fhir/variable-type";
206            case CONTINUOUS: return "http://hl7.org/fhir/variable-type";
207            case DESCRIPTIVE: return "http://hl7.org/fhir/variable-type";
208            default: return "?";
209          }
210        }
211        public String getDefinition() {
212          switch (this) {
213            case DICHOTOMOUS: return "The variable is dichotomous, such as present or absent.";
214            case CONTINUOUS: return "The variable is a continuous result such as a quantity.";
215            case DESCRIPTIVE: return "The variable is described narratively rather than quantitatively.";
216            default: return "?";
217          }
218        }
219        public String getDisplay() {
220          switch (this) {
221            case DICHOTOMOUS: return "Dichotomous";
222            case CONTINUOUS: return "Continuous";
223            case DESCRIPTIVE: return "Descriptive";
224            default: return "?";
225          }
226        }
227    }
228
229  public static class VariableTypeEnumFactory implements EnumFactory<VariableType> {
230    public VariableType fromCode(String codeString) throws IllegalArgumentException {
231      if (codeString == null || "".equals(codeString))
232            if (codeString == null || "".equals(codeString))
233                return null;
234        if ("dichotomous".equals(codeString))
235          return VariableType.DICHOTOMOUS;
236        if ("continuous".equals(codeString))
237          return VariableType.CONTINUOUS;
238        if ("descriptive".equals(codeString))
239          return VariableType.DESCRIPTIVE;
240        throw new IllegalArgumentException("Unknown VariableType code '"+codeString+"'");
241        }
242        public Enumeration<VariableType> fromType(Base code) throws FHIRException {
243          if (code == null)
244            return null;
245          if (code.isEmpty())
246            return new Enumeration<VariableType>(this);
247          String codeString = ((PrimitiveType) code).asStringValue();
248          if (codeString == null || "".equals(codeString))
249            return null;
250        if ("dichotomous".equals(codeString))
251          return new Enumeration<VariableType>(this, VariableType.DICHOTOMOUS);
252        if ("continuous".equals(codeString))
253          return new Enumeration<VariableType>(this, VariableType.CONTINUOUS);
254        if ("descriptive".equals(codeString))
255          return new Enumeration<VariableType>(this, VariableType.DESCRIPTIVE);
256        throw new FHIRException("Unknown VariableType code '"+codeString+"'");
257        }
258    public String toCode(VariableType code) {
259      if (code == VariableType.DICHOTOMOUS)
260        return "dichotomous";
261      if (code == VariableType.CONTINUOUS)
262        return "continuous";
263      if (code == VariableType.DESCRIPTIVE)
264        return "descriptive";
265      return "?";
266      }
267    public String toSystem(VariableType code) {
268      return code.getSystem();
269      }
270    }
271
272    public enum GroupMeasure {
273        /**
274         * Aggregated using Mean of participant values.
275         */
276        MEAN, 
277        /**
278         * Aggregated using Median of participant values.
279         */
280        MEDIAN, 
281        /**
282         * Aggregated using Mean of study mean values.
283         */
284        MEANOFMEAN, 
285        /**
286         * Aggregated using Mean of study median values.
287         */
288        MEANOFMEDIAN, 
289        /**
290         * Aggregated using Median of study mean values.
291         */
292        MEDIANOFMEAN, 
293        /**
294         * Aggregated using Median of study median values.
295         */
296        MEDIANOFMEDIAN, 
297        /**
298         * added to help the parsers with the generic types
299         */
300        NULL;
301        public static GroupMeasure fromCode(String codeString) throws FHIRException {
302            if (codeString == null || "".equals(codeString))
303                return null;
304        if ("mean".equals(codeString))
305          return MEAN;
306        if ("median".equals(codeString))
307          return MEDIAN;
308        if ("mean-of-mean".equals(codeString))
309          return MEANOFMEAN;
310        if ("mean-of-median".equals(codeString))
311          return MEANOFMEDIAN;
312        if ("median-of-mean".equals(codeString))
313          return MEDIANOFMEAN;
314        if ("median-of-median".equals(codeString))
315          return MEDIANOFMEDIAN;
316        if (Configuration.isAcceptInvalidEnums())
317          return null;
318        else
319          throw new FHIRException("Unknown GroupMeasure code '"+codeString+"'");
320        }
321        public String toCode() {
322          switch (this) {
323            case MEAN: return "mean";
324            case MEDIAN: return "median";
325            case MEANOFMEAN: return "mean-of-mean";
326            case MEANOFMEDIAN: return "mean-of-median";
327            case MEDIANOFMEAN: return "median-of-mean";
328            case MEDIANOFMEDIAN: return "median-of-median";
329            default: return "?";
330          }
331        }
332        public String getSystem() {
333          switch (this) {
334            case MEAN: return "http://hl7.org/fhir/group-measure";
335            case MEDIAN: return "http://hl7.org/fhir/group-measure";
336            case MEANOFMEAN: return "http://hl7.org/fhir/group-measure";
337            case MEANOFMEDIAN: return "http://hl7.org/fhir/group-measure";
338            case MEDIANOFMEAN: return "http://hl7.org/fhir/group-measure";
339            case MEDIANOFMEDIAN: return "http://hl7.org/fhir/group-measure";
340            default: return "?";
341          }
342        }
343        public String getDefinition() {
344          switch (this) {
345            case MEAN: return "Aggregated using Mean of participant values.";
346            case MEDIAN: return "Aggregated using Median of participant values.";
347            case MEANOFMEAN: return "Aggregated using Mean of study mean values.";
348            case MEANOFMEDIAN: return "Aggregated using Mean of study median values.";
349            case MEDIANOFMEAN: return "Aggregated using Median of study mean values.";
350            case MEDIANOFMEDIAN: return "Aggregated using Median of study median values.";
351            default: return "?";
352          }
353        }
354        public String getDisplay() {
355          switch (this) {
356            case MEAN: return "Mean";
357            case MEDIAN: return "Median";
358            case MEANOFMEAN: return "Mean of Study Means";
359            case MEANOFMEDIAN: return "Mean of Study Medins";
360            case MEDIANOFMEAN: return "Median of Study Means";
361            case MEDIANOFMEDIAN: return "Median of Study Medians";
362            default: return "?";
363          }
364        }
365    }
366
367  public static class GroupMeasureEnumFactory implements EnumFactory<GroupMeasure> {
368    public GroupMeasure fromCode(String codeString) throws IllegalArgumentException {
369      if (codeString == null || "".equals(codeString))
370            if (codeString == null || "".equals(codeString))
371                return null;
372        if ("mean".equals(codeString))
373          return GroupMeasure.MEAN;
374        if ("median".equals(codeString))
375          return GroupMeasure.MEDIAN;
376        if ("mean-of-mean".equals(codeString))
377          return GroupMeasure.MEANOFMEAN;
378        if ("mean-of-median".equals(codeString))
379          return GroupMeasure.MEANOFMEDIAN;
380        if ("median-of-mean".equals(codeString))
381          return GroupMeasure.MEDIANOFMEAN;
382        if ("median-of-median".equals(codeString))
383          return GroupMeasure.MEDIANOFMEDIAN;
384        throw new IllegalArgumentException("Unknown GroupMeasure code '"+codeString+"'");
385        }
386        public Enumeration<GroupMeasure> fromType(Base code) throws FHIRException {
387          if (code == null)
388            return null;
389          if (code.isEmpty())
390            return new Enumeration<GroupMeasure>(this);
391          String codeString = ((PrimitiveType) code).asStringValue();
392          if (codeString == null || "".equals(codeString))
393            return null;
394        if ("mean".equals(codeString))
395          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEAN);
396        if ("median".equals(codeString))
397          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEDIAN);
398        if ("mean-of-mean".equals(codeString))
399          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEANOFMEAN);
400        if ("mean-of-median".equals(codeString))
401          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEANOFMEDIAN);
402        if ("median-of-mean".equals(codeString))
403          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEDIANOFMEAN);
404        if ("median-of-median".equals(codeString))
405          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEDIANOFMEDIAN);
406        throw new FHIRException("Unknown GroupMeasure code '"+codeString+"'");
407        }
408    public String toCode(GroupMeasure code) {
409      if (code == GroupMeasure.MEAN)
410        return "mean";
411      if (code == GroupMeasure.MEDIAN)
412        return "median";
413      if (code == GroupMeasure.MEANOFMEAN)
414        return "mean-of-mean";
415      if (code == GroupMeasure.MEANOFMEDIAN)
416        return "mean-of-median";
417      if (code == GroupMeasure.MEDIANOFMEAN)
418        return "median-of-mean";
419      if (code == GroupMeasure.MEDIANOFMEDIAN)
420        return "median-of-median";
421      return "?";
422      }
423    public String toSystem(GroupMeasure code) {
424      return code.getSystem();
425      }
426    }
427
428    @Block()
429    public static class ResearchElementDefinitionCharacteristicComponent extends BackboneElement implements IBaseBackboneElement {
430        /**
431         * Define members of the research 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).
432         */
433        @Child(name = "definition", type = {CodeableConcept.class, CanonicalType.class, Expression.class, DataRequirement.class}, order=1, min=1, max=1, modifier=false, summary=true)
434        @Description(shortDefinition="What code or expression defines members?", formalDefinition="Define members of the research 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)." )
435        protected Type definition;
436
437        /**
438         * Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.
439         */
440        @Child(name = "usageContext", type = {UsageContext.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
441        @Description(shortDefinition="What code/value pairs define members?", formalDefinition="Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings." )
442        protected List<UsageContext> usageContext;
443
444        /**
445         * When true, members with this characteristic are excluded from the element.
446         */
447        @Child(name = "exclude", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
448        @Description(shortDefinition="Whether the characteristic includes or excludes members", formalDefinition="When true, members with this characteristic are excluded from the element." )
449        protected BooleanType exclude;
450
451        /**
452         * Specifies the UCUM unit for the outcome.
453         */
454        @Child(name = "unitOfMeasure", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
455        @Description(shortDefinition="What unit is the outcome described in?", formalDefinition="Specifies the UCUM unit for the outcome." )
456        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ucum-units")
457        protected CodeableConcept unitOfMeasure;
458
459        /**
460         * A narrative description of the time period the study covers.
461         */
462        @Child(name = "studyEffectiveDescription", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
463        @Description(shortDefinition="What time period does the study cover", formalDefinition="A narrative description of the time period the study covers." )
464        protected StringType studyEffectiveDescription;
465
466        /**
467         * Indicates what effective period the study covers.
468         */
469        @Child(name = "studyEffective", type = {DateTimeType.class, Period.class, Duration.class, Timing.class}, order=6, min=0, max=1, modifier=false, summary=false)
470        @Description(shortDefinition="What time period does the study cover", formalDefinition="Indicates what effective period the study covers." )
471        protected Type studyEffective;
472
473        /**
474         * Indicates duration from the study initiation.
475         */
476        @Child(name = "studyEffectiveTimeFromStart", type = {Duration.class}, order=7, min=0, max=1, modifier=false, summary=false)
477        @Description(shortDefinition="Observation time from study start", formalDefinition="Indicates duration from the study initiation." )
478        protected Duration studyEffectiveTimeFromStart;
479
480        /**
481         * Indicates how elements are aggregated within the study effective period.
482         */
483        @Child(name = "studyEffectiveGroupMeasure", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=false)
484        @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." )
485        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/group-measure")
486        protected Enumeration<GroupMeasure> studyEffectiveGroupMeasure;
487
488        /**
489         * A narrative description of the time period the study covers.
490         */
491        @Child(name = "participantEffectiveDescription", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
492        @Description(shortDefinition="What time period do participants cover", formalDefinition="A narrative description of the time period the study covers." )
493        protected StringType participantEffectiveDescription;
494
495        /**
496         * Indicates what effective period the study covers.
497         */
498        @Child(name = "participantEffective", type = {DateTimeType.class, Period.class, Duration.class, Timing.class}, order=10, min=0, max=1, modifier=false, summary=false)
499        @Description(shortDefinition="What time period do participants cover", formalDefinition="Indicates what effective period the study covers." )
500        protected Type participantEffective;
501
502        /**
503         * Indicates duration from the participant's study entry.
504         */
505        @Child(name = "participantEffectiveTimeFromStart", type = {Duration.class}, order=11, min=0, max=1, modifier=false, summary=false)
506        @Description(shortDefinition="Observation time from study start", formalDefinition="Indicates duration from the participant's study entry." )
507        protected Duration participantEffectiveTimeFromStart;
508
509        /**
510         * Indicates how elements are aggregated within the study effective period.
511         */
512        @Child(name = "participantEffectiveGroupMeasure", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false)
513        @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." )
514        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/group-measure")
515        protected Enumeration<GroupMeasure> participantEffectiveGroupMeasure;
516
517        private static final long serialVersionUID = -1102952665L;
518
519    /**
520     * Constructor
521     */
522      public ResearchElementDefinitionCharacteristicComponent() {
523        super();
524      }
525
526    /**
527     * Constructor
528     */
529      public ResearchElementDefinitionCharacteristicComponent(Type definition) {
530        super();
531        this.definition = definition;
532      }
533
534        /**
535         * @return {@link #definition} (Define members of the research 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).)
536         */
537        public Type getDefinition() { 
538          return this.definition;
539        }
540
541        /**
542         * @return {@link #definition} (Define members of the research 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).)
543         */
544        public CodeableConcept getDefinitionCodeableConcept() throws FHIRException { 
545          if (this.definition == null)
546            this.definition = new CodeableConcept();
547          if (!(this.definition instanceof CodeableConcept))
548            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.definition.getClass().getName()+" was encountered");
549          return (CodeableConcept) this.definition;
550        }
551
552        public boolean hasDefinitionCodeableConcept() { 
553          return this != null && this.definition instanceof CodeableConcept;
554        }
555
556        /**
557         * @return {@link #definition} (Define members of the research 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).)
558         */
559        public CanonicalType getDefinitionCanonicalType() throws FHIRException { 
560          if (this.definition == null)
561            this.definition = new CanonicalType();
562          if (!(this.definition instanceof CanonicalType))
563            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.definition.getClass().getName()+" was encountered");
564          return (CanonicalType) this.definition;
565        }
566
567        public boolean hasDefinitionCanonicalType() { 
568          return this != null && this.definition instanceof CanonicalType;
569        }
570
571        /**
572         * @return {@link #definition} (Define members of the research 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).)
573         */
574        public Expression getDefinitionExpression() throws FHIRException { 
575          if (this.definition == null)
576            this.definition = new Expression();
577          if (!(this.definition instanceof Expression))
578            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.definition.getClass().getName()+" was encountered");
579          return (Expression) this.definition;
580        }
581
582        public boolean hasDefinitionExpression() { 
583          return this != null && this.definition instanceof Expression;
584        }
585
586        /**
587         * @return {@link #definition} (Define members of the research 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).)
588         */
589        public DataRequirement getDefinitionDataRequirement() throws FHIRException { 
590          if (this.definition == null)
591            this.definition = new DataRequirement();
592          if (!(this.definition instanceof DataRequirement))
593            throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.definition.getClass().getName()+" was encountered");
594          return (DataRequirement) this.definition;
595        }
596
597        public boolean hasDefinitionDataRequirement() { 
598          return this != null && this.definition instanceof DataRequirement;
599        }
600
601        public boolean hasDefinition() { 
602          return this.definition != null && !this.definition.isEmpty();
603        }
604
605        /**
606         * @param value {@link #definition} (Define members of the research 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).)
607         */
608        public ResearchElementDefinitionCharacteristicComponent setDefinition(Type value) { 
609          if (value != null && !(value instanceof CodeableConcept || value instanceof CanonicalType || value instanceof Expression || value instanceof DataRequirement))
610            throw new Error("Not the right type for ResearchElementDefinition.characteristic.definition[x]: "+value.fhirType());
611          this.definition = value;
612          return this;
613        }
614
615        /**
616         * @return {@link #usageContext} (Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.)
617         */
618        public List<UsageContext> getUsageContext() { 
619          if (this.usageContext == null)
620            this.usageContext = new ArrayList<UsageContext>();
621          return this.usageContext;
622        }
623
624        /**
625         * @return Returns a reference to <code>this</code> for easy method chaining
626         */
627        public ResearchElementDefinitionCharacteristicComponent setUsageContext(List<UsageContext> theUsageContext) { 
628          this.usageContext = theUsageContext;
629          return this;
630        }
631
632        public boolean hasUsageContext() { 
633          if (this.usageContext == null)
634            return false;
635          for (UsageContext item : this.usageContext)
636            if (!item.isEmpty())
637              return true;
638          return false;
639        }
640
641        public UsageContext addUsageContext() { //3
642          UsageContext t = new UsageContext();
643          if (this.usageContext == null)
644            this.usageContext = new ArrayList<UsageContext>();
645          this.usageContext.add(t);
646          return t;
647        }
648
649        public ResearchElementDefinitionCharacteristicComponent addUsageContext(UsageContext t) { //3
650          if (t == null)
651            return this;
652          if (this.usageContext == null)
653            this.usageContext = new ArrayList<UsageContext>();
654          this.usageContext.add(t);
655          return this;
656        }
657
658        /**
659         * @return The first repetition of repeating field {@link #usageContext}, creating it if it does not already exist
660         */
661        public UsageContext getUsageContextFirstRep() { 
662          if (getUsageContext().isEmpty()) {
663            addUsageContext();
664          }
665          return getUsageContext().get(0);
666        }
667
668        /**
669         * @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
670         */
671        public BooleanType getExcludeElement() { 
672          if (this.exclude == null)
673            if (Configuration.errorOnAutoCreate())
674              throw new Error("Attempt to auto-create ResearchElementDefinitionCharacteristicComponent.exclude");
675            else if (Configuration.doAutoCreate())
676              this.exclude = new BooleanType(); // bb
677          return this.exclude;
678        }
679
680        public boolean hasExcludeElement() { 
681          return this.exclude != null && !this.exclude.isEmpty();
682        }
683
684        public boolean hasExclude() { 
685          return this.exclude != null && !this.exclude.isEmpty();
686        }
687
688        /**
689         * @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
690         */
691        public ResearchElementDefinitionCharacteristicComponent setExcludeElement(BooleanType value) { 
692          this.exclude = value;
693          return this;
694        }
695
696        /**
697         * @return When true, members with this characteristic are excluded from the element.
698         */
699        public boolean getExclude() { 
700          return this.exclude == null || this.exclude.isEmpty() ? false : this.exclude.getValue();
701        }
702
703        /**
704         * @param value When true, members with this characteristic are excluded from the element.
705         */
706        public ResearchElementDefinitionCharacteristicComponent setExclude(boolean value) { 
707            if (this.exclude == null)
708              this.exclude = new BooleanType();
709            this.exclude.setValue(value);
710          return this;
711        }
712
713        /**
714         * @return {@link #unitOfMeasure} (Specifies the UCUM unit for the outcome.)
715         */
716        public CodeableConcept getUnitOfMeasure() { 
717          if (this.unitOfMeasure == null)
718            if (Configuration.errorOnAutoCreate())
719              throw new Error("Attempt to auto-create ResearchElementDefinitionCharacteristicComponent.unitOfMeasure");
720            else if (Configuration.doAutoCreate())
721              this.unitOfMeasure = new CodeableConcept(); // cc
722          return this.unitOfMeasure;
723        }
724
725        public boolean hasUnitOfMeasure() { 
726          return this.unitOfMeasure != null && !this.unitOfMeasure.isEmpty();
727        }
728
729        /**
730         * @param value {@link #unitOfMeasure} (Specifies the UCUM unit for the outcome.)
731         */
732        public ResearchElementDefinitionCharacteristicComponent setUnitOfMeasure(CodeableConcept value) { 
733          this.unitOfMeasure = value;
734          return this;
735        }
736
737        /**
738         * @return {@link #studyEffectiveDescription} (A narrative description of the time period the study covers.). This is the underlying object with id, value and extensions. The accessor "getStudyEffectiveDescription" gives direct access to the value
739         */
740        public StringType getStudyEffectiveDescriptionElement() { 
741          if (this.studyEffectiveDescription == null)
742            if (Configuration.errorOnAutoCreate())
743              throw new Error("Attempt to auto-create ResearchElementDefinitionCharacteristicComponent.studyEffectiveDescription");
744            else if (Configuration.doAutoCreate())
745              this.studyEffectiveDescription = new StringType(); // bb
746          return this.studyEffectiveDescription;
747        }
748
749        public boolean hasStudyEffectiveDescriptionElement() { 
750          return this.studyEffectiveDescription != null && !this.studyEffectiveDescription.isEmpty();
751        }
752
753        public boolean hasStudyEffectiveDescription() { 
754          return this.studyEffectiveDescription != null && !this.studyEffectiveDescription.isEmpty();
755        }
756
757        /**
758         * @param value {@link #studyEffectiveDescription} (A narrative description of the time period the study covers.). This is the underlying object with id, value and extensions. The accessor "getStudyEffectiveDescription" gives direct access to the value
759         */
760        public ResearchElementDefinitionCharacteristicComponent setStudyEffectiveDescriptionElement(StringType value) { 
761          this.studyEffectiveDescription = value;
762          return this;
763        }
764
765        /**
766         * @return A narrative description of the time period the study covers.
767         */
768        public String getStudyEffectiveDescription() { 
769          return this.studyEffectiveDescription == null ? null : this.studyEffectiveDescription.getValue();
770        }
771
772        /**
773         * @param value A narrative description of the time period the study covers.
774         */
775        public ResearchElementDefinitionCharacteristicComponent setStudyEffectiveDescription(String value) { 
776          if (Utilities.noString(value))
777            this.studyEffectiveDescription = null;
778          else {
779            if (this.studyEffectiveDescription == null)
780              this.studyEffectiveDescription = new StringType();
781            this.studyEffectiveDescription.setValue(value);
782          }
783          return this;
784        }
785
786        /**
787         * @return {@link #studyEffective} (Indicates what effective period the study covers.)
788         */
789        public Type getStudyEffective() { 
790          return this.studyEffective;
791        }
792
793        /**
794         * @return {@link #studyEffective} (Indicates what effective period the study covers.)
795         */
796        public DateTimeType getStudyEffectiveDateTimeType() throws FHIRException { 
797          if (this.studyEffective == null)
798            this.studyEffective = new DateTimeType();
799          if (!(this.studyEffective instanceof DateTimeType))
800            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.studyEffective.getClass().getName()+" was encountered");
801          return (DateTimeType) this.studyEffective;
802        }
803
804        public boolean hasStudyEffectiveDateTimeType() { 
805          return this != null && this.studyEffective instanceof DateTimeType;
806        }
807
808        /**
809         * @return {@link #studyEffective} (Indicates what effective period the study covers.)
810         */
811        public Period getStudyEffectivePeriod() throws FHIRException { 
812          if (this.studyEffective == null)
813            this.studyEffective = new Period();
814          if (!(this.studyEffective instanceof Period))
815            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.studyEffective.getClass().getName()+" was encountered");
816          return (Period) this.studyEffective;
817        }
818
819        public boolean hasStudyEffectivePeriod() { 
820          return this != null && this.studyEffective instanceof Period;
821        }
822
823        /**
824         * @return {@link #studyEffective} (Indicates what effective period the study covers.)
825         */
826        public Duration getStudyEffectiveDuration() throws FHIRException { 
827          if (this.studyEffective == null)
828            this.studyEffective = new Duration();
829          if (!(this.studyEffective instanceof Duration))
830            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.studyEffective.getClass().getName()+" was encountered");
831          return (Duration) this.studyEffective;
832        }
833
834        public boolean hasStudyEffectiveDuration() { 
835          return this != null && this.studyEffective instanceof Duration;
836        }
837
838        /**
839         * @return {@link #studyEffective} (Indicates what effective period the study covers.)
840         */
841        public Timing getStudyEffectiveTiming() throws FHIRException { 
842          if (this.studyEffective == null)
843            this.studyEffective = new Timing();
844          if (!(this.studyEffective instanceof Timing))
845            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.studyEffective.getClass().getName()+" was encountered");
846          return (Timing) this.studyEffective;
847        }
848
849        public boolean hasStudyEffectiveTiming() { 
850          return this != null && this.studyEffective instanceof Timing;
851        }
852
853        public boolean hasStudyEffective() { 
854          return this.studyEffective != null && !this.studyEffective.isEmpty();
855        }
856
857        /**
858         * @param value {@link #studyEffective} (Indicates what effective period the study covers.)
859         */
860        public ResearchElementDefinitionCharacteristicComponent setStudyEffective(Type value) { 
861          if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Duration || value instanceof Timing))
862            throw new Error("Not the right type for ResearchElementDefinition.characteristic.studyEffective[x]: "+value.fhirType());
863          this.studyEffective = value;
864          return this;
865        }
866
867        /**
868         * @return {@link #studyEffectiveTimeFromStart} (Indicates duration from the study initiation.)
869         */
870        public Duration getStudyEffectiveTimeFromStart() { 
871          if (this.studyEffectiveTimeFromStart == null)
872            if (Configuration.errorOnAutoCreate())
873              throw new Error("Attempt to auto-create ResearchElementDefinitionCharacteristicComponent.studyEffectiveTimeFromStart");
874            else if (Configuration.doAutoCreate())
875              this.studyEffectiveTimeFromStart = new Duration(); // cc
876          return this.studyEffectiveTimeFromStart;
877        }
878
879        public boolean hasStudyEffectiveTimeFromStart() { 
880          return this.studyEffectiveTimeFromStart != null && !this.studyEffectiveTimeFromStart.isEmpty();
881        }
882
883        /**
884         * @param value {@link #studyEffectiveTimeFromStart} (Indicates duration from the study initiation.)
885         */
886        public ResearchElementDefinitionCharacteristicComponent setStudyEffectiveTimeFromStart(Duration value) { 
887          this.studyEffectiveTimeFromStart = value;
888          return this;
889        }
890
891        /**
892         * @return {@link #studyEffectiveGroupMeasure} (Indicates how elements are aggregated within the study effective period.). This is the underlying object with id, value and extensions. The accessor "getStudyEffectiveGroupMeasure" gives direct access to the value
893         */
894        public Enumeration<GroupMeasure> getStudyEffectiveGroupMeasureElement() { 
895          if (this.studyEffectiveGroupMeasure == null)
896            if (Configuration.errorOnAutoCreate())
897              throw new Error("Attempt to auto-create ResearchElementDefinitionCharacteristicComponent.studyEffectiveGroupMeasure");
898            else if (Configuration.doAutoCreate())
899              this.studyEffectiveGroupMeasure = new Enumeration<GroupMeasure>(new GroupMeasureEnumFactory()); // bb
900          return this.studyEffectiveGroupMeasure;
901        }
902
903        public boolean hasStudyEffectiveGroupMeasureElement() { 
904          return this.studyEffectiveGroupMeasure != null && !this.studyEffectiveGroupMeasure.isEmpty();
905        }
906
907        public boolean hasStudyEffectiveGroupMeasure() { 
908          return this.studyEffectiveGroupMeasure != null && !this.studyEffectiveGroupMeasure.isEmpty();
909        }
910
911        /**
912         * @param value {@link #studyEffectiveGroupMeasure} (Indicates how elements are aggregated within the study effective period.). This is the underlying object with id, value and extensions. The accessor "getStudyEffectiveGroupMeasure" gives direct access to the value
913         */
914        public ResearchElementDefinitionCharacteristicComponent setStudyEffectiveGroupMeasureElement(Enumeration<GroupMeasure> value) { 
915          this.studyEffectiveGroupMeasure = value;
916          return this;
917        }
918
919        /**
920         * @return Indicates how elements are aggregated within the study effective period.
921         */
922        public GroupMeasure getStudyEffectiveGroupMeasure() { 
923          return this.studyEffectiveGroupMeasure == null ? null : this.studyEffectiveGroupMeasure.getValue();
924        }
925
926        /**
927         * @param value Indicates how elements are aggregated within the study effective period.
928         */
929        public ResearchElementDefinitionCharacteristicComponent setStudyEffectiveGroupMeasure(GroupMeasure value) { 
930          if (value == null)
931            this.studyEffectiveGroupMeasure = null;
932          else {
933            if (this.studyEffectiveGroupMeasure == null)
934              this.studyEffectiveGroupMeasure = new Enumeration<GroupMeasure>(new GroupMeasureEnumFactory());
935            this.studyEffectiveGroupMeasure.setValue(value);
936          }
937          return this;
938        }
939
940        /**
941         * @return {@link #participantEffectiveDescription} (A narrative description of the time period the study covers.). This is the underlying object with id, value and extensions. The accessor "getParticipantEffectiveDescription" gives direct access to the value
942         */
943        public StringType getParticipantEffectiveDescriptionElement() { 
944          if (this.participantEffectiveDescription == null)
945            if (Configuration.errorOnAutoCreate())
946              throw new Error("Attempt to auto-create ResearchElementDefinitionCharacteristicComponent.participantEffectiveDescription");
947            else if (Configuration.doAutoCreate())
948              this.participantEffectiveDescription = new StringType(); // bb
949          return this.participantEffectiveDescription;
950        }
951
952        public boolean hasParticipantEffectiveDescriptionElement() { 
953          return this.participantEffectiveDescription != null && !this.participantEffectiveDescription.isEmpty();
954        }
955
956        public boolean hasParticipantEffectiveDescription() { 
957          return this.participantEffectiveDescription != null && !this.participantEffectiveDescription.isEmpty();
958        }
959
960        /**
961         * @param value {@link #participantEffectiveDescription} (A narrative description of the time period the study covers.). This is the underlying object with id, value and extensions. The accessor "getParticipantEffectiveDescription" gives direct access to the value
962         */
963        public ResearchElementDefinitionCharacteristicComponent setParticipantEffectiveDescriptionElement(StringType value) { 
964          this.participantEffectiveDescription = value;
965          return this;
966        }
967
968        /**
969         * @return A narrative description of the time period the study covers.
970         */
971        public String getParticipantEffectiveDescription() { 
972          return this.participantEffectiveDescription == null ? null : this.participantEffectiveDescription.getValue();
973        }
974
975        /**
976         * @param value A narrative description of the time period the study covers.
977         */
978        public ResearchElementDefinitionCharacteristicComponent setParticipantEffectiveDescription(String value) { 
979          if (Utilities.noString(value))
980            this.participantEffectiveDescription = null;
981          else {
982            if (this.participantEffectiveDescription == null)
983              this.participantEffectiveDescription = new StringType();
984            this.participantEffectiveDescription.setValue(value);
985          }
986          return this;
987        }
988
989        /**
990         * @return {@link #participantEffective} (Indicates what effective period the study covers.)
991         */
992        public Type getParticipantEffective() { 
993          return this.participantEffective;
994        }
995
996        /**
997         * @return {@link #participantEffective} (Indicates what effective period the study covers.)
998         */
999        public DateTimeType getParticipantEffectiveDateTimeType() throws FHIRException { 
1000          if (this.participantEffective == null)
1001            this.participantEffective = new DateTimeType();
1002          if (!(this.participantEffective instanceof DateTimeType))
1003            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.participantEffective.getClass().getName()+" was encountered");
1004          return (DateTimeType) this.participantEffective;
1005        }
1006
1007        public boolean hasParticipantEffectiveDateTimeType() { 
1008          return this != null && this.participantEffective instanceof DateTimeType;
1009        }
1010
1011        /**
1012         * @return {@link #participantEffective} (Indicates what effective period the study covers.)
1013         */
1014        public Period getParticipantEffectivePeriod() throws FHIRException { 
1015          if (this.participantEffective == null)
1016            this.participantEffective = new Period();
1017          if (!(this.participantEffective instanceof Period))
1018            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.participantEffective.getClass().getName()+" was encountered");
1019          return (Period) this.participantEffective;
1020        }
1021
1022        public boolean hasParticipantEffectivePeriod() { 
1023          return this != null && this.participantEffective instanceof Period;
1024        }
1025
1026        /**
1027         * @return {@link #participantEffective} (Indicates what effective period the study covers.)
1028         */
1029        public Duration getParticipantEffectiveDuration() throws FHIRException { 
1030          if (this.participantEffective == null)
1031            this.participantEffective = new Duration();
1032          if (!(this.participantEffective instanceof Duration))
1033            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.participantEffective.getClass().getName()+" was encountered");
1034          return (Duration) this.participantEffective;
1035        }
1036
1037        public boolean hasParticipantEffectiveDuration() { 
1038          return this != null && this.participantEffective instanceof Duration;
1039        }
1040
1041        /**
1042         * @return {@link #participantEffective} (Indicates what effective period the study covers.)
1043         */
1044        public Timing getParticipantEffectiveTiming() throws FHIRException { 
1045          if (this.participantEffective == null)
1046            this.participantEffective = new Timing();
1047          if (!(this.participantEffective instanceof Timing))
1048            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.participantEffective.getClass().getName()+" was encountered");
1049          return (Timing) this.participantEffective;
1050        }
1051
1052        public boolean hasParticipantEffectiveTiming() { 
1053          return this != null && this.participantEffective instanceof Timing;
1054        }
1055
1056        public boolean hasParticipantEffective() { 
1057          return this.participantEffective != null && !this.participantEffective.isEmpty();
1058        }
1059
1060        /**
1061         * @param value {@link #participantEffective} (Indicates what effective period the study covers.)
1062         */
1063        public ResearchElementDefinitionCharacteristicComponent setParticipantEffective(Type value) { 
1064          if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Duration || value instanceof Timing))
1065            throw new Error("Not the right type for ResearchElementDefinition.characteristic.participantEffective[x]: "+value.fhirType());
1066          this.participantEffective = value;
1067          return this;
1068        }
1069
1070        /**
1071         * @return {@link #participantEffectiveTimeFromStart} (Indicates duration from the participant's study entry.)
1072         */
1073        public Duration getParticipantEffectiveTimeFromStart() { 
1074          if (this.participantEffectiveTimeFromStart == null)
1075            if (Configuration.errorOnAutoCreate())
1076              throw new Error("Attempt to auto-create ResearchElementDefinitionCharacteristicComponent.participantEffectiveTimeFromStart");
1077            else if (Configuration.doAutoCreate())
1078              this.participantEffectiveTimeFromStart = new Duration(); // cc
1079          return this.participantEffectiveTimeFromStart;
1080        }
1081
1082        public boolean hasParticipantEffectiveTimeFromStart() { 
1083          return this.participantEffectiveTimeFromStart != null && !this.participantEffectiveTimeFromStart.isEmpty();
1084        }
1085
1086        /**
1087         * @param value {@link #participantEffectiveTimeFromStart} (Indicates duration from the participant's study entry.)
1088         */
1089        public ResearchElementDefinitionCharacteristicComponent setParticipantEffectiveTimeFromStart(Duration value) { 
1090          this.participantEffectiveTimeFromStart = value;
1091          return this;
1092        }
1093
1094        /**
1095         * @return {@link #participantEffectiveGroupMeasure} (Indicates how elements are aggregated within the study effective period.). This is the underlying object with id, value and extensions. The accessor "getParticipantEffectiveGroupMeasure" gives direct access to the value
1096         */
1097        public Enumeration<GroupMeasure> getParticipantEffectiveGroupMeasureElement() { 
1098          if (this.participantEffectiveGroupMeasure == null)
1099            if (Configuration.errorOnAutoCreate())
1100              throw new Error("Attempt to auto-create ResearchElementDefinitionCharacteristicComponent.participantEffectiveGroupMeasure");
1101            else if (Configuration.doAutoCreate())
1102              this.participantEffectiveGroupMeasure = new Enumeration<GroupMeasure>(new GroupMeasureEnumFactory()); // bb
1103          return this.participantEffectiveGroupMeasure;
1104        }
1105
1106        public boolean hasParticipantEffectiveGroupMeasureElement() { 
1107          return this.participantEffectiveGroupMeasure != null && !this.participantEffectiveGroupMeasure.isEmpty();
1108        }
1109
1110        public boolean hasParticipantEffectiveGroupMeasure() { 
1111          return this.participantEffectiveGroupMeasure != null && !this.participantEffectiveGroupMeasure.isEmpty();
1112        }
1113
1114        /**
1115         * @param value {@link #participantEffectiveGroupMeasure} (Indicates how elements are aggregated within the study effective period.). This is the underlying object with id, value and extensions. The accessor "getParticipantEffectiveGroupMeasure" gives direct access to the value
1116         */
1117        public ResearchElementDefinitionCharacteristicComponent setParticipantEffectiveGroupMeasureElement(Enumeration<GroupMeasure> value) { 
1118          this.participantEffectiveGroupMeasure = value;
1119          return this;
1120        }
1121
1122        /**
1123         * @return Indicates how elements are aggregated within the study effective period.
1124         */
1125        public GroupMeasure getParticipantEffectiveGroupMeasure() { 
1126          return this.participantEffectiveGroupMeasure == null ? null : this.participantEffectiveGroupMeasure.getValue();
1127        }
1128
1129        /**
1130         * @param value Indicates how elements are aggregated within the study effective period.
1131         */
1132        public ResearchElementDefinitionCharacteristicComponent setParticipantEffectiveGroupMeasure(GroupMeasure value) { 
1133          if (value == null)
1134            this.participantEffectiveGroupMeasure = null;
1135          else {
1136            if (this.participantEffectiveGroupMeasure == null)
1137              this.participantEffectiveGroupMeasure = new Enumeration<GroupMeasure>(new GroupMeasureEnumFactory());
1138            this.participantEffectiveGroupMeasure.setValue(value);
1139          }
1140          return this;
1141        }
1142
1143        protected void listChildren(List<Property> children) {
1144          super.listChildren(children);
1145          children.add(new Property("definition[x]", "CodeableConcept|canonical(ValueSet)|Expression|DataRequirement", "Define members of the research 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));
1146          children.add(new Property("usageContext", "UsageContext", "Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.", 0, java.lang.Integer.MAX_VALUE, usageContext));
1147          children.add(new Property("exclude", "boolean", "When true, members with this characteristic are excluded from the element.", 0, 1, exclude));
1148          children.add(new Property("unitOfMeasure", "CodeableConcept", "Specifies the UCUM unit for the outcome.", 0, 1, unitOfMeasure));
1149          children.add(new Property("studyEffectiveDescription", "string", "A narrative description of the time period the study covers.", 0, 1, studyEffectiveDescription));
1150          children.add(new Property("studyEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, studyEffective));
1151          children.add(new Property("studyEffectiveTimeFromStart", "Duration", "Indicates duration from the study initiation.", 0, 1, studyEffectiveTimeFromStart));
1152          children.add(new Property("studyEffectiveGroupMeasure", "code", "Indicates how elements are aggregated within the study effective period.", 0, 1, studyEffectiveGroupMeasure));
1153          children.add(new Property("participantEffectiveDescription", "string", "A narrative description of the time period the study covers.", 0, 1, participantEffectiveDescription));
1154          children.add(new Property("participantEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, participantEffective));
1155          children.add(new Property("participantEffectiveTimeFromStart", "Duration", "Indicates duration from the participant's study entry.", 0, 1, participantEffectiveTimeFromStart));
1156          children.add(new Property("participantEffectiveGroupMeasure", "code", "Indicates how elements are aggregated within the study effective period.", 0, 1, participantEffectiveGroupMeasure));
1157        }
1158
1159        @Override
1160        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1161          switch (_hash) {
1162          case -1139422643: /*definition[x]*/  return new Property("definition[x]", "CodeableConcept|canonical(ValueSet)|Expression|DataRequirement", "Define members of the research 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);
1163          case -1014418093: /*definition*/  return new Property("definition[x]", "CodeableConcept|canonical(ValueSet)|Expression|DataRequirement", "Define members of the research 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);
1164          case -1446002226: /*definitionCodeableConcept*/  return new Property("definition[x]", "CodeableConcept|canonical(ValueSet)|Expression|DataRequirement", "Define members of the research 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);
1165          case 933485793: /*definitionCanonical*/  return new Property("definition[x]", "CodeableConcept|canonical(ValueSet)|Expression|DataRequirement", "Define members of the research 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);
1166          case 1463703627: /*definitionExpression*/  return new Property("definition[x]", "CodeableConcept|canonical(ValueSet)|Expression|DataRequirement", "Define members of the research 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);
1167          case -660350874: /*definitionDataRequirement*/  return new Property("definition[x]", "CodeableConcept|canonical(ValueSet)|Expression|DataRequirement", "Define members of the research 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);
1168          case 907012302: /*usageContext*/  return new Property("usageContext", "UsageContext", "Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.", 0, java.lang.Integer.MAX_VALUE, usageContext);
1169          case -1321148966: /*exclude*/  return new Property("exclude", "boolean", "When true, members with this characteristic are excluded from the element.", 0, 1, exclude);
1170          case -750257565: /*unitOfMeasure*/  return new Property("unitOfMeasure", "CodeableConcept", "Specifies the UCUM unit for the outcome.", 0, 1, unitOfMeasure);
1171          case 237553470: /*studyEffectiveDescription*/  return new Property("studyEffectiveDescription", "string", "A narrative description of the time period the study covers.", 0, 1, studyEffectiveDescription);
1172          case -1832549918: /*studyEffective[x]*/  return new Property("studyEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, studyEffective);
1173          case -836391458: /*studyEffective*/  return new Property("studyEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, studyEffective);
1174          case 439780249: /*studyEffectiveDateTime*/  return new Property("studyEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, studyEffective);
1175          case -497045185: /*studyEffectivePeriod*/  return new Property("studyEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, studyEffective);
1176          case 949985682: /*studyEffectiveDuration*/  return new Property("studyEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, studyEffective);
1177          case -378983480: /*studyEffectiveTiming*/  return new Property("studyEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, studyEffective);
1178          case -2107828915: /*studyEffectiveTimeFromStart*/  return new Property("studyEffectiveTimeFromStart", "Duration", "Indicates duration from the study initiation.", 0, 1, studyEffectiveTimeFromStart);
1179          case 1284435677: /*studyEffectiveGroupMeasure*/  return new Property("studyEffectiveGroupMeasure", "code", "Indicates how elements are aggregated within the study effective period.", 0, 1, studyEffectiveGroupMeasure);
1180          case 1333186472: /*participantEffectiveDescription*/  return new Property("participantEffectiveDescription", "string", "A narrative description of the time period the study covers.", 0, 1, participantEffectiveDescription);
1181          case 1777308748: /*participantEffective[x]*/  return new Property("participantEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, participantEffective);
1182          case 1376306100: /*participantEffective*/  return new Property("participantEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, participantEffective);
1183          case -1721146513: /*participantEffectiveDateTime*/  return new Property("participantEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, participantEffective);
1184          case -883650923: /*participantEffectivePeriod*/  return new Property("participantEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, participantEffective);
1185          case -1210941080: /*participantEffectiveDuration*/  return new Property("participantEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, participantEffective);
1186          case -765589218: /*participantEffectiveTiming*/  return new Property("participantEffective[x]", "dateTime|Period|Duration|Timing", "Indicates what effective period the study covers.", 0, 1, participantEffective);
1187          case -1471501513: /*participantEffectiveTimeFromStart*/  return new Property("participantEffectiveTimeFromStart", "Duration", "Indicates duration from the participant's study entry.", 0, 1, participantEffectiveTimeFromStart);
1188          case 889320371: /*participantEffectiveGroupMeasure*/  return new Property("participantEffectiveGroupMeasure", "code", "Indicates how elements are aggregated within the study effective period.", 0, 1, participantEffectiveGroupMeasure);
1189          default: return super.getNamedProperty(_hash, _name, _checkValid);
1190          }
1191
1192        }
1193
1194      @Override
1195      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1196        switch (hash) {
1197        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // Type
1198        case 907012302: /*usageContext*/ return this.usageContext == null ? new Base[0] : this.usageContext.toArray(new Base[this.usageContext.size()]); // UsageContext
1199        case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : new Base[] {this.exclude}; // BooleanType
1200        case -750257565: /*unitOfMeasure*/ return this.unitOfMeasure == null ? new Base[0] : new Base[] {this.unitOfMeasure}; // CodeableConcept
1201        case 237553470: /*studyEffectiveDescription*/ return this.studyEffectiveDescription == null ? new Base[0] : new Base[] {this.studyEffectiveDescription}; // StringType
1202        case -836391458: /*studyEffective*/ return this.studyEffective == null ? new Base[0] : new Base[] {this.studyEffective}; // Type
1203        case -2107828915: /*studyEffectiveTimeFromStart*/ return this.studyEffectiveTimeFromStart == null ? new Base[0] : new Base[] {this.studyEffectiveTimeFromStart}; // Duration
1204        case 1284435677: /*studyEffectiveGroupMeasure*/ return this.studyEffectiveGroupMeasure == null ? new Base[0] : new Base[] {this.studyEffectiveGroupMeasure}; // Enumeration<GroupMeasure>
1205        case 1333186472: /*participantEffectiveDescription*/ return this.participantEffectiveDescription == null ? new Base[0] : new Base[] {this.participantEffectiveDescription}; // StringType
1206        case 1376306100: /*participantEffective*/ return this.participantEffective == null ? new Base[0] : new Base[] {this.participantEffective}; // Type
1207        case -1471501513: /*participantEffectiveTimeFromStart*/ return this.participantEffectiveTimeFromStart == null ? new Base[0] : new Base[] {this.participantEffectiveTimeFromStart}; // Duration
1208        case 889320371: /*participantEffectiveGroupMeasure*/ return this.participantEffectiveGroupMeasure == null ? new Base[0] : new Base[] {this.participantEffectiveGroupMeasure}; // Enumeration<GroupMeasure>
1209        default: return super.getProperty(hash, name, checkValid);
1210        }
1211
1212      }
1213
1214      @Override
1215      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1216        switch (hash) {
1217        case -1014418093: // definition
1218          this.definition = castToType(value); // Type
1219          return value;
1220        case 907012302: // usageContext
1221          this.getUsageContext().add(castToUsageContext(value)); // UsageContext
1222          return value;
1223        case -1321148966: // exclude
1224          this.exclude = castToBoolean(value); // BooleanType
1225          return value;
1226        case -750257565: // unitOfMeasure
1227          this.unitOfMeasure = castToCodeableConcept(value); // CodeableConcept
1228          return value;
1229        case 237553470: // studyEffectiveDescription
1230          this.studyEffectiveDescription = castToString(value); // StringType
1231          return value;
1232        case -836391458: // studyEffective
1233          this.studyEffective = castToType(value); // Type
1234          return value;
1235        case -2107828915: // studyEffectiveTimeFromStart
1236          this.studyEffectiveTimeFromStart = castToDuration(value); // Duration
1237          return value;
1238        case 1284435677: // studyEffectiveGroupMeasure
1239          value = new GroupMeasureEnumFactory().fromType(castToCode(value));
1240          this.studyEffectiveGroupMeasure = (Enumeration) value; // Enumeration<GroupMeasure>
1241          return value;
1242        case 1333186472: // participantEffectiveDescription
1243          this.participantEffectiveDescription = castToString(value); // StringType
1244          return value;
1245        case 1376306100: // participantEffective
1246          this.participantEffective = castToType(value); // Type
1247          return value;
1248        case -1471501513: // participantEffectiveTimeFromStart
1249          this.participantEffectiveTimeFromStart = castToDuration(value); // Duration
1250          return value;
1251        case 889320371: // participantEffectiveGroupMeasure
1252          value = new GroupMeasureEnumFactory().fromType(castToCode(value));
1253          this.participantEffectiveGroupMeasure = (Enumeration) value; // Enumeration<GroupMeasure>
1254          return value;
1255        default: return super.setProperty(hash, name, value);
1256        }
1257
1258      }
1259
1260      @Override
1261      public Base setProperty(String name, Base value) throws FHIRException {
1262        if (name.equals("definition[x]")) {
1263          this.definition = castToType(value); // Type
1264        } else if (name.equals("usageContext")) {
1265          this.getUsageContext().add(castToUsageContext(value));
1266        } else if (name.equals("exclude")) {
1267          this.exclude = castToBoolean(value); // BooleanType
1268        } else if (name.equals("unitOfMeasure")) {
1269          this.unitOfMeasure = castToCodeableConcept(value); // CodeableConcept
1270        } else if (name.equals("studyEffectiveDescription")) {
1271          this.studyEffectiveDescription = castToString(value); // StringType
1272        } else if (name.equals("studyEffective[x]")) {
1273          this.studyEffective = castToType(value); // Type
1274        } else if (name.equals("studyEffectiveTimeFromStart")) {
1275          this.studyEffectiveTimeFromStart = castToDuration(value); // Duration
1276        } else if (name.equals("studyEffectiveGroupMeasure")) {
1277          value = new GroupMeasureEnumFactory().fromType(castToCode(value));
1278          this.studyEffectiveGroupMeasure = (Enumeration) value; // Enumeration<GroupMeasure>
1279        } else if (name.equals("participantEffectiveDescription")) {
1280          this.participantEffectiveDescription = castToString(value); // StringType
1281        } else if (name.equals("participantEffective[x]")) {
1282          this.participantEffective = castToType(value); // Type
1283        } else if (name.equals("participantEffectiveTimeFromStart")) {
1284          this.participantEffectiveTimeFromStart = castToDuration(value); // Duration
1285        } else if (name.equals("participantEffectiveGroupMeasure")) {
1286          value = new GroupMeasureEnumFactory().fromType(castToCode(value));
1287          this.participantEffectiveGroupMeasure = (Enumeration) value; // Enumeration<GroupMeasure>
1288        } else
1289          return super.setProperty(name, value);
1290        return value;
1291      }
1292
1293      @Override
1294      public Base makeProperty(int hash, String name) throws FHIRException {
1295        switch (hash) {
1296        case -1139422643:  return getDefinition(); 
1297        case -1014418093:  return getDefinition(); 
1298        case 907012302:  return addUsageContext(); 
1299        case -1321148966:  return getExcludeElement();
1300        case -750257565:  return getUnitOfMeasure(); 
1301        case 237553470:  return getStudyEffectiveDescriptionElement();
1302        case -1832549918:  return getStudyEffective(); 
1303        case -836391458:  return getStudyEffective(); 
1304        case -2107828915:  return getStudyEffectiveTimeFromStart(); 
1305        case 1284435677:  return getStudyEffectiveGroupMeasureElement();
1306        case 1333186472:  return getParticipantEffectiveDescriptionElement();
1307        case 1777308748:  return getParticipantEffective(); 
1308        case 1376306100:  return getParticipantEffective(); 
1309        case -1471501513:  return getParticipantEffectiveTimeFromStart(); 
1310        case 889320371:  return getParticipantEffectiveGroupMeasureElement();
1311        default: return super.makeProperty(hash, name);
1312        }
1313
1314      }
1315
1316      @Override
1317      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1318        switch (hash) {
1319        case -1014418093: /*definition*/ return new String[] {"CodeableConcept", "canonical", "Expression", "DataRequirement"};
1320        case 907012302: /*usageContext*/ return new String[] {"UsageContext"};
1321        case -1321148966: /*exclude*/ return new String[] {"boolean"};
1322        case -750257565: /*unitOfMeasure*/ return new String[] {"CodeableConcept"};
1323        case 237553470: /*studyEffectiveDescription*/ return new String[] {"string"};
1324        case -836391458: /*studyEffective*/ return new String[] {"dateTime", "Period", "Duration", "Timing"};
1325        case -2107828915: /*studyEffectiveTimeFromStart*/ return new String[] {"Duration"};
1326        case 1284435677: /*studyEffectiveGroupMeasure*/ return new String[] {"code"};
1327        case 1333186472: /*participantEffectiveDescription*/ return new String[] {"string"};
1328        case 1376306100: /*participantEffective*/ return new String[] {"dateTime", "Period", "Duration", "Timing"};
1329        case -1471501513: /*participantEffectiveTimeFromStart*/ return new String[] {"Duration"};
1330        case 889320371: /*participantEffectiveGroupMeasure*/ return new String[] {"code"};
1331        default: return super.getTypesForProperty(hash, name);
1332        }
1333
1334      }
1335
1336      @Override
1337      public Base addChild(String name) throws FHIRException {
1338        if (name.equals("definitionCodeableConcept")) {
1339          this.definition = new CodeableConcept();
1340          return this.definition;
1341        }
1342        else if (name.equals("definitionCanonical")) {
1343          this.definition = new CanonicalType();
1344          return this.definition;
1345        }
1346        else if (name.equals("definitionExpression")) {
1347          this.definition = new Expression();
1348          return this.definition;
1349        }
1350        else if (name.equals("definitionDataRequirement")) {
1351          this.definition = new DataRequirement();
1352          return this.definition;
1353        }
1354        else if (name.equals("usageContext")) {
1355          return addUsageContext();
1356        }
1357        else if (name.equals("exclude")) {
1358          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.exclude");
1359        }
1360        else if (name.equals("unitOfMeasure")) {
1361          this.unitOfMeasure = new CodeableConcept();
1362          return this.unitOfMeasure;
1363        }
1364        else if (name.equals("studyEffectiveDescription")) {
1365          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.studyEffectiveDescription");
1366        }
1367        else if (name.equals("studyEffectiveDateTime")) {
1368          this.studyEffective = new DateTimeType();
1369          return this.studyEffective;
1370        }
1371        else if (name.equals("studyEffectivePeriod")) {
1372          this.studyEffective = new Period();
1373          return this.studyEffective;
1374        }
1375        else if (name.equals("studyEffectiveDuration")) {
1376          this.studyEffective = new Duration();
1377          return this.studyEffective;
1378        }
1379        else if (name.equals("studyEffectiveTiming")) {
1380          this.studyEffective = new Timing();
1381          return this.studyEffective;
1382        }
1383        else if (name.equals("studyEffectiveTimeFromStart")) {
1384          this.studyEffectiveTimeFromStart = new Duration();
1385          return this.studyEffectiveTimeFromStart;
1386        }
1387        else if (name.equals("studyEffectiveGroupMeasure")) {
1388          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.studyEffectiveGroupMeasure");
1389        }
1390        else if (name.equals("participantEffectiveDescription")) {
1391          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.participantEffectiveDescription");
1392        }
1393        else if (name.equals("participantEffectiveDateTime")) {
1394          this.participantEffective = new DateTimeType();
1395          return this.participantEffective;
1396        }
1397        else if (name.equals("participantEffectivePeriod")) {
1398          this.participantEffective = new Period();
1399          return this.participantEffective;
1400        }
1401        else if (name.equals("participantEffectiveDuration")) {
1402          this.participantEffective = new Duration();
1403          return this.participantEffective;
1404        }
1405        else if (name.equals("participantEffectiveTiming")) {
1406          this.participantEffective = new Timing();
1407          return this.participantEffective;
1408        }
1409        else if (name.equals("participantEffectiveTimeFromStart")) {
1410          this.participantEffectiveTimeFromStart = new Duration();
1411          return this.participantEffectiveTimeFromStart;
1412        }
1413        else if (name.equals("participantEffectiveGroupMeasure")) {
1414          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.participantEffectiveGroupMeasure");
1415        }
1416        else
1417          return super.addChild(name);
1418      }
1419
1420      public ResearchElementDefinitionCharacteristicComponent copy() {
1421        ResearchElementDefinitionCharacteristicComponent dst = new ResearchElementDefinitionCharacteristicComponent();
1422        copyValues(dst);
1423        return dst;
1424      }
1425
1426      public void copyValues(ResearchElementDefinitionCharacteristicComponent dst) {
1427        super.copyValues(dst);
1428        dst.definition = definition == null ? null : definition.copy();
1429        if (usageContext != null) {
1430          dst.usageContext = new ArrayList<UsageContext>();
1431          for (UsageContext i : usageContext)
1432            dst.usageContext.add(i.copy());
1433        };
1434        dst.exclude = exclude == null ? null : exclude.copy();
1435        dst.unitOfMeasure = unitOfMeasure == null ? null : unitOfMeasure.copy();
1436        dst.studyEffectiveDescription = studyEffectiveDescription == null ? null : studyEffectiveDescription.copy();
1437        dst.studyEffective = studyEffective == null ? null : studyEffective.copy();
1438        dst.studyEffectiveTimeFromStart = studyEffectiveTimeFromStart == null ? null : studyEffectiveTimeFromStart.copy();
1439        dst.studyEffectiveGroupMeasure = studyEffectiveGroupMeasure == null ? null : studyEffectiveGroupMeasure.copy();
1440        dst.participantEffectiveDescription = participantEffectiveDescription == null ? null : participantEffectiveDescription.copy();
1441        dst.participantEffective = participantEffective == null ? null : participantEffective.copy();
1442        dst.participantEffectiveTimeFromStart = participantEffectiveTimeFromStart == null ? null : participantEffectiveTimeFromStart.copy();
1443        dst.participantEffectiveGroupMeasure = participantEffectiveGroupMeasure == null ? null : participantEffectiveGroupMeasure.copy();
1444      }
1445
1446      @Override
1447      public boolean equalsDeep(Base other_) {
1448        if (!super.equalsDeep(other_))
1449          return false;
1450        if (!(other_ instanceof ResearchElementDefinitionCharacteristicComponent))
1451          return false;
1452        ResearchElementDefinitionCharacteristicComponent o = (ResearchElementDefinitionCharacteristicComponent) other_;
1453        return compareDeep(definition, o.definition, true) && compareDeep(usageContext, o.usageContext, true)
1454           && compareDeep(exclude, o.exclude, true) && compareDeep(unitOfMeasure, o.unitOfMeasure, true) && compareDeep(studyEffectiveDescription, o.studyEffectiveDescription, true)
1455           && compareDeep(studyEffective, o.studyEffective, true) && compareDeep(studyEffectiveTimeFromStart, o.studyEffectiveTimeFromStart, true)
1456           && compareDeep(studyEffectiveGroupMeasure, o.studyEffectiveGroupMeasure, true) && compareDeep(participantEffectiveDescription, o.participantEffectiveDescription, true)
1457           && compareDeep(participantEffective, o.participantEffective, true) && compareDeep(participantEffectiveTimeFromStart, o.participantEffectiveTimeFromStart, true)
1458           && compareDeep(participantEffectiveGroupMeasure, o.participantEffectiveGroupMeasure, true);
1459      }
1460
1461      @Override
1462      public boolean equalsShallow(Base other_) {
1463        if (!super.equalsShallow(other_))
1464          return false;
1465        if (!(other_ instanceof ResearchElementDefinitionCharacteristicComponent))
1466          return false;
1467        ResearchElementDefinitionCharacteristicComponent o = (ResearchElementDefinitionCharacteristicComponent) other_;
1468        return compareValues(exclude, o.exclude, true) && compareValues(studyEffectiveDescription, o.studyEffectiveDescription, true)
1469           && compareValues(studyEffectiveGroupMeasure, o.studyEffectiveGroupMeasure, true) && compareValues(participantEffectiveDescription, o.participantEffectiveDescription, true)
1470           && compareValues(participantEffectiveGroupMeasure, o.participantEffectiveGroupMeasure, true);
1471      }
1472
1473      public boolean isEmpty() {
1474        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(definition, usageContext, exclude
1475          , unitOfMeasure, studyEffectiveDescription, studyEffective, studyEffectiveTimeFromStart
1476          , studyEffectiveGroupMeasure, participantEffectiveDescription, participantEffective, participantEffectiveTimeFromStart
1477          , participantEffectiveGroupMeasure);
1478      }
1479
1480  public String fhirType() {
1481    return "ResearchElementDefinition.characteristic";
1482
1483  }
1484
1485  }
1486
1487    /**
1488     * A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance.
1489     */
1490    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1491    @Description(shortDefinition="Additional identifier for the research element definition", formalDefinition="A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance." )
1492    protected List<Identifier> identifier;
1493
1494    /**
1495     * The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.
1496     */
1497    @Child(name = "shortTitle", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1498    @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." )
1499    protected StringType shortTitle;
1500
1501    /**
1502     * An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.
1503     */
1504    @Child(name = "subtitle", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1505    @Description(shortDefinition="Subordinate title of the ResearchElementDefinition", formalDefinition="An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content." )
1506    protected StringType subtitle;
1507
1508    /**
1509     * The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.
1510     */
1511    @Child(name = "subject", type = {CodeableConcept.class, Group.class}, order=3, min=0, max=1, modifier=false, summary=false)
1512    @Description(shortDefinition="E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device", formalDefinition="The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything." )
1513    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subject-type")
1514    protected Type subject;
1515
1516    /**
1517     * A human-readable string to clarify or explain concepts about the resource.
1518     */
1519    @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1520    @Description(shortDefinition="Used for footnotes or explanatory notes", formalDefinition="A human-readable string to clarify or explain concepts about the resource." )
1521    protected List<StringType> comment;
1522
1523    /**
1524     * Explanation of why this research element definition is needed and why it has been designed as it has.
1525     */
1526    @Child(name = "purpose", type = {MarkdownType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1527    @Description(shortDefinition="Why this research element definition is defined", formalDefinition="Explanation of why this research element definition is needed and why it has been designed as it has." )
1528    protected MarkdownType purpose;
1529
1530    /**
1531     * A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.
1532     */
1533    @Child(name = "usage", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
1534    @Description(shortDefinition="Describes the clinical usage of the ResearchElementDefinition", formalDefinition="A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used." )
1535    protected StringType usage;
1536
1537    /**
1538     * A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.
1539     */
1540    @Child(name = "copyright", type = {MarkdownType.class}, order=7, min=0, max=1, modifier=false, summary=false)
1541    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition." )
1542    protected MarkdownType copyright;
1543
1544    /**
1545     * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
1546     */
1547    @Child(name = "approvalDate", type = {DateType.class}, order=8, min=0, max=1, modifier=false, summary=false)
1548    @Description(shortDefinition="When the research element definition was approved by publisher", formalDefinition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." )
1549    protected DateType approvalDate;
1550
1551    /**
1552     * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
1553     */
1554    @Child(name = "lastReviewDate", type = {DateType.class}, order=9, min=0, max=1, modifier=false, summary=false)
1555    @Description(shortDefinition="When the research element definition was last reviewed", formalDefinition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." )
1556    protected DateType lastReviewDate;
1557
1558    /**
1559     * The period during which the research element definition content was or is planned to be in active use.
1560     */
1561    @Child(name = "effectivePeriod", type = {Period.class}, order=10, min=0, max=1, modifier=false, summary=true)
1562    @Description(shortDefinition="When the research element definition is expected to be used", formalDefinition="The period during which the research element definition content was or is planned to be in active use." )
1563    protected Period effectivePeriod;
1564
1565    /**
1566     * Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching.
1567     */
1568    @Child(name = "topic", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1569    @Description(shortDefinition="The category of the ResearchElementDefinition, such as Education, Treatment, Assessment, etc.", formalDefinition="Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching." )
1570    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/definition-topic")
1571    protected List<CodeableConcept> topic;
1572
1573    /**
1574     * An individiual or organization primarily involved in the creation and maintenance of the content.
1575     */
1576    @Child(name = "author", type = {ContactDetail.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1577    @Description(shortDefinition="Who authored the content", formalDefinition="An individiual or organization primarily involved in the creation and maintenance of the content." )
1578    protected List<ContactDetail> author;
1579
1580    /**
1581     * An individual or organization primarily responsible for internal coherence of the content.
1582     */
1583    @Child(name = "editor", type = {ContactDetail.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1584    @Description(shortDefinition="Who edited the content", formalDefinition="An individual or organization primarily responsible for internal coherence of the content." )
1585    protected List<ContactDetail> editor;
1586
1587    /**
1588     * An individual or organization primarily responsible for review of some aspect of the content.
1589     */
1590    @Child(name = "reviewer", type = {ContactDetail.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1591    @Description(shortDefinition="Who reviewed the content", formalDefinition="An individual or organization primarily responsible for review of some aspect of the content." )
1592    protected List<ContactDetail> reviewer;
1593
1594    /**
1595     * An individual or organization responsible for officially endorsing the content for use in some setting.
1596     */
1597    @Child(name = "endorser", type = {ContactDetail.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1598    @Description(shortDefinition="Who endorsed the content", formalDefinition="An individual or organization responsible for officially endorsing the content for use in some setting." )
1599    protected List<ContactDetail> endorser;
1600
1601    /**
1602     * Related artifacts such as additional documentation, justification, or bibliographic references.
1603     */
1604    @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1605    @Description(shortDefinition="Additional documentation, citations, etc.", formalDefinition="Related artifacts such as additional documentation, justification, or bibliographic references." )
1606    protected List<RelatedArtifact> relatedArtifact;
1607
1608    /**
1609     * A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.
1610     */
1611    @Child(name = "library", type = {CanonicalType.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1612    @Description(shortDefinition="Logic used by the ResearchElementDefinition", formalDefinition="A reference to a Library resource containing the formal logic used by the ResearchElementDefinition." )
1613    protected List<CanonicalType> library;
1614
1615    /**
1616     * The type of research element, a population, an exposure, or an outcome.
1617     */
1618    @Child(name = "type", type = {CodeType.class}, order=18, min=1, max=1, modifier=false, summary=true)
1619    @Description(shortDefinition="population | exposure | outcome", formalDefinition="The type of research element, a population, an exposure, or an outcome." )
1620    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/research-element-type")
1621    protected Enumeration<ResearchElementType> type;
1622
1623    /**
1624     * The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).
1625     */
1626    @Child(name = "variableType", type = {CodeType.class}, order=19, min=0, max=1, modifier=false, summary=false)
1627    @Description(shortDefinition="dichotomous | continuous | descriptive", formalDefinition="The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive)." )
1628    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/variable-type")
1629    protected Enumeration<VariableType> variableType;
1630
1631    /**
1632     * A characteristic that defines the members of the research element. Multiple characteristics are applied with "and" semantics.
1633     */
1634    @Child(name = "characteristic", type = {}, order=20, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1635    @Description(shortDefinition="What defines the members of the research element", formalDefinition="A characteristic that defines the members of the research element. Multiple characteristics are applied with \"and\" semantics." )
1636    protected List<ResearchElementDefinitionCharacteristicComponent> characteristic;
1637
1638    private static final long serialVersionUID = 1483216033L;
1639
1640  /**
1641   * Constructor
1642   */
1643    public ResearchElementDefinition() {
1644      super();
1645    }
1646
1647  /**
1648   * Constructor
1649   */
1650    public ResearchElementDefinition(Enumeration<PublicationStatus> status, Enumeration<ResearchElementType> type) {
1651      super();
1652      this.status = status;
1653      this.type = type;
1654    }
1655
1656    /**
1657     * @return {@link #url} (An absolute URI that is used to identify this research element definition 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 research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1658     */
1659    public UriType getUrlElement() { 
1660      if (this.url == null)
1661        if (Configuration.errorOnAutoCreate())
1662          throw new Error("Attempt to auto-create ResearchElementDefinition.url");
1663        else if (Configuration.doAutoCreate())
1664          this.url = new UriType(); // bb
1665      return this.url;
1666    }
1667
1668    public boolean hasUrlElement() { 
1669      return this.url != null && !this.url.isEmpty();
1670    }
1671
1672    public boolean hasUrl() { 
1673      return this.url != null && !this.url.isEmpty();
1674    }
1675
1676    /**
1677     * @param value {@link #url} (An absolute URI that is used to identify this research element definition 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 research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1678     */
1679    public ResearchElementDefinition setUrlElement(UriType value) { 
1680      this.url = value;
1681      return this;
1682    }
1683
1684    /**
1685     * @return An absolute URI that is used to identify this research element definition 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 research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.
1686     */
1687    public String getUrl() { 
1688      return this.url == null ? null : this.url.getValue();
1689    }
1690
1691    /**
1692     * @param value An absolute URI that is used to identify this research element definition 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 research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.
1693     */
1694    public ResearchElementDefinition setUrl(String value) { 
1695      if (Utilities.noString(value))
1696        this.url = null;
1697      else {
1698        if (this.url == null)
1699          this.url = new UriType();
1700        this.url.setValue(value);
1701      }
1702      return this;
1703    }
1704
1705    /**
1706     * @return {@link #identifier} (A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance.)
1707     */
1708    public List<Identifier> getIdentifier() { 
1709      if (this.identifier == null)
1710        this.identifier = new ArrayList<Identifier>();
1711      return this.identifier;
1712    }
1713
1714    /**
1715     * @return Returns a reference to <code>this</code> for easy method chaining
1716     */
1717    public ResearchElementDefinition setIdentifier(List<Identifier> theIdentifier) { 
1718      this.identifier = theIdentifier;
1719      return this;
1720    }
1721
1722    public boolean hasIdentifier() { 
1723      if (this.identifier == null)
1724        return false;
1725      for (Identifier item : this.identifier)
1726        if (!item.isEmpty())
1727          return true;
1728      return false;
1729    }
1730
1731    public Identifier addIdentifier() { //3
1732      Identifier t = new Identifier();
1733      if (this.identifier == null)
1734        this.identifier = new ArrayList<Identifier>();
1735      this.identifier.add(t);
1736      return t;
1737    }
1738
1739    public ResearchElementDefinition addIdentifier(Identifier t) { //3
1740      if (t == null)
1741        return this;
1742      if (this.identifier == null)
1743        this.identifier = new ArrayList<Identifier>();
1744      this.identifier.add(t);
1745      return this;
1746    }
1747
1748    /**
1749     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
1750     */
1751    public Identifier getIdentifierFirstRep() { 
1752      if (getIdentifier().isEmpty()) {
1753        addIdentifier();
1754      }
1755      return getIdentifier().get(0);
1756    }
1757
1758    /**
1759     * @return {@link #version} (The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition 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
1760     */
1761    public StringType getVersionElement() { 
1762      if (this.version == null)
1763        if (Configuration.errorOnAutoCreate())
1764          throw new Error("Attempt to auto-create ResearchElementDefinition.version");
1765        else if (Configuration.doAutoCreate())
1766          this.version = new StringType(); // bb
1767      return this.version;
1768    }
1769
1770    public boolean hasVersionElement() { 
1771      return this.version != null && !this.version.isEmpty();
1772    }
1773
1774    public boolean hasVersion() { 
1775      return this.version != null && !this.version.isEmpty();
1776    }
1777
1778    /**
1779     * @param value {@link #version} (The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition 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
1780     */
1781    public ResearchElementDefinition setVersionElement(StringType value) { 
1782      this.version = value;
1783      return this;
1784    }
1785
1786    /**
1787     * @return The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition 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.
1788     */
1789    public String getVersion() { 
1790      return this.version == null ? null : this.version.getValue();
1791    }
1792
1793    /**
1794     * @param value The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition 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.
1795     */
1796    public ResearchElementDefinition setVersion(String value) { 
1797      if (Utilities.noString(value))
1798        this.version = null;
1799      else {
1800        if (this.version == null)
1801          this.version = new StringType();
1802        this.version.setValue(value);
1803      }
1804      return this;
1805    }
1806
1807    /**
1808     * @return {@link #name} (A natural language name identifying the research element definition. 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
1809     */
1810    public StringType getNameElement() { 
1811      if (this.name == null)
1812        if (Configuration.errorOnAutoCreate())
1813          throw new Error("Attempt to auto-create ResearchElementDefinition.name");
1814        else if (Configuration.doAutoCreate())
1815          this.name = new StringType(); // bb
1816      return this.name;
1817    }
1818
1819    public boolean hasNameElement() { 
1820      return this.name != null && !this.name.isEmpty();
1821    }
1822
1823    public boolean hasName() { 
1824      return this.name != null && !this.name.isEmpty();
1825    }
1826
1827    /**
1828     * @param value {@link #name} (A natural language name identifying the research element definition. 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
1829     */
1830    public ResearchElementDefinition setNameElement(StringType value) { 
1831      this.name = value;
1832      return this;
1833    }
1834
1835    /**
1836     * @return A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1837     */
1838    public String getName() { 
1839      return this.name == null ? null : this.name.getValue();
1840    }
1841
1842    /**
1843     * @param value A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1844     */
1845    public ResearchElementDefinition setName(String value) { 
1846      if (Utilities.noString(value))
1847        this.name = null;
1848      else {
1849        if (this.name == null)
1850          this.name = new StringType();
1851        this.name.setValue(value);
1852      }
1853      return this;
1854    }
1855
1856    /**
1857     * @return {@link #title} (A short, descriptive, user-friendly title for the research element definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1858     */
1859    public StringType getTitleElement() { 
1860      if (this.title == null)
1861        if (Configuration.errorOnAutoCreate())
1862          throw new Error("Attempt to auto-create ResearchElementDefinition.title");
1863        else if (Configuration.doAutoCreate())
1864          this.title = new StringType(); // bb
1865      return this.title;
1866    }
1867
1868    public boolean hasTitleElement() { 
1869      return this.title != null && !this.title.isEmpty();
1870    }
1871
1872    public boolean hasTitle() { 
1873      return this.title != null && !this.title.isEmpty();
1874    }
1875
1876    /**
1877     * @param value {@link #title} (A short, descriptive, user-friendly title for the research element definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1878     */
1879    public ResearchElementDefinition setTitleElement(StringType value) { 
1880      this.title = value;
1881      return this;
1882    }
1883
1884    /**
1885     * @return A short, descriptive, user-friendly title for the research element definition.
1886     */
1887    public String getTitle() { 
1888      return this.title == null ? null : this.title.getValue();
1889    }
1890
1891    /**
1892     * @param value A short, descriptive, user-friendly title for the research element definition.
1893     */
1894    public ResearchElementDefinition setTitle(String value) { 
1895      if (Utilities.noString(value))
1896        this.title = null;
1897      else {
1898        if (this.title == null)
1899          this.title = new StringType();
1900        this.title.setValue(value);
1901      }
1902      return this;
1903    }
1904
1905    /**
1906     * @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
1907     */
1908    public StringType getShortTitleElement() { 
1909      if (this.shortTitle == null)
1910        if (Configuration.errorOnAutoCreate())
1911          throw new Error("Attempt to auto-create ResearchElementDefinition.shortTitle");
1912        else if (Configuration.doAutoCreate())
1913          this.shortTitle = new StringType(); // bb
1914      return this.shortTitle;
1915    }
1916
1917    public boolean hasShortTitleElement() { 
1918      return this.shortTitle != null && !this.shortTitle.isEmpty();
1919    }
1920
1921    public boolean hasShortTitle() { 
1922      return this.shortTitle != null && !this.shortTitle.isEmpty();
1923    }
1924
1925    /**
1926     * @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
1927     */
1928    public ResearchElementDefinition setShortTitleElement(StringType value) { 
1929      this.shortTitle = value;
1930      return this;
1931    }
1932
1933    /**
1934     * @return The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.
1935     */
1936    public String getShortTitle() { 
1937      return this.shortTitle == null ? null : this.shortTitle.getValue();
1938    }
1939
1940    /**
1941     * @param value The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.
1942     */
1943    public ResearchElementDefinition setShortTitle(String value) { 
1944      if (Utilities.noString(value))
1945        this.shortTitle = null;
1946      else {
1947        if (this.shortTitle == null)
1948          this.shortTitle = new StringType();
1949        this.shortTitle.setValue(value);
1950      }
1951      return this;
1952    }
1953
1954    /**
1955     * @return {@link #subtitle} (An explanatory or alternate title for the ResearchElementDefinition 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
1956     */
1957    public StringType getSubtitleElement() { 
1958      if (this.subtitle == null)
1959        if (Configuration.errorOnAutoCreate())
1960          throw new Error("Attempt to auto-create ResearchElementDefinition.subtitle");
1961        else if (Configuration.doAutoCreate())
1962          this.subtitle = new StringType(); // bb
1963      return this.subtitle;
1964    }
1965
1966    public boolean hasSubtitleElement() { 
1967      return this.subtitle != null && !this.subtitle.isEmpty();
1968    }
1969
1970    public boolean hasSubtitle() { 
1971      return this.subtitle != null && !this.subtitle.isEmpty();
1972    }
1973
1974    /**
1975     * @param value {@link #subtitle} (An explanatory or alternate title for the ResearchElementDefinition 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
1976     */
1977    public ResearchElementDefinition setSubtitleElement(StringType value) { 
1978      this.subtitle = value;
1979      return this;
1980    }
1981
1982    /**
1983     * @return An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.
1984     */
1985    public String getSubtitle() { 
1986      return this.subtitle == null ? null : this.subtitle.getValue();
1987    }
1988
1989    /**
1990     * @param value An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.
1991     */
1992    public ResearchElementDefinition setSubtitle(String value) { 
1993      if (Utilities.noString(value))
1994        this.subtitle = null;
1995      else {
1996        if (this.subtitle == null)
1997          this.subtitle = new StringType();
1998        this.subtitle.setValue(value);
1999      }
2000      return this;
2001    }
2002
2003    /**
2004     * @return {@link #status} (The status of this research element definition. 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
2005     */
2006    public Enumeration<PublicationStatus> getStatusElement() { 
2007      if (this.status == null)
2008        if (Configuration.errorOnAutoCreate())
2009          throw new Error("Attempt to auto-create ResearchElementDefinition.status");
2010        else if (Configuration.doAutoCreate())
2011          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
2012      return this.status;
2013    }
2014
2015    public boolean hasStatusElement() { 
2016      return this.status != null && !this.status.isEmpty();
2017    }
2018
2019    public boolean hasStatus() { 
2020      return this.status != null && !this.status.isEmpty();
2021    }
2022
2023    /**
2024     * @param value {@link #status} (The status of this research element definition. 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
2025     */
2026    public ResearchElementDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
2027      this.status = value;
2028      return this;
2029    }
2030
2031    /**
2032     * @return The status of this research element definition. Enables tracking the life-cycle of the content.
2033     */
2034    public PublicationStatus getStatus() { 
2035      return this.status == null ? null : this.status.getValue();
2036    }
2037
2038    /**
2039     * @param value The status of this research element definition. Enables tracking the life-cycle of the content.
2040     */
2041    public ResearchElementDefinition setStatus(PublicationStatus value) { 
2042        if (this.status == null)
2043          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
2044        this.status.setValue(value);
2045      return this;
2046    }
2047
2048    /**
2049     * @return {@link #experimental} (A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
2050     */
2051    public BooleanType getExperimentalElement() { 
2052      if (this.experimental == null)
2053        if (Configuration.errorOnAutoCreate())
2054          throw new Error("Attempt to auto-create ResearchElementDefinition.experimental");
2055        else if (Configuration.doAutoCreate())
2056          this.experimental = new BooleanType(); // bb
2057      return this.experimental;
2058    }
2059
2060    public boolean hasExperimentalElement() { 
2061      return this.experimental != null && !this.experimental.isEmpty();
2062    }
2063
2064    public boolean hasExperimental() { 
2065      return this.experimental != null && !this.experimental.isEmpty();
2066    }
2067
2068    /**
2069     * @param value {@link #experimental} (A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
2070     */
2071    public ResearchElementDefinition setExperimentalElement(BooleanType value) { 
2072      this.experimental = value;
2073      return this;
2074    }
2075
2076    /**
2077     * @return A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
2078     */
2079    public boolean getExperimental() { 
2080      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2081    }
2082
2083    /**
2084     * @param value A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
2085     */
2086    public ResearchElementDefinition setExperimental(boolean value) { 
2087        if (this.experimental == null)
2088          this.experimental = new BooleanType();
2089        this.experimental.setValue(value);
2090      return this;
2091    }
2092
2093    /**
2094     * @return {@link #subject} (The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.)
2095     */
2096    public Type getSubject() { 
2097      return this.subject;
2098    }
2099
2100    /**
2101     * @return {@link #subject} (The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.)
2102     */
2103    public CodeableConcept getSubjectCodeableConcept() throws FHIRException { 
2104      if (this.subject == null)
2105        this.subject = new CodeableConcept();
2106      if (!(this.subject instanceof CodeableConcept))
2107        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.subject.getClass().getName()+" was encountered");
2108      return (CodeableConcept) this.subject;
2109    }
2110
2111    public boolean hasSubjectCodeableConcept() { 
2112      return this != null && this.subject instanceof CodeableConcept;
2113    }
2114
2115    /**
2116     * @return {@link #subject} (The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.)
2117     */
2118    public Reference getSubjectReference() throws FHIRException { 
2119      if (this.subject == null)
2120        this.subject = new Reference();
2121      if (!(this.subject instanceof Reference))
2122        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.subject.getClass().getName()+" was encountered");
2123      return (Reference) this.subject;
2124    }
2125
2126    public boolean hasSubjectReference() { 
2127      return this != null && this.subject instanceof Reference;
2128    }
2129
2130    public boolean hasSubject() { 
2131      return this.subject != null && !this.subject.isEmpty();
2132    }
2133
2134    /**
2135     * @param value {@link #subject} (The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.)
2136     */
2137    public ResearchElementDefinition setSubject(Type value) { 
2138      if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
2139        throw new Error("Not the right type for ResearchElementDefinition.subject[x]: "+value.fhirType());
2140      this.subject = value;
2141      return this;
2142    }
2143
2144    /**
2145     * @return {@link #date} (The date  (and optionally time) when the research element definition 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 research element definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2146     */
2147    public DateTimeType getDateElement() { 
2148      if (this.date == null)
2149        if (Configuration.errorOnAutoCreate())
2150          throw new Error("Attempt to auto-create ResearchElementDefinition.date");
2151        else if (Configuration.doAutoCreate())
2152          this.date = new DateTimeType(); // bb
2153      return this.date;
2154    }
2155
2156    public boolean hasDateElement() { 
2157      return this.date != null && !this.date.isEmpty();
2158    }
2159
2160    public boolean hasDate() { 
2161      return this.date != null && !this.date.isEmpty();
2162    }
2163
2164    /**
2165     * @param value {@link #date} (The date  (and optionally time) when the research element definition 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 research element definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2166     */
2167    public ResearchElementDefinition setDateElement(DateTimeType value) { 
2168      this.date = value;
2169      return this;
2170    }
2171
2172    /**
2173     * @return The date  (and optionally time) when the research element definition 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 research element definition changes.
2174     */
2175    public Date getDate() { 
2176      return this.date == null ? null : this.date.getValue();
2177    }
2178
2179    /**
2180     * @param value The date  (and optionally time) when the research element definition 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 research element definition changes.
2181     */
2182    public ResearchElementDefinition setDate(Date value) { 
2183      if (value == null)
2184        this.date = null;
2185      else {
2186        if (this.date == null)
2187          this.date = new DateTimeType();
2188        this.date.setValue(value);
2189      }
2190      return this;
2191    }
2192
2193    /**
2194     * @return {@link #publisher} (The name of the organization or individual that published the research element definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2195     */
2196    public StringType getPublisherElement() { 
2197      if (this.publisher == null)
2198        if (Configuration.errorOnAutoCreate())
2199          throw new Error("Attempt to auto-create ResearchElementDefinition.publisher");
2200        else if (Configuration.doAutoCreate())
2201          this.publisher = new StringType(); // bb
2202      return this.publisher;
2203    }
2204
2205    public boolean hasPublisherElement() { 
2206      return this.publisher != null && !this.publisher.isEmpty();
2207    }
2208
2209    public boolean hasPublisher() { 
2210      return this.publisher != null && !this.publisher.isEmpty();
2211    }
2212
2213    /**
2214     * @param value {@link #publisher} (The name of the organization or individual that published the research element definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2215     */
2216    public ResearchElementDefinition setPublisherElement(StringType value) { 
2217      this.publisher = value;
2218      return this;
2219    }
2220
2221    /**
2222     * @return The name of the organization or individual that published the research element definition.
2223     */
2224    public String getPublisher() { 
2225      return this.publisher == null ? null : this.publisher.getValue();
2226    }
2227
2228    /**
2229     * @param value The name of the organization or individual that published the research element definition.
2230     */
2231    public ResearchElementDefinition setPublisher(String value) { 
2232      if (Utilities.noString(value))
2233        this.publisher = null;
2234      else {
2235        if (this.publisher == null)
2236          this.publisher = new StringType();
2237        this.publisher.setValue(value);
2238      }
2239      return this;
2240    }
2241
2242    /**
2243     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2244     */
2245    public List<ContactDetail> getContact() { 
2246      if (this.contact == null)
2247        this.contact = new ArrayList<ContactDetail>();
2248      return this.contact;
2249    }
2250
2251    /**
2252     * @return Returns a reference to <code>this</code> for easy method chaining
2253     */
2254    public ResearchElementDefinition setContact(List<ContactDetail> theContact) { 
2255      this.contact = theContact;
2256      return this;
2257    }
2258
2259    public boolean hasContact() { 
2260      if (this.contact == null)
2261        return false;
2262      for (ContactDetail item : this.contact)
2263        if (!item.isEmpty())
2264          return true;
2265      return false;
2266    }
2267
2268    public ContactDetail addContact() { //3
2269      ContactDetail t = new ContactDetail();
2270      if (this.contact == null)
2271        this.contact = new ArrayList<ContactDetail>();
2272      this.contact.add(t);
2273      return t;
2274    }
2275
2276    public ResearchElementDefinition addContact(ContactDetail t) { //3
2277      if (t == null)
2278        return this;
2279      if (this.contact == null)
2280        this.contact = new ArrayList<ContactDetail>();
2281      this.contact.add(t);
2282      return this;
2283    }
2284
2285    /**
2286     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
2287     */
2288    public ContactDetail getContactFirstRep() { 
2289      if (getContact().isEmpty()) {
2290        addContact();
2291      }
2292      return getContact().get(0);
2293    }
2294
2295    /**
2296     * @return {@link #description} (A free text natural language description of the research element definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2297     */
2298    public MarkdownType getDescriptionElement() { 
2299      if (this.description == null)
2300        if (Configuration.errorOnAutoCreate())
2301          throw new Error("Attempt to auto-create ResearchElementDefinition.description");
2302        else if (Configuration.doAutoCreate())
2303          this.description = new MarkdownType(); // bb
2304      return this.description;
2305    }
2306
2307    public boolean hasDescriptionElement() { 
2308      return this.description != null && !this.description.isEmpty();
2309    }
2310
2311    public boolean hasDescription() { 
2312      return this.description != null && !this.description.isEmpty();
2313    }
2314
2315    /**
2316     * @param value {@link #description} (A free text natural language description of the research element definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2317     */
2318    public ResearchElementDefinition setDescriptionElement(MarkdownType value) { 
2319      this.description = value;
2320      return this;
2321    }
2322
2323    /**
2324     * @return A free text natural language description of the research element definition from a consumer's perspective.
2325     */
2326    public String getDescription() { 
2327      return this.description == null ? null : this.description.getValue();
2328    }
2329
2330    /**
2331     * @param value A free text natural language description of the research element definition from a consumer's perspective.
2332     */
2333    public ResearchElementDefinition setDescription(String value) { 
2334      if (value == null)
2335        this.description = null;
2336      else {
2337        if (this.description == null)
2338          this.description = new MarkdownType();
2339        this.description.setValue(value);
2340      }
2341      return this;
2342    }
2343
2344    /**
2345     * @return {@link #comment} (A human-readable string to clarify or explain concepts about the resource.)
2346     */
2347    public List<StringType> getComment() { 
2348      if (this.comment == null)
2349        this.comment = new ArrayList<StringType>();
2350      return this.comment;
2351    }
2352
2353    /**
2354     * @return Returns a reference to <code>this</code> for easy method chaining
2355     */
2356    public ResearchElementDefinition setComment(List<StringType> theComment) { 
2357      this.comment = theComment;
2358      return this;
2359    }
2360
2361    public boolean hasComment() { 
2362      if (this.comment == null)
2363        return false;
2364      for (StringType item : this.comment)
2365        if (!item.isEmpty())
2366          return true;
2367      return false;
2368    }
2369
2370    /**
2371     * @return {@link #comment} (A human-readable string to clarify or explain concepts about the resource.)
2372     */
2373    public StringType addCommentElement() {//2 
2374      StringType t = new StringType();
2375      if (this.comment == null)
2376        this.comment = new ArrayList<StringType>();
2377      this.comment.add(t);
2378      return t;
2379    }
2380
2381    /**
2382     * @param value {@link #comment} (A human-readable string to clarify or explain concepts about the resource.)
2383     */
2384    public ResearchElementDefinition addComment(String value) { //1
2385      StringType t = new StringType();
2386      t.setValue(value);
2387      if (this.comment == null)
2388        this.comment = new ArrayList<StringType>();
2389      this.comment.add(t);
2390      return this;
2391    }
2392
2393    /**
2394     * @param value {@link #comment} (A human-readable string to clarify or explain concepts about the resource.)
2395     */
2396    public boolean hasComment(String value) { 
2397      if (this.comment == null)
2398        return false;
2399      for (StringType v : this.comment)
2400        if (v.getValue().equals(value)) // string
2401          return true;
2402      return false;
2403    }
2404
2405    /**
2406     * @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 research element definition instances.)
2407     */
2408    public List<UsageContext> getUseContext() { 
2409      if (this.useContext == null)
2410        this.useContext = new ArrayList<UsageContext>();
2411      return this.useContext;
2412    }
2413
2414    /**
2415     * @return Returns a reference to <code>this</code> for easy method chaining
2416     */
2417    public ResearchElementDefinition setUseContext(List<UsageContext> theUseContext) { 
2418      this.useContext = theUseContext;
2419      return this;
2420    }
2421
2422    public boolean hasUseContext() { 
2423      if (this.useContext == null)
2424        return false;
2425      for (UsageContext item : this.useContext)
2426        if (!item.isEmpty())
2427          return true;
2428      return false;
2429    }
2430
2431    public UsageContext addUseContext() { //3
2432      UsageContext t = new UsageContext();
2433      if (this.useContext == null)
2434        this.useContext = new ArrayList<UsageContext>();
2435      this.useContext.add(t);
2436      return t;
2437    }
2438
2439    public ResearchElementDefinition addUseContext(UsageContext t) { //3
2440      if (t == null)
2441        return this;
2442      if (this.useContext == null)
2443        this.useContext = new ArrayList<UsageContext>();
2444      this.useContext.add(t);
2445      return this;
2446    }
2447
2448    /**
2449     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
2450     */
2451    public UsageContext getUseContextFirstRep() { 
2452      if (getUseContext().isEmpty()) {
2453        addUseContext();
2454      }
2455      return getUseContext().get(0);
2456    }
2457
2458    /**
2459     * @return {@link #jurisdiction} (A legal or geographic region in which the research element definition is intended to be used.)
2460     */
2461    public List<CodeableConcept> getJurisdiction() { 
2462      if (this.jurisdiction == null)
2463        this.jurisdiction = new ArrayList<CodeableConcept>();
2464      return this.jurisdiction;
2465    }
2466
2467    /**
2468     * @return Returns a reference to <code>this</code> for easy method chaining
2469     */
2470    public ResearchElementDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
2471      this.jurisdiction = theJurisdiction;
2472      return this;
2473    }
2474
2475    public boolean hasJurisdiction() { 
2476      if (this.jurisdiction == null)
2477        return false;
2478      for (CodeableConcept item : this.jurisdiction)
2479        if (!item.isEmpty())
2480          return true;
2481      return false;
2482    }
2483
2484    public CodeableConcept addJurisdiction() { //3
2485      CodeableConcept t = new CodeableConcept();
2486      if (this.jurisdiction == null)
2487        this.jurisdiction = new ArrayList<CodeableConcept>();
2488      this.jurisdiction.add(t);
2489      return t;
2490    }
2491
2492    public ResearchElementDefinition addJurisdiction(CodeableConcept t) { //3
2493      if (t == null)
2494        return this;
2495      if (this.jurisdiction == null)
2496        this.jurisdiction = new ArrayList<CodeableConcept>();
2497      this.jurisdiction.add(t);
2498      return this;
2499    }
2500
2501    /**
2502     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
2503     */
2504    public CodeableConcept getJurisdictionFirstRep() { 
2505      if (getJurisdiction().isEmpty()) {
2506        addJurisdiction();
2507      }
2508      return getJurisdiction().get(0);
2509    }
2510
2511    /**
2512     * @return {@link #purpose} (Explanation of why this research element definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2513     */
2514    public MarkdownType getPurposeElement() { 
2515      if (this.purpose == null)
2516        if (Configuration.errorOnAutoCreate())
2517          throw new Error("Attempt to auto-create ResearchElementDefinition.purpose");
2518        else if (Configuration.doAutoCreate())
2519          this.purpose = new MarkdownType(); // bb
2520      return this.purpose;
2521    }
2522
2523    public boolean hasPurposeElement() { 
2524      return this.purpose != null && !this.purpose.isEmpty();
2525    }
2526
2527    public boolean hasPurpose() { 
2528      return this.purpose != null && !this.purpose.isEmpty();
2529    }
2530
2531    /**
2532     * @param value {@link #purpose} (Explanation of why this research element definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2533     */
2534    public ResearchElementDefinition setPurposeElement(MarkdownType value) { 
2535      this.purpose = value;
2536      return this;
2537    }
2538
2539    /**
2540     * @return Explanation of why this research element definition is needed and why it has been designed as it has.
2541     */
2542    public String getPurpose() { 
2543      return this.purpose == null ? null : this.purpose.getValue();
2544    }
2545
2546    /**
2547     * @param value Explanation of why this research element definition is needed and why it has been designed as it has.
2548     */
2549    public ResearchElementDefinition setPurpose(String value) { 
2550      if (value == null)
2551        this.purpose = null;
2552      else {
2553        if (this.purpose == null)
2554          this.purpose = new MarkdownType();
2555        this.purpose.setValue(value);
2556      }
2557      return this;
2558    }
2559
2560    /**
2561     * @return {@link #usage} (A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
2562     */
2563    public StringType getUsageElement() { 
2564      if (this.usage == null)
2565        if (Configuration.errorOnAutoCreate())
2566          throw new Error("Attempt to auto-create ResearchElementDefinition.usage");
2567        else if (Configuration.doAutoCreate())
2568          this.usage = new StringType(); // bb
2569      return this.usage;
2570    }
2571
2572    public boolean hasUsageElement() { 
2573      return this.usage != null && !this.usage.isEmpty();
2574    }
2575
2576    public boolean hasUsage() { 
2577      return this.usage != null && !this.usage.isEmpty();
2578    }
2579
2580    /**
2581     * @param value {@link #usage} (A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
2582     */
2583    public ResearchElementDefinition setUsageElement(StringType value) { 
2584      this.usage = value;
2585      return this;
2586    }
2587
2588    /**
2589     * @return A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.
2590     */
2591    public String getUsage() { 
2592      return this.usage == null ? null : this.usage.getValue();
2593    }
2594
2595    /**
2596     * @param value A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.
2597     */
2598    public ResearchElementDefinition setUsage(String value) { 
2599      if (Utilities.noString(value))
2600        this.usage = null;
2601      else {
2602        if (this.usage == null)
2603          this.usage = new StringType();
2604        this.usage.setValue(value);
2605      }
2606      return this;
2607    }
2608
2609    /**
2610     * @return {@link #copyright} (A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2611     */
2612    public MarkdownType getCopyrightElement() { 
2613      if (this.copyright == null)
2614        if (Configuration.errorOnAutoCreate())
2615          throw new Error("Attempt to auto-create ResearchElementDefinition.copyright");
2616        else if (Configuration.doAutoCreate())
2617          this.copyright = new MarkdownType(); // bb
2618      return this.copyright;
2619    }
2620
2621    public boolean hasCopyrightElement() { 
2622      return this.copyright != null && !this.copyright.isEmpty();
2623    }
2624
2625    public boolean hasCopyright() { 
2626      return this.copyright != null && !this.copyright.isEmpty();
2627    }
2628
2629    /**
2630     * @param value {@link #copyright} (A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2631     */
2632    public ResearchElementDefinition setCopyrightElement(MarkdownType value) { 
2633      this.copyright = value;
2634      return this;
2635    }
2636
2637    /**
2638     * @return A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.
2639     */
2640    public String getCopyright() { 
2641      return this.copyright == null ? null : this.copyright.getValue();
2642    }
2643
2644    /**
2645     * @param value A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.
2646     */
2647    public ResearchElementDefinition setCopyright(String value) { 
2648      if (value == null)
2649        this.copyright = null;
2650      else {
2651        if (this.copyright == null)
2652          this.copyright = new MarkdownType();
2653        this.copyright.setValue(value);
2654      }
2655      return this;
2656    }
2657
2658    /**
2659     * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
2660     */
2661    public DateType getApprovalDateElement() { 
2662      if (this.approvalDate == null)
2663        if (Configuration.errorOnAutoCreate())
2664          throw new Error("Attempt to auto-create ResearchElementDefinition.approvalDate");
2665        else if (Configuration.doAutoCreate())
2666          this.approvalDate = new DateType(); // bb
2667      return this.approvalDate;
2668    }
2669
2670    public boolean hasApprovalDateElement() { 
2671      return this.approvalDate != null && !this.approvalDate.isEmpty();
2672    }
2673
2674    public boolean hasApprovalDate() { 
2675      return this.approvalDate != null && !this.approvalDate.isEmpty();
2676    }
2677
2678    /**
2679     * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
2680     */
2681    public ResearchElementDefinition setApprovalDateElement(DateType value) { 
2682      this.approvalDate = value;
2683      return this;
2684    }
2685
2686    /**
2687     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2688     */
2689    public Date getApprovalDate() { 
2690      return this.approvalDate == null ? null : this.approvalDate.getValue();
2691    }
2692
2693    /**
2694     * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2695     */
2696    public ResearchElementDefinition setApprovalDate(Date value) { 
2697      if (value == null)
2698        this.approvalDate = null;
2699      else {
2700        if (this.approvalDate == null)
2701          this.approvalDate = new DateType();
2702        this.approvalDate.setValue(value);
2703      }
2704      return this;
2705    }
2706
2707    /**
2708     * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
2709     */
2710    public DateType getLastReviewDateElement() { 
2711      if (this.lastReviewDate == null)
2712        if (Configuration.errorOnAutoCreate())
2713          throw new Error("Attempt to auto-create ResearchElementDefinition.lastReviewDate");
2714        else if (Configuration.doAutoCreate())
2715          this.lastReviewDate = new DateType(); // bb
2716      return this.lastReviewDate;
2717    }
2718
2719    public boolean hasLastReviewDateElement() { 
2720      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2721    }
2722
2723    public boolean hasLastReviewDate() { 
2724      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2725    }
2726
2727    /**
2728     * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
2729     */
2730    public ResearchElementDefinition setLastReviewDateElement(DateType value) { 
2731      this.lastReviewDate = value;
2732      return this;
2733    }
2734
2735    /**
2736     * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
2737     */
2738    public Date getLastReviewDate() { 
2739      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
2740    }
2741
2742    /**
2743     * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
2744     */
2745    public ResearchElementDefinition setLastReviewDate(Date value) { 
2746      if (value == null)
2747        this.lastReviewDate = null;
2748      else {
2749        if (this.lastReviewDate == null)
2750          this.lastReviewDate = new DateType();
2751        this.lastReviewDate.setValue(value);
2752      }
2753      return this;
2754    }
2755
2756    /**
2757     * @return {@link #effectivePeriod} (The period during which the research element definition content was or is planned to be in active use.)
2758     */
2759    public Period getEffectivePeriod() { 
2760      if (this.effectivePeriod == null)
2761        if (Configuration.errorOnAutoCreate())
2762          throw new Error("Attempt to auto-create ResearchElementDefinition.effectivePeriod");
2763        else if (Configuration.doAutoCreate())
2764          this.effectivePeriod = new Period(); // cc
2765      return this.effectivePeriod;
2766    }
2767
2768    public boolean hasEffectivePeriod() { 
2769      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
2770    }
2771
2772    /**
2773     * @param value {@link #effectivePeriod} (The period during which the research element definition content was or is planned to be in active use.)
2774     */
2775    public ResearchElementDefinition setEffectivePeriod(Period value) { 
2776      this.effectivePeriod = value;
2777      return this;
2778    }
2779
2780    /**
2781     * @return {@link #topic} (Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching.)
2782     */
2783    public List<CodeableConcept> getTopic() { 
2784      if (this.topic == null)
2785        this.topic = new ArrayList<CodeableConcept>();
2786      return this.topic;
2787    }
2788
2789    /**
2790     * @return Returns a reference to <code>this</code> for easy method chaining
2791     */
2792    public ResearchElementDefinition setTopic(List<CodeableConcept> theTopic) { 
2793      this.topic = theTopic;
2794      return this;
2795    }
2796
2797    public boolean hasTopic() { 
2798      if (this.topic == null)
2799        return false;
2800      for (CodeableConcept item : this.topic)
2801        if (!item.isEmpty())
2802          return true;
2803      return false;
2804    }
2805
2806    public CodeableConcept addTopic() { //3
2807      CodeableConcept t = new CodeableConcept();
2808      if (this.topic == null)
2809        this.topic = new ArrayList<CodeableConcept>();
2810      this.topic.add(t);
2811      return t;
2812    }
2813
2814    public ResearchElementDefinition addTopic(CodeableConcept t) { //3
2815      if (t == null)
2816        return this;
2817      if (this.topic == null)
2818        this.topic = new ArrayList<CodeableConcept>();
2819      this.topic.add(t);
2820      return this;
2821    }
2822
2823    /**
2824     * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist
2825     */
2826    public CodeableConcept getTopicFirstRep() { 
2827      if (getTopic().isEmpty()) {
2828        addTopic();
2829      }
2830      return getTopic().get(0);
2831    }
2832
2833    /**
2834     * @return {@link #author} (An individiual or organization primarily involved in the creation and maintenance of the content.)
2835     */
2836    public List<ContactDetail> getAuthor() { 
2837      if (this.author == null)
2838        this.author = new ArrayList<ContactDetail>();
2839      return this.author;
2840    }
2841
2842    /**
2843     * @return Returns a reference to <code>this</code> for easy method chaining
2844     */
2845    public ResearchElementDefinition setAuthor(List<ContactDetail> theAuthor) { 
2846      this.author = theAuthor;
2847      return this;
2848    }
2849
2850    public boolean hasAuthor() { 
2851      if (this.author == null)
2852        return false;
2853      for (ContactDetail item : this.author)
2854        if (!item.isEmpty())
2855          return true;
2856      return false;
2857    }
2858
2859    public ContactDetail addAuthor() { //3
2860      ContactDetail t = new ContactDetail();
2861      if (this.author == null)
2862        this.author = new ArrayList<ContactDetail>();
2863      this.author.add(t);
2864      return t;
2865    }
2866
2867    public ResearchElementDefinition addAuthor(ContactDetail t) { //3
2868      if (t == null)
2869        return this;
2870      if (this.author == null)
2871        this.author = new ArrayList<ContactDetail>();
2872      this.author.add(t);
2873      return this;
2874    }
2875
2876    /**
2877     * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist
2878     */
2879    public ContactDetail getAuthorFirstRep() { 
2880      if (getAuthor().isEmpty()) {
2881        addAuthor();
2882      }
2883      return getAuthor().get(0);
2884    }
2885
2886    /**
2887     * @return {@link #editor} (An individual or organization primarily responsible for internal coherence of the content.)
2888     */
2889    public List<ContactDetail> getEditor() { 
2890      if (this.editor == null)
2891        this.editor = new ArrayList<ContactDetail>();
2892      return this.editor;
2893    }
2894
2895    /**
2896     * @return Returns a reference to <code>this</code> for easy method chaining
2897     */
2898    public ResearchElementDefinition setEditor(List<ContactDetail> theEditor) { 
2899      this.editor = theEditor;
2900      return this;
2901    }
2902
2903    public boolean hasEditor() { 
2904      if (this.editor == null)
2905        return false;
2906      for (ContactDetail item : this.editor)
2907        if (!item.isEmpty())
2908          return true;
2909      return false;
2910    }
2911
2912    public ContactDetail addEditor() { //3
2913      ContactDetail t = new ContactDetail();
2914      if (this.editor == null)
2915        this.editor = new ArrayList<ContactDetail>();
2916      this.editor.add(t);
2917      return t;
2918    }
2919
2920    public ResearchElementDefinition addEditor(ContactDetail t) { //3
2921      if (t == null)
2922        return this;
2923      if (this.editor == null)
2924        this.editor = new ArrayList<ContactDetail>();
2925      this.editor.add(t);
2926      return this;
2927    }
2928
2929    /**
2930     * @return The first repetition of repeating field {@link #editor}, creating it if it does not already exist
2931     */
2932    public ContactDetail getEditorFirstRep() { 
2933      if (getEditor().isEmpty()) {
2934        addEditor();
2935      }
2936      return getEditor().get(0);
2937    }
2938
2939    /**
2940     * @return {@link #reviewer} (An individual or organization primarily responsible for review of some aspect of the content.)
2941     */
2942    public List<ContactDetail> getReviewer() { 
2943      if (this.reviewer == null)
2944        this.reviewer = new ArrayList<ContactDetail>();
2945      return this.reviewer;
2946    }
2947
2948    /**
2949     * @return Returns a reference to <code>this</code> for easy method chaining
2950     */
2951    public ResearchElementDefinition setReviewer(List<ContactDetail> theReviewer) { 
2952      this.reviewer = theReviewer;
2953      return this;
2954    }
2955
2956    public boolean hasReviewer() { 
2957      if (this.reviewer == null)
2958        return false;
2959      for (ContactDetail item : this.reviewer)
2960        if (!item.isEmpty())
2961          return true;
2962      return false;
2963    }
2964
2965    public ContactDetail addReviewer() { //3
2966      ContactDetail t = new ContactDetail();
2967      if (this.reviewer == null)
2968        this.reviewer = new ArrayList<ContactDetail>();
2969      this.reviewer.add(t);
2970      return t;
2971    }
2972
2973    public ResearchElementDefinition addReviewer(ContactDetail t) { //3
2974      if (t == null)
2975        return this;
2976      if (this.reviewer == null)
2977        this.reviewer = new ArrayList<ContactDetail>();
2978      this.reviewer.add(t);
2979      return this;
2980    }
2981
2982    /**
2983     * @return The first repetition of repeating field {@link #reviewer}, creating it if it does not already exist
2984     */
2985    public ContactDetail getReviewerFirstRep() { 
2986      if (getReviewer().isEmpty()) {
2987        addReviewer();
2988      }
2989      return getReviewer().get(0);
2990    }
2991
2992    /**
2993     * @return {@link #endorser} (An individual or organization responsible for officially endorsing the content for use in some setting.)
2994     */
2995    public List<ContactDetail> getEndorser() { 
2996      if (this.endorser == null)
2997        this.endorser = new ArrayList<ContactDetail>();
2998      return this.endorser;
2999    }
3000
3001    /**
3002     * @return Returns a reference to <code>this</code> for easy method chaining
3003     */
3004    public ResearchElementDefinition setEndorser(List<ContactDetail> theEndorser) { 
3005      this.endorser = theEndorser;
3006      return this;
3007    }
3008
3009    public boolean hasEndorser() { 
3010      if (this.endorser == null)
3011        return false;
3012      for (ContactDetail item : this.endorser)
3013        if (!item.isEmpty())
3014          return true;
3015      return false;
3016    }
3017
3018    public ContactDetail addEndorser() { //3
3019      ContactDetail t = new ContactDetail();
3020      if (this.endorser == null)
3021        this.endorser = new ArrayList<ContactDetail>();
3022      this.endorser.add(t);
3023      return t;
3024    }
3025
3026    public ResearchElementDefinition addEndorser(ContactDetail t) { //3
3027      if (t == null)
3028        return this;
3029      if (this.endorser == null)
3030        this.endorser = new ArrayList<ContactDetail>();
3031      this.endorser.add(t);
3032      return this;
3033    }
3034
3035    /**
3036     * @return The first repetition of repeating field {@link #endorser}, creating it if it does not already exist
3037     */
3038    public ContactDetail getEndorserFirstRep() { 
3039      if (getEndorser().isEmpty()) {
3040        addEndorser();
3041      }
3042      return getEndorser().get(0);
3043    }
3044
3045    /**
3046     * @return {@link #relatedArtifact} (Related artifacts such as additional documentation, justification, or bibliographic references.)
3047     */
3048    public List<RelatedArtifact> getRelatedArtifact() { 
3049      if (this.relatedArtifact == null)
3050        this.relatedArtifact = new ArrayList<RelatedArtifact>();
3051      return this.relatedArtifact;
3052    }
3053
3054    /**
3055     * @return Returns a reference to <code>this</code> for easy method chaining
3056     */
3057    public ResearchElementDefinition setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
3058      this.relatedArtifact = theRelatedArtifact;
3059      return this;
3060    }
3061
3062    public boolean hasRelatedArtifact() { 
3063      if (this.relatedArtifact == null)
3064        return false;
3065      for (RelatedArtifact item : this.relatedArtifact)
3066        if (!item.isEmpty())
3067          return true;
3068      return false;
3069    }
3070
3071    public RelatedArtifact addRelatedArtifact() { //3
3072      RelatedArtifact t = new RelatedArtifact();
3073      if (this.relatedArtifact == null)
3074        this.relatedArtifact = new ArrayList<RelatedArtifact>();
3075      this.relatedArtifact.add(t);
3076      return t;
3077    }
3078
3079    public ResearchElementDefinition addRelatedArtifact(RelatedArtifact t) { //3
3080      if (t == null)
3081        return this;
3082      if (this.relatedArtifact == null)
3083        this.relatedArtifact = new ArrayList<RelatedArtifact>();
3084      this.relatedArtifact.add(t);
3085      return this;
3086    }
3087
3088    /**
3089     * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist
3090     */
3091    public RelatedArtifact getRelatedArtifactFirstRep() { 
3092      if (getRelatedArtifact().isEmpty()) {
3093        addRelatedArtifact();
3094      }
3095      return getRelatedArtifact().get(0);
3096    }
3097
3098    /**
3099     * @return {@link #library} (A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.)
3100     */
3101    public List<CanonicalType> getLibrary() { 
3102      if (this.library == null)
3103        this.library = new ArrayList<CanonicalType>();
3104      return this.library;
3105    }
3106
3107    /**
3108     * @return Returns a reference to <code>this</code> for easy method chaining
3109     */
3110    public ResearchElementDefinition setLibrary(List<CanonicalType> theLibrary) { 
3111      this.library = theLibrary;
3112      return this;
3113    }
3114
3115    public boolean hasLibrary() { 
3116      if (this.library == null)
3117        return false;
3118      for (CanonicalType item : this.library)
3119        if (!item.isEmpty())
3120          return true;
3121      return false;
3122    }
3123
3124    /**
3125     * @return {@link #library} (A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.)
3126     */
3127    public CanonicalType addLibraryElement() {//2 
3128      CanonicalType t = new CanonicalType();
3129      if (this.library == null)
3130        this.library = new ArrayList<CanonicalType>();
3131      this.library.add(t);
3132      return t;
3133    }
3134
3135    /**
3136     * @param value {@link #library} (A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.)
3137     */
3138    public ResearchElementDefinition addLibrary(String value) { //1
3139      CanonicalType t = new CanonicalType();
3140      t.setValue(value);
3141      if (this.library == null)
3142        this.library = new ArrayList<CanonicalType>();
3143      this.library.add(t);
3144      return this;
3145    }
3146
3147    /**
3148     * @param value {@link #library} (A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.)
3149     */
3150    public boolean hasLibrary(String value) { 
3151      if (this.library == null)
3152        return false;
3153      for (CanonicalType v : this.library)
3154        if (v.getValue().equals(value)) // canonical(Library)
3155          return true;
3156      return false;
3157    }
3158
3159    /**
3160     * @return {@link #type} (The type of research element, a population, an exposure, or an outcome.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
3161     */
3162    public Enumeration<ResearchElementType> getTypeElement() { 
3163      if (this.type == null)
3164        if (Configuration.errorOnAutoCreate())
3165          throw new Error("Attempt to auto-create ResearchElementDefinition.type");
3166        else if (Configuration.doAutoCreate())
3167          this.type = new Enumeration<ResearchElementType>(new ResearchElementTypeEnumFactory()); // bb
3168      return this.type;
3169    }
3170
3171    public boolean hasTypeElement() { 
3172      return this.type != null && !this.type.isEmpty();
3173    }
3174
3175    public boolean hasType() { 
3176      return this.type != null && !this.type.isEmpty();
3177    }
3178
3179    /**
3180     * @param value {@link #type} (The type of research element, a population, an exposure, or an outcome.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
3181     */
3182    public ResearchElementDefinition setTypeElement(Enumeration<ResearchElementType> value) { 
3183      this.type = value;
3184      return this;
3185    }
3186
3187    /**
3188     * @return The type of research element, a population, an exposure, or an outcome.
3189     */
3190    public ResearchElementType getType() { 
3191      return this.type == null ? null : this.type.getValue();
3192    }
3193
3194    /**
3195     * @param value The type of research element, a population, an exposure, or an outcome.
3196     */
3197    public ResearchElementDefinition setType(ResearchElementType value) { 
3198        if (this.type == null)
3199          this.type = new Enumeration<ResearchElementType>(new ResearchElementTypeEnumFactory());
3200        this.type.setValue(value);
3201      return this;
3202    }
3203
3204    /**
3205     * @return {@link #variableType} (The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).). This is the underlying object with id, value and extensions. The accessor "getVariableType" gives direct access to the value
3206     */
3207    public Enumeration<VariableType> getVariableTypeElement() { 
3208      if (this.variableType == null)
3209        if (Configuration.errorOnAutoCreate())
3210          throw new Error("Attempt to auto-create ResearchElementDefinition.variableType");
3211        else if (Configuration.doAutoCreate())
3212          this.variableType = new Enumeration<VariableType>(new VariableTypeEnumFactory()); // bb
3213      return this.variableType;
3214    }
3215
3216    public boolean hasVariableTypeElement() { 
3217      return this.variableType != null && !this.variableType.isEmpty();
3218    }
3219
3220    public boolean hasVariableType() { 
3221      return this.variableType != null && !this.variableType.isEmpty();
3222    }
3223
3224    /**
3225     * @param value {@link #variableType} (The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).). This is the underlying object with id, value and extensions. The accessor "getVariableType" gives direct access to the value
3226     */
3227    public ResearchElementDefinition setVariableTypeElement(Enumeration<VariableType> value) { 
3228      this.variableType = value;
3229      return this;
3230    }
3231
3232    /**
3233     * @return The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).
3234     */
3235    public VariableType getVariableType() { 
3236      return this.variableType == null ? null : this.variableType.getValue();
3237    }
3238
3239    /**
3240     * @param value The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).
3241     */
3242    public ResearchElementDefinition setVariableType(VariableType value) { 
3243      if (value == null)
3244        this.variableType = null;
3245      else {
3246        if (this.variableType == null)
3247          this.variableType = new Enumeration<VariableType>(new VariableTypeEnumFactory());
3248        this.variableType.setValue(value);
3249      }
3250      return this;
3251    }
3252
3253    /**
3254     * @return {@link #characteristic} (A characteristic that defines the members of the research element. Multiple characteristics are applied with "and" semantics.)
3255     */
3256    public List<ResearchElementDefinitionCharacteristicComponent> getCharacteristic() { 
3257      if (this.characteristic == null)
3258        this.characteristic = new ArrayList<ResearchElementDefinitionCharacteristicComponent>();
3259      return this.characteristic;
3260    }
3261
3262    /**
3263     * @return Returns a reference to <code>this</code> for easy method chaining
3264     */
3265    public ResearchElementDefinition setCharacteristic(List<ResearchElementDefinitionCharacteristicComponent> theCharacteristic) { 
3266      this.characteristic = theCharacteristic;
3267      return this;
3268    }
3269
3270    public boolean hasCharacteristic() { 
3271      if (this.characteristic == null)
3272        return false;
3273      for (ResearchElementDefinitionCharacteristicComponent item : this.characteristic)
3274        if (!item.isEmpty())
3275          return true;
3276      return false;
3277    }
3278
3279    public ResearchElementDefinitionCharacteristicComponent addCharacteristic() { //3
3280      ResearchElementDefinitionCharacteristicComponent t = new ResearchElementDefinitionCharacteristicComponent();
3281      if (this.characteristic == null)
3282        this.characteristic = new ArrayList<ResearchElementDefinitionCharacteristicComponent>();
3283      this.characteristic.add(t);
3284      return t;
3285    }
3286
3287    public ResearchElementDefinition addCharacteristic(ResearchElementDefinitionCharacteristicComponent t) { //3
3288      if (t == null)
3289        return this;
3290      if (this.characteristic == null)
3291        this.characteristic = new ArrayList<ResearchElementDefinitionCharacteristicComponent>();
3292      this.characteristic.add(t);
3293      return this;
3294    }
3295
3296    /**
3297     * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist
3298     */
3299    public ResearchElementDefinitionCharacteristicComponent getCharacteristicFirstRep() { 
3300      if (getCharacteristic().isEmpty()) {
3301        addCharacteristic();
3302      }
3303      return getCharacteristic().get(0);
3304    }
3305
3306      protected void listChildren(List<Property> children) {
3307        super.listChildren(children);
3308        children.add(new Property("url", "uri", "An absolute URI that is used to identify this research element definition 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 research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.", 0, 1, url));
3309        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
3310        children.add(new Property("version", "string", "The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition 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));
3311        children.add(new Property("name", "string", "A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
3312        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the research element definition.", 0, 1, title));
3313        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));
3314        children.add(new Property("subtitle", "string", "An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.", 0, 1, subtitle));
3315        children.add(new Property("status", "code", "The status of this research element definition. Enables tracking the life-cycle of the content.", 0, 1, status));
3316        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
3317        children.add(new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.", 0, 1, subject));
3318        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the research element definition 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 research element definition changes.", 0, 1, date));
3319        children.add(new Property("publisher", "string", "The name of the organization or individual that published the research element definition.", 0, 1, publisher));
3320        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));
3321        children.add(new Property("description", "markdown", "A free text natural language description of the research element definition from a consumer's perspective.", 0, 1, description));
3322        children.add(new Property("comment", "string", "A human-readable string to clarify or explain concepts about the resource.", 0, java.lang.Integer.MAX_VALUE, comment));
3323        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 research element definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
3324        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the research element definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
3325        children.add(new Property("purpose", "markdown", "Explanation of why this research element definition is needed and why it has been designed as it has.", 0, 1, purpose));
3326        children.add(new Property("usage", "string", "A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.", 0, 1, usage));
3327        children.add(new Property("copyright", "markdown", "A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.", 0, 1, copyright));
3328        children.add(new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate));
3329        children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate));
3330        children.add(new Property("effectivePeriod", "Period", "The period during which the research element definition content was or is planned to be in active use.", 0, 1, effectivePeriod));
3331        children.add(new Property("topic", "CodeableConcept", "Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching.", 0, java.lang.Integer.MAX_VALUE, topic));
3332        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));
3333        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));
3334        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));
3335        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));
3336        children.add(new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact));
3337        children.add(new Property("library", "canonical(Library)", "A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.", 0, java.lang.Integer.MAX_VALUE, library));
3338        children.add(new Property("type", "code", "The type of research element, a population, an exposure, or an outcome.", 0, 1, type));
3339        children.add(new Property("variableType", "code", "The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).", 0, 1, variableType));
3340        children.add(new Property("characteristic", "", "A characteristic that defines the members of the research element. Multiple characteristics are applied with \"and\" semantics.", 0, java.lang.Integer.MAX_VALUE, characteristic));
3341      }
3342
3343      @Override
3344      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3345        switch (_hash) {
3346        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this research element definition 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 research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.", 0, 1, url);
3347        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
3348        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition 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);
3349        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
3350        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the research element definition.", 0, 1, title);
3351        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);
3352        case -2060497896: /*subtitle*/  return new Property("subtitle", "string", "An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.", 0, 1, subtitle);
3353        case -892481550: /*status*/  return new Property("status", "code", "The status of this research element definition. Enables tracking the life-cycle of the content.", 0, 1, status);
3354        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
3355        case -573640748: /*subject[x]*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.", 0, 1, subject);
3356        case -1867885268: /*subject*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.", 0, 1, subject);
3357        case -1257122603: /*subjectCodeableConcept*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.", 0, 1, subject);
3358        case 772938623: /*subjectReference*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.", 0, 1, subject);
3359        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the research element definition 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 research element definition changes.", 0, 1, date);
3360        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the research element definition.", 0, 1, publisher);
3361        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);
3362        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the research element definition from a consumer's perspective.", 0, 1, description);
3363        case 950398559: /*comment*/  return new Property("comment", "string", "A human-readable string to clarify or explain concepts about the resource.", 0, java.lang.Integer.MAX_VALUE, comment);
3364        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 research element definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
3365        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the research element definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
3366        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this research element definition is needed and why it has been designed as it has.", 0, 1, purpose);
3367        case 111574433: /*usage*/  return new Property("usage", "string", "A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.", 0, 1, usage);
3368        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.", 0, 1, copyright);
3369        case 223539345: /*approvalDate*/  return new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate);
3370        case -1687512484: /*lastReviewDate*/  return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate);
3371        case -403934648: /*effectivePeriod*/  return new Property("effectivePeriod", "Period", "The period during which the research element definition content was or is planned to be in active use.", 0, 1, effectivePeriod);
3372        case 110546223: /*topic*/  return new Property("topic", "CodeableConcept", "Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching.", 0, java.lang.Integer.MAX_VALUE, topic);
3373        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);
3374        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);
3375        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);
3376        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);
3377        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);
3378        case 166208699: /*library*/  return new Property("library", "canonical(Library)", "A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.", 0, java.lang.Integer.MAX_VALUE, library);
3379        case 3575610: /*type*/  return new Property("type", "code", "The type of research element, a population, an exposure, or an outcome.", 0, 1, type);
3380        case -372820010: /*variableType*/  return new Property("variableType", "code", "The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).", 0, 1, variableType);
3381        case 366313883: /*characteristic*/  return new Property("characteristic", "", "A characteristic that defines the members of the research element. Multiple characteristics are applied with \"and\" semantics.", 0, java.lang.Integer.MAX_VALUE, characteristic);
3382        default: return super.getNamedProperty(_hash, _name, _checkValid);
3383        }
3384
3385      }
3386
3387      @Override
3388      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3389        switch (hash) {
3390        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
3391        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
3392        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
3393        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3394        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
3395        case 1555503932: /*shortTitle*/ return this.shortTitle == null ? new Base[0] : new Base[] {this.shortTitle}; // StringType
3396        case -2060497896: /*subtitle*/ return this.subtitle == null ? new Base[0] : new Base[] {this.subtitle}; // StringType
3397        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
3398        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
3399        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Type
3400        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
3401        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
3402        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
3403        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3404        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : this.comment.toArray(new Base[this.comment.size()]); // StringType
3405        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
3406        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
3407        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
3408        case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType
3409        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
3410        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
3411        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
3412        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
3413        case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept
3414        case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail
3415        case -1307827859: /*editor*/ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail
3416        case -261190139: /*reviewer*/ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail
3417        case 1740277666: /*endorser*/ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail
3418        case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
3419        case 166208699: /*library*/ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // CanonicalType
3420        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ResearchElementType>
3421        case -372820010: /*variableType*/ return this.variableType == null ? new Base[0] : new Base[] {this.variableType}; // Enumeration<VariableType>
3422        case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // ResearchElementDefinitionCharacteristicComponent
3423        default: return super.getProperty(hash, name, checkValid);
3424        }
3425
3426      }
3427
3428      @Override
3429      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3430        switch (hash) {
3431        case 116079: // url
3432          this.url = castToUri(value); // UriType
3433          return value;
3434        case -1618432855: // identifier
3435          this.getIdentifier().add(castToIdentifier(value)); // Identifier
3436          return value;
3437        case 351608024: // version
3438          this.version = castToString(value); // StringType
3439          return value;
3440        case 3373707: // name
3441          this.name = castToString(value); // StringType
3442          return value;
3443        case 110371416: // title
3444          this.title = castToString(value); // StringType
3445          return value;
3446        case 1555503932: // shortTitle
3447          this.shortTitle = castToString(value); // StringType
3448          return value;
3449        case -2060497896: // subtitle
3450          this.subtitle = castToString(value); // StringType
3451          return value;
3452        case -892481550: // status
3453          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
3454          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3455          return value;
3456        case -404562712: // experimental
3457          this.experimental = castToBoolean(value); // BooleanType
3458          return value;
3459        case -1867885268: // subject
3460          this.subject = castToType(value); // Type
3461          return value;
3462        case 3076014: // date
3463          this.date = castToDateTime(value); // DateTimeType
3464          return value;
3465        case 1447404028: // publisher
3466          this.publisher = castToString(value); // StringType
3467          return value;
3468        case 951526432: // contact
3469          this.getContact().add(castToContactDetail(value)); // ContactDetail
3470          return value;
3471        case -1724546052: // description
3472          this.description = castToMarkdown(value); // MarkdownType
3473          return value;
3474        case 950398559: // comment
3475          this.getComment().add(castToString(value)); // StringType
3476          return value;
3477        case -669707736: // useContext
3478          this.getUseContext().add(castToUsageContext(value)); // UsageContext
3479          return value;
3480        case -507075711: // jurisdiction
3481          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
3482          return value;
3483        case -220463842: // purpose
3484          this.purpose = castToMarkdown(value); // MarkdownType
3485          return value;
3486        case 111574433: // usage
3487          this.usage = castToString(value); // StringType
3488          return value;
3489        case 1522889671: // copyright
3490          this.copyright = castToMarkdown(value); // MarkdownType
3491          return value;
3492        case 223539345: // approvalDate
3493          this.approvalDate = castToDate(value); // DateType
3494          return value;
3495        case -1687512484: // lastReviewDate
3496          this.lastReviewDate = castToDate(value); // DateType
3497          return value;
3498        case -403934648: // effectivePeriod
3499          this.effectivePeriod = castToPeriod(value); // Period
3500          return value;
3501        case 110546223: // topic
3502          this.getTopic().add(castToCodeableConcept(value)); // CodeableConcept
3503          return value;
3504        case -1406328437: // author
3505          this.getAuthor().add(castToContactDetail(value)); // ContactDetail
3506          return value;
3507        case -1307827859: // editor
3508          this.getEditor().add(castToContactDetail(value)); // ContactDetail
3509          return value;
3510        case -261190139: // reviewer
3511          this.getReviewer().add(castToContactDetail(value)); // ContactDetail
3512          return value;
3513        case 1740277666: // endorser
3514          this.getEndorser().add(castToContactDetail(value)); // ContactDetail
3515          return value;
3516        case 666807069: // relatedArtifact
3517          this.getRelatedArtifact().add(castToRelatedArtifact(value)); // RelatedArtifact
3518          return value;
3519        case 166208699: // library
3520          this.getLibrary().add(castToCanonical(value)); // CanonicalType
3521          return value;
3522        case 3575610: // type
3523          value = new ResearchElementTypeEnumFactory().fromType(castToCode(value));
3524          this.type = (Enumeration) value; // Enumeration<ResearchElementType>
3525          return value;
3526        case -372820010: // variableType
3527          value = new VariableTypeEnumFactory().fromType(castToCode(value));
3528          this.variableType = (Enumeration) value; // Enumeration<VariableType>
3529          return value;
3530        case 366313883: // characteristic
3531          this.getCharacteristic().add((ResearchElementDefinitionCharacteristicComponent) value); // ResearchElementDefinitionCharacteristicComponent
3532          return value;
3533        default: return super.setProperty(hash, name, value);
3534        }
3535
3536      }
3537
3538      @Override
3539      public Base setProperty(String name, Base value) throws FHIRException {
3540        if (name.equals("url")) {
3541          this.url = castToUri(value); // UriType
3542        } else if (name.equals("identifier")) {
3543          this.getIdentifier().add(castToIdentifier(value));
3544        } else if (name.equals("version")) {
3545          this.version = castToString(value); // StringType
3546        } else if (name.equals("name")) {
3547          this.name = castToString(value); // StringType
3548        } else if (name.equals("title")) {
3549          this.title = castToString(value); // StringType
3550        } else if (name.equals("shortTitle")) {
3551          this.shortTitle = castToString(value); // StringType
3552        } else if (name.equals("subtitle")) {
3553          this.subtitle = castToString(value); // StringType
3554        } else if (name.equals("status")) {
3555          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
3556          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3557        } else if (name.equals("experimental")) {
3558          this.experimental = castToBoolean(value); // BooleanType
3559        } else if (name.equals("subject[x]")) {
3560          this.subject = castToType(value); // Type
3561        } else if (name.equals("date")) {
3562          this.date = castToDateTime(value); // DateTimeType
3563        } else if (name.equals("publisher")) {
3564          this.publisher = castToString(value); // StringType
3565        } else if (name.equals("contact")) {
3566          this.getContact().add(castToContactDetail(value));
3567        } else if (name.equals("description")) {
3568          this.description = castToMarkdown(value); // MarkdownType
3569        } else if (name.equals("comment")) {
3570          this.getComment().add(castToString(value));
3571        } else if (name.equals("useContext")) {
3572          this.getUseContext().add(castToUsageContext(value));
3573        } else if (name.equals("jurisdiction")) {
3574          this.getJurisdiction().add(castToCodeableConcept(value));
3575        } else if (name.equals("purpose")) {
3576          this.purpose = castToMarkdown(value); // MarkdownType
3577        } else if (name.equals("usage")) {
3578          this.usage = castToString(value); // StringType
3579        } else if (name.equals("copyright")) {
3580          this.copyright = castToMarkdown(value); // MarkdownType
3581        } else if (name.equals("approvalDate")) {
3582          this.approvalDate = castToDate(value); // DateType
3583        } else if (name.equals("lastReviewDate")) {
3584          this.lastReviewDate = castToDate(value); // DateType
3585        } else if (name.equals("effectivePeriod")) {
3586          this.effectivePeriod = castToPeriod(value); // Period
3587        } else if (name.equals("topic")) {
3588          this.getTopic().add(castToCodeableConcept(value));
3589        } else if (name.equals("author")) {
3590          this.getAuthor().add(castToContactDetail(value));
3591        } else if (name.equals("editor")) {
3592          this.getEditor().add(castToContactDetail(value));
3593        } else if (name.equals("reviewer")) {
3594          this.getReviewer().add(castToContactDetail(value));
3595        } else if (name.equals("endorser")) {
3596          this.getEndorser().add(castToContactDetail(value));
3597        } else if (name.equals("relatedArtifact")) {
3598          this.getRelatedArtifact().add(castToRelatedArtifact(value));
3599        } else if (name.equals("library")) {
3600          this.getLibrary().add(castToCanonical(value));
3601        } else if (name.equals("type")) {
3602          value = new ResearchElementTypeEnumFactory().fromType(castToCode(value));
3603          this.type = (Enumeration) value; // Enumeration<ResearchElementType>
3604        } else if (name.equals("variableType")) {
3605          value = new VariableTypeEnumFactory().fromType(castToCode(value));
3606          this.variableType = (Enumeration) value; // Enumeration<VariableType>
3607        } else if (name.equals("characteristic")) {
3608          this.getCharacteristic().add((ResearchElementDefinitionCharacteristicComponent) value);
3609        } else
3610          return super.setProperty(name, value);
3611        return value;
3612      }
3613
3614      @Override
3615      public Base makeProperty(int hash, String name) throws FHIRException {
3616        switch (hash) {
3617        case 116079:  return getUrlElement();
3618        case -1618432855:  return addIdentifier(); 
3619        case 351608024:  return getVersionElement();
3620        case 3373707:  return getNameElement();
3621        case 110371416:  return getTitleElement();
3622        case 1555503932:  return getShortTitleElement();
3623        case -2060497896:  return getSubtitleElement();
3624        case -892481550:  return getStatusElement();
3625        case -404562712:  return getExperimentalElement();
3626        case -573640748:  return getSubject(); 
3627        case -1867885268:  return getSubject(); 
3628        case 3076014:  return getDateElement();
3629        case 1447404028:  return getPublisherElement();
3630        case 951526432:  return addContact(); 
3631        case -1724546052:  return getDescriptionElement();
3632        case 950398559:  return addCommentElement();
3633        case -669707736:  return addUseContext(); 
3634        case -507075711:  return addJurisdiction(); 
3635        case -220463842:  return getPurposeElement();
3636        case 111574433:  return getUsageElement();
3637        case 1522889671:  return getCopyrightElement();
3638        case 223539345:  return getApprovalDateElement();
3639        case -1687512484:  return getLastReviewDateElement();
3640        case -403934648:  return getEffectivePeriod(); 
3641        case 110546223:  return addTopic(); 
3642        case -1406328437:  return addAuthor(); 
3643        case -1307827859:  return addEditor(); 
3644        case -261190139:  return addReviewer(); 
3645        case 1740277666:  return addEndorser(); 
3646        case 666807069:  return addRelatedArtifact(); 
3647        case 166208699:  return addLibraryElement();
3648        case 3575610:  return getTypeElement();
3649        case -372820010:  return getVariableTypeElement();
3650        case 366313883:  return addCharacteristic(); 
3651        default: return super.makeProperty(hash, name);
3652        }
3653
3654      }
3655
3656      @Override
3657      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3658        switch (hash) {
3659        case 116079: /*url*/ return new String[] {"uri"};
3660        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3661        case 351608024: /*version*/ return new String[] {"string"};
3662        case 3373707: /*name*/ return new String[] {"string"};
3663        case 110371416: /*title*/ return new String[] {"string"};
3664        case 1555503932: /*shortTitle*/ return new String[] {"string"};
3665        case -2060497896: /*subtitle*/ return new String[] {"string"};
3666        case -892481550: /*status*/ return new String[] {"code"};
3667        case -404562712: /*experimental*/ return new String[] {"boolean"};
3668        case -1867885268: /*subject*/ return new String[] {"CodeableConcept", "Reference"};
3669        case 3076014: /*date*/ return new String[] {"dateTime"};
3670        case 1447404028: /*publisher*/ return new String[] {"string"};
3671        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
3672        case -1724546052: /*description*/ return new String[] {"markdown"};
3673        case 950398559: /*comment*/ return new String[] {"string"};
3674        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
3675        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
3676        case -220463842: /*purpose*/ return new String[] {"markdown"};
3677        case 111574433: /*usage*/ return new String[] {"string"};
3678        case 1522889671: /*copyright*/ return new String[] {"markdown"};
3679        case 223539345: /*approvalDate*/ return new String[] {"date"};
3680        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
3681        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
3682        case 110546223: /*topic*/ return new String[] {"CodeableConcept"};
3683        case -1406328437: /*author*/ return new String[] {"ContactDetail"};
3684        case -1307827859: /*editor*/ return new String[] {"ContactDetail"};
3685        case -261190139: /*reviewer*/ return new String[] {"ContactDetail"};
3686        case 1740277666: /*endorser*/ return new String[] {"ContactDetail"};
3687        case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"};
3688        case 166208699: /*library*/ return new String[] {"canonical"};
3689        case 3575610: /*type*/ return new String[] {"code"};
3690        case -372820010: /*variableType*/ return new String[] {"code"};
3691        case 366313883: /*characteristic*/ return new String[] {};
3692        default: return super.getTypesForProperty(hash, name);
3693        }
3694
3695      }
3696
3697      @Override
3698      public Base addChild(String name) throws FHIRException {
3699        if (name.equals("url")) {
3700          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.url");
3701        }
3702        else if (name.equals("identifier")) {
3703          return addIdentifier();
3704        }
3705        else if (name.equals("version")) {
3706          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.version");
3707        }
3708        else if (name.equals("name")) {
3709          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.name");
3710        }
3711        else if (name.equals("title")) {
3712          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.title");
3713        }
3714        else if (name.equals("shortTitle")) {
3715          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.shortTitle");
3716        }
3717        else if (name.equals("subtitle")) {
3718          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.subtitle");
3719        }
3720        else if (name.equals("status")) {
3721          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.status");
3722        }
3723        else if (name.equals("experimental")) {
3724          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.experimental");
3725        }
3726        else if (name.equals("subjectCodeableConcept")) {
3727          this.subject = new CodeableConcept();
3728          return this.subject;
3729        }
3730        else if (name.equals("subjectReference")) {
3731          this.subject = new Reference();
3732          return this.subject;
3733        }
3734        else if (name.equals("date")) {
3735          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.date");
3736        }
3737        else if (name.equals("publisher")) {
3738          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.publisher");
3739        }
3740        else if (name.equals("contact")) {
3741          return addContact();
3742        }
3743        else if (name.equals("description")) {
3744          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.description");
3745        }
3746        else if (name.equals("comment")) {
3747          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.comment");
3748        }
3749        else if (name.equals("useContext")) {
3750          return addUseContext();
3751        }
3752        else if (name.equals("jurisdiction")) {
3753          return addJurisdiction();
3754        }
3755        else if (name.equals("purpose")) {
3756          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.purpose");
3757        }
3758        else if (name.equals("usage")) {
3759          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.usage");
3760        }
3761        else if (name.equals("copyright")) {
3762          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.copyright");
3763        }
3764        else if (name.equals("approvalDate")) {
3765          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.approvalDate");
3766        }
3767        else if (name.equals("lastReviewDate")) {
3768          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.lastReviewDate");
3769        }
3770        else if (name.equals("effectivePeriod")) {
3771          this.effectivePeriod = new Period();
3772          return this.effectivePeriod;
3773        }
3774        else if (name.equals("topic")) {
3775          return addTopic();
3776        }
3777        else if (name.equals("author")) {
3778          return addAuthor();
3779        }
3780        else if (name.equals("editor")) {
3781          return addEditor();
3782        }
3783        else if (name.equals("reviewer")) {
3784          return addReviewer();
3785        }
3786        else if (name.equals("endorser")) {
3787          return addEndorser();
3788        }
3789        else if (name.equals("relatedArtifact")) {
3790          return addRelatedArtifact();
3791        }
3792        else if (name.equals("library")) {
3793          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.library");
3794        }
3795        else if (name.equals("type")) {
3796          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.type");
3797        }
3798        else if (name.equals("variableType")) {
3799          throw new FHIRException("Cannot call addChild on a primitive type ResearchElementDefinition.variableType");
3800        }
3801        else if (name.equals("characteristic")) {
3802          return addCharacteristic();
3803        }
3804        else
3805          return super.addChild(name);
3806      }
3807
3808  public String fhirType() {
3809    return "ResearchElementDefinition";
3810
3811  }
3812
3813      public ResearchElementDefinition copy() {
3814        ResearchElementDefinition dst = new ResearchElementDefinition();
3815        copyValues(dst);
3816        return dst;
3817      }
3818
3819      public void copyValues(ResearchElementDefinition dst) {
3820        super.copyValues(dst);
3821        dst.url = url == null ? null : url.copy();
3822        if (identifier != null) {
3823          dst.identifier = new ArrayList<Identifier>();
3824          for (Identifier i : identifier)
3825            dst.identifier.add(i.copy());
3826        };
3827        dst.version = version == null ? null : version.copy();
3828        dst.name = name == null ? null : name.copy();
3829        dst.title = title == null ? null : title.copy();
3830        dst.shortTitle = shortTitle == null ? null : shortTitle.copy();
3831        dst.subtitle = subtitle == null ? null : subtitle.copy();
3832        dst.status = status == null ? null : status.copy();
3833        dst.experimental = experimental == null ? null : experimental.copy();
3834        dst.subject = subject == null ? null : subject.copy();
3835        dst.date = date == null ? null : date.copy();
3836        dst.publisher = publisher == null ? null : publisher.copy();
3837        if (contact != null) {
3838          dst.contact = new ArrayList<ContactDetail>();
3839          for (ContactDetail i : contact)
3840            dst.contact.add(i.copy());
3841        };
3842        dst.description = description == null ? null : description.copy();
3843        if (comment != null) {
3844          dst.comment = new ArrayList<StringType>();
3845          for (StringType i : comment)
3846            dst.comment.add(i.copy());
3847        };
3848        if (useContext != null) {
3849          dst.useContext = new ArrayList<UsageContext>();
3850          for (UsageContext i : useContext)
3851            dst.useContext.add(i.copy());
3852        };
3853        if (jurisdiction != null) {
3854          dst.jurisdiction = new ArrayList<CodeableConcept>();
3855          for (CodeableConcept i : jurisdiction)
3856            dst.jurisdiction.add(i.copy());
3857        };
3858        dst.purpose = purpose == null ? null : purpose.copy();
3859        dst.usage = usage == null ? null : usage.copy();
3860        dst.copyright = copyright == null ? null : copyright.copy();
3861        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
3862        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
3863        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
3864        if (topic != null) {
3865          dst.topic = new ArrayList<CodeableConcept>();
3866          for (CodeableConcept i : topic)
3867            dst.topic.add(i.copy());
3868        };
3869        if (author != null) {
3870          dst.author = new ArrayList<ContactDetail>();
3871          for (ContactDetail i : author)
3872            dst.author.add(i.copy());
3873        };
3874        if (editor != null) {
3875          dst.editor = new ArrayList<ContactDetail>();
3876          for (ContactDetail i : editor)
3877            dst.editor.add(i.copy());
3878        };
3879        if (reviewer != null) {
3880          dst.reviewer = new ArrayList<ContactDetail>();
3881          for (ContactDetail i : reviewer)
3882            dst.reviewer.add(i.copy());
3883        };
3884        if (endorser != null) {
3885          dst.endorser = new ArrayList<ContactDetail>();
3886          for (ContactDetail i : endorser)
3887            dst.endorser.add(i.copy());
3888        };
3889        if (relatedArtifact != null) {
3890          dst.relatedArtifact = new ArrayList<RelatedArtifact>();
3891          for (RelatedArtifact i : relatedArtifact)
3892            dst.relatedArtifact.add(i.copy());
3893        };
3894        if (library != null) {
3895          dst.library = new ArrayList<CanonicalType>();
3896          for (CanonicalType i : library)
3897            dst.library.add(i.copy());
3898        };
3899        dst.type = type == null ? null : type.copy();
3900        dst.variableType = variableType == null ? null : variableType.copy();
3901        if (characteristic != null) {
3902          dst.characteristic = new ArrayList<ResearchElementDefinitionCharacteristicComponent>();
3903          for (ResearchElementDefinitionCharacteristicComponent i : characteristic)
3904            dst.characteristic.add(i.copy());
3905        };
3906      }
3907
3908      protected ResearchElementDefinition typedCopy() {
3909        return copy();
3910      }
3911
3912      @Override
3913      public boolean equalsDeep(Base other_) {
3914        if (!super.equalsDeep(other_))
3915          return false;
3916        if (!(other_ instanceof ResearchElementDefinition))
3917          return false;
3918        ResearchElementDefinition o = (ResearchElementDefinition) other_;
3919        return compareDeep(identifier, o.identifier, true) && compareDeep(shortTitle, o.shortTitle, true)
3920           && compareDeep(subtitle, o.subtitle, true) && compareDeep(subject, o.subject, true) && compareDeep(comment, o.comment, true)
3921           && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true) && compareDeep(copyright, o.copyright, true)
3922           && compareDeep(approvalDate, o.approvalDate, true) && compareDeep(lastReviewDate, o.lastReviewDate, true)
3923           && compareDeep(effectivePeriod, o.effectivePeriod, true) && compareDeep(topic, o.topic, true) && compareDeep(author, o.author, true)
3924           && compareDeep(editor, o.editor, true) && compareDeep(reviewer, o.reviewer, true) && compareDeep(endorser, o.endorser, true)
3925           && compareDeep(relatedArtifact, o.relatedArtifact, true) && compareDeep(library, o.library, true)
3926           && compareDeep(type, o.type, true) && compareDeep(variableType, o.variableType, true) && compareDeep(characteristic, o.characteristic, true)
3927          ;
3928      }
3929
3930      @Override
3931      public boolean equalsShallow(Base other_) {
3932        if (!super.equalsShallow(other_))
3933          return false;
3934        if (!(other_ instanceof ResearchElementDefinition))
3935          return false;
3936        ResearchElementDefinition o = (ResearchElementDefinition) other_;
3937        return compareValues(shortTitle, o.shortTitle, true) && compareValues(subtitle, o.subtitle, true) && compareValues(comment, o.comment, true)
3938           && compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true) && compareValues(copyright, o.copyright, true)
3939           && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true)
3940           && compareValues(type, o.type, true) && compareValues(variableType, o.variableType, true);
3941      }
3942
3943      public boolean isEmpty() {
3944        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, shortTitle, subtitle
3945          , subject, comment, purpose, usage, copyright, approvalDate, lastReviewDate, effectivePeriod
3946          , topic, author, editor, reviewer, endorser, relatedArtifact, library, type
3947          , variableType, characteristic);
3948      }
3949
3950  @Override
3951  public ResourceType getResourceType() {
3952    return ResourceType.ResearchElementDefinition;
3953   }
3954
3955 /**
3956   * Search parameter: <b>date</b>
3957   * <p>
3958   * Description: <b>The research element definition publication date</b><br>
3959   * Type: <b>date</b><br>
3960   * Path: <b>ResearchElementDefinition.date</b><br>
3961   * </p>
3962   */
3963  @SearchParamDefinition(name="date", path="ResearchElementDefinition.date", description="The research element definition publication date", type="date" )
3964  public static final String SP_DATE = "date";
3965 /**
3966   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3967   * <p>
3968   * Description: <b>The research element definition publication date</b><br>
3969   * Type: <b>date</b><br>
3970   * Path: <b>ResearchElementDefinition.date</b><br>
3971   * </p>
3972   */
3973  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3974
3975 /**
3976   * Search parameter: <b>identifier</b>
3977   * <p>
3978   * Description: <b>External identifier for the research element definition</b><br>
3979   * Type: <b>token</b><br>
3980   * Path: <b>ResearchElementDefinition.identifier</b><br>
3981   * </p>
3982   */
3983  @SearchParamDefinition(name="identifier", path="ResearchElementDefinition.identifier", description="External identifier for the research element definition", type="token" )
3984  public static final String SP_IDENTIFIER = "identifier";
3985 /**
3986   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3987   * <p>
3988   * Description: <b>External identifier for the research element definition</b><br>
3989   * Type: <b>token</b><br>
3990   * Path: <b>ResearchElementDefinition.identifier</b><br>
3991   * </p>
3992   */
3993  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3994
3995 /**
3996   * Search parameter: <b>successor</b>
3997   * <p>
3998   * Description: <b>What resource is being referenced</b><br>
3999   * Type: <b>reference</b><br>
4000   * Path: <b>ResearchElementDefinition.relatedArtifact.resource</b><br>
4001   * </p>
4002   */
4003  @SearchParamDefinition(name="successor", path="ResearchElementDefinition.relatedArtifact.where(type='successor').resource", description="What resource is being referenced", type="reference" )
4004  public static final String SP_SUCCESSOR = "successor";
4005 /**
4006   * <b>Fluent Client</b> search parameter constant for <b>successor</b>
4007   * <p>
4008   * Description: <b>What resource is being referenced</b><br>
4009   * Type: <b>reference</b><br>
4010   * Path: <b>ResearchElementDefinition.relatedArtifact.resource</b><br>
4011   * </p>
4012   */
4013  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUCCESSOR);
4014
4015/**
4016   * Constant for fluent queries to be used to add include statements. Specifies
4017   * the path value of "<b>ResearchElementDefinition:successor</b>".
4018   */
4019  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include("ResearchElementDefinition:successor").toLocked();
4020
4021 /**
4022   * Search parameter: <b>context-type-value</b>
4023   * <p>
4024   * Description: <b>A use context type and value assigned to the research element definition</b><br>
4025   * Type: <b>composite</b><br>
4026   * Path: <b></b><br>
4027   * </p>
4028   */
4029  @SearchParamDefinition(name="context-type-value", path="ResearchElementDefinition.useContext", description="A use context type and value assigned to the research element definition", type="composite", compositeOf={"context-type", "context"} )
4030  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
4031 /**
4032   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
4033   * <p>
4034   * Description: <b>A use context type and value assigned to the research element definition</b><br>
4035   * Type: <b>composite</b><br>
4036   * Path: <b></b><br>
4037   * </p>
4038   */
4039  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);
4040
4041 /**
4042   * Search parameter: <b>jurisdiction</b>
4043   * <p>
4044   * Description: <b>Intended jurisdiction for the research element definition</b><br>
4045   * Type: <b>token</b><br>
4046   * Path: <b>ResearchElementDefinition.jurisdiction</b><br>
4047   * </p>
4048   */
4049  @SearchParamDefinition(name="jurisdiction", path="ResearchElementDefinition.jurisdiction", description="Intended jurisdiction for the research element definition", type="token" )
4050  public static final String SP_JURISDICTION = "jurisdiction";
4051 /**
4052   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
4053   * <p>
4054   * Description: <b>Intended jurisdiction for the research element definition</b><br>
4055   * Type: <b>token</b><br>
4056   * Path: <b>ResearchElementDefinition.jurisdiction</b><br>
4057   * </p>
4058   */
4059  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
4060
4061 /**
4062   * Search parameter: <b>description</b>
4063   * <p>
4064   * Description: <b>The description of the research element definition</b><br>
4065   * Type: <b>string</b><br>
4066   * Path: <b>ResearchElementDefinition.description</b><br>
4067   * </p>
4068   */
4069  @SearchParamDefinition(name="description", path="ResearchElementDefinition.description", description="The description of the research element definition", type="string" )
4070  public static final String SP_DESCRIPTION = "description";
4071 /**
4072   * <b>Fluent Client</b> search parameter constant for <b>description</b>
4073   * <p>
4074   * Description: <b>The description of the research element definition</b><br>
4075   * Type: <b>string</b><br>
4076   * Path: <b>ResearchElementDefinition.description</b><br>
4077   * </p>
4078   */
4079  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
4080
4081 /**
4082   * Search parameter: <b>derived-from</b>
4083   * <p>
4084   * Description: <b>What resource is being referenced</b><br>
4085   * Type: <b>reference</b><br>
4086   * Path: <b>ResearchElementDefinition.relatedArtifact.resource</b><br>
4087   * </p>
4088   */
4089  @SearchParamDefinition(name="derived-from", path="ResearchElementDefinition.relatedArtifact.where(type='derived-from').resource", description="What resource is being referenced", type="reference" )
4090  public static final String SP_DERIVED_FROM = "derived-from";
4091 /**
4092   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
4093   * <p>
4094   * Description: <b>What resource is being referenced</b><br>
4095   * Type: <b>reference</b><br>
4096   * Path: <b>ResearchElementDefinition.relatedArtifact.resource</b><br>
4097   * </p>
4098   */
4099  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM);
4100
4101/**
4102   * Constant for fluent queries to be used to add include statements. Specifies
4103   * the path value of "<b>ResearchElementDefinition:derived-from</b>".
4104   */
4105  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("ResearchElementDefinition:derived-from").toLocked();
4106
4107 /**
4108   * Search parameter: <b>context-type</b>
4109   * <p>
4110   * Description: <b>A type of use context assigned to the research element definition</b><br>
4111   * Type: <b>token</b><br>
4112   * Path: <b>ResearchElementDefinition.useContext.code</b><br>
4113   * </p>
4114   */
4115  @SearchParamDefinition(name="context-type", path="ResearchElementDefinition.useContext.code", description="A type of use context assigned to the research element definition", type="token" )
4116  public static final String SP_CONTEXT_TYPE = "context-type";
4117 /**
4118   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
4119   * <p>
4120   * Description: <b>A type of use context assigned to the research element definition</b><br>
4121   * Type: <b>token</b><br>
4122   * Path: <b>ResearchElementDefinition.useContext.code</b><br>
4123   * </p>
4124   */
4125  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
4126
4127 /**
4128   * Search parameter: <b>predecessor</b>
4129   * <p>
4130   * Description: <b>What resource is being referenced</b><br>
4131   * Type: <b>reference</b><br>
4132   * Path: <b>ResearchElementDefinition.relatedArtifact.resource</b><br>
4133   * </p>
4134   */
4135  @SearchParamDefinition(name="predecessor", path="ResearchElementDefinition.relatedArtifact.where(type='predecessor').resource", description="What resource is being referenced", type="reference" )
4136  public static final String SP_PREDECESSOR = "predecessor";
4137 /**
4138   * <b>Fluent Client</b> search parameter constant for <b>predecessor</b>
4139   * <p>
4140   * Description: <b>What resource is being referenced</b><br>
4141   * Type: <b>reference</b><br>
4142   * Path: <b>ResearchElementDefinition.relatedArtifact.resource</b><br>
4143   * </p>
4144   */
4145  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREDECESSOR);
4146
4147/**
4148   * Constant for fluent queries to be used to add include statements. Specifies
4149   * the path value of "<b>ResearchElementDefinition:predecessor</b>".
4150   */
4151  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include("ResearchElementDefinition:predecessor").toLocked();
4152
4153 /**
4154   * Search parameter: <b>title</b>
4155   * <p>
4156   * Description: <b>The human-friendly name of the research element definition</b><br>
4157   * Type: <b>string</b><br>
4158   * Path: <b>ResearchElementDefinition.title</b><br>
4159   * </p>
4160   */
4161  @SearchParamDefinition(name="title", path="ResearchElementDefinition.title", description="The human-friendly name of the research element definition", type="string" )
4162  public static final String SP_TITLE = "title";
4163 /**
4164   * <b>Fluent Client</b> search parameter constant for <b>title</b>
4165   * <p>
4166   * Description: <b>The human-friendly name of the research element definition</b><br>
4167   * Type: <b>string</b><br>
4168   * Path: <b>ResearchElementDefinition.title</b><br>
4169   * </p>
4170   */
4171  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
4172
4173 /**
4174   * Search parameter: <b>composed-of</b>
4175   * <p>
4176   * Description: <b>What resource is being referenced</b><br>
4177   * Type: <b>reference</b><br>
4178   * Path: <b>ResearchElementDefinition.relatedArtifact.resource</b><br>
4179   * </p>
4180   */
4181  @SearchParamDefinition(name="composed-of", path="ResearchElementDefinition.relatedArtifact.where(type='composed-of').resource", description="What resource is being referenced", type="reference" )
4182  public static final String SP_COMPOSED_OF = "composed-of";
4183 /**
4184   * <b>Fluent Client</b> search parameter constant for <b>composed-of</b>
4185   * <p>
4186   * Description: <b>What resource is being referenced</b><br>
4187   * Type: <b>reference</b><br>
4188   * Path: <b>ResearchElementDefinition.relatedArtifact.resource</b><br>
4189   * </p>
4190   */
4191  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSED_OF);
4192
4193/**
4194   * Constant for fluent queries to be used to add include statements. Specifies
4195   * the path value of "<b>ResearchElementDefinition:composed-of</b>".
4196   */
4197  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include("ResearchElementDefinition:composed-of").toLocked();
4198
4199 /**
4200   * Search parameter: <b>version</b>
4201   * <p>
4202   * Description: <b>The business version of the research element definition</b><br>
4203   * Type: <b>token</b><br>
4204   * Path: <b>ResearchElementDefinition.version</b><br>
4205   * </p>
4206   */
4207  @SearchParamDefinition(name="version", path="ResearchElementDefinition.version", description="The business version of the research element definition", type="token" )
4208  public static final String SP_VERSION = "version";
4209 /**
4210   * <b>Fluent Client</b> search parameter constant for <b>version</b>
4211   * <p>
4212   * Description: <b>The business version of the research element definition</b><br>
4213   * Type: <b>token</b><br>
4214   * Path: <b>ResearchElementDefinition.version</b><br>
4215   * </p>
4216   */
4217  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
4218
4219 /**
4220   * Search parameter: <b>url</b>
4221   * <p>
4222   * Description: <b>The uri that identifies the research element definition</b><br>
4223   * Type: <b>uri</b><br>
4224   * Path: <b>ResearchElementDefinition.url</b><br>
4225   * </p>
4226   */
4227  @SearchParamDefinition(name="url", path="ResearchElementDefinition.url", description="The uri that identifies the research element definition", type="uri" )
4228  public static final String SP_URL = "url";
4229 /**
4230   * <b>Fluent Client</b> search parameter constant for <b>url</b>
4231   * <p>
4232   * Description: <b>The uri that identifies the research element definition</b><br>
4233   * Type: <b>uri</b><br>
4234   * Path: <b>ResearchElementDefinition.url</b><br>
4235   * </p>
4236   */
4237  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
4238
4239 /**
4240   * Search parameter: <b>context-quantity</b>
4241   * <p>
4242   * Description: <b>A quantity- or range-valued use context assigned to the research element definition</b><br>
4243   * Type: <b>quantity</b><br>
4244   * Path: <b>ResearchElementDefinition.useContext.valueQuantity, ResearchElementDefinition.useContext.valueRange</b><br>
4245   * </p>
4246   */
4247  @SearchParamDefinition(name="context-quantity", path="(ResearchElementDefinition.useContext.value as Quantity) | (ResearchElementDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the research element definition", type="quantity" )
4248  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
4249 /**
4250   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
4251   * <p>
4252   * Description: <b>A quantity- or range-valued use context assigned to the research element definition</b><br>
4253   * Type: <b>quantity</b><br>
4254   * Path: <b>ResearchElementDefinition.useContext.valueQuantity, ResearchElementDefinition.useContext.valueRange</b><br>
4255   * </p>
4256   */
4257  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
4258
4259 /**
4260   * Search parameter: <b>effective</b>
4261   * <p>
4262   * Description: <b>The time during which the research element definition is intended to be in use</b><br>
4263   * Type: <b>date</b><br>
4264   * Path: <b>ResearchElementDefinition.effectivePeriod</b><br>
4265   * </p>
4266   */
4267  @SearchParamDefinition(name="effective", path="ResearchElementDefinition.effectivePeriod", description="The time during which the research element definition is intended to be in use", type="date" )
4268  public static final String SP_EFFECTIVE = "effective";
4269 /**
4270   * <b>Fluent Client</b> search parameter constant for <b>effective</b>
4271   * <p>
4272   * Description: <b>The time during which the research element definition is intended to be in use</b><br>
4273   * Type: <b>date</b><br>
4274   * Path: <b>ResearchElementDefinition.effectivePeriod</b><br>
4275   * </p>
4276   */
4277  public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE);
4278
4279 /**
4280   * Search parameter: <b>depends-on</b>
4281   * <p>
4282   * Description: <b>What resource is being referenced</b><br>
4283   * Type: <b>reference</b><br>
4284   * Path: <b>ResearchElementDefinition.relatedArtifact.resource, ResearchElementDefinition.library</b><br>
4285   * </p>
4286   */
4287  @SearchParamDefinition(name="depends-on", path="ResearchElementDefinition.relatedArtifact.where(type='depends-on').resource | ResearchElementDefinition.library", description="What resource is being referenced", type="reference" )
4288  public static final String SP_DEPENDS_ON = "depends-on";
4289 /**
4290   * <b>Fluent Client</b> search parameter constant for <b>depends-on</b>
4291   * <p>
4292   * Description: <b>What resource is being referenced</b><br>
4293   * Type: <b>reference</b><br>
4294   * Path: <b>ResearchElementDefinition.relatedArtifact.resource, ResearchElementDefinition.library</b><br>
4295   * </p>
4296   */
4297  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON);
4298
4299/**
4300   * Constant for fluent queries to be used to add include statements. Specifies
4301   * the path value of "<b>ResearchElementDefinition:depends-on</b>".
4302   */
4303  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("ResearchElementDefinition:depends-on").toLocked();
4304
4305 /**
4306   * Search parameter: <b>name</b>
4307   * <p>
4308   * Description: <b>Computationally friendly name of the research element definition</b><br>
4309   * Type: <b>string</b><br>
4310   * Path: <b>ResearchElementDefinition.name</b><br>
4311   * </p>
4312   */
4313  @SearchParamDefinition(name="name", path="ResearchElementDefinition.name", description="Computationally friendly name of the research element definition", type="string" )
4314  public static final String SP_NAME = "name";
4315 /**
4316   * <b>Fluent Client</b> search parameter constant for <b>name</b>
4317   * <p>
4318   * Description: <b>Computationally friendly name of the research element definition</b><br>
4319   * Type: <b>string</b><br>
4320   * Path: <b>ResearchElementDefinition.name</b><br>
4321   * </p>
4322   */
4323  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
4324
4325 /**
4326   * Search parameter: <b>context</b>
4327   * <p>
4328   * Description: <b>A use context assigned to the research element definition</b><br>
4329   * Type: <b>token</b><br>
4330   * Path: <b>ResearchElementDefinition.useContext.valueCodeableConcept</b><br>
4331   * </p>
4332   */
4333  @SearchParamDefinition(name="context", path="(ResearchElementDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the research element definition", type="token" )
4334  public static final String SP_CONTEXT = "context";
4335 /**
4336   * <b>Fluent Client</b> search parameter constant for <b>context</b>
4337   * <p>
4338   * Description: <b>A use context assigned to the research element definition</b><br>
4339   * Type: <b>token</b><br>
4340   * Path: <b>ResearchElementDefinition.useContext.valueCodeableConcept</b><br>
4341   * </p>
4342   */
4343  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
4344
4345 /**
4346   * Search parameter: <b>publisher</b>
4347   * <p>
4348   * Description: <b>Name of the publisher of the research element definition</b><br>
4349   * Type: <b>string</b><br>
4350   * Path: <b>ResearchElementDefinition.publisher</b><br>
4351   * </p>
4352   */
4353  @SearchParamDefinition(name="publisher", path="ResearchElementDefinition.publisher", description="Name of the publisher of the research element definition", type="string" )
4354  public static final String SP_PUBLISHER = "publisher";
4355 /**
4356   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
4357   * <p>
4358   * Description: <b>Name of the publisher of the research element definition</b><br>
4359   * Type: <b>string</b><br>
4360   * Path: <b>ResearchElementDefinition.publisher</b><br>
4361   * </p>
4362   */
4363  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
4364
4365 /**
4366   * Search parameter: <b>topic</b>
4367   * <p>
4368   * Description: <b>Topics associated with the ResearchElementDefinition</b><br>
4369   * Type: <b>token</b><br>
4370   * Path: <b>ResearchElementDefinition.topic</b><br>
4371   * </p>
4372   */
4373  @SearchParamDefinition(name="topic", path="ResearchElementDefinition.topic", description="Topics associated with the ResearchElementDefinition", type="token" )
4374  public static final String SP_TOPIC = "topic";
4375 /**
4376   * <b>Fluent Client</b> search parameter constant for <b>topic</b>
4377   * <p>
4378   * Description: <b>Topics associated with the ResearchElementDefinition</b><br>
4379   * Type: <b>token</b><br>
4380   * Path: <b>ResearchElementDefinition.topic</b><br>
4381   * </p>
4382   */
4383  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC);
4384
4385 /**
4386   * Search parameter: <b>context-type-quantity</b>
4387   * <p>
4388   * Description: <b>A use context type and quantity- or range-based value assigned to the research element definition</b><br>
4389   * Type: <b>composite</b><br>
4390   * Path: <b></b><br>
4391   * </p>
4392   */
4393  @SearchParamDefinition(name="context-type-quantity", path="ResearchElementDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the research element definition", type="composite", compositeOf={"context-type", "context-quantity"} )
4394  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
4395 /**
4396   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
4397   * <p>
4398   * Description: <b>A use context type and quantity- or range-based value assigned to the research element definition</b><br>
4399   * Type: <b>composite</b><br>
4400   * Path: <b></b><br>
4401   * </p>
4402   */
4403  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);
4404
4405 /**
4406   * Search parameter: <b>status</b>
4407   * <p>
4408   * Description: <b>The current status of the research element definition</b><br>
4409   * Type: <b>token</b><br>
4410   * Path: <b>ResearchElementDefinition.status</b><br>
4411   * </p>
4412   */
4413  @SearchParamDefinition(name="status", path="ResearchElementDefinition.status", description="The current status of the research element definition", type="token" )
4414  public static final String SP_STATUS = "status";
4415 /**
4416   * <b>Fluent Client</b> search parameter constant for <b>status</b>
4417   * <p>
4418   * Description: <b>The current status of the research element definition</b><br>
4419   * Type: <b>token</b><br>
4420   * Path: <b>ResearchElementDefinition.status</b><br>
4421   * </p>
4422   */
4423  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
4424
4425
4426}