001package org.hl7.fhir.r4b.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r4b.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.
052 */
053@ResourceDef(name="ResearchDefinition", profile="http://hl7.org/fhir/StructureDefinition/ResearchDefinition")
054public class ResearchDefinition extends DomainResource {
055
056    /**
057     * An absolute URI that is used to identify this research 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 definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.
058     */
059    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
060    @Description(shortDefinition="Canonical identifier for this research definition, represented as a URI (globally unique)", formalDefinition="An absolute URI that is used to identify this research 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 definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers." )
061    protected UriType url;
062
063    /**
064     * A formal identifier that is used to identify this research definition when it is represented in other formats, or referenced in a specification, model, design or an instance.
065     */
066    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
067    @Description(shortDefinition="Additional identifier for the research definition", formalDefinition="A formal identifier that is used to identify this research definition when it is represented in other formats, or referenced in a specification, model, design or an instance." )
068    protected List<Identifier> identifier;
069
070    /**
071     * The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research 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.
072     */
073    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
074    @Description(shortDefinition="Business version of the research definition", formalDefinition="The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research 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." )
075    protected StringType version;
076
077    /**
078     * A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
079     */
080    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
081    @Description(shortDefinition="Name for this research definition (computer friendly)", formalDefinition="A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." )
082    protected StringType name;
083
084    /**
085     * A short, descriptive, user-friendly title for the research definition.
086     */
087    @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
088    @Description(shortDefinition="Name for this research definition (human friendly)", formalDefinition="A short, descriptive, user-friendly title for the research definition." )
089    protected StringType title;
090
091    /**
092     * The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.
093     */
094    @Child(name = "shortTitle", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
095    @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." )
096    protected StringType shortTitle;
097
098    /**
099     * An explanatory or alternate title for the ResearchDefinition giving additional information about its content.
100     */
101    @Child(name = "subtitle", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
102    @Description(shortDefinition="Subordinate title of the ResearchDefinition", formalDefinition="An explanatory or alternate title for the ResearchDefinition giving additional information about its content." )
103    protected StringType subtitle;
104
105    /**
106     * The status of this research definition. Enables tracking the life-cycle of the content.
107     */
108    @Child(name = "status", type = {CodeType.class}, order=7, min=1, max=1, modifier=true, summary=true)
109    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this research definition. Enables tracking the life-cycle of the content." )
110    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
111    protected Enumeration<PublicationStatus> status;
112
113    /**
114     * A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
115     */
116    @Child(name = "experimental", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=true)
117    @Description(shortDefinition="For testing purposes, not real usage", formalDefinition="A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." )
118    protected BooleanType experimental;
119
120    /**
121     * The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.
122     */
123    @Child(name = "subject", type = {CodeableConcept.class, Group.class}, order=9, min=0, max=1, modifier=false, summary=false)
124    @Description(shortDefinition="E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device", formalDefinition="The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything." )
125    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subject-type")
126    protected DataType subject;
127
128    /**
129     * The date  (and optionally time) when the research 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 definition changes.
130     */
131    @Child(name = "date", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true)
132    @Description(shortDefinition="Date last changed", formalDefinition="The date  (and optionally time) when the research 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 definition changes." )
133    protected DateTimeType date;
134
135    /**
136     * The name of the organization or individual that published the research definition.
137     */
138    @Child(name = "publisher", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=true)
139    @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the organization or individual that published the research definition." )
140    protected StringType publisher;
141
142    /**
143     * Contact details to assist a user in finding and communicating with the publisher.
144     */
145    @Child(name = "contact", type = {ContactDetail.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
146    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
147    protected List<ContactDetail> contact;
148
149    /**
150     * A free text natural language description of the research definition from a consumer's perspective.
151     */
152    @Child(name = "description", type = {MarkdownType.class}, order=13, min=0, max=1, modifier=false, summary=true)
153    @Description(shortDefinition="Natural language description of the research definition", formalDefinition="A free text natural language description of the research definition from a consumer's perspective." )
154    protected MarkdownType description;
155
156    /**
157     * A human-readable string to clarify or explain concepts about the resource.
158     */
159    @Child(name = "comment", type = {StringType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
160    @Description(shortDefinition="Used for footnotes or explanatory notes", formalDefinition="A human-readable string to clarify or explain concepts about the resource." )
161    protected List<StringType> comment;
162
163    /**
164     * 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 definition instances.
165     */
166    @Child(name = "useContext", type = {UsageContext.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
167    @Description(shortDefinition="The context that the content is intended to support", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate research definition instances." )
168    protected List<UsageContext> useContext;
169
170    /**
171     * A legal or geographic region in which the research definition is intended to be used.
172     */
173    @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
174    @Description(shortDefinition="Intended jurisdiction for research definition (if applicable)", formalDefinition="A legal or geographic region in which the research definition is intended to be used." )
175    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction")
176    protected List<CodeableConcept> jurisdiction;
177
178    /**
179     * Explanation of why this research definition is needed and why it has been designed as it has.
180     */
181    @Child(name = "purpose", type = {MarkdownType.class}, order=17, min=0, max=1, modifier=false, summary=false)
182    @Description(shortDefinition="Why this research definition is defined", formalDefinition="Explanation of why this research definition is needed and why it has been designed as it has." )
183    protected MarkdownType purpose;
184
185    /**
186     * A detailed description, from a clinical perspective, of how the ResearchDefinition is used.
187     */
188    @Child(name = "usage", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false)
189    @Description(shortDefinition="Describes the clinical usage of the ResearchDefinition", formalDefinition="A detailed description, from a clinical perspective, of how the ResearchDefinition is used." )
190    protected StringType usage;
191
192    /**
193     * A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.
194     */
195    @Child(name = "copyright", type = {MarkdownType.class}, order=19, min=0, max=1, modifier=false, summary=false)
196    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition." )
197    protected MarkdownType copyright;
198
199    /**
200     * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
201     */
202    @Child(name = "approvalDate", type = {DateType.class}, order=20, min=0, max=1, modifier=false, summary=false)
203    @Description(shortDefinition="When the research 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." )
204    protected DateType approvalDate;
205
206    /**
207     * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
208     */
209    @Child(name = "lastReviewDate", type = {DateType.class}, order=21, min=0, max=1, modifier=false, summary=false)
210    @Description(shortDefinition="When the research 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." )
211    protected DateType lastReviewDate;
212
213    /**
214     * The period during which the research definition content was or is planned to be in active use.
215     */
216    @Child(name = "effectivePeriod", type = {Period.class}, order=22, min=0, max=1, modifier=false, summary=true)
217    @Description(shortDefinition="When the research definition is expected to be used", formalDefinition="The period during which the research definition content was or is planned to be in active use." )
218    protected Period effectivePeriod;
219
220    /**
221     * Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching.
222     */
223    @Child(name = "topic", type = {CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
224    @Description(shortDefinition="The category of the ResearchDefinition, such as Education, Treatment, Assessment, etc.", formalDefinition="Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching." )
225    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/definition-topic")
226    protected List<CodeableConcept> topic;
227
228    /**
229     * An individiual or organization primarily involved in the creation and maintenance of the content.
230     */
231    @Child(name = "author", type = {ContactDetail.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
232    @Description(shortDefinition="Who authored the content", formalDefinition="An individiual or organization primarily involved in the creation and maintenance of the content." )
233    protected List<ContactDetail> author;
234
235    /**
236     * An individual or organization primarily responsible for internal coherence of the content.
237     */
238    @Child(name = "editor", type = {ContactDetail.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
239    @Description(shortDefinition="Who edited the content", formalDefinition="An individual or organization primarily responsible for internal coherence of the content." )
240    protected List<ContactDetail> editor;
241
242    /**
243     * An individual or organization primarily responsible for review of some aspect of the content.
244     */
245    @Child(name = "reviewer", type = {ContactDetail.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
246    @Description(shortDefinition="Who reviewed the content", formalDefinition="An individual or organization primarily responsible for review of some aspect of the content." )
247    protected List<ContactDetail> reviewer;
248
249    /**
250     * An individual or organization responsible for officially endorsing the content for use in some setting.
251     */
252    @Child(name = "endorser", type = {ContactDetail.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
253    @Description(shortDefinition="Who endorsed the content", formalDefinition="An individual or organization responsible for officially endorsing the content for use in some setting." )
254    protected List<ContactDetail> endorser;
255
256    /**
257     * Related artifacts such as additional documentation, justification, or bibliographic references.
258     */
259    @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
260    @Description(shortDefinition="Additional documentation, citations, etc.", formalDefinition="Related artifacts such as additional documentation, justification, or bibliographic references." )
261    protected List<RelatedArtifact> relatedArtifact;
262
263    /**
264     * A reference to a Library resource containing the formal logic used by the ResearchDefinition.
265     */
266    @Child(name = "library", type = {CanonicalType.class}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
267    @Description(shortDefinition="Logic used by the ResearchDefinition", formalDefinition="A reference to a Library resource containing the formal logic used by the ResearchDefinition." )
268    protected List<CanonicalType> library;
269
270    /**
271     * A reference to a ResearchElementDefinition resource that defines the population for the research.
272     */
273    @Child(name = "population", type = {ResearchElementDefinition.class}, order=30, min=1, max=1, modifier=false, summary=true)
274    @Description(shortDefinition="What population?", formalDefinition="A reference to a ResearchElementDefinition resource that defines the population for the research." )
275    protected Reference population;
276
277    /**
278     * A reference to a ResearchElementDefinition resource that defines the exposure for the research.
279     */
280    @Child(name = "exposure", type = {ResearchElementDefinition.class}, order=31, min=0, max=1, modifier=false, summary=true)
281    @Description(shortDefinition="What exposure?", formalDefinition="A reference to a ResearchElementDefinition resource that defines the exposure for the research." )
282    protected Reference exposure;
283
284    /**
285     * A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research.
286     */
287    @Child(name = "exposureAlternative", type = {ResearchElementDefinition.class}, order=32, min=0, max=1, modifier=false, summary=true)
288    @Description(shortDefinition="What alternative exposure state?", formalDefinition="A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research." )
289    protected Reference exposureAlternative;
290
291    /**
292     * A reference to a ResearchElementDefinition resomece that defines the outcome for the research.
293     */
294    @Child(name = "outcome", type = {ResearchElementDefinition.class}, order=33, min=0, max=1, modifier=false, summary=true)
295    @Description(shortDefinition="What outcome?", formalDefinition="A reference to a ResearchElementDefinition resomece that defines the outcome for the research." )
296    protected Reference outcome;
297
298    private static final long serialVersionUID = -964138511L;
299
300  /**
301   * Constructor
302   */
303    public ResearchDefinition() {
304      super();
305    }
306
307  /**
308   * Constructor
309   */
310    public ResearchDefinition(PublicationStatus status, Reference population) {
311      super();
312      this.setStatus(status);
313      this.setPopulation(population);
314    }
315
316    /**
317     * @return {@link #url} (An absolute URI that is used to identify this research 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 definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research 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
318     */
319    public UriType getUrlElement() { 
320      if (this.url == null)
321        if (Configuration.errorOnAutoCreate())
322          throw new Error("Attempt to auto-create ResearchDefinition.url");
323        else if (Configuration.doAutoCreate())
324          this.url = new UriType(); // bb
325      return this.url;
326    }
327
328    public boolean hasUrlElement() { 
329      return this.url != null && !this.url.isEmpty();
330    }
331
332    public boolean hasUrl() { 
333      return this.url != null && !this.url.isEmpty();
334    }
335
336    /**
337     * @param value {@link #url} (An absolute URI that is used to identify this research 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 definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research 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
338     */
339    public ResearchDefinition setUrlElement(UriType value) { 
340      this.url = value;
341      return this;
342    }
343
344    /**
345     * @return An absolute URI that is used to identify this research 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 definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.
346     */
347    public String getUrl() { 
348      return this.url == null ? null : this.url.getValue();
349    }
350
351    /**
352     * @param value An absolute URI that is used to identify this research 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 definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.
353     */
354    public ResearchDefinition setUrl(String value) { 
355      if (Utilities.noString(value))
356        this.url = null;
357      else {
358        if (this.url == null)
359          this.url = new UriType();
360        this.url.setValue(value);
361      }
362      return this;
363    }
364
365    /**
366     * @return {@link #identifier} (A formal identifier that is used to identify this research definition when it is represented in other formats, or referenced in a specification, model, design or an instance.)
367     */
368    public List<Identifier> getIdentifier() { 
369      if (this.identifier == null)
370        this.identifier = new ArrayList<Identifier>();
371      return this.identifier;
372    }
373
374    /**
375     * @return Returns a reference to <code>this</code> for easy method chaining
376     */
377    public ResearchDefinition setIdentifier(List<Identifier> theIdentifier) { 
378      this.identifier = theIdentifier;
379      return this;
380    }
381
382    public boolean hasIdentifier() { 
383      if (this.identifier == null)
384        return false;
385      for (Identifier item : this.identifier)
386        if (!item.isEmpty())
387          return true;
388      return false;
389    }
390
391    public Identifier addIdentifier() { //3
392      Identifier t = new Identifier();
393      if (this.identifier == null)
394        this.identifier = new ArrayList<Identifier>();
395      this.identifier.add(t);
396      return t;
397    }
398
399    public ResearchDefinition addIdentifier(Identifier t) { //3
400      if (t == null)
401        return this;
402      if (this.identifier == null)
403        this.identifier = new ArrayList<Identifier>();
404      this.identifier.add(t);
405      return this;
406    }
407
408    /**
409     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
410     */
411    public Identifier getIdentifierFirstRep() { 
412      if (getIdentifier().isEmpty()) {
413        addIdentifier();
414      }
415      return getIdentifier().get(0);
416    }
417
418    /**
419     * @return {@link #version} (The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research 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
420     */
421    public StringType getVersionElement() { 
422      if (this.version == null)
423        if (Configuration.errorOnAutoCreate())
424          throw new Error("Attempt to auto-create ResearchDefinition.version");
425        else if (Configuration.doAutoCreate())
426          this.version = new StringType(); // bb
427      return this.version;
428    }
429
430    public boolean hasVersionElement() { 
431      return this.version != null && !this.version.isEmpty();
432    }
433
434    public boolean hasVersion() { 
435      return this.version != null && !this.version.isEmpty();
436    }
437
438    /**
439     * @param value {@link #version} (The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research 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
440     */
441    public ResearchDefinition setVersionElement(StringType value) { 
442      this.version = value;
443      return this;
444    }
445
446    /**
447     * @return The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research 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.
448     */
449    public String getVersion() { 
450      return this.version == null ? null : this.version.getValue();
451    }
452
453    /**
454     * @param value The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research 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.
455     */
456    public ResearchDefinition setVersion(String value) { 
457      if (Utilities.noString(value))
458        this.version = null;
459      else {
460        if (this.version == null)
461          this.version = new StringType();
462        this.version.setValue(value);
463      }
464      return this;
465    }
466
467    /**
468     * @return {@link #name} (A natural language name identifying the research 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
469     */
470    public StringType getNameElement() { 
471      if (this.name == null)
472        if (Configuration.errorOnAutoCreate())
473          throw new Error("Attempt to auto-create ResearchDefinition.name");
474        else if (Configuration.doAutoCreate())
475          this.name = new StringType(); // bb
476      return this.name;
477    }
478
479    public boolean hasNameElement() { 
480      return this.name != null && !this.name.isEmpty();
481    }
482
483    public boolean hasName() { 
484      return this.name != null && !this.name.isEmpty();
485    }
486
487    /**
488     * @param value {@link #name} (A natural language name identifying the research 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
489     */
490    public ResearchDefinition setNameElement(StringType value) { 
491      this.name = value;
492      return this;
493    }
494
495    /**
496     * @return A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
497     */
498    public String getName() { 
499      return this.name == null ? null : this.name.getValue();
500    }
501
502    /**
503     * @param value A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
504     */
505    public ResearchDefinition setName(String value) { 
506      if (Utilities.noString(value))
507        this.name = null;
508      else {
509        if (this.name == null)
510          this.name = new StringType();
511        this.name.setValue(value);
512      }
513      return this;
514    }
515
516    /**
517     * @return {@link #title} (A short, descriptive, user-friendly title for the research definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
518     */
519    public StringType getTitleElement() { 
520      if (this.title == null)
521        if (Configuration.errorOnAutoCreate())
522          throw new Error("Attempt to auto-create ResearchDefinition.title");
523        else if (Configuration.doAutoCreate())
524          this.title = new StringType(); // bb
525      return this.title;
526    }
527
528    public boolean hasTitleElement() { 
529      return this.title != null && !this.title.isEmpty();
530    }
531
532    public boolean hasTitle() { 
533      return this.title != null && !this.title.isEmpty();
534    }
535
536    /**
537     * @param value {@link #title} (A short, descriptive, user-friendly title for the research definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
538     */
539    public ResearchDefinition setTitleElement(StringType value) { 
540      this.title = value;
541      return this;
542    }
543
544    /**
545     * @return A short, descriptive, user-friendly title for the research definition.
546     */
547    public String getTitle() { 
548      return this.title == null ? null : this.title.getValue();
549    }
550
551    /**
552     * @param value A short, descriptive, user-friendly title for the research definition.
553     */
554    public ResearchDefinition setTitle(String value) { 
555      if (Utilities.noString(value))
556        this.title = null;
557      else {
558        if (this.title == null)
559          this.title = new StringType();
560        this.title.setValue(value);
561      }
562      return this;
563    }
564
565    /**
566     * @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
567     */
568    public StringType getShortTitleElement() { 
569      if (this.shortTitle == null)
570        if (Configuration.errorOnAutoCreate())
571          throw new Error("Attempt to auto-create ResearchDefinition.shortTitle");
572        else if (Configuration.doAutoCreate())
573          this.shortTitle = new StringType(); // bb
574      return this.shortTitle;
575    }
576
577    public boolean hasShortTitleElement() { 
578      return this.shortTitle != null && !this.shortTitle.isEmpty();
579    }
580
581    public boolean hasShortTitle() { 
582      return this.shortTitle != null && !this.shortTitle.isEmpty();
583    }
584
585    /**
586     * @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
587     */
588    public ResearchDefinition setShortTitleElement(StringType value) { 
589      this.shortTitle = value;
590      return this;
591    }
592
593    /**
594     * @return The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.
595     */
596    public String getShortTitle() { 
597      return this.shortTitle == null ? null : this.shortTitle.getValue();
598    }
599
600    /**
601     * @param value The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.
602     */
603    public ResearchDefinition setShortTitle(String value) { 
604      if (Utilities.noString(value))
605        this.shortTitle = null;
606      else {
607        if (this.shortTitle == null)
608          this.shortTitle = new StringType();
609        this.shortTitle.setValue(value);
610      }
611      return this;
612    }
613
614    /**
615     * @return {@link #subtitle} (An explanatory or alternate title for the ResearchDefinition 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
616     */
617    public StringType getSubtitleElement() { 
618      if (this.subtitle == null)
619        if (Configuration.errorOnAutoCreate())
620          throw new Error("Attempt to auto-create ResearchDefinition.subtitle");
621        else if (Configuration.doAutoCreate())
622          this.subtitle = new StringType(); // bb
623      return this.subtitle;
624    }
625
626    public boolean hasSubtitleElement() { 
627      return this.subtitle != null && !this.subtitle.isEmpty();
628    }
629
630    public boolean hasSubtitle() { 
631      return this.subtitle != null && !this.subtitle.isEmpty();
632    }
633
634    /**
635     * @param value {@link #subtitle} (An explanatory or alternate title for the ResearchDefinition 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
636     */
637    public ResearchDefinition setSubtitleElement(StringType value) { 
638      this.subtitle = value;
639      return this;
640    }
641
642    /**
643     * @return An explanatory or alternate title for the ResearchDefinition giving additional information about its content.
644     */
645    public String getSubtitle() { 
646      return this.subtitle == null ? null : this.subtitle.getValue();
647    }
648
649    /**
650     * @param value An explanatory or alternate title for the ResearchDefinition giving additional information about its content.
651     */
652    public ResearchDefinition setSubtitle(String value) { 
653      if (Utilities.noString(value))
654        this.subtitle = null;
655      else {
656        if (this.subtitle == null)
657          this.subtitle = new StringType();
658        this.subtitle.setValue(value);
659      }
660      return this;
661    }
662
663    /**
664     * @return {@link #status} (The status of this research 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
665     */
666    public Enumeration<PublicationStatus> getStatusElement() { 
667      if (this.status == null)
668        if (Configuration.errorOnAutoCreate())
669          throw new Error("Attempt to auto-create ResearchDefinition.status");
670        else if (Configuration.doAutoCreate())
671          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
672      return this.status;
673    }
674
675    public boolean hasStatusElement() { 
676      return this.status != null && !this.status.isEmpty();
677    }
678
679    public boolean hasStatus() { 
680      return this.status != null && !this.status.isEmpty();
681    }
682
683    /**
684     * @param value {@link #status} (The status of this research 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
685     */
686    public ResearchDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
687      this.status = value;
688      return this;
689    }
690
691    /**
692     * @return The status of this research definition. Enables tracking the life-cycle of the content.
693     */
694    public PublicationStatus getStatus() { 
695      return this.status == null ? null : this.status.getValue();
696    }
697
698    /**
699     * @param value The status of this research definition. Enables tracking the life-cycle of the content.
700     */
701    public ResearchDefinition setStatus(PublicationStatus value) { 
702        if (this.status == null)
703          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
704        this.status.setValue(value);
705      return this;
706    }
707
708    /**
709     * @return {@link #experimental} (A Boolean value to indicate that this research 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
710     */
711    public BooleanType getExperimentalElement() { 
712      if (this.experimental == null)
713        if (Configuration.errorOnAutoCreate())
714          throw new Error("Attempt to auto-create ResearchDefinition.experimental");
715        else if (Configuration.doAutoCreate())
716          this.experimental = new BooleanType(); // bb
717      return this.experimental;
718    }
719
720    public boolean hasExperimentalElement() { 
721      return this.experimental != null && !this.experimental.isEmpty();
722    }
723
724    public boolean hasExperimental() { 
725      return this.experimental != null && !this.experimental.isEmpty();
726    }
727
728    /**
729     * @param value {@link #experimental} (A Boolean value to indicate that this research 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
730     */
731    public ResearchDefinition setExperimentalElement(BooleanType value) { 
732      this.experimental = value;
733      return this;
734    }
735
736    /**
737     * @return A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
738     */
739    public boolean getExperimental() { 
740      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
741    }
742
743    /**
744     * @param value A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
745     */
746    public ResearchDefinition setExperimental(boolean value) { 
747        if (this.experimental == null)
748          this.experimental = new BooleanType();
749        this.experimental.setValue(value);
750      return this;
751    }
752
753    /**
754     * @return {@link #subject} (The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.)
755     */
756    public DataType getSubject() { 
757      return this.subject;
758    }
759
760    /**
761     * @return {@link #subject} (The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.)
762     */
763    public CodeableConcept getSubjectCodeableConcept() throws FHIRException { 
764      if (this.subject == null)
765        this.subject = new CodeableConcept();
766      if (!(this.subject instanceof CodeableConcept))
767        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.subject.getClass().getName()+" was encountered");
768      return (CodeableConcept) this.subject;
769    }
770
771    public boolean hasSubjectCodeableConcept() { 
772      return this != null && this.subject instanceof CodeableConcept;
773    }
774
775    /**
776     * @return {@link #subject} (The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.)
777     */
778    public Reference getSubjectReference() throws FHIRException { 
779      if (this.subject == null)
780        this.subject = new Reference();
781      if (!(this.subject instanceof Reference))
782        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.subject.getClass().getName()+" was encountered");
783      return (Reference) this.subject;
784    }
785
786    public boolean hasSubjectReference() { 
787      return this != null && this.subject instanceof Reference;
788    }
789
790    public boolean hasSubject() { 
791      return this.subject != null && !this.subject.isEmpty();
792    }
793
794    /**
795     * @param value {@link #subject} (The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.)
796     */
797    public ResearchDefinition setSubject(DataType value) { 
798      if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
799        throw new Error("Not the right type for ResearchDefinition.subject[x]: "+value.fhirType());
800      this.subject = value;
801      return this;
802    }
803
804    /**
805     * @return {@link #date} (The date  (and optionally time) when the research 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 definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
806     */
807    public DateTimeType getDateElement() { 
808      if (this.date == null)
809        if (Configuration.errorOnAutoCreate())
810          throw new Error("Attempt to auto-create ResearchDefinition.date");
811        else if (Configuration.doAutoCreate())
812          this.date = new DateTimeType(); // bb
813      return this.date;
814    }
815
816    public boolean hasDateElement() { 
817      return this.date != null && !this.date.isEmpty();
818    }
819
820    public boolean hasDate() { 
821      return this.date != null && !this.date.isEmpty();
822    }
823
824    /**
825     * @param value {@link #date} (The date  (and optionally time) when the research 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 definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
826     */
827    public ResearchDefinition setDateElement(DateTimeType value) { 
828      this.date = value;
829      return this;
830    }
831
832    /**
833     * @return The date  (and optionally time) when the research 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 definition changes.
834     */
835    public Date getDate() { 
836      return this.date == null ? null : this.date.getValue();
837    }
838
839    /**
840     * @param value The date  (and optionally time) when the research 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 definition changes.
841     */
842    public ResearchDefinition setDate(Date value) { 
843      if (value == null)
844        this.date = null;
845      else {
846        if (this.date == null)
847          this.date = new DateTimeType();
848        this.date.setValue(value);
849      }
850      return this;
851    }
852
853    /**
854     * @return {@link #publisher} (The name of the organization or individual that published the research definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
855     */
856    public StringType getPublisherElement() { 
857      if (this.publisher == null)
858        if (Configuration.errorOnAutoCreate())
859          throw new Error("Attempt to auto-create ResearchDefinition.publisher");
860        else if (Configuration.doAutoCreate())
861          this.publisher = new StringType(); // bb
862      return this.publisher;
863    }
864
865    public boolean hasPublisherElement() { 
866      return this.publisher != null && !this.publisher.isEmpty();
867    }
868
869    public boolean hasPublisher() { 
870      return this.publisher != null && !this.publisher.isEmpty();
871    }
872
873    /**
874     * @param value {@link #publisher} (The name of the organization or individual that published the research definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
875     */
876    public ResearchDefinition setPublisherElement(StringType value) { 
877      this.publisher = value;
878      return this;
879    }
880
881    /**
882     * @return The name of the organization or individual that published the research definition.
883     */
884    public String getPublisher() { 
885      return this.publisher == null ? null : this.publisher.getValue();
886    }
887
888    /**
889     * @param value The name of the organization or individual that published the research definition.
890     */
891    public ResearchDefinition setPublisher(String value) { 
892      if (Utilities.noString(value))
893        this.publisher = null;
894      else {
895        if (this.publisher == null)
896          this.publisher = new StringType();
897        this.publisher.setValue(value);
898      }
899      return this;
900    }
901
902    /**
903     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
904     */
905    public List<ContactDetail> getContact() { 
906      if (this.contact == null)
907        this.contact = new ArrayList<ContactDetail>();
908      return this.contact;
909    }
910
911    /**
912     * @return Returns a reference to <code>this</code> for easy method chaining
913     */
914    public ResearchDefinition setContact(List<ContactDetail> theContact) { 
915      this.contact = theContact;
916      return this;
917    }
918
919    public boolean hasContact() { 
920      if (this.contact == null)
921        return false;
922      for (ContactDetail item : this.contact)
923        if (!item.isEmpty())
924          return true;
925      return false;
926    }
927
928    public ContactDetail addContact() { //3
929      ContactDetail t = new ContactDetail();
930      if (this.contact == null)
931        this.contact = new ArrayList<ContactDetail>();
932      this.contact.add(t);
933      return t;
934    }
935
936    public ResearchDefinition addContact(ContactDetail t) { //3
937      if (t == null)
938        return this;
939      if (this.contact == null)
940        this.contact = new ArrayList<ContactDetail>();
941      this.contact.add(t);
942      return this;
943    }
944
945    /**
946     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
947     */
948    public ContactDetail getContactFirstRep() { 
949      if (getContact().isEmpty()) {
950        addContact();
951      }
952      return getContact().get(0);
953    }
954
955    /**
956     * @return {@link #description} (A free text natural language description of the research 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
957     */
958    public MarkdownType getDescriptionElement() { 
959      if (this.description == null)
960        if (Configuration.errorOnAutoCreate())
961          throw new Error("Attempt to auto-create ResearchDefinition.description");
962        else if (Configuration.doAutoCreate())
963          this.description = new MarkdownType(); // bb
964      return this.description;
965    }
966
967    public boolean hasDescriptionElement() { 
968      return this.description != null && !this.description.isEmpty();
969    }
970
971    public boolean hasDescription() { 
972      return this.description != null && !this.description.isEmpty();
973    }
974
975    /**
976     * @param value {@link #description} (A free text natural language description of the research 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
977     */
978    public ResearchDefinition setDescriptionElement(MarkdownType value) { 
979      this.description = value;
980      return this;
981    }
982
983    /**
984     * @return A free text natural language description of the research definition from a consumer's perspective.
985     */
986    public String getDescription() { 
987      return this.description == null ? null : this.description.getValue();
988    }
989
990    /**
991     * @param value A free text natural language description of the research definition from a consumer's perspective.
992     */
993    public ResearchDefinition setDescription(String value) { 
994      if (value == null)
995        this.description = null;
996      else {
997        if (this.description == null)
998          this.description = new MarkdownType();
999        this.description.setValue(value);
1000      }
1001      return this;
1002    }
1003
1004    /**
1005     * @return {@link #comment} (A human-readable string to clarify or explain concepts about the resource.)
1006     */
1007    public List<StringType> getComment() { 
1008      if (this.comment == null)
1009        this.comment = new ArrayList<StringType>();
1010      return this.comment;
1011    }
1012
1013    /**
1014     * @return Returns a reference to <code>this</code> for easy method chaining
1015     */
1016    public ResearchDefinition setComment(List<StringType> theComment) { 
1017      this.comment = theComment;
1018      return this;
1019    }
1020
1021    public boolean hasComment() { 
1022      if (this.comment == null)
1023        return false;
1024      for (StringType item : this.comment)
1025        if (!item.isEmpty())
1026          return true;
1027      return false;
1028    }
1029
1030    /**
1031     * @return {@link #comment} (A human-readable string to clarify or explain concepts about the resource.)
1032     */
1033    public StringType addCommentElement() {//2 
1034      StringType t = new StringType();
1035      if (this.comment == null)
1036        this.comment = new ArrayList<StringType>();
1037      this.comment.add(t);
1038      return t;
1039    }
1040
1041    /**
1042     * @param value {@link #comment} (A human-readable string to clarify or explain concepts about the resource.)
1043     */
1044    public ResearchDefinition addComment(String value) { //1
1045      StringType t = new StringType();
1046      t.setValue(value);
1047      if (this.comment == null)
1048        this.comment = new ArrayList<StringType>();
1049      this.comment.add(t);
1050      return this;
1051    }
1052
1053    /**
1054     * @param value {@link #comment} (A human-readable string to clarify or explain concepts about the resource.)
1055     */
1056    public boolean hasComment(String value) { 
1057      if (this.comment == null)
1058        return false;
1059      for (StringType v : this.comment)
1060        if (v.getValue().equals(value)) // string
1061          return true;
1062      return false;
1063    }
1064
1065    /**
1066     * @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 definition instances.)
1067     */
1068    public List<UsageContext> getUseContext() { 
1069      if (this.useContext == null)
1070        this.useContext = new ArrayList<UsageContext>();
1071      return this.useContext;
1072    }
1073
1074    /**
1075     * @return Returns a reference to <code>this</code> for easy method chaining
1076     */
1077    public ResearchDefinition setUseContext(List<UsageContext> theUseContext) { 
1078      this.useContext = theUseContext;
1079      return this;
1080    }
1081
1082    public boolean hasUseContext() { 
1083      if (this.useContext == null)
1084        return false;
1085      for (UsageContext item : this.useContext)
1086        if (!item.isEmpty())
1087          return true;
1088      return false;
1089    }
1090
1091    public UsageContext addUseContext() { //3
1092      UsageContext t = new UsageContext();
1093      if (this.useContext == null)
1094        this.useContext = new ArrayList<UsageContext>();
1095      this.useContext.add(t);
1096      return t;
1097    }
1098
1099    public ResearchDefinition addUseContext(UsageContext t) { //3
1100      if (t == null)
1101        return this;
1102      if (this.useContext == null)
1103        this.useContext = new ArrayList<UsageContext>();
1104      this.useContext.add(t);
1105      return this;
1106    }
1107
1108    /**
1109     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
1110     */
1111    public UsageContext getUseContextFirstRep() { 
1112      if (getUseContext().isEmpty()) {
1113        addUseContext();
1114      }
1115      return getUseContext().get(0);
1116    }
1117
1118    /**
1119     * @return {@link #jurisdiction} (A legal or geographic region in which the research definition is intended to be used.)
1120     */
1121    public List<CodeableConcept> getJurisdiction() { 
1122      if (this.jurisdiction == null)
1123        this.jurisdiction = new ArrayList<CodeableConcept>();
1124      return this.jurisdiction;
1125    }
1126
1127    /**
1128     * @return Returns a reference to <code>this</code> for easy method chaining
1129     */
1130    public ResearchDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
1131      this.jurisdiction = theJurisdiction;
1132      return this;
1133    }
1134
1135    public boolean hasJurisdiction() { 
1136      if (this.jurisdiction == null)
1137        return false;
1138      for (CodeableConcept item : this.jurisdiction)
1139        if (!item.isEmpty())
1140          return true;
1141      return false;
1142    }
1143
1144    public CodeableConcept addJurisdiction() { //3
1145      CodeableConcept t = new CodeableConcept();
1146      if (this.jurisdiction == null)
1147        this.jurisdiction = new ArrayList<CodeableConcept>();
1148      this.jurisdiction.add(t);
1149      return t;
1150    }
1151
1152    public ResearchDefinition addJurisdiction(CodeableConcept t) { //3
1153      if (t == null)
1154        return this;
1155      if (this.jurisdiction == null)
1156        this.jurisdiction = new ArrayList<CodeableConcept>();
1157      this.jurisdiction.add(t);
1158      return this;
1159    }
1160
1161    /**
1162     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {3}
1163     */
1164    public CodeableConcept getJurisdictionFirstRep() { 
1165      if (getJurisdiction().isEmpty()) {
1166        addJurisdiction();
1167      }
1168      return getJurisdiction().get(0);
1169    }
1170
1171    /**
1172     * @return {@link #purpose} (Explanation of why this research 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
1173     */
1174    public MarkdownType getPurposeElement() { 
1175      if (this.purpose == null)
1176        if (Configuration.errorOnAutoCreate())
1177          throw new Error("Attempt to auto-create ResearchDefinition.purpose");
1178        else if (Configuration.doAutoCreate())
1179          this.purpose = new MarkdownType(); // bb
1180      return this.purpose;
1181    }
1182
1183    public boolean hasPurposeElement() { 
1184      return this.purpose != null && !this.purpose.isEmpty();
1185    }
1186
1187    public boolean hasPurpose() { 
1188      return this.purpose != null && !this.purpose.isEmpty();
1189    }
1190
1191    /**
1192     * @param value {@link #purpose} (Explanation of why this research 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
1193     */
1194    public ResearchDefinition setPurposeElement(MarkdownType value) { 
1195      this.purpose = value;
1196      return this;
1197    }
1198
1199    /**
1200     * @return Explanation of why this research definition is needed and why it has been designed as it has.
1201     */
1202    public String getPurpose() { 
1203      return this.purpose == null ? null : this.purpose.getValue();
1204    }
1205
1206    /**
1207     * @param value Explanation of why this research definition is needed and why it has been designed as it has.
1208     */
1209    public ResearchDefinition setPurpose(String value) { 
1210      if (value == null)
1211        this.purpose = null;
1212      else {
1213        if (this.purpose == null)
1214          this.purpose = new MarkdownType();
1215        this.purpose.setValue(value);
1216      }
1217      return this;
1218    }
1219
1220    /**
1221     * @return {@link #usage} (A detailed description, from a clinical perspective, of how the ResearchDefinition is used.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
1222     */
1223    public StringType getUsageElement() { 
1224      if (this.usage == null)
1225        if (Configuration.errorOnAutoCreate())
1226          throw new Error("Attempt to auto-create ResearchDefinition.usage");
1227        else if (Configuration.doAutoCreate())
1228          this.usage = new StringType(); // bb
1229      return this.usage;
1230    }
1231
1232    public boolean hasUsageElement() { 
1233      return this.usage != null && !this.usage.isEmpty();
1234    }
1235
1236    public boolean hasUsage() { 
1237      return this.usage != null && !this.usage.isEmpty();
1238    }
1239
1240    /**
1241     * @param value {@link #usage} (A detailed description, from a clinical perspective, of how the ResearchDefinition is used.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
1242     */
1243    public ResearchDefinition setUsageElement(StringType value) { 
1244      this.usage = value;
1245      return this;
1246    }
1247
1248    /**
1249     * @return A detailed description, from a clinical perspective, of how the ResearchDefinition is used.
1250     */
1251    public String getUsage() { 
1252      return this.usage == null ? null : this.usage.getValue();
1253    }
1254
1255    /**
1256     * @param value A detailed description, from a clinical perspective, of how the ResearchDefinition is used.
1257     */
1258    public ResearchDefinition setUsage(String value) { 
1259      if (Utilities.noString(value))
1260        this.usage = null;
1261      else {
1262        if (this.usage == null)
1263          this.usage = new StringType();
1264        this.usage.setValue(value);
1265      }
1266      return this;
1267    }
1268
1269    /**
1270     * @return {@link #copyright} (A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
1271     */
1272    public MarkdownType getCopyrightElement() { 
1273      if (this.copyright == null)
1274        if (Configuration.errorOnAutoCreate())
1275          throw new Error("Attempt to auto-create ResearchDefinition.copyright");
1276        else if (Configuration.doAutoCreate())
1277          this.copyright = new MarkdownType(); // bb
1278      return this.copyright;
1279    }
1280
1281    public boolean hasCopyrightElement() { 
1282      return this.copyright != null && !this.copyright.isEmpty();
1283    }
1284
1285    public boolean hasCopyright() { 
1286      return this.copyright != null && !this.copyright.isEmpty();
1287    }
1288
1289    /**
1290     * @param value {@link #copyright} (A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
1291     */
1292    public ResearchDefinition setCopyrightElement(MarkdownType value) { 
1293      this.copyright = value;
1294      return this;
1295    }
1296
1297    /**
1298     * @return A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.
1299     */
1300    public String getCopyright() { 
1301      return this.copyright == null ? null : this.copyright.getValue();
1302    }
1303
1304    /**
1305     * @param value A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.
1306     */
1307    public ResearchDefinition setCopyright(String value) { 
1308      if (value == null)
1309        this.copyright = null;
1310      else {
1311        if (this.copyright == null)
1312          this.copyright = new MarkdownType();
1313        this.copyright.setValue(value);
1314      }
1315      return this;
1316    }
1317
1318    /**
1319     * @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
1320     */
1321    public DateType getApprovalDateElement() { 
1322      if (this.approvalDate == null)
1323        if (Configuration.errorOnAutoCreate())
1324          throw new Error("Attempt to auto-create ResearchDefinition.approvalDate");
1325        else if (Configuration.doAutoCreate())
1326          this.approvalDate = new DateType(); // bb
1327      return this.approvalDate;
1328    }
1329
1330    public boolean hasApprovalDateElement() { 
1331      return this.approvalDate != null && !this.approvalDate.isEmpty();
1332    }
1333
1334    public boolean hasApprovalDate() { 
1335      return this.approvalDate != null && !this.approvalDate.isEmpty();
1336    }
1337
1338    /**
1339     * @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
1340     */
1341    public ResearchDefinition setApprovalDateElement(DateType value) { 
1342      this.approvalDate = value;
1343      return this;
1344    }
1345
1346    /**
1347     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
1348     */
1349    public Date getApprovalDate() { 
1350      return this.approvalDate == null ? null : this.approvalDate.getValue();
1351    }
1352
1353    /**
1354     * @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.
1355     */
1356    public ResearchDefinition setApprovalDate(Date value) { 
1357      if (value == null)
1358        this.approvalDate = null;
1359      else {
1360        if (this.approvalDate == null)
1361          this.approvalDate = new DateType();
1362        this.approvalDate.setValue(value);
1363      }
1364      return this;
1365    }
1366
1367    /**
1368     * @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
1369     */
1370    public DateType getLastReviewDateElement() { 
1371      if (this.lastReviewDate == null)
1372        if (Configuration.errorOnAutoCreate())
1373          throw new Error("Attempt to auto-create ResearchDefinition.lastReviewDate");
1374        else if (Configuration.doAutoCreate())
1375          this.lastReviewDate = new DateType(); // bb
1376      return this.lastReviewDate;
1377    }
1378
1379    public boolean hasLastReviewDateElement() { 
1380      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
1381    }
1382
1383    public boolean hasLastReviewDate() { 
1384      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
1385    }
1386
1387    /**
1388     * @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
1389     */
1390    public ResearchDefinition setLastReviewDateElement(DateType value) { 
1391      this.lastReviewDate = value;
1392      return this;
1393    }
1394
1395    /**
1396     * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
1397     */
1398    public Date getLastReviewDate() { 
1399      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
1400    }
1401
1402    /**
1403     * @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.
1404     */
1405    public ResearchDefinition setLastReviewDate(Date value) { 
1406      if (value == null)
1407        this.lastReviewDate = null;
1408      else {
1409        if (this.lastReviewDate == null)
1410          this.lastReviewDate = new DateType();
1411        this.lastReviewDate.setValue(value);
1412      }
1413      return this;
1414    }
1415
1416    /**
1417     * @return {@link #effectivePeriod} (The period during which the research definition content was or is planned to be in active use.)
1418     */
1419    public Period getEffectivePeriod() { 
1420      if (this.effectivePeriod == null)
1421        if (Configuration.errorOnAutoCreate())
1422          throw new Error("Attempt to auto-create ResearchDefinition.effectivePeriod");
1423        else if (Configuration.doAutoCreate())
1424          this.effectivePeriod = new Period(); // cc
1425      return this.effectivePeriod;
1426    }
1427
1428    public boolean hasEffectivePeriod() { 
1429      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
1430    }
1431
1432    /**
1433     * @param value {@link #effectivePeriod} (The period during which the research definition content was or is planned to be in active use.)
1434     */
1435    public ResearchDefinition setEffectivePeriod(Period value) { 
1436      this.effectivePeriod = value;
1437      return this;
1438    }
1439
1440    /**
1441     * @return {@link #topic} (Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching.)
1442     */
1443    public List<CodeableConcept> getTopic() { 
1444      if (this.topic == null)
1445        this.topic = new ArrayList<CodeableConcept>();
1446      return this.topic;
1447    }
1448
1449    /**
1450     * @return Returns a reference to <code>this</code> for easy method chaining
1451     */
1452    public ResearchDefinition setTopic(List<CodeableConcept> theTopic) { 
1453      this.topic = theTopic;
1454      return this;
1455    }
1456
1457    public boolean hasTopic() { 
1458      if (this.topic == null)
1459        return false;
1460      for (CodeableConcept item : this.topic)
1461        if (!item.isEmpty())
1462          return true;
1463      return false;
1464    }
1465
1466    public CodeableConcept addTopic() { //3
1467      CodeableConcept t = new CodeableConcept();
1468      if (this.topic == null)
1469        this.topic = new ArrayList<CodeableConcept>();
1470      this.topic.add(t);
1471      return t;
1472    }
1473
1474    public ResearchDefinition addTopic(CodeableConcept t) { //3
1475      if (t == null)
1476        return this;
1477      if (this.topic == null)
1478        this.topic = new ArrayList<CodeableConcept>();
1479      this.topic.add(t);
1480      return this;
1481    }
1482
1483    /**
1484     * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist {3}
1485     */
1486    public CodeableConcept getTopicFirstRep() { 
1487      if (getTopic().isEmpty()) {
1488        addTopic();
1489      }
1490      return getTopic().get(0);
1491    }
1492
1493    /**
1494     * @return {@link #author} (An individiual or organization primarily involved in the creation and maintenance of the content.)
1495     */
1496    public List<ContactDetail> getAuthor() { 
1497      if (this.author == null)
1498        this.author = new ArrayList<ContactDetail>();
1499      return this.author;
1500    }
1501
1502    /**
1503     * @return Returns a reference to <code>this</code> for easy method chaining
1504     */
1505    public ResearchDefinition setAuthor(List<ContactDetail> theAuthor) { 
1506      this.author = theAuthor;
1507      return this;
1508    }
1509
1510    public boolean hasAuthor() { 
1511      if (this.author == null)
1512        return false;
1513      for (ContactDetail item : this.author)
1514        if (!item.isEmpty())
1515          return true;
1516      return false;
1517    }
1518
1519    public ContactDetail addAuthor() { //3
1520      ContactDetail t = new ContactDetail();
1521      if (this.author == null)
1522        this.author = new ArrayList<ContactDetail>();
1523      this.author.add(t);
1524      return t;
1525    }
1526
1527    public ResearchDefinition addAuthor(ContactDetail t) { //3
1528      if (t == null)
1529        return this;
1530      if (this.author == null)
1531        this.author = new ArrayList<ContactDetail>();
1532      this.author.add(t);
1533      return this;
1534    }
1535
1536    /**
1537     * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {3}
1538     */
1539    public ContactDetail getAuthorFirstRep() { 
1540      if (getAuthor().isEmpty()) {
1541        addAuthor();
1542      }
1543      return getAuthor().get(0);
1544    }
1545
1546    /**
1547     * @return {@link #editor} (An individual or organization primarily responsible for internal coherence of the content.)
1548     */
1549    public List<ContactDetail> getEditor() { 
1550      if (this.editor == null)
1551        this.editor = new ArrayList<ContactDetail>();
1552      return this.editor;
1553    }
1554
1555    /**
1556     * @return Returns a reference to <code>this</code> for easy method chaining
1557     */
1558    public ResearchDefinition setEditor(List<ContactDetail> theEditor) { 
1559      this.editor = theEditor;
1560      return this;
1561    }
1562
1563    public boolean hasEditor() { 
1564      if (this.editor == null)
1565        return false;
1566      for (ContactDetail item : this.editor)
1567        if (!item.isEmpty())
1568          return true;
1569      return false;
1570    }
1571
1572    public ContactDetail addEditor() { //3
1573      ContactDetail t = new ContactDetail();
1574      if (this.editor == null)
1575        this.editor = new ArrayList<ContactDetail>();
1576      this.editor.add(t);
1577      return t;
1578    }
1579
1580    public ResearchDefinition addEditor(ContactDetail t) { //3
1581      if (t == null)
1582        return this;
1583      if (this.editor == null)
1584        this.editor = new ArrayList<ContactDetail>();
1585      this.editor.add(t);
1586      return this;
1587    }
1588
1589    /**
1590     * @return The first repetition of repeating field {@link #editor}, creating it if it does not already exist {3}
1591     */
1592    public ContactDetail getEditorFirstRep() { 
1593      if (getEditor().isEmpty()) {
1594        addEditor();
1595      }
1596      return getEditor().get(0);
1597    }
1598
1599    /**
1600     * @return {@link #reviewer} (An individual or organization primarily responsible for review of some aspect of the content.)
1601     */
1602    public List<ContactDetail> getReviewer() { 
1603      if (this.reviewer == null)
1604        this.reviewer = new ArrayList<ContactDetail>();
1605      return this.reviewer;
1606    }
1607
1608    /**
1609     * @return Returns a reference to <code>this</code> for easy method chaining
1610     */
1611    public ResearchDefinition setReviewer(List<ContactDetail> theReviewer) { 
1612      this.reviewer = theReviewer;
1613      return this;
1614    }
1615
1616    public boolean hasReviewer() { 
1617      if (this.reviewer == null)
1618        return false;
1619      for (ContactDetail item : this.reviewer)
1620        if (!item.isEmpty())
1621          return true;
1622      return false;
1623    }
1624
1625    public ContactDetail addReviewer() { //3
1626      ContactDetail t = new ContactDetail();
1627      if (this.reviewer == null)
1628        this.reviewer = new ArrayList<ContactDetail>();
1629      this.reviewer.add(t);
1630      return t;
1631    }
1632
1633    public ResearchDefinition addReviewer(ContactDetail t) { //3
1634      if (t == null)
1635        return this;
1636      if (this.reviewer == null)
1637        this.reviewer = new ArrayList<ContactDetail>();
1638      this.reviewer.add(t);
1639      return this;
1640    }
1641
1642    /**
1643     * @return The first repetition of repeating field {@link #reviewer}, creating it if it does not already exist {3}
1644     */
1645    public ContactDetail getReviewerFirstRep() { 
1646      if (getReviewer().isEmpty()) {
1647        addReviewer();
1648      }
1649      return getReviewer().get(0);
1650    }
1651
1652    /**
1653     * @return {@link #endorser} (An individual or organization responsible for officially endorsing the content for use in some setting.)
1654     */
1655    public List<ContactDetail> getEndorser() { 
1656      if (this.endorser == null)
1657        this.endorser = new ArrayList<ContactDetail>();
1658      return this.endorser;
1659    }
1660
1661    /**
1662     * @return Returns a reference to <code>this</code> for easy method chaining
1663     */
1664    public ResearchDefinition setEndorser(List<ContactDetail> theEndorser) { 
1665      this.endorser = theEndorser;
1666      return this;
1667    }
1668
1669    public boolean hasEndorser() { 
1670      if (this.endorser == null)
1671        return false;
1672      for (ContactDetail item : this.endorser)
1673        if (!item.isEmpty())
1674          return true;
1675      return false;
1676    }
1677
1678    public ContactDetail addEndorser() { //3
1679      ContactDetail t = new ContactDetail();
1680      if (this.endorser == null)
1681        this.endorser = new ArrayList<ContactDetail>();
1682      this.endorser.add(t);
1683      return t;
1684    }
1685
1686    public ResearchDefinition addEndorser(ContactDetail t) { //3
1687      if (t == null)
1688        return this;
1689      if (this.endorser == null)
1690        this.endorser = new ArrayList<ContactDetail>();
1691      this.endorser.add(t);
1692      return this;
1693    }
1694
1695    /**
1696     * @return The first repetition of repeating field {@link #endorser}, creating it if it does not already exist {3}
1697     */
1698    public ContactDetail getEndorserFirstRep() { 
1699      if (getEndorser().isEmpty()) {
1700        addEndorser();
1701      }
1702      return getEndorser().get(0);
1703    }
1704
1705    /**
1706     * @return {@link #relatedArtifact} (Related artifacts such as additional documentation, justification, or bibliographic references.)
1707     */
1708    public List<RelatedArtifact> getRelatedArtifact() { 
1709      if (this.relatedArtifact == null)
1710        this.relatedArtifact = new ArrayList<RelatedArtifact>();
1711      return this.relatedArtifact;
1712    }
1713
1714    /**
1715     * @return Returns a reference to <code>this</code> for easy method chaining
1716     */
1717    public ResearchDefinition setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
1718      this.relatedArtifact = theRelatedArtifact;
1719      return this;
1720    }
1721
1722    public boolean hasRelatedArtifact() { 
1723      if (this.relatedArtifact == null)
1724        return false;
1725      for (RelatedArtifact item : this.relatedArtifact)
1726        if (!item.isEmpty())
1727          return true;
1728      return false;
1729    }
1730
1731    public RelatedArtifact addRelatedArtifact() { //3
1732      RelatedArtifact t = new RelatedArtifact();
1733      if (this.relatedArtifact == null)
1734        this.relatedArtifact = new ArrayList<RelatedArtifact>();
1735      this.relatedArtifact.add(t);
1736      return t;
1737    }
1738
1739    public ResearchDefinition addRelatedArtifact(RelatedArtifact t) { //3
1740      if (t == null)
1741        return this;
1742      if (this.relatedArtifact == null)
1743        this.relatedArtifact = new ArrayList<RelatedArtifact>();
1744      this.relatedArtifact.add(t);
1745      return this;
1746    }
1747
1748    /**
1749     * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {3}
1750     */
1751    public RelatedArtifact getRelatedArtifactFirstRep() { 
1752      if (getRelatedArtifact().isEmpty()) {
1753        addRelatedArtifact();
1754      }
1755      return getRelatedArtifact().get(0);
1756    }
1757
1758    /**
1759     * @return {@link #library} (A reference to a Library resource containing the formal logic used by the ResearchDefinition.)
1760     */
1761    public List<CanonicalType> getLibrary() { 
1762      if (this.library == null)
1763        this.library = new ArrayList<CanonicalType>();
1764      return this.library;
1765    }
1766
1767    /**
1768     * @return Returns a reference to <code>this</code> for easy method chaining
1769     */
1770    public ResearchDefinition setLibrary(List<CanonicalType> theLibrary) { 
1771      this.library = theLibrary;
1772      return this;
1773    }
1774
1775    public boolean hasLibrary() { 
1776      if (this.library == null)
1777        return false;
1778      for (CanonicalType item : this.library)
1779        if (!item.isEmpty())
1780          return true;
1781      return false;
1782    }
1783
1784    /**
1785     * @return {@link #library} (A reference to a Library resource containing the formal logic used by the ResearchDefinition.)
1786     */
1787    public CanonicalType addLibraryElement() {//2 
1788      CanonicalType t = new CanonicalType();
1789      if (this.library == null)
1790        this.library = new ArrayList<CanonicalType>();
1791      this.library.add(t);
1792      return t;
1793    }
1794
1795    /**
1796     * @param value {@link #library} (A reference to a Library resource containing the formal logic used by the ResearchDefinition.)
1797     */
1798    public ResearchDefinition addLibrary(String value) { //1
1799      CanonicalType t = new CanonicalType();
1800      t.setValue(value);
1801      if (this.library == null)
1802        this.library = new ArrayList<CanonicalType>();
1803      this.library.add(t);
1804      return this;
1805    }
1806
1807    /**
1808     * @param value {@link #library} (A reference to a Library resource containing the formal logic used by the ResearchDefinition.)
1809     */
1810    public boolean hasLibrary(String value) { 
1811      if (this.library == null)
1812        return false;
1813      for (CanonicalType v : this.library)
1814        if (v.getValue().equals(value)) // canonical
1815          return true;
1816      return false;
1817    }
1818
1819    /**
1820     * @return {@link #population} (A reference to a ResearchElementDefinition resource that defines the population for the research.)
1821     */
1822    public Reference getPopulation() { 
1823      if (this.population == null)
1824        if (Configuration.errorOnAutoCreate())
1825          throw new Error("Attempt to auto-create ResearchDefinition.population");
1826        else if (Configuration.doAutoCreate())
1827          this.population = new Reference(); // cc
1828      return this.population;
1829    }
1830
1831    public boolean hasPopulation() { 
1832      return this.population != null && !this.population.isEmpty();
1833    }
1834
1835    /**
1836     * @param value {@link #population} (A reference to a ResearchElementDefinition resource that defines the population for the research.)
1837     */
1838    public ResearchDefinition setPopulation(Reference value) { 
1839      this.population = value;
1840      return this;
1841    }
1842
1843    /**
1844     * @return {@link #exposure} (A reference to a ResearchElementDefinition resource that defines the exposure for the research.)
1845     */
1846    public Reference getExposure() { 
1847      if (this.exposure == null)
1848        if (Configuration.errorOnAutoCreate())
1849          throw new Error("Attempt to auto-create ResearchDefinition.exposure");
1850        else if (Configuration.doAutoCreate())
1851          this.exposure = new Reference(); // cc
1852      return this.exposure;
1853    }
1854
1855    public boolean hasExposure() { 
1856      return this.exposure != null && !this.exposure.isEmpty();
1857    }
1858
1859    /**
1860     * @param value {@link #exposure} (A reference to a ResearchElementDefinition resource that defines the exposure for the research.)
1861     */
1862    public ResearchDefinition setExposure(Reference value) { 
1863      this.exposure = value;
1864      return this;
1865    }
1866
1867    /**
1868     * @return {@link #exposureAlternative} (A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research.)
1869     */
1870    public Reference getExposureAlternative() { 
1871      if (this.exposureAlternative == null)
1872        if (Configuration.errorOnAutoCreate())
1873          throw new Error("Attempt to auto-create ResearchDefinition.exposureAlternative");
1874        else if (Configuration.doAutoCreate())
1875          this.exposureAlternative = new Reference(); // cc
1876      return this.exposureAlternative;
1877    }
1878
1879    public boolean hasExposureAlternative() { 
1880      return this.exposureAlternative != null && !this.exposureAlternative.isEmpty();
1881    }
1882
1883    /**
1884     * @param value {@link #exposureAlternative} (A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research.)
1885     */
1886    public ResearchDefinition setExposureAlternative(Reference value) { 
1887      this.exposureAlternative = value;
1888      return this;
1889    }
1890
1891    /**
1892     * @return {@link #outcome} (A reference to a ResearchElementDefinition resomece that defines the outcome for the research.)
1893     */
1894    public Reference getOutcome() { 
1895      if (this.outcome == null)
1896        if (Configuration.errorOnAutoCreate())
1897          throw new Error("Attempt to auto-create ResearchDefinition.outcome");
1898        else if (Configuration.doAutoCreate())
1899          this.outcome = new Reference(); // cc
1900      return this.outcome;
1901    }
1902
1903    public boolean hasOutcome() { 
1904      return this.outcome != null && !this.outcome.isEmpty();
1905    }
1906
1907    /**
1908     * @param value {@link #outcome} (A reference to a ResearchElementDefinition resomece that defines the outcome for the research.)
1909     */
1910    public ResearchDefinition setOutcome(Reference value) { 
1911      this.outcome = value;
1912      return this;
1913    }
1914
1915      protected void listChildren(List<Property> children) {
1916        super.listChildren(children);
1917        children.add(new Property("url", "uri", "An absolute URI that is used to identify this research 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 definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.", 0, 1, url));
1918        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this research 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));
1919        children.add(new Property("version", "string", "The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research 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));
1920        children.add(new Property("name", "string", "A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
1921        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the research definition.", 0, 1, title));
1922        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));
1923        children.add(new Property("subtitle", "string", "An explanatory or alternate title for the ResearchDefinition giving additional information about its content.", 0, 1, subtitle));
1924        children.add(new Property("status", "code", "The status of this research definition. Enables tracking the life-cycle of the content.", 0, 1, status));
1925        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
1926        children.add(new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.", 0, 1, subject));
1927        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the research 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 definition changes.", 0, 1, date));
1928        children.add(new Property("publisher", "string", "The name of the organization or individual that published the research definition.", 0, 1, publisher));
1929        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));
1930        children.add(new Property("description", "markdown", "A free text natural language description of the research definition from a consumer's perspective.", 0, 1, description));
1931        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));
1932        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 definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
1933        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the research definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
1934        children.add(new Property("purpose", "markdown", "Explanation of why this research definition is needed and why it has been designed as it has.", 0, 1, purpose));
1935        children.add(new Property("usage", "string", "A detailed description, from a clinical perspective, of how the ResearchDefinition is used.", 0, 1, usage));
1936        children.add(new Property("copyright", "markdown", "A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.", 0, 1, copyright));
1937        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));
1938        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));
1939        children.add(new Property("effectivePeriod", "Period", "The period during which the research definition content was or is planned to be in active use.", 0, 1, effectivePeriod));
1940        children.add(new Property("topic", "CodeableConcept", "Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching.", 0, java.lang.Integer.MAX_VALUE, topic));
1941        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));
1942        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));
1943        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));
1944        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));
1945        children.add(new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact));
1946        children.add(new Property("library", "canonical(Library)", "A reference to a Library resource containing the formal logic used by the ResearchDefinition.", 0, java.lang.Integer.MAX_VALUE, library));
1947        children.add(new Property("population", "Reference(ResearchElementDefinition)", "A reference to a ResearchElementDefinition resource that defines the population for the research.", 0, 1, population));
1948        children.add(new Property("exposure", "Reference(ResearchElementDefinition)", "A reference to a ResearchElementDefinition resource that defines the exposure for the research.", 0, 1, exposure));
1949        children.add(new Property("exposureAlternative", "Reference(ResearchElementDefinition)", "A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research.", 0, 1, exposureAlternative));
1950        children.add(new Property("outcome", "Reference(ResearchElementDefinition)", "A reference to a ResearchElementDefinition resomece that defines the outcome for the research.", 0, 1, outcome));
1951      }
1952
1953      @Override
1954      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1955        switch (_hash) {
1956        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this research 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 definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.", 0, 1, url);
1957        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this research 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);
1958        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research 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);
1959        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
1960        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the research definition.", 0, 1, title);
1961        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);
1962        case -2060497896: /*subtitle*/  return new Property("subtitle", "string", "An explanatory or alternate title for the ResearchDefinition giving additional information about its content.", 0, 1, subtitle);
1963        case -892481550: /*status*/  return new Property("status", "code", "The status of this research definition. Enables tracking the life-cycle of the content.", 0, 1, status);
1964        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
1965        case -573640748: /*subject[x]*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.", 0, 1, subject);
1966        case -1867885268: /*subject*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.", 0, 1, subject);
1967        case -1257122603: /*subjectCodeableConcept*/  return new Property("subject[x]", "CodeableConcept", "The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.", 0, 1, subject);
1968        case 772938623: /*subjectReference*/  return new Property("subject[x]", "Reference(Group)", "The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.", 0, 1, subject);
1969        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the research 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 definition changes.", 0, 1, date);
1970        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the research definition.", 0, 1, publisher);
1971        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);
1972        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the research definition from a consumer's perspective.", 0, 1, description);
1973        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);
1974        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 definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
1975        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the research definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
1976        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this research definition is needed and why it has been designed as it has.", 0, 1, purpose);
1977        case 111574433: /*usage*/  return new Property("usage", "string", "A detailed description, from a clinical perspective, of how the ResearchDefinition is used.", 0, 1, usage);
1978        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.", 0, 1, copyright);
1979        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);
1980        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);
1981        case -403934648: /*effectivePeriod*/  return new Property("effectivePeriod", "Period", "The period during which the research definition content was or is planned to be in active use.", 0, 1, effectivePeriod);
1982        case 110546223: /*topic*/  return new Property("topic", "CodeableConcept", "Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching.", 0, java.lang.Integer.MAX_VALUE, topic);
1983        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);
1984        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);
1985        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);
1986        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);
1987        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);
1988        case 166208699: /*library*/  return new Property("library", "canonical(Library)", "A reference to a Library resource containing the formal logic used by the ResearchDefinition.", 0, java.lang.Integer.MAX_VALUE, library);
1989        case -2023558323: /*population*/  return new Property("population", "Reference(ResearchElementDefinition)", "A reference to a ResearchElementDefinition resource that defines the population for the research.", 0, 1, population);
1990        case -1926005497: /*exposure*/  return new Property("exposure", "Reference(ResearchElementDefinition)", "A reference to a ResearchElementDefinition resource that defines the exposure for the research.", 0, 1, exposure);
1991        case -1875462106: /*exposureAlternative*/  return new Property("exposureAlternative", "Reference(ResearchElementDefinition)", "A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research.", 0, 1, exposureAlternative);
1992        case -1106507950: /*outcome*/  return new Property("outcome", "Reference(ResearchElementDefinition)", "A reference to a ResearchElementDefinition resomece that defines the outcome for the research.", 0, 1, outcome);
1993        default: return super.getNamedProperty(_hash, _name, _checkValid);
1994        }
1995
1996      }
1997
1998      @Override
1999      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2000        switch (hash) {
2001        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
2002        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2003        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
2004        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
2005        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
2006        case 1555503932: /*shortTitle*/ return this.shortTitle == null ? new Base[0] : new Base[] {this.shortTitle}; // StringType
2007        case -2060497896: /*subtitle*/ return this.subtitle == null ? new Base[0] : new Base[] {this.subtitle}; // StringType
2008        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
2009        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
2010        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // DataType
2011        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2012        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
2013        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
2014        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
2015        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : this.comment.toArray(new Base[this.comment.size()]); // StringType
2016        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
2017        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
2018        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
2019        case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType
2020        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
2021        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
2022        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
2023        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
2024        case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept
2025        case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail
2026        case -1307827859: /*editor*/ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail
2027        case -261190139: /*reviewer*/ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail
2028        case 1740277666: /*endorser*/ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail
2029        case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
2030        case 166208699: /*library*/ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // CanonicalType
2031        case -2023558323: /*population*/ return this.population == null ? new Base[0] : new Base[] {this.population}; // Reference
2032        case -1926005497: /*exposure*/ return this.exposure == null ? new Base[0] : new Base[] {this.exposure}; // Reference
2033        case -1875462106: /*exposureAlternative*/ return this.exposureAlternative == null ? new Base[0] : new Base[] {this.exposureAlternative}; // Reference
2034        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Reference
2035        default: return super.getProperty(hash, name, checkValid);
2036        }
2037
2038      }
2039
2040      @Override
2041      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2042        switch (hash) {
2043        case 116079: // url
2044          this.url = TypeConvertor.castToUri(value); // UriType
2045          return value;
2046        case -1618432855: // identifier
2047          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2048          return value;
2049        case 351608024: // version
2050          this.version = TypeConvertor.castToString(value); // StringType
2051          return value;
2052        case 3373707: // name
2053          this.name = TypeConvertor.castToString(value); // StringType
2054          return value;
2055        case 110371416: // title
2056          this.title = TypeConvertor.castToString(value); // StringType
2057          return value;
2058        case 1555503932: // shortTitle
2059          this.shortTitle = TypeConvertor.castToString(value); // StringType
2060          return value;
2061        case -2060497896: // subtitle
2062          this.subtitle = TypeConvertor.castToString(value); // StringType
2063          return value;
2064        case -892481550: // status
2065          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2066          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2067          return value;
2068        case -404562712: // experimental
2069          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
2070          return value;
2071        case -1867885268: // subject
2072          this.subject = TypeConvertor.castToType(value); // DataType
2073          return value;
2074        case 3076014: // date
2075          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2076          return value;
2077        case 1447404028: // publisher
2078          this.publisher = TypeConvertor.castToString(value); // StringType
2079          return value;
2080        case 951526432: // contact
2081          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2082          return value;
2083        case -1724546052: // description
2084          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
2085          return value;
2086        case 950398559: // comment
2087          this.getComment().add(TypeConvertor.castToString(value)); // StringType
2088          return value;
2089        case -669707736: // useContext
2090          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
2091          return value;
2092        case -507075711: // jurisdiction
2093          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
2094          return value;
2095        case -220463842: // purpose
2096          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
2097          return value;
2098        case 111574433: // usage
2099          this.usage = TypeConvertor.castToString(value); // StringType
2100          return value;
2101        case 1522889671: // copyright
2102          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
2103          return value;
2104        case 223539345: // approvalDate
2105          this.approvalDate = TypeConvertor.castToDate(value); // DateType
2106          return value;
2107        case -1687512484: // lastReviewDate
2108          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
2109          return value;
2110        case -403934648: // effectivePeriod
2111          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
2112          return value;
2113        case 110546223: // topic
2114          this.getTopic().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
2115          return value;
2116        case -1406328437: // author
2117          this.getAuthor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2118          return value;
2119        case -1307827859: // editor
2120          this.getEditor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2121          return value;
2122        case -261190139: // reviewer
2123          this.getReviewer().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2124          return value;
2125        case 1740277666: // endorser
2126          this.getEndorser().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2127          return value;
2128        case 666807069: // relatedArtifact
2129          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact
2130          return value;
2131        case 166208699: // library
2132          this.getLibrary().add(TypeConvertor.castToCanonical(value)); // CanonicalType
2133          return value;
2134        case -2023558323: // population
2135          this.population = TypeConvertor.castToReference(value); // Reference
2136          return value;
2137        case -1926005497: // exposure
2138          this.exposure = TypeConvertor.castToReference(value); // Reference
2139          return value;
2140        case -1875462106: // exposureAlternative
2141          this.exposureAlternative = TypeConvertor.castToReference(value); // Reference
2142          return value;
2143        case -1106507950: // outcome
2144          this.outcome = TypeConvertor.castToReference(value); // Reference
2145          return value;
2146        default: return super.setProperty(hash, name, value);
2147        }
2148
2149      }
2150
2151      @Override
2152      public Base setProperty(String name, Base value) throws FHIRException {
2153        if (name.equals("url")) {
2154          this.url = TypeConvertor.castToUri(value); // UriType
2155        } else if (name.equals("identifier")) {
2156          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2157        } else if (name.equals("version")) {
2158          this.version = TypeConvertor.castToString(value); // StringType
2159        } else if (name.equals("name")) {
2160          this.name = TypeConvertor.castToString(value); // StringType
2161        } else if (name.equals("title")) {
2162          this.title = TypeConvertor.castToString(value); // StringType
2163        } else if (name.equals("shortTitle")) {
2164          this.shortTitle = TypeConvertor.castToString(value); // StringType
2165        } else if (name.equals("subtitle")) {
2166          this.subtitle = TypeConvertor.castToString(value); // StringType
2167        } else if (name.equals("status")) {
2168          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2169          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2170        } else if (name.equals("experimental")) {
2171          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
2172        } else if (name.equals("subject[x]")) {
2173          this.subject = TypeConvertor.castToType(value); // DataType
2174        } else if (name.equals("date")) {
2175          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2176        } else if (name.equals("publisher")) {
2177          this.publisher = TypeConvertor.castToString(value); // StringType
2178        } else if (name.equals("contact")) {
2179          this.getContact().add(TypeConvertor.castToContactDetail(value));
2180        } else if (name.equals("description")) {
2181          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
2182        } else if (name.equals("comment")) {
2183          this.getComment().add(TypeConvertor.castToString(value));
2184        } else if (name.equals("useContext")) {
2185          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
2186        } else if (name.equals("jurisdiction")) {
2187          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value));
2188        } else if (name.equals("purpose")) {
2189          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
2190        } else if (name.equals("usage")) {
2191          this.usage = TypeConvertor.castToString(value); // StringType
2192        } else if (name.equals("copyright")) {
2193          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
2194        } else if (name.equals("approvalDate")) {
2195          this.approvalDate = TypeConvertor.castToDate(value); // DateType
2196        } else if (name.equals("lastReviewDate")) {
2197          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
2198        } else if (name.equals("effectivePeriod")) {
2199          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
2200        } else if (name.equals("topic")) {
2201          this.getTopic().add(TypeConvertor.castToCodeableConcept(value));
2202        } else if (name.equals("author")) {
2203          this.getAuthor().add(TypeConvertor.castToContactDetail(value));
2204        } else if (name.equals("editor")) {
2205          this.getEditor().add(TypeConvertor.castToContactDetail(value));
2206        } else if (name.equals("reviewer")) {
2207          this.getReviewer().add(TypeConvertor.castToContactDetail(value));
2208        } else if (name.equals("endorser")) {
2209          this.getEndorser().add(TypeConvertor.castToContactDetail(value));
2210        } else if (name.equals("relatedArtifact")) {
2211          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value));
2212        } else if (name.equals("library")) {
2213          this.getLibrary().add(TypeConvertor.castToCanonical(value));
2214        } else if (name.equals("population")) {
2215          this.population = TypeConvertor.castToReference(value); // Reference
2216        } else if (name.equals("exposure")) {
2217          this.exposure = TypeConvertor.castToReference(value); // Reference
2218        } else if (name.equals("exposureAlternative")) {
2219          this.exposureAlternative = TypeConvertor.castToReference(value); // Reference
2220        } else if (name.equals("outcome")) {
2221          this.outcome = TypeConvertor.castToReference(value); // Reference
2222        } else
2223          return super.setProperty(name, value);
2224        return value;
2225      }
2226
2227      @Override
2228      public Base makeProperty(int hash, String name) throws FHIRException {
2229        switch (hash) {
2230        case 116079:  return getUrlElement();
2231        case -1618432855:  return addIdentifier(); 
2232        case 351608024:  return getVersionElement();
2233        case 3373707:  return getNameElement();
2234        case 110371416:  return getTitleElement();
2235        case 1555503932:  return getShortTitleElement();
2236        case -2060497896:  return getSubtitleElement();
2237        case -892481550:  return getStatusElement();
2238        case -404562712:  return getExperimentalElement();
2239        case -573640748:  return getSubject();
2240        case -1867885268:  return getSubject();
2241        case 3076014:  return getDateElement();
2242        case 1447404028:  return getPublisherElement();
2243        case 951526432:  return addContact(); 
2244        case -1724546052:  return getDescriptionElement();
2245        case 950398559:  return addCommentElement();
2246        case -669707736:  return addUseContext(); 
2247        case -507075711:  return addJurisdiction(); 
2248        case -220463842:  return getPurposeElement();
2249        case 111574433:  return getUsageElement();
2250        case 1522889671:  return getCopyrightElement();
2251        case 223539345:  return getApprovalDateElement();
2252        case -1687512484:  return getLastReviewDateElement();
2253        case -403934648:  return getEffectivePeriod();
2254        case 110546223:  return addTopic(); 
2255        case -1406328437:  return addAuthor(); 
2256        case -1307827859:  return addEditor(); 
2257        case -261190139:  return addReviewer(); 
2258        case 1740277666:  return addEndorser(); 
2259        case 666807069:  return addRelatedArtifact(); 
2260        case 166208699:  return addLibraryElement();
2261        case -2023558323:  return getPopulation();
2262        case -1926005497:  return getExposure();
2263        case -1875462106:  return getExposureAlternative();
2264        case -1106507950:  return getOutcome();
2265        default: return super.makeProperty(hash, name);
2266        }
2267
2268      }
2269
2270      @Override
2271      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2272        switch (hash) {
2273        case 116079: /*url*/ return new String[] {"uri"};
2274        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2275        case 351608024: /*version*/ return new String[] {"string"};
2276        case 3373707: /*name*/ return new String[] {"string"};
2277        case 110371416: /*title*/ return new String[] {"string"};
2278        case 1555503932: /*shortTitle*/ return new String[] {"string"};
2279        case -2060497896: /*subtitle*/ return new String[] {"string"};
2280        case -892481550: /*status*/ return new String[] {"code"};
2281        case -404562712: /*experimental*/ return new String[] {"boolean"};
2282        case -1867885268: /*subject*/ return new String[] {"CodeableConcept", "Reference"};
2283        case 3076014: /*date*/ return new String[] {"dateTime"};
2284        case 1447404028: /*publisher*/ return new String[] {"string"};
2285        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
2286        case -1724546052: /*description*/ return new String[] {"markdown"};
2287        case 950398559: /*comment*/ return new String[] {"string"};
2288        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
2289        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
2290        case -220463842: /*purpose*/ return new String[] {"markdown"};
2291        case 111574433: /*usage*/ return new String[] {"string"};
2292        case 1522889671: /*copyright*/ return new String[] {"markdown"};
2293        case 223539345: /*approvalDate*/ return new String[] {"date"};
2294        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
2295        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
2296        case 110546223: /*topic*/ return new String[] {"CodeableConcept"};
2297        case -1406328437: /*author*/ return new String[] {"ContactDetail"};
2298        case -1307827859: /*editor*/ return new String[] {"ContactDetail"};
2299        case -261190139: /*reviewer*/ return new String[] {"ContactDetail"};
2300        case 1740277666: /*endorser*/ return new String[] {"ContactDetail"};
2301        case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"};
2302        case 166208699: /*library*/ return new String[] {"canonical"};
2303        case -2023558323: /*population*/ return new String[] {"Reference"};
2304        case -1926005497: /*exposure*/ return new String[] {"Reference"};
2305        case -1875462106: /*exposureAlternative*/ return new String[] {"Reference"};
2306        case -1106507950: /*outcome*/ return new String[] {"Reference"};
2307        default: return super.getTypesForProperty(hash, name);
2308        }
2309
2310      }
2311
2312      @Override
2313      public Base addChild(String name) throws FHIRException {
2314        if (name.equals("url")) {
2315          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.url");
2316        }
2317        else if (name.equals("identifier")) {
2318          return addIdentifier();
2319        }
2320        else if (name.equals("version")) {
2321          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.version");
2322        }
2323        else if (name.equals("name")) {
2324          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.name");
2325        }
2326        else if (name.equals("title")) {
2327          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.title");
2328        }
2329        else if (name.equals("shortTitle")) {
2330          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.shortTitle");
2331        }
2332        else if (name.equals("subtitle")) {
2333          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.subtitle");
2334        }
2335        else if (name.equals("status")) {
2336          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.status");
2337        }
2338        else if (name.equals("experimental")) {
2339          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.experimental");
2340        }
2341        else if (name.equals("subjectCodeableConcept")) {
2342          this.subject = new CodeableConcept();
2343          return this.subject;
2344        }
2345        else if (name.equals("subjectReference")) {
2346          this.subject = new Reference();
2347          return this.subject;
2348        }
2349        else if (name.equals("date")) {
2350          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.date");
2351        }
2352        else if (name.equals("publisher")) {
2353          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.publisher");
2354        }
2355        else if (name.equals("contact")) {
2356          return addContact();
2357        }
2358        else if (name.equals("description")) {
2359          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.description");
2360        }
2361        else if (name.equals("comment")) {
2362          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.comment");
2363        }
2364        else if (name.equals("useContext")) {
2365          return addUseContext();
2366        }
2367        else if (name.equals("jurisdiction")) {
2368          return addJurisdiction();
2369        }
2370        else if (name.equals("purpose")) {
2371          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.purpose");
2372        }
2373        else if (name.equals("usage")) {
2374          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.usage");
2375        }
2376        else if (name.equals("copyright")) {
2377          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.copyright");
2378        }
2379        else if (name.equals("approvalDate")) {
2380          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.approvalDate");
2381        }
2382        else if (name.equals("lastReviewDate")) {
2383          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.lastReviewDate");
2384        }
2385        else if (name.equals("effectivePeriod")) {
2386          this.effectivePeriod = new Period();
2387          return this.effectivePeriod;
2388        }
2389        else if (name.equals("topic")) {
2390          return addTopic();
2391        }
2392        else if (name.equals("author")) {
2393          return addAuthor();
2394        }
2395        else if (name.equals("editor")) {
2396          return addEditor();
2397        }
2398        else if (name.equals("reviewer")) {
2399          return addReviewer();
2400        }
2401        else if (name.equals("endorser")) {
2402          return addEndorser();
2403        }
2404        else if (name.equals("relatedArtifact")) {
2405          return addRelatedArtifact();
2406        }
2407        else if (name.equals("library")) {
2408          throw new FHIRException("Cannot call addChild on a primitive type ResearchDefinition.library");
2409        }
2410        else if (name.equals("population")) {
2411          this.population = new Reference();
2412          return this.population;
2413        }
2414        else if (name.equals("exposure")) {
2415          this.exposure = new Reference();
2416          return this.exposure;
2417        }
2418        else if (name.equals("exposureAlternative")) {
2419          this.exposureAlternative = new Reference();
2420          return this.exposureAlternative;
2421        }
2422        else if (name.equals("outcome")) {
2423          this.outcome = new Reference();
2424          return this.outcome;
2425        }
2426        else
2427          return super.addChild(name);
2428      }
2429
2430  public String fhirType() {
2431    return "ResearchDefinition";
2432
2433  }
2434
2435      public ResearchDefinition copy() {
2436        ResearchDefinition dst = new ResearchDefinition();
2437        copyValues(dst);
2438        return dst;
2439      }
2440
2441      public void copyValues(ResearchDefinition dst) {
2442        super.copyValues(dst);
2443        dst.url = url == null ? null : url.copy();
2444        if (identifier != null) {
2445          dst.identifier = new ArrayList<Identifier>();
2446          for (Identifier i : identifier)
2447            dst.identifier.add(i.copy());
2448        };
2449        dst.version = version == null ? null : version.copy();
2450        dst.name = name == null ? null : name.copy();
2451        dst.title = title == null ? null : title.copy();
2452        dst.shortTitle = shortTitle == null ? null : shortTitle.copy();
2453        dst.subtitle = subtitle == null ? null : subtitle.copy();
2454        dst.status = status == null ? null : status.copy();
2455        dst.experimental = experimental == null ? null : experimental.copy();
2456        dst.subject = subject == null ? null : subject.copy();
2457        dst.date = date == null ? null : date.copy();
2458        dst.publisher = publisher == null ? null : publisher.copy();
2459        if (contact != null) {
2460          dst.contact = new ArrayList<ContactDetail>();
2461          for (ContactDetail i : contact)
2462            dst.contact.add(i.copy());
2463        };
2464        dst.description = description == null ? null : description.copy();
2465        if (comment != null) {
2466          dst.comment = new ArrayList<StringType>();
2467          for (StringType i : comment)
2468            dst.comment.add(i.copy());
2469        };
2470        if (useContext != null) {
2471          dst.useContext = new ArrayList<UsageContext>();
2472          for (UsageContext i : useContext)
2473            dst.useContext.add(i.copy());
2474        };
2475        if (jurisdiction != null) {
2476          dst.jurisdiction = new ArrayList<CodeableConcept>();
2477          for (CodeableConcept i : jurisdiction)
2478            dst.jurisdiction.add(i.copy());
2479        };
2480        dst.purpose = purpose == null ? null : purpose.copy();
2481        dst.usage = usage == null ? null : usage.copy();
2482        dst.copyright = copyright == null ? null : copyright.copy();
2483        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
2484        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
2485        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
2486        if (topic != null) {
2487          dst.topic = new ArrayList<CodeableConcept>();
2488          for (CodeableConcept i : topic)
2489            dst.topic.add(i.copy());
2490        };
2491        if (author != null) {
2492          dst.author = new ArrayList<ContactDetail>();
2493          for (ContactDetail i : author)
2494            dst.author.add(i.copy());
2495        };
2496        if (editor != null) {
2497          dst.editor = new ArrayList<ContactDetail>();
2498          for (ContactDetail i : editor)
2499            dst.editor.add(i.copy());
2500        };
2501        if (reviewer != null) {
2502          dst.reviewer = new ArrayList<ContactDetail>();
2503          for (ContactDetail i : reviewer)
2504            dst.reviewer.add(i.copy());
2505        };
2506        if (endorser != null) {
2507          dst.endorser = new ArrayList<ContactDetail>();
2508          for (ContactDetail i : endorser)
2509            dst.endorser.add(i.copy());
2510        };
2511        if (relatedArtifact != null) {
2512          dst.relatedArtifact = new ArrayList<RelatedArtifact>();
2513          for (RelatedArtifact i : relatedArtifact)
2514            dst.relatedArtifact.add(i.copy());
2515        };
2516        if (library != null) {
2517          dst.library = new ArrayList<CanonicalType>();
2518          for (CanonicalType i : library)
2519            dst.library.add(i.copy());
2520        };
2521        dst.population = population == null ? null : population.copy();
2522        dst.exposure = exposure == null ? null : exposure.copy();
2523        dst.exposureAlternative = exposureAlternative == null ? null : exposureAlternative.copy();
2524        dst.outcome = outcome == null ? null : outcome.copy();
2525      }
2526
2527      protected ResearchDefinition typedCopy() {
2528        return copy();
2529      }
2530
2531      @Override
2532      public boolean equalsDeep(Base other_) {
2533        if (!super.equalsDeep(other_))
2534          return false;
2535        if (!(other_ instanceof ResearchDefinition))
2536          return false;
2537        ResearchDefinition o = (ResearchDefinition) other_;
2538        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
2539           && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(shortTitle, o.shortTitle, true)
2540           && compareDeep(subtitle, o.subtitle, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true)
2541           && compareDeep(subject, o.subject, true) && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true)
2542           && compareDeep(contact, o.contact, true) && compareDeep(description, o.description, true) && compareDeep(comment, o.comment, true)
2543           && compareDeep(useContext, o.useContext, true) && compareDeep(jurisdiction, o.jurisdiction, true)
2544           && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true) && compareDeep(copyright, o.copyright, true)
2545           && compareDeep(approvalDate, o.approvalDate, true) && compareDeep(lastReviewDate, o.lastReviewDate, true)
2546           && compareDeep(effectivePeriod, o.effectivePeriod, true) && compareDeep(topic, o.topic, true) && compareDeep(author, o.author, true)
2547           && compareDeep(editor, o.editor, true) && compareDeep(reviewer, o.reviewer, true) && compareDeep(endorser, o.endorser, true)
2548           && compareDeep(relatedArtifact, o.relatedArtifact, true) && compareDeep(library, o.library, true)
2549           && compareDeep(population, o.population, true) && compareDeep(exposure, o.exposure, true) && compareDeep(exposureAlternative, o.exposureAlternative, true)
2550           && compareDeep(outcome, o.outcome, true);
2551      }
2552
2553      @Override
2554      public boolean equalsShallow(Base other_) {
2555        if (!super.equalsShallow(other_))
2556          return false;
2557        if (!(other_ instanceof ResearchDefinition))
2558          return false;
2559        ResearchDefinition o = (ResearchDefinition) other_;
2560        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
2561           && compareValues(title, o.title, true) && compareValues(shortTitle, o.shortTitle, true) && compareValues(subtitle, o.subtitle, true)
2562           && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true)
2563           && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(comment, o.comment, true)
2564           && compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true) && compareValues(copyright, o.copyright, true)
2565           && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true)
2566           && compareValues(library, o.library, true);
2567      }
2568
2569      public boolean isEmpty() {
2570        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
2571          , name, title, shortTitle, subtitle, status, experimental, subject, date, publisher
2572          , contact, description, comment, useContext, jurisdiction, purpose, usage, copyright
2573          , approvalDate, lastReviewDate, effectivePeriod, topic, author, editor, reviewer
2574          , endorser, relatedArtifact, library, population, exposure, exposureAlternative
2575          , outcome);
2576      }
2577
2578  @Override
2579  public ResourceType getResourceType() {
2580    return ResourceType.ResearchDefinition;
2581   }
2582
2583 /**
2584   * Search parameter: <b>composed-of</b>
2585   * <p>
2586   * Description: <b>What resource is being referenced</b><br>
2587   * Type: <b>reference</b><br>
2588   * Path: <b>ResearchDefinition.relatedArtifact.where(type='composed-of').resource</b><br>
2589   * </p>
2590   */
2591  @SearchParamDefinition(name="composed-of", path="ResearchDefinition.relatedArtifact.where(type='composed-of').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2592  public static final String SP_COMPOSED_OF = "composed-of";
2593 /**
2594   * <b>Fluent Client</b> search parameter constant for <b>composed-of</b>
2595   * <p>
2596   * Description: <b>What resource is being referenced</b><br>
2597   * Type: <b>reference</b><br>
2598   * Path: <b>ResearchDefinition.relatedArtifact.where(type='composed-of').resource</b><br>
2599   * </p>
2600   */
2601  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSED_OF);
2602
2603/**
2604   * Constant for fluent queries to be used to add include statements. Specifies
2605   * the path value of "<b>ResearchDefinition:composed-of</b>".
2606   */
2607  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include("ResearchDefinition:composed-of").toLocked();
2608
2609 /**
2610   * Search parameter: <b>context-quantity</b>
2611   * <p>
2612   * Description: <b>A quantity- or range-valued use context assigned to the research definition</b><br>
2613   * Type: <b>quantity</b><br>
2614   * Path: <b>(ResearchDefinition.useContext.value as Quantity) | (ResearchDefinition.useContext.value as Range)</b><br>
2615   * </p>
2616   */
2617  @SearchParamDefinition(name="context-quantity", path="(ResearchDefinition.useContext.value as Quantity) | (ResearchDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the research definition", type="quantity" )
2618  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
2619 /**
2620   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
2621   * <p>
2622   * Description: <b>A quantity- or range-valued use context assigned to the research definition</b><br>
2623   * Type: <b>quantity</b><br>
2624   * Path: <b>(ResearchDefinition.useContext.value as Quantity) | (ResearchDefinition.useContext.value as Range)</b><br>
2625   * </p>
2626   */
2627  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
2628
2629 /**
2630   * Search parameter: <b>context-type-quantity</b>
2631   * <p>
2632   * Description: <b>A use context type and quantity- or range-based value assigned to the research definition</b><br>
2633   * Type: <b>composite</b><br>
2634   * Path: <b>ResearchDefinition.useContext</b><br>
2635   * </p>
2636   */
2637  @SearchParamDefinition(name="context-type-quantity", path="ResearchDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the research definition", type="composite", compositeOf={"context-type", "context-quantity"} )
2638  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
2639 /**
2640   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
2641   * <p>
2642   * Description: <b>A use context type and quantity- or range-based value assigned to the research definition</b><br>
2643   * Type: <b>composite</b><br>
2644   * Path: <b>ResearchDefinition.useContext</b><br>
2645   * </p>
2646   */
2647  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);
2648
2649 /**
2650   * Search parameter: <b>context-type-value</b>
2651   * <p>
2652   * Description: <b>A use context type and value assigned to the research definition</b><br>
2653   * Type: <b>composite</b><br>
2654   * Path: <b>ResearchDefinition.useContext</b><br>
2655   * </p>
2656   */
2657  @SearchParamDefinition(name="context-type-value", path="ResearchDefinition.useContext", description="A use context type and value assigned to the research definition", type="composite", compositeOf={"context-type", "context"} )
2658  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
2659 /**
2660   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
2661   * <p>
2662   * Description: <b>A use context type and value assigned to the research definition</b><br>
2663   * Type: <b>composite</b><br>
2664   * Path: <b>ResearchDefinition.useContext</b><br>
2665   * </p>
2666   */
2667  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);
2668
2669 /**
2670   * Search parameter: <b>context-type</b>
2671   * <p>
2672   * Description: <b>A type of use context assigned to the research definition</b><br>
2673   * Type: <b>token</b><br>
2674   * Path: <b>ResearchDefinition.useContext.code</b><br>
2675   * </p>
2676   */
2677  @SearchParamDefinition(name="context-type", path="ResearchDefinition.useContext.code", description="A type of use context assigned to the research definition", type="token" )
2678  public static final String SP_CONTEXT_TYPE = "context-type";
2679 /**
2680   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
2681   * <p>
2682   * Description: <b>A type of use context assigned to the research definition</b><br>
2683   * Type: <b>token</b><br>
2684   * Path: <b>ResearchDefinition.useContext.code</b><br>
2685   * </p>
2686   */
2687  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
2688
2689 /**
2690   * Search parameter: <b>context</b>
2691   * <p>
2692   * Description: <b>A use context assigned to the research definition</b><br>
2693   * Type: <b>token</b><br>
2694   * Path: <b>(ResearchDefinition.useContext.value as CodeableConcept)</b><br>
2695   * </p>
2696   */
2697  @SearchParamDefinition(name="context", path="(ResearchDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the research definition", type="token" )
2698  public static final String SP_CONTEXT = "context";
2699 /**
2700   * <b>Fluent Client</b> search parameter constant for <b>context</b>
2701   * <p>
2702   * Description: <b>A use context assigned to the research definition</b><br>
2703   * Type: <b>token</b><br>
2704   * Path: <b>(ResearchDefinition.useContext.value as CodeableConcept)</b><br>
2705   * </p>
2706   */
2707  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
2708
2709 /**
2710   * Search parameter: <b>date</b>
2711   * <p>
2712   * Description: <b>The research definition publication date</b><br>
2713   * Type: <b>date</b><br>
2714   * Path: <b>ResearchDefinition.date</b><br>
2715   * </p>
2716   */
2717  @SearchParamDefinition(name="date", path="ResearchDefinition.date", description="The research definition publication date", type="date" )
2718  public static final String SP_DATE = "date";
2719 /**
2720   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2721   * <p>
2722   * Description: <b>The research definition publication date</b><br>
2723   * Type: <b>date</b><br>
2724   * Path: <b>ResearchDefinition.date</b><br>
2725   * </p>
2726   */
2727  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2728
2729 /**
2730   * Search parameter: <b>depends-on</b>
2731   * <p>
2732   * Description: <b>What resource is being referenced</b><br>
2733   * Type: <b>reference</b><br>
2734   * Path: <b>ResearchDefinition.relatedArtifact.where(type='depends-on').resource | ResearchDefinition.library</b><br>
2735   * </p>
2736   */
2737  @SearchParamDefinition(name="depends-on", path="ResearchDefinition.relatedArtifact.where(type='depends-on').resource | ResearchDefinition.library", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2738  public static final String SP_DEPENDS_ON = "depends-on";
2739 /**
2740   * <b>Fluent Client</b> search parameter constant for <b>depends-on</b>
2741   * <p>
2742   * Description: <b>What resource is being referenced</b><br>
2743   * Type: <b>reference</b><br>
2744   * Path: <b>ResearchDefinition.relatedArtifact.where(type='depends-on').resource | ResearchDefinition.library</b><br>
2745   * </p>
2746   */
2747  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON);
2748
2749/**
2750   * Constant for fluent queries to be used to add include statements. Specifies
2751   * the path value of "<b>ResearchDefinition:depends-on</b>".
2752   */
2753  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("ResearchDefinition:depends-on").toLocked();
2754
2755 /**
2756   * Search parameter: <b>derived-from</b>
2757   * <p>
2758   * Description: <b>What resource is being referenced</b><br>
2759   * Type: <b>reference</b><br>
2760   * Path: <b>ResearchDefinition.relatedArtifact.where(type='derived-from').resource</b><br>
2761   * </p>
2762   */
2763  @SearchParamDefinition(name="derived-from", path="ResearchDefinition.relatedArtifact.where(type='derived-from').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2764  public static final String SP_DERIVED_FROM = "derived-from";
2765 /**
2766   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
2767   * <p>
2768   * Description: <b>What resource is being referenced</b><br>
2769   * Type: <b>reference</b><br>
2770   * Path: <b>ResearchDefinition.relatedArtifact.where(type='derived-from').resource</b><br>
2771   * </p>
2772   */
2773  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM);
2774
2775/**
2776   * Constant for fluent queries to be used to add include statements. Specifies
2777   * the path value of "<b>ResearchDefinition:derived-from</b>".
2778   */
2779  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("ResearchDefinition:derived-from").toLocked();
2780
2781 /**
2782   * Search parameter: <b>description</b>
2783   * <p>
2784   * Description: <b>The description of the research definition</b><br>
2785   * Type: <b>string</b><br>
2786   * Path: <b>ResearchDefinition.description</b><br>
2787   * </p>
2788   */
2789  @SearchParamDefinition(name="description", path="ResearchDefinition.description", description="The description of the research definition", type="string" )
2790  public static final String SP_DESCRIPTION = "description";
2791 /**
2792   * <b>Fluent Client</b> search parameter constant for <b>description</b>
2793   * <p>
2794   * Description: <b>The description of the research definition</b><br>
2795   * Type: <b>string</b><br>
2796   * Path: <b>ResearchDefinition.description</b><br>
2797   * </p>
2798   */
2799  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
2800
2801 /**
2802   * Search parameter: <b>effective</b>
2803   * <p>
2804   * Description: <b>The time during which the research definition is intended to be in use</b><br>
2805   * Type: <b>date</b><br>
2806   * Path: <b>ResearchDefinition.effectivePeriod</b><br>
2807   * </p>
2808   */
2809  @SearchParamDefinition(name="effective", path="ResearchDefinition.effectivePeriod", description="The time during which the research definition is intended to be in use", type="date" )
2810  public static final String SP_EFFECTIVE = "effective";
2811 /**
2812   * <b>Fluent Client</b> search parameter constant for <b>effective</b>
2813   * <p>
2814   * Description: <b>The time during which the research definition is intended to be in use</b><br>
2815   * Type: <b>date</b><br>
2816   * Path: <b>ResearchDefinition.effectivePeriod</b><br>
2817   * </p>
2818   */
2819  public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE);
2820
2821 /**
2822   * Search parameter: <b>identifier</b>
2823   * <p>
2824   * Description: <b>External identifier for the research definition</b><br>
2825   * Type: <b>token</b><br>
2826   * Path: <b>ResearchDefinition.identifier</b><br>
2827   * </p>
2828   */
2829  @SearchParamDefinition(name="identifier", path="ResearchDefinition.identifier", description="External identifier for the research definition", type="token" )
2830  public static final String SP_IDENTIFIER = "identifier";
2831 /**
2832   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2833   * <p>
2834   * Description: <b>External identifier for the research definition</b><br>
2835   * Type: <b>token</b><br>
2836   * Path: <b>ResearchDefinition.identifier</b><br>
2837   * </p>
2838   */
2839  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2840
2841 /**
2842   * Search parameter: <b>jurisdiction</b>
2843   * <p>
2844   * Description: <b>Intended jurisdiction for the research definition</b><br>
2845   * Type: <b>token</b><br>
2846   * Path: <b>ResearchDefinition.jurisdiction</b><br>
2847   * </p>
2848   */
2849  @SearchParamDefinition(name="jurisdiction", path="ResearchDefinition.jurisdiction", description="Intended jurisdiction for the research definition", type="token" )
2850  public static final String SP_JURISDICTION = "jurisdiction";
2851 /**
2852   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
2853   * <p>
2854   * Description: <b>Intended jurisdiction for the research definition</b><br>
2855   * Type: <b>token</b><br>
2856   * Path: <b>ResearchDefinition.jurisdiction</b><br>
2857   * </p>
2858   */
2859  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
2860
2861 /**
2862   * Search parameter: <b>name</b>
2863   * <p>
2864   * Description: <b>Computationally friendly name of the research definition</b><br>
2865   * Type: <b>string</b><br>
2866   * Path: <b>ResearchDefinition.name</b><br>
2867   * </p>
2868   */
2869  @SearchParamDefinition(name="name", path="ResearchDefinition.name", description="Computationally friendly name of the research definition", type="string" )
2870  public static final String SP_NAME = "name";
2871 /**
2872   * <b>Fluent Client</b> search parameter constant for <b>name</b>
2873   * <p>
2874   * Description: <b>Computationally friendly name of the research definition</b><br>
2875   * Type: <b>string</b><br>
2876   * Path: <b>ResearchDefinition.name</b><br>
2877   * </p>
2878   */
2879  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
2880
2881 /**
2882   * Search parameter: <b>predecessor</b>
2883   * <p>
2884   * Description: <b>What resource is being referenced</b><br>
2885   * Type: <b>reference</b><br>
2886   * Path: <b>ResearchDefinition.relatedArtifact.where(type='predecessor').resource</b><br>
2887   * </p>
2888   */
2889  @SearchParamDefinition(name="predecessor", path="ResearchDefinition.relatedArtifact.where(type='predecessor').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2890  public static final String SP_PREDECESSOR = "predecessor";
2891 /**
2892   * <b>Fluent Client</b> search parameter constant for <b>predecessor</b>
2893   * <p>
2894   * Description: <b>What resource is being referenced</b><br>
2895   * Type: <b>reference</b><br>
2896   * Path: <b>ResearchDefinition.relatedArtifact.where(type='predecessor').resource</b><br>
2897   * </p>
2898   */
2899  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREDECESSOR);
2900
2901/**
2902   * Constant for fluent queries to be used to add include statements. Specifies
2903   * the path value of "<b>ResearchDefinition:predecessor</b>".
2904   */
2905  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include("ResearchDefinition:predecessor").toLocked();
2906
2907 /**
2908   * Search parameter: <b>publisher</b>
2909   * <p>
2910   * Description: <b>Name of the publisher of the research definition</b><br>
2911   * Type: <b>string</b><br>
2912   * Path: <b>ResearchDefinition.publisher</b><br>
2913   * </p>
2914   */
2915  @SearchParamDefinition(name="publisher", path="ResearchDefinition.publisher", description="Name of the publisher of the research definition", type="string" )
2916  public static final String SP_PUBLISHER = "publisher";
2917 /**
2918   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
2919   * <p>
2920   * Description: <b>Name of the publisher of the research definition</b><br>
2921   * Type: <b>string</b><br>
2922   * Path: <b>ResearchDefinition.publisher</b><br>
2923   * </p>
2924   */
2925  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
2926
2927 /**
2928   * Search parameter: <b>status</b>
2929   * <p>
2930   * Description: <b>The current status of the research definition</b><br>
2931   * Type: <b>token</b><br>
2932   * Path: <b>ResearchDefinition.status</b><br>
2933   * </p>
2934   */
2935  @SearchParamDefinition(name="status", path="ResearchDefinition.status", description="The current status of the research definition", type="token" )
2936  public static final String SP_STATUS = "status";
2937 /**
2938   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2939   * <p>
2940   * Description: <b>The current status of the research definition</b><br>
2941   * Type: <b>token</b><br>
2942   * Path: <b>ResearchDefinition.status</b><br>
2943   * </p>
2944   */
2945  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2946
2947 /**
2948   * Search parameter: <b>successor</b>
2949   * <p>
2950   * Description: <b>What resource is being referenced</b><br>
2951   * Type: <b>reference</b><br>
2952   * Path: <b>ResearchDefinition.relatedArtifact.where(type='successor').resource</b><br>
2953   * </p>
2954   */
2955  @SearchParamDefinition(name="successor", path="ResearchDefinition.relatedArtifact.where(type='successor').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2956  public static final String SP_SUCCESSOR = "successor";
2957 /**
2958   * <b>Fluent Client</b> search parameter constant for <b>successor</b>
2959   * <p>
2960   * Description: <b>What resource is being referenced</b><br>
2961   * Type: <b>reference</b><br>
2962   * Path: <b>ResearchDefinition.relatedArtifact.where(type='successor').resource</b><br>
2963   * </p>
2964   */
2965  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUCCESSOR);
2966
2967/**
2968   * Constant for fluent queries to be used to add include statements. Specifies
2969   * the path value of "<b>ResearchDefinition:successor</b>".
2970   */
2971  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include("ResearchDefinition:successor").toLocked();
2972
2973 /**
2974   * Search parameter: <b>title</b>
2975   * <p>
2976   * Description: <b>The human-friendly name of the research definition</b><br>
2977   * Type: <b>string</b><br>
2978   * Path: <b>ResearchDefinition.title</b><br>
2979   * </p>
2980   */
2981  @SearchParamDefinition(name="title", path="ResearchDefinition.title", description="The human-friendly name of the research definition", type="string" )
2982  public static final String SP_TITLE = "title";
2983 /**
2984   * <b>Fluent Client</b> search parameter constant for <b>title</b>
2985   * <p>
2986   * Description: <b>The human-friendly name of the research definition</b><br>
2987   * Type: <b>string</b><br>
2988   * Path: <b>ResearchDefinition.title</b><br>
2989   * </p>
2990   */
2991  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
2992
2993 /**
2994   * Search parameter: <b>topic</b>
2995   * <p>
2996   * Description: <b>Topics associated with the ResearchDefinition</b><br>
2997   * Type: <b>token</b><br>
2998   * Path: <b>ResearchDefinition.topic</b><br>
2999   * </p>
3000   */
3001  @SearchParamDefinition(name="topic", path="ResearchDefinition.topic", description="Topics associated with the ResearchDefinition", type="token" )
3002  public static final String SP_TOPIC = "topic";
3003 /**
3004   * <b>Fluent Client</b> search parameter constant for <b>topic</b>
3005   * <p>
3006   * Description: <b>Topics associated with the ResearchDefinition</b><br>
3007   * Type: <b>token</b><br>
3008   * Path: <b>ResearchDefinition.topic</b><br>
3009   * </p>
3010   */
3011  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC);
3012
3013 /**
3014   * Search parameter: <b>url</b>
3015   * <p>
3016   * Description: <b>The uri that identifies the research definition</b><br>
3017   * Type: <b>uri</b><br>
3018   * Path: <b>ResearchDefinition.url</b><br>
3019   * </p>
3020   */
3021  @SearchParamDefinition(name="url", path="ResearchDefinition.url", description="The uri that identifies the research definition", type="uri" )
3022  public static final String SP_URL = "url";
3023 /**
3024   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3025   * <p>
3026   * Description: <b>The uri that identifies the research definition</b><br>
3027   * Type: <b>uri</b><br>
3028   * Path: <b>ResearchDefinition.url</b><br>
3029   * </p>
3030   */
3031  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3032
3033 /**
3034   * Search parameter: <b>version</b>
3035   * <p>
3036   * Description: <b>The business version of the research definition</b><br>
3037   * Type: <b>token</b><br>
3038   * Path: <b>ResearchDefinition.version</b><br>
3039   * </p>
3040   */
3041  @SearchParamDefinition(name="version", path="ResearchDefinition.version", description="The business version of the research definition", type="token" )
3042  public static final String SP_VERSION = "version";
3043 /**
3044   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3045   * <p>
3046   * Description: <b>The business version of the research definition</b><br>
3047   * Type: <b>token</b><br>
3048   * Path: <b>ResearchDefinition.version</b><br>
3049   * </p>
3050   */
3051  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
3052
3053
3054}
3055