001package org.hl7.fhir.dstu3.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.dstu3
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 Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x
053import java.util.ArrayList;
054import java.util.Date;
055import java.util.List;
056
057import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus;
058import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatusEnumFactory;
059import org.hl7.fhir.exceptions.FHIRException;
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 ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.
069 */
070@ResourceDef(name="ServiceDefinition", profile="http://hl7.org/fhir/Profile/ServiceDefinition")
071@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "description", "purpose", "usage", "approvalDate", "lastReviewDate", "effectivePeriod", "useContext", "jurisdiction", "topic", "contributor", "contact", "copyright", "relatedArtifact", "trigger", "dataRequirement", "operationDefinition"})
072public class ServiceDefinition extends MetadataResource {
073
074    /**
075     * A formal identifier that is used to identify this service definition when it is represented in other formats, or referenced in a specification, model, design or an instance. This is used for CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.
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 service definition", formalDefinition="A formal identifier that is used to identify this service definition when it is represented in other formats, or referenced in a specification, model, design or an instance. This is used for CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts." )
079    protected List<Identifier> identifier;
080
081    /**
082     * Explaination of why this service definition is needed and why it has been designed as it has.
083     */
084    @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
085    @Description(shortDefinition="Why this service definition is defined", formalDefinition="Explaination of why this service definition is needed and why it has been designed as it has." )
086    protected MarkdownType purpose;
087
088    /**
089     * A detailed description of how the module is used from a clinical perspective.
090     */
091    @Child(name = "usage", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
092    @Description(shortDefinition="Describes the clinical usage of the module", formalDefinition="A detailed description of how the module is used from a clinical perspective." )
093    protected StringType usage;
094
095    /**
096     * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
097     */
098    @Child(name = "approvalDate", type = {DateType.class}, order=3, min=0, max=1, modifier=false, summary=false)
099    @Description(shortDefinition="When the service 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." )
100    protected DateType approvalDate;
101
102    /**
103     * The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
104     */
105    @Child(name = "lastReviewDate", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=false)
106    @Description(shortDefinition="When the service definition was last reviewed", formalDefinition="The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date." )
107    protected DateType lastReviewDate;
108
109    /**
110     * The period during which the service definition content was or is planned to be in active use.
111     */
112    @Child(name = "effectivePeriod", type = {Period.class}, order=5, min=0, max=1, modifier=false, summary=true)
113    @Description(shortDefinition="When the service definition is expected to be used", formalDefinition="The period during which the service definition content was or is planned to be in active use." )
114    protected Period effectivePeriod;
115
116    /**
117     * Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.
118     */
119    @Child(name = "topic", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
120    @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." )
121    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/definition-topic")
122    protected List<CodeableConcept> topic;
123
124    /**
125     * A contributor to the content of the module, including authors, editors, reviewers, and endorsers.
126     */
127    @Child(name = "contributor", type = {Contributor.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
128    @Description(shortDefinition="A content contributor", formalDefinition="A contributor to the content of the module, including authors, editors, reviewers, and endorsers." )
129    protected List<Contributor> contributor;
130
131    /**
132     * A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.
133     */
134    @Child(name = "copyright", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=false)
135    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition." )
136    protected MarkdownType copyright;
137
138    /**
139     * Related resources such as additional documentation, justification, or bibliographic references.
140     */
141    @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
142    @Description(shortDefinition="Additional documentation, citations, etc", formalDefinition="Related resources such as additional documentation, justification, or bibliographic references." )
143    protected List<RelatedArtifact> relatedArtifact;
144
145    /**
146     * The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.
147     */
148    @Child(name = "trigger", type = {TriggerDefinition.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
149    @Description(shortDefinition="\"when\" the module should be invoked", formalDefinition="The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow." )
150    protected List<TriggerDefinition> trigger;
151
152    /**
153     * Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.
154     */
155    @Child(name = "dataRequirement", type = {DataRequirement.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
156    @Description(shortDefinition="What data is used by the module", formalDefinition="Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation." )
157    protected List<DataRequirement> dataRequirement;
158
159    /**
160     * A reference to the operation that is used to invoke this service.
161     */
162    @Child(name = "operationDefinition", type = {OperationDefinition.class}, order=12, min=0, max=1, modifier=false, summary=false)
163    @Description(shortDefinition="Operation to invoke", formalDefinition="A reference to the operation that is used to invoke this service." )
164    protected Reference operationDefinition;
165
166    /**
167     * The actual object that is the target of the reference (A reference to the operation that is used to invoke this service.)
168     */
169    protected OperationDefinition operationDefinitionTarget;
170
171    private static final long serialVersionUID = -1517933892L;
172
173  /**
174   * Constructor
175   */
176    public ServiceDefinition() {
177      super();
178    }
179
180  /**
181   * Constructor
182   */
183    public ServiceDefinition(Enumeration<PublicationStatus> status) {
184      super();
185      this.status = status;
186    }
187
188    /**
189     * @return {@link #url} (An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
190     */
191    public UriType getUrlElement() { 
192      if (this.url == null)
193        if (Configuration.errorOnAutoCreate())
194          throw new Error("Attempt to auto-create ServiceDefinition.url");
195        else if (Configuration.doAutoCreate())
196          this.url = new UriType(); // bb
197      return this.url;
198    }
199
200    public boolean hasUrlElement() { 
201      return this.url != null && !this.url.isEmpty();
202    }
203
204    public boolean hasUrl() { 
205      return this.url != null && !this.url.isEmpty();
206    }
207
208    /**
209     * @param value {@link #url} (An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
210     */
211    public ServiceDefinition setUrlElement(UriType value) { 
212      this.url = value;
213      return this;
214    }
215
216    /**
217     * @return An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).
218     */
219    public String getUrl() { 
220      return this.url == null ? null : this.url.getValue();
221    }
222
223    /**
224     * @param value An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).
225     */
226    public ServiceDefinition setUrl(String value) { 
227      if (Utilities.noString(value))
228        this.url = null;
229      else {
230        if (this.url == null)
231          this.url = new UriType();
232        this.url.setValue(value);
233      }
234      return this;
235    }
236
237    /**
238     * @return {@link #identifier} (A formal identifier that is used to identify this service definition when it is represented in other formats, or referenced in a specification, model, design or an instance. This is used for CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.)
239     */
240    public List<Identifier> getIdentifier() { 
241      if (this.identifier == null)
242        this.identifier = new ArrayList<Identifier>();
243      return this.identifier;
244    }
245
246    /**
247     * @return Returns a reference to <code>this</code> for easy method chaining
248     */
249    public ServiceDefinition setIdentifier(List<Identifier> theIdentifier) { 
250      this.identifier = theIdentifier;
251      return this;
252    }
253
254    public boolean hasIdentifier() { 
255      if (this.identifier == null)
256        return false;
257      for (Identifier item : this.identifier)
258        if (!item.isEmpty())
259          return true;
260      return false;
261    }
262
263    public Identifier addIdentifier() { //3
264      Identifier t = new Identifier();
265      if (this.identifier == null)
266        this.identifier = new ArrayList<Identifier>();
267      this.identifier.add(t);
268      return t;
269    }
270
271    public ServiceDefinition addIdentifier(Identifier t) { //3
272      if (t == null)
273        return this;
274      if (this.identifier == null)
275        this.identifier = new ArrayList<Identifier>();
276      this.identifier.add(t);
277      return this;
278    }
279
280    /**
281     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
282     */
283    public Identifier getIdentifierFirstRep() { 
284      if (getIdentifier().isEmpty()) {
285        addIdentifier();
286      }
287      return getIdentifier().get(0);
288    }
289
290    /**
291     * @return {@link #version} (The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service 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
292     */
293    public StringType getVersionElement() { 
294      if (this.version == null)
295        if (Configuration.errorOnAutoCreate())
296          throw new Error("Attempt to auto-create ServiceDefinition.version");
297        else if (Configuration.doAutoCreate())
298          this.version = new StringType(); // bb
299      return this.version;
300    }
301
302    public boolean hasVersionElement() { 
303      return this.version != null && !this.version.isEmpty();
304    }
305
306    public boolean hasVersion() { 
307      return this.version != null && !this.version.isEmpty();
308    }
309
310    /**
311     * @param value {@link #version} (The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service 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
312     */
313    public ServiceDefinition setVersionElement(StringType value) { 
314      this.version = value;
315      return this;
316    }
317
318    /**
319     * @return The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service 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.
320     */
321    public String getVersion() { 
322      return this.version == null ? null : this.version.getValue();
323    }
324
325    /**
326     * @param value The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service 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.
327     */
328    public ServiceDefinition setVersion(String value) { 
329      if (Utilities.noString(value))
330        this.version = null;
331      else {
332        if (this.version == null)
333          this.version = new StringType();
334        this.version.setValue(value);
335      }
336      return this;
337    }
338
339    /**
340     * @return {@link #name} (A natural language name identifying the service 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
341     */
342    public StringType getNameElement() { 
343      if (this.name == null)
344        if (Configuration.errorOnAutoCreate())
345          throw new Error("Attempt to auto-create ServiceDefinition.name");
346        else if (Configuration.doAutoCreate())
347          this.name = new StringType(); // bb
348      return this.name;
349    }
350
351    public boolean hasNameElement() { 
352      return this.name != null && !this.name.isEmpty();
353    }
354
355    public boolean hasName() { 
356      return this.name != null && !this.name.isEmpty();
357    }
358
359    /**
360     * @param value {@link #name} (A natural language name identifying the service 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
361     */
362    public ServiceDefinition setNameElement(StringType value) { 
363      this.name = value;
364      return this;
365    }
366
367    /**
368     * @return A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
369     */
370    public String getName() { 
371      return this.name == null ? null : this.name.getValue();
372    }
373
374    /**
375     * @param value A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
376     */
377    public ServiceDefinition setName(String value) { 
378      if (Utilities.noString(value))
379        this.name = null;
380      else {
381        if (this.name == null)
382          this.name = new StringType();
383        this.name.setValue(value);
384      }
385      return this;
386    }
387
388    /**
389     * @return {@link #title} (A short, descriptive, user-friendly title for the service definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
390     */
391    public StringType getTitleElement() { 
392      if (this.title == null)
393        if (Configuration.errorOnAutoCreate())
394          throw new Error("Attempt to auto-create ServiceDefinition.title");
395        else if (Configuration.doAutoCreate())
396          this.title = new StringType(); // bb
397      return this.title;
398    }
399
400    public boolean hasTitleElement() { 
401      return this.title != null && !this.title.isEmpty();
402    }
403
404    public boolean hasTitle() { 
405      return this.title != null && !this.title.isEmpty();
406    }
407
408    /**
409     * @param value {@link #title} (A short, descriptive, user-friendly title for the service definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
410     */
411    public ServiceDefinition setTitleElement(StringType value) { 
412      this.title = value;
413      return this;
414    }
415
416    /**
417     * @return A short, descriptive, user-friendly title for the service definition.
418     */
419    public String getTitle() { 
420      return this.title == null ? null : this.title.getValue();
421    }
422
423    /**
424     * @param value A short, descriptive, user-friendly title for the service definition.
425     */
426    public ServiceDefinition setTitle(String value) { 
427      if (Utilities.noString(value))
428        this.title = null;
429      else {
430        if (this.title == null)
431          this.title = new StringType();
432        this.title.setValue(value);
433      }
434      return this;
435    }
436
437    /**
438     * @return {@link #status} (The status of this service 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
439     */
440    public Enumeration<PublicationStatus> getStatusElement() { 
441      if (this.status == null)
442        if (Configuration.errorOnAutoCreate())
443          throw new Error("Attempt to auto-create ServiceDefinition.status");
444        else if (Configuration.doAutoCreate())
445          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
446      return this.status;
447    }
448
449    public boolean hasStatusElement() { 
450      return this.status != null && !this.status.isEmpty();
451    }
452
453    public boolean hasStatus() { 
454      return this.status != null && !this.status.isEmpty();
455    }
456
457    /**
458     * @param value {@link #status} (The status of this service 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
459     */
460    public ServiceDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
461      this.status = value;
462      return this;
463    }
464
465    /**
466     * @return The status of this service definition. Enables tracking the life-cycle of the content.
467     */
468    public PublicationStatus getStatus() { 
469      return this.status == null ? null : this.status.getValue();
470    }
471
472    /**
473     * @param value The status of this service definition. Enables tracking the life-cycle of the content.
474     */
475    public ServiceDefinition setStatus(PublicationStatus value) { 
476        if (this.status == null)
477          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
478        this.status.setValue(value);
479      return this;
480    }
481
482    /**
483     * @return {@link #experimental} (A boolean value to indicate that this service 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
484     */
485    public BooleanType getExperimentalElement() { 
486      if (this.experimental == null)
487        if (Configuration.errorOnAutoCreate())
488          throw new Error("Attempt to auto-create ServiceDefinition.experimental");
489        else if (Configuration.doAutoCreate())
490          this.experimental = new BooleanType(); // bb
491      return this.experimental;
492    }
493
494    public boolean hasExperimentalElement() { 
495      return this.experimental != null && !this.experimental.isEmpty();
496    }
497
498    public boolean hasExperimental() { 
499      return this.experimental != null && !this.experimental.isEmpty();
500    }
501
502    /**
503     * @param value {@link #experimental} (A boolean value to indicate that this service 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
504     */
505    public ServiceDefinition setExperimentalElement(BooleanType value) { 
506      this.experimental = value;
507      return this;
508    }
509
510    /**
511     * @return A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
512     */
513    public boolean getExperimental() { 
514      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
515    }
516
517    /**
518     * @param value A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
519     */
520    public ServiceDefinition setExperimental(boolean value) { 
521        if (this.experimental == null)
522          this.experimental = new BooleanType();
523        this.experimental.setValue(value);
524      return this;
525    }
526
527    /**
528     * @return {@link #date} (The date  (and optionally time) when the service definition was published. The date must change if and 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 service definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
529     */
530    public DateTimeType getDateElement() { 
531      if (this.date == null)
532        if (Configuration.errorOnAutoCreate())
533          throw new Error("Attempt to auto-create ServiceDefinition.date");
534        else if (Configuration.doAutoCreate())
535          this.date = new DateTimeType(); // bb
536      return this.date;
537    }
538
539    public boolean hasDateElement() { 
540      return this.date != null && !this.date.isEmpty();
541    }
542
543    public boolean hasDate() { 
544      return this.date != null && !this.date.isEmpty();
545    }
546
547    /**
548     * @param value {@link #date} (The date  (and optionally time) when the service definition was published. The date must change if and 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 service definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
549     */
550    public ServiceDefinition setDateElement(DateTimeType value) { 
551      this.date = value;
552      return this;
553    }
554
555    /**
556     * @return The date  (and optionally time) when the service definition was published. The date must change if and 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 service definition changes.
557     */
558    public Date getDate() { 
559      return this.date == null ? null : this.date.getValue();
560    }
561
562    /**
563     * @param value The date  (and optionally time) when the service definition was published. The date must change if and 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 service definition changes.
564     */
565    public ServiceDefinition setDate(Date value) { 
566      if (value == null)
567        this.date = null;
568      else {
569        if (this.date == null)
570          this.date = new DateTimeType();
571        this.date.setValue(value);
572      }
573      return this;
574    }
575
576    /**
577     * @return {@link #publisher} (The name of the individual or organization that published the service definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
578     */
579    public StringType getPublisherElement() { 
580      if (this.publisher == null)
581        if (Configuration.errorOnAutoCreate())
582          throw new Error("Attempt to auto-create ServiceDefinition.publisher");
583        else if (Configuration.doAutoCreate())
584          this.publisher = new StringType(); // bb
585      return this.publisher;
586    }
587
588    public boolean hasPublisherElement() { 
589      return this.publisher != null && !this.publisher.isEmpty();
590    }
591
592    public boolean hasPublisher() { 
593      return this.publisher != null && !this.publisher.isEmpty();
594    }
595
596    /**
597     * @param value {@link #publisher} (The name of the individual or organization that published the service definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
598     */
599    public ServiceDefinition setPublisherElement(StringType value) { 
600      this.publisher = value;
601      return this;
602    }
603
604    /**
605     * @return The name of the individual or organization that published the service definition.
606     */
607    public String getPublisher() { 
608      return this.publisher == null ? null : this.publisher.getValue();
609    }
610
611    /**
612     * @param value The name of the individual or organization that published the service definition.
613     */
614    public ServiceDefinition setPublisher(String value) { 
615      if (Utilities.noString(value))
616        this.publisher = null;
617      else {
618        if (this.publisher == null)
619          this.publisher = new StringType();
620        this.publisher.setValue(value);
621      }
622      return this;
623    }
624
625    /**
626     * @return {@link #description} (A free text natural language description of the service 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
627     */
628    public MarkdownType getDescriptionElement() { 
629      if (this.description == null)
630        if (Configuration.errorOnAutoCreate())
631          throw new Error("Attempt to auto-create ServiceDefinition.description");
632        else if (Configuration.doAutoCreate())
633          this.description = new MarkdownType(); // bb
634      return this.description;
635    }
636
637    public boolean hasDescriptionElement() { 
638      return this.description != null && !this.description.isEmpty();
639    }
640
641    public boolean hasDescription() { 
642      return this.description != null && !this.description.isEmpty();
643    }
644
645    /**
646     * @param value {@link #description} (A free text natural language description of the service 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
647     */
648    public ServiceDefinition setDescriptionElement(MarkdownType value) { 
649      this.description = value;
650      return this;
651    }
652
653    /**
654     * @return A free text natural language description of the service definition from a consumer's perspective.
655     */
656    public String getDescription() { 
657      return this.description == null ? null : this.description.getValue();
658    }
659
660    /**
661     * @param value A free text natural language description of the service definition from a consumer's perspective.
662     */
663    public ServiceDefinition setDescription(String value) { 
664      if (value == null)
665        this.description = null;
666      else {
667        if (this.description == null)
668          this.description = new MarkdownType();
669        this.description.setValue(value);
670      }
671      return this;
672    }
673
674    /**
675     * @return {@link #purpose} (Explaination of why this service 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
676     */
677    public MarkdownType getPurposeElement() { 
678      if (this.purpose == null)
679        if (Configuration.errorOnAutoCreate())
680          throw new Error("Attempt to auto-create ServiceDefinition.purpose");
681        else if (Configuration.doAutoCreate())
682          this.purpose = new MarkdownType(); // bb
683      return this.purpose;
684    }
685
686    public boolean hasPurposeElement() { 
687      return this.purpose != null && !this.purpose.isEmpty();
688    }
689
690    public boolean hasPurpose() { 
691      return this.purpose != null && !this.purpose.isEmpty();
692    }
693
694    /**
695     * @param value {@link #purpose} (Explaination of why this service 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
696     */
697    public ServiceDefinition setPurposeElement(MarkdownType value) { 
698      this.purpose = value;
699      return this;
700    }
701
702    /**
703     * @return Explaination of why this service definition is needed and why it has been designed as it has.
704     */
705    public String getPurpose() { 
706      return this.purpose == null ? null : this.purpose.getValue();
707    }
708
709    /**
710     * @param value Explaination of why this service definition is needed and why it has been designed as it has.
711     */
712    public ServiceDefinition setPurpose(String value) { 
713      if (value == null)
714        this.purpose = null;
715      else {
716        if (this.purpose == null)
717          this.purpose = new MarkdownType();
718        this.purpose.setValue(value);
719      }
720      return this;
721    }
722
723    /**
724     * @return {@link #usage} (A detailed description of how the module 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
725     */
726    public StringType getUsageElement() { 
727      if (this.usage == null)
728        if (Configuration.errorOnAutoCreate())
729          throw new Error("Attempt to auto-create ServiceDefinition.usage");
730        else if (Configuration.doAutoCreate())
731          this.usage = new StringType(); // bb
732      return this.usage;
733    }
734
735    public boolean hasUsageElement() { 
736      return this.usage != null && !this.usage.isEmpty();
737    }
738
739    public boolean hasUsage() { 
740      return this.usage != null && !this.usage.isEmpty();
741    }
742
743    /**
744     * @param value {@link #usage} (A detailed description of how the module 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
745     */
746    public ServiceDefinition setUsageElement(StringType value) { 
747      this.usage = value;
748      return this;
749    }
750
751    /**
752     * @return A detailed description of how the module is used from a clinical perspective.
753     */
754    public String getUsage() { 
755      return this.usage == null ? null : this.usage.getValue();
756    }
757
758    /**
759     * @param value A detailed description of how the module is used from a clinical perspective.
760     */
761    public ServiceDefinition setUsage(String value) { 
762      if (Utilities.noString(value))
763        this.usage = null;
764      else {
765        if (this.usage == null)
766          this.usage = new StringType();
767        this.usage.setValue(value);
768      }
769      return this;
770    }
771
772    /**
773     * @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
774     */
775    public DateType getApprovalDateElement() { 
776      if (this.approvalDate == null)
777        if (Configuration.errorOnAutoCreate())
778          throw new Error("Attempt to auto-create ServiceDefinition.approvalDate");
779        else if (Configuration.doAutoCreate())
780          this.approvalDate = new DateType(); // bb
781      return this.approvalDate;
782    }
783
784    public boolean hasApprovalDateElement() { 
785      return this.approvalDate != null && !this.approvalDate.isEmpty();
786    }
787
788    public boolean hasApprovalDate() { 
789      return this.approvalDate != null && !this.approvalDate.isEmpty();
790    }
791
792    /**
793     * @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
794     */
795    public ServiceDefinition setApprovalDateElement(DateType value) { 
796      this.approvalDate = value;
797      return this;
798    }
799
800    /**
801     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
802     */
803    public Date getApprovalDate() { 
804      return this.approvalDate == null ? null : this.approvalDate.getValue();
805    }
806
807    /**
808     * @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.
809     */
810    public ServiceDefinition setApprovalDate(Date value) { 
811      if (value == null)
812        this.approvalDate = null;
813      else {
814        if (this.approvalDate == null)
815          this.approvalDate = new DateType();
816        this.approvalDate.setValue(value);
817      }
818      return this;
819    }
820
821    /**
822     * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
823     */
824    public DateType getLastReviewDateElement() { 
825      if (this.lastReviewDate == null)
826        if (Configuration.errorOnAutoCreate())
827          throw new Error("Attempt to auto-create ServiceDefinition.lastReviewDate");
828        else if (Configuration.doAutoCreate())
829          this.lastReviewDate = new DateType(); // bb
830      return this.lastReviewDate;
831    }
832
833    public boolean hasLastReviewDateElement() { 
834      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
835    }
836
837    public boolean hasLastReviewDate() { 
838      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
839    }
840
841    /**
842     * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
843     */
844    public ServiceDefinition setLastReviewDateElement(DateType value) { 
845      this.lastReviewDate = value;
846      return this;
847    }
848
849    /**
850     * @return The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
851     */
852    public Date getLastReviewDate() { 
853      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
854    }
855
856    /**
857     * @param value The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
858     */
859    public ServiceDefinition setLastReviewDate(Date value) { 
860      if (value == null)
861        this.lastReviewDate = null;
862      else {
863        if (this.lastReviewDate == null)
864          this.lastReviewDate = new DateType();
865        this.lastReviewDate.setValue(value);
866      }
867      return this;
868    }
869
870    /**
871     * @return {@link #effectivePeriod} (The period during which the service definition content was or is planned to be in active use.)
872     */
873    public Period getEffectivePeriod() { 
874      if (this.effectivePeriod == null)
875        if (Configuration.errorOnAutoCreate())
876          throw new Error("Attempt to auto-create ServiceDefinition.effectivePeriod");
877        else if (Configuration.doAutoCreate())
878          this.effectivePeriod = new Period(); // cc
879      return this.effectivePeriod;
880    }
881
882    public boolean hasEffectivePeriod() { 
883      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
884    }
885
886    /**
887     * @param value {@link #effectivePeriod} (The period during which the service definition content was or is planned to be in active use.)
888     */
889    public ServiceDefinition setEffectivePeriod(Period value)  { 
890      this.effectivePeriod = value;
891      return this;
892    }
893
894    /**
895     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate service definition instances.)
896     */
897    public List<UsageContext> getUseContext() { 
898      if (this.useContext == null)
899        this.useContext = new ArrayList<UsageContext>();
900      return this.useContext;
901    }
902
903    /**
904     * @return Returns a reference to <code>this</code> for easy method chaining
905     */
906    public ServiceDefinition setUseContext(List<UsageContext> theUseContext) { 
907      this.useContext = theUseContext;
908      return this;
909    }
910
911    public boolean hasUseContext() { 
912      if (this.useContext == null)
913        return false;
914      for (UsageContext item : this.useContext)
915        if (!item.isEmpty())
916          return true;
917      return false;
918    }
919
920    public UsageContext addUseContext() { //3
921      UsageContext t = new UsageContext();
922      if (this.useContext == null)
923        this.useContext = new ArrayList<UsageContext>();
924      this.useContext.add(t);
925      return t;
926    }
927
928    public ServiceDefinition addUseContext(UsageContext t) { //3
929      if (t == null)
930        return this;
931      if (this.useContext == null)
932        this.useContext = new ArrayList<UsageContext>();
933      this.useContext.add(t);
934      return this;
935    }
936
937    /**
938     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
939     */
940    public UsageContext getUseContextFirstRep() { 
941      if (getUseContext().isEmpty()) {
942        addUseContext();
943      }
944      return getUseContext().get(0);
945    }
946
947    /**
948     * @return {@link #jurisdiction} (A legal or geographic region in which the service definition is intended to be used.)
949     */
950    public List<CodeableConcept> getJurisdiction() { 
951      if (this.jurisdiction == null)
952        this.jurisdiction = new ArrayList<CodeableConcept>();
953      return this.jurisdiction;
954    }
955
956    /**
957     * @return Returns a reference to <code>this</code> for easy method chaining
958     */
959    public ServiceDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
960      this.jurisdiction = theJurisdiction;
961      return this;
962    }
963
964    public boolean hasJurisdiction() { 
965      if (this.jurisdiction == null)
966        return false;
967      for (CodeableConcept item : this.jurisdiction)
968        if (!item.isEmpty())
969          return true;
970      return false;
971    }
972
973    public CodeableConcept addJurisdiction() { //3
974      CodeableConcept t = new CodeableConcept();
975      if (this.jurisdiction == null)
976        this.jurisdiction = new ArrayList<CodeableConcept>();
977      this.jurisdiction.add(t);
978      return t;
979    }
980
981    public ServiceDefinition addJurisdiction(CodeableConcept t) { //3
982      if (t == null)
983        return this;
984      if (this.jurisdiction == null)
985        this.jurisdiction = new ArrayList<CodeableConcept>();
986      this.jurisdiction.add(t);
987      return this;
988    }
989
990    /**
991     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
992     */
993    public CodeableConcept getJurisdictionFirstRep() { 
994      if (getJurisdiction().isEmpty()) {
995        addJurisdiction();
996      }
997      return getJurisdiction().get(0);
998    }
999
1000    /**
1001     * @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.)
1002     */
1003    public List<CodeableConcept> getTopic() { 
1004      if (this.topic == null)
1005        this.topic = new ArrayList<CodeableConcept>();
1006      return this.topic;
1007    }
1008
1009    /**
1010     * @return Returns a reference to <code>this</code> for easy method chaining
1011     */
1012    public ServiceDefinition setTopic(List<CodeableConcept> theTopic) { 
1013      this.topic = theTopic;
1014      return this;
1015    }
1016
1017    public boolean hasTopic() { 
1018      if (this.topic == null)
1019        return false;
1020      for (CodeableConcept item : this.topic)
1021        if (!item.isEmpty())
1022          return true;
1023      return false;
1024    }
1025
1026    public CodeableConcept addTopic() { //3
1027      CodeableConcept t = new CodeableConcept();
1028      if (this.topic == null)
1029        this.topic = new ArrayList<CodeableConcept>();
1030      this.topic.add(t);
1031      return t;
1032    }
1033
1034    public ServiceDefinition addTopic(CodeableConcept t) { //3
1035      if (t == null)
1036        return this;
1037      if (this.topic == null)
1038        this.topic = new ArrayList<CodeableConcept>();
1039      this.topic.add(t);
1040      return this;
1041    }
1042
1043    /**
1044     * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist
1045     */
1046    public CodeableConcept getTopicFirstRep() { 
1047      if (getTopic().isEmpty()) {
1048        addTopic();
1049      }
1050      return getTopic().get(0);
1051    }
1052
1053    /**
1054     * @return {@link #contributor} (A contributor to the content of the module, including authors, editors, reviewers, and endorsers.)
1055     */
1056    public List<Contributor> getContributor() { 
1057      if (this.contributor == null)
1058        this.contributor = new ArrayList<Contributor>();
1059      return this.contributor;
1060    }
1061
1062    /**
1063     * @return Returns a reference to <code>this</code> for easy method chaining
1064     */
1065    public ServiceDefinition setContributor(List<Contributor> theContributor) { 
1066      this.contributor = theContributor;
1067      return this;
1068    }
1069
1070    public boolean hasContributor() { 
1071      if (this.contributor == null)
1072        return false;
1073      for (Contributor item : this.contributor)
1074        if (!item.isEmpty())
1075          return true;
1076      return false;
1077    }
1078
1079    public Contributor addContributor() { //3
1080      Contributor t = new Contributor();
1081      if (this.contributor == null)
1082        this.contributor = new ArrayList<Contributor>();
1083      this.contributor.add(t);
1084      return t;
1085    }
1086
1087    public ServiceDefinition addContributor(Contributor t) { //3
1088      if (t == null)
1089        return this;
1090      if (this.contributor == null)
1091        this.contributor = new ArrayList<Contributor>();
1092      this.contributor.add(t);
1093      return this;
1094    }
1095
1096    /**
1097     * @return The first repetition of repeating field {@link #contributor}, creating it if it does not already exist
1098     */
1099    public Contributor getContributorFirstRep() { 
1100      if (getContributor().isEmpty()) {
1101        addContributor();
1102      }
1103      return getContributor().get(0);
1104    }
1105
1106    /**
1107     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
1108     */
1109    public List<ContactDetail> getContact() { 
1110      if (this.contact == null)
1111        this.contact = new ArrayList<ContactDetail>();
1112      return this.contact;
1113    }
1114
1115    /**
1116     * @return Returns a reference to <code>this</code> for easy method chaining
1117     */
1118    public ServiceDefinition setContact(List<ContactDetail> theContact) { 
1119      this.contact = theContact;
1120      return this;
1121    }
1122
1123    public boolean hasContact() { 
1124      if (this.contact == null)
1125        return false;
1126      for (ContactDetail item : this.contact)
1127        if (!item.isEmpty())
1128          return true;
1129      return false;
1130    }
1131
1132    public ContactDetail addContact() { //3
1133      ContactDetail t = new ContactDetail();
1134      if (this.contact == null)
1135        this.contact = new ArrayList<ContactDetail>();
1136      this.contact.add(t);
1137      return t;
1138    }
1139
1140    public ServiceDefinition addContact(ContactDetail t) { //3
1141      if (t == null)
1142        return this;
1143      if (this.contact == null)
1144        this.contact = new ArrayList<ContactDetail>();
1145      this.contact.add(t);
1146      return this;
1147    }
1148
1149    /**
1150     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
1151     */
1152    public ContactDetail getContactFirstRep() { 
1153      if (getContact().isEmpty()) {
1154        addContact();
1155      }
1156      return getContact().get(0);
1157    }
1158
1159    /**
1160     * @return {@link #copyright} (A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
1161     */
1162    public MarkdownType getCopyrightElement() { 
1163      if (this.copyright == null)
1164        if (Configuration.errorOnAutoCreate())
1165          throw new Error("Attempt to auto-create ServiceDefinition.copyright");
1166        else if (Configuration.doAutoCreate())
1167          this.copyright = new MarkdownType(); // bb
1168      return this.copyright;
1169    }
1170
1171    public boolean hasCopyrightElement() { 
1172      return this.copyright != null && !this.copyright.isEmpty();
1173    }
1174
1175    public boolean hasCopyright() { 
1176      return this.copyright != null && !this.copyright.isEmpty();
1177    }
1178
1179    /**
1180     * @param value {@link #copyright} (A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
1181     */
1182    public ServiceDefinition setCopyrightElement(MarkdownType value) { 
1183      this.copyright = value;
1184      return this;
1185    }
1186
1187    /**
1188     * @return A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.
1189     */
1190    public String getCopyright() { 
1191      return this.copyright == null ? null : this.copyright.getValue();
1192    }
1193
1194    /**
1195     * @param value A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.
1196     */
1197    public ServiceDefinition setCopyright(String value) { 
1198      if (value == null)
1199        this.copyright = null;
1200      else {
1201        if (this.copyright == null)
1202          this.copyright = new MarkdownType();
1203        this.copyright.setValue(value);
1204      }
1205      return this;
1206    }
1207
1208    /**
1209     * @return {@link #relatedArtifact} (Related resources such as additional documentation, justification, or bibliographic references.)
1210     */
1211    public List<RelatedArtifact> getRelatedArtifact() { 
1212      if (this.relatedArtifact == null)
1213        this.relatedArtifact = new ArrayList<RelatedArtifact>();
1214      return this.relatedArtifact;
1215    }
1216
1217    /**
1218     * @return Returns a reference to <code>this</code> for easy method chaining
1219     */
1220    public ServiceDefinition setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
1221      this.relatedArtifact = theRelatedArtifact;
1222      return this;
1223    }
1224
1225    public boolean hasRelatedArtifact() { 
1226      if (this.relatedArtifact == null)
1227        return false;
1228      for (RelatedArtifact item : this.relatedArtifact)
1229        if (!item.isEmpty())
1230          return true;
1231      return false;
1232    }
1233
1234    public RelatedArtifact addRelatedArtifact() { //3
1235      RelatedArtifact t = new RelatedArtifact();
1236      if (this.relatedArtifact == null)
1237        this.relatedArtifact = new ArrayList<RelatedArtifact>();
1238      this.relatedArtifact.add(t);
1239      return t;
1240    }
1241
1242    public ServiceDefinition addRelatedArtifact(RelatedArtifact t) { //3
1243      if (t == null)
1244        return this;
1245      if (this.relatedArtifact == null)
1246        this.relatedArtifact = new ArrayList<RelatedArtifact>();
1247      this.relatedArtifact.add(t);
1248      return this;
1249    }
1250
1251    /**
1252     * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist
1253     */
1254    public RelatedArtifact getRelatedArtifactFirstRep() { 
1255      if (getRelatedArtifact().isEmpty()) {
1256        addRelatedArtifact();
1257      }
1258      return getRelatedArtifact().get(0);
1259    }
1260
1261    /**
1262     * @return {@link #trigger} (The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.)
1263     */
1264    public List<TriggerDefinition> getTrigger() { 
1265      if (this.trigger == null)
1266        this.trigger = new ArrayList<TriggerDefinition>();
1267      return this.trigger;
1268    }
1269
1270    /**
1271     * @return Returns a reference to <code>this</code> for easy method chaining
1272     */
1273    public ServiceDefinition setTrigger(List<TriggerDefinition> theTrigger) { 
1274      this.trigger = theTrigger;
1275      return this;
1276    }
1277
1278    public boolean hasTrigger() { 
1279      if (this.trigger == null)
1280        return false;
1281      for (TriggerDefinition item : this.trigger)
1282        if (!item.isEmpty())
1283          return true;
1284      return false;
1285    }
1286
1287    public TriggerDefinition addTrigger() { //3
1288      TriggerDefinition t = new TriggerDefinition();
1289      if (this.trigger == null)
1290        this.trigger = new ArrayList<TriggerDefinition>();
1291      this.trigger.add(t);
1292      return t;
1293    }
1294
1295    public ServiceDefinition addTrigger(TriggerDefinition t) { //3
1296      if (t == null)
1297        return this;
1298      if (this.trigger == null)
1299        this.trigger = new ArrayList<TriggerDefinition>();
1300      this.trigger.add(t);
1301      return this;
1302    }
1303
1304    /**
1305     * @return The first repetition of repeating field {@link #trigger}, creating it if it does not already exist
1306     */
1307    public TriggerDefinition getTriggerFirstRep() { 
1308      if (getTrigger().isEmpty()) {
1309        addTrigger();
1310      }
1311      return getTrigger().get(0);
1312    }
1313
1314    /**
1315     * @return {@link #dataRequirement} (Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.)
1316     */
1317    public List<DataRequirement> getDataRequirement() { 
1318      if (this.dataRequirement == null)
1319        this.dataRequirement = new ArrayList<DataRequirement>();
1320      return this.dataRequirement;
1321    }
1322
1323    /**
1324     * @return Returns a reference to <code>this</code> for easy method chaining
1325     */
1326    public ServiceDefinition setDataRequirement(List<DataRequirement> theDataRequirement) { 
1327      this.dataRequirement = theDataRequirement;
1328      return this;
1329    }
1330
1331    public boolean hasDataRequirement() { 
1332      if (this.dataRequirement == null)
1333        return false;
1334      for (DataRequirement item : this.dataRequirement)
1335        if (!item.isEmpty())
1336          return true;
1337      return false;
1338    }
1339
1340    public DataRequirement addDataRequirement() { //3
1341      DataRequirement t = new DataRequirement();
1342      if (this.dataRequirement == null)
1343        this.dataRequirement = new ArrayList<DataRequirement>();
1344      this.dataRequirement.add(t);
1345      return t;
1346    }
1347
1348    public ServiceDefinition addDataRequirement(DataRequirement t) { //3
1349      if (t == null)
1350        return this;
1351      if (this.dataRequirement == null)
1352        this.dataRequirement = new ArrayList<DataRequirement>();
1353      this.dataRequirement.add(t);
1354      return this;
1355    }
1356
1357    /**
1358     * @return The first repetition of repeating field {@link #dataRequirement}, creating it if it does not already exist
1359     */
1360    public DataRequirement getDataRequirementFirstRep() { 
1361      if (getDataRequirement().isEmpty()) {
1362        addDataRequirement();
1363      }
1364      return getDataRequirement().get(0);
1365    }
1366
1367    /**
1368     * @return {@link #operationDefinition} (A reference to the operation that is used to invoke this service.)
1369     */
1370    public Reference getOperationDefinition() { 
1371      if (this.operationDefinition == null)
1372        if (Configuration.errorOnAutoCreate())
1373          throw new Error("Attempt to auto-create ServiceDefinition.operationDefinition");
1374        else if (Configuration.doAutoCreate())
1375          this.operationDefinition = new Reference(); // cc
1376      return this.operationDefinition;
1377    }
1378
1379    public boolean hasOperationDefinition() { 
1380      return this.operationDefinition != null && !this.operationDefinition.isEmpty();
1381    }
1382
1383    /**
1384     * @param value {@link #operationDefinition} (A reference to the operation that is used to invoke this service.)
1385     */
1386    public ServiceDefinition setOperationDefinition(Reference value)  { 
1387      this.operationDefinition = value;
1388      return this;
1389    }
1390
1391    /**
1392     * @return {@link #operationDefinition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the operation that is used to invoke this service.)
1393     */
1394    public OperationDefinition getOperationDefinitionTarget() { 
1395      if (this.operationDefinitionTarget == null)
1396        if (Configuration.errorOnAutoCreate())
1397          throw new Error("Attempt to auto-create ServiceDefinition.operationDefinition");
1398        else if (Configuration.doAutoCreate())
1399          this.operationDefinitionTarget = new OperationDefinition(); // aa
1400      return this.operationDefinitionTarget;
1401    }
1402
1403    /**
1404     * @param value {@link #operationDefinition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the operation that is used to invoke this service.)
1405     */
1406    public ServiceDefinition setOperationDefinitionTarget(OperationDefinition value) { 
1407      this.operationDefinitionTarget = value;
1408      return this;
1409    }
1410
1411      protected void listChildren(List<Property> children) {
1412        super.listChildren(children);
1413        children.add(new Property("url", "uri", "An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url));
1414        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this service definition when it is represented in other formats, or referenced in a specification, model, design or an instance. This is used for CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.", 0, java.lang.Integer.MAX_VALUE, identifier));
1415        children.add(new Property("version", "string", "The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service 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));
1416        children.add(new Property("name", "string", "A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
1417        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the service definition.", 0, 1, title));
1418        children.add(new Property("status", "code", "The status of this service definition. Enables tracking the life-cycle of the content.", 0, 1, status));
1419        children.add(new Property("experimental", "boolean", "A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental));
1420        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the service definition was published. The date must change if and 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 service definition changes.", 0, 1, date));
1421        children.add(new Property("publisher", "string", "The name of the individual or organization that published the service definition.", 0, 1, publisher));
1422        children.add(new Property("description", "markdown", "A free text natural language description of the service definition from a consumer's perspective.", 0, 1, description));
1423        children.add(new Property("purpose", "markdown", "Explaination of why this service definition is needed and why it has been designed as it has.", 0, 1, purpose));
1424        children.add(new Property("usage", "string", "A detailed description of how the module is used from a clinical perspective.", 0, 1, usage));
1425        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));
1426        children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", 0, 1, lastReviewDate));
1427        children.add(new Property("effectivePeriod", "Period", "The period during which the service definition content was or is planned to be in active use.", 0, 1, effectivePeriod));
1428        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate service definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
1429        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the service definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
1430        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));
1431        children.add(new Property("contributor", "Contributor", "A contributor to the content of the module, including authors, editors, reviewers, and endorsers.", 0, java.lang.Integer.MAX_VALUE, contributor));
1432        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));
1433        children.add(new Property("copyright", "markdown", "A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.", 0, 1, copyright));
1434        children.add(new Property("relatedArtifact", "RelatedArtifact", "Related resources such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact));
1435        children.add(new Property("trigger", "TriggerDefinition", "The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.", 0, java.lang.Integer.MAX_VALUE, trigger));
1436        children.add(new Property("dataRequirement", "DataRequirement", "Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.", 0, java.lang.Integer.MAX_VALUE, dataRequirement));
1437        children.add(new Property("operationDefinition", "Reference(OperationDefinition)", "A reference to the operation that is used to invoke this service.", 0, 1, operationDefinition));
1438      }
1439
1440      @Override
1441      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1442        switch (_hash) {
1443        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url);
1444        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this service definition when it is represented in other formats, or referenced in a specification, model, design or an instance. This is used for CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.", 0, java.lang.Integer.MAX_VALUE, identifier);
1445        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service 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);
1446        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
1447        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the service definition.", 0, 1, title);
1448        case -892481550: /*status*/  return new Property("status", "code", "The status of this service definition. Enables tracking the life-cycle of the content.", 0, 1, status);
1449        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental);
1450        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the service definition was published. The date must change if and 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 service definition changes.", 0, 1, date);
1451        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the individual or organization that published the service definition.", 0, 1, publisher);
1452        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the service definition from a consumer's perspective.", 0, 1, description);
1453        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explaination of why this service definition is needed and why it has been designed as it has.", 0, 1, purpose);
1454        case 111574433: /*usage*/  return new Property("usage", "string", "A detailed description of how the module is used from a clinical perspective.", 0, 1, usage);
1455        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);
1456        case -1687512484: /*lastReviewDate*/  return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", 0, 1, lastReviewDate);
1457        case -403934648: /*effectivePeriod*/  return new Property("effectivePeriod", "Period", "The period during which the service definition content was or is planned to be in active use.", 0, 1, effectivePeriod);
1458        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate service definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
1459        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the service definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
1460        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);
1461        case -1895276325: /*contributor*/  return new Property("contributor", "Contributor", "A contributor to the content of the module, including authors, editors, reviewers, and endorsers.", 0, java.lang.Integer.MAX_VALUE, contributor);
1462        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);
1463        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.", 0, 1, copyright);
1464        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);
1465        case -1059891784: /*trigger*/  return new Property("trigger", "TriggerDefinition", "The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.", 0, java.lang.Integer.MAX_VALUE, trigger);
1466        case 629147193: /*dataRequirement*/  return new Property("dataRequirement", "DataRequirement", "Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.", 0, java.lang.Integer.MAX_VALUE, dataRequirement);
1467        case 900960794: /*operationDefinition*/  return new Property("operationDefinition", "Reference(OperationDefinition)", "A reference to the operation that is used to invoke this service.", 0, 1, operationDefinition);
1468        default: return super.getNamedProperty(_hash, _name, _checkValid);
1469        }
1470
1471      }
1472
1473      @Override
1474      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1475        switch (hash) {
1476        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
1477        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1478        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
1479        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1480        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
1481        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
1482        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
1483        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
1484        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
1485        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1486        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
1487        case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType
1488        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
1489        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
1490        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
1491        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
1492        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
1493        case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept
1494        case -1895276325: /*contributor*/ return this.contributor == null ? new Base[0] : this.contributor.toArray(new Base[this.contributor.size()]); // Contributor
1495        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
1496        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
1497        case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
1498        case -1059891784: /*trigger*/ return this.trigger == null ? new Base[0] : this.trigger.toArray(new Base[this.trigger.size()]); // TriggerDefinition
1499        case 629147193: /*dataRequirement*/ return this.dataRequirement == null ? new Base[0] : this.dataRequirement.toArray(new Base[this.dataRequirement.size()]); // DataRequirement
1500        case 900960794: /*operationDefinition*/ return this.operationDefinition == null ? new Base[0] : new Base[] {this.operationDefinition}; // Reference
1501        default: return super.getProperty(hash, name, checkValid);
1502        }
1503
1504      }
1505
1506      @Override
1507      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1508        switch (hash) {
1509        case 116079: // url
1510          this.url = castToUri(value); // UriType
1511          return value;
1512        case -1618432855: // identifier
1513          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1514          return value;
1515        case 351608024: // version
1516          this.version = castToString(value); // StringType
1517          return value;
1518        case 3373707: // name
1519          this.name = castToString(value); // StringType
1520          return value;
1521        case 110371416: // title
1522          this.title = castToString(value); // StringType
1523          return value;
1524        case -892481550: // status
1525          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
1526          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1527          return value;
1528        case -404562712: // experimental
1529          this.experimental = castToBoolean(value); // BooleanType
1530          return value;
1531        case 3076014: // date
1532          this.date = castToDateTime(value); // DateTimeType
1533          return value;
1534        case 1447404028: // publisher
1535          this.publisher = castToString(value); // StringType
1536          return value;
1537        case -1724546052: // description
1538          this.description = castToMarkdown(value); // MarkdownType
1539          return value;
1540        case -220463842: // purpose
1541          this.purpose = castToMarkdown(value); // MarkdownType
1542          return value;
1543        case 111574433: // usage
1544          this.usage = castToString(value); // StringType
1545          return value;
1546        case 223539345: // approvalDate
1547          this.approvalDate = castToDate(value); // DateType
1548          return value;
1549        case -1687512484: // lastReviewDate
1550          this.lastReviewDate = castToDate(value); // DateType
1551          return value;
1552        case -403934648: // effectivePeriod
1553          this.effectivePeriod = castToPeriod(value); // Period
1554          return value;
1555        case -669707736: // useContext
1556          this.getUseContext().add(castToUsageContext(value)); // UsageContext
1557          return value;
1558        case -507075711: // jurisdiction
1559          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
1560          return value;
1561        case 110546223: // topic
1562          this.getTopic().add(castToCodeableConcept(value)); // CodeableConcept
1563          return value;
1564        case -1895276325: // contributor
1565          this.getContributor().add(castToContributor(value)); // Contributor
1566          return value;
1567        case 951526432: // contact
1568          this.getContact().add(castToContactDetail(value)); // ContactDetail
1569          return value;
1570        case 1522889671: // copyright
1571          this.copyright = castToMarkdown(value); // MarkdownType
1572          return value;
1573        case 666807069: // relatedArtifact
1574          this.getRelatedArtifact().add(castToRelatedArtifact(value)); // RelatedArtifact
1575          return value;
1576        case -1059891784: // trigger
1577          this.getTrigger().add(castToTriggerDefinition(value)); // TriggerDefinition
1578          return value;
1579        case 629147193: // dataRequirement
1580          this.getDataRequirement().add(castToDataRequirement(value)); // DataRequirement
1581          return value;
1582        case 900960794: // operationDefinition
1583          this.operationDefinition = castToReference(value); // Reference
1584          return value;
1585        default: return super.setProperty(hash, name, value);
1586        }
1587
1588      }
1589
1590      @Override
1591      public Base setProperty(String name, Base value) throws FHIRException {
1592        if (name.equals("url")) {
1593          this.url = castToUri(value); // UriType
1594        } else if (name.equals("identifier")) {
1595          this.getIdentifier().add(castToIdentifier(value));
1596        } else if (name.equals("version")) {
1597          this.version = castToString(value); // StringType
1598        } else if (name.equals("name")) {
1599          this.name = castToString(value); // StringType
1600        } else if (name.equals("title")) {
1601          this.title = castToString(value); // StringType
1602        } else if (name.equals("status")) {
1603          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
1604          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1605        } else if (name.equals("experimental")) {
1606          this.experimental = castToBoolean(value); // BooleanType
1607        } else if (name.equals("date")) {
1608          this.date = castToDateTime(value); // DateTimeType
1609        } else if (name.equals("publisher")) {
1610          this.publisher = castToString(value); // StringType
1611        } else if (name.equals("description")) {
1612          this.description = castToMarkdown(value); // MarkdownType
1613        } else if (name.equals("purpose")) {
1614          this.purpose = castToMarkdown(value); // MarkdownType
1615        } else if (name.equals("usage")) {
1616          this.usage = castToString(value); // StringType
1617        } else if (name.equals("approvalDate")) {
1618          this.approvalDate = castToDate(value); // DateType
1619        } else if (name.equals("lastReviewDate")) {
1620          this.lastReviewDate = castToDate(value); // DateType
1621        } else if (name.equals("effectivePeriod")) {
1622          this.effectivePeriod = castToPeriod(value); // Period
1623        } else if (name.equals("useContext")) {
1624          this.getUseContext().add(castToUsageContext(value));
1625        } else if (name.equals("jurisdiction")) {
1626          this.getJurisdiction().add(castToCodeableConcept(value));
1627        } else if (name.equals("topic")) {
1628          this.getTopic().add(castToCodeableConcept(value));
1629        } else if (name.equals("contributor")) {
1630          this.getContributor().add(castToContributor(value));
1631        } else if (name.equals("contact")) {
1632          this.getContact().add(castToContactDetail(value));
1633        } else if (name.equals("copyright")) {
1634          this.copyright = castToMarkdown(value); // MarkdownType
1635        } else if (name.equals("relatedArtifact")) {
1636          this.getRelatedArtifact().add(castToRelatedArtifact(value));
1637        } else if (name.equals("trigger")) {
1638          this.getTrigger().add(castToTriggerDefinition(value));
1639        } else if (name.equals("dataRequirement")) {
1640          this.getDataRequirement().add(castToDataRequirement(value));
1641        } else if (name.equals("operationDefinition")) {
1642          this.operationDefinition = castToReference(value); // Reference
1643        } else
1644          return super.setProperty(name, value);
1645        return value;
1646      }
1647
1648      @Override
1649      public Base makeProperty(int hash, String name) throws FHIRException {
1650        switch (hash) {
1651        case 116079:  return getUrlElement();
1652        case -1618432855:  return addIdentifier(); 
1653        case 351608024:  return getVersionElement();
1654        case 3373707:  return getNameElement();
1655        case 110371416:  return getTitleElement();
1656        case -892481550:  return getStatusElement();
1657        case -404562712:  return getExperimentalElement();
1658        case 3076014:  return getDateElement();
1659        case 1447404028:  return getPublisherElement();
1660        case -1724546052:  return getDescriptionElement();
1661        case -220463842:  return getPurposeElement();
1662        case 111574433:  return getUsageElement();
1663        case 223539345:  return getApprovalDateElement();
1664        case -1687512484:  return getLastReviewDateElement();
1665        case -403934648:  return getEffectivePeriod(); 
1666        case -669707736:  return addUseContext(); 
1667        case -507075711:  return addJurisdiction(); 
1668        case 110546223:  return addTopic(); 
1669        case -1895276325:  return addContributor(); 
1670        case 951526432:  return addContact(); 
1671        case 1522889671:  return getCopyrightElement();
1672        case 666807069:  return addRelatedArtifact(); 
1673        case -1059891784:  return addTrigger(); 
1674        case 629147193:  return addDataRequirement(); 
1675        case 900960794:  return getOperationDefinition(); 
1676        default: return super.makeProperty(hash, name);
1677        }
1678
1679      }
1680
1681      @Override
1682      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1683        switch (hash) {
1684        case 116079: /*url*/ return new String[] {"uri"};
1685        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1686        case 351608024: /*version*/ return new String[] {"string"};
1687        case 3373707: /*name*/ return new String[] {"string"};
1688        case 110371416: /*title*/ return new String[] {"string"};
1689        case -892481550: /*status*/ return new String[] {"code"};
1690        case -404562712: /*experimental*/ return new String[] {"boolean"};
1691        case 3076014: /*date*/ return new String[] {"dateTime"};
1692        case 1447404028: /*publisher*/ return new String[] {"string"};
1693        case -1724546052: /*description*/ return new String[] {"markdown"};
1694        case -220463842: /*purpose*/ return new String[] {"markdown"};
1695        case 111574433: /*usage*/ return new String[] {"string"};
1696        case 223539345: /*approvalDate*/ return new String[] {"date"};
1697        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
1698        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
1699        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
1700        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
1701        case 110546223: /*topic*/ return new String[] {"CodeableConcept"};
1702        case -1895276325: /*contributor*/ return new String[] {"Contributor"};
1703        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
1704        case 1522889671: /*copyright*/ return new String[] {"markdown"};
1705        case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"};
1706        case -1059891784: /*trigger*/ return new String[] {"TriggerDefinition"};
1707        case 629147193: /*dataRequirement*/ return new String[] {"DataRequirement"};
1708        case 900960794: /*operationDefinition*/ return new String[] {"Reference"};
1709        default: return super.getTypesForProperty(hash, name);
1710        }
1711
1712      }
1713
1714      @Override
1715      public Base addChild(String name) throws FHIRException {
1716        if (name.equals("url")) {
1717          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.url");
1718        }
1719        else if (name.equals("identifier")) {
1720          return addIdentifier();
1721        }
1722        else if (name.equals("version")) {
1723          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.version");
1724        }
1725        else if (name.equals("name")) {
1726          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.name");
1727        }
1728        else if (name.equals("title")) {
1729          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.title");
1730        }
1731        else if (name.equals("status")) {
1732          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.status");
1733        }
1734        else if (name.equals("experimental")) {
1735          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.experimental");
1736        }
1737        else if (name.equals("date")) {
1738          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.date");
1739        }
1740        else if (name.equals("publisher")) {
1741          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.publisher");
1742        }
1743        else if (name.equals("description")) {
1744          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.description");
1745        }
1746        else if (name.equals("purpose")) {
1747          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.purpose");
1748        }
1749        else if (name.equals("usage")) {
1750          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.usage");
1751        }
1752        else if (name.equals("approvalDate")) {
1753          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.approvalDate");
1754        }
1755        else if (name.equals("lastReviewDate")) {
1756          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.lastReviewDate");
1757        }
1758        else if (name.equals("effectivePeriod")) {
1759          this.effectivePeriod = new Period();
1760          return this.effectivePeriod;
1761        }
1762        else if (name.equals("useContext")) {
1763          return addUseContext();
1764        }
1765        else if (name.equals("jurisdiction")) {
1766          return addJurisdiction();
1767        }
1768        else if (name.equals("topic")) {
1769          return addTopic();
1770        }
1771        else if (name.equals("contributor")) {
1772          return addContributor();
1773        }
1774        else if (name.equals("contact")) {
1775          return addContact();
1776        }
1777        else if (name.equals("copyright")) {
1778          throw new FHIRException("Cannot call addChild on a primitive type ServiceDefinition.copyright");
1779        }
1780        else if (name.equals("relatedArtifact")) {
1781          return addRelatedArtifact();
1782        }
1783        else if (name.equals("trigger")) {
1784          return addTrigger();
1785        }
1786        else if (name.equals("dataRequirement")) {
1787          return addDataRequirement();
1788        }
1789        else if (name.equals("operationDefinition")) {
1790          this.operationDefinition = new Reference();
1791          return this.operationDefinition;
1792        }
1793        else
1794          return super.addChild(name);
1795      }
1796
1797  public String fhirType() {
1798    return "ServiceDefinition";
1799
1800  }
1801
1802      public ServiceDefinition copy() {
1803        ServiceDefinition dst = new ServiceDefinition();
1804        copyValues(dst);
1805        dst.url = url == null ? null : url.copy();
1806        if (identifier != null) {
1807          dst.identifier = new ArrayList<Identifier>();
1808          for (Identifier i : identifier)
1809            dst.identifier.add(i.copy());
1810        };
1811        dst.version = version == null ? null : version.copy();
1812        dst.name = name == null ? null : name.copy();
1813        dst.title = title == null ? null : title.copy();
1814        dst.status = status == null ? null : status.copy();
1815        dst.experimental = experimental == null ? null : experimental.copy();
1816        dst.date = date == null ? null : date.copy();
1817        dst.publisher = publisher == null ? null : publisher.copy();
1818        dst.description = description == null ? null : description.copy();
1819        dst.purpose = purpose == null ? null : purpose.copy();
1820        dst.usage = usage == null ? null : usage.copy();
1821        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
1822        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
1823        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
1824        if (useContext != null) {
1825          dst.useContext = new ArrayList<UsageContext>();
1826          for (UsageContext i : useContext)
1827            dst.useContext.add(i.copy());
1828        };
1829        if (jurisdiction != null) {
1830          dst.jurisdiction = new ArrayList<CodeableConcept>();
1831          for (CodeableConcept i : jurisdiction)
1832            dst.jurisdiction.add(i.copy());
1833        };
1834        if (topic != null) {
1835          dst.topic = new ArrayList<CodeableConcept>();
1836          for (CodeableConcept i : topic)
1837            dst.topic.add(i.copy());
1838        };
1839        if (contributor != null) {
1840          dst.contributor = new ArrayList<Contributor>();
1841          for (Contributor i : contributor)
1842            dst.contributor.add(i.copy());
1843        };
1844        if (contact != null) {
1845          dst.contact = new ArrayList<ContactDetail>();
1846          for (ContactDetail i : contact)
1847            dst.contact.add(i.copy());
1848        };
1849        dst.copyright = copyright == null ? null : copyright.copy();
1850        if (relatedArtifact != null) {
1851          dst.relatedArtifact = new ArrayList<RelatedArtifact>();
1852          for (RelatedArtifact i : relatedArtifact)
1853            dst.relatedArtifact.add(i.copy());
1854        };
1855        if (trigger != null) {
1856          dst.trigger = new ArrayList<TriggerDefinition>();
1857          for (TriggerDefinition i : trigger)
1858            dst.trigger.add(i.copy());
1859        };
1860        if (dataRequirement != null) {
1861          dst.dataRequirement = new ArrayList<DataRequirement>();
1862          for (DataRequirement i : dataRequirement)
1863            dst.dataRequirement.add(i.copy());
1864        };
1865        dst.operationDefinition = operationDefinition == null ? null : operationDefinition.copy();
1866        return dst;
1867      }
1868
1869      protected ServiceDefinition typedCopy() {
1870        return copy();
1871      }
1872
1873      @Override
1874      public boolean equalsDeep(Base other_) {
1875        if (!super.equalsDeep(other_))
1876          return false;
1877        if (!(other_ instanceof ServiceDefinition))
1878          return false;
1879        ServiceDefinition o = (ServiceDefinition) other_;
1880        return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true)
1881           && compareDeep(approvalDate, o.approvalDate, true) && compareDeep(lastReviewDate, o.lastReviewDate, true)
1882           && compareDeep(effectivePeriod, o.effectivePeriod, true) && compareDeep(topic, o.topic, true) && compareDeep(contributor, o.contributor, true)
1883           && compareDeep(copyright, o.copyright, true) && compareDeep(relatedArtifact, o.relatedArtifact, true)
1884           && compareDeep(trigger, o.trigger, true) && compareDeep(dataRequirement, o.dataRequirement, true)
1885           && compareDeep(operationDefinition, o.operationDefinition, true);
1886      }
1887
1888      @Override
1889      public boolean equalsShallow(Base other_) {
1890        if (!super.equalsShallow(other_))
1891          return false;
1892        if (!(other_ instanceof ServiceDefinition))
1893          return false;
1894        ServiceDefinition o = (ServiceDefinition) other_;
1895        return compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true) && compareValues(approvalDate, o.approvalDate, true)
1896           && compareValues(lastReviewDate, o.lastReviewDate, true) && compareValues(copyright, o.copyright, true)
1897          ;
1898      }
1899
1900      public boolean isEmpty() {
1901        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, usage
1902          , approvalDate, lastReviewDate, effectivePeriod, topic, contributor, copyright, relatedArtifact
1903          , trigger, dataRequirement, operationDefinition);
1904      }
1905
1906  @Override
1907  public ResourceType getResourceType() {
1908    return ResourceType.ServiceDefinition;
1909   }
1910
1911 /**
1912   * Search parameter: <b>date</b>
1913   * <p>
1914   * Description: <b>The service definition publication date</b><br>
1915   * Type: <b>date</b><br>
1916   * Path: <b>ServiceDefinition.date</b><br>
1917   * </p>
1918   */
1919  @SearchParamDefinition(name="date", path="ServiceDefinition.date", description="The service definition publication date", type="date" )
1920  public static final String SP_DATE = "date";
1921 /**
1922   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1923   * <p>
1924   * Description: <b>The service definition publication date</b><br>
1925   * Type: <b>date</b><br>
1926   * Path: <b>ServiceDefinition.date</b><br>
1927   * </p>
1928   */
1929  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1930
1931 /**
1932   * Search parameter: <b>identifier</b>
1933   * <p>
1934   * Description: <b>External identifier for the service definition</b><br>
1935   * Type: <b>token</b><br>
1936   * Path: <b>ServiceDefinition.identifier</b><br>
1937   * </p>
1938   */
1939  @SearchParamDefinition(name="identifier", path="ServiceDefinition.identifier", description="External identifier for the service definition", type="token" )
1940  public static final String SP_IDENTIFIER = "identifier";
1941 /**
1942   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1943   * <p>
1944   * Description: <b>External identifier for the service definition</b><br>
1945   * Type: <b>token</b><br>
1946   * Path: <b>ServiceDefinition.identifier</b><br>
1947   * </p>
1948   */
1949  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1950
1951 /**
1952   * Search parameter: <b>successor</b>
1953   * <p>
1954   * Description: <b>What resource is being referenced</b><br>
1955   * Type: <b>reference</b><br>
1956   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
1957   * </p>
1958   */
1959  @SearchParamDefinition(name="successor", path="ServiceDefinition.relatedArtifact.where(type='successor').resource", description="What resource is being referenced", type="reference" )
1960  public static final String SP_SUCCESSOR = "successor";
1961 /**
1962   * <b>Fluent Client</b> search parameter constant for <b>successor</b>
1963   * <p>
1964   * Description: <b>What resource is being referenced</b><br>
1965   * Type: <b>reference</b><br>
1966   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
1967   * </p>
1968   */
1969  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUCCESSOR);
1970
1971/**
1972   * Constant for fluent queries to be used to add include statements. Specifies
1973   * the path value of "<b>ServiceDefinition:successor</b>".
1974   */
1975  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include("ServiceDefinition:successor").toLocked();
1976
1977 /**
1978   * Search parameter: <b>jurisdiction</b>
1979   * <p>
1980   * Description: <b>Intended jurisdiction for the service definition</b><br>
1981   * Type: <b>token</b><br>
1982   * Path: <b>ServiceDefinition.jurisdiction</b><br>
1983   * </p>
1984   */
1985  @SearchParamDefinition(name="jurisdiction", path="ServiceDefinition.jurisdiction", description="Intended jurisdiction for the service definition", type="token" )
1986  public static final String SP_JURISDICTION = "jurisdiction";
1987 /**
1988   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
1989   * <p>
1990   * Description: <b>Intended jurisdiction for the service definition</b><br>
1991   * Type: <b>token</b><br>
1992   * Path: <b>ServiceDefinition.jurisdiction</b><br>
1993   * </p>
1994   */
1995  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
1996
1997 /**
1998   * Search parameter: <b>description</b>
1999   * <p>
2000   * Description: <b>The description of the service definition</b><br>
2001   * Type: <b>string</b><br>
2002   * Path: <b>ServiceDefinition.description</b><br>
2003   * </p>
2004   */
2005  @SearchParamDefinition(name="description", path="ServiceDefinition.description", description="The description of the service definition", type="string" )
2006  public static final String SP_DESCRIPTION = "description";
2007 /**
2008   * <b>Fluent Client</b> search parameter constant for <b>description</b>
2009   * <p>
2010   * Description: <b>The description of the service definition</b><br>
2011   * Type: <b>string</b><br>
2012   * Path: <b>ServiceDefinition.description</b><br>
2013   * </p>
2014   */
2015  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
2016
2017 /**
2018   * Search parameter: <b>derived-from</b>
2019   * <p>
2020   * Description: <b>What resource is being referenced</b><br>
2021   * Type: <b>reference</b><br>
2022   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
2023   * </p>
2024   */
2025  @SearchParamDefinition(name="derived-from", path="ServiceDefinition.relatedArtifact.where(type='derived-from').resource", description="What resource is being referenced", type="reference" )
2026  public static final String SP_DERIVED_FROM = "derived-from";
2027 /**
2028   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
2029   * <p>
2030   * Description: <b>What resource is being referenced</b><br>
2031   * Type: <b>reference</b><br>
2032   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
2033   * </p>
2034   */
2035  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM);
2036
2037/**
2038   * Constant for fluent queries to be used to add include statements. Specifies
2039   * the path value of "<b>ServiceDefinition:derived-from</b>".
2040   */
2041  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("ServiceDefinition:derived-from").toLocked();
2042
2043 /**
2044   * Search parameter: <b>predecessor</b>
2045   * <p>
2046   * Description: <b>What resource is being referenced</b><br>
2047   * Type: <b>reference</b><br>
2048   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
2049   * </p>
2050   */
2051  @SearchParamDefinition(name="predecessor", path="ServiceDefinition.relatedArtifact.where(type='predecessor').resource", description="What resource is being referenced", type="reference" )
2052  public static final String SP_PREDECESSOR = "predecessor";
2053 /**
2054   * <b>Fluent Client</b> search parameter constant for <b>predecessor</b>
2055   * <p>
2056   * Description: <b>What resource is being referenced</b><br>
2057   * Type: <b>reference</b><br>
2058   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
2059   * </p>
2060   */
2061  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREDECESSOR);
2062
2063/**
2064   * Constant for fluent queries to be used to add include statements. Specifies
2065   * the path value of "<b>ServiceDefinition:predecessor</b>".
2066   */
2067  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include("ServiceDefinition:predecessor").toLocked();
2068
2069 /**
2070   * Search parameter: <b>title</b>
2071   * <p>
2072   * Description: <b>The human-friendly name of the service definition</b><br>
2073   * Type: <b>string</b><br>
2074   * Path: <b>ServiceDefinition.title</b><br>
2075   * </p>
2076   */
2077  @SearchParamDefinition(name="title", path="ServiceDefinition.title", description="The human-friendly name of the service definition", type="string" )
2078  public static final String SP_TITLE = "title";
2079 /**
2080   * <b>Fluent Client</b> search parameter constant for <b>title</b>
2081   * <p>
2082   * Description: <b>The human-friendly name of the service definition</b><br>
2083   * Type: <b>string</b><br>
2084   * Path: <b>ServiceDefinition.title</b><br>
2085   * </p>
2086   */
2087  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
2088
2089 /**
2090   * Search parameter: <b>composed-of</b>
2091   * <p>
2092   * Description: <b>What resource is being referenced</b><br>
2093   * Type: <b>reference</b><br>
2094   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
2095   * </p>
2096   */
2097  @SearchParamDefinition(name="composed-of", path="ServiceDefinition.relatedArtifact.where(type='composed-of').resource", description="What resource is being referenced", type="reference" )
2098  public static final String SP_COMPOSED_OF = "composed-of";
2099 /**
2100   * <b>Fluent Client</b> search parameter constant for <b>composed-of</b>
2101   * <p>
2102   * Description: <b>What resource is being referenced</b><br>
2103   * Type: <b>reference</b><br>
2104   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
2105   * </p>
2106   */
2107  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSED_OF);
2108
2109/**
2110   * Constant for fluent queries to be used to add include statements. Specifies
2111   * the path value of "<b>ServiceDefinition:composed-of</b>".
2112   */
2113  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include("ServiceDefinition:composed-of").toLocked();
2114
2115 /**
2116   * Search parameter: <b>version</b>
2117   * <p>
2118   * Description: <b>The business version of the service definition</b><br>
2119   * Type: <b>token</b><br>
2120   * Path: <b>ServiceDefinition.version</b><br>
2121   * </p>
2122   */
2123  @SearchParamDefinition(name="version", path="ServiceDefinition.version", description="The business version of the service definition", type="token" )
2124  public static final String SP_VERSION = "version";
2125 /**
2126   * <b>Fluent Client</b> search parameter constant for <b>version</b>
2127   * <p>
2128   * Description: <b>The business version of the service definition</b><br>
2129   * Type: <b>token</b><br>
2130   * Path: <b>ServiceDefinition.version</b><br>
2131   * </p>
2132   */
2133  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
2134
2135 /**
2136   * Search parameter: <b>url</b>
2137   * <p>
2138   * Description: <b>The uri that identifies the service definition</b><br>
2139   * Type: <b>uri</b><br>
2140   * Path: <b>ServiceDefinition.url</b><br>
2141   * </p>
2142   */
2143  @SearchParamDefinition(name="url", path="ServiceDefinition.url", description="The uri that identifies the service definition", type="uri" )
2144  public static final String SP_URL = "url";
2145 /**
2146   * <b>Fluent Client</b> search parameter constant for <b>url</b>
2147   * <p>
2148   * Description: <b>The uri that identifies the service definition</b><br>
2149   * Type: <b>uri</b><br>
2150   * Path: <b>ServiceDefinition.url</b><br>
2151   * </p>
2152   */
2153  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
2154
2155 /**
2156   * Search parameter: <b>effective</b>
2157   * <p>
2158   * Description: <b>The time during which the service definition is intended to be in use</b><br>
2159   * Type: <b>date</b><br>
2160   * Path: <b>ServiceDefinition.effectivePeriod</b><br>
2161   * </p>
2162   */
2163  @SearchParamDefinition(name="effective", path="ServiceDefinition.effectivePeriod", description="The time during which the service definition is intended to be in use", type="date" )
2164  public static final String SP_EFFECTIVE = "effective";
2165 /**
2166   * <b>Fluent Client</b> search parameter constant for <b>effective</b>
2167   * <p>
2168   * Description: <b>The time during which the service definition is intended to be in use</b><br>
2169   * Type: <b>date</b><br>
2170   * Path: <b>ServiceDefinition.effectivePeriod</b><br>
2171   * </p>
2172   */
2173  public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE);
2174
2175 /**
2176   * Search parameter: <b>depends-on</b>
2177   * <p>
2178   * Description: <b>What resource is being referenced</b><br>
2179   * Type: <b>reference</b><br>
2180   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
2181   * </p>
2182   */
2183  @SearchParamDefinition(name="depends-on", path="ServiceDefinition.relatedArtifact.where(type='depends-on').resource", description="What resource is being referenced", type="reference" )
2184  public static final String SP_DEPENDS_ON = "depends-on";
2185 /**
2186   * <b>Fluent Client</b> search parameter constant for <b>depends-on</b>
2187   * <p>
2188   * Description: <b>What resource is being referenced</b><br>
2189   * Type: <b>reference</b><br>
2190   * Path: <b>ServiceDefinition.relatedArtifact.resource</b><br>
2191   * </p>
2192   */
2193  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON);
2194
2195/**
2196   * Constant for fluent queries to be used to add include statements. Specifies
2197   * the path value of "<b>ServiceDefinition:depends-on</b>".
2198   */
2199  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("ServiceDefinition:depends-on").toLocked();
2200
2201 /**
2202   * Search parameter: <b>name</b>
2203   * <p>
2204   * Description: <b>Computationally friendly name of the service definition</b><br>
2205   * Type: <b>string</b><br>
2206   * Path: <b>ServiceDefinition.name</b><br>
2207   * </p>
2208   */
2209  @SearchParamDefinition(name="name", path="ServiceDefinition.name", description="Computationally friendly name of the service definition", type="string" )
2210  public static final String SP_NAME = "name";
2211 /**
2212   * <b>Fluent Client</b> search parameter constant for <b>name</b>
2213   * <p>
2214   * Description: <b>Computationally friendly name of the service definition</b><br>
2215   * Type: <b>string</b><br>
2216   * Path: <b>ServiceDefinition.name</b><br>
2217   * </p>
2218   */
2219  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
2220
2221 /**
2222   * Search parameter: <b>publisher</b>
2223   * <p>
2224   * Description: <b>Name of the publisher of the service definition</b><br>
2225   * Type: <b>string</b><br>
2226   * Path: <b>ServiceDefinition.publisher</b><br>
2227   * </p>
2228   */
2229  @SearchParamDefinition(name="publisher", path="ServiceDefinition.publisher", description="Name of the publisher of the service definition", type="string" )
2230  public static final String SP_PUBLISHER = "publisher";
2231 /**
2232   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
2233   * <p>
2234   * Description: <b>Name of the publisher of the service definition</b><br>
2235   * Type: <b>string</b><br>
2236   * Path: <b>ServiceDefinition.publisher</b><br>
2237   * </p>
2238   */
2239  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
2240
2241 /**
2242   * Search parameter: <b>topic</b>
2243   * <p>
2244   * Description: <b>Topics associated with the module</b><br>
2245   * Type: <b>token</b><br>
2246   * Path: <b>ServiceDefinition.topic</b><br>
2247   * </p>
2248   */
2249  @SearchParamDefinition(name="topic", path="ServiceDefinition.topic", description="Topics associated with the module", type="token" )
2250  public static final String SP_TOPIC = "topic";
2251 /**
2252   * <b>Fluent Client</b> search parameter constant for <b>topic</b>
2253   * <p>
2254   * Description: <b>Topics associated with the module</b><br>
2255   * Type: <b>token</b><br>
2256   * Path: <b>ServiceDefinition.topic</b><br>
2257   * </p>
2258   */
2259  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC);
2260
2261 /**
2262   * Search parameter: <b>status</b>
2263   * <p>
2264   * Description: <b>The current status of the service definition</b><br>
2265   * Type: <b>token</b><br>
2266   * Path: <b>ServiceDefinition.status</b><br>
2267   * </p>
2268   */
2269  @SearchParamDefinition(name="status", path="ServiceDefinition.status", description="The current status of the service definition", type="token" )
2270  public static final String SP_STATUS = "status";
2271 /**
2272   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2273   * <p>
2274   * Description: <b>The current status of the service definition</b><br>
2275   * Type: <b>token</b><br>
2276   * Path: <b>ServiceDefinition.status</b><br>
2277   * </p>
2278   */
2279  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2280
2281
2282}
2283