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