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