001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import ca.uhn.fhir.model.api.annotation.ResourceDef;
038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
039import ca.uhn.fhir.model.api.annotation.Child;
040import ca.uhn.fhir.model.api.annotation.ChildOrder;
041import ca.uhn.fhir.model.api.annotation.Description;
042import ca.uhn.fhir.model.api.annotation.Block;
043import org.hl7.fhir.instance.model.api.*;
044import org.hl7.fhir.exceptions.FHIRException;
045/**
046 * The details of a healthcare service available at a location.
047 */
048@ResourceDef(name="HealthcareService", profile="http://hl7.org/fhir/Profile/HealthcareService")
049public class HealthcareService extends DomainResource {
050
051    public enum DaysOfWeek {
052        /**
053         * Monday
054         */
055        MON, 
056        /**
057         * Tuesday
058         */
059        TUE, 
060        /**
061         * Wednesday
062         */
063        WED, 
064        /**
065         * Thursday
066         */
067        THU, 
068        /**
069         * Friday
070         */
071        FRI, 
072        /**
073         * Saturday
074         */
075        SAT, 
076        /**
077         * Sunday
078         */
079        SUN, 
080        /**
081         * added to help the parsers with the generic types
082         */
083        NULL;
084        public static DaysOfWeek fromCode(String codeString) throws FHIRException {
085            if (codeString == null || "".equals(codeString))
086                return null;
087        if ("mon".equals(codeString))
088          return MON;
089        if ("tue".equals(codeString))
090          return TUE;
091        if ("wed".equals(codeString))
092          return WED;
093        if ("thu".equals(codeString))
094          return THU;
095        if ("fri".equals(codeString))
096          return FRI;
097        if ("sat".equals(codeString))
098          return SAT;
099        if ("sun".equals(codeString))
100          return SUN;
101        if (Configuration.isAcceptInvalidEnums())
102          return null;
103        else
104          throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
105        }
106        public String toCode() {
107          switch (this) {
108            case MON: return "mon";
109            case TUE: return "tue";
110            case WED: return "wed";
111            case THU: return "thu";
112            case FRI: return "fri";
113            case SAT: return "sat";
114            case SUN: return "sun";
115            default: return "?";
116          }
117        }
118        public String getSystem() {
119          switch (this) {
120            case MON: return "http://hl7.org/fhir/days-of-week";
121            case TUE: return "http://hl7.org/fhir/days-of-week";
122            case WED: return "http://hl7.org/fhir/days-of-week";
123            case THU: return "http://hl7.org/fhir/days-of-week";
124            case FRI: return "http://hl7.org/fhir/days-of-week";
125            case SAT: return "http://hl7.org/fhir/days-of-week";
126            case SUN: return "http://hl7.org/fhir/days-of-week";
127            default: return "?";
128          }
129        }
130        public String getDefinition() {
131          switch (this) {
132            case MON: return "Monday";
133            case TUE: return "Tuesday";
134            case WED: return "Wednesday";
135            case THU: return "Thursday";
136            case FRI: return "Friday";
137            case SAT: return "Saturday";
138            case SUN: return "Sunday";
139            default: return "?";
140          }
141        }
142        public String getDisplay() {
143          switch (this) {
144            case MON: return "Monday";
145            case TUE: return "Tuesday";
146            case WED: return "Wednesday";
147            case THU: return "Thursday";
148            case FRI: return "Friday";
149            case SAT: return "Saturday";
150            case SUN: return "Sunday";
151            default: return "?";
152          }
153        }
154    }
155
156  public static class DaysOfWeekEnumFactory implements EnumFactory<DaysOfWeek> {
157    public DaysOfWeek fromCode(String codeString) throws IllegalArgumentException {
158      if (codeString == null || "".equals(codeString))
159            if (codeString == null || "".equals(codeString))
160                return null;
161        if ("mon".equals(codeString))
162          return DaysOfWeek.MON;
163        if ("tue".equals(codeString))
164          return DaysOfWeek.TUE;
165        if ("wed".equals(codeString))
166          return DaysOfWeek.WED;
167        if ("thu".equals(codeString))
168          return DaysOfWeek.THU;
169        if ("fri".equals(codeString))
170          return DaysOfWeek.FRI;
171        if ("sat".equals(codeString))
172          return DaysOfWeek.SAT;
173        if ("sun".equals(codeString))
174          return DaysOfWeek.SUN;
175        throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'");
176        }
177        public Enumeration<DaysOfWeek> fromType(Base code) throws FHIRException {
178          if (code == null)
179            return null;
180          if (code.isEmpty())
181            return new Enumeration<DaysOfWeek>(this);
182          String codeString = ((PrimitiveType) code).asStringValue();
183          if (codeString == null || "".equals(codeString))
184            return null;
185        if ("mon".equals(codeString))
186          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.MON);
187        if ("tue".equals(codeString))
188          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.TUE);
189        if ("wed".equals(codeString))
190          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.WED);
191        if ("thu".equals(codeString))
192          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.THU);
193        if ("fri".equals(codeString))
194          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.FRI);
195        if ("sat".equals(codeString))
196          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SAT);
197        if ("sun".equals(codeString))
198          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SUN);
199        throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
200        }
201    public String toCode(DaysOfWeek code) {
202      if (code == DaysOfWeek.MON)
203        return "mon";
204      if (code == DaysOfWeek.TUE)
205        return "tue";
206      if (code == DaysOfWeek.WED)
207        return "wed";
208      if (code == DaysOfWeek.THU)
209        return "thu";
210      if (code == DaysOfWeek.FRI)
211        return "fri";
212      if (code == DaysOfWeek.SAT)
213        return "sat";
214      if (code == DaysOfWeek.SUN)
215        return "sun";
216      return "?";
217      }
218    public String toSystem(DaysOfWeek code) {
219      return code.getSystem();
220      }
221    }
222
223    @Block()
224    public static class HealthcareServiceAvailableTimeComponent extends BackboneElement implements IBaseBackboneElement {
225        /**
226         * Indicates which days of the week are available between the start and end Times.
227         */
228        @Child(name = "daysOfWeek", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
229        @Description(shortDefinition="mon | tue | wed | thu | fri | sat | sun", formalDefinition="Indicates which days of the week are available between the start and end Times." )
230        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/days-of-week")
231        protected List<Enumeration<DaysOfWeek>> daysOfWeek;
232
233        /**
234         * Is this always available? (hence times are irrelevant) e.g. 24 hour service.
235         */
236        @Child(name = "allDay", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
237        @Description(shortDefinition="Always available? e.g. 24 hour service", formalDefinition="Is this always available? (hence times are irrelevant) e.g. 24 hour service." )
238        protected BooleanType allDay;
239
240        /**
241         * The opening time of day. Note: If the AllDay flag is set, then this time is ignored.
242         */
243        @Child(name = "availableStartTime", type = {TimeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
244        @Description(shortDefinition="Opening time of day (ignored if allDay = true)", formalDefinition="The opening time of day. Note: If the AllDay flag is set, then this time is ignored." )
245        protected TimeType availableStartTime;
246
247        /**
248         * The closing time of day. Note: If the AllDay flag is set, then this time is ignored.
249         */
250        @Child(name = "availableEndTime", type = {TimeType.class}, order=4, min=0, max=1, modifier=false, summary=false)
251        @Description(shortDefinition="Closing time of day (ignored if allDay = true)", formalDefinition="The closing time of day. Note: If the AllDay flag is set, then this time is ignored." )
252        protected TimeType availableEndTime;
253
254        private static final long serialVersionUID = -2139510127L;
255
256    /**
257     * Constructor
258     */
259      public HealthcareServiceAvailableTimeComponent() {
260        super();
261      }
262
263        /**
264         * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.)
265         */
266        public List<Enumeration<DaysOfWeek>> getDaysOfWeek() { 
267          if (this.daysOfWeek == null)
268            this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>();
269          return this.daysOfWeek;
270        }
271
272        /**
273         * @return Returns a reference to <code>this</code> for easy method chaining
274         */
275        public HealthcareServiceAvailableTimeComponent setDaysOfWeek(List<Enumeration<DaysOfWeek>> theDaysOfWeek) { 
276          this.daysOfWeek = theDaysOfWeek;
277          return this;
278        }
279
280        public boolean hasDaysOfWeek() { 
281          if (this.daysOfWeek == null)
282            return false;
283          for (Enumeration<DaysOfWeek> item : this.daysOfWeek)
284            if (!item.isEmpty())
285              return true;
286          return false;
287        }
288
289        /**
290         * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.)
291         */
292        public Enumeration<DaysOfWeek> addDaysOfWeekElement() {//2 
293          Enumeration<DaysOfWeek> t = new Enumeration<DaysOfWeek>(new DaysOfWeekEnumFactory());
294          if (this.daysOfWeek == null)
295            this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>();
296          this.daysOfWeek.add(t);
297          return t;
298        }
299
300        /**
301         * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.)
302         */
303        public HealthcareServiceAvailableTimeComponent addDaysOfWeek(DaysOfWeek value) { //1
304          Enumeration<DaysOfWeek> t = new Enumeration<DaysOfWeek>(new DaysOfWeekEnumFactory());
305          t.setValue(value);
306          if (this.daysOfWeek == null)
307            this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>();
308          this.daysOfWeek.add(t);
309          return this;
310        }
311
312        /**
313         * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.)
314         */
315        public boolean hasDaysOfWeek(DaysOfWeek value) { 
316          if (this.daysOfWeek == null)
317            return false;
318          for (Enumeration<DaysOfWeek> v : this.daysOfWeek)
319            if (v.getValue().equals(value)) // code
320              return true;
321          return false;
322        }
323
324        /**
325         * @return {@link #allDay} (Is this always available? (hence times are irrelevant) e.g. 24 hour service.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value
326         */
327        public BooleanType getAllDayElement() { 
328          if (this.allDay == null)
329            if (Configuration.errorOnAutoCreate())
330              throw new Error("Attempt to auto-create HealthcareServiceAvailableTimeComponent.allDay");
331            else if (Configuration.doAutoCreate())
332              this.allDay = new BooleanType(); // bb
333          return this.allDay;
334        }
335
336        public boolean hasAllDayElement() { 
337          return this.allDay != null && !this.allDay.isEmpty();
338        }
339
340        public boolean hasAllDay() { 
341          return this.allDay != null && !this.allDay.isEmpty();
342        }
343
344        /**
345         * @param value {@link #allDay} (Is this always available? (hence times are irrelevant) e.g. 24 hour service.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value
346         */
347        public HealthcareServiceAvailableTimeComponent setAllDayElement(BooleanType value) { 
348          this.allDay = value;
349          return this;
350        }
351
352        /**
353         * @return Is this always available? (hence times are irrelevant) e.g. 24 hour service.
354         */
355        public boolean getAllDay() { 
356          return this.allDay == null || this.allDay.isEmpty() ? false : this.allDay.getValue();
357        }
358
359        /**
360         * @param value Is this always available? (hence times are irrelevant) e.g. 24 hour service.
361         */
362        public HealthcareServiceAvailableTimeComponent setAllDay(boolean value) { 
363            if (this.allDay == null)
364              this.allDay = new BooleanType();
365            this.allDay.setValue(value);
366          return this;
367        }
368
369        /**
370         * @return {@link #availableStartTime} (The opening time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableStartTime" gives direct access to the value
371         */
372        public TimeType getAvailableStartTimeElement() { 
373          if (this.availableStartTime == null)
374            if (Configuration.errorOnAutoCreate())
375              throw new Error("Attempt to auto-create HealthcareServiceAvailableTimeComponent.availableStartTime");
376            else if (Configuration.doAutoCreate())
377              this.availableStartTime = new TimeType(); // bb
378          return this.availableStartTime;
379        }
380
381        public boolean hasAvailableStartTimeElement() { 
382          return this.availableStartTime != null && !this.availableStartTime.isEmpty();
383        }
384
385        public boolean hasAvailableStartTime() { 
386          return this.availableStartTime != null && !this.availableStartTime.isEmpty();
387        }
388
389        /**
390         * @param value {@link #availableStartTime} (The opening time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableStartTime" gives direct access to the value
391         */
392        public HealthcareServiceAvailableTimeComponent setAvailableStartTimeElement(TimeType value) { 
393          this.availableStartTime = value;
394          return this;
395        }
396
397        /**
398         * @return The opening time of day. Note: If the AllDay flag is set, then this time is ignored.
399         */
400        public String getAvailableStartTime() { 
401          return this.availableStartTime == null ? null : this.availableStartTime.getValue();
402        }
403
404        /**
405         * @param value The opening time of day. Note: If the AllDay flag is set, then this time is ignored.
406         */
407        public HealthcareServiceAvailableTimeComponent setAvailableStartTime(String value) { 
408          if (value == null)
409            this.availableStartTime = null;
410          else {
411            if (this.availableStartTime == null)
412              this.availableStartTime = new TimeType();
413            this.availableStartTime.setValue(value);
414          }
415          return this;
416        }
417
418        /**
419         * @return {@link #availableEndTime} (The closing time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableEndTime" gives direct access to the value
420         */
421        public TimeType getAvailableEndTimeElement() { 
422          if (this.availableEndTime == null)
423            if (Configuration.errorOnAutoCreate())
424              throw new Error("Attempt to auto-create HealthcareServiceAvailableTimeComponent.availableEndTime");
425            else if (Configuration.doAutoCreate())
426              this.availableEndTime = new TimeType(); // bb
427          return this.availableEndTime;
428        }
429
430        public boolean hasAvailableEndTimeElement() { 
431          return this.availableEndTime != null && !this.availableEndTime.isEmpty();
432        }
433
434        public boolean hasAvailableEndTime() { 
435          return this.availableEndTime != null && !this.availableEndTime.isEmpty();
436        }
437
438        /**
439         * @param value {@link #availableEndTime} (The closing time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableEndTime" gives direct access to the value
440         */
441        public HealthcareServiceAvailableTimeComponent setAvailableEndTimeElement(TimeType value) { 
442          this.availableEndTime = value;
443          return this;
444        }
445
446        /**
447         * @return The closing time of day. Note: If the AllDay flag is set, then this time is ignored.
448         */
449        public String getAvailableEndTime() { 
450          return this.availableEndTime == null ? null : this.availableEndTime.getValue();
451        }
452
453        /**
454         * @param value The closing time of day. Note: If the AllDay flag is set, then this time is ignored.
455         */
456        public HealthcareServiceAvailableTimeComponent setAvailableEndTime(String value) { 
457          if (value == null)
458            this.availableEndTime = null;
459          else {
460            if (this.availableEndTime == null)
461              this.availableEndTime = new TimeType();
462            this.availableEndTime.setValue(value);
463          }
464          return this;
465        }
466
467        protected void listChildren(List<Property> children) {
468          super.listChildren(children);
469          children.add(new Property("daysOfWeek", "code", "Indicates which days of the week are available between the start and end Times.", 0, java.lang.Integer.MAX_VALUE, daysOfWeek));
470          children.add(new Property("allDay", "boolean", "Is this always available? (hence times are irrelevant) e.g. 24 hour service.", 0, 1, allDay));
471          children.add(new Property("availableStartTime", "time", "The opening time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, 1, availableStartTime));
472          children.add(new Property("availableEndTime", "time", "The closing time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, 1, availableEndTime));
473        }
474
475        @Override
476        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
477          switch (_hash) {
478          case 68050338: /*daysOfWeek*/  return new Property("daysOfWeek", "code", "Indicates which days of the week are available between the start and end Times.", 0, java.lang.Integer.MAX_VALUE, daysOfWeek);
479          case -1414913477: /*allDay*/  return new Property("allDay", "boolean", "Is this always available? (hence times are irrelevant) e.g. 24 hour service.", 0, 1, allDay);
480          case -1039453818: /*availableStartTime*/  return new Property("availableStartTime", "time", "The opening time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, 1, availableStartTime);
481          case 101151551: /*availableEndTime*/  return new Property("availableEndTime", "time", "The closing time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, 1, availableEndTime);
482          default: return super.getNamedProperty(_hash, _name, _checkValid);
483          }
484
485        }
486
487      @Override
488      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
489        switch (hash) {
490        case 68050338: /*daysOfWeek*/ return this.daysOfWeek == null ? new Base[0] : this.daysOfWeek.toArray(new Base[this.daysOfWeek.size()]); // Enumeration<DaysOfWeek>
491        case -1414913477: /*allDay*/ return this.allDay == null ? new Base[0] : new Base[] {this.allDay}; // BooleanType
492        case -1039453818: /*availableStartTime*/ return this.availableStartTime == null ? new Base[0] : new Base[] {this.availableStartTime}; // TimeType
493        case 101151551: /*availableEndTime*/ return this.availableEndTime == null ? new Base[0] : new Base[] {this.availableEndTime}; // TimeType
494        default: return super.getProperty(hash, name, checkValid);
495        }
496
497      }
498
499      @Override
500      public Base setProperty(int hash, String name, Base value) throws FHIRException {
501        switch (hash) {
502        case 68050338: // daysOfWeek
503          value = new DaysOfWeekEnumFactory().fromType(castToCode(value));
504          this.getDaysOfWeek().add((Enumeration) value); // Enumeration<DaysOfWeek>
505          return value;
506        case -1414913477: // allDay
507          this.allDay = castToBoolean(value); // BooleanType
508          return value;
509        case -1039453818: // availableStartTime
510          this.availableStartTime = castToTime(value); // TimeType
511          return value;
512        case 101151551: // availableEndTime
513          this.availableEndTime = castToTime(value); // TimeType
514          return value;
515        default: return super.setProperty(hash, name, value);
516        }
517
518      }
519
520      @Override
521      public Base setProperty(String name, Base value) throws FHIRException {
522        if (name.equals("daysOfWeek")) {
523          value = new DaysOfWeekEnumFactory().fromType(castToCode(value));
524          this.getDaysOfWeek().add((Enumeration) value);
525        } else if (name.equals("allDay")) {
526          this.allDay = castToBoolean(value); // BooleanType
527        } else if (name.equals("availableStartTime")) {
528          this.availableStartTime = castToTime(value); // TimeType
529        } else if (name.equals("availableEndTime")) {
530          this.availableEndTime = castToTime(value); // TimeType
531        } else
532          return super.setProperty(name, value);
533        return value;
534      }
535
536      @Override
537      public Base makeProperty(int hash, String name) throws FHIRException {
538        switch (hash) {
539        case 68050338:  return addDaysOfWeekElement();
540        case -1414913477:  return getAllDayElement();
541        case -1039453818:  return getAvailableStartTimeElement();
542        case 101151551:  return getAvailableEndTimeElement();
543        default: return super.makeProperty(hash, name);
544        }
545
546      }
547
548      @Override
549      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
550        switch (hash) {
551        case 68050338: /*daysOfWeek*/ return new String[] {"code"};
552        case -1414913477: /*allDay*/ return new String[] {"boolean"};
553        case -1039453818: /*availableStartTime*/ return new String[] {"time"};
554        case 101151551: /*availableEndTime*/ return new String[] {"time"};
555        default: return super.getTypesForProperty(hash, name);
556        }
557
558      }
559
560      @Override
561      public Base addChild(String name) throws FHIRException {
562        if (name.equals("daysOfWeek")) {
563          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.daysOfWeek");
564        }
565        else if (name.equals("allDay")) {
566          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.allDay");
567        }
568        else if (name.equals("availableStartTime")) {
569          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.availableStartTime");
570        }
571        else if (name.equals("availableEndTime")) {
572          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.availableEndTime");
573        }
574        else
575          return super.addChild(name);
576      }
577
578      public HealthcareServiceAvailableTimeComponent copy() {
579        HealthcareServiceAvailableTimeComponent dst = new HealthcareServiceAvailableTimeComponent();
580        copyValues(dst);
581        if (daysOfWeek != null) {
582          dst.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>();
583          for (Enumeration<DaysOfWeek> i : daysOfWeek)
584            dst.daysOfWeek.add(i.copy());
585        };
586        dst.allDay = allDay == null ? null : allDay.copy();
587        dst.availableStartTime = availableStartTime == null ? null : availableStartTime.copy();
588        dst.availableEndTime = availableEndTime == null ? null : availableEndTime.copy();
589        return dst;
590      }
591
592      @Override
593      public boolean equalsDeep(Base other_) {
594        if (!super.equalsDeep(other_))
595          return false;
596        if (!(other_ instanceof HealthcareServiceAvailableTimeComponent))
597          return false;
598        HealthcareServiceAvailableTimeComponent o = (HealthcareServiceAvailableTimeComponent) other_;
599        return compareDeep(daysOfWeek, o.daysOfWeek, true) && compareDeep(allDay, o.allDay, true) && compareDeep(availableStartTime, o.availableStartTime, true)
600           && compareDeep(availableEndTime, o.availableEndTime, true);
601      }
602
603      @Override
604      public boolean equalsShallow(Base other_) {
605        if (!super.equalsShallow(other_))
606          return false;
607        if (!(other_ instanceof HealthcareServiceAvailableTimeComponent))
608          return false;
609        HealthcareServiceAvailableTimeComponent o = (HealthcareServiceAvailableTimeComponent) other_;
610        return compareValues(daysOfWeek, o.daysOfWeek, true) && compareValues(allDay, o.allDay, true) && compareValues(availableStartTime, o.availableStartTime, true)
611           && compareValues(availableEndTime, o.availableEndTime, true);
612      }
613
614      public boolean isEmpty() {
615        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(daysOfWeek, allDay, availableStartTime
616          , availableEndTime);
617      }
618
619  public String fhirType() {
620    return "HealthcareService.availableTime";
621
622  }
623
624  }
625
626    @Block()
627    public static class HealthcareServiceNotAvailableComponent extends BackboneElement implements IBaseBackboneElement {
628        /**
629         * The reason that can be presented to the user as to why this time is not available.
630         */
631        @Child(name = "description", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
632        @Description(shortDefinition="Reason presented to the user explaining why time not available", formalDefinition="The reason that can be presented to the user as to why this time is not available." )
633        protected StringType description;
634
635        /**
636         * Service is not available (seasonally or for a public holiday) from this date.
637         */
638        @Child(name = "during", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false)
639        @Description(shortDefinition="Service not available from this date", formalDefinition="Service is not available (seasonally or for a public holiday) from this date." )
640        protected Period during;
641
642        private static final long serialVersionUID = 310849929L;
643
644    /**
645     * Constructor
646     */
647      public HealthcareServiceNotAvailableComponent() {
648        super();
649      }
650
651    /**
652     * Constructor
653     */
654      public HealthcareServiceNotAvailableComponent(StringType description) {
655        super();
656        this.description = description;
657      }
658
659        /**
660         * @return {@link #description} (The reason that can be presented to the user as to why this time is not available.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
661         */
662        public StringType getDescriptionElement() { 
663          if (this.description == null)
664            if (Configuration.errorOnAutoCreate())
665              throw new Error("Attempt to auto-create HealthcareServiceNotAvailableComponent.description");
666            else if (Configuration.doAutoCreate())
667              this.description = new StringType(); // bb
668          return this.description;
669        }
670
671        public boolean hasDescriptionElement() { 
672          return this.description != null && !this.description.isEmpty();
673        }
674
675        public boolean hasDescription() { 
676          return this.description != null && !this.description.isEmpty();
677        }
678
679        /**
680         * @param value {@link #description} (The reason that can be presented to the user as to why this time is not available.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
681         */
682        public HealthcareServiceNotAvailableComponent setDescriptionElement(StringType value) { 
683          this.description = value;
684          return this;
685        }
686
687        /**
688         * @return The reason that can be presented to the user as to why this time is not available.
689         */
690        public String getDescription() { 
691          return this.description == null ? null : this.description.getValue();
692        }
693
694        /**
695         * @param value The reason that can be presented to the user as to why this time is not available.
696         */
697        public HealthcareServiceNotAvailableComponent setDescription(String value) { 
698            if (this.description == null)
699              this.description = new StringType();
700            this.description.setValue(value);
701          return this;
702        }
703
704        /**
705         * @return {@link #during} (Service is not available (seasonally or for a public holiday) from this date.)
706         */
707        public Period getDuring() { 
708          if (this.during == null)
709            if (Configuration.errorOnAutoCreate())
710              throw new Error("Attempt to auto-create HealthcareServiceNotAvailableComponent.during");
711            else if (Configuration.doAutoCreate())
712              this.during = new Period(); // cc
713          return this.during;
714        }
715
716        public boolean hasDuring() { 
717          return this.during != null && !this.during.isEmpty();
718        }
719
720        /**
721         * @param value {@link #during} (Service is not available (seasonally or for a public holiday) from this date.)
722         */
723        public HealthcareServiceNotAvailableComponent setDuring(Period value) { 
724          this.during = value;
725          return this;
726        }
727
728        protected void listChildren(List<Property> children) {
729          super.listChildren(children);
730          children.add(new Property("description", "string", "The reason that can be presented to the user as to why this time is not available.", 0, 1, description));
731          children.add(new Property("during", "Period", "Service is not available (seasonally or for a public holiday) from this date.", 0, 1, during));
732        }
733
734        @Override
735        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
736          switch (_hash) {
737          case -1724546052: /*description*/  return new Property("description", "string", "The reason that can be presented to the user as to why this time is not available.", 0, 1, description);
738          case -1320499647: /*during*/  return new Property("during", "Period", "Service is not available (seasonally or for a public holiday) from this date.", 0, 1, during);
739          default: return super.getNamedProperty(_hash, _name, _checkValid);
740          }
741
742        }
743
744      @Override
745      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
746        switch (hash) {
747        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
748        case -1320499647: /*during*/ return this.during == null ? new Base[0] : new Base[] {this.during}; // Period
749        default: return super.getProperty(hash, name, checkValid);
750        }
751
752      }
753
754      @Override
755      public Base setProperty(int hash, String name, Base value) throws FHIRException {
756        switch (hash) {
757        case -1724546052: // description
758          this.description = castToString(value); // StringType
759          return value;
760        case -1320499647: // during
761          this.during = castToPeriod(value); // Period
762          return value;
763        default: return super.setProperty(hash, name, value);
764        }
765
766      }
767
768      @Override
769      public Base setProperty(String name, Base value) throws FHIRException {
770        if (name.equals("description")) {
771          this.description = castToString(value); // StringType
772        } else if (name.equals("during")) {
773          this.during = castToPeriod(value); // Period
774        } else
775          return super.setProperty(name, value);
776        return value;
777      }
778
779      @Override
780      public Base makeProperty(int hash, String name) throws FHIRException {
781        switch (hash) {
782        case -1724546052:  return getDescriptionElement();
783        case -1320499647:  return getDuring(); 
784        default: return super.makeProperty(hash, name);
785        }
786
787      }
788
789      @Override
790      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
791        switch (hash) {
792        case -1724546052: /*description*/ return new String[] {"string"};
793        case -1320499647: /*during*/ return new String[] {"Period"};
794        default: return super.getTypesForProperty(hash, name);
795        }
796
797      }
798
799      @Override
800      public Base addChild(String name) throws FHIRException {
801        if (name.equals("description")) {
802          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.description");
803        }
804        else if (name.equals("during")) {
805          this.during = new Period();
806          return this.during;
807        }
808        else
809          return super.addChild(name);
810      }
811
812      public HealthcareServiceNotAvailableComponent copy() {
813        HealthcareServiceNotAvailableComponent dst = new HealthcareServiceNotAvailableComponent();
814        copyValues(dst);
815        dst.description = description == null ? null : description.copy();
816        dst.during = during == null ? null : during.copy();
817        return dst;
818      }
819
820      @Override
821      public boolean equalsDeep(Base other_) {
822        if (!super.equalsDeep(other_))
823          return false;
824        if (!(other_ instanceof HealthcareServiceNotAvailableComponent))
825          return false;
826        HealthcareServiceNotAvailableComponent o = (HealthcareServiceNotAvailableComponent) other_;
827        return compareDeep(description, o.description, true) && compareDeep(during, o.during, true);
828      }
829
830      @Override
831      public boolean equalsShallow(Base other_) {
832        if (!super.equalsShallow(other_))
833          return false;
834        if (!(other_ instanceof HealthcareServiceNotAvailableComponent))
835          return false;
836        HealthcareServiceNotAvailableComponent o = (HealthcareServiceNotAvailableComponent) other_;
837        return compareValues(description, o.description, true);
838      }
839
840      public boolean isEmpty() {
841        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, during);
842      }
843
844  public String fhirType() {
845    return "HealthcareService.notAvailable";
846
847  }
848
849  }
850
851    /**
852     * External identifiers for this item.
853     */
854    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
855    @Description(shortDefinition="External identifiers for this item", formalDefinition="External identifiers for this item." )
856    protected List<Identifier> identifier;
857
858    /**
859     * 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.
860     */
861    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true)
862    @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." )
863    protected BooleanType active;
864
865    /**
866     * The organization that provides this healthcare service.
867     */
868    @Child(name = "providedBy", type = {Organization.class}, order=2, min=0, max=1, modifier=false, summary=true)
869    @Description(shortDefinition="Organization that provides this service", formalDefinition="The organization that provides this healthcare service." )
870    protected Reference providedBy;
871
872    /**
873     * The actual object that is the target of the reference (The organization that provides this healthcare service.)
874     */
875    protected Organization providedByTarget;
876
877    /**
878     * Identifies the broad category of service being performed or delivered.
879     */
880    @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
881    @Description(shortDefinition="Broad category of service being performed or delivered", formalDefinition="Identifies the broad category of service being performed or delivered." )
882    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-category")
883    protected List<CodeableConcept> category;
884
885    /**
886     * The specific type of service that may be delivered or performed.
887     */
888    @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
889    @Description(shortDefinition="Type of service that may be delivered or performed", formalDefinition="The specific type of service that may be delivered or performed." )
890    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-type")
891    protected List<CodeableConcept> type;
892
893    /**
894     * Collection of specialties handled by the service site. This is more of a medical term.
895     */
896    @Child(name = "specialty", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
897    @Description(shortDefinition="Specialties handled by the HealthcareService", formalDefinition="Collection of specialties handled by the service site. This is more of a medical term." )
898    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-practice-codes")
899    protected List<CodeableConcept> specialty;
900
901    /**
902     * The location(s) where this healthcare service may be provided.
903     */
904    @Child(name = "location", type = {Location.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
905    @Description(shortDefinition="Location(s) where service may be provided", formalDefinition="The location(s) where this healthcare service may be provided." )
906    protected List<Reference> location;
907    /**
908     * The actual objects that are the target of the reference (The location(s) where this healthcare service may be provided.)
909     */
910    protected List<Location> locationTarget;
911
912
913    /**
914     * Further description of the service as it would be presented to a consumer while searching.
915     */
916    @Child(name = "name", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true)
917    @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." )
918    protected StringType name;
919
920    /**
921     * 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.
922     */
923    @Child(name = "comment", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true)
924    @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." )
925    protected StringType comment;
926
927    /**
928     * Extra details about the service that can't be placed in the other fields.
929     */
930    @Child(name = "extraDetails", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
931    @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." )
932    protected StringType extraDetails;
933
934    /**
935     * 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.
936     */
937    @Child(name = "photo", type = {Attachment.class}, order=10, min=0, max=1, modifier=false, summary=true)
938    @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." )
939    protected Attachment photo;
940
941    /**
942     * List of contacts related to this specific healthcare service.
943     */
944    @Child(name = "telecom", type = {ContactPoint.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
945    @Description(shortDefinition="Contacts related to the healthcare service", formalDefinition="List of contacts related to this specific healthcare service." )
946    protected List<ContactPoint> telecom;
947
948    /**
949     * The location(s) that this service is available to (not where the service is provided).
950     */
951    @Child(name = "coverageArea", type = {Location.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
952    @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)." )
953    protected List<Reference> coverageArea;
954    /**
955     * The actual objects that are the target of the reference (The location(s) that this service is available to (not where the service is provided).)
956     */
957    protected List<Location> coverageAreaTarget;
958
959
960    /**
961     * The code(s) that detail the conditions under which the healthcare service is available/offered.
962     */
963    @Child(name = "serviceProvisionCode", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
964    @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." )
965    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-provision-conditions")
966    protected List<CodeableConcept> serviceProvisionCode;
967
968    /**
969     * Does this service have specific eligibility requirements that need to be met in order to use the service?
970     */
971    @Child(name = "eligibility", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false)
972    @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?" )
973    protected CodeableConcept eligibility;
974
975    /**
976     * Describes the eligibility conditions for the service.
977     */
978    @Child(name = "eligibilityNote", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false)
979    @Description(shortDefinition="Describes the eligibility conditions for the service", formalDefinition="Describes the eligibility conditions for the service." )
980    protected StringType eligibilityNote;
981
982    /**
983     * Program Names that can be used to categorize the service.
984     */
985    @Child(name = "programName", type = {StringType.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
986    @Description(shortDefinition="Program Names that categorize the service", formalDefinition="Program Names that can be used to categorize the service." )
987    protected List<StringType> programName;
988
989    /**
990     * Collection of characteristics (attributes).
991     */
992    @Child(name = "characteristic", type = {CodeableConcept.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
993    @Description(shortDefinition="Collection of characteristics (attributes)", formalDefinition="Collection of characteristics (attributes)." )
994    protected List<CodeableConcept> characteristic;
995
996    /**
997     * Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.
998     */
999    @Child(name = "referralMethod", type = {CodeableConcept.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1000    @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." )
1001    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-referral-method")
1002    protected List<CodeableConcept> referralMethod;
1003
1004    /**
1005     * 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.
1006     */
1007    @Child(name = "appointmentRequired", type = {BooleanType.class}, order=19, min=0, max=1, modifier=false, summary=false)
1008    @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." )
1009    protected BooleanType appointmentRequired;
1010
1011    /**
1012     * A collection of times that the Service Site is available.
1013     */
1014    @Child(name = "availableTime", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1015    @Description(shortDefinition="Times the Service Site is available", formalDefinition="A collection of times that the Service Site is available." )
1016    protected List<HealthcareServiceAvailableTimeComponent> availableTime;
1017
1018    /**
1019     * The HealthcareService is not available during this period of time due to the provided reason.
1020     */
1021    @Child(name = "notAvailable", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1022    @Description(shortDefinition="Not available during this time due to provided reason", formalDefinition="The HealthcareService is not available during this period of time due to the provided reason." )
1023    protected List<HealthcareServiceNotAvailableComponent> notAvailable;
1024
1025    /**
1026     * A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.
1027     */
1028    @Child(name = "availabilityExceptions", type = {StringType.class}, order=22, min=0, max=1, modifier=false, summary=false)
1029    @Description(shortDefinition="Description of availability exceptions", formalDefinition="A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times." )
1030    protected StringType availabilityExceptions;
1031
1032    /**
1033     * Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.
1034     */
1035    @Child(name = "endpoint", type = {Endpoint.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1036    @Description(shortDefinition="Technical endpoints providing access to services operated for the location", formalDefinition="Technical endpoints providing access to services operated for the specific healthcare services defined at this resource." )
1037    protected List<Reference> endpoint;
1038    /**
1039     * The actual objects that are the target of the reference (Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.)
1040     */
1041    protected List<Endpoint> endpointTarget;
1042
1043
1044    private static final long serialVersionUID = 1984827757L;
1045
1046  /**
1047   * Constructor
1048   */
1049    public HealthcareService() {
1050      super();
1051    }
1052
1053    /**
1054     * @return {@link #identifier} (External identifiers for this item.)
1055     */
1056    public List<Identifier> getIdentifier() { 
1057      if (this.identifier == null)
1058        this.identifier = new ArrayList<Identifier>();
1059      return this.identifier;
1060    }
1061
1062    /**
1063     * @return Returns a reference to <code>this</code> for easy method chaining
1064     */
1065    public HealthcareService setIdentifier(List<Identifier> theIdentifier) { 
1066      this.identifier = theIdentifier;
1067      return this;
1068    }
1069
1070    public boolean hasIdentifier() { 
1071      if (this.identifier == null)
1072        return false;
1073      for (Identifier item : this.identifier)
1074        if (!item.isEmpty())
1075          return true;
1076      return false;
1077    }
1078
1079    public Identifier addIdentifier() { //3
1080      Identifier t = new Identifier();
1081      if (this.identifier == null)
1082        this.identifier = new ArrayList<Identifier>();
1083      this.identifier.add(t);
1084      return t;
1085    }
1086
1087    public HealthcareService addIdentifier(Identifier t) { //3
1088      if (t == null)
1089        return this;
1090      if (this.identifier == null)
1091        this.identifier = new ArrayList<Identifier>();
1092      this.identifier.add(t);
1093      return this;
1094    }
1095
1096    /**
1097     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
1098     */
1099    public Identifier getIdentifierFirstRep() { 
1100      if (getIdentifier().isEmpty()) {
1101        addIdentifier();
1102      }
1103      return getIdentifier().get(0);
1104    }
1105
1106    /**
1107     * @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
1108     */
1109    public BooleanType getActiveElement() { 
1110      if (this.active == null)
1111        if (Configuration.errorOnAutoCreate())
1112          throw new Error("Attempt to auto-create HealthcareService.active");
1113        else if (Configuration.doAutoCreate())
1114          this.active = new BooleanType(); // bb
1115      return this.active;
1116    }
1117
1118    public boolean hasActiveElement() { 
1119      return this.active != null && !this.active.isEmpty();
1120    }
1121
1122    public boolean hasActive() { 
1123      return this.active != null && !this.active.isEmpty();
1124    }
1125
1126    /**
1127     * @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
1128     */
1129    public HealthcareService setActiveElement(BooleanType value) { 
1130      this.active = value;
1131      return this;
1132    }
1133
1134    /**
1135     * @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.
1136     */
1137    public boolean getActive() { 
1138      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
1139    }
1140
1141    /**
1142     * @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.
1143     */
1144    public HealthcareService setActive(boolean value) { 
1145        if (this.active == null)
1146          this.active = new BooleanType();
1147        this.active.setValue(value);
1148      return this;
1149    }
1150
1151    /**
1152     * @return {@link #providedBy} (The organization that provides this healthcare service.)
1153     */
1154    public Reference getProvidedBy() { 
1155      if (this.providedBy == null)
1156        if (Configuration.errorOnAutoCreate())
1157          throw new Error("Attempt to auto-create HealthcareService.providedBy");
1158        else if (Configuration.doAutoCreate())
1159          this.providedBy = new Reference(); // cc
1160      return this.providedBy;
1161    }
1162
1163    public boolean hasProvidedBy() { 
1164      return this.providedBy != null && !this.providedBy.isEmpty();
1165    }
1166
1167    /**
1168     * @param value {@link #providedBy} (The organization that provides this healthcare service.)
1169     */
1170    public HealthcareService setProvidedBy(Reference value) { 
1171      this.providedBy = value;
1172      return this;
1173    }
1174
1175    /**
1176     * @return {@link #providedBy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization that provides this healthcare service.)
1177     */
1178    public Organization getProvidedByTarget() { 
1179      if (this.providedByTarget == null)
1180        if (Configuration.errorOnAutoCreate())
1181          throw new Error("Attempt to auto-create HealthcareService.providedBy");
1182        else if (Configuration.doAutoCreate())
1183          this.providedByTarget = new Organization(); // aa
1184      return this.providedByTarget;
1185    }
1186
1187    /**
1188     * @param value {@link #providedBy} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization that provides this healthcare service.)
1189     */
1190    public HealthcareService setProvidedByTarget(Organization value) { 
1191      this.providedByTarget = value;
1192      return this;
1193    }
1194
1195    /**
1196     * @return {@link #category} (Identifies the broad category of service being performed or delivered.)
1197     */
1198    public List<CodeableConcept> getCategory() { 
1199      if (this.category == null)
1200        this.category = new ArrayList<CodeableConcept>();
1201      return this.category;
1202    }
1203
1204    /**
1205     * @return Returns a reference to <code>this</code> for easy method chaining
1206     */
1207    public HealthcareService setCategory(List<CodeableConcept> theCategory) { 
1208      this.category = theCategory;
1209      return this;
1210    }
1211
1212    public boolean hasCategory() { 
1213      if (this.category == null)
1214        return false;
1215      for (CodeableConcept item : this.category)
1216        if (!item.isEmpty())
1217          return true;
1218      return false;
1219    }
1220
1221    public CodeableConcept addCategory() { //3
1222      CodeableConcept t = new CodeableConcept();
1223      if (this.category == null)
1224        this.category = new ArrayList<CodeableConcept>();
1225      this.category.add(t);
1226      return t;
1227    }
1228
1229    public HealthcareService addCategory(CodeableConcept t) { //3
1230      if (t == null)
1231        return this;
1232      if (this.category == null)
1233        this.category = new ArrayList<CodeableConcept>();
1234      this.category.add(t);
1235      return this;
1236    }
1237
1238    /**
1239     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist
1240     */
1241    public CodeableConcept getCategoryFirstRep() { 
1242      if (getCategory().isEmpty()) {
1243        addCategory();
1244      }
1245      return getCategory().get(0);
1246    }
1247
1248    /**
1249     * @return {@link #type} (The specific type of service that may be delivered or performed.)
1250     */
1251    public List<CodeableConcept> getType() { 
1252      if (this.type == null)
1253        this.type = new ArrayList<CodeableConcept>();
1254      return this.type;
1255    }
1256
1257    /**
1258     * @return Returns a reference to <code>this</code> for easy method chaining
1259     */
1260    public HealthcareService setType(List<CodeableConcept> theType) { 
1261      this.type = theType;
1262      return this;
1263    }
1264
1265    public boolean hasType() { 
1266      if (this.type == null)
1267        return false;
1268      for (CodeableConcept item : this.type)
1269        if (!item.isEmpty())
1270          return true;
1271      return false;
1272    }
1273
1274    public CodeableConcept addType() { //3
1275      CodeableConcept t = new CodeableConcept();
1276      if (this.type == null)
1277        this.type = new ArrayList<CodeableConcept>();
1278      this.type.add(t);
1279      return t;
1280    }
1281
1282    public HealthcareService addType(CodeableConcept t) { //3
1283      if (t == null)
1284        return this;
1285      if (this.type == null)
1286        this.type = new ArrayList<CodeableConcept>();
1287      this.type.add(t);
1288      return this;
1289    }
1290
1291    /**
1292     * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
1293     */
1294    public CodeableConcept getTypeFirstRep() { 
1295      if (getType().isEmpty()) {
1296        addType();
1297      }
1298      return getType().get(0);
1299    }
1300
1301    /**
1302     * @return {@link #specialty} (Collection of specialties handled by the service site. This is more of a medical term.)
1303     */
1304    public List<CodeableConcept> getSpecialty() { 
1305      if (this.specialty == null)
1306        this.specialty = new ArrayList<CodeableConcept>();
1307      return this.specialty;
1308    }
1309
1310    /**
1311     * @return Returns a reference to <code>this</code> for easy method chaining
1312     */
1313    public HealthcareService setSpecialty(List<CodeableConcept> theSpecialty) { 
1314      this.specialty = theSpecialty;
1315      return this;
1316    }
1317
1318    public boolean hasSpecialty() { 
1319      if (this.specialty == null)
1320        return false;
1321      for (CodeableConcept item : this.specialty)
1322        if (!item.isEmpty())
1323          return true;
1324      return false;
1325    }
1326
1327    public CodeableConcept addSpecialty() { //3
1328      CodeableConcept t = new CodeableConcept();
1329      if (this.specialty == null)
1330        this.specialty = new ArrayList<CodeableConcept>();
1331      this.specialty.add(t);
1332      return t;
1333    }
1334
1335    public HealthcareService addSpecialty(CodeableConcept t) { //3
1336      if (t == null)
1337        return this;
1338      if (this.specialty == null)
1339        this.specialty = new ArrayList<CodeableConcept>();
1340      this.specialty.add(t);
1341      return this;
1342    }
1343
1344    /**
1345     * @return The first repetition of repeating field {@link #specialty}, creating it if it does not already exist
1346     */
1347    public CodeableConcept getSpecialtyFirstRep() { 
1348      if (getSpecialty().isEmpty()) {
1349        addSpecialty();
1350      }
1351      return getSpecialty().get(0);
1352    }
1353
1354    /**
1355     * @return {@link #location} (The location(s) where this healthcare service may be provided.)
1356     */
1357    public List<Reference> getLocation() { 
1358      if (this.location == null)
1359        this.location = new ArrayList<Reference>();
1360      return this.location;
1361    }
1362
1363    /**
1364     * @return Returns a reference to <code>this</code> for easy method chaining
1365     */
1366    public HealthcareService setLocation(List<Reference> theLocation) { 
1367      this.location = theLocation;
1368      return this;
1369    }
1370
1371    public boolean hasLocation() { 
1372      if (this.location == null)
1373        return false;
1374      for (Reference item : this.location)
1375        if (!item.isEmpty())
1376          return true;
1377      return false;
1378    }
1379
1380    public Reference addLocation() { //3
1381      Reference t = new Reference();
1382      if (this.location == null)
1383        this.location = new ArrayList<Reference>();
1384      this.location.add(t);
1385      return t;
1386    }
1387
1388    public HealthcareService addLocation(Reference t) { //3
1389      if (t == null)
1390        return this;
1391      if (this.location == null)
1392        this.location = new ArrayList<Reference>();
1393      this.location.add(t);
1394      return this;
1395    }
1396
1397    /**
1398     * @return The first repetition of repeating field {@link #location}, creating it if it does not already exist
1399     */
1400    public Reference getLocationFirstRep() { 
1401      if (getLocation().isEmpty()) {
1402        addLocation();
1403      }
1404      return getLocation().get(0);
1405    }
1406
1407    /**
1408     * @deprecated Use Reference#setResource(IBaseResource) instead
1409     */
1410    @Deprecated
1411    public List<Location> getLocationTarget() { 
1412      if (this.locationTarget == null)
1413        this.locationTarget = new ArrayList<Location>();
1414      return this.locationTarget;
1415    }
1416
1417    /**
1418     * @deprecated Use Reference#setResource(IBaseResource) instead
1419     */
1420    @Deprecated
1421    public Location addLocationTarget() { 
1422      Location r = new Location();
1423      if (this.locationTarget == null)
1424        this.locationTarget = new ArrayList<Location>();
1425      this.locationTarget.add(r);
1426      return r;
1427    }
1428
1429    /**
1430     * @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
1431     */
1432    public StringType getNameElement() { 
1433      if (this.name == null)
1434        if (Configuration.errorOnAutoCreate())
1435          throw new Error("Attempt to auto-create HealthcareService.name");
1436        else if (Configuration.doAutoCreate())
1437          this.name = new StringType(); // bb
1438      return this.name;
1439    }
1440
1441    public boolean hasNameElement() { 
1442      return this.name != null && !this.name.isEmpty();
1443    }
1444
1445    public boolean hasName() { 
1446      return this.name != null && !this.name.isEmpty();
1447    }
1448
1449    /**
1450     * @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
1451     */
1452    public HealthcareService setNameElement(StringType value) { 
1453      this.name = value;
1454      return this;
1455    }
1456
1457    /**
1458     * @return Further description of the service as it would be presented to a consumer while searching.
1459     */
1460    public String getName() { 
1461      return this.name == null ? null : this.name.getValue();
1462    }
1463
1464    /**
1465     * @param value Further description of the service as it would be presented to a consumer while searching.
1466     */
1467    public HealthcareService setName(String value) { 
1468      if (Utilities.noString(value))
1469        this.name = null;
1470      else {
1471        if (this.name == null)
1472          this.name = new StringType();
1473        this.name.setValue(value);
1474      }
1475      return this;
1476    }
1477
1478    /**
1479     * @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
1480     */
1481    public StringType getCommentElement() { 
1482      if (this.comment == null)
1483        if (Configuration.errorOnAutoCreate())
1484          throw new Error("Attempt to auto-create HealthcareService.comment");
1485        else if (Configuration.doAutoCreate())
1486          this.comment = new StringType(); // bb
1487      return this.comment;
1488    }
1489
1490    public boolean hasCommentElement() { 
1491      return this.comment != null && !this.comment.isEmpty();
1492    }
1493
1494    public boolean hasComment() { 
1495      return this.comment != null && !this.comment.isEmpty();
1496    }
1497
1498    /**
1499     * @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
1500     */
1501    public HealthcareService setCommentElement(StringType value) { 
1502      this.comment = value;
1503      return this;
1504    }
1505
1506    /**
1507     * @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.
1508     */
1509    public String getComment() { 
1510      return this.comment == null ? null : this.comment.getValue();
1511    }
1512
1513    /**
1514     * @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.
1515     */
1516    public HealthcareService setComment(String value) { 
1517      if (Utilities.noString(value))
1518        this.comment = null;
1519      else {
1520        if (this.comment == null)
1521          this.comment = new StringType();
1522        this.comment.setValue(value);
1523      }
1524      return this;
1525    }
1526
1527    /**
1528     * @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
1529     */
1530    public StringType getExtraDetailsElement() { 
1531      if (this.extraDetails == null)
1532        if (Configuration.errorOnAutoCreate())
1533          throw new Error("Attempt to auto-create HealthcareService.extraDetails");
1534        else if (Configuration.doAutoCreate())
1535          this.extraDetails = new StringType(); // bb
1536      return this.extraDetails;
1537    }
1538
1539    public boolean hasExtraDetailsElement() { 
1540      return this.extraDetails != null && !this.extraDetails.isEmpty();
1541    }
1542
1543    public boolean hasExtraDetails() { 
1544      return this.extraDetails != null && !this.extraDetails.isEmpty();
1545    }
1546
1547    /**
1548     * @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
1549     */
1550    public HealthcareService setExtraDetailsElement(StringType value) { 
1551      this.extraDetails = value;
1552      return this;
1553    }
1554
1555    /**
1556     * @return Extra details about the service that can't be placed in the other fields.
1557     */
1558    public String getExtraDetails() { 
1559      return this.extraDetails == null ? null : this.extraDetails.getValue();
1560    }
1561
1562    /**
1563     * @param value Extra details about the service that can't be placed in the other fields.
1564     */
1565    public HealthcareService setExtraDetails(String value) { 
1566      if (Utilities.noString(value))
1567        this.extraDetails = null;
1568      else {
1569        if (this.extraDetails == null)
1570          this.extraDetails = new StringType();
1571        this.extraDetails.setValue(value);
1572      }
1573      return this;
1574    }
1575
1576    /**
1577     * @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.)
1578     */
1579    public Attachment getPhoto() { 
1580      if (this.photo == null)
1581        if (Configuration.errorOnAutoCreate())
1582          throw new Error("Attempt to auto-create HealthcareService.photo");
1583        else if (Configuration.doAutoCreate())
1584          this.photo = new Attachment(); // cc
1585      return this.photo;
1586    }
1587
1588    public boolean hasPhoto() { 
1589      return this.photo != null && !this.photo.isEmpty();
1590    }
1591
1592    /**
1593     * @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.)
1594     */
1595    public HealthcareService setPhoto(Attachment value) { 
1596      this.photo = value;
1597      return this;
1598    }
1599
1600    /**
1601     * @return {@link #telecom} (List of contacts related to this specific healthcare service.)
1602     */
1603    public List<ContactPoint> getTelecom() { 
1604      if (this.telecom == null)
1605        this.telecom = new ArrayList<ContactPoint>();
1606      return this.telecom;
1607    }
1608
1609    /**
1610     * @return Returns a reference to <code>this</code> for easy method chaining
1611     */
1612    public HealthcareService setTelecom(List<ContactPoint> theTelecom) { 
1613      this.telecom = theTelecom;
1614      return this;
1615    }
1616
1617    public boolean hasTelecom() { 
1618      if (this.telecom == null)
1619        return false;
1620      for (ContactPoint item : this.telecom)
1621        if (!item.isEmpty())
1622          return true;
1623      return false;
1624    }
1625
1626    public ContactPoint addTelecom() { //3
1627      ContactPoint t = new ContactPoint();
1628      if (this.telecom == null)
1629        this.telecom = new ArrayList<ContactPoint>();
1630      this.telecom.add(t);
1631      return t;
1632    }
1633
1634    public HealthcareService addTelecom(ContactPoint t) { //3
1635      if (t == null)
1636        return this;
1637      if (this.telecom == null)
1638        this.telecom = new ArrayList<ContactPoint>();
1639      this.telecom.add(t);
1640      return this;
1641    }
1642
1643    /**
1644     * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
1645     */
1646    public ContactPoint getTelecomFirstRep() { 
1647      if (getTelecom().isEmpty()) {
1648        addTelecom();
1649      }
1650      return getTelecom().get(0);
1651    }
1652
1653    /**
1654     * @return {@link #coverageArea} (The location(s) that this service is available to (not where the service is provided).)
1655     */
1656    public List<Reference> getCoverageArea() { 
1657      if (this.coverageArea == null)
1658        this.coverageArea = new ArrayList<Reference>();
1659      return this.coverageArea;
1660    }
1661
1662    /**
1663     * @return Returns a reference to <code>this</code> for easy method chaining
1664     */
1665    public HealthcareService setCoverageArea(List<Reference> theCoverageArea) { 
1666      this.coverageArea = theCoverageArea;
1667      return this;
1668    }
1669
1670    public boolean hasCoverageArea() { 
1671      if (this.coverageArea == null)
1672        return false;
1673      for (Reference item : this.coverageArea)
1674        if (!item.isEmpty())
1675          return true;
1676      return false;
1677    }
1678
1679    public Reference addCoverageArea() { //3
1680      Reference t = new Reference();
1681      if (this.coverageArea == null)
1682        this.coverageArea = new ArrayList<Reference>();
1683      this.coverageArea.add(t);
1684      return t;
1685    }
1686
1687    public HealthcareService addCoverageArea(Reference t) { //3
1688      if (t == null)
1689        return this;
1690      if (this.coverageArea == null)
1691        this.coverageArea = new ArrayList<Reference>();
1692      this.coverageArea.add(t);
1693      return this;
1694    }
1695
1696    /**
1697     * @return The first repetition of repeating field {@link #coverageArea}, creating it if it does not already exist
1698     */
1699    public Reference getCoverageAreaFirstRep() { 
1700      if (getCoverageArea().isEmpty()) {
1701        addCoverageArea();
1702      }
1703      return getCoverageArea().get(0);
1704    }
1705
1706    /**
1707     * @deprecated Use Reference#setResource(IBaseResource) instead
1708     */
1709    @Deprecated
1710    public List<Location> getCoverageAreaTarget() { 
1711      if (this.coverageAreaTarget == null)
1712        this.coverageAreaTarget = new ArrayList<Location>();
1713      return this.coverageAreaTarget;
1714    }
1715
1716    /**
1717     * @deprecated Use Reference#setResource(IBaseResource) instead
1718     */
1719    @Deprecated
1720    public Location addCoverageAreaTarget() { 
1721      Location r = new Location();
1722      if (this.coverageAreaTarget == null)
1723        this.coverageAreaTarget = new ArrayList<Location>();
1724      this.coverageAreaTarget.add(r);
1725      return r;
1726    }
1727
1728    /**
1729     * @return {@link #serviceProvisionCode} (The code(s) that detail the conditions under which the healthcare service is available/offered.)
1730     */
1731    public List<CodeableConcept> getServiceProvisionCode() { 
1732      if (this.serviceProvisionCode == null)
1733        this.serviceProvisionCode = new ArrayList<CodeableConcept>();
1734      return this.serviceProvisionCode;
1735    }
1736
1737    /**
1738     * @return Returns a reference to <code>this</code> for easy method chaining
1739     */
1740    public HealthcareService setServiceProvisionCode(List<CodeableConcept> theServiceProvisionCode) { 
1741      this.serviceProvisionCode = theServiceProvisionCode;
1742      return this;
1743    }
1744
1745    public boolean hasServiceProvisionCode() { 
1746      if (this.serviceProvisionCode == null)
1747        return false;
1748      for (CodeableConcept item : this.serviceProvisionCode)
1749        if (!item.isEmpty())
1750          return true;
1751      return false;
1752    }
1753
1754    public CodeableConcept addServiceProvisionCode() { //3
1755      CodeableConcept t = new CodeableConcept();
1756      if (this.serviceProvisionCode == null)
1757        this.serviceProvisionCode = new ArrayList<CodeableConcept>();
1758      this.serviceProvisionCode.add(t);
1759      return t;
1760    }
1761
1762    public HealthcareService addServiceProvisionCode(CodeableConcept t) { //3
1763      if (t == null)
1764        return this;
1765      if (this.serviceProvisionCode == null)
1766        this.serviceProvisionCode = new ArrayList<CodeableConcept>();
1767      this.serviceProvisionCode.add(t);
1768      return this;
1769    }
1770
1771    /**
1772     * @return The first repetition of repeating field {@link #serviceProvisionCode}, creating it if it does not already exist
1773     */
1774    public CodeableConcept getServiceProvisionCodeFirstRep() { 
1775      if (getServiceProvisionCode().isEmpty()) {
1776        addServiceProvisionCode();
1777      }
1778      return getServiceProvisionCode().get(0);
1779    }
1780
1781    /**
1782     * @return {@link #eligibility} (Does this service have specific eligibility requirements that need to be met in order to use the service?)
1783     */
1784    public CodeableConcept getEligibility() { 
1785      if (this.eligibility == null)
1786        if (Configuration.errorOnAutoCreate())
1787          throw new Error("Attempt to auto-create HealthcareService.eligibility");
1788        else if (Configuration.doAutoCreate())
1789          this.eligibility = new CodeableConcept(); // cc
1790      return this.eligibility;
1791    }
1792
1793    public boolean hasEligibility() { 
1794      return this.eligibility != null && !this.eligibility.isEmpty();
1795    }
1796
1797    /**
1798     * @param value {@link #eligibility} (Does this service have specific eligibility requirements that need to be met in order to use the service?)
1799     */
1800    public HealthcareService setEligibility(CodeableConcept value) { 
1801      this.eligibility = value;
1802      return this;
1803    }
1804
1805    /**
1806     * @return {@link #eligibilityNote} (Describes the eligibility conditions for the service.). This is the underlying object with id, value and extensions. The accessor "getEligibilityNote" gives direct access to the value
1807     */
1808    public StringType getEligibilityNoteElement() { 
1809      if (this.eligibilityNote == null)
1810        if (Configuration.errorOnAutoCreate())
1811          throw new Error("Attempt to auto-create HealthcareService.eligibilityNote");
1812        else if (Configuration.doAutoCreate())
1813          this.eligibilityNote = new StringType(); // bb
1814      return this.eligibilityNote;
1815    }
1816
1817    public boolean hasEligibilityNoteElement() { 
1818      return this.eligibilityNote != null && !this.eligibilityNote.isEmpty();
1819    }
1820
1821    public boolean hasEligibilityNote() { 
1822      return this.eligibilityNote != null && !this.eligibilityNote.isEmpty();
1823    }
1824
1825    /**
1826     * @param value {@link #eligibilityNote} (Describes the eligibility conditions for the service.). This is the underlying object with id, value and extensions. The accessor "getEligibilityNote" gives direct access to the value
1827     */
1828    public HealthcareService setEligibilityNoteElement(StringType value) { 
1829      this.eligibilityNote = value;
1830      return this;
1831    }
1832
1833    /**
1834     * @return Describes the eligibility conditions for the service.
1835     */
1836    public String getEligibilityNote() { 
1837      return this.eligibilityNote == null ? null : this.eligibilityNote.getValue();
1838    }
1839
1840    /**
1841     * @param value Describes the eligibility conditions for the service.
1842     */
1843    public HealthcareService setEligibilityNote(String value) { 
1844      if (Utilities.noString(value))
1845        this.eligibilityNote = null;
1846      else {
1847        if (this.eligibilityNote == null)
1848          this.eligibilityNote = new StringType();
1849        this.eligibilityNote.setValue(value);
1850      }
1851      return this;
1852    }
1853
1854    /**
1855     * @return {@link #programName} (Program Names that can be used to categorize the service.)
1856     */
1857    public List<StringType> getProgramName() { 
1858      if (this.programName == null)
1859        this.programName = new ArrayList<StringType>();
1860      return this.programName;
1861    }
1862
1863    /**
1864     * @return Returns a reference to <code>this</code> for easy method chaining
1865     */
1866    public HealthcareService setProgramName(List<StringType> theProgramName) { 
1867      this.programName = theProgramName;
1868      return this;
1869    }
1870
1871    public boolean hasProgramName() { 
1872      if (this.programName == null)
1873        return false;
1874      for (StringType item : this.programName)
1875        if (!item.isEmpty())
1876          return true;
1877      return false;
1878    }
1879
1880    /**
1881     * @return {@link #programName} (Program Names that can be used to categorize the service.)
1882     */
1883    public StringType addProgramNameElement() {//2 
1884      StringType t = new StringType();
1885      if (this.programName == null)
1886        this.programName = new ArrayList<StringType>();
1887      this.programName.add(t);
1888      return t;
1889    }
1890
1891    /**
1892     * @param value {@link #programName} (Program Names that can be used to categorize the service.)
1893     */
1894    public HealthcareService addProgramName(String value) { //1
1895      StringType t = new StringType();
1896      t.setValue(value);
1897      if (this.programName == null)
1898        this.programName = new ArrayList<StringType>();
1899      this.programName.add(t);
1900      return this;
1901    }
1902
1903    /**
1904     * @param value {@link #programName} (Program Names that can be used to categorize the service.)
1905     */
1906    public boolean hasProgramName(String value) { 
1907      if (this.programName == null)
1908        return false;
1909      for (StringType v : this.programName)
1910        if (v.getValue().equals(value)) // string
1911          return true;
1912      return false;
1913    }
1914
1915    /**
1916     * @return {@link #characteristic} (Collection of characteristics (attributes).)
1917     */
1918    public List<CodeableConcept> getCharacteristic() { 
1919      if (this.characteristic == null)
1920        this.characteristic = new ArrayList<CodeableConcept>();
1921      return this.characteristic;
1922    }
1923
1924    /**
1925     * @return Returns a reference to <code>this</code> for easy method chaining
1926     */
1927    public HealthcareService setCharacteristic(List<CodeableConcept> theCharacteristic) { 
1928      this.characteristic = theCharacteristic;
1929      return this;
1930    }
1931
1932    public boolean hasCharacteristic() { 
1933      if (this.characteristic == null)
1934        return false;
1935      for (CodeableConcept item : this.characteristic)
1936        if (!item.isEmpty())
1937          return true;
1938      return false;
1939    }
1940
1941    public CodeableConcept addCharacteristic() { //3
1942      CodeableConcept t = new CodeableConcept();
1943      if (this.characteristic == null)
1944        this.characteristic = new ArrayList<CodeableConcept>();
1945      this.characteristic.add(t);
1946      return t;
1947    }
1948
1949    public HealthcareService addCharacteristic(CodeableConcept t) { //3
1950      if (t == null)
1951        return this;
1952      if (this.characteristic == null)
1953        this.characteristic = new ArrayList<CodeableConcept>();
1954      this.characteristic.add(t);
1955      return this;
1956    }
1957
1958    /**
1959     * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist
1960     */
1961    public CodeableConcept getCharacteristicFirstRep() { 
1962      if (getCharacteristic().isEmpty()) {
1963        addCharacteristic();
1964      }
1965      return getCharacteristic().get(0);
1966    }
1967
1968    /**
1969     * @return {@link #referralMethod} (Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.)
1970     */
1971    public List<CodeableConcept> getReferralMethod() { 
1972      if (this.referralMethod == null)
1973        this.referralMethod = new ArrayList<CodeableConcept>();
1974      return this.referralMethod;
1975    }
1976
1977    /**
1978     * @return Returns a reference to <code>this</code> for easy method chaining
1979     */
1980    public HealthcareService setReferralMethod(List<CodeableConcept> theReferralMethod) { 
1981      this.referralMethod = theReferralMethod;
1982      return this;
1983    }
1984
1985    public boolean hasReferralMethod() { 
1986      if (this.referralMethod == null)
1987        return false;
1988      for (CodeableConcept item : this.referralMethod)
1989        if (!item.isEmpty())
1990          return true;
1991      return false;
1992    }
1993
1994    public CodeableConcept addReferralMethod() { //3
1995      CodeableConcept t = new CodeableConcept();
1996      if (this.referralMethod == null)
1997        this.referralMethod = new ArrayList<CodeableConcept>();
1998      this.referralMethod.add(t);
1999      return t;
2000    }
2001
2002    public HealthcareService addReferralMethod(CodeableConcept t) { //3
2003      if (t == null)
2004        return this;
2005      if (this.referralMethod == null)
2006        this.referralMethod = new ArrayList<CodeableConcept>();
2007      this.referralMethod.add(t);
2008      return this;
2009    }
2010
2011    /**
2012     * @return The first repetition of repeating field {@link #referralMethod}, creating it if it does not already exist
2013     */
2014    public CodeableConcept getReferralMethodFirstRep() { 
2015      if (getReferralMethod().isEmpty()) {
2016        addReferralMethod();
2017      }
2018      return getReferralMethod().get(0);
2019    }
2020
2021    /**
2022     * @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
2023     */
2024    public BooleanType getAppointmentRequiredElement() { 
2025      if (this.appointmentRequired == null)
2026        if (Configuration.errorOnAutoCreate())
2027          throw new Error("Attempt to auto-create HealthcareService.appointmentRequired");
2028        else if (Configuration.doAutoCreate())
2029          this.appointmentRequired = new BooleanType(); // bb
2030      return this.appointmentRequired;
2031    }
2032
2033    public boolean hasAppointmentRequiredElement() { 
2034      return this.appointmentRequired != null && !this.appointmentRequired.isEmpty();
2035    }
2036
2037    public boolean hasAppointmentRequired() { 
2038      return this.appointmentRequired != null && !this.appointmentRequired.isEmpty();
2039    }
2040
2041    /**
2042     * @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
2043     */
2044    public HealthcareService setAppointmentRequiredElement(BooleanType value) { 
2045      this.appointmentRequired = value;
2046      return this;
2047    }
2048
2049    /**
2050     * @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.
2051     */
2052    public boolean getAppointmentRequired() { 
2053      return this.appointmentRequired == null || this.appointmentRequired.isEmpty() ? false : this.appointmentRequired.getValue();
2054    }
2055
2056    /**
2057     * @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.
2058     */
2059    public HealthcareService setAppointmentRequired(boolean value) { 
2060        if (this.appointmentRequired == null)
2061          this.appointmentRequired = new BooleanType();
2062        this.appointmentRequired.setValue(value);
2063      return this;
2064    }
2065
2066    /**
2067     * @return {@link #availableTime} (A collection of times that the Service Site is available.)
2068     */
2069    public List<HealthcareServiceAvailableTimeComponent> getAvailableTime() { 
2070      if (this.availableTime == null)
2071        this.availableTime = new ArrayList<HealthcareServiceAvailableTimeComponent>();
2072      return this.availableTime;
2073    }
2074
2075    /**
2076     * @return Returns a reference to <code>this</code> for easy method chaining
2077     */
2078    public HealthcareService setAvailableTime(List<HealthcareServiceAvailableTimeComponent> theAvailableTime) { 
2079      this.availableTime = theAvailableTime;
2080      return this;
2081    }
2082
2083    public boolean hasAvailableTime() { 
2084      if (this.availableTime == null)
2085        return false;
2086      for (HealthcareServiceAvailableTimeComponent item : this.availableTime)
2087        if (!item.isEmpty())
2088          return true;
2089      return false;
2090    }
2091
2092    public HealthcareServiceAvailableTimeComponent addAvailableTime() { //3
2093      HealthcareServiceAvailableTimeComponent t = new HealthcareServiceAvailableTimeComponent();
2094      if (this.availableTime == null)
2095        this.availableTime = new ArrayList<HealthcareServiceAvailableTimeComponent>();
2096      this.availableTime.add(t);
2097      return t;
2098    }
2099
2100    public HealthcareService addAvailableTime(HealthcareServiceAvailableTimeComponent t) { //3
2101      if (t == null)
2102        return this;
2103      if (this.availableTime == null)
2104        this.availableTime = new ArrayList<HealthcareServiceAvailableTimeComponent>();
2105      this.availableTime.add(t);
2106      return this;
2107    }
2108
2109    /**
2110     * @return The first repetition of repeating field {@link #availableTime}, creating it if it does not already exist
2111     */
2112    public HealthcareServiceAvailableTimeComponent getAvailableTimeFirstRep() { 
2113      if (getAvailableTime().isEmpty()) {
2114        addAvailableTime();
2115      }
2116      return getAvailableTime().get(0);
2117    }
2118
2119    /**
2120     * @return {@link #notAvailable} (The HealthcareService is not available during this period of time due to the provided reason.)
2121     */
2122    public List<HealthcareServiceNotAvailableComponent> getNotAvailable() { 
2123      if (this.notAvailable == null)
2124        this.notAvailable = new ArrayList<HealthcareServiceNotAvailableComponent>();
2125      return this.notAvailable;
2126    }
2127
2128    /**
2129     * @return Returns a reference to <code>this</code> for easy method chaining
2130     */
2131    public HealthcareService setNotAvailable(List<HealthcareServiceNotAvailableComponent> theNotAvailable) { 
2132      this.notAvailable = theNotAvailable;
2133      return this;
2134    }
2135
2136    public boolean hasNotAvailable() { 
2137      if (this.notAvailable == null)
2138        return false;
2139      for (HealthcareServiceNotAvailableComponent item : this.notAvailable)
2140        if (!item.isEmpty())
2141          return true;
2142      return false;
2143    }
2144
2145    public HealthcareServiceNotAvailableComponent addNotAvailable() { //3
2146      HealthcareServiceNotAvailableComponent t = new HealthcareServiceNotAvailableComponent();
2147      if (this.notAvailable == null)
2148        this.notAvailable = new ArrayList<HealthcareServiceNotAvailableComponent>();
2149      this.notAvailable.add(t);
2150      return t;
2151    }
2152
2153    public HealthcareService addNotAvailable(HealthcareServiceNotAvailableComponent t) { //3
2154      if (t == null)
2155        return this;
2156      if (this.notAvailable == null)
2157        this.notAvailable = new ArrayList<HealthcareServiceNotAvailableComponent>();
2158      this.notAvailable.add(t);
2159      return this;
2160    }
2161
2162    /**
2163     * @return The first repetition of repeating field {@link #notAvailable}, creating it if it does not already exist
2164     */
2165    public HealthcareServiceNotAvailableComponent getNotAvailableFirstRep() { 
2166      if (getNotAvailable().isEmpty()) {
2167        addNotAvailable();
2168      }
2169      return getNotAvailable().get(0);
2170    }
2171
2172    /**
2173     * @return {@link #availabilityExceptions} (A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value
2174     */
2175    public StringType getAvailabilityExceptionsElement() { 
2176      if (this.availabilityExceptions == null)
2177        if (Configuration.errorOnAutoCreate())
2178          throw new Error("Attempt to auto-create HealthcareService.availabilityExceptions");
2179        else if (Configuration.doAutoCreate())
2180          this.availabilityExceptions = new StringType(); // bb
2181      return this.availabilityExceptions;
2182    }
2183
2184    public boolean hasAvailabilityExceptionsElement() { 
2185      return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty();
2186    }
2187
2188    public boolean hasAvailabilityExceptions() { 
2189      return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty();
2190    }
2191
2192    /**
2193     * @param value {@link #availabilityExceptions} (A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value
2194     */
2195    public HealthcareService setAvailabilityExceptionsElement(StringType value) { 
2196      this.availabilityExceptions = value;
2197      return this;
2198    }
2199
2200    /**
2201     * @return A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.
2202     */
2203    public String getAvailabilityExceptions() { 
2204      return this.availabilityExceptions == null ? null : this.availabilityExceptions.getValue();
2205    }
2206
2207    /**
2208     * @param value A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.
2209     */
2210    public HealthcareService setAvailabilityExceptions(String value) { 
2211      if (Utilities.noString(value))
2212        this.availabilityExceptions = null;
2213      else {
2214        if (this.availabilityExceptions == null)
2215          this.availabilityExceptions = new StringType();
2216        this.availabilityExceptions.setValue(value);
2217      }
2218      return this;
2219    }
2220
2221    /**
2222     * @return {@link #endpoint} (Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.)
2223     */
2224    public List<Reference> getEndpoint() { 
2225      if (this.endpoint == null)
2226        this.endpoint = new ArrayList<Reference>();
2227      return this.endpoint;
2228    }
2229
2230    /**
2231     * @return Returns a reference to <code>this</code> for easy method chaining
2232     */
2233    public HealthcareService setEndpoint(List<Reference> theEndpoint) { 
2234      this.endpoint = theEndpoint;
2235      return this;
2236    }
2237
2238    public boolean hasEndpoint() { 
2239      if (this.endpoint == null)
2240        return false;
2241      for (Reference item : this.endpoint)
2242        if (!item.isEmpty())
2243          return true;
2244      return false;
2245    }
2246
2247    public Reference addEndpoint() { //3
2248      Reference t = new Reference();
2249      if (this.endpoint == null)
2250        this.endpoint = new ArrayList<Reference>();
2251      this.endpoint.add(t);
2252      return t;
2253    }
2254
2255    public HealthcareService addEndpoint(Reference t) { //3
2256      if (t == null)
2257        return this;
2258      if (this.endpoint == null)
2259        this.endpoint = new ArrayList<Reference>();
2260      this.endpoint.add(t);
2261      return this;
2262    }
2263
2264    /**
2265     * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist
2266     */
2267    public Reference getEndpointFirstRep() { 
2268      if (getEndpoint().isEmpty()) {
2269        addEndpoint();
2270      }
2271      return getEndpoint().get(0);
2272    }
2273
2274    /**
2275     * @deprecated Use Reference#setResource(IBaseResource) instead
2276     */
2277    @Deprecated
2278    public List<Endpoint> getEndpointTarget() { 
2279      if (this.endpointTarget == null)
2280        this.endpointTarget = new ArrayList<Endpoint>();
2281      return this.endpointTarget;
2282    }
2283
2284    /**
2285     * @deprecated Use Reference#setResource(IBaseResource) instead
2286     */
2287    @Deprecated
2288    public Endpoint addEndpointTarget() { 
2289      Endpoint r = new Endpoint();
2290      if (this.endpointTarget == null)
2291        this.endpointTarget = new ArrayList<Endpoint>();
2292      this.endpointTarget.add(r);
2293      return r;
2294    }
2295
2296      protected void listChildren(List<Property> children) {
2297        super.listChildren(children);
2298        children.add(new Property("identifier", "Identifier", "External identifiers for this item.", 0, java.lang.Integer.MAX_VALUE, identifier));
2299        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));
2300        children.add(new Property("providedBy", "Reference(Organization)", "The organization that provides this healthcare service.", 0, 1, providedBy));
2301        children.add(new Property("category", "CodeableConcept", "Identifies the broad category of service being performed or delivered.", 0, java.lang.Integer.MAX_VALUE, category));
2302        children.add(new Property("type", "CodeableConcept", "The specific type of service that may be delivered or performed.", 0, java.lang.Integer.MAX_VALUE, type));
2303        children.add(new Property("specialty", "CodeableConcept", "Collection of specialties handled by the service site. This is more of a medical term.", 0, java.lang.Integer.MAX_VALUE, specialty));
2304        children.add(new Property("location", "Reference(Location)", "The location(s) where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location));
2305        children.add(new Property("name", "string", "Further description of the service as it would be presented to a consumer while searching.", 0, 1, name));
2306        children.add(new Property("comment", "string", "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));
2307        children.add(new Property("extraDetails", "string", "Extra details about the service that can't be placed in the other fields.", 0, 1, extraDetails));
2308        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));
2309        children.add(new Property("telecom", "ContactPoint", "List of contacts related to this specific healthcare service.", 0, java.lang.Integer.MAX_VALUE, telecom));
2310        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));
2311        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));
2312        children.add(new Property("eligibility", "CodeableConcept", "Does this service have specific eligibility requirements that need to be met in order to use the service?", 0, 1, eligibility));
2313        children.add(new Property("eligibilityNote", "string", "Describes the eligibility conditions for the service.", 0, 1, eligibilityNote));
2314        children.add(new Property("programName", "string", "Program Names that can be used to categorize the service.", 0, java.lang.Integer.MAX_VALUE, programName));
2315        children.add(new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic));
2316        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));
2317        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));
2318        children.add(new Property("availableTime", "", "A collection of times that the Service Site is available.", 0, java.lang.Integer.MAX_VALUE, availableTime));
2319        children.add(new Property("notAvailable", "", "The HealthcareService is not available during this period of time due to the provided reason.", 0, java.lang.Integer.MAX_VALUE, notAvailable));
2320        children.add(new Property("availabilityExceptions", "string", "A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.", 0, 1, availabilityExceptions));
2321        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));
2322      }
2323
2324      @Override
2325      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2326        switch (_hash) {
2327        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "External identifiers for this item.", 0, java.lang.Integer.MAX_VALUE, identifier);
2328        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);
2329        case 205136282: /*providedBy*/  return new Property("providedBy", "Reference(Organization)", "The organization that provides this healthcare service.", 0, 1, providedBy);
2330        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);
2331        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);
2332        case -1694759682: /*specialty*/  return new Property("specialty", "CodeableConcept", "Collection of specialties handled by the service site. This is more of a medical term.", 0, java.lang.Integer.MAX_VALUE, specialty);
2333        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);
2334        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);
2335        case 950398559: /*comment*/  return new Property("comment", "string", "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);
2336        case -1469168622: /*extraDetails*/  return new Property("extraDetails", "string", "Extra details about the service that can't be placed in the other fields.", 0, 1, extraDetails);
2337        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);
2338        case -1429363305: /*telecom*/  return new Property("telecom", "ContactPoint", "List of contacts related to this specific healthcare service.", 0, java.lang.Integer.MAX_VALUE, telecom);
2339        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);
2340        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);
2341        case -930847859: /*eligibility*/  return new Property("eligibility", "CodeableConcept", "Does this service have specific eligibility requirements that need to be met in order to use the service?", 0, 1, eligibility);
2342        case 1635973407: /*eligibilityNote*/  return new Property("eligibilityNote", "string", "Describes the eligibility conditions for the service.", 0, 1, eligibilityNote);
2343        case 1010379567: /*programName*/  return new Property("programName", "string", "Program Names that can be used to categorize the service.", 0, java.lang.Integer.MAX_VALUE, programName);
2344        case 366313883: /*characteristic*/  return new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic);
2345        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);
2346        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);
2347        case 1873069366: /*availableTime*/  return new Property("availableTime", "", "A collection of times that the Service Site is available.", 0, java.lang.Integer.MAX_VALUE, availableTime);
2348        case -629572298: /*notAvailable*/  return new Property("notAvailable", "", "The HealthcareService is not available during this period of time due to the provided reason.", 0, java.lang.Integer.MAX_VALUE, notAvailable);
2349        case -1149143617: /*availabilityExceptions*/  return new Property("availabilityExceptions", "string", "A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.", 0, 1, availabilityExceptions);
2350        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);
2351        default: return super.getNamedProperty(_hash, _name, _checkValid);
2352        }
2353
2354      }
2355
2356      @Override
2357      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2358        switch (hash) {
2359        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2360        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
2361        case 205136282: /*providedBy*/ return this.providedBy == null ? new Base[0] : new Base[] {this.providedBy}; // Reference
2362        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
2363        case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
2364        case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept
2365        case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // Reference
2366        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
2367        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
2368        case -1469168622: /*extraDetails*/ return this.extraDetails == null ? new Base[0] : new Base[] {this.extraDetails}; // StringType
2369        case 106642994: /*photo*/ return this.photo == null ? new Base[0] : new Base[] {this.photo}; // Attachment
2370        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
2371        case -1532328299: /*coverageArea*/ return this.coverageArea == null ? new Base[0] : this.coverageArea.toArray(new Base[this.coverageArea.size()]); // Reference
2372        case 1504575405: /*serviceProvisionCode*/ return this.serviceProvisionCode == null ? new Base[0] : this.serviceProvisionCode.toArray(new Base[this.serviceProvisionCode.size()]); // CodeableConcept
2373        case -930847859: /*eligibility*/ return this.eligibility == null ? new Base[0] : new Base[] {this.eligibility}; // CodeableConcept
2374        case 1635973407: /*eligibilityNote*/ return this.eligibilityNote == null ? new Base[0] : new Base[] {this.eligibilityNote}; // StringType
2375        case 1010379567: /*programName*/ return this.programName == null ? new Base[0] : this.programName.toArray(new Base[this.programName.size()]); // StringType
2376        case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // CodeableConcept
2377        case -2092740898: /*referralMethod*/ return this.referralMethod == null ? new Base[0] : this.referralMethod.toArray(new Base[this.referralMethod.size()]); // CodeableConcept
2378        case 427220062: /*appointmentRequired*/ return this.appointmentRequired == null ? new Base[0] : new Base[] {this.appointmentRequired}; // BooleanType
2379        case 1873069366: /*availableTime*/ return this.availableTime == null ? new Base[0] : this.availableTime.toArray(new Base[this.availableTime.size()]); // HealthcareServiceAvailableTimeComponent
2380        case -629572298: /*notAvailable*/ return this.notAvailable == null ? new Base[0] : this.notAvailable.toArray(new Base[this.notAvailable.size()]); // HealthcareServiceNotAvailableComponent
2381        case -1149143617: /*availabilityExceptions*/ return this.availabilityExceptions == null ? new Base[0] : new Base[] {this.availabilityExceptions}; // StringType
2382        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference
2383        default: return super.getProperty(hash, name, checkValid);
2384        }
2385
2386      }
2387
2388      @Override
2389      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2390        switch (hash) {
2391        case -1618432855: // identifier
2392          this.getIdentifier().add(castToIdentifier(value)); // Identifier
2393          return value;
2394        case -1422950650: // active
2395          this.active = castToBoolean(value); // BooleanType
2396          return value;
2397        case 205136282: // providedBy
2398          this.providedBy = castToReference(value); // Reference
2399          return value;
2400        case 50511102: // category
2401          this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept
2402          return value;
2403        case 3575610: // type
2404          this.getType().add(castToCodeableConcept(value)); // CodeableConcept
2405          return value;
2406        case -1694759682: // specialty
2407          this.getSpecialty().add(castToCodeableConcept(value)); // CodeableConcept
2408          return value;
2409        case 1901043637: // location
2410          this.getLocation().add(castToReference(value)); // Reference
2411          return value;
2412        case 3373707: // name
2413          this.name = castToString(value); // StringType
2414          return value;
2415        case 950398559: // comment
2416          this.comment = castToString(value); // StringType
2417          return value;
2418        case -1469168622: // extraDetails
2419          this.extraDetails = castToString(value); // StringType
2420          return value;
2421        case 106642994: // photo
2422          this.photo = castToAttachment(value); // Attachment
2423          return value;
2424        case -1429363305: // telecom
2425          this.getTelecom().add(castToContactPoint(value)); // ContactPoint
2426          return value;
2427        case -1532328299: // coverageArea
2428          this.getCoverageArea().add(castToReference(value)); // Reference
2429          return value;
2430        case 1504575405: // serviceProvisionCode
2431          this.getServiceProvisionCode().add(castToCodeableConcept(value)); // CodeableConcept
2432          return value;
2433        case -930847859: // eligibility
2434          this.eligibility = castToCodeableConcept(value); // CodeableConcept
2435          return value;
2436        case 1635973407: // eligibilityNote
2437          this.eligibilityNote = castToString(value); // StringType
2438          return value;
2439        case 1010379567: // programName
2440          this.getProgramName().add(castToString(value)); // StringType
2441          return value;
2442        case 366313883: // characteristic
2443          this.getCharacteristic().add(castToCodeableConcept(value)); // CodeableConcept
2444          return value;
2445        case -2092740898: // referralMethod
2446          this.getReferralMethod().add(castToCodeableConcept(value)); // CodeableConcept
2447          return value;
2448        case 427220062: // appointmentRequired
2449          this.appointmentRequired = castToBoolean(value); // BooleanType
2450          return value;
2451        case 1873069366: // availableTime
2452          this.getAvailableTime().add((HealthcareServiceAvailableTimeComponent) value); // HealthcareServiceAvailableTimeComponent
2453          return value;
2454        case -629572298: // notAvailable
2455          this.getNotAvailable().add((HealthcareServiceNotAvailableComponent) value); // HealthcareServiceNotAvailableComponent
2456          return value;
2457        case -1149143617: // availabilityExceptions
2458          this.availabilityExceptions = castToString(value); // StringType
2459          return value;
2460        case 1741102485: // endpoint
2461          this.getEndpoint().add(castToReference(value)); // Reference
2462          return value;
2463        default: return super.setProperty(hash, name, value);
2464        }
2465
2466      }
2467
2468      @Override
2469      public Base setProperty(String name, Base value) throws FHIRException {
2470        if (name.equals("identifier")) {
2471          this.getIdentifier().add(castToIdentifier(value));
2472        } else if (name.equals("active")) {
2473          this.active = castToBoolean(value); // BooleanType
2474        } else if (name.equals("providedBy")) {
2475          this.providedBy = castToReference(value); // Reference
2476        } else if (name.equals("category")) {
2477          this.getCategory().add(castToCodeableConcept(value));
2478        } else if (name.equals("type")) {
2479          this.getType().add(castToCodeableConcept(value));
2480        } else if (name.equals("specialty")) {
2481          this.getSpecialty().add(castToCodeableConcept(value));
2482        } else if (name.equals("location")) {
2483          this.getLocation().add(castToReference(value));
2484        } else if (name.equals("name")) {
2485          this.name = castToString(value); // StringType
2486        } else if (name.equals("comment")) {
2487          this.comment = castToString(value); // StringType
2488        } else if (name.equals("extraDetails")) {
2489          this.extraDetails = castToString(value); // StringType
2490        } else if (name.equals("photo")) {
2491          this.photo = castToAttachment(value); // Attachment
2492        } else if (name.equals("telecom")) {
2493          this.getTelecom().add(castToContactPoint(value));
2494        } else if (name.equals("coverageArea")) {
2495          this.getCoverageArea().add(castToReference(value));
2496        } else if (name.equals("serviceProvisionCode")) {
2497          this.getServiceProvisionCode().add(castToCodeableConcept(value));
2498        } else if (name.equals("eligibility")) {
2499          this.eligibility = castToCodeableConcept(value); // CodeableConcept
2500        } else if (name.equals("eligibilityNote")) {
2501          this.eligibilityNote = castToString(value); // StringType
2502        } else if (name.equals("programName")) {
2503          this.getProgramName().add(castToString(value));
2504        } else if (name.equals("characteristic")) {
2505          this.getCharacteristic().add(castToCodeableConcept(value));
2506        } else if (name.equals("referralMethod")) {
2507          this.getReferralMethod().add(castToCodeableConcept(value));
2508        } else if (name.equals("appointmentRequired")) {
2509          this.appointmentRequired = castToBoolean(value); // BooleanType
2510        } else if (name.equals("availableTime")) {
2511          this.getAvailableTime().add((HealthcareServiceAvailableTimeComponent) value);
2512        } else if (name.equals("notAvailable")) {
2513          this.getNotAvailable().add((HealthcareServiceNotAvailableComponent) value);
2514        } else if (name.equals("availabilityExceptions")) {
2515          this.availabilityExceptions = castToString(value); // StringType
2516        } else if (name.equals("endpoint")) {
2517          this.getEndpoint().add(castToReference(value));
2518        } else
2519          return super.setProperty(name, value);
2520        return value;
2521      }
2522
2523      @Override
2524      public Base makeProperty(int hash, String name) throws FHIRException {
2525        switch (hash) {
2526        case -1618432855:  return addIdentifier(); 
2527        case -1422950650:  return getActiveElement();
2528        case 205136282:  return getProvidedBy(); 
2529        case 50511102:  return addCategory(); 
2530        case 3575610:  return addType(); 
2531        case -1694759682:  return addSpecialty(); 
2532        case 1901043637:  return addLocation(); 
2533        case 3373707:  return getNameElement();
2534        case 950398559:  return getCommentElement();
2535        case -1469168622:  return getExtraDetailsElement();
2536        case 106642994:  return getPhoto(); 
2537        case -1429363305:  return addTelecom(); 
2538        case -1532328299:  return addCoverageArea(); 
2539        case 1504575405:  return addServiceProvisionCode(); 
2540        case -930847859:  return getEligibility(); 
2541        case 1635973407:  return getEligibilityNoteElement();
2542        case 1010379567:  return addProgramNameElement();
2543        case 366313883:  return addCharacteristic(); 
2544        case -2092740898:  return addReferralMethod(); 
2545        case 427220062:  return getAppointmentRequiredElement();
2546        case 1873069366:  return addAvailableTime(); 
2547        case -629572298:  return addNotAvailable(); 
2548        case -1149143617:  return getAvailabilityExceptionsElement();
2549        case 1741102485:  return addEndpoint(); 
2550        default: return super.makeProperty(hash, name);
2551        }
2552
2553      }
2554
2555      @Override
2556      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2557        switch (hash) {
2558        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2559        case -1422950650: /*active*/ return new String[] {"boolean"};
2560        case 205136282: /*providedBy*/ return new String[] {"Reference"};
2561        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
2562        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
2563        case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"};
2564        case 1901043637: /*location*/ return new String[] {"Reference"};
2565        case 3373707: /*name*/ return new String[] {"string"};
2566        case 950398559: /*comment*/ return new String[] {"string"};
2567        case -1469168622: /*extraDetails*/ return new String[] {"string"};
2568        case 106642994: /*photo*/ return new String[] {"Attachment"};
2569        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
2570        case -1532328299: /*coverageArea*/ return new String[] {"Reference"};
2571        case 1504575405: /*serviceProvisionCode*/ return new String[] {"CodeableConcept"};
2572        case -930847859: /*eligibility*/ return new String[] {"CodeableConcept"};
2573        case 1635973407: /*eligibilityNote*/ return new String[] {"string"};
2574        case 1010379567: /*programName*/ return new String[] {"string"};
2575        case 366313883: /*characteristic*/ return new String[] {"CodeableConcept"};
2576        case -2092740898: /*referralMethod*/ return new String[] {"CodeableConcept"};
2577        case 427220062: /*appointmentRequired*/ return new String[] {"boolean"};
2578        case 1873069366: /*availableTime*/ return new String[] {};
2579        case -629572298: /*notAvailable*/ return new String[] {};
2580        case -1149143617: /*availabilityExceptions*/ return new String[] {"string"};
2581        case 1741102485: /*endpoint*/ return new String[] {"Reference"};
2582        default: return super.getTypesForProperty(hash, name);
2583        }
2584
2585      }
2586
2587      @Override
2588      public Base addChild(String name) throws FHIRException {
2589        if (name.equals("identifier")) {
2590          return addIdentifier();
2591        }
2592        else if (name.equals("active")) {
2593          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.active");
2594        }
2595        else if (name.equals("providedBy")) {
2596          this.providedBy = new Reference();
2597          return this.providedBy;
2598        }
2599        else if (name.equals("category")) {
2600          return addCategory();
2601        }
2602        else if (name.equals("type")) {
2603          return addType();
2604        }
2605        else if (name.equals("specialty")) {
2606          return addSpecialty();
2607        }
2608        else if (name.equals("location")) {
2609          return addLocation();
2610        }
2611        else if (name.equals("name")) {
2612          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.name");
2613        }
2614        else if (name.equals("comment")) {
2615          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.comment");
2616        }
2617        else if (name.equals("extraDetails")) {
2618          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.extraDetails");
2619        }
2620        else if (name.equals("photo")) {
2621          this.photo = new Attachment();
2622          return this.photo;
2623        }
2624        else if (name.equals("telecom")) {
2625          return addTelecom();
2626        }
2627        else if (name.equals("coverageArea")) {
2628          return addCoverageArea();
2629        }
2630        else if (name.equals("serviceProvisionCode")) {
2631          return addServiceProvisionCode();
2632        }
2633        else if (name.equals("eligibility")) {
2634          this.eligibility = new CodeableConcept();
2635          return this.eligibility;
2636        }
2637        else if (name.equals("eligibilityNote")) {
2638          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.eligibilityNote");
2639        }
2640        else if (name.equals("programName")) {
2641          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.programName");
2642        }
2643        else if (name.equals("characteristic")) {
2644          return addCharacteristic();
2645        }
2646        else if (name.equals("referralMethod")) {
2647          return addReferralMethod();
2648        }
2649        else if (name.equals("appointmentRequired")) {
2650          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.appointmentRequired");
2651        }
2652        else if (name.equals("availableTime")) {
2653          return addAvailableTime();
2654        }
2655        else if (name.equals("notAvailable")) {
2656          return addNotAvailable();
2657        }
2658        else if (name.equals("availabilityExceptions")) {
2659          throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.availabilityExceptions");
2660        }
2661        else if (name.equals("endpoint")) {
2662          return addEndpoint();
2663        }
2664        else
2665          return super.addChild(name);
2666      }
2667
2668  public String fhirType() {
2669    return "HealthcareService";
2670
2671  }
2672
2673      public HealthcareService copy() {
2674        HealthcareService dst = new HealthcareService();
2675        copyValues(dst);
2676        if (identifier != null) {
2677          dst.identifier = new ArrayList<Identifier>();
2678          for (Identifier i : identifier)
2679            dst.identifier.add(i.copy());
2680        };
2681        dst.active = active == null ? null : active.copy();
2682        dst.providedBy = providedBy == null ? null : providedBy.copy();
2683        if (category != null) {
2684          dst.category = new ArrayList<CodeableConcept>();
2685          for (CodeableConcept i : category)
2686            dst.category.add(i.copy());
2687        };
2688        if (type != null) {
2689          dst.type = new ArrayList<CodeableConcept>();
2690          for (CodeableConcept i : type)
2691            dst.type.add(i.copy());
2692        };
2693        if (specialty != null) {
2694          dst.specialty = new ArrayList<CodeableConcept>();
2695          for (CodeableConcept i : specialty)
2696            dst.specialty.add(i.copy());
2697        };
2698        if (location != null) {
2699          dst.location = new ArrayList<Reference>();
2700          for (Reference i : location)
2701            dst.location.add(i.copy());
2702        };
2703        dst.name = name == null ? null : name.copy();
2704        dst.comment = comment == null ? null : comment.copy();
2705        dst.extraDetails = extraDetails == null ? null : extraDetails.copy();
2706        dst.photo = photo == null ? null : photo.copy();
2707        if (telecom != null) {
2708          dst.telecom = new ArrayList<ContactPoint>();
2709          for (ContactPoint i : telecom)
2710            dst.telecom.add(i.copy());
2711        };
2712        if (coverageArea != null) {
2713          dst.coverageArea = new ArrayList<Reference>();
2714          for (Reference i : coverageArea)
2715            dst.coverageArea.add(i.copy());
2716        };
2717        if (serviceProvisionCode != null) {
2718          dst.serviceProvisionCode = new ArrayList<CodeableConcept>();
2719          for (CodeableConcept i : serviceProvisionCode)
2720            dst.serviceProvisionCode.add(i.copy());
2721        };
2722        dst.eligibility = eligibility == null ? null : eligibility.copy();
2723        dst.eligibilityNote = eligibilityNote == null ? null : eligibilityNote.copy();
2724        if (programName != null) {
2725          dst.programName = new ArrayList<StringType>();
2726          for (StringType i : programName)
2727            dst.programName.add(i.copy());
2728        };
2729        if (characteristic != null) {
2730          dst.characteristic = new ArrayList<CodeableConcept>();
2731          for (CodeableConcept i : characteristic)
2732            dst.characteristic.add(i.copy());
2733        };
2734        if (referralMethod != null) {
2735          dst.referralMethod = new ArrayList<CodeableConcept>();
2736          for (CodeableConcept i : referralMethod)
2737            dst.referralMethod.add(i.copy());
2738        };
2739        dst.appointmentRequired = appointmentRequired == null ? null : appointmentRequired.copy();
2740        if (availableTime != null) {
2741          dst.availableTime = new ArrayList<HealthcareServiceAvailableTimeComponent>();
2742          for (HealthcareServiceAvailableTimeComponent i : availableTime)
2743            dst.availableTime.add(i.copy());
2744        };
2745        if (notAvailable != null) {
2746          dst.notAvailable = new ArrayList<HealthcareServiceNotAvailableComponent>();
2747          for (HealthcareServiceNotAvailableComponent i : notAvailable)
2748            dst.notAvailable.add(i.copy());
2749        };
2750        dst.availabilityExceptions = availabilityExceptions == null ? null : availabilityExceptions.copy();
2751        if (endpoint != null) {
2752          dst.endpoint = new ArrayList<Reference>();
2753          for (Reference i : endpoint)
2754            dst.endpoint.add(i.copy());
2755        };
2756        return dst;
2757      }
2758
2759      protected HealthcareService typedCopy() {
2760        return copy();
2761      }
2762
2763      @Override
2764      public boolean equalsDeep(Base other_) {
2765        if (!super.equalsDeep(other_))
2766          return false;
2767        if (!(other_ instanceof HealthcareService))
2768          return false;
2769        HealthcareService o = (HealthcareService) other_;
2770        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(providedBy, o.providedBy, true)
2771           && compareDeep(category, o.category, true) && compareDeep(type, o.type, true) && compareDeep(specialty, o.specialty, true)
2772           && compareDeep(location, o.location, true) && compareDeep(name, o.name, true) && compareDeep(comment, o.comment, true)
2773           && compareDeep(extraDetails, o.extraDetails, true) && compareDeep(photo, o.photo, true) && compareDeep(telecom, o.telecom, true)
2774           && compareDeep(coverageArea, o.coverageArea, true) && compareDeep(serviceProvisionCode, o.serviceProvisionCode, true)
2775           && compareDeep(eligibility, o.eligibility, true) && compareDeep(eligibilityNote, o.eligibilityNote, true)
2776           && compareDeep(programName, o.programName, true) && compareDeep(characteristic, o.characteristic, true)
2777           && compareDeep(referralMethod, o.referralMethod, true) && compareDeep(appointmentRequired, o.appointmentRequired, true)
2778           && compareDeep(availableTime, o.availableTime, true) && compareDeep(notAvailable, o.notAvailable, true)
2779           && compareDeep(availabilityExceptions, o.availabilityExceptions, true) && compareDeep(endpoint, o.endpoint, true)
2780          ;
2781      }
2782
2783      @Override
2784      public boolean equalsShallow(Base other_) {
2785        if (!super.equalsShallow(other_))
2786          return false;
2787        if (!(other_ instanceof HealthcareService))
2788          return false;
2789        HealthcareService o = (HealthcareService) other_;
2790        return compareValues(active, o.active, true) && compareValues(name, o.name, true) && compareValues(comment, o.comment, true)
2791           && compareValues(extraDetails, o.extraDetails, true) && compareValues(eligibilityNote, o.eligibilityNote, true)
2792           && compareValues(programName, o.programName, true) && compareValues(appointmentRequired, o.appointmentRequired, true)
2793           && compareValues(availabilityExceptions, o.availabilityExceptions, true);
2794      }
2795
2796      public boolean isEmpty() {
2797        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, providedBy
2798          , category, type, specialty, location, name, comment, extraDetails, photo, telecom
2799          , coverageArea, serviceProvisionCode, eligibility, eligibilityNote, programName, characteristic
2800          , referralMethod, appointmentRequired, availableTime, notAvailable, availabilityExceptions
2801          , endpoint);
2802      }
2803
2804  @Override
2805  public ResourceType getResourceType() {
2806    return ResourceType.HealthcareService;
2807   }
2808
2809 /**
2810   * Search parameter: <b>identifier</b>
2811   * <p>
2812   * Description: <b>External identifiers for this item</b><br>
2813   * Type: <b>token</b><br>
2814   * Path: <b>HealthcareService.identifier</b><br>
2815   * </p>
2816   */
2817  @SearchParamDefinition(name="identifier", path="HealthcareService.identifier", description="External identifiers for this item", type="token" )
2818  public static final String SP_IDENTIFIER = "identifier";
2819 /**
2820   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2821   * <p>
2822   * Description: <b>External identifiers for this item</b><br>
2823   * Type: <b>token</b><br>
2824   * Path: <b>HealthcareService.identifier</b><br>
2825   * </p>
2826   */
2827  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2828
2829 /**
2830   * Search parameter: <b>endpoint</b>
2831   * <p>
2832   * Description: <b>Technical endpoints providing access to services operated for the location</b><br>
2833   * Type: <b>reference</b><br>
2834   * Path: <b>HealthcareService.endpoint</b><br>
2835   * </p>
2836   */
2837  @SearchParamDefinition(name="endpoint", path="HealthcareService.endpoint", description="Technical endpoints providing access to services operated for the location", type="reference", target={Endpoint.class } )
2838  public static final String SP_ENDPOINT = "endpoint";
2839 /**
2840   * <b>Fluent Client</b> search parameter constant for <b>endpoint</b>
2841   * <p>
2842   * Description: <b>Technical endpoints providing access to services operated for the location</b><br>
2843   * Type: <b>reference</b><br>
2844   * Path: <b>HealthcareService.endpoint</b><br>
2845   * </p>
2846   */
2847  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT);
2848
2849/**
2850   * Constant for fluent queries to be used to add include statements. Specifies
2851   * the path value of "<b>HealthcareService:endpoint</b>".
2852   */
2853  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("HealthcareService:endpoint").toLocked();
2854
2855 /**
2856   * Search parameter: <b>organization</b>
2857   * <p>
2858   * Description: <b>The organization that provides this Healthcare Service</b><br>
2859   * Type: <b>reference</b><br>
2860   * Path: <b>HealthcareService.providedBy</b><br>
2861   * </p>
2862   */
2863  @SearchParamDefinition(name="organization", path="HealthcareService.providedBy", description="The organization that provides this Healthcare Service", type="reference", target={Organization.class } )
2864  public static final String SP_ORGANIZATION = "organization";
2865 /**
2866   * <b>Fluent Client</b> search parameter constant for <b>organization</b>
2867   * <p>
2868   * Description: <b>The organization that provides this Healthcare Service</b><br>
2869   * Type: <b>reference</b><br>
2870   * Path: <b>HealthcareService.providedBy</b><br>
2871   * </p>
2872   */
2873  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION);
2874
2875/**
2876   * Constant for fluent queries to be used to add include statements. Specifies
2877   * the path value of "<b>HealthcareService:organization</b>".
2878   */
2879  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("HealthcareService:organization").toLocked();
2880
2881 /**
2882   * Search parameter: <b>name</b>
2883   * <p>
2884   * Description: <b>A portion of the Healthcare service name</b><br>
2885   * Type: <b>string</b><br>
2886   * Path: <b>HealthcareService.name</b><br>
2887   * </p>
2888   */
2889  @SearchParamDefinition(name="name", path="HealthcareService.name", description="A portion of the Healthcare service name", type="string" )
2890  public static final String SP_NAME = "name";
2891 /**
2892   * <b>Fluent Client</b> search parameter constant for <b>name</b>
2893   * <p>
2894   * Description: <b>A portion of the Healthcare service name</b><br>
2895   * Type: <b>string</b><br>
2896   * Path: <b>HealthcareService.name</b><br>
2897   * </p>
2898   */
2899  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
2900
2901 /**
2902   * Search parameter: <b>programname</b>
2903   * <p>
2904   * Description: <b>One of the Program Names serviced by this HealthcareService</b><br>
2905   * Type: <b>string</b><br>
2906   * Path: <b>HealthcareService.programName</b><br>
2907   * </p>
2908   */
2909  @SearchParamDefinition(name="programname", path="HealthcareService.programName", description="One of the Program Names serviced by this HealthcareService", type="string" )
2910  public static final String SP_PROGRAMNAME = "programname";
2911 /**
2912   * <b>Fluent Client</b> search parameter constant for <b>programname</b>
2913   * <p>
2914   * Description: <b>One of the Program Names serviced by this HealthcareService</b><br>
2915   * Type: <b>string</b><br>
2916   * Path: <b>HealthcareService.programName</b><br>
2917   * </p>
2918   */
2919  public static final ca.uhn.fhir.rest.gclient.StringClientParam PROGRAMNAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PROGRAMNAME);
2920
2921 /**
2922   * Search parameter: <b>active</b>
2923   * <p>
2924   * Description: <b>The Healthcare Service is currently marked as active</b><br>
2925   * Type: <b>token</b><br>
2926   * Path: <b>HealthcareService.active</b><br>
2927   * </p>
2928   */
2929  @SearchParamDefinition(name="active", path="HealthcareService.active", description="The Healthcare Service is currently marked as active", type="token" )
2930  public static final String SP_ACTIVE = "active";
2931 /**
2932   * <b>Fluent Client</b> search parameter constant for <b>active</b>
2933   * <p>
2934   * Description: <b>The Healthcare Service is currently marked as active</b><br>
2935   * Type: <b>token</b><br>
2936   * Path: <b>HealthcareService.active</b><br>
2937   * </p>
2938   */
2939  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTIVE);
2940
2941 /**
2942   * Search parameter: <b>location</b>
2943   * <p>
2944   * Description: <b>The location of the Healthcare Service</b><br>
2945   * Type: <b>reference</b><br>
2946   * Path: <b>HealthcareService.location</b><br>
2947   * </p>
2948   */
2949  @SearchParamDefinition(name="location", path="HealthcareService.location", description="The location of the Healthcare Service", type="reference", target={Location.class } )
2950  public static final String SP_LOCATION = "location";
2951 /**
2952   * <b>Fluent Client</b> search parameter constant for <b>location</b>
2953   * <p>
2954   * Description: <b>The location of the Healthcare Service</b><br>
2955   * Type: <b>reference</b><br>
2956   * Path: <b>HealthcareService.location</b><br>
2957   * </p>
2958   */
2959  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION);
2960
2961/**
2962   * Constant for fluent queries to be used to add include statements. Specifies
2963   * the path value of "<b>HealthcareService:location</b>".
2964   */
2965  public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("HealthcareService:location").toLocked();
2966
2967 /**
2968   * Search parameter: <b>category</b>
2969   * <p>
2970   * Description: <b>Service Category of the Healthcare Service</b><br>
2971   * Type: <b>token</b><br>
2972   * Path: <b>HealthcareService.category</b><br>
2973   * </p>
2974   */
2975  @SearchParamDefinition(name="category", path="HealthcareService.category", description="Service Category of the Healthcare Service", type="token" )
2976  public static final String SP_CATEGORY = "category";
2977 /**
2978   * <b>Fluent Client</b> search parameter constant for <b>category</b>
2979   * <p>
2980   * Description: <b>Service Category of the Healthcare Service</b><br>
2981   * Type: <b>token</b><br>
2982   * Path: <b>HealthcareService.category</b><br>
2983   * </p>
2984   */
2985  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
2986
2987 /**
2988   * Search parameter: <b>type</b>
2989   * <p>
2990   * Description: <b>The type of service provided by this healthcare service</b><br>
2991   * Type: <b>token</b><br>
2992   * Path: <b>HealthcareService.type</b><br>
2993   * </p>
2994   */
2995  @SearchParamDefinition(name="type", path="HealthcareService.type", description="The type of service provided by this healthcare service", type="token" )
2996  public static final String SP_TYPE = "type";
2997 /**
2998   * <b>Fluent Client</b> search parameter constant for <b>type</b>
2999   * <p>
3000   * Description: <b>The type of service provided by this healthcare service</b><br>
3001   * Type: <b>token</b><br>
3002   * Path: <b>HealthcareService.type</b><br>
3003   * </p>
3004   */
3005  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
3006
3007 /**
3008   * Search parameter: <b>characteristic</b>
3009   * <p>
3010   * Description: <b>One of the HealthcareService's characteristics</b><br>
3011   * Type: <b>token</b><br>
3012   * Path: <b>HealthcareService.characteristic</b><br>
3013   * </p>
3014   */
3015  @SearchParamDefinition(name="characteristic", path="HealthcareService.characteristic", description="One of the HealthcareService's characteristics", type="token" )
3016  public static final String SP_CHARACTERISTIC = "characteristic";
3017 /**
3018   * <b>Fluent Client</b> search parameter constant for <b>characteristic</b>
3019   * <p>
3020   * Description: <b>One of the HealthcareService's characteristics</b><br>
3021   * Type: <b>token</b><br>
3022   * Path: <b>HealthcareService.characteristic</b><br>
3023   * </p>
3024   */
3025  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHARACTERISTIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHARACTERISTIC);
3026
3027
3028}
3029