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