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