001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * The details of a healthcare service available at a location or in a catalog.  In the case where there is a hierarchy of services (for example, Lab -> Pathology -> Wound Cultures), this can be represented using a set of linked HealthcareServices.
052 */
053@ResourceDef(name="HealthcareService", profile="http://hl7.org/fhir/StructureDefinition/HealthcareService")
054public class HealthcareService extends DomainResource {
055
056    @Block()
057    public static class HealthcareServiceEligibilityComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * Coded value for the eligibility.
060         */
061        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
062        @Description(shortDefinition="Coded value for the eligibility", formalDefinition="Coded value for the eligibility." )
063        protected CodeableConcept code;
064
065        /**
066         * Describes the eligibility conditions for the service.
067         */
068        @Child(name = "comment", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
069        @Description(shortDefinition="Describes the eligibility conditions for the service", formalDefinition="Describes the eligibility conditions for the service." )
070        protected MarkdownType comment;
071
072        private static final long serialVersionUID = 1078065348L;
073
074    /**
075     * Constructor
076     */
077      public HealthcareServiceEligibilityComponent() {
078        super();
079      }
080
081        /**
082         * @return {@link #code} (Coded value for the eligibility.)
083         */
084        public CodeableConcept getCode() { 
085          if (this.code == null)
086            if (Configuration.errorOnAutoCreate())
087              throw new Error("Attempt to auto-create HealthcareServiceEligibilityComponent.code");
088            else if (Configuration.doAutoCreate())
089              this.code = new CodeableConcept(); // cc
090          return this.code;
091        }
092
093        public boolean hasCode() { 
094          return this.code != null && !this.code.isEmpty();
095        }
096
097        /**
098         * @param value {@link #code} (Coded value for the eligibility.)
099         */
100        public HealthcareServiceEligibilityComponent setCode(CodeableConcept value) { 
101          this.code = value;
102          return this;
103        }
104
105        /**
106         * @return {@link #comment} (Describes the eligibility conditions for the service.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
107         */
108        public MarkdownType getCommentElement() { 
109          if (this.comment == null)
110            if (Configuration.errorOnAutoCreate())
111              throw new Error("Attempt to auto-create HealthcareServiceEligibilityComponent.comment");
112            else if (Configuration.doAutoCreate())
113              this.comment = new MarkdownType(); // bb
114          return this.comment;
115        }
116
117        public boolean hasCommentElement() { 
118          return this.comment != null && !this.comment.isEmpty();
119        }
120
121        public boolean hasComment() { 
122          return this.comment != null && !this.comment.isEmpty();
123        }
124
125        /**
126         * @param value {@link #comment} (Describes the eligibility conditions for the service.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
127         */
128        public HealthcareServiceEligibilityComponent setCommentElement(MarkdownType value) { 
129          this.comment = value;
130          return this;
131        }
132
133        /**
134         * @return Describes the eligibility conditions for the service.
135         */
136        public String getComment() { 
137          return this.comment == null ? null : this.comment.getValue();
138        }
139
140        /**
141         * @param value Describes the eligibility conditions for the service.
142         */
143        public HealthcareServiceEligibilityComponent setComment(String value) { 
144          if (Utilities.noString(value))
145            this.comment = null;
146          else {
147            if (this.comment == null)
148              this.comment = new MarkdownType();
149            this.comment.setValue(value);
150          }
151          return this;
152        }
153
154        protected void listChildren(List<Property> children) {
155          super.listChildren(children);
156          children.add(new Property("code", "CodeableConcept", "Coded value for the eligibility.", 0, 1, code));
157          children.add(new Property("comment", "markdown", "Describes the eligibility conditions for the service.", 0, 1, comment));
158        }
159
160        @Override
161        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
162          switch (_hash) {
163          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Coded value for the eligibility.", 0, 1, code);
164          case 950398559: /*comment*/  return new Property("comment", "markdown", "Describes the eligibility conditions for the service.", 0, 1, comment);
165          default: return super.getNamedProperty(_hash, _name, _checkValid);
166          }
167
168        }
169
170      @Override
171      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
172        switch (hash) {
173        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
174        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // MarkdownType
175        default: return super.getProperty(hash, name, checkValid);
176        }
177
178      }
179
180      @Override
181      public Base setProperty(int hash, String name, Base value) throws FHIRException {
182        switch (hash) {
183        case 3059181: // code
184          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
185          return value;
186        case 950398559: // comment
187          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
188          return value;
189        default: return super.setProperty(hash, name, value);
190        }
191
192      }
193
194      @Override
195      public Base setProperty(String name, Base value) throws FHIRException {
196        if (name.equals("code")) {
197          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
198        } else if (name.equals("comment")) {
199          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
200        } else
201          return super.setProperty(name, value);
202        return value;
203      }
204
205  @Override
206  public void removeChild(String name, Base value) throws FHIRException {
207        if (name.equals("code")) {
208          this.code = null;
209        } else if (name.equals("comment")) {
210          this.comment = null;
211        } else
212          super.removeChild(name, value);
213        
214      }
215
216      @Override
217      public Base makeProperty(int hash, String name) throws FHIRException {
218        switch (hash) {
219        case 3059181:  return getCode();
220        case 950398559:  return getCommentElement();
221        default: return super.makeProperty(hash, name);
222        }
223
224      }
225
226      @Override
227      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
228        switch (hash) {
229        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
230        case 950398559: /*comment*/ return new String[] {"markdown"};
231        default: return super.getTypesForProperty(hash, name);
232        }
233
234      }
235
236      @Override
237      public Base addChild(String name) throws FHIRException {
238        if (name.equals("code")) {
239          this.code = new CodeableConcept();
240          return this.code;
241        }
242        else if (name.equals("comment")) {
243          throw new FHIRException("Cannot call addChild on a singleton property HealthcareService.eligibility.comment");
244        }
245        else
246          return super.addChild(name);
247      }
248
249      public HealthcareServiceEligibilityComponent copy() {
250        HealthcareServiceEligibilityComponent dst = new HealthcareServiceEligibilityComponent();
251        copyValues(dst);
252        return dst;
253      }
254
255      public void copyValues(HealthcareServiceEligibilityComponent dst) {
256        super.copyValues(dst);
257        dst.code = code == null ? null : code.copy();
258        dst.comment = comment == null ? null : comment.copy();
259      }
260
261      @Override
262      public boolean equalsDeep(Base other_) {
263        if (!super.equalsDeep(other_))
264          return false;
265        if (!(other_ instanceof HealthcareServiceEligibilityComponent))
266          return false;
267        HealthcareServiceEligibilityComponent o = (HealthcareServiceEligibilityComponent) other_;
268        return compareDeep(code, o.code, true) && compareDeep(comment, o.comment, true);
269      }
270
271      @Override
272      public boolean equalsShallow(Base other_) {
273        if (!super.equalsShallow(other_))
274          return false;
275        if (!(other_ instanceof HealthcareServiceEligibilityComponent))
276          return false;
277        HealthcareServiceEligibilityComponent o = (HealthcareServiceEligibilityComponent) other_;
278        return compareValues(comment, o.comment, true);
279      }
280
281      public boolean isEmpty() {
282        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, comment);
283      }
284
285  public String fhirType() {
286    return "HealthcareService.eligibility";
287
288  }
289
290  }
291
292    /**
293     * External identifiers for this item.
294     */
295    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
296    @Description(shortDefinition="External identifiers for this item", formalDefinition="External identifiers for this item." )
297    protected List<Identifier> identifier;
298
299    /**
300     * This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.
301     */
302    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true)
303    @Description(shortDefinition="Whether this HealthcareService record is in active use", formalDefinition="This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this." )
304    protected BooleanType active;
305
306    /**
307     * The organization that provides this healthcare service.
308     */
309    @Child(name = "providedBy", type = {Organization.class}, order=2, min=0, max=1, modifier=false, summary=true)
310    @Description(shortDefinition="Organization that provides this service", formalDefinition="The organization that provides this healthcare service." )
311    protected Reference providedBy;
312
313    /**
314     * When the HealthcareService is representing a specific, schedulable service, the availableIn property can refer to a generic service.
315     */
316    @Child(name = "offeredIn", type = {HealthcareService.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
317    @Description(shortDefinition="The service within which this service is offered", formalDefinition="When the HealthcareService is representing a specific, schedulable service, the availableIn property can refer to a generic service." )
318    protected List<Reference> offeredIn;
319
320    /**
321     * Identifies the broad category of service being performed or delivered.
322     */
323    @Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
324    @Description(shortDefinition="Broad category of service being performed or delivered", formalDefinition="Identifies the broad category of service being performed or delivered." )
325    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-category")
326    protected List<CodeableConcept> category;
327
328    /**
329     * The specific type of service that may be delivered or performed.
330     */
331    @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
332    @Description(shortDefinition="Type of service that may be delivered or performed", formalDefinition="The specific type of service that may be delivered or performed." )
333    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-type")
334    protected List<CodeableConcept> type;
335
336    /**
337     * Collection of specialties handled by the Healthcare service. This is more of a medical term.
338     */
339    @Child(name = "specialty", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
340    @Description(shortDefinition="Specialties handled by the HealthcareService", formalDefinition="Collection of specialties handled by the Healthcare service. This is more of a medical term." )
341    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-practice-codes")
342    protected List<CodeableConcept> specialty;
343
344    /**
345     * The location(s) where this healthcare service may be provided.
346     */
347    @Child(name = "location", type = {Location.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
348    @Description(shortDefinition="Location(s) where service may be provided", formalDefinition="The location(s) where this healthcare service may be provided." )
349    protected List<Reference> location;
350
351    /**
352     * Further description of the service as it would be presented to a consumer while searching.
353     */
354    @Child(name = "name", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true)
355    @Description(shortDefinition="Description of service as presented to a consumer while searching", formalDefinition="Further description of the service as it would be presented to a consumer while searching." )
356    protected StringType name;
357
358    /**
359     * Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.
360     */
361    @Child(name = "comment", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true)
362    @Description(shortDefinition="Additional description and/or any specific issues not covered elsewhere", formalDefinition="Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName." )
363    protected MarkdownType comment;
364
365    /**
366     * Extra details about the service that can't be placed in the other fields.
367     */
368    @Child(name = "extraDetails", type = {MarkdownType.class}, order=10, min=0, max=1, modifier=false, summary=false)
369    @Description(shortDefinition="Extra details about the service that can't be placed in the other fields", formalDefinition="Extra details about the service that can't be placed in the other fields." )
370    protected MarkdownType extraDetails;
371
372    /**
373     * If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.
374     */
375    @Child(name = "photo", type = {Attachment.class}, order=11, min=0, max=1, modifier=false, summary=true)
376    @Description(shortDefinition="Facilitates quick identification of the service", formalDefinition="If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list." )
377    protected Attachment photo;
378
379    /**
380     * The contact details of communication devices available relevant to the specific HealthcareService. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.
381     */
382    @Child(name = "contact", type = {ExtendedContactDetail.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
383    @Description(shortDefinition="Official contact details for the HealthcareService", formalDefinition="The contact details of communication devices available relevant to the specific HealthcareService. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites." )
384    protected List<ExtendedContactDetail> contact;
385
386    /**
387     * The location(s) that this service is available to (not where the service is provided).
388     */
389    @Child(name = "coverageArea", type = {Location.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
390    @Description(shortDefinition="Location(s) service is intended for/available to", formalDefinition="The location(s) that this service is available to (not where the service is provided)." )
391    protected List<Reference> coverageArea;
392
393    /**
394     * The code(s) that detail the conditions under which the healthcare service is available/offered.
395     */
396    @Child(name = "serviceProvisionCode", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
397    @Description(shortDefinition="Conditions under which service is available/offered", formalDefinition="The code(s) that detail the conditions under which the healthcare service is available/offered." )
398    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-provision-conditions")
399    protected List<CodeableConcept> serviceProvisionCode;
400
401    /**
402     * Does this service have specific eligibility requirements that need to be met in order to use the service?
403     */
404    @Child(name = "eligibility", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
405    @Description(shortDefinition="Specific eligibility requirements required to use the service", formalDefinition="Does this service have specific eligibility requirements that need to be met in order to use the service?" )
406    protected List<HealthcareServiceEligibilityComponent> eligibility;
407
408    /**
409     * Programs that this service is applicable to.
410     */
411    @Child(name = "program", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
412    @Description(shortDefinition="Programs that this service is applicable to", formalDefinition="Programs that this service is applicable to." )
413    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/program")
414    protected List<CodeableConcept> program;
415
416    /**
417     * Collection of characteristics (attributes).
418     */
419    @Child(name = "characteristic", type = {CodeableConcept.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
420    @Description(shortDefinition="Collection of characteristics (attributes)", formalDefinition="Collection of characteristics (attributes)." )
421    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-mode")
422    protected List<CodeableConcept> characteristic;
423
424    /**
425     * Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.
426     */
427    @Child(name = "communication", type = {CodeableConcept.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
428    @Description(shortDefinition="The language that this service is offered in", formalDefinition="Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used." )
429    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/all-languages")
430    protected List<CodeableConcept> communication;
431
432    /**
433     * Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.
434     */
435    @Child(name = "referralMethod", type = {CodeableConcept.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
436    @Description(shortDefinition="Ways that the service accepts referrals", formalDefinition="Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required." )
437    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-referral-method")
438    protected List<CodeableConcept> referralMethod;
439
440    /**
441     * Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.
442     */
443    @Child(name = "appointmentRequired", type = {BooleanType.class}, order=20, min=0, max=1, modifier=false, summary=false)
444    @Description(shortDefinition="If an appointment is required for access to this service", formalDefinition="Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service." )
445    protected BooleanType appointmentRequired;
446
447    /**
448     * A collection of times that the healthcare service is available.
449     */
450    @Child(name = "availability", type = {Availability.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
451    @Description(shortDefinition="Times the healthcare service is available (including exceptions)", formalDefinition="A collection of times that the healthcare service is available." )
452    protected List<Availability> availability;
453
454    /**
455     * Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.
456     */
457    @Child(name = "endpoint", type = {Endpoint.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
458    @Description(shortDefinition="Technical endpoints providing access to electronic services operated for the healthcare service", formalDefinition="Technical endpoints providing access to services operated for the specific healthcare services defined at this resource." )
459    protected List<Reference> endpoint;
460
461    private static final long serialVersionUID = -438716159L;
462
463  /**
464   * Constructor
465   */
466    public HealthcareService() {
467      super();
468    }
469
470    /**
471     * @return {@link #identifier} (External identifiers for this item.)
472     */
473    public List<Identifier> getIdentifier() { 
474      if (this.identifier == null)
475        this.identifier = new ArrayList<Identifier>();
476      return this.identifier;
477    }
478
479    /**
480     * @return Returns a reference to <code>this</code> for easy method chaining
481     */
482    public HealthcareService setIdentifier(List<Identifier> theIdentifier) { 
483      this.identifier = theIdentifier;
484      return this;
485    }
486
487    public boolean hasIdentifier() { 
488      if (this.identifier == null)
489        return false;
490      for (Identifier item : this.identifier)
491        if (!item.isEmpty())
492          return true;
493      return false;
494    }
495
496    public Identifier addIdentifier() { //3
497      Identifier t = new Identifier();
498      if (this.identifier == null)
499        this.identifier = new ArrayList<Identifier>();
500      this.identifier.add(t);
501      return t;
502    }
503
504    public HealthcareService addIdentifier(Identifier t) { //3
505      if (t == null)
506        return this;
507      if (this.identifier == null)
508        this.identifier = new ArrayList<Identifier>();
509      this.identifier.add(t);
510      return this;
511    }
512
513    /**
514     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
515     */
516    public Identifier getIdentifierFirstRep() { 
517      if (getIdentifier().isEmpty()) {
518        addIdentifier();
519      }
520      return getIdentifier().get(0);
521    }
522
523    /**
524     * @return {@link #active} (This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
525     */
526    public BooleanType getActiveElement() { 
527      if (this.active == null)
528        if (Configuration.errorOnAutoCreate())
529          throw new Error("Attempt to auto-create HealthcareService.active");
530        else if (Configuration.doAutoCreate())
531          this.active = new BooleanType(); // bb
532      return this.active;
533    }
534
535    public boolean hasActiveElement() { 
536      return this.active != null && !this.active.isEmpty();
537    }
538
539    public boolean hasActive() { 
540      return this.active != null && !this.active.isEmpty();
541    }
542
543    /**
544     * @param value {@link #active} (This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
545     */
546    public HealthcareService setActiveElement(BooleanType value) { 
547      this.active = value;
548      return this;
549    }
550
551    /**
552     * @return This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.
553     */
554    public boolean getActive() { 
555      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
556    }
557
558    /**
559     * @param value This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.
560     */
561    public HealthcareService setActive(boolean value) { 
562        if (this.active == null)
563          this.active = new BooleanType();
564        this.active.setValue(value);
565      return this;
566    }
567
568    /**
569     * @return {@link #providedBy} (The organization that provides this healthcare service.)
570     */
571    public Reference getProvidedBy() { 
572      if (this.providedBy == null)
573        if (Configuration.errorOnAutoCreate())
574          throw new Error("Attempt to auto-create HealthcareService.providedBy");
575        else if (Configuration.doAutoCreate())
576          this.providedBy = new Reference(); // cc
577      return this.providedBy;
578    }
579
580    public boolean hasProvidedBy() { 
581      return this.providedBy != null && !this.providedBy.isEmpty();
582    }
583
584    /**
585     * @param value {@link #providedBy} (The organization that provides this healthcare service.)
586     */
587    public HealthcareService setProvidedBy(Reference value) { 
588      this.providedBy = value;
589      return this;
590    }
591
592    /**
593     * @return {@link #offeredIn} (When the HealthcareService is representing a specific, schedulable service, the availableIn property can refer to a generic service.)
594     */
595    public List<Reference> getOfferedIn() { 
596      if (this.offeredIn == null)
597        this.offeredIn = new ArrayList<Reference>();
598      return this.offeredIn;
599    }
600
601    /**
602     * @return Returns a reference to <code>this</code> for easy method chaining
603     */
604    public HealthcareService setOfferedIn(List<Reference> theOfferedIn) { 
605      this.offeredIn = theOfferedIn;
606      return this;
607    }
608
609    public boolean hasOfferedIn() { 
610      if (this.offeredIn == null)
611        return false;
612      for (Reference item : this.offeredIn)
613        if (!item.isEmpty())
614          return true;
615      return false;
616    }
617
618    public Reference addOfferedIn() { //3
619      Reference t = new Reference();
620      if (this.offeredIn == null)
621        this.offeredIn = new ArrayList<Reference>();
622      this.offeredIn.add(t);
623      return t;
624    }
625
626    public HealthcareService addOfferedIn(Reference t) { //3
627      if (t == null)
628        return this;
629      if (this.offeredIn == null)
630        this.offeredIn = new ArrayList<Reference>();
631      this.offeredIn.add(t);
632      return this;
633    }
634
635    /**
636     * @return The first repetition of repeating field {@link #offeredIn}, creating it if it does not already exist {3}
637     */
638    public Reference getOfferedInFirstRep() { 
639      if (getOfferedIn().isEmpty()) {
640        addOfferedIn();
641      }
642      return getOfferedIn().get(0);
643    }
644
645    /**
646     * @return {@link #category} (Identifies the broad category of service being performed or delivered.)
647     */
648    public List<CodeableConcept> getCategory() { 
649      if (this.category == null)
650        this.category = new ArrayList<CodeableConcept>();
651      return this.category;
652    }
653
654    /**
655     * @return Returns a reference to <code>this</code> for easy method chaining
656     */
657    public HealthcareService setCategory(List<CodeableConcept> theCategory) { 
658      this.category = theCategory;
659      return this;
660    }
661
662    public boolean hasCategory() { 
663      if (this.category == null)
664        return false;
665      for (CodeableConcept item : this.category)
666        if (!item.isEmpty())
667          return true;
668      return false;
669    }
670
671    public CodeableConcept addCategory() { //3
672      CodeableConcept t = new CodeableConcept();
673      if (this.category == null)
674        this.category = new ArrayList<CodeableConcept>();
675      this.category.add(t);
676      return t;
677    }
678
679    public HealthcareService addCategory(CodeableConcept t) { //3
680      if (t == null)
681        return this;
682      if (this.category == null)
683        this.category = new ArrayList<CodeableConcept>();
684      this.category.add(t);
685      return this;
686    }
687
688    /**
689     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
690     */
691    public CodeableConcept getCategoryFirstRep() { 
692      if (getCategory().isEmpty()) {
693        addCategory();
694      }
695      return getCategory().get(0);
696    }
697
698    /**
699     * @return {@link #type} (The specific type of service that may be delivered or performed.)
700     */
701    public List<CodeableConcept> getType() { 
702      if (this.type == null)
703        this.type = new ArrayList<CodeableConcept>();
704      return this.type;
705    }
706
707    /**
708     * @return Returns a reference to <code>this</code> for easy method chaining
709     */
710    public HealthcareService setType(List<CodeableConcept> theType) { 
711      this.type = theType;
712      return this;
713    }
714
715    public boolean hasType() { 
716      if (this.type == null)
717        return false;
718      for (CodeableConcept item : this.type)
719        if (!item.isEmpty())
720          return true;
721      return false;
722    }
723
724    public CodeableConcept addType() { //3
725      CodeableConcept t = new CodeableConcept();
726      if (this.type == null)
727        this.type = new ArrayList<CodeableConcept>();
728      this.type.add(t);
729      return t;
730    }
731
732    public HealthcareService addType(CodeableConcept t) { //3
733      if (t == null)
734        return this;
735      if (this.type == null)
736        this.type = new ArrayList<CodeableConcept>();
737      this.type.add(t);
738      return this;
739    }
740
741    /**
742     * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3}
743     */
744    public CodeableConcept getTypeFirstRep() { 
745      if (getType().isEmpty()) {
746        addType();
747      }
748      return getType().get(0);
749    }
750
751    /**
752     * @return {@link #specialty} (Collection of specialties handled by the Healthcare service. This is more of a medical term.)
753     */
754    public List<CodeableConcept> getSpecialty() { 
755      if (this.specialty == null)
756        this.specialty = new ArrayList<CodeableConcept>();
757      return this.specialty;
758    }
759
760    /**
761     * @return Returns a reference to <code>this</code> for easy method chaining
762     */
763    public HealthcareService setSpecialty(List<CodeableConcept> theSpecialty) { 
764      this.specialty = theSpecialty;
765      return this;
766    }
767
768    public boolean hasSpecialty() { 
769      if (this.specialty == null)
770        return false;
771      for (CodeableConcept item : this.specialty)
772        if (!item.isEmpty())
773          return true;
774      return false;
775    }
776
777    public CodeableConcept addSpecialty() { //3
778      CodeableConcept t = new CodeableConcept();
779      if (this.specialty == null)
780        this.specialty = new ArrayList<CodeableConcept>();
781      this.specialty.add(t);
782      return t;
783    }
784
785    public HealthcareService addSpecialty(CodeableConcept t) { //3
786      if (t == null)
787        return this;
788      if (this.specialty == null)
789        this.specialty = new ArrayList<CodeableConcept>();
790      this.specialty.add(t);
791      return this;
792    }
793
794    /**
795     * @return The first repetition of repeating field {@link #specialty}, creating it if it does not already exist {3}
796     */
797    public CodeableConcept getSpecialtyFirstRep() { 
798      if (getSpecialty().isEmpty()) {
799        addSpecialty();
800      }
801      return getSpecialty().get(0);
802    }
803
804    /**
805     * @return {@link #location} (The location(s) where this healthcare service may be provided.)
806     */
807    public List<Reference> getLocation() { 
808      if (this.location == null)
809        this.location = new ArrayList<Reference>();
810      return this.location;
811    }
812
813    /**
814     * @return Returns a reference to <code>this</code> for easy method chaining
815     */
816    public HealthcareService setLocation(List<Reference> theLocation) { 
817      this.location = theLocation;
818      return this;
819    }
820
821    public boolean hasLocation() { 
822      if (this.location == null)
823        return false;
824      for (Reference item : this.location)
825        if (!item.isEmpty())
826          return true;
827      return false;
828    }
829
830    public Reference addLocation() { //3
831      Reference t = new Reference();
832      if (this.location == null)
833        this.location = new ArrayList<Reference>();
834      this.location.add(t);
835      return t;
836    }
837
838    public HealthcareService addLocation(Reference t) { //3
839      if (t == null)
840        return this;
841      if (this.location == null)
842        this.location = new ArrayList<Reference>();
843      this.location.add(t);
844      return this;
845    }
846
847    /**
848     * @return The first repetition of repeating field {@link #location}, creating it if it does not already exist {3}
849     */
850    public Reference getLocationFirstRep() { 
851      if (getLocation().isEmpty()) {
852        addLocation();
853      }
854      return getLocation().get(0);
855    }
856
857    /**
858     * @return {@link #name} (Further description of the service as it would be presented to a consumer while searching.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
859     */
860    public StringType getNameElement() { 
861      if (this.name == null)
862        if (Configuration.errorOnAutoCreate())
863          throw new Error("Attempt to auto-create HealthcareService.name");
864        else if (Configuration.doAutoCreate())
865          this.name = new StringType(); // bb
866      return this.name;
867    }
868
869    public boolean hasNameElement() { 
870      return this.name != null && !this.name.isEmpty();
871    }
872
873    public boolean hasName() { 
874      return this.name != null && !this.name.isEmpty();
875    }
876
877    /**
878     * @param value {@link #name} (Further description of the service as it would be presented to a consumer while searching.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
879     */
880    public HealthcareService setNameElement(StringType value) { 
881      this.name = value;
882      return this;
883    }
884
885    /**
886     * @return Further description of the service as it would be presented to a consumer while searching.
887     */
888    public String getName() { 
889      return this.name == null ? null : this.name.getValue();
890    }
891
892    /**
893     * @param value Further description of the service as it would be presented to a consumer while searching.
894     */
895    public HealthcareService setName(String value) { 
896      if (Utilities.noString(value))
897        this.name = null;
898      else {
899        if (this.name == null)
900          this.name = new StringType();
901        this.name.setValue(value);
902      }
903      return this;
904    }
905
906    /**
907     * @return {@link #comment} (Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
908     */
909    public MarkdownType getCommentElement() { 
910      if (this.comment == null)
911        if (Configuration.errorOnAutoCreate())
912          throw new Error("Attempt to auto-create HealthcareService.comment");
913        else if (Configuration.doAutoCreate())
914          this.comment = new MarkdownType(); // bb
915      return this.comment;
916    }
917
918    public boolean hasCommentElement() { 
919      return this.comment != null && !this.comment.isEmpty();
920    }
921
922    public boolean hasComment() { 
923      return this.comment != null && !this.comment.isEmpty();
924    }
925
926    /**
927     * @param value {@link #comment} (Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
928     */
929    public HealthcareService setCommentElement(MarkdownType value) { 
930      this.comment = value;
931      return this;
932    }
933
934    /**
935     * @return Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.
936     */
937    public String getComment() { 
938      return this.comment == null ? null : this.comment.getValue();
939    }
940
941    /**
942     * @param value Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.
943     */
944    public HealthcareService setComment(String value) { 
945      if (Utilities.noString(value))
946        this.comment = null;
947      else {
948        if (this.comment == null)
949          this.comment = new MarkdownType();
950        this.comment.setValue(value);
951      }
952      return this;
953    }
954
955    /**
956     * @return {@link #extraDetails} (Extra details about the service that can't be placed in the other fields.). This is the underlying object with id, value and extensions. The accessor "getExtraDetails" gives direct access to the value
957     */
958    public MarkdownType getExtraDetailsElement() { 
959      if (this.extraDetails == null)
960        if (Configuration.errorOnAutoCreate())
961          throw new Error("Attempt to auto-create HealthcareService.extraDetails");
962        else if (Configuration.doAutoCreate())
963          this.extraDetails = new MarkdownType(); // bb
964      return this.extraDetails;
965    }
966
967    public boolean hasExtraDetailsElement() { 
968      return this.extraDetails != null && !this.extraDetails.isEmpty();
969    }
970
971    public boolean hasExtraDetails() { 
972      return this.extraDetails != null && !this.extraDetails.isEmpty();
973    }
974
975    /**
976     * @param value {@link #extraDetails} (Extra details about the service that can't be placed in the other fields.). This is the underlying object with id, value and extensions. The accessor "getExtraDetails" gives direct access to the value
977     */
978    public HealthcareService setExtraDetailsElement(MarkdownType value) { 
979      this.extraDetails = value;
980      return this;
981    }
982
983    /**
984     * @return Extra details about the service that can't be placed in the other fields.
985     */
986    public String getExtraDetails() { 
987      return this.extraDetails == null ? null : this.extraDetails.getValue();
988    }
989
990    /**
991     * @param value Extra details about the service that can't be placed in the other fields.
992     */
993    public HealthcareService setExtraDetails(String value) { 
994      if (Utilities.noString(value))
995        this.extraDetails = null;
996      else {
997        if (this.extraDetails == null)
998          this.extraDetails = new MarkdownType();
999        this.extraDetails.setValue(value);
1000      }
1001      return this;
1002    }
1003
1004    /**
1005     * @return {@link #photo} (If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.)
1006     */
1007    public Attachment getPhoto() { 
1008      if (this.photo == null)
1009        if (Configuration.errorOnAutoCreate())
1010          throw new Error("Attempt to auto-create HealthcareService.photo");
1011        else if (Configuration.doAutoCreate())
1012          this.photo = new Attachment(); // cc
1013      return this.photo;
1014    }
1015
1016    public boolean hasPhoto() { 
1017      return this.photo != null && !this.photo.isEmpty();
1018    }
1019
1020    /**
1021     * @param value {@link #photo} (If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.)
1022     */
1023    public HealthcareService setPhoto(Attachment value) { 
1024      this.photo = value;
1025      return this;
1026    }
1027
1028    /**
1029     * @return {@link #contact} (The contact details of communication devices available relevant to the specific HealthcareService. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.)
1030     */
1031    public List<ExtendedContactDetail> getContact() { 
1032      if (this.contact == null)
1033        this.contact = new ArrayList<ExtendedContactDetail>();
1034      return this.contact;
1035    }
1036
1037    /**
1038     * @return Returns a reference to <code>this</code> for easy method chaining
1039     */
1040    public HealthcareService setContact(List<ExtendedContactDetail> theContact) { 
1041      this.contact = theContact;
1042      return this;
1043    }
1044
1045    public boolean hasContact() { 
1046      if (this.contact == null)
1047        return false;
1048      for (ExtendedContactDetail item : this.contact)
1049        if (!item.isEmpty())
1050          return true;
1051      return false;
1052    }
1053
1054    public ExtendedContactDetail addContact() { //3
1055      ExtendedContactDetail t = new ExtendedContactDetail();
1056      if (this.contact == null)
1057        this.contact = new ArrayList<ExtendedContactDetail>();
1058      this.contact.add(t);
1059      return t;
1060    }
1061
1062    public HealthcareService addContact(ExtendedContactDetail t) { //3
1063      if (t == null)
1064        return this;
1065      if (this.contact == null)
1066        this.contact = new ArrayList<ExtendedContactDetail>();
1067      this.contact.add(t);
1068      return this;
1069    }
1070
1071    /**
1072     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
1073     */
1074    public ExtendedContactDetail getContactFirstRep() { 
1075      if (getContact().isEmpty()) {
1076        addContact();
1077      }
1078      return getContact().get(0);
1079    }
1080
1081    /**
1082     * @return {@link #coverageArea} (The location(s) that this service is available to (not where the service is provided).)
1083     */
1084    public List<Reference> getCoverageArea() { 
1085      if (this.coverageArea == null)
1086        this.coverageArea = new ArrayList<Reference>();
1087      return this.coverageArea;
1088    }
1089
1090    /**
1091     * @return Returns a reference to <code>this</code> for easy method chaining
1092     */
1093    public HealthcareService setCoverageArea(List<Reference> theCoverageArea) { 
1094      this.coverageArea = theCoverageArea;
1095      return this;
1096    }
1097
1098    public boolean hasCoverageArea() { 
1099      if (this.coverageArea == null)
1100        return false;
1101      for (Reference item : this.coverageArea)
1102        if (!item.isEmpty())
1103          return true;
1104      return false;
1105    }
1106
1107    public Reference addCoverageArea() { //3
1108      Reference t = new Reference();
1109      if (this.coverageArea == null)
1110        this.coverageArea = new ArrayList<Reference>();
1111      this.coverageArea.add(t);
1112      return t;
1113    }
1114
1115    public HealthcareService addCoverageArea(Reference t) { //3
1116      if (t == null)
1117        return this;
1118      if (this.coverageArea == null)
1119        this.coverageArea = new ArrayList<Reference>();
1120      this.coverageArea.add(t);
1121      return this;
1122    }
1123
1124    /**
1125     * @return The first repetition of repeating field {@link #coverageArea}, creating it if it does not already exist {3}
1126     */
1127    public Reference getCoverageAreaFirstRep() { 
1128      if (getCoverageArea().isEmpty()) {
1129        addCoverageArea();
1130      }
1131      return getCoverageArea().get(0);
1132    }
1133
1134    /**
1135     * @return {@link #serviceProvisionCode} (The code(s) that detail the conditions under which the healthcare service is available/offered.)
1136     */
1137    public List<CodeableConcept> getServiceProvisionCode() { 
1138      if (this.serviceProvisionCode == null)
1139        this.serviceProvisionCode = new ArrayList<CodeableConcept>();
1140      return this.serviceProvisionCode;
1141    }
1142
1143    /**
1144     * @return Returns a reference to <code>this</code> for easy method chaining
1145     */
1146    public HealthcareService setServiceProvisionCode(List<CodeableConcept> theServiceProvisionCode) { 
1147      this.serviceProvisionCode = theServiceProvisionCode;
1148      return this;
1149    }
1150
1151    public boolean hasServiceProvisionCode() { 
1152      if (this.serviceProvisionCode == null)
1153        return false;
1154      for (CodeableConcept item : this.serviceProvisionCode)
1155        if (!item.isEmpty())
1156          return true;
1157      return false;
1158    }
1159
1160    public CodeableConcept addServiceProvisionCode() { //3
1161      CodeableConcept t = new CodeableConcept();
1162      if (this.serviceProvisionCode == null)
1163        this.serviceProvisionCode = new ArrayList<CodeableConcept>();
1164      this.serviceProvisionCode.add(t);
1165      return t;
1166    }
1167
1168    public HealthcareService addServiceProvisionCode(CodeableConcept t) { //3
1169      if (t == null)
1170        return this;
1171      if (this.serviceProvisionCode == null)
1172        this.serviceProvisionCode = new ArrayList<CodeableConcept>();
1173      this.serviceProvisionCode.add(t);
1174      return this;
1175    }
1176
1177    /**
1178     * @return The first repetition of repeating field {@link #serviceProvisionCode}, creating it if it does not already exist {3}
1179     */
1180    public CodeableConcept getServiceProvisionCodeFirstRep() { 
1181      if (getServiceProvisionCode().isEmpty()) {
1182        addServiceProvisionCode();
1183      }
1184      return getServiceProvisionCode().get(0);
1185    }
1186
1187    /**
1188     * @return {@link #eligibility} (Does this service have specific eligibility requirements that need to be met in order to use the service?)
1189     */
1190    public List<HealthcareServiceEligibilityComponent> getEligibility() { 
1191      if (this.eligibility == null)
1192        this.eligibility = new ArrayList<HealthcareServiceEligibilityComponent>();
1193      return this.eligibility;
1194    }
1195
1196    /**
1197     * @return Returns a reference to <code>this</code> for easy method chaining
1198     */
1199    public HealthcareService setEligibility(List<HealthcareServiceEligibilityComponent> theEligibility) { 
1200      this.eligibility = theEligibility;
1201      return this;
1202    }
1203
1204    public boolean hasEligibility() { 
1205      if (this.eligibility == null)
1206        return false;
1207      for (HealthcareServiceEligibilityComponent item : this.eligibility)
1208        if (!item.isEmpty())
1209          return true;
1210      return false;
1211    }
1212
1213    public HealthcareServiceEligibilityComponent addEligibility() { //3
1214      HealthcareServiceEligibilityComponent t = new HealthcareServiceEligibilityComponent();
1215      if (this.eligibility == null)
1216        this.eligibility = new ArrayList<HealthcareServiceEligibilityComponent>();
1217      this.eligibility.add(t);
1218      return t;
1219    }
1220
1221    public HealthcareService addEligibility(HealthcareServiceEligibilityComponent t) { //3
1222      if (t == null)
1223        return this;
1224      if (this.eligibility == null)
1225        this.eligibility = new ArrayList<HealthcareServiceEligibilityComponent>();
1226      this.eligibility.add(t);
1227      return this;
1228    }
1229
1230    /**
1231     * @return The first repetition of repeating field {@link #eligibility}, creating it if it does not already exist {3}
1232     */
1233    public HealthcareServiceEligibilityComponent getEligibilityFirstRep() { 
1234      if (getEligibility().isEmpty()) {
1235        addEligibility();
1236      }
1237      return getEligibility().get(0);
1238    }
1239
1240    /**
1241     * @return {@link #program} (Programs that this service is applicable to.)
1242     */
1243    public List<CodeableConcept> getProgram() { 
1244      if (this.program == null)
1245        this.program = new ArrayList<CodeableConcept>();
1246      return this.program;
1247    }
1248
1249    /**
1250     * @return Returns a reference to <code>this</code> for easy method chaining
1251     */
1252    public HealthcareService setProgram(List<CodeableConcept> theProgram) { 
1253      this.program = theProgram;
1254      return this;
1255    }
1256
1257    public boolean hasProgram() { 
1258      if (this.program == null)
1259        return false;
1260      for (CodeableConcept item : this.program)
1261        if (!item.isEmpty())
1262          return true;
1263      return false;
1264    }
1265
1266    public CodeableConcept addProgram() { //3
1267      CodeableConcept t = new CodeableConcept();
1268      if (this.program == null)
1269        this.program = new ArrayList<CodeableConcept>();
1270      this.program.add(t);
1271      return t;
1272    }
1273
1274    public HealthcareService addProgram(CodeableConcept t) { //3
1275      if (t == null)
1276        return this;
1277      if (this.program == null)
1278        this.program = new ArrayList<CodeableConcept>();
1279      this.program.add(t);
1280      return this;
1281    }
1282
1283    /**
1284     * @return The first repetition of repeating field {@link #program}, creating it if it does not already exist {3}
1285     */
1286    public CodeableConcept getProgramFirstRep() { 
1287      if (getProgram().isEmpty()) {
1288        addProgram();
1289      }
1290      return getProgram().get(0);
1291    }
1292
1293    /**
1294     * @return {@link #characteristic} (Collection of characteristics (attributes).)
1295     */
1296    public List<CodeableConcept> getCharacteristic() { 
1297      if (this.characteristic == null)
1298        this.characteristic = new ArrayList<CodeableConcept>();
1299      return this.characteristic;
1300    }
1301
1302    /**
1303     * @return Returns a reference to <code>this</code> for easy method chaining
1304     */
1305    public HealthcareService setCharacteristic(List<CodeableConcept> theCharacteristic) { 
1306      this.characteristic = theCharacteristic;
1307      return this;
1308    }
1309
1310    public boolean hasCharacteristic() { 
1311      if (this.characteristic == null)
1312        return false;
1313      for (CodeableConcept item : this.characteristic)
1314        if (!item.isEmpty())
1315          return true;
1316      return false;
1317    }
1318
1319    public CodeableConcept addCharacteristic() { //3
1320      CodeableConcept t = new CodeableConcept();
1321      if (this.characteristic == null)
1322        this.characteristic = new ArrayList<CodeableConcept>();
1323      this.characteristic.add(t);
1324      return t;
1325    }
1326
1327    public HealthcareService addCharacteristic(CodeableConcept t) { //3
1328      if (t == null)
1329        return this;
1330      if (this.characteristic == null)
1331        this.characteristic = new ArrayList<CodeableConcept>();
1332      this.characteristic.add(t);
1333      return this;
1334    }
1335
1336    /**
1337     * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist {3}
1338     */
1339    public CodeableConcept getCharacteristicFirstRep() { 
1340      if (getCharacteristic().isEmpty()) {
1341        addCharacteristic();
1342      }
1343      return getCharacteristic().get(0);
1344    }
1345
1346    /**
1347     * @return {@link #communication} (Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.)
1348     */
1349    public List<CodeableConcept> getCommunication() { 
1350      if (this.communication == null)
1351        this.communication = new ArrayList<CodeableConcept>();
1352      return this.communication;
1353    }
1354
1355    /**
1356     * @return Returns a reference to <code>this</code> for easy method chaining
1357     */
1358    public HealthcareService setCommunication(List<CodeableConcept> theCommunication) { 
1359      this.communication = theCommunication;
1360      return this;
1361    }
1362
1363    public boolean hasCommunication() { 
1364      if (this.communication == null)
1365        return false;
1366      for (CodeableConcept item : this.communication)
1367        if (!item.isEmpty())
1368          return true;
1369      return false;
1370    }
1371
1372    public CodeableConcept addCommunication() { //3
1373      CodeableConcept t = new CodeableConcept();
1374      if (this.communication == null)
1375        this.communication = new ArrayList<CodeableConcept>();
1376      this.communication.add(t);
1377      return t;
1378    }
1379
1380    public HealthcareService addCommunication(CodeableConcept t) { //3
1381      if (t == null)
1382        return this;
1383      if (this.communication == null)
1384        this.communication = new ArrayList<CodeableConcept>();
1385      this.communication.add(t);
1386      return this;
1387    }
1388
1389    /**
1390     * @return The first repetition of repeating field {@link #communication}, creating it if it does not already exist {3}
1391     */
1392    public CodeableConcept getCommunicationFirstRep() { 
1393      if (getCommunication().isEmpty()) {
1394        addCommunication();
1395      }
1396      return getCommunication().get(0);
1397    }
1398
1399    /**
1400     * @return {@link #referralMethod} (Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.)
1401     */
1402    public List<CodeableConcept> getReferralMethod() { 
1403      if (this.referralMethod == null)
1404        this.referralMethod = new ArrayList<CodeableConcept>();
1405      return this.referralMethod;
1406    }
1407
1408    /**
1409     * @return Returns a reference to <code>this</code> for easy method chaining
1410     */
1411    public HealthcareService setReferralMethod(List<CodeableConcept> theReferralMethod) { 
1412      this.referralMethod = theReferralMethod;
1413      return this;
1414    }
1415
1416    public boolean hasReferralMethod() { 
1417      if (this.referralMethod == null)
1418        return false;
1419      for (CodeableConcept item : this.referralMethod)
1420        if (!item.isEmpty())
1421          return true;
1422      return false;
1423    }
1424
1425    public CodeableConcept addReferralMethod() { //3
1426      CodeableConcept t = new CodeableConcept();
1427      if (this.referralMethod == null)
1428        this.referralMethod = new ArrayList<CodeableConcept>();
1429      this.referralMethod.add(t);
1430      return t;
1431    }
1432
1433    public HealthcareService addReferralMethod(CodeableConcept t) { //3
1434      if (t == null)
1435        return this;
1436      if (this.referralMethod == null)
1437        this.referralMethod = new ArrayList<CodeableConcept>();
1438      this.referralMethod.add(t);
1439      return this;
1440    }
1441
1442    /**
1443     * @return The first repetition of repeating field {@link #referralMethod}, creating it if it does not already exist {3}
1444     */
1445    public CodeableConcept getReferralMethodFirstRep() { 
1446      if (getReferralMethod().isEmpty()) {
1447        addReferralMethod();
1448      }
1449      return getReferralMethod().get(0);
1450    }
1451
1452    /**
1453     * @return {@link #appointmentRequired} (Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.). This is the underlying object with id, value and extensions. The accessor "getAppointmentRequired" gives direct access to the value
1454     */
1455    public BooleanType getAppointmentRequiredElement() { 
1456      if (this.appointmentRequired == null)
1457        if (Configuration.errorOnAutoCreate())
1458          throw new Error("Attempt to auto-create HealthcareService.appointmentRequired");
1459        else if (Configuration.doAutoCreate())
1460          this.appointmentRequired = new BooleanType(); // bb
1461      return this.appointmentRequired;
1462    }
1463
1464    public boolean hasAppointmentRequiredElement() { 
1465      return this.appointmentRequired != null && !this.appointmentRequired.isEmpty();
1466    }
1467
1468    public boolean hasAppointmentRequired() { 
1469      return this.appointmentRequired != null && !this.appointmentRequired.isEmpty();
1470    }
1471
1472    /**
1473     * @param value {@link #appointmentRequired} (Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.). This is the underlying object with id, value and extensions. The accessor "getAppointmentRequired" gives direct access to the value
1474     */
1475    public HealthcareService setAppointmentRequiredElement(BooleanType value) { 
1476      this.appointmentRequired = value;
1477      return this;
1478    }
1479
1480    /**
1481     * @return Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.
1482     */
1483    public boolean getAppointmentRequired() { 
1484      return this.appointmentRequired == null || this.appointmentRequired.isEmpty() ? false : this.appointmentRequired.getValue();
1485    }
1486
1487    /**
1488     * @param value Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.
1489     */
1490    public HealthcareService setAppointmentRequired(boolean value) { 
1491        if (this.appointmentRequired == null)
1492          this.appointmentRequired = new BooleanType();
1493        this.appointmentRequired.setValue(value);
1494      return this;
1495    }
1496
1497    /**
1498     * @return {@link #availability} (A collection of times that the healthcare service is available.)
1499     */
1500    public List<Availability> getAvailability() { 
1501      if (this.availability == null)
1502        this.availability = new ArrayList<Availability>();
1503      return this.availability;
1504    }
1505
1506    /**
1507     * @return Returns a reference to <code>this</code> for easy method chaining
1508     */
1509    public HealthcareService setAvailability(List<Availability> theAvailability) { 
1510      this.availability = theAvailability;
1511      return this;
1512    }
1513
1514    public boolean hasAvailability() { 
1515      if (this.availability == null)
1516        return false;
1517      for (Availability item : this.availability)
1518        if (!item.isEmpty())
1519          return true;
1520      return false;
1521    }
1522
1523    public Availability addAvailability() { //3
1524      Availability t = new Availability();
1525      if (this.availability == null)
1526        this.availability = new ArrayList<Availability>();
1527      this.availability.add(t);
1528      return t;
1529    }
1530
1531    public HealthcareService addAvailability(Availability t) { //3
1532      if (t == null)
1533        return this;
1534      if (this.availability == null)
1535        this.availability = new ArrayList<Availability>();
1536      this.availability.add(t);
1537      return this;
1538    }
1539
1540    /**
1541     * @return The first repetition of repeating field {@link #availability}, creating it if it does not already exist {3}
1542     */
1543    public Availability getAvailabilityFirstRep() { 
1544      if (getAvailability().isEmpty()) {
1545        addAvailability();
1546      }
1547      return getAvailability().get(0);
1548    }
1549
1550    /**
1551     * @return {@link #endpoint} (Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.)
1552     */
1553    public List<Reference> getEndpoint() { 
1554      if (this.endpoint == null)
1555        this.endpoint = new ArrayList<Reference>();
1556      return this.endpoint;
1557    }
1558
1559    /**
1560     * @return Returns a reference to <code>this</code> for easy method chaining
1561     */
1562    public HealthcareService setEndpoint(List<Reference> theEndpoint) { 
1563      this.endpoint = theEndpoint;
1564      return this;
1565    }
1566
1567    public boolean hasEndpoint() { 
1568      if (this.endpoint == null)
1569        return false;
1570      for (Reference item : this.endpoint)
1571        if (!item.isEmpty())
1572          return true;
1573      return false;
1574    }
1575
1576    public Reference addEndpoint() { //3
1577      Reference t = new Reference();
1578      if (this.endpoint == null)
1579        this.endpoint = new ArrayList<Reference>();
1580      this.endpoint.add(t);
1581      return t;
1582    }
1583
1584    public HealthcareService addEndpoint(Reference t) { //3
1585      if (t == null)
1586        return this;
1587      if (this.endpoint == null)
1588        this.endpoint = new ArrayList<Reference>();
1589      this.endpoint.add(t);
1590      return this;
1591    }
1592
1593    /**
1594     * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist {3}
1595     */
1596    public Reference getEndpointFirstRep() { 
1597      if (getEndpoint().isEmpty()) {
1598        addEndpoint();
1599      }
1600      return getEndpoint().get(0);
1601    }
1602
1603      protected void listChildren(List<Property> children) {
1604        super.listChildren(children);
1605        children.add(new Property("identifier", "Identifier", "External identifiers for this item.", 0, java.lang.Integer.MAX_VALUE, identifier));
1606        children.add(new Property("active", "boolean", "This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.", 0, 1, active));
1607        children.add(new Property("providedBy", "Reference(Organization)", "The organization that provides this healthcare service.", 0, 1, providedBy));
1608        children.add(new Property("offeredIn", "Reference(HealthcareService)", "When the HealthcareService is representing a specific, schedulable service, the availableIn property can refer to a generic service.", 0, java.lang.Integer.MAX_VALUE, offeredIn));
1609        children.add(new Property("category", "CodeableConcept", "Identifies the broad category of service being performed or delivered.", 0, java.lang.Integer.MAX_VALUE, category));
1610        children.add(new Property("type", "CodeableConcept", "The specific type of service that may be delivered or performed.", 0, java.lang.Integer.MAX_VALUE, type));
1611        children.add(new Property("specialty", "CodeableConcept", "Collection of specialties handled by the Healthcare service. This is more of a medical term.", 0, java.lang.Integer.MAX_VALUE, specialty));
1612        children.add(new Property("location", "Reference(Location)", "The location(s) where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location));
1613        children.add(new Property("name", "string", "Further description of the service as it would be presented to a consumer while searching.", 0, 1, name));
1614        children.add(new Property("comment", "markdown", "Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.", 0, 1, comment));
1615        children.add(new Property("extraDetails", "markdown", "Extra details about the service that can't be placed in the other fields.", 0, 1, extraDetails));
1616        children.add(new Property("photo", "Attachment", "If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.", 0, 1, photo));
1617        children.add(new Property("contact", "ExtendedContactDetail", "The contact details of communication devices available relevant to the specific HealthcareService. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, contact));
1618        children.add(new Property("coverageArea", "Reference(Location)", "The location(s) that this service is available to (not where the service is provided).", 0, java.lang.Integer.MAX_VALUE, coverageArea));
1619        children.add(new Property("serviceProvisionCode", "CodeableConcept", "The code(s) that detail the conditions under which the healthcare service is available/offered.", 0, java.lang.Integer.MAX_VALUE, serviceProvisionCode));
1620        children.add(new Property("eligibility", "", "Does this service have specific eligibility requirements that need to be met in order to use the service?", 0, java.lang.Integer.MAX_VALUE, eligibility));
1621        children.add(new Property("program", "CodeableConcept", "Programs that this service is applicable to.", 0, java.lang.Integer.MAX_VALUE, program));
1622        children.add(new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic));
1623        children.add(new Property("communication", "CodeableConcept", "Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.", 0, java.lang.Integer.MAX_VALUE, communication));
1624        children.add(new Property("referralMethod", "CodeableConcept", "Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.", 0, java.lang.Integer.MAX_VALUE, referralMethod));
1625        children.add(new Property("appointmentRequired", "boolean", "Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.", 0, 1, appointmentRequired));
1626        children.add(new Property("availability", "Availability", "A collection of times that the healthcare service is available.", 0, java.lang.Integer.MAX_VALUE, availability));
1627        children.add(new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.", 0, java.lang.Integer.MAX_VALUE, endpoint));
1628      }
1629
1630      @Override
1631      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1632        switch (_hash) {
1633        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "External identifiers for this item.", 0, java.lang.Integer.MAX_VALUE, identifier);
1634        case -1422950650: /*active*/  return new Property("active", "boolean", "This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.", 0, 1, active);
1635        case 205136282: /*providedBy*/  return new Property("providedBy", "Reference(Organization)", "The organization that provides this healthcare service.", 0, 1, providedBy);
1636        case 1945040512: /*offeredIn*/  return new Property("offeredIn", "Reference(HealthcareService)", "When the HealthcareService is representing a specific, schedulable service, the availableIn property can refer to a generic service.", 0, java.lang.Integer.MAX_VALUE, offeredIn);
1637        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Identifies the broad category of service being performed or delivered.", 0, java.lang.Integer.MAX_VALUE, category);
1638        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The specific type of service that may be delivered or performed.", 0, java.lang.Integer.MAX_VALUE, type);
1639        case -1694759682: /*specialty*/  return new Property("specialty", "CodeableConcept", "Collection of specialties handled by the Healthcare service. This is more of a medical term.", 0, java.lang.Integer.MAX_VALUE, specialty);
1640        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "The location(s) where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location);
1641        case 3373707: /*name*/  return new Property("name", "string", "Further description of the service as it would be presented to a consumer while searching.", 0, 1, name);
1642        case 950398559: /*comment*/  return new Property("comment", "markdown", "Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.", 0, 1, comment);
1643        case -1469168622: /*extraDetails*/  return new Property("extraDetails", "markdown", "Extra details about the service that can't be placed in the other fields.", 0, 1, extraDetails);
1644        case 106642994: /*photo*/  return new Property("photo", "Attachment", "If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.", 0, 1, photo);
1645        case 951526432: /*contact*/  return new Property("contact", "ExtendedContactDetail", "The contact details of communication devices available relevant to the specific HealthcareService. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, contact);
1646        case -1532328299: /*coverageArea*/  return new Property("coverageArea", "Reference(Location)", "The location(s) that this service is available to (not where the service is provided).", 0, java.lang.Integer.MAX_VALUE, coverageArea);
1647        case 1504575405: /*serviceProvisionCode*/  return new Property("serviceProvisionCode", "CodeableConcept", "The code(s) that detail the conditions under which the healthcare service is available/offered.", 0, java.lang.Integer.MAX_VALUE, serviceProvisionCode);
1648        case -930847859: /*eligibility*/  return new Property("eligibility", "", "Does this service have specific eligibility requirements that need to be met in order to use the service?", 0, java.lang.Integer.MAX_VALUE, eligibility);
1649        case -309387644: /*program*/  return new Property("program", "CodeableConcept", "Programs that this service is applicable to.", 0, java.lang.Integer.MAX_VALUE, program);
1650        case 366313883: /*characteristic*/  return new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic);
1651        case -1035284522: /*communication*/  return new Property("communication", "CodeableConcept", "Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.", 0, java.lang.Integer.MAX_VALUE, communication);
1652        case -2092740898: /*referralMethod*/  return new Property("referralMethod", "CodeableConcept", "Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.", 0, java.lang.Integer.MAX_VALUE, referralMethod);
1653        case 427220062: /*appointmentRequired*/  return new Property("appointmentRequired", "boolean", "Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.", 0, 1, appointmentRequired);
1654        case 1997542747: /*availability*/  return new Property("availability", "Availability", "A collection of times that the healthcare service is available.", 0, java.lang.Integer.MAX_VALUE, availability);
1655        case 1741102485: /*endpoint*/  return new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.", 0, java.lang.Integer.MAX_VALUE, endpoint);
1656        default: return super.getNamedProperty(_hash, _name, _checkValid);
1657        }
1658
1659      }
1660
1661      @Override
1662      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1663        switch (hash) {
1664        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1665        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
1666        case 205136282: /*providedBy*/ return this.providedBy == null ? new Base[0] : new Base[] {this.providedBy}; // Reference
1667        case 1945040512: /*offeredIn*/ return this.offeredIn == null ? new Base[0] : this.offeredIn.toArray(new Base[this.offeredIn.size()]); // Reference
1668        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1669        case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
1670        case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept
1671        case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // Reference
1672        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1673        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // MarkdownType
1674        case -1469168622: /*extraDetails*/ return this.extraDetails == null ? new Base[0] : new Base[] {this.extraDetails}; // MarkdownType
1675        case 106642994: /*photo*/ return this.photo == null ? new Base[0] : new Base[] {this.photo}; // Attachment
1676        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ExtendedContactDetail
1677        case -1532328299: /*coverageArea*/ return this.coverageArea == null ? new Base[0] : this.coverageArea.toArray(new Base[this.coverageArea.size()]); // Reference
1678        case 1504575405: /*serviceProvisionCode*/ return this.serviceProvisionCode == null ? new Base[0] : this.serviceProvisionCode.toArray(new Base[this.serviceProvisionCode.size()]); // CodeableConcept
1679        case -930847859: /*eligibility*/ return this.eligibility == null ? new Base[0] : this.eligibility.toArray(new Base[this.eligibility.size()]); // HealthcareServiceEligibilityComponent
1680        case -309387644: /*program*/ return this.program == null ? new Base[0] : this.program.toArray(new Base[this.program.size()]); // CodeableConcept
1681        case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // CodeableConcept
1682        case -1035284522: /*communication*/ return this.communication == null ? new Base[0] : this.communication.toArray(new Base[this.communication.size()]); // CodeableConcept
1683        case -2092740898: /*referralMethod*/ return this.referralMethod == null ? new Base[0] : this.referralMethod.toArray(new Base[this.referralMethod.size()]); // CodeableConcept
1684        case 427220062: /*appointmentRequired*/ return this.appointmentRequired == null ? new Base[0] : new Base[] {this.appointmentRequired}; // BooleanType
1685        case 1997542747: /*availability*/ return this.availability == null ? new Base[0] : this.availability.toArray(new Base[this.availability.size()]); // Availability
1686        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference
1687        default: return super.getProperty(hash, name, checkValid);
1688        }
1689
1690      }
1691
1692      @Override
1693      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1694        switch (hash) {
1695        case -1618432855: // identifier
1696          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1697          return value;
1698        case -1422950650: // active
1699          this.active = TypeConvertor.castToBoolean(value); // BooleanType
1700          return value;
1701        case 205136282: // providedBy
1702          this.providedBy = TypeConvertor.castToReference(value); // Reference
1703          return value;
1704        case 1945040512: // offeredIn
1705          this.getOfferedIn().add(TypeConvertor.castToReference(value)); // Reference
1706          return value;
1707        case 50511102: // category
1708          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1709          return value;
1710        case 3575610: // type
1711          this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1712          return value;
1713        case -1694759682: // specialty
1714          this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1715          return value;
1716        case 1901043637: // location
1717          this.getLocation().add(TypeConvertor.castToReference(value)); // Reference
1718          return value;
1719        case 3373707: // name
1720          this.name = TypeConvertor.castToString(value); // StringType
1721          return value;
1722        case 950398559: // comment
1723          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
1724          return value;
1725        case -1469168622: // extraDetails
1726          this.extraDetails = TypeConvertor.castToMarkdown(value); // MarkdownType
1727          return value;
1728        case 106642994: // photo
1729          this.photo = TypeConvertor.castToAttachment(value); // Attachment
1730          return value;
1731        case 951526432: // contact
1732          this.getContact().add(TypeConvertor.castToExtendedContactDetail(value)); // ExtendedContactDetail
1733          return value;
1734        case -1532328299: // coverageArea
1735          this.getCoverageArea().add(TypeConvertor.castToReference(value)); // Reference
1736          return value;
1737        case 1504575405: // serviceProvisionCode
1738          this.getServiceProvisionCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1739          return value;
1740        case -930847859: // eligibility
1741          this.getEligibility().add((HealthcareServiceEligibilityComponent) value); // HealthcareServiceEligibilityComponent
1742          return value;
1743        case -309387644: // program
1744          this.getProgram().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1745          return value;
1746        case 366313883: // characteristic
1747          this.getCharacteristic().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1748          return value;
1749        case -1035284522: // communication
1750          this.getCommunication().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1751          return value;
1752        case -2092740898: // referralMethod
1753          this.getReferralMethod().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1754          return value;
1755        case 427220062: // appointmentRequired
1756          this.appointmentRequired = TypeConvertor.castToBoolean(value); // BooleanType
1757          return value;
1758        case 1997542747: // availability
1759          this.getAvailability().add(TypeConvertor.castToAvailability(value)); // Availability
1760          return value;
1761        case 1741102485: // endpoint
1762          this.getEndpoint().add(TypeConvertor.castToReference(value)); // Reference
1763          return value;
1764        default: return super.setProperty(hash, name, value);
1765        }
1766
1767      }
1768
1769      @Override
1770      public Base setProperty(String name, Base value) throws FHIRException {
1771        if (name.equals("identifier")) {
1772          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1773        } else if (name.equals("active")) {
1774          this.active = TypeConvertor.castToBoolean(value); // BooleanType
1775        } else if (name.equals("providedBy")) {
1776          this.providedBy = TypeConvertor.castToReference(value); // Reference
1777        } else if (name.equals("offeredIn")) {
1778          this.getOfferedIn().add(TypeConvertor.castToReference(value));
1779        } else if (name.equals("category")) {
1780          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
1781        } else if (name.equals("type")) {
1782          this.getType().add(TypeConvertor.castToCodeableConcept(value));
1783        } else if (name.equals("specialty")) {
1784          this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value));
1785        } else if (name.equals("location")) {
1786          this.getLocation().add(TypeConvertor.castToReference(value));
1787        } else if (name.equals("name")) {
1788          this.name = TypeConvertor.castToString(value); // StringType
1789        } else if (name.equals("comment")) {
1790          this.comment = TypeConvertor.castToMarkdown(value); // MarkdownType
1791        } else if (name.equals("extraDetails")) {
1792          this.extraDetails = TypeConvertor.castToMarkdown(value); // MarkdownType
1793        } else if (name.equals("photo")) {
1794          this.photo = TypeConvertor.castToAttachment(value); // Attachment
1795        } else if (name.equals("contact")) {
1796          this.getContact().add(TypeConvertor.castToExtendedContactDetail(value));
1797        } else if (name.equals("coverageArea")) {
1798          this.getCoverageArea().add(TypeConvertor.castToReference(value));
1799        } else if (name.equals("serviceProvisionCode")) {
1800          this.getServiceProvisionCode().add(TypeConvertor.castToCodeableConcept(value));
1801        } else if (name.equals("eligibility")) {
1802          this.getEligibility().add((HealthcareServiceEligibilityComponent) value);
1803        } else if (name.equals("program")) {
1804          this.getProgram().add(TypeConvertor.castToCodeableConcept(value));
1805        } else if (name.equals("characteristic")) {
1806          this.getCharacteristic().add(TypeConvertor.castToCodeableConcept(value));
1807        } else if (name.equals("communication")) {
1808          this.getCommunication().add(TypeConvertor.castToCodeableConcept(value));
1809        } else if (name.equals("referralMethod")) {
1810          this.getReferralMethod().add(TypeConvertor.castToCodeableConcept(value));
1811        } else if (name.equals("appointmentRequired")) {
1812          this.appointmentRequired = TypeConvertor.castToBoolean(value); // BooleanType
1813        } else if (name.equals("availability")) {
1814          this.getAvailability().add(TypeConvertor.castToAvailability(value));
1815        } else if (name.equals("endpoint")) {
1816          this.getEndpoint().add(TypeConvertor.castToReference(value));
1817        } else
1818          return super.setProperty(name, value);
1819        return value;
1820      }
1821
1822  @Override
1823  public void removeChild(String name, Base value) throws FHIRException {
1824        if (name.equals("identifier")) {
1825          this.getIdentifier().remove(value);
1826        } else if (name.equals("active")) {
1827          this.active = null;
1828        } else if (name.equals("providedBy")) {
1829          this.providedBy = null;
1830        } else if (name.equals("offeredIn")) {
1831          this.getOfferedIn().remove(value);
1832        } else if (name.equals("category")) {
1833          this.getCategory().remove(value);
1834        } else if (name.equals("type")) {
1835          this.getType().remove(value);
1836        } else if (name.equals("specialty")) {
1837          this.getSpecialty().remove(value);
1838        } else if (name.equals("location")) {
1839          this.getLocation().remove(value);
1840        } else if (name.equals("name")) {
1841          this.name = null;
1842        } else if (name.equals("comment")) {
1843          this.comment = null;
1844        } else if (name.equals("extraDetails")) {
1845          this.extraDetails = null;
1846        } else if (name.equals("photo")) {
1847          this.photo = null;
1848        } else if (name.equals("contact")) {
1849          this.getContact().remove(value);
1850        } else if (name.equals("coverageArea")) {
1851          this.getCoverageArea().remove(value);
1852        } else if (name.equals("serviceProvisionCode")) {
1853          this.getServiceProvisionCode().remove(value);
1854        } else if (name.equals("eligibility")) {
1855          this.getEligibility().remove((HealthcareServiceEligibilityComponent) value);
1856        } else if (name.equals("program")) {
1857          this.getProgram().remove(value);
1858        } else if (name.equals("characteristic")) {
1859          this.getCharacteristic().remove(value);
1860        } else if (name.equals("communication")) {
1861          this.getCommunication().remove(value);
1862        } else if (name.equals("referralMethod")) {
1863          this.getReferralMethod().remove(value);
1864        } else if (name.equals("appointmentRequired")) {
1865          this.appointmentRequired = null;
1866        } else if (name.equals("availability")) {
1867          this.getAvailability().remove(value);
1868        } else if (name.equals("endpoint")) {
1869          this.getEndpoint().remove(value);
1870        } else
1871          super.removeChild(name, value);
1872        
1873      }
1874
1875      @Override
1876      public Base makeProperty(int hash, String name) throws FHIRException {
1877        switch (hash) {
1878        case -1618432855:  return addIdentifier(); 
1879        case -1422950650:  return getActiveElement();
1880        case 205136282:  return getProvidedBy();
1881        case 1945040512:  return addOfferedIn(); 
1882        case 50511102:  return addCategory(); 
1883        case 3575610:  return addType(); 
1884        case -1694759682:  return addSpecialty(); 
1885        case 1901043637:  return addLocation(); 
1886        case 3373707:  return getNameElement();
1887        case 950398559:  return getCommentElement();
1888        case -1469168622:  return getExtraDetailsElement();
1889        case 106642994:  return getPhoto();
1890        case 951526432:  return addContact(); 
1891        case -1532328299:  return addCoverageArea(); 
1892        case 1504575405:  return addServiceProvisionCode(); 
1893        case -930847859:  return addEligibility(); 
1894        case -309387644:  return addProgram(); 
1895        case 366313883:  return addCharacteristic(); 
1896        case -1035284522:  return addCommunication(); 
1897        case -2092740898:  return addReferralMethod(); 
1898        case 427220062:  return getAppointmentRequiredElement();
1899        case 1997542747:  return addAvailability(); 
1900        case 1741102485:  return addEndpoint(); 
1901        default: return super.makeProperty(hash, name);
1902        }
1903
1904      }
1905
1906      @Override
1907      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1908        switch (hash) {
1909        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1910        case -1422950650: /*active*/ return new String[] {"boolean"};
1911        case 205136282: /*providedBy*/ return new String[] {"Reference"};
1912        case 1945040512: /*offeredIn*/ return new String[] {"Reference"};
1913        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1914        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1915        case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"};
1916        case 1901043637: /*location*/ return new String[] {"Reference"};
1917        case 3373707: /*name*/ return new String[] {"string"};
1918        case 950398559: /*comment*/ return new String[] {"markdown"};
1919        case -1469168622: /*extraDetails*/ return new String[] {"markdown"};
1920        case 106642994: /*photo*/ return new String[] {"Attachment"};
1921        case 951526432: /*contact*/ return new String[] {"ExtendedContactDetail"};
1922        case -1532328299: /*coverageArea*/ return new String[] {"Reference"};
1923        case 1504575405: /*serviceProvisionCode*/ return new String[] {"CodeableConcept"};
1924        case -930847859: /*eligibility*/ return new String[] {};
1925        case -309387644: /*program*/ return new String[] {"CodeableConcept"};
1926        case 366313883: /*characteristic*/ return new String[] {"CodeableConcept"};
1927        case -1035284522: /*communication*/ return new String[] {"CodeableConcept"};
1928        case -2092740898: /*referralMethod*/ return new String[] {"CodeableConcept"};
1929        case 427220062: /*appointmentRequired*/ return new String[] {"boolean"};
1930        case 1997542747: /*availability*/ return new String[] {"Availability"};
1931        case 1741102485: /*endpoint*/ return new String[] {"Reference"};
1932        default: return super.getTypesForProperty(hash, name);
1933        }
1934
1935      }
1936
1937      @Override
1938      public Base addChild(String name) throws FHIRException {
1939        if (name.equals("identifier")) {
1940          return addIdentifier();
1941        }
1942        else if (name.equals("active")) {
1943          throw new FHIRException("Cannot call addChild on a singleton property HealthcareService.active");
1944        }
1945        else if (name.equals("providedBy")) {
1946          this.providedBy = new Reference();
1947          return this.providedBy;
1948        }
1949        else if (name.equals("offeredIn")) {
1950          return addOfferedIn();
1951        }
1952        else if (name.equals("category")) {
1953          return addCategory();
1954        }
1955        else if (name.equals("type")) {
1956          return addType();
1957        }
1958        else if (name.equals("specialty")) {
1959          return addSpecialty();
1960        }
1961        else if (name.equals("location")) {
1962          return addLocation();
1963        }
1964        else if (name.equals("name")) {
1965          throw new FHIRException("Cannot call addChild on a singleton property HealthcareService.name");
1966        }
1967        else if (name.equals("comment")) {
1968          throw new FHIRException("Cannot call addChild on a singleton property HealthcareService.comment");
1969        }
1970        else if (name.equals("extraDetails")) {
1971          throw new FHIRException("Cannot call addChild on a singleton property HealthcareService.extraDetails");
1972        }
1973        else if (name.equals("photo")) {
1974          this.photo = new Attachment();
1975          return this.photo;
1976        }
1977        else if (name.equals("contact")) {
1978          return addContact();
1979        }
1980        else if (name.equals("coverageArea")) {
1981          return addCoverageArea();
1982        }
1983        else if (name.equals("serviceProvisionCode")) {
1984          return addServiceProvisionCode();
1985        }
1986        else if (name.equals("eligibility")) {
1987          return addEligibility();
1988        }
1989        else if (name.equals("program")) {
1990          return addProgram();
1991        }
1992        else if (name.equals("characteristic")) {
1993          return addCharacteristic();
1994        }
1995        else if (name.equals("communication")) {
1996          return addCommunication();
1997        }
1998        else if (name.equals("referralMethod")) {
1999          return addReferralMethod();
2000        }
2001        else if (name.equals("appointmentRequired")) {
2002          throw new FHIRException("Cannot call addChild on a singleton property HealthcareService.appointmentRequired");
2003        }
2004        else if (name.equals("availability")) {
2005          return addAvailability();
2006        }
2007        else if (name.equals("endpoint")) {
2008          return addEndpoint();
2009        }
2010        else
2011          return super.addChild(name);
2012      }
2013
2014  public String fhirType() {
2015    return "HealthcareService";
2016
2017  }
2018
2019      public HealthcareService copy() {
2020        HealthcareService dst = new HealthcareService();
2021        copyValues(dst);
2022        return dst;
2023      }
2024
2025      public void copyValues(HealthcareService dst) {
2026        super.copyValues(dst);
2027        if (identifier != null) {
2028          dst.identifier = new ArrayList<Identifier>();
2029          for (Identifier i : identifier)
2030            dst.identifier.add(i.copy());
2031        };
2032        dst.active = active == null ? null : active.copy();
2033        dst.providedBy = providedBy == null ? null : providedBy.copy();
2034        if (offeredIn != null) {
2035          dst.offeredIn = new ArrayList<Reference>();
2036          for (Reference i : offeredIn)
2037            dst.offeredIn.add(i.copy());
2038        };
2039        if (category != null) {
2040          dst.category = new ArrayList<CodeableConcept>();
2041          for (CodeableConcept i : category)
2042            dst.category.add(i.copy());
2043        };
2044        if (type != null) {
2045          dst.type = new ArrayList<CodeableConcept>();
2046          for (CodeableConcept i : type)
2047            dst.type.add(i.copy());
2048        };
2049        if (specialty != null) {
2050          dst.specialty = new ArrayList<CodeableConcept>();
2051          for (CodeableConcept i : specialty)
2052            dst.specialty.add(i.copy());
2053        };
2054        if (location != null) {
2055          dst.location = new ArrayList<Reference>();
2056          for (Reference i : location)
2057            dst.location.add(i.copy());
2058        };
2059        dst.name = name == null ? null : name.copy();
2060        dst.comment = comment == null ? null : comment.copy();
2061        dst.extraDetails = extraDetails == null ? null : extraDetails.copy();
2062        dst.photo = photo == null ? null : photo.copy();
2063        if (contact != null) {
2064          dst.contact = new ArrayList<ExtendedContactDetail>();
2065          for (ExtendedContactDetail i : contact)
2066            dst.contact.add(i.copy());
2067        };
2068        if (coverageArea != null) {
2069          dst.coverageArea = new ArrayList<Reference>();
2070          for (Reference i : coverageArea)
2071            dst.coverageArea.add(i.copy());
2072        };
2073        if (serviceProvisionCode != null) {
2074          dst.serviceProvisionCode = new ArrayList<CodeableConcept>();
2075          for (CodeableConcept i : serviceProvisionCode)
2076            dst.serviceProvisionCode.add(i.copy());
2077        };
2078        if (eligibility != null) {
2079          dst.eligibility = new ArrayList<HealthcareServiceEligibilityComponent>();
2080          for (HealthcareServiceEligibilityComponent i : eligibility)
2081            dst.eligibility.add(i.copy());
2082        };
2083        if (program != null) {
2084          dst.program = new ArrayList<CodeableConcept>();
2085          for (CodeableConcept i : program)
2086            dst.program.add(i.copy());
2087        };
2088        if (characteristic != null) {
2089          dst.characteristic = new ArrayList<CodeableConcept>();
2090          for (CodeableConcept i : characteristic)
2091            dst.characteristic.add(i.copy());
2092        };
2093        if (communication != null) {
2094          dst.communication = new ArrayList<CodeableConcept>();
2095          for (CodeableConcept i : communication)
2096            dst.communication.add(i.copy());
2097        };
2098        if (referralMethod != null) {
2099          dst.referralMethod = new ArrayList<CodeableConcept>();
2100          for (CodeableConcept i : referralMethod)
2101            dst.referralMethod.add(i.copy());
2102        };
2103        dst.appointmentRequired = appointmentRequired == null ? null : appointmentRequired.copy();
2104        if (availability != null) {
2105          dst.availability = new ArrayList<Availability>();
2106          for (Availability i : availability)
2107            dst.availability.add(i.copy());
2108        };
2109        if (endpoint != null) {
2110          dst.endpoint = new ArrayList<Reference>();
2111          for (Reference i : endpoint)
2112            dst.endpoint.add(i.copy());
2113        };
2114      }
2115
2116      protected HealthcareService typedCopy() {
2117        return copy();
2118      }
2119
2120      @Override
2121      public boolean equalsDeep(Base other_) {
2122        if (!super.equalsDeep(other_))
2123          return false;
2124        if (!(other_ instanceof HealthcareService))
2125          return false;
2126        HealthcareService o = (HealthcareService) other_;
2127        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(providedBy, o.providedBy, true)
2128           && compareDeep(offeredIn, o.offeredIn, true) && compareDeep(category, o.category, true) && compareDeep(type, o.type, true)
2129           && compareDeep(specialty, o.specialty, true) && compareDeep(location, o.location, true) && compareDeep(name, o.name, true)
2130           && compareDeep(comment, o.comment, true) && compareDeep(extraDetails, o.extraDetails, true) && compareDeep(photo, o.photo, true)
2131           && compareDeep(contact, o.contact, true) && compareDeep(coverageArea, o.coverageArea, true) && compareDeep(serviceProvisionCode, o.serviceProvisionCode, true)
2132           && compareDeep(eligibility, o.eligibility, true) && compareDeep(program, o.program, true) && compareDeep(characteristic, o.characteristic, true)
2133           && compareDeep(communication, o.communication, true) && compareDeep(referralMethod, o.referralMethod, true)
2134           && compareDeep(appointmentRequired, o.appointmentRequired, true) && compareDeep(availability, o.availability, true)
2135           && compareDeep(endpoint, o.endpoint, true);
2136      }
2137
2138      @Override
2139      public boolean equalsShallow(Base other_) {
2140        if (!super.equalsShallow(other_))
2141          return false;
2142        if (!(other_ instanceof HealthcareService))
2143          return false;
2144        HealthcareService o = (HealthcareService) other_;
2145        return compareValues(active, o.active, true) && compareValues(name, o.name, true) && compareValues(comment, o.comment, true)
2146           && compareValues(extraDetails, o.extraDetails, true) && compareValues(appointmentRequired, o.appointmentRequired, true)
2147          ;
2148      }
2149
2150      public boolean isEmpty() {
2151        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, providedBy
2152          , offeredIn, category, type, specialty, location, name, comment, extraDetails
2153          , photo, contact, coverageArea, serviceProvisionCode, eligibility, program, characteristic
2154          , communication, referralMethod, appointmentRequired, availability, endpoint);
2155      }
2156
2157  @Override
2158  public ResourceType getResourceType() {
2159    return ResourceType.HealthcareService;
2160   }
2161
2162 /**
2163   * Search parameter: <b>active</b>
2164   * <p>
2165   * Description: <b>The Healthcare Service is currently marked as active</b><br>
2166   * Type: <b>token</b><br>
2167   * Path: <b>HealthcareService.active</b><br>
2168   * </p>
2169   */
2170  @SearchParamDefinition(name="active", path="HealthcareService.active", description="The Healthcare Service is currently marked as active", type="token" )
2171  public static final String SP_ACTIVE = "active";
2172 /**
2173   * <b>Fluent Client</b> search parameter constant for <b>active</b>
2174   * <p>
2175   * Description: <b>The Healthcare Service is currently marked as active</b><br>
2176   * Type: <b>token</b><br>
2177   * Path: <b>HealthcareService.active</b><br>
2178   * </p>
2179   */
2180  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTIVE);
2181
2182 /**
2183   * Search parameter: <b>characteristic</b>
2184   * <p>
2185   * Description: <b>One of the HealthcareService's characteristics</b><br>
2186   * Type: <b>token</b><br>
2187   * Path: <b>HealthcareService.characteristic</b><br>
2188   * </p>
2189   */
2190  @SearchParamDefinition(name="characteristic", path="HealthcareService.characteristic", description="One of the HealthcareService's characteristics", type="token" )
2191  public static final String SP_CHARACTERISTIC = "characteristic";
2192 /**
2193   * <b>Fluent Client</b> search parameter constant for <b>characteristic</b>
2194   * <p>
2195   * Description: <b>One of the HealthcareService's characteristics</b><br>
2196   * Type: <b>token</b><br>
2197   * Path: <b>HealthcareService.characteristic</b><br>
2198   * </p>
2199   */
2200  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHARACTERISTIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHARACTERISTIC);
2201
2202 /**
2203   * Search parameter: <b>communication</b>
2204   * <p>
2205   * Description: <b>Languages that are available at this service</b><br>
2206   * Type: <b>token</b><br>
2207   * Path: <b>HealthcareService.communication</b><br>
2208   * </p>
2209   */
2210  @SearchParamDefinition(name="communication", path="HealthcareService.communication", description="Languages that are available at this service", type="token" )
2211  public static final String SP_COMMUNICATION = "communication";
2212 /**
2213   * <b>Fluent Client</b> search parameter constant for <b>communication</b>
2214   * <p>
2215   * Description: <b>Languages that are available at this service</b><br>
2216   * Type: <b>token</b><br>
2217   * Path: <b>HealthcareService.communication</b><br>
2218   * </p>
2219   */
2220  public static final ca.uhn.fhir.rest.gclient.TokenClientParam COMMUNICATION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COMMUNICATION);
2221
2222 /**
2223   * Search parameter: <b>coverage-area</b>
2224   * <p>
2225   * Description: <b>Location(s) service is intended for/available to</b><br>
2226   * Type: <b>reference</b><br>
2227   * Path: <b>HealthcareService.coverageArea</b><br>
2228   * </p>
2229   */
2230  @SearchParamDefinition(name="coverage-area", path="HealthcareService.coverageArea", description="Location(s) service is intended for/available to", type="reference", target={Location.class } )
2231  public static final String SP_COVERAGE_AREA = "coverage-area";
2232 /**
2233   * <b>Fluent Client</b> search parameter constant for <b>coverage-area</b>
2234   * <p>
2235   * Description: <b>Location(s) service is intended for/available to</b><br>
2236   * Type: <b>reference</b><br>
2237   * Path: <b>HealthcareService.coverageArea</b><br>
2238   * </p>
2239   */
2240  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COVERAGE_AREA = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COVERAGE_AREA);
2241
2242/**
2243   * Constant for fluent queries to be used to add include statements. Specifies
2244   * the path value of "<b>HealthcareService:coverage-area</b>".
2245   */
2246  public static final ca.uhn.fhir.model.api.Include INCLUDE_COVERAGE_AREA = new ca.uhn.fhir.model.api.Include("HealthcareService:coverage-area").toLocked();
2247
2248 /**
2249   * Search parameter: <b>eligibility</b>
2250   * <p>
2251   * Description: <b>One of the HealthcareService's eligibility requirements</b><br>
2252   * Type: <b>token</b><br>
2253   * Path: <b>HealthcareService.eligibility.code</b><br>
2254   * </p>
2255   */
2256  @SearchParamDefinition(name="eligibility", path="HealthcareService.eligibility.code", description="One of the HealthcareService's eligibility requirements", type="token" )
2257  public static final String SP_ELIGIBILITY = "eligibility";
2258 /**
2259   * <b>Fluent Client</b> search parameter constant for <b>eligibility</b>
2260   * <p>
2261   * Description: <b>One of the HealthcareService's eligibility requirements</b><br>
2262   * Type: <b>token</b><br>
2263   * Path: <b>HealthcareService.eligibility.code</b><br>
2264   * </p>
2265   */
2266  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ELIGIBILITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ELIGIBILITY);
2267
2268 /**
2269   * Search parameter: <b>endpoint</b>
2270   * <p>
2271   * Description: <b>Technical endpoints providing access to electronic services operated for the healthcare service</b><br>
2272   * Type: <b>reference</b><br>
2273   * Path: <b>HealthcareService.endpoint</b><br>
2274   * </p>
2275   */
2276  @SearchParamDefinition(name="endpoint", path="HealthcareService.endpoint", description="Technical endpoints providing access to electronic services operated for the healthcare service", type="reference", target={Endpoint.class } )
2277  public static final String SP_ENDPOINT = "endpoint";
2278 /**
2279   * <b>Fluent Client</b> search parameter constant for <b>endpoint</b>
2280   * <p>
2281   * Description: <b>Technical endpoints providing access to electronic services operated for the healthcare service</b><br>
2282   * Type: <b>reference</b><br>
2283   * Path: <b>HealthcareService.endpoint</b><br>
2284   * </p>
2285   */
2286  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT);
2287
2288/**
2289   * Constant for fluent queries to be used to add include statements. Specifies
2290   * the path value of "<b>HealthcareService:endpoint</b>".
2291   */
2292  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("HealthcareService:endpoint").toLocked();
2293
2294 /**
2295   * Search parameter: <b>identifier</b>
2296   * <p>
2297   * Description: <b>External identifiers for this item</b><br>
2298   * Type: <b>token</b><br>
2299   * Path: <b>HealthcareService.identifier</b><br>
2300   * </p>
2301   */
2302  @SearchParamDefinition(name="identifier", path="HealthcareService.identifier", description="External identifiers for this item", type="token" )
2303  public static final String SP_IDENTIFIER = "identifier";
2304 /**
2305   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2306   * <p>
2307   * Description: <b>External identifiers for this item</b><br>
2308   * Type: <b>token</b><br>
2309   * Path: <b>HealthcareService.identifier</b><br>
2310   * </p>
2311   */
2312  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2313
2314 /**
2315   * Search parameter: <b>location</b>
2316   * <p>
2317   * Description: <b>The location of the Healthcare Service</b><br>
2318   * Type: <b>reference</b><br>
2319   * Path: <b>HealthcareService.location</b><br>
2320   * </p>
2321   */
2322  @SearchParamDefinition(name="location", path="HealthcareService.location", description="The location of the Healthcare Service", type="reference", target={Location.class } )
2323  public static final String SP_LOCATION = "location";
2324 /**
2325   * <b>Fluent Client</b> search parameter constant for <b>location</b>
2326   * <p>
2327   * Description: <b>The location of the Healthcare Service</b><br>
2328   * Type: <b>reference</b><br>
2329   * Path: <b>HealthcareService.location</b><br>
2330   * </p>
2331   */
2332  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION);
2333
2334/**
2335   * Constant for fluent queries to be used to add include statements. Specifies
2336   * the path value of "<b>HealthcareService:location</b>".
2337   */
2338  public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("HealthcareService:location").toLocked();
2339
2340 /**
2341   * Search parameter: <b>name</b>
2342   * <p>
2343   * Description: <b>A portion of the Healthcare service name</b><br>
2344   * Type: <b>string</b><br>
2345   * Path: <b>HealthcareService.name</b><br>
2346   * </p>
2347   */
2348  @SearchParamDefinition(name="name", path="HealthcareService.name", description="A portion of the Healthcare service name", type="string" )
2349  public static final String SP_NAME = "name";
2350 /**
2351   * <b>Fluent Client</b> search parameter constant for <b>name</b>
2352   * <p>
2353   * Description: <b>A portion of the Healthcare service name</b><br>
2354   * Type: <b>string</b><br>
2355   * Path: <b>HealthcareService.name</b><br>
2356   * </p>
2357   */
2358  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
2359
2360 /**
2361   * Search parameter: <b>offered-in</b>
2362   * <p>
2363   * Description: <b>The service within which this service is offered</b><br>
2364   * Type: <b>reference</b><br>
2365   * Path: <b>HealthcareService.offeredIn</b><br>
2366   * </p>
2367   */
2368  @SearchParamDefinition(name="offered-in", path="HealthcareService.offeredIn", description="The service within which this service is offered", type="reference", target={HealthcareService.class } )
2369  public static final String SP_OFFERED_IN = "offered-in";
2370 /**
2371   * <b>Fluent Client</b> search parameter constant for <b>offered-in</b>
2372   * <p>
2373   * Description: <b>The service within which this service is offered</b><br>
2374   * Type: <b>reference</b><br>
2375   * Path: <b>HealthcareService.offeredIn</b><br>
2376   * </p>
2377   */
2378  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OFFERED_IN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OFFERED_IN);
2379
2380/**
2381   * Constant for fluent queries to be used to add include statements. Specifies
2382   * the path value of "<b>HealthcareService:offered-in</b>".
2383   */
2384  public static final ca.uhn.fhir.model.api.Include INCLUDE_OFFERED_IN = new ca.uhn.fhir.model.api.Include("HealthcareService:offered-in").toLocked();
2385
2386 /**
2387   * Search parameter: <b>organization</b>
2388   * <p>
2389   * Description: <b>The organization that provides this Healthcare Service</b><br>
2390   * Type: <b>reference</b><br>
2391   * Path: <b>HealthcareService.providedBy</b><br>
2392   * </p>
2393   */
2394  @SearchParamDefinition(name="organization", path="HealthcareService.providedBy", description="The organization that provides this Healthcare Service", type="reference", target={Organization.class } )
2395  public static final String SP_ORGANIZATION = "organization";
2396 /**
2397   * <b>Fluent Client</b> search parameter constant for <b>organization</b>
2398   * <p>
2399   * Description: <b>The organization that provides this Healthcare Service</b><br>
2400   * Type: <b>reference</b><br>
2401   * Path: <b>HealthcareService.providedBy</b><br>
2402   * </p>
2403   */
2404  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION);
2405
2406/**
2407   * Constant for fluent queries to be used to add include statements. Specifies
2408   * the path value of "<b>HealthcareService:organization</b>".
2409   */
2410  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("HealthcareService:organization").toLocked();
2411
2412 /**
2413   * Search parameter: <b>program</b>
2414   * <p>
2415   * Description: <b>One of the Programs supported by this HealthcareService</b><br>
2416   * Type: <b>token</b><br>
2417   * Path: <b>HealthcareService.program</b><br>
2418   * </p>
2419   */
2420  @SearchParamDefinition(name="program", path="HealthcareService.program", description="One of the Programs supported by this HealthcareService", type="token" )
2421  public static final String SP_PROGRAM = "program";
2422 /**
2423   * <b>Fluent Client</b> search parameter constant for <b>program</b>
2424   * <p>
2425   * Description: <b>One of the Programs supported by this HealthcareService</b><br>
2426   * Type: <b>token</b><br>
2427   * Path: <b>HealthcareService.program</b><br>
2428   * </p>
2429   */
2430  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROGRAM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROGRAM);
2431
2432 /**
2433   * Search parameter: <b>service-category</b>
2434   * <p>
2435   * Description: <b>Service Category of the Healthcare Service</b><br>
2436   * Type: <b>token</b><br>
2437   * Path: <b>HealthcareService.category</b><br>
2438   * </p>
2439   */
2440  @SearchParamDefinition(name="service-category", path="HealthcareService.category", description="Service Category of the Healthcare Service", type="token" )
2441  public static final String SP_SERVICE_CATEGORY = "service-category";
2442 /**
2443   * <b>Fluent Client</b> search parameter constant for <b>service-category</b>
2444   * <p>
2445   * Description: <b>Service Category of the Healthcare Service</b><br>
2446   * Type: <b>token</b><br>
2447   * Path: <b>HealthcareService.category</b><br>
2448   * </p>
2449   */
2450  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERVICE_CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERVICE_CATEGORY);
2451
2452 /**
2453   * Search parameter: <b>service-type</b>
2454   * <p>
2455   * Description: <b>The type of service provided by this healthcare service</b><br>
2456   * Type: <b>token</b><br>
2457   * Path: <b>HealthcareService.type</b><br>
2458   * </p>
2459   */
2460  @SearchParamDefinition(name="service-type", path="HealthcareService.type", description="The type of service provided by this healthcare service", type="token" )
2461  public static final String SP_SERVICE_TYPE = "service-type";
2462 /**
2463   * <b>Fluent Client</b> search parameter constant for <b>service-type</b>
2464   * <p>
2465   * Description: <b>The type of service provided by this healthcare service</b><br>
2466   * Type: <b>token</b><br>
2467   * Path: <b>HealthcareService.type</b><br>
2468   * </p>
2469   */
2470  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERVICE_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERVICE_TYPE);
2471
2472 /**
2473   * Search parameter: <b>specialty</b>
2474   * <p>
2475   * Description: <b>The specialty of the service provided by this healthcare service</b><br>
2476   * Type: <b>token</b><br>
2477   * Path: <b>HealthcareService.specialty</b><br>
2478   * </p>
2479   */
2480  @SearchParamDefinition(name="specialty", path="HealthcareService.specialty", description="The specialty of the service provided by this healthcare service", type="token" )
2481  public static final String SP_SPECIALTY = "specialty";
2482 /**
2483   * <b>Fluent Client</b> search parameter constant for <b>specialty</b>
2484   * <p>
2485   * Description: <b>The specialty of the service provided by this healthcare service</b><br>
2486   * Type: <b>token</b><br>
2487   * Path: <b>HealthcareService.specialty</b><br>
2488   * </p>
2489   */
2490  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIALTY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIALTY);
2491
2492
2493}
2494