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