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