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